Skip to content

Commit

Permalink
feat: remove GetExtensionshealth responses and request from Marketpla…
Browse files Browse the repository at this point in the history
…ceClient

- Deleted the `GetExtensionshealthDefaultResponse`, `GetExtensionshealthNotFoundResponse`, `GetExtensionshealthOKResponse`, `GetExtensionshealthTooManyRequestsResponse`, and their associated schemas and request classes.
- Updated `MarketplaceClient` and `MarketplaceClientImpl` to remove references to the deleted classes.
- Adjusted the `ExtensionHealth` schema to incorporate new properties.
- Cleaned up related code to ensure no discrepancies after deletions.
  • Loading branch information
mittwald-machine committed Nov 19, 2024
1 parent 9ded0c3 commit 6774178
Show file tree
Hide file tree
Showing 44 changed files with 5,273 additions and 221 deletions.
12 changes: 0 additions & 12 deletions src/Generated/V2/Clients/Marketplace/MarketplaceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionListExtensionInstances\ExtensionListExtensionInstancesRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionListExtensions\ExtensionListExtensionsOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionListExtensions\ExtensionListExtensionsRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\GetExtensionshealth\GetExtensionshealthOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\GetExtensionshealth\GetExtensionshealthRequest;

/**
* Client for Marketplace API
Expand Down Expand Up @@ -213,14 +211,4 @@ public function extensionListExtensionInstances(ExtensionListExtensionInstancesR
* @return ExtensionListExtensionsOKResponse OK
*/
public function extensionListExtensions(ExtensionListExtensionsRequest $request): ExtensionListExtensionsOKResponse;
/**
* Get all extensions and instances health for the contributor.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Marketplace/operation/marketplace-get-extensionshealth
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param GetExtensionshealthRequest $request An object representing the request for this operation
* @return GetExtensionshealthOKResponse OK
*/
public function getExtensionshealth(GetExtensionshealthRequest $request): GetExtensionshealthOKResponse;
}
28 changes: 0 additions & 28 deletions src/Generated/V2/Clients/Marketplace/MarketplaceClientImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionListExtensions\ExtensionListExtensionsOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionListExtensions\ExtensionListExtensionsRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionListExtensions\ExtensionListExtensionsTooManyRequestsResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\GetExtensionshealth\GetExtensionshealthDefaultResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\GetExtensionshealth\GetExtensionshealthNotFoundResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\GetExtensionshealth\GetExtensionshealthOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\GetExtensionshealth\GetExtensionshealthRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Marketplace\GetExtensionshealth\GetExtensionshealthTooManyRequestsResponse;

/**
* Client for Marketplace API
Expand Down Expand Up @@ -476,27 +471,4 @@ public function extensionListExtensions(ExtensionListExtensionsRequest $request)
default => ExtensionListExtensionsDefaultResponse::fromResponse($httpResponse),
});
}

/**
* Get all extensions and instances health for the contributor.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Marketplace/operation/marketplace-get-extensionshealth
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param GetExtensionshealthRequest $request An object representing the request for this operation
* @return GetExtensionshealthOKResponse OK
*/
public function getExtensionshealth(GetExtensionshealthRequest $request): GetExtensionshealthOKResponse
{
$httpRequest = new Request(GetExtensionshealthRequest::method, $request->buildUrl());
$httpResponse = $this->client->send($httpRequest, $request->buildRequestOptions());
if ($httpResponse->getStatusCode() === 200) {
return GetExtensionshealthOKResponse::fromResponse($httpResponse);
}
throw new UnexpectedResponseException(match ($httpResponse->getStatusCode()) {
404 => GetExtensionshealthNotFoundResponse::fromResponse($httpResponse),
429 => GetExtensionshealthTooManyRequestsResponse::fromResponse($httpResponse),
default => GetExtensionshealthDefaultResponse::fromResponse($httpResponse),
});
}
}
46 changes: 46 additions & 0 deletions src/Generated/V2/Clients/Project/ProjectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
use Mittwald\ApiClient\Generated\V2\Clients\Project\RequestServerAvatarUpload\RequestServerAvatarUploadOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\RequestServerAvatarUpload\RequestServerAvatarUploadRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\ResendProjectInviteMail\ResendProjectInviteMailRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceProjectNotificationThreshold\StoragespaceReplaceProjectNotificationThresholdRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceServerNotificationThreshold\StoragespaceReplaceServerNotificationThresholdRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateProjectDescription\UpdateProjectDescriptionRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateProjectMembership\UpdateProjectMembershipRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateServerDescription\UpdateServerDescriptionRequest;
Expand Down Expand Up @@ -340,4 +346,44 @@ public function updateProjectMembership(UpdateProjectMembershipRequest $request)
* @return EmptyResponse NoContent
*/
public function updateServerDescription(UpdateServerDescriptionRequest $request): EmptyResponse;
/**
* Get storage space Statistics belonging to a Project.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-get-project-statistics
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceGetProjectStatisticsRequest $request An object representing the request for this operation
* @return StoragespaceGetProjectStatisticsOKResponse OK
*/
public function storagespaceGetProjectStatistics(StoragespaceGetProjectStatisticsRequest $request): StoragespaceGetProjectStatisticsOKResponse;
/**
* Get storage space Statistics belonging to a Server.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-get-server-statistics
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceGetServerStatisticsRequest $request An object representing the request for this operation
* @return StoragespaceGetServerStatisticsOKResponse OK
*/
public function storagespaceGetServerStatistics(StoragespaceGetServerStatisticsRequest $request): StoragespaceGetServerStatisticsOKResponse;
/**
* Update a Project's storage space notification threshold.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-replace-project-notification-threshold
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceReplaceProjectNotificationThresholdRequest $request An object representing the request for this operation
* @return EmptyResponse NoContent
*/
public function storagespaceReplaceProjectNotificationThreshold(StoragespaceReplaceProjectNotificationThresholdRequest $request): EmptyResponse;
/**
* Update a Server's storage space notification threshold.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-replace-server-notification-threshold
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceReplaceServerNotificationThresholdRequest $request An object representing the request for this operation
* @return EmptyResponse NoContent
*/
public function storagespaceReplaceServerNotificationThreshold(StoragespaceReplaceServerNotificationThresholdRequest $request): EmptyResponse;
}
126 changes: 126 additions & 0 deletions src/Generated/V2/Clients/Project/ProjectClientImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,32 @@
use Mittwald\ApiClient\Generated\V2\Clients\Project\ResendProjectInviteMail\ResendProjectInviteMailForbiddenResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\ResendProjectInviteMail\ResendProjectInviteMailRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\ResendProjectInviteMail\ResendProjectInviteMailTooManyRequestsResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsBadRequestResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsDefaultResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsForbiddenResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsInternalServerErrorResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsNotFoundResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetProjectStatistics\StoragespaceGetProjectStatisticsTooManyRequestsResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsBadRequestResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsDefaultResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsForbiddenResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsInternalServerErrorResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsNotFoundResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsOKResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceGetServerStatistics\StoragespaceGetServerStatisticsTooManyRequestsResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceProjectNotificationThreshold\StoragespaceReplaceProjectNotificationThresholdDefaultResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceProjectNotificationThreshold\StoragespaceReplaceProjectNotificationThresholdForbiddenResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceProjectNotificationThreshold\StoragespaceReplaceProjectNotificationThresholdInternalServerErrorResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceProjectNotificationThreshold\StoragespaceReplaceProjectNotificationThresholdRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceProjectNotificationThreshold\StoragespaceReplaceProjectNotificationThresholdTooManyRequestsResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceServerNotificationThreshold\StoragespaceReplaceServerNotificationThresholdDefaultResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceServerNotificationThreshold\StoragespaceReplaceServerNotificationThresholdForbiddenResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceServerNotificationThreshold\StoragespaceReplaceServerNotificationThresholdInternalServerErrorResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceServerNotificationThreshold\StoragespaceReplaceServerNotificationThresholdRequest;
use Mittwald\ApiClient\Generated\V2\Clients\Project\StoragespaceReplaceServerNotificationThreshold\StoragespaceReplaceServerNotificationThresholdTooManyRequestsResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateProjectDescription\UpdateProjectDescriptionBadRequestResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateProjectDescription\UpdateProjectDescriptionDefaultResponse;
use Mittwald\ApiClient\Generated\V2\Clients\Project\UpdateProjectDescription\UpdateProjectDescriptionForbiddenResponse;
Expand Down Expand Up @@ -824,4 +850,104 @@ public function updateServerDescription(UpdateServerDescriptionRequest $request)
default => UpdateServerDescriptionDefaultResponse::fromResponse($httpResponse),
});
}

/**
* Get storage space Statistics belonging to a Project.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-get-project-statistics
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceGetProjectStatisticsRequest $request An object representing the request for this operation
* @return StoragespaceGetProjectStatisticsOKResponse OK
*/
public function storagespaceGetProjectStatistics(StoragespaceGetProjectStatisticsRequest $request): StoragespaceGetProjectStatisticsOKResponse
{
$httpRequest = new Request(StoragespaceGetProjectStatisticsRequest::method, $request->buildUrl());
$httpResponse = $this->client->send($httpRequest, $request->buildRequestOptions());
if ($httpResponse->getStatusCode() === 200) {
return StoragespaceGetProjectStatisticsOKResponse::fromResponse($httpResponse);
}
throw new UnexpectedResponseException(match ($httpResponse->getStatusCode()) {
400 => StoragespaceGetProjectStatisticsBadRequestResponse::fromResponse($httpResponse),
403 => StoragespaceGetProjectStatisticsForbiddenResponse::fromResponse($httpResponse),
404 => StoragespaceGetProjectStatisticsNotFoundResponse::fromResponse($httpResponse),
429 => StoragespaceGetProjectStatisticsTooManyRequestsResponse::fromResponse($httpResponse),
500 => StoragespaceGetProjectStatisticsInternalServerErrorResponse::fromResponse($httpResponse),
default => StoragespaceGetProjectStatisticsDefaultResponse::fromResponse($httpResponse),
});
}

/**
* Get storage space Statistics belonging to a Server.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-get-server-statistics
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceGetServerStatisticsRequest $request An object representing the request for this operation
* @return StoragespaceGetServerStatisticsOKResponse OK
*/
public function storagespaceGetServerStatistics(StoragespaceGetServerStatisticsRequest $request): StoragespaceGetServerStatisticsOKResponse
{
$httpRequest = new Request(StoragespaceGetServerStatisticsRequest::method, $request->buildUrl());
$httpResponse = $this->client->send($httpRequest, $request->buildRequestOptions());
if ($httpResponse->getStatusCode() === 200) {
return StoragespaceGetServerStatisticsOKResponse::fromResponse($httpResponse);
}
throw new UnexpectedResponseException(match ($httpResponse->getStatusCode()) {
400 => StoragespaceGetServerStatisticsBadRequestResponse::fromResponse($httpResponse),
403 => StoragespaceGetServerStatisticsForbiddenResponse::fromResponse($httpResponse),
404 => StoragespaceGetServerStatisticsNotFoundResponse::fromResponse($httpResponse),
429 => StoragespaceGetServerStatisticsTooManyRequestsResponse::fromResponse($httpResponse),
500 => StoragespaceGetServerStatisticsInternalServerErrorResponse::fromResponse($httpResponse),
default => StoragespaceGetServerStatisticsDefaultResponse::fromResponse($httpResponse),
});
}

/**
* Update a Project's storage space notification threshold.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-replace-project-notification-threshold
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceReplaceProjectNotificationThresholdRequest $request An object representing the request for this operation
* @return EmptyResponse NoContent
*/
public function storagespaceReplaceProjectNotificationThreshold(StoragespaceReplaceProjectNotificationThresholdRequest $request): EmptyResponse
{
$httpRequest = new Request(StoragespaceReplaceProjectNotificationThresholdRequest::method, $request->buildUrl());
$httpResponse = $this->client->send($httpRequest, $request->buildRequestOptions());
if ($httpResponse->getStatusCode() === 204) {
return new EmptyResponse($httpResponse);
}
throw new UnexpectedResponseException(match ($httpResponse->getStatusCode()) {
403 => StoragespaceReplaceProjectNotificationThresholdForbiddenResponse::fromResponse($httpResponse),
429 => StoragespaceReplaceProjectNotificationThresholdTooManyRequestsResponse::fromResponse($httpResponse),
500 => StoragespaceReplaceProjectNotificationThresholdInternalServerErrorResponse::fromResponse($httpResponse),
default => StoragespaceReplaceProjectNotificationThresholdDefaultResponse::fromResponse($httpResponse),
});
}

/**
* Update a Server's storage space notification threshold.
*
* @see https://developer.mittwald.de/reference/v2/#tag/Project/operation/storagespace-replace-server-notification-threshold
* @throws GuzzleException
* @throws UnexpectedResponseException
* @param StoragespaceReplaceServerNotificationThresholdRequest $request An object representing the request for this operation
* @return EmptyResponse NoContent
*/
public function storagespaceReplaceServerNotificationThreshold(StoragespaceReplaceServerNotificationThresholdRequest $request): EmptyResponse
{
$httpRequest = new Request(StoragespaceReplaceServerNotificationThresholdRequest::method, $request->buildUrl());
$httpResponse = $this->client->send($httpRequest, $request->buildRequestOptions());
if ($httpResponse->getStatusCode() === 204) {
return new EmptyResponse($httpResponse);
}
throw new UnexpectedResponseException(match ($httpResponse->getStatusCode()) {
403 => StoragespaceReplaceServerNotificationThresholdForbiddenResponse::fromResponse($httpResponse),
429 => StoragespaceReplaceServerNotificationThresholdTooManyRequestsResponse::fromResponse($httpResponse),
500 => StoragespaceReplaceServerNotificationThresholdInternalServerErrorResponse::fromResponse($httpResponse),
default => StoragespaceReplaceServerNotificationThresholdDefaultResponse::fromResponse($httpResponse),
});
}
}
Loading

0 comments on commit 6774178

Please sign in to comment.