-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from krystal/feat/2.62
feat: update to Katapult 2.62
- Loading branch information
Showing
399 changed files
with
39,778 additions
and
10,245 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file has been auto generated by Jane, | ||
* | ||
* Do no edit it directly. | ||
*/ | ||
|
||
namespace KatapultAPI\Core\Endpoint; | ||
|
||
class DeleteObjectStorageAccessKey extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint implements \KatapultAPI\Core\Runtime\Client\Endpoint | ||
{ | ||
use \KatapultAPI\Core\Runtime\Client\EndpointTrait; | ||
|
||
/** | ||
* Delete an object storage access key | ||
* ## Scopes | ||
* - `object_storage`. | ||
* | ||
* ### OAuth2 Scopes | ||
* When using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`. | ||
*/ | ||
public function __construct(?\KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteBody $requestBody = null) | ||
{ | ||
$this->body = $requestBody; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'DELETE'; | ||
} | ||
|
||
public function getUri(): string | ||
{ | ||
return '/object_storage/access_keys/access_key'; | ||
} | ||
|
||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array | ||
{ | ||
if ($this->body instanceof \KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteBody) { | ||
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')]; | ||
} | ||
|
||
return [[], null]; | ||
} | ||
|
||
public function getExtraHeaders(): array | ||
{ | ||
return ['Accept' => ['application/json']]; | ||
} | ||
|
||
/** | ||
* @return \KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteResponse200|null | ||
* | ||
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyBadRequestException | ||
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyForbiddenException | ||
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyNotFoundException | ||
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyTooManyRequestsException | ||
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyServiceUnavailableException | ||
* @throws \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyGatewayTimeoutException | ||
*/ | ||
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) | ||
{ | ||
$status = $response->getStatusCode(); | ||
$body = (string) $response->getBody(); | ||
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\ObjectStorageAccessKeysAccessKeyDeleteResponse200', 'json'); | ||
} | ||
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyForbiddenException($response); | ||
} | ||
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseObjectStorageAccessKeyNotFoundResponse', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (504 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteObjectStorageAccessKeyGatewayTimeoutException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseNetworkErrorResponse', 'json'), $response); | ||
} | ||
} | ||
|
||
public function getAuthenticationScopes(): array | ||
{ | ||
return ['OAuth2', 'Authenticator']; | ||
} | ||
} |
99 changes: 99 additions & 0 deletions
99
src/Core/Endpoint/DeleteOrganizationObjectStorageObjectStorageCluster.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file has been auto generated by Jane, | ||
* | ||
* Do no edit it directly. | ||
*/ | ||
|
||
namespace KatapultAPI\Core\Endpoint; | ||
|
||
class DeleteOrganizationObjectStorageObjectStorageCluster extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint implements \KatapultAPI\Core\Runtime\Client\Endpoint | ||
{ | ||
use \KatapultAPI\Core\Runtime\Client\EndpointTrait; | ||
|
||
/** | ||
* Move object storage into the trash | ||
* ## Scopes | ||
* - `object_storage`. | ||
* | ||
* ### OAuth2 Scopes | ||
* When using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`. | ||
*/ | ||
public function __construct(?\KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteBody $requestBody = null) | ||
{ | ||
$this->body = $requestBody; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'DELETE'; | ||
} | ||
|
||
public function getUri(): string | ||
{ | ||
return '/organizations/organization/object_storage/object_storage_cluster'; | ||
} | ||
|
||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array | ||
{ | ||
if ($this->body instanceof \KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteBody) { | ||
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')]; | ||
} | ||
|
||
return [[], null]; | ||
} | ||
|
||
public function getExtraHeaders(): array | ||
{ | ||
return ['Accept' => ['application/json']]; | ||
} | ||
|
||
/** | ||
* @return \KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteResponse200|null | ||
* | ||
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterBadRequestException | ||
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterForbiddenException | ||
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotFoundException | ||
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotAcceptableException | ||
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterUnprocessableEntityException | ||
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterTooManyRequestsException | ||
* @throws \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterServiceUnavailableException | ||
*/ | ||
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) | ||
{ | ||
$status = $response->getStatusCode(); | ||
$body = (string) $response->getBody(); | ||
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\OrganizationsOrganizationObjectStorageObjectStorageClusterDeleteResponse200', 'json'); | ||
} | ||
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterForbiddenException($response); | ||
} | ||
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotFoundException($response); | ||
} | ||
if (is_null($contentType) === false && (406 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterNotAcceptableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseObjectInTrashResponse', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (422 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseValidationErrorResponse', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteOrganizationObjectStorageObjectStorageClusterServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response); | ||
} | ||
} | ||
|
||
public function getAuthenticationScopes(): array | ||
{ | ||
return ['OAuth2', 'Authenticator']; | ||
} | ||
} |
99 changes: 99 additions & 0 deletions
99
src/Core/Endpoint/DeleteVirtualMachineNetworkInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file has been auto generated by Jane, | ||
* | ||
* Do no edit it directly. | ||
*/ | ||
|
||
namespace KatapultAPI\Core\Endpoint; | ||
|
||
class DeleteVirtualMachineNetworkInterface extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint implements \KatapultAPI\Core\Runtime\Client\Endpoint | ||
{ | ||
use \KatapultAPI\Core\Runtime\Client\EndpointTrait; | ||
|
||
/** | ||
* ## Scopes | ||
* - `virtual_machines` | ||
* - `virtual_machines:network_interfaces`. | ||
* | ||
* ### OAuth2 Scopes | ||
* When using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`. | ||
*/ | ||
public function __construct(?\KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteBody $requestBody = null) | ||
{ | ||
$this->body = $requestBody; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return 'DELETE'; | ||
} | ||
|
||
public function getUri(): string | ||
{ | ||
return '/virtual_machine_network_interfaces/virtual_machine_network_interface'; | ||
} | ||
|
||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array | ||
{ | ||
if ($this->body instanceof \KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteBody) { | ||
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')]; | ||
} | ||
|
||
return [[], null]; | ||
} | ||
|
||
public function getExtraHeaders(): array | ||
{ | ||
return ['Accept' => ['application/json']]; | ||
} | ||
|
||
/** | ||
* @return \KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteResponse200|null | ||
* | ||
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceBadRequestException | ||
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceForbiddenException | ||
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceNotFoundException | ||
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceConflictException | ||
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceUnprocessableEntityException | ||
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceTooManyRequestsException | ||
* @throws \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceServiceUnavailableException | ||
*/ | ||
protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) | ||
{ | ||
$status = $response->getStatusCode(); | ||
$body = (string) $response->getBody(); | ||
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\VirtualMachineNetworkInterfacesVirtualMachineNetworkInterfaceDeleteResponse200', 'json'); | ||
} | ||
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceForbiddenException($response); | ||
} | ||
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseVirtualMachineNetworkInterfaceNotFoundResponse', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (409 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceConflictException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseDeletionRestrictedResponse', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (422 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseValidationErrorResponse', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response); | ||
} | ||
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) { | ||
throw new \KatapultAPI\Core\Exception\DeleteVirtualMachineNetworkInterfaceServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response); | ||
} | ||
} | ||
|
||
public function getAuthenticationScopes(): array | ||
{ | ||
return ['OAuth2', 'Authenticator']; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.