Skip to content

Commit

Permalink
feat: update to Katapult 2.43.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bencromwell committed Jul 1, 2024
1 parent b25ab22 commit 6aee8ce
Show file tree
Hide file tree
Showing 190 changed files with 12,280 additions and 2,676 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.0.0
3,740 changes: 1,351 additions & 2,389 deletions composer.lock

Large diffs are not rendered by default.

240 changes: 238 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,27 @@ public function getOrganization(array $queryParameters = [], string $fetch = sel
return $this->executeEndpoint(new Endpoint\GetOrganization($queryParameters), $fetch);
}

/**
* @param array $queryParameters {
*
* @var string $organization[id] All 'organization[]' params are mutually exclusive, only one can be provided
* @var string $organization[sub_domain] All 'organization[]' params are mutually exclusive, only one can be provided.
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\OrganizationsOrganizationPolicyLimitsGetResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\GetOrganizationPolicyLimitsBadRequestException
* @throws Exception\GetOrganizationPolicyLimitsForbiddenException
* @throws Exception\GetOrganizationPolicyLimitsNotFoundException
* @throws Exception\GetOrganizationPolicyLimitsTooManyRequestsException
*/
public function getOrganizationPolicyLimits(array $queryParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\GetOrganizationPolicyLimits($queryParameters), $fetch);
}

/**
* @param array $queryParameters {
*
Expand Down Expand Up @@ -531,6 +552,22 @@ public function postVirtualMachineAllocateIp(Model\VirtualMachinesVirtualMachine
return $this->executeEndpoint(new Endpoint\PostVirtualMachineAllocateIp($requestBody), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
* @param array $accept Accept content header text/plain|application/json
*
* @return \Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\GetVirtualMachineAuthorizedKeysBadRequestException
* @throws Exception\GetVirtualMachineAuthorizedKeysForbiddenException
* @throws Exception\GetVirtualMachineAuthorizedKeysNotFoundException
* @throws Exception\GetVirtualMachineAuthorizedKeysTooManyRequestsException
*/
public function getVirtualMachineAuthorizedKeys(string $fetch = self::FETCH_OBJECT, array $accept = [])
{
return $this->executeEndpoint(new Endpoint\GetVirtualMachineAuthorizedKeys($accept), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
Expand Down Expand Up @@ -1493,6 +1530,205 @@ public function getOrganizationNetworkSpeedProfiles(array $queryParameters = [],
return $this->executeEndpoint(new Endpoint\GetOrganizationNetworkSpeedProfiles($queryParameters), $fetch);
}

/**
* @param array $queryParameters {
*
* @var int $page
* @var int $per_page
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsGetResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\GetAddressListsBadRequestException
* @throws Exception\GetAddressListsForbiddenException
* @throws Exception\GetAddressListsTooManyRequestsException
*/
public function getAddressLists(array $queryParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\GetAddressLists($queryParameters), $fetch);
}

/**
* @param array $queryParameters {
*
* @var string $organization[id] The organization for which the address lists should be returned. All 'organization[]' params are mutually exclusive, only one can be provided.
* @var string $organization[sub_domain] The organization for which the address lists should be returned. All 'organization[]' params are mutually exclusive, only one can be provided.
* @var int $page
* @var int $per_page
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\OrganizationsOrganizationAddressListsGetResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\GetOrganizationAddressListsBadRequestException
* @throws Exception\GetOrganizationAddressListsForbiddenException
* @throws Exception\GetOrganizationAddressListsNotFoundException
* @throws Exception\GetOrganizationAddressListsTooManyRequestsException
*/
public function getOrganizationAddressLists(array $queryParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\GetOrganizationAddressLists($queryParameters), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\OrganizationsOrganizationAddressListsPostResponse201|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\PostOrganizationAddressListsBadRequestException
* @throws Exception\PostOrganizationAddressListsForbiddenException
* @throws Exception\PostOrganizationAddressListsNotFoundException
* @throws Exception\PostOrganizationAddressListsUnprocessableEntityException
* @throws Exception\PostOrganizationAddressListsTooManyRequestsException
*/
public function postOrganizationAddressLists(Model\OrganizationsOrganizationAddressListsPostBody $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\PostOrganizationAddressLists($requestBody), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListDeleteResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\DeleteAddressListBadRequestException
* @throws Exception\DeleteAddressListForbiddenException
* @throws Exception\DeleteAddressListNotFoundException
* @throws Exception\DeleteAddressListTooManyRequestsException
*/
public function deleteAddressList(Model\AddressListsAddressListDeleteBody $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\DeleteAddressList($requestBody), $fetch);
}

/**
* @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.
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListGetResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\GetAddressListBadRequestException
* @throws Exception\GetAddressListForbiddenException
* @throws Exception\GetAddressListNotFoundException
* @throws Exception\GetAddressListTooManyRequestsException
*/
public function getAddressList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\GetAddressList($queryParameters), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListPatchResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\PatchAddressListBadRequestException
* @throws Exception\PatchAddressListForbiddenException
* @throws Exception\PatchAddressListNotFoundException
* @throws Exception\PatchAddressListUnprocessableEntityException
* @throws Exception\PatchAddressListTooManyRequestsException
*/
public function patchAddressList(Model\AddressListsAddressListPatchBody $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\PatchAddressList($requestBody), $fetch);
}

/**
* @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
* @var int $per_page
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListEntriesGetResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\GetAddressListEntriesBadRequestException
* @throws Exception\GetAddressListEntriesForbiddenException
* @throws Exception\GetAddressListEntriesNotFoundException
* @throws Exception\GetAddressListEntriesTooManyRequestsException
*/
public function getAddressListEntries(array $queryParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\GetAddressListEntries($queryParameters), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListEntriesPostResponse201|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\PostAddressListEntriesBadRequestException
* @throws Exception\PostAddressListEntriesForbiddenException
* @throws Exception\PostAddressListEntriesNotFoundException
* @throws Exception\PostAddressListEntriesUnprocessableEntityException
* @throws Exception\PostAddressListEntriesTooManyRequestsException
*/
public function postAddressListEntries(Model\AddressListsAddressListEntriesPostBody $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\PostAddressListEntries($requestBody), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListEntriesAddressListEntryDeleteResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\DeleteAddressListEntryBadRequestException
* @throws Exception\DeleteAddressListEntryForbiddenException
* @throws Exception\DeleteAddressListEntryNotFoundException
* @throws Exception\DeleteAddressListEntryTooManyRequestsException
*/
public function deleteAddressListEntry(Model\AddressListEntriesAddressListEntryDeleteBody $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\DeleteAddressListEntry($requestBody), $fetch);
}

/**
* @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.
* }
*
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListEntriesAddressListEntryGetResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\GetAddressListEntryBadRequestException
* @throws Exception\GetAddressListEntryForbiddenException
* @throws Exception\GetAddressListEntryNotFoundException
* @throws Exception\GetAddressListEntryTooManyRequestsException
*/
public function getAddressListEntry(array $queryParameters = [], string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\GetAddressListEntry($queryParameters), $fetch);
}

/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListEntriesAddressListEntryPatchResponse200|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\PatchAddressListEntryBadRequestException
* @throws Exception\PatchAddressListEntryForbiddenException
* @throws Exception\PatchAddressListEntryNotFoundException
* @throws Exception\PatchAddressListEntryUnprocessableEntityException
* @throws Exception\PatchAddressListEntryTooManyRequestsException
*/
public function patchAddressListEntry(Model\AddressListEntriesAddressListEntryPatchBody $requestBody = null, string $fetch = self::FETCH_OBJECT)
{
return $this->executeEndpoint(new Endpoint\PatchAddressListEntry($requestBody), $fetch);
}

/**
* @param array $queryParameters {
*
Expand Down Expand Up @@ -1563,7 +1799,7 @@ public function getOrganizationLoadBalancers(array $queryParameters = [], string
/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return \Krystal\Katapult\KatapultAPI\Model\OrganizationsOrganizationLoadBalancersPostResponse200|\Psr\Http\Message\ResponseInterface|null
* @return \Krystal\Katapult\KatapultAPI\Model\OrganizationsOrganizationLoadBalancersPostResponse201|\Psr\Http\Message\ResponseInterface|null
*
* @throws Exception\PostOrganizationLoadBalancersBadRequestException
* @throws Exception\PostOrganizationLoadBalancersForbiddenException
Expand Down Expand Up @@ -2495,7 +2731,7 @@ public static function create($httpClient = null, array $additionalPlugins = [],
if (null === $httpClient) {
$httpClient = \Http\Discovery\Psr18ClientDiscovery::find();
$plugins = [];
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('http://katapult-api.localhost/core/v1');
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('https://api.katapult.io/core/v1');
$plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri);
$plugins[] = new \Http\Client\Common\Plugin\AddPathPlugin($uri);
if (count($additionalPlugins) > 0) {
Expand Down
79 changes: 79 additions & 0 deletions src/Endpoint/DeleteAddressList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php

declare(strict_types=1);

/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/

namespace Krystal\Katapult\KatapultAPI\Endpoint;

class DeleteAddressList extends \Krystal\Katapult\KatapultAPI\Runtime\Client\BaseEndpoint implements \Krystal\Katapult\KatapultAPI\Runtime\Client\Endpoint
{
use \Krystal\Katapult\KatapultAPI\Runtime\Client\EndpointTrait;

public function __construct(\Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListDeleteBody $requestBody = null)
{
$this->body = $requestBody;
}

public function getMethod(): string
{
return 'DELETE';
}

public function getUri(): string
{
return '/address_lists/:address_list';
}

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListDeleteBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
}

public function getExtraHeaders(): array
{
return ['Accept' => ['application/json']];
}

/**
* @return \Krystal\Katapult\KatapultAPI\Model\AddressListsAddressListDeleteResponse200|null
*
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListBadRequestException
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListForbiddenException
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListNotFoundException
* @throws \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListTooManyRequestsException
*/
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, 'Krystal\\Katapult\\KatapultAPI\\Model\\AddressListsAddressListDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListBadRequestException($serializer->deserialize($body, 'Krystal\\Katapult\\KatapultAPI\\Model\\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListNotFoundException($serializer->deserialize($body, 'Krystal\\Katapult\\KatapultAPI\\Model\\ResponseAddressListNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \Krystal\Katapult\KatapultAPI\Exception\DeleteAddressListTooManyRequestsException($serializer->deserialize($body, 'Krystal\\Katapult\\KatapultAPI\\Model\\ResponseAPIAuthenticator429Response', 'json'), $response);
}
}

public function getAuthenticationScopes(): array
{
return ['Authenticator'];
}
}
Loading

0 comments on commit 6aee8ce

Please sign in to comment.