Skip to content

Commit

Permalink
feat(generator): new client automatically generated in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bencromwell authored and github-actions[bot] committed Nov 1, 2024
1 parent cce9c89 commit 8e13e4a
Show file tree
Hide file tree
Showing 397 changed files with 28,838 additions and 1,212 deletions.
512 changes: 390 additions & 122 deletions src/Core/Client.php

Large diffs are not rendered by default.

95 changes: 95 additions & 0 deletions src/Core/Endpoint/DeleteObjectStorageAccessKey.php
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'];
}
}
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 src/Core/Endpoint/DeleteVirtualMachineNetworkInterface.php
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'];
}
}
4 changes: 1 addition & 3 deletions src/Core/Endpoint/GetAddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class GetAddressList extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint imple
* @param array $queryParameters {
*
* @var string $address_list[id] The address list to return.
*
* All 'address_list[]' params are mutually exclusive, only one can be provided.
* }
* }
*/
public function __construct(array $queryParameters = [])
{
Expand Down
10 changes: 4 additions & 6 deletions src/Core/Endpoint/GetAddressListEntries.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ class GetAddressListEntries extends \KatapultAPI\Core\Runtime\Client\BaseEndpoin
*
* @param array $queryParameters {
*
* @var string $address_list[id] The address list for which the entries should be returned.
*
* All 'address_list[]' params are mutually exclusive, only one can be provided.
* @var int $page The page number to request. If not provided, the first page will be returned.
* @var int $per_page The number of items to return per page. If not provided, the default value will be used.
* }
* @var string $address_list[id] The address list for which the entries should be returned
* @var int $page The page number to request. If not provided, the first page will be returned.
* @var int $per_page The number of items to return per page. If not provided, the default value will be used.
* }
*/
public function __construct(array $queryParameters = [])
{
Expand Down
4 changes: 1 addition & 3 deletions src/Core/Endpoint/GetAddressListEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class GetAddressListEntry extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint
* @param array $queryParameters {
*
* @var string $address_list_entry[id] The address list entry to return.
*
* All 'address_list_entry[]' params are mutually exclusive, only one can be provided.
* }
* }
*/
public function __construct(array $queryParameters = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Endpoint/GetCertificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GetCertificate extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint imple
*
* @param array $queryParameters {
*
* @var string $certificate[id] All 'certificate[]' params are mutually exclusive, only one can be provided.
* @var string $certificate[id]
* }
*/
public function __construct(array $queryParameters = [])
Expand Down
4 changes: 1 addition & 3 deletions src/Core/Endpoint/GetCountryState.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ class GetCountryState extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint impl
* @param array $queryParameters {
*
* @var string $country_state[id] The country state to return.
*
* All 'country_state[]' params are mutually exclusive, only one can be provided.
* }
* }
*/
public function __construct(array $queryParameters = [])
{
Expand Down
4 changes: 1 addition & 3 deletions src/Core/Endpoint/GetDisk.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class GetDisk extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint implements \
* @param array $queryParameters {
*
* @var string $disk[id] The disk to return.
*
* All 'disk[]' params are mutually exclusive, only one can be provided.
* }
* }
*/
public function __construct(array $queryParameters = [])
{
Expand Down
4 changes: 1 addition & 3 deletions src/Core/Endpoint/GetDiskBackupPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class GetDiskBackupPolicy extends \KatapultAPI\Core\Runtime\Client\BaseEndpoint
* @param array $queryParameters {
*
* @var string $disk_backup_policy[id] The disk backup policy to get information for.
*
* All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided.
* }
* }
*/
public function __construct(array $queryParameters = [])
{
Expand Down
Loading

0 comments on commit 8e13e4a

Please sign in to comment.