From e6c7ed8d7a79a84176e2c0f644ab5d4afa8c8891 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 11:17:09 +0200 Subject: [PATCH 01/13] =?UTF-8?q?fix(oauth2):=20port=20Node=20SDK=20PR=20#?= =?UTF-8?q?11=20=E2=80=94=20refresh=5Ftoken,=20forceRefresh,=20120s=20buff?= =?UTF-8?q?er,=20refreshEndpoint,=20re-entrance=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FIX 1 — 401 retry middleware calls forceRefresh() instead of exchangeCodeForToken() AbstractApi::sendAuthenticatedRequest() intercepts 401, calls OAuthProvider::forceRefresh() and retries once (RFC 6750 §3.1). FIX 2 — refreshAccessToken() sends Authorization: Basic header Required for confidential clients per RFC 6749 §3.2.1. FIX 3 — Proactive refresh buffer raised from 60 s to 120 s Mitigates clock skew between client and auth server. FIX 4 — Configurable refreshEndpoint (distinct from tokenEndpoint) OAuthProvider accepts an optional refreshEndpoint parameter (default = tokenEndpoint). UpsunClient passes auth_url + refresh_endpoint. FIX 5 — Re-entrance guard (thundering-herd protection) acquiringToken bool prevents recursive acquisition in PHP Fiber contexts. Multi-process FPM protection requires external lock (out of scope). Also adds: - doAcquireToken(): prefers refresh_token grant, falls back to api_token - forceRefresh(): clears access token without touching refreshToken or acquiringToken - storeTokenData() now persists refresh_token and token_type from response - 9 new unit tests covering all 5 fixes (567 tests, 3395 assertions — all green) - Minor CI workflow label fixes and composer clean script --- .github/workflows/develop.yml | 4 +- .github/workflows/publish.yml | 2 +- composer.json | 2 + src/Api/AbstractApi.php | 8 + src/Core/OAuthProvider.php | 142 +++++++++- src/UpsunClient.php | 1 + templates/php/abstract_api.mustache | 8 + templates/php/oauth_provider.mustache | 136 +++++++++- tests/Core/OAuthProviderTest.php | 360 +++++++++++++++++++++++++- 9 files changed, 640 insertions(+), 23 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index dfa9b5e42..2bc4f6643 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -21,7 +21,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Set up runtime + - name: Set up runtime - Php ${{ env.PRIMARY_PHP_VERSION }} uses: shivammathur/setup-php@v2 with: php-version: ${{ env.PRIMARY_PHP_VERSION }} @@ -33,7 +33,7 @@ jobs: - name: Install dependencies run: composer run install:ci - - name: Run PHP lint (phpcs, rector, php-cs-fixer) + - name: Run PHP lint (phpcs, php-cs-fixer, rector) id: lint continue-on-error: true run: composer run lint:all diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 801a5b228..1ba75f507 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,7 +54,7 @@ jobs: run: composer validate --strict - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-interaction + run: composer run install:ci - name: Run unit tests run: vendor/bin/phpunit --testdox diff --git a/composer.json b/composer.json index 2231134a0..848da30fd 100644 --- a/composer.json +++ b/composer.json @@ -76,7 +76,9 @@ }, "prefer-stable": true, "scripts": { + "clean": "rm -rf ./coverage/ ./coverage.xml", "install:ci": "composer install --prefer-dist --no-progress --no-interaction", + "lint:phpcs": "./vendor/bin/phpcs --standard=phpcs.xml src/", "lint:phpcs:tests": "./vendor/bin/phpcs --standard=phpcs.xml tests/", "lint:rector": "./vendor/bin/rector process src --dry-run", diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index 9dc7d866b..cf901cf51 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -118,6 +118,14 @@ protected function sendAuthenticatedRequest( $response = $this->httpClient->sendRequest($request); + // FIX 1: On 401, force token re-acquisition (prefers refresh_token grant) and retry once. + // RFC 6750 §3.1 + RFC 6749 Fig. 2 steps F→G→H. + if ($response->getStatusCode() === 401) { + $this->oauthProvider->forceRefresh(); + $request = $this->createAuthenticatedRequest($method, $uri, $headers, $body); + $response = $this->httpClient->sendRequest($request); + } + // Manually check status code if ($response->getStatusCode() >= 400) { throw new ApiException( diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index b3ee19ece..74c253208 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -3,13 +3,19 @@ namespace Upsun\Core; use Exception; -use Nyholm\Psr7\Stream; -use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; +use Psr\Http\Client\ClientExceptionInterface; +use Nyholm\Psr7\Stream; /** - * class (auto-generated) + * OAuthProvider class (auto-generated) + * + * Token lifecycle follows RFC 6749 §6 and RFC 6750 §3.1: + * - Proactive refresh when token is within the 120 s expiry buffer (FIX 3) + * - On 401 from the resource server, forceRefresh() re-acquires unconditionally, + * preferring refresh_token grant over api_token grant (RFC 6749 Fig.2 steps F→G→H) + * - Re-entrance guard protects synchronous/Fiber contexts (FIX 5) * * @license Apache-2.0 * @see https://docs.upsun.com @@ -18,18 +24,31 @@ class OAuthProvider { private ?string $accessToken = null; + private ?string $refreshToken = null; + private ?string $typeToken = null; private int $tokenExpiry = 0; + /** Re-entrance guard — prevents recursive acquisition in PHP Fiber contexts (FIX 5). */ + private bool $acquiringToken = false; + + /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ + private readonly string $effectiveRefreshEndpoint; + public function __construct( private readonly ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $tokenEndpoint, private readonly string $clientId, - private readonly string $clientSecret + private readonly string $clientSecret, + private readonly ?string $refreshEndpoint = null, ) { + $this->effectiveRefreshEndpoint = $refreshEndpoint ?? $this->tokenEndpoint; } /** + * Exchanges the API token for an access token using the custom api_token grant. + * Uses tokenEndpoint (not refreshEndpoint). + * * @throws Exception */ public function exchangeCodeForToken(): bool @@ -37,8 +56,8 @@ public function exchangeCodeForToken(): bool try { $body = http_build_query([ 'grant_type' => 'api_token', - 'api_token' => $this->clientSecret, - 'client_id' => $this->clientId, + 'api_token' => $this->clientSecret, + 'client_id' => $this->clientId, ]); $request = $this->requestFactory->createRequest('POST', $this->tokenEndpoint) @@ -70,21 +89,124 @@ public function exchangeCodeForToken(): bool } } + /** + * Refreshes the access token using the refresh_token grant (RFC 6749 §6). + * Sends Authorization: Basic as required for confidential clients (RFC 6749 §3.2.1) (FIX 2). + * Uses effectiveRefreshEndpoint (FIX 4). + * + * @throws Exception + */ + private function refreshAccessToken(): void + { + if (!$this->refreshToken) { + throw new Exception('No refresh token available'); + } + + try { + $body = http_build_query([ + 'grant_type' => 'refresh_token', + 'refresh_token' => $this->refreshToken, + 'client_id' => $this->clientId, + ]); + + $request = $this->requestFactory->createRequest('POST', $this->effectiveRefreshEndpoint) + ->withHeader('Authorization', 'Basic ' . base64_encode('platform-api-user:')) + ->withHeader('Content-Type', 'application/x-www-form-urlencoded') + ->withBody(Stream::create($body)); + + $response = $this->httpClient->sendRequest($request); + + if ($response->getStatusCode() !== 200) { + throw new Exception('Token refresh failed with status: ' . $response->getStatusCode()); + } + + $data = json_decode((string)$response->getBody(), true); + + if (json_last_error() !== JSON_ERROR_NONE) { + throw new Exception('Invalid JSON response from refresh: ' . json_last_error_msg()); + } + + if (!is_array($data) || empty($data['access_token'] ?? null)) { + throw new Exception('No access token in refresh response.'); + } + + $this->storeTokenData($data); + } catch (ClientExceptionInterface $e) { + throw new Exception('Token refresh failed: ' . $e->getMessage()); + } + } + + /** + * Acquires a token, preferring refresh_token grant over api_token grant. + * Falls back to api_token grant if refresh fails (RFC 6749 Fig.2 steps F→G→H). + * + * @throws Exception + */ + private function doAcquireToken(): void + { + if ($this->refreshToken) { + try { + $this->refreshAccessToken(); + return; + } catch (Exception) { + // Refresh token invalid/expired — fall back to full api_token exchange + $this->accessToken = null; + $this->refreshToken = null; + } + } + + $this->exchangeCodeForToken(); + } + private function storeTokenData(array $data): void { - $this->accessToken = $data['access_token'] ?? null; - $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); + $this->typeToken = $data['token_type'] ?? null; + $this->accessToken = $data['access_token'] ?? null; + $this->refreshToken = $data['refresh_token'] ?? null; + $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); + } + + /** + * Forces unconditional token re-acquisition, bypassing the expiry check. + * Called by the 401 retry middleware (RFC 6750 §3.1) (FIX 1 prerequisite). + * + * - Clears accessToken and tokenExpiry so ensureValidToken() triggers re-acquisition. + * - Does NOT clear refreshToken — the next ensureValidToken() call will prefer it. + * - Does NOT reset acquiringToken — avoids restarting an already in-flight acquisition. + * + * @throws Exception + */ + public function forceRefresh(): void + { + $this->accessToken = null; + $this->tokenExpiry = 0; + $this->ensureValidToken(); } /** + * Ensures a valid token is available, with a 120 s proactive buffer (FIX 3). + * Re-entrance guard prevents recursive acquisition in PHP Fiber contexts (FIX 5). + * * @throws Exception */ public function ensureValidToken(): void { - $buffer = 60; + $buffer = 120; if (!$this->accessToken || time() > ($this->tokenExpiry - $buffer)) { - $this->exchangeCodeForToken(); + // Re-entrance guard: if acquisition is already in progress (e.g., from a Fiber), + // return immediately rather than triggering a second concurrent request. + // For multi-process FPM thundering-herd, an external lock (APCu/Redis) is required. + if ($this->acquiringToken) { + return; + } + + $this->acquiringToken = true; + try { + $this->doAcquireToken(); + } finally { + $this->acquiringToken = false; + } } } diff --git a/src/UpsunClient.php b/src/UpsunClient.php index 62b4f28cf..da1eb9427 100644 --- a/src/UpsunClient.php +++ b/src/UpsunClient.php @@ -162,6 +162,7 @@ public function __construct(protected UpsunConfig $upsunConfig, ?ClientInterface tokenEndpoint: $this->upsunConfig->auth_url . "/" . $this->upsunConfig->token_endpoint, clientId: $this->upsunConfig->clientId, clientSecret: $this->upsunConfig->apiToken, + refreshEndpoint: $this->upsunConfig->auth_url . "/" . $this->upsunConfig->refresh_endpoint, ); $taskParams = [$this->auth, $this->apiClient, $requestFactory, $this->apiConfig]; diff --git a/templates/php/abstract_api.mustache b/templates/php/abstract_api.mustache index 6b662ec40..0d243f712 100644 --- a/templates/php/abstract_api.mustache +++ b/templates/php/abstract_api.mustache @@ -115,6 +115,14 @@ abstract class AbstractApi $response = $this->httpClient->sendRequest($request); + // FIX 1: On 401, force token re-acquisition (prefers refresh_token grant) and retry once. + // RFC 6750 §3.1 + RFC 6749 Fig. 2 steps F→G→H. + if ($response->getStatusCode() === 401) { + $this->oauthProvider->forceRefresh(); + $request = $this->createAuthenticatedRequest($method, $uri, $headers, $body); + $response = $this->httpClient->sendRequest($request); + } + // Manually check status code if ($response->getStatusCode() >= 400) { throw new ApiException( diff --git a/templates/php/oauth_provider.mustache b/templates/php/oauth_provider.mustache index 3382691d9..9d1d480f2 100644 --- a/templates/php/oauth_provider.mustache +++ b/templates/php/oauth_provider.mustache @@ -11,22 +11,41 @@ use Nyholm\Psr7\Stream; /** * {{classname}} class (auto-generated) * + * Token lifecycle follows RFC 6749 §6 and RFC 6750 §3.1: + * - Proactive refresh when token is within the 120 s expiry buffer (FIX 3) + * - On 401 from the resource server, forceRefresh() re-acquires unconditionally, + * preferring refresh_token grant over api_token grant (RFC 6749 Fig.2 steps F→G→H) + * - Re-entrance guard protects synchronous/Fiber contexts (FIX 5) + * {{> partial_internal_header }} */ class OAuthProvider { private ?string $accessToken = null; + private ?string $refreshToken = null; + private ?string $typeToken = null; private int $tokenExpiry = 0; + /** Re-entrance guard — prevents recursive acquisition in PHP Fiber contexts (FIX 5). */ + private bool $acquiringToken = false; + + /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ + private readonly string $effectiveRefreshEndpoint; + public function __construct( private readonly ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $tokenEndpoint, private readonly string $clientId, - private readonly string $clientSecret + private readonly string $clientSecret, + ?string $refreshEndpoint = null, ) { + $this->effectiveRefreshEndpoint = $refreshEndpoint ?? $this->tokenEndpoint; } /** + * Exchanges the API token for an access token using the custom api_token grant. + * Uses tokenEndpoint (not refreshEndpoint). + * * @throws Exception */ public function exchangeCodeForToken(): bool @@ -34,8 +53,8 @@ class OAuthProvider try { $body = http_build_query([ 'grant_type' => 'api_token', - 'api_token' => $this->clientSecret, - 'client_id' => $this->clientId, + 'api_token' => $this->clientSecret, + 'client_id' => $this->clientId, ]); $request = $this->requestFactory->createRequest('POST', $this->tokenEndpoint) @@ -73,21 +92,124 @@ class OAuthProvider } } + /** + * Refreshes the access token using the refresh_token grant (RFC 6749 §6). + * Sends Authorization: Basic as required for confidential clients (RFC 6749 §3.2.1) (FIX 2). + * Uses effectiveRefreshEndpoint (FIX 4). + * + * @throws Exception + */ + private function refreshAccessToken(): void + { + if (!$this->refreshToken) { + throw new Exception('No refresh token available'); + } + + try { + $body = http_build_query([ + 'grant_type' => 'refresh_token', + 'refresh_token' => $this->refreshToken, + 'client_id' => $this->clientId, + ]); + + $request = $this->requestFactory->createRequest('POST', $this->effectiveRefreshEndpoint) + ->withHeader('Authorization', 'Basic ' . base64_encode('{{basicUser}}:')) + ->withHeader('Content-Type', 'application/x-www-form-urlencoded') + ->withBody(Stream::create($body)); + + $response = $this->httpClient->sendRequest($request); + + if ($response->getStatusCode() !== 200) { + throw new Exception('Token refresh failed with status: ' . $response->getStatusCode()); + } + + $data = json_decode((string)$response->getBody(), true); + + if (json_last_error() !== JSON_ERROR_NONE) { + throw new Exception('Invalid JSON response from refresh: ' . json_last_error_msg()); + } + + if (!is_array($data) || empty($data['access_token'] ?? null)) { + throw new Exception('No access token in refresh response.'); + } + + $this->storeTokenData($data); + } catch (ClientExceptionInterface $e) { + throw new Exception('Token refresh failed: ' . $e->getMessage()); + } + } + + /** + * Acquires a token, preferring refresh_token grant over api_token grant. + * Falls back to api_token grant if refresh fails (RFC 6749 Fig.2 steps F→G→H). + * + * @throws Exception + */ + private function doAcquireToken(): void + { + if ($this->refreshToken) { + try { + $this->refreshAccessToken(); + return; + } catch (Exception) { + // Refresh token invalid/expired — fall back to full api_token exchange + $this->accessToken = null; + $this->refreshToken = null; + } + } + + $this->exchangeCodeForToken(); + } + private function storeTokenData(array $data): void { - $this->accessToken = $data['access_token'] ?? null; - $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); + $this->typeToken = $data['token_type'] ?? null; + $this->accessToken = $data['access_token'] ?? null; + $this->refreshToken = $data['refresh_token'] ?? null; + $this->tokenExpiry = time() + ($data['expires_in'] ?? 0); } /** + * Forces unconditional token re-acquisition, bypassing the expiry check. + * Called by the 401 retry middleware (RFC 6750 §3.1) (FIX 1 prerequisite). + * + * - Clears accessToken and tokenExpiry so ensureValidToken() triggers re-acquisition. + * - Does NOT clear refreshToken — the next ensureValidToken() call will prefer it. + * - Does NOT reset acquiringToken — avoids restarting an already in-flight acquisition. + * + * @throws Exception + */ + public function forceRefresh(): void + { + $this->accessToken = null; + $this->tokenExpiry = 0; + $this->ensureValidToken(); + } + + /** + * Ensures a valid token is available, with a 120 s proactive buffer (FIX 3). + * Re-entrance guard prevents recursive acquisition in PHP Fiber contexts (FIX 5). + * * @throws Exception */ public function ensureValidToken(): void { - $buffer = 60; + $buffer = 120; if (!$this->accessToken || time() > ($this->tokenExpiry - $buffer)) { - $this->exchangeCodeForToken(); + // Re-entrance guard: if acquisition is already in progress (e.g., from a Fiber), + // return immediately rather than triggering a second concurrent request. + // For multi-process FPM thundering-herd, an external lock (APCu/Redis) is required. + if ($this->acquiringToken) { + return; + } + + $this->acquiringToken = true; + try { + $this->doAcquireToken(); + } finally { + $this->acquiringToken = false; + } } } diff --git a/tests/Core/OAuthProviderTest.php b/tests/Core/OAuthProviderTest.php index ebfe4cdbe..360089d9c 100644 --- a/tests/Core/OAuthProviderTest.php +++ b/tests/Core/OAuthProviderTest.php @@ -30,6 +30,8 @@ class OAuthProviderTest extends TestCase private string $tokenEndpoint = 'https://auth.upsun.com/oauth2/token'; + private string $refreshEndpoint = 'https://auth.upsun.com/oauth2/token'; + private string $clientId = 'test-client-id'; private string $clientSecret = 'test-api-token'; @@ -44,7 +46,8 @@ protected function setUp(): void $this->requestFactory, $this->tokenEndpoint, $this->clientId, - $this->clientSecret + $this->clientSecret, + $this->refreshEndpoint, ); } @@ -241,10 +244,10 @@ public function testEnsureValidTokenRefreshesExpiredToken() */ public function testEnsureValidTokenWithinBufferPeriodRefreshesToken() { - // Token that expires in less than 60 seconds (buffer period) + // Token that expires in less than 120 seconds (buffer period) $responseBody = json_encode([ 'access_token' => 'expiring-soon-token', - 'expires_in' => 30 // Less than 60 second buffer + 'expires_in' => 30 // Less than 120 second buffer ]); $refreshedResponse = json_encode([ @@ -326,6 +329,357 @@ public function testConstructorWithDifferentParameters() $this->assertTrue($result); } + /** + * FIX 2 — refreshAccessToken() sends Authorization: Basic header. + * + * @throws Exception + */ + public function testRefreshAccessTokenSendsBasicAuthHeader(): void + { + // First: exchange api_token to get an access_token + refresh_token + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'refresh-token-abc', + 'expires_in' => -1, // already expired → will trigger refresh on next call + ]); + + // Second: refresh call + $secondResponse = json_encode([ + 'access_token' => 'refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $secondResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + // Assert Basic auth header present on refresh call (FIX 2) + $authHeader = $request->getHeaderLine('Authorization'); + $this->assertStringStartsWith('Basic ', $authHeader); + $this->assertEquals('Basic ' . base64_encode('platform-api-user:'), $authHeader); + return new Response(200, ['Content-Type' => 'application/json'], $secondResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer refreshed-token', $auth); + } + + /** + * FIX 2 — refreshAccessToken() uses grant_type=refresh_token. + * + * @throws Exception + */ + public function testRefreshAccessTokenUsesGrantTypeRefreshToken(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'my-refresh-token', + 'expires_in' => -1, + ]); + + $secondResponse = json_encode([ + 'access_token' => 'refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $secondResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + $this->assertStringContainsString('refresh_token=my-refresh-token', $body); + $this->assertStringContainsString('client_id=' . $this->clientId, $body); + return new Response(200, ['Content-Type' => 'application/json'], $secondResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $this->oauthProvider->getAuthorization(); + } + + /** + * FIX 1 + FIX 3 — Expired token with refresh_token available → refresh_token grant used first. + * + * @throws Exception + */ + public function testEnsureValidTokenPrefersRefreshTokenGrant(): void + { + $firstResponse = json_encode([ + 'access_token' => 'short-lived-token', + 'refresh_token' => 'stored-refresh-token', + 'expires_in' => -1, // immediately expired + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'token-via-refresh', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshResponse, &$callCount) { + $callCount++; + if ($callCount === 2) { + $body = (string)$request->getBody(); + $this->assertStringContainsString('grant_type=refresh_token', $body); + } + return new Response(200, ['Content-Type' => 'application/json'], $callCount === 1 ? $firstResponse : $refreshResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer token-via-refresh', $auth); + } + + /** + * FIX 1 + FIX 3 — If refresh fails, fallback to api_token grant. + * + * @throws Exception + */ + public function testFallbackToApiTokenIfRefreshFails(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'bad-refresh-token', + 'expires_in' => -1, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'fallback-token', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $fallbackResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + // Initial exchange + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + // Refresh attempt — fail with 401 + $this->assertStringContainsString('grant_type=refresh_token', $body); + return new Response(401, [], 'Unauthorized'); + } + // Fallback to api_token + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer fallback-token', $auth); + } + + /** + * FIX 1 — forceRefresh() triggers acquisition even when cached token appears valid. + * + * @throws Exception + */ + public function testForceRefreshTriggersAcquisitionEvenWithValidToken(): void + { + $firstResponse = json_encode([ + 'access_token' => 'valid-long-lived-token', + 'expires_in' => 7200, // 2 hours + ]); + + $forcedResponse = json_encode([ + 'access_token' => 'force-refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(200, ['Content-Type' => 'application/json'], $firstResponse), + new Response(200, ['Content-Type' => 'application/json'], $forcedResponse), + ); + + $this->oauthProvider->getAuthorization(); // prime the cache + $this->oauthProvider->forceRefresh(); // must bypass cache + + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer force-refreshed-token', $auth); + } + + /** + * FIX 1 — forceRefresh() prefers refresh_token grant if one is available. + * + * @throws Exception + */ + public function testForceRefreshPrefersRefreshTokenIfAvailable(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'my-refresh-token', + 'expires_in' => 7200, + ]); + + $refreshedResponse = json_encode([ + 'access_token' => 'force-refresh-via-refresh-grant', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshedResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + return new Response(200, ['Content-Type' => 'application/json'], $refreshedResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $this->oauthProvider->getAuthorization(); // prime cache with refresh_token stored + $auth = $this->oauthProvider->forceRefresh(); // must use refresh_token grant + + $authorization = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer force-refresh-via-refresh-grant', $authorization); + } + + /** + * FIX 5 — Re-entrance guard: while acquiringToken=true, ensureValidToken() is a no-op. + * + * @throws Exception + */ + public function testReEntranceGuardPreventsDoubleAcquisition(): void + { + // Simulate being mid-acquisition by setting the flag via reflection + $reflection = new \ReflectionClass($this->oauthProvider); + $prop = $reflection->getProperty('acquiringToken'); + $prop->setAccessible(true); + $prop->setValue($this->oauthProvider, true); + + // No HTTP call should be triggered since acquisition is already in progress + $this->httpClient + ->expects($this->never()) + ->method('sendRequest'); + + $this->oauthProvider->ensureValidToken(); + } + + /** + * FIX 4 — refreshAccessToken() sends request to refreshEndpoint, not tokenEndpoint. + * + * @throws Exception + */ + public function testRefreshEndpointUsedForRefreshTokenGrant(): void + { + $distinctRefreshEndpoint = 'https://auth.upsun.com/oauth2/refresh'; + + $provider = new OAuthProvider( + $this->httpClient, + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + $distinctRefreshEndpoint, + ); + + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'refresh-token-xyz', + 'expires_in' => -1, + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'token-from-refresh-endpoint', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshResponse, $distinctRefreshEndpoint) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + // Must target the refresh endpoint, not the token endpoint + $this->assertEquals($distinctRefreshEndpoint, (string)$request->getUri()); + return new Response(200, ['Content-Type' => 'application/json'], $refreshResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $provider->exchangeCodeForToken(); + $auth = $provider->getAuthorization(); + $this->assertEquals('Bearer token-from-refresh-endpoint', $auth); + } + + /** + * FIX 3 — 120 s proactive buffer: expires_in < 120 triggers refresh; >= 121 does not. + * + * @throws Exception + */ + public function testBuffer120SecondsTriggersProactiveRefresh(): void + { + // Case A: expires_in=119 → within 120 s buffer → refresh triggered + $almostExpiredResponse = json_encode([ + 'access_token' => 'almost-expired-token', + 'expires_in' => 119, + ]); + $refreshedResponse = json_encode([ + 'access_token' => 'buffer-refreshed-token', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(200, ['Content-Type' => 'application/json'], $almostExpiredResponse), + new Response(200, ['Content-Type' => 'application/json'], $refreshedResponse), + ); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); // should detect buffer and refresh + $this->assertEquals('Bearer buffer-refreshed-token', $auth); + + // Case B: expires_in=121 → outside 120 s buffer → no refresh on same-second call + $provider2 = new OAuthProvider( + $this->createMock(ClientInterface::class), + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + ); + + $longLivedResponse = json_encode([ + 'access_token' => 'long-lived-token', + 'expires_in' => 121, + ]); + + /** @var ClientInterface&\PHPUnit\Framework\MockObject\MockObject $client2 */ + $client2 = $this->createMock(ClientInterface::class); + $client2->expects($this->once()) // only the initial exchange, no re-fetch + ->method('sendRequest') + ->willReturn(new Response(200, ['Content-Type' => 'application/json'], $longLivedResponse)); + + $provider2 = new OAuthProvider( + $client2, + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + ); + + $provider2->exchangeCodeForToken(); + $provider2->getAuthorization(); // must NOT trigger a second HTTP call + } + /** * @throws Exception */ From aaf1de6d7929185fbb3dfceac58a946e71d88733 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 11:25:23 +0200 Subject: [PATCH 02/13] =?UTF-8?q?refactor(api):=20rename=20APIConfiguratio?= =?UTF-8?q?n=20=E2=86=92=20ApiConfiguration=20everywhere,=20remove=20backw?= =?UTF-8?q?ard-compat=20alias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Api/AbstractApi.php | 14 +- src/Api/AddOnsApi.php | 27 ++- src/Api/AlertsApi.php | 27 ++- src/Api/ApiConfiguration.php | 2 +- src/Api/ApiTokensApi.php | 31 ++- src/Api/AutoscalingApi.php | 38 ++-- src/Api/BlackfireMonitoringApi.php | 210 +++++++++++++++++- src/Api/BlackfireProfilingApi.php | 146 +++++++++--- src/Api/CertManagementApi.php | 71 +++--- src/Api/ConnectionsApi.php | 18 +- src/Api/ContinuousProfilingApi.php | 124 ++++++++++- src/Api/DefaultApi.php | 103 ++++++--- src/Api/DeploymentApi.php | 30 +-- src/Api/DeploymentTargetApi.php | 49 ++-- src/Api/DiffApi.php | 9 +- src/Api/DiscountsApi.php | 36 +-- src/Api/DomainClaimApi.php | 35 +-- src/Api/DomainManagementApi.php | 87 +++++--- src/Api/EntrypointApi.php | 14 +- src/Api/EnvironmentActivityApi.php | 23 +- src/Api/EnvironmentApi.php | 144 +++++++----- src/Api/EnvironmentBackupsApi.php | 49 ++-- src/Api/EnvironmentTypeApi.php | 16 +- src/Api/EnvironmentVariablesApi.php | 49 ++-- src/Api/GrantsApi.php | 40 ++-- src/Api/HttpTrafficApi.php | 132 ++++++++++- src/Api/InvoicesApi.php | 28 ++- src/Api/MfaApi.php | 56 +++-- src/Api/OrdersApi.php | 42 +++- src/Api/OrganizationInvitationsApi.php | 43 ++-- src/Api/OrganizationManagementApi.php | 48 ++-- src/Api/OrganizationMembersApi.php | 67 +++--- src/Api/OrganizationProjectsApi.php | 127 +++++++---- src/Api/OrganizationsApi.php | 201 +++++++++++------ src/Api/PhoneNumberApi.php | 30 +-- src/Api/ProfilesApi.php | 46 ++-- src/Api/ProjectActivityApi.php | 23 +- src/Api/ProjectApi.php | 34 +-- src/Api/ProjectInvitationsApi.php | 43 ++-- src/Api/ProjectSettingsApi.php | 28 +-- src/Api/ProjectVariablesApi.php | 49 ++-- src/Api/ProjectsApi.php | 9 +- src/Api/RecordsApi.php | 118 ++++++---- src/Api/ReferencesApi.php | 41 +++- src/Api/RegionsApi.php | 52 +++-- src/Api/RegistryCredentialApi.php | 49 ++-- src/Api/RepositoryApi.php | 37 +-- src/Api/ResourcesApi.php | 54 ++++- src/Api/RoutingApi.php | 16 +- src/Api/RuntimeOperationsApi.php | 21 +- src/Api/SbomApi.php | 16 +- .../Serializer/ApiObjectAttributesMapper.php | 7 + src/Api/Serializer/ApiObjectFormatsMapper.php | 8 + src/Api/Serializer/ApiObjectTypesMapper.php | 2 + src/Api/Serializer/ObjectSerializer.php | 100 ++++----- src/Api/SourceOperationsApi.php | 23 +- src/Api/SshKeysApi.php | 31 ++- src/Api/SubscriptionsApi.php | 199 +++++++++++------ src/Api/SupportApi.php | 51 +++-- src/Api/SystemInformationApi.php | 21 +- src/Api/TaskApi.php | 30 +-- src/Api/TeamAccessApi.php | 51 ++++- src/Api/TeamsApi.php | 154 ++++++++----- src/Api/ThirdPartyIntegrationsApi.php | 49 ++-- src/Api/UserAccessApi.php | 70 ++++-- src/Api/UserProfilesApi.php | 75 ++++--- src/Api/UsersApi.php | 109 +++++---- src/Api/VouchersApi.php | 23 +- templates/php/Configuration.mustache | 2 +- templates/php/libraries/psr-18/api.mustache | 6 +- 70 files changed, 2601 insertions(+), 1212 deletions(-) diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index cf901cf51..6ab1c9fe0 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -3,22 +3,22 @@ namespace Upsun\Api; use Exception; +use InvalidArgumentException; +use JsonException; use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClientFactory; use Http\Discovery\Psr17FactoryDiscovery; -use InvalidArgumentException; -use JsonException; use Psr\Http\Client\ClientExceptionInterface; +use Psr\Http\Message\StreamFactoryInterface; +use Upsun\Core\OAuthProvider; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UriFactoryInterface; -use Psr\Http\Message\UriInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; +use Psr\Http\Message\UriInterface; +use Psr\Http\Message\StreamInterface; use function sprintf; @@ -229,10 +229,10 @@ protected function createUri( /** * @template T * @param class-string|string $dataType Fully-qualified class name, or scalar type like "string", "array" + * @return T * * @throws ApiException * @throws Exception - * @return T */ protected function handleResponseWithDataType( string $dataType, diff --git a/src/Api/AddOnsApi.php b/src/Api/AddOnsApi.php index ce642614d..d019b1798 100644 --- a/src/Api/AddOnsApi.php +++ b/src/Api/AddOnsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\OrganizationAddonsObject; -use Upsun\Model\UpdateOrgAddonsRequest; /** * Low level AddOnsApi (auto-generated) @@ -26,13 +25,13 @@ final class AddOnsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -64,7 +63,7 @@ public function __construct( */ public function getOrgAddons( string $organizationId - ): OrganizationAddonsObject { + ): \Upsun\Model\OrganizationAddonsObject { return $this->getOrgAddonsWithHttpInfo( $organizationId ); @@ -82,7 +81,7 @@ public function getOrgAddons( */ private function getOrgAddonsWithHttpInfo( string $organizationId - ): OrganizationAddonsObject { + ): \Upsun\Model\OrganizationAddonsObject { $request = $this->getOrgAddonsRequest( $organizationId ); @@ -126,6 +125,7 @@ private function getOrgAddonsWithHttpInfo( private function getOrgAddonsRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -151,6 +151,7 @@ private function getOrgAddonsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -222,8 +223,8 @@ private function getOrgAddonsRequest( */ public function updateOrgAddons( string $organizationId, - UpdateOrgAddonsRequest $updateOrgAddonsRequest - ): OrganizationAddonsObject { + \Upsun\Model\UpdateOrgAddonsRequest $updateOrgAddonsRequest + ): \Upsun\Model\OrganizationAddonsObject { return $this->updateOrgAddonsWithHttpInfo( $organizationId, $updateOrgAddonsRequest @@ -242,8 +243,8 @@ public function updateOrgAddons( */ private function updateOrgAddonsWithHttpInfo( string $organizationId, - UpdateOrgAddonsRequest $updateOrgAddonsRequest - ): OrganizationAddonsObject { + \Upsun\Model\UpdateOrgAddonsRequest $updateOrgAddonsRequest + ): \Upsun\Model\OrganizationAddonsObject { $request = $this->updateOrgAddonsRequest( $organizationId, $updateOrgAddonsRequest @@ -287,8 +288,9 @@ private function updateOrgAddonsWithHttpInfo( */ private function updateOrgAddonsRequest( string $organizationId, - UpdateOrgAddonsRequest $updateOrgAddonsRequest + \Upsun\Model\UpdateOrgAddonsRequest $updateOrgAddonsRequest ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -321,6 +323,7 @@ private function updateOrgAddonsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/AlertsApi.php b/src/Api/AlertsApi.php index 3e939521e..57d188bcf 100644 --- a/src/Api/AlertsApi.php +++ b/src/Api/AlertsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\GetUsageAlerts200Response; -use Upsun\Model\UpdateUsageAlertsRequest; /** * Low level AlertsApi (auto-generated) @@ -26,13 +25,13 @@ final class AlertsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -62,7 +61,7 @@ public function __construct( */ public function getUsageAlerts( string $subscriptionId - ): GetUsageAlerts200Response { + ): \Upsun\Model\GetUsageAlerts200Response { return $this->getUsageAlertsWithHttpInfo( $subscriptionId ); @@ -79,7 +78,7 @@ public function getUsageAlerts( */ private function getUsageAlertsWithHttpInfo( string $subscriptionId - ): GetUsageAlerts200Response { + ): \Upsun\Model\GetUsageAlerts200Response { $request = $this->getUsageAlertsRequest( $subscriptionId ); @@ -122,6 +121,7 @@ private function getUsageAlertsWithHttpInfo( private function getUsageAlertsRequest( string $subscriptionId ): RequestInterface { + // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -147,6 +147,7 @@ private function getUsageAlertsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -216,8 +217,8 @@ private function getUsageAlertsRequest( */ public function updateUsageAlerts( string $subscriptionId, - ?UpdateUsageAlertsRequest $updateUsageAlertsRequest = null - ): GetUsageAlerts200Response { + ?\Upsun\Model\UpdateUsageAlertsRequest $updateUsageAlertsRequest = null + ): \Upsun\Model\GetUsageAlerts200Response { return $this->updateUsageAlertsWithHttpInfo( $subscriptionId, $updateUsageAlertsRequest @@ -235,8 +236,8 @@ public function updateUsageAlerts( */ private function updateUsageAlertsWithHttpInfo( string $subscriptionId, - ?UpdateUsageAlertsRequest $updateUsageAlertsRequest = null - ): GetUsageAlerts200Response { + ?\Upsun\Model\UpdateUsageAlertsRequest $updateUsageAlertsRequest = null + ): \Upsun\Model\GetUsageAlerts200Response { $request = $this->updateUsageAlertsRequest( $subscriptionId, $updateUsageAlertsRequest @@ -279,8 +280,9 @@ private function updateUsageAlertsWithHttpInfo( */ private function updateUsageAlertsRequest( string $subscriptionId, - ?UpdateUsageAlertsRequest $updateUsageAlertsRequest = null + ?\Upsun\Model\UpdateUsageAlertsRequest $updateUsageAlertsRequest = null ): RequestInterface { + // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -306,6 +308,7 @@ private function updateUsageAlertsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ApiConfiguration.php b/src/Api/ApiConfiguration.php index 590a06d1d..963a8d05a 100644 --- a/src/Api/ApiConfiguration.php +++ b/src/Api/ApiConfiguration.php @@ -5,7 +5,7 @@ use Upsun\Core\UserAgent; /** - * APIConfiguration holder for the Upsun API Client. + * ApiConfiguration holder for the Upsun API Client. * * This class holds API token and other runtime options * used by the generated client classes. diff --git a/src/Api/ApiTokensApi.php b/src/Api/ApiTokensApi.php index 4eaf8c688..900134d63 100644 --- a/src/Api/ApiTokensApi.php +++ b/src/Api/ApiTokensApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ApiToken; -use Upsun\Model\CreateApiTokenRequest; /** * Low level ApiTokensApi (auto-generated) @@ -26,13 +25,13 @@ final class ApiTokensApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -63,8 +62,8 @@ public function __construct( */ public function createApiToken( string $userId, - ?CreateApiTokenRequest $createApiTokenRequest = null - ): ApiToken { + ?\Upsun\Model\CreateApiTokenRequest $createApiTokenRequest = null + ): \Upsun\Model\ApiToken { return $this->createApiTokenWithHttpInfo( $userId, $createApiTokenRequest @@ -82,8 +81,8 @@ public function createApiToken( */ private function createApiTokenWithHttpInfo( string $userId, - ?CreateApiTokenRequest $createApiTokenRequest = null - ): ApiToken { + ?\Upsun\Model\CreateApiTokenRequest $createApiTokenRequest = null + ): \Upsun\Model\ApiToken { $request = $this->createApiTokenRequest( $userId, $createApiTokenRequest @@ -126,8 +125,9 @@ private function createApiTokenWithHttpInfo( */ private function createApiTokenRequest( string $userId, - ?CreateApiTokenRequest $createApiTokenRequest = null + ?\Upsun\Model\CreateApiTokenRequest $createApiTokenRequest = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -153,6 +153,7 @@ private function createApiTokenRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -293,6 +294,7 @@ private function deleteApiTokenRequest( string $userId, string $tokenId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -334,6 +336,7 @@ private function deleteApiTokenRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -406,7 +409,7 @@ private function deleteApiTokenRequest( public function getApiToken( string $userId, string $tokenId - ): ApiToken { + ): \Upsun\Model\ApiToken { return $this->getApiTokenWithHttpInfo( $userId, $tokenId @@ -426,7 +429,7 @@ public function getApiToken( private function getApiTokenWithHttpInfo( string $userId, string $tokenId - ): ApiToken { + ): \Upsun\Model\ApiToken { $request = $this->getApiTokenRequest( $userId, $tokenId @@ -472,6 +475,7 @@ private function getApiTokenRequest( string $userId, string $tokenId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -513,6 +517,7 @@ private function getApiTokenRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -647,6 +652,7 @@ private function listApiTokensWithHttpInfo( private function listApiTokensRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -672,6 +678,7 @@ private function listApiTokensRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/AutoscalingApi.php b/src/Api/AutoscalingApi.php index 22a6ed7a9..e000e773c 100644 --- a/src/Api/AutoscalingApi.php +++ b/src/Api/AutoscalingApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,7 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AutoscalerSettings; /** * Low level AutoscalingApi (auto-generated) @@ -25,13 +25,13 @@ final class AutoscalingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -63,7 +63,7 @@ public function __construct( public function getAutoscalerSettings( string $projectId, string $environmentId - ): AutoscalerSettings { + ): \Upsun\Model\AutoscalerSettings { return $this->getAutoscalerSettingsWithHttpInfo( $projectId, $environmentId @@ -82,7 +82,7 @@ public function getAutoscalerSettings( private function getAutoscalerSettingsWithHttpInfo( string $projectId, string $environmentId - ): AutoscalerSettings { + ): \Upsun\Model\AutoscalerSettings { $request = $this->getAutoscalerSettingsRequest( $projectId, $environmentId @@ -127,6 +127,7 @@ private function getAutoscalerSettingsRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -168,6 +169,7 @@ private function getAutoscalerSettingsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -240,8 +242,8 @@ private function getAutoscalerSettingsRequest( public function patchAutoscalerSettings( string $projectId, string $environmentId, - ?AutoscalerSettings $autoscalerSettings = null - ): AutoscalerSettings { + ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null + ): \Upsun\Model\AutoscalerSettings { return $this->patchAutoscalerSettingsWithHttpInfo( $projectId, $environmentId, @@ -262,8 +264,8 @@ public function patchAutoscalerSettings( private function patchAutoscalerSettingsWithHttpInfo( string $projectId, string $environmentId, - ?AutoscalerSettings $autoscalerSettings = null - ): AutoscalerSettings { + ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null + ): \Upsun\Model\AutoscalerSettings { $request = $this->patchAutoscalerSettingsRequest( $projectId, $environmentId, @@ -309,8 +311,9 @@ private function patchAutoscalerSettingsWithHttpInfo( private function patchAutoscalerSettingsRequest( string $projectId, string $environmentId, - ?AutoscalerSettings $autoscalerSettings = null + ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -352,6 +355,7 @@ private function patchAutoscalerSettingsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -432,8 +436,8 @@ private function patchAutoscalerSettingsRequest( public function postAutoscalerSettings( string $projectId, string $environmentId, - ?AutoscalerSettings $autoscalerSettings = null - ): AutoscalerSettings { + ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null + ): \Upsun\Model\AutoscalerSettings { return $this->postAutoscalerSettingsWithHttpInfo( $projectId, $environmentId, @@ -454,8 +458,8 @@ public function postAutoscalerSettings( private function postAutoscalerSettingsWithHttpInfo( string $projectId, string $environmentId, - ?AutoscalerSettings $autoscalerSettings = null - ): AutoscalerSettings { + ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null + ): \Upsun\Model\AutoscalerSettings { $request = $this->postAutoscalerSettingsRequest( $projectId, $environmentId, @@ -501,8 +505,9 @@ private function postAutoscalerSettingsWithHttpInfo( private function postAutoscalerSettingsRequest( string $projectId, string $environmentId, - ?AutoscalerSettings $autoscalerSettings = null + ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -544,6 +549,7 @@ private function postAutoscalerSettingsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/BlackfireMonitoringApi.php b/src/Api/BlackfireMonitoringApi.php index e56345247..a35fbc5b9 100644 --- a/src/Api/BlackfireMonitoringApi.php +++ b/src/Api/BlackfireMonitoringApi.php @@ -25,13 +25,13 @@ final class BlackfireMonitoringApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -210,6 +210,7 @@ private function blackfirePhpServerCachesRequest( ?string $instancesMode = null, ?string $distributionCost = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -218,6 +219,8 @@ private function blackfirePhpServerCachesRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfirePhpServerCaches, @@ -233,6 +236,8 @@ private function blackfirePhpServerCachesRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfirePhpServerCaches, @@ -275,6 +280,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -288,6 +295,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -301,6 +310,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -314,6 +325,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -327,6 +340,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -340,6 +355,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -353,6 +370,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -366,6 +385,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -379,6 +400,8 @@ private function blackfirePhpServerCachesRequest( } } + + // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -392,6 +415,8 @@ private function blackfirePhpServerCachesRequest( } } + + // path params if ($projectId !== null) { @@ -411,6 +436,7 @@ private function blackfirePhpServerCachesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -636,6 +662,7 @@ private function blackfireServerGlobalRequest( ?string $instancesMode = null, ?string $distributionCost = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -644,6 +671,8 @@ private function blackfireServerGlobalRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerGlobal, @@ -659,6 +688,8 @@ private function blackfireServerGlobalRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerGlobal, @@ -708,6 +739,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -721,6 +754,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($keys !== null) { if ('form' === 'form' && is_array($keys)) { @@ -734,6 +769,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -747,6 +784,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -760,6 +799,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -773,6 +814,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -786,6 +829,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -799,6 +844,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -812,6 +859,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -825,6 +874,8 @@ private function blackfireServerGlobalRequest( } } + + // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -838,6 +889,8 @@ private function blackfireServerGlobalRequest( } } + + // path params if ($projectId !== null) { @@ -857,6 +910,7 @@ private function blackfireServerGlobalRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1258,6 +1312,7 @@ private function blackfireServerTopSpansRequest( ?string $ossMode = null, ?string $distributionCost = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1266,6 +1321,8 @@ private function blackfireServerTopSpansRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerTopSpans, @@ -1281,6 +1338,8 @@ private function blackfireServerTopSpansRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerTopSpans, @@ -1323,6 +1382,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1336,6 +1397,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -1349,6 +1412,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1362,6 +1427,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -1375,6 +1442,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -1388,6 +1457,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -1401,6 +1472,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -1414,6 +1487,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -1427,6 +1502,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -1440,6 +1517,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($transactions !== null) { if ('form' === 'form' && is_array($transactions)) { @@ -1453,6 +1532,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($transactionsMode !== null) { if ('form' === 'form' && is_array($transactionsMode)) { @@ -1466,6 +1547,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($wtSlots !== null) { if ('form' === 'form' && is_array($wtSlots)) { @@ -1479,6 +1562,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($wtSlotsMode !== null) { if ('form' === 'form' && is_array($wtSlotsMode)) { @@ -1492,6 +1577,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($pmuSlots !== null) { if ('form' === 'form' && is_array($pmuSlots)) { @@ -1505,6 +1592,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($pmuSlotsMode !== null) { if ('form' === 'form' && is_array($pmuSlotsMode)) { @@ -1518,6 +1607,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($httpStatusCodes !== null) { if ('form' === 'form' && is_array($httpStatusCodes)) { @@ -1531,6 +1622,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($httpStatusCodesMode !== null) { if ('form' === 'form' && is_array($httpStatusCodesMode)) { @@ -1544,6 +1637,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($httpHosts !== null) { if ('form' === 'form' && is_array($httpHosts)) { @@ -1557,6 +1652,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($httpHostsMode !== null) { if ('form' === 'form' && is_array($httpHostsMode)) { @@ -1570,6 +1667,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($hosts !== null) { if ('form' === 'form' && is_array($hosts)) { @@ -1583,6 +1682,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($hostsMode !== null) { if ('form' === 'form' && is_array($hostsMode)) { @@ -1596,6 +1697,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($frameworks !== null) { if ('form' === 'form' && is_array($frameworks)) { @@ -1609,6 +1712,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($frameworksMode !== null) { if ('form' === 'form' && is_array($frameworksMode)) { @@ -1622,6 +1727,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($languages !== null) { if ('form' === 'form' && is_array($languages)) { @@ -1635,6 +1742,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($languagesMode !== null) { if ('form' === 'form' && is_array($languagesMode)) { @@ -1648,6 +1757,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -1661,6 +1772,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -1674,6 +1787,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($runtimes !== null) { if ('form' === 'form' && is_array($runtimes)) { @@ -1687,6 +1802,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($runtimesMode !== null) { if ('form' === 'form' && is_array($runtimesMode)) { @@ -1700,6 +1817,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($oss !== null) { if ('form' === 'form' && is_array($oss)) { @@ -1713,6 +1832,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($ossMode !== null) { if ('form' === 'form' && is_array($ossMode)) { @@ -1726,6 +1847,8 @@ private function blackfireServerTopSpansRequest( } } + + // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -1739,6 +1862,8 @@ private function blackfireServerTopSpansRequest( } } + + // path params if ($projectId !== null) { @@ -1758,6 +1883,7 @@ private function blackfireServerTopSpansRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2176,6 +2302,7 @@ private function blackfireServerTransactionsBreakdownRequest( ?string $ossMode = null, ?string $distributionCost = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2184,6 +2311,8 @@ private function blackfireServerTransactionsBreakdownRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, @@ -2199,6 +2328,8 @@ private function blackfireServerTransactionsBreakdownRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, @@ -2235,6 +2366,8 @@ private function blackfireServerTransactionsBreakdownRequest( ); } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down'; $formParams = []; $queryParams = []; @@ -2255,6 +2388,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -2268,6 +2403,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -2281,6 +2418,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($breakdownDimension !== null) { if ('form' === 'form' && is_array($breakdownDimension)) { @@ -2294,6 +2433,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -2307,6 +2448,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($breakdownLimit !== null) { if ('form' === 'form' && is_array($breakdownLimit)) { @@ -2320,6 +2463,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -2333,6 +2478,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -2346,6 +2493,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -2359,6 +2508,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -2372,6 +2523,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -2385,6 +2538,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -2398,6 +2553,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($transactions !== null) { if ('form' === 'form' && is_array($transactions)) { @@ -2411,6 +2568,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($transactionsMode !== null) { if ('form' === 'form' && is_array($transactionsMode)) { @@ -2424,6 +2583,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($wtSlots !== null) { if ('form' === 'form' && is_array($wtSlots)) { @@ -2437,6 +2598,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($wtSlotsMode !== null) { if ('form' === 'form' && is_array($wtSlotsMode)) { @@ -2450,6 +2613,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($pmuSlots !== null) { if ('form' === 'form' && is_array($pmuSlots)) { @@ -2463,6 +2628,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($pmuSlotsMode !== null) { if ('form' === 'form' && is_array($pmuSlotsMode)) { @@ -2476,6 +2643,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($httpStatusCodes !== null) { if ('form' === 'form' && is_array($httpStatusCodes)) { @@ -2489,6 +2658,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($httpStatusCodesMode !== null) { if ('form' === 'form' && is_array($httpStatusCodesMode)) { @@ -2502,6 +2673,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($httpHosts !== null) { if ('form' === 'form' && is_array($httpHosts)) { @@ -2515,6 +2688,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($httpHostsMode !== null) { if ('form' === 'form' && is_array($httpHostsMode)) { @@ -2528,6 +2703,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($hosts !== null) { if ('form' === 'form' && is_array($hosts)) { @@ -2541,6 +2718,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($hostsMode !== null) { if ('form' === 'form' && is_array($hostsMode)) { @@ -2554,6 +2733,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($frameworks !== null) { if ('form' === 'form' && is_array($frameworks)) { @@ -2567,6 +2748,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($frameworksMode !== null) { if ('form' === 'form' && is_array($frameworksMode)) { @@ -2580,6 +2763,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($languages !== null) { if ('form' === 'form' && is_array($languages)) { @@ -2593,6 +2778,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($languagesMode !== null) { if ('form' === 'form' && is_array($languagesMode)) { @@ -2606,6 +2793,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -2619,6 +2808,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -2632,6 +2823,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($runtimes !== null) { if ('form' === 'form' && is_array($runtimes)) { @@ -2645,6 +2838,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($runtimesMode !== null) { if ('form' === 'form' && is_array($runtimesMode)) { @@ -2658,6 +2853,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($oss !== null) { if ('form' === 'form' && is_array($oss)) { @@ -2671,6 +2868,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($ossMode !== null) { if ('form' === 'form' && is_array($ossMode)) { @@ -2684,6 +2883,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -2697,6 +2898,8 @@ private function blackfireServerTransactionsBreakdownRequest( } } + + // path params if ($projectId !== null) { @@ -2716,6 +2919,7 @@ private function blackfireServerTransactionsBreakdownRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/BlackfireProfilingApi.php b/src/Api/BlackfireProfilingApi.php index 7238b543c..d74ae7240 100644 --- a/src/Api/BlackfireProfilingApi.php +++ b/src/Api/BlackfireProfilingApi.php @@ -13,7 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\FilterSelect; /** * Low level BlackfireProfilingApi (auto-generated) @@ -26,13 +25,13 @@ final class BlackfireProfilingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -136,6 +135,7 @@ private function blackfireProfileGraphRequest( string $environmentId, string $uuid ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -144,6 +144,8 @@ private function blackfireProfileGraphRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileGraph, @@ -159,6 +161,8 @@ private function blackfireProfileGraphRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileGraph, @@ -174,6 +178,8 @@ private function blackfireProfileGraphRequest( ); } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileGraph, @@ -181,6 +187,7 @@ private function blackfireProfileGraphRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/graph'; $formParams = []; $queryParams = []; @@ -216,6 +223,7 @@ private function blackfireProfileGraphRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -359,6 +367,7 @@ private function blackfireProfileProfileRequest( string $environmentId, string $uuid ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -367,6 +376,8 @@ private function blackfireProfileProfileRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileProfile, @@ -382,6 +393,8 @@ private function blackfireProfileProfileRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileProfile, @@ -397,6 +410,8 @@ private function blackfireProfileProfileRequest( ); } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileProfile, @@ -404,6 +419,7 @@ private function blackfireProfileProfileRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/profile'; $formParams = []; $queryParams = []; @@ -439,6 +455,7 @@ private function blackfireProfileProfileRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -582,6 +599,7 @@ private function blackfireProfileSubprofilesRequest( string $environmentId, string $uuid ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -590,6 +608,8 @@ private function blackfireProfileSubprofilesRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, @@ -605,6 +625,8 @@ private function blackfireProfileSubprofilesRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, @@ -620,6 +642,8 @@ private function blackfireProfileSubprofilesRequest( ); } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, @@ -627,6 +651,7 @@ private function blackfireProfileSubprofilesRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/subprofiles'; $formParams = []; $queryParams = []; @@ -662,6 +687,7 @@ private function blackfireProfileSubprofilesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -805,6 +831,7 @@ private function blackfireProfileTimelineRequest( string $environmentId, string $uuid ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -813,6 +840,8 @@ private function blackfireProfileTimelineRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileTimeline, @@ -828,6 +857,8 @@ private function blackfireProfileTimelineRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileTimeline, @@ -843,6 +874,8 @@ private function blackfireProfileTimelineRequest( ); } + + if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileTimeline, @@ -850,6 +883,7 @@ private function blackfireProfileTimelineRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/timeline'; $formParams = []; $queryParams = []; @@ -885,6 +919,7 @@ private function blackfireProfileTimelineRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -957,8 +992,8 @@ private function blackfireProfileTimelineRequest( * @param string|null $isPublic (optional) * @param string|null $sortBy (optional) * @param string|null $sortOrder (optional) - * @param DateTime|null $startDate (optional) - * @param DateTime|null $endDate (optional) + * @param \DateTime|null $startDate (optional) + * @param \DateTime|null $endDate (optional) * @param int|null $statusCode (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -976,12 +1011,12 @@ public function blackfireProfilesList( ?string $isPublic = null, ?string $sortBy = null, ?string $sortOrder = null, - ?DateTime $startDate = null, - ?DateTime $endDate = null, + ?\DateTime $startDate = null, + ?\DateTime $endDate = null, ?int $statusCode = null, - ?FilterSelect $owner = null, - ?FilterSelect $languages = null, - ?FilterSelect $frameworks = null, + ?\Upsun\Model\FilterSelect $owner = null, + ?\Upsun\Model\FilterSelect $languages = null, + ?\Upsun\Model\FilterSelect $frameworks = null, ?int $itemsPerPage = null ): mixed { return $this->blackfireProfilesListWithHttpInfo( @@ -1018,8 +1053,8 @@ public function blackfireProfilesList( * @param string|null $isPublic (optional) * @param string|null $sortBy (optional) * @param string|null $sortOrder (optional) - * @param DateTime|null $startDate (optional) - * @param DateTime|null $endDate (optional) + * @param \DateTime|null $startDate (optional) + * @param \DateTime|null $endDate (optional) * @param int|null $statusCode (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1036,12 +1071,12 @@ private function blackfireProfilesListWithHttpInfo( ?string $isPublic = null, ?string $sortBy = null, ?string $sortOrder = null, - ?DateTime $startDate = null, - ?DateTime $endDate = null, + ?\DateTime $startDate = null, + ?\DateTime $endDate = null, ?int $statusCode = null, - ?FilterSelect $owner = null, - ?FilterSelect $languages = null, - ?FilterSelect $frameworks = null, + ?\Upsun\Model\FilterSelect $owner = null, + ?\Upsun\Model\FilterSelect $languages = null, + ?\Upsun\Model\FilterSelect $frameworks = null, ?int $itemsPerPage = null ): mixed { $request = $this->blackfireProfilesListRequest( @@ -1104,8 +1139,8 @@ private function blackfireProfilesListWithHttpInfo( * @param string|null $isPublic (optional) * @param string|null $sortBy (optional) * @param string|null $sortOrder (optional) - * @param DateTime|null $startDate (optional) - * @param DateTime|null $endDate (optional) + * @param \DateTime|null $startDate (optional) + * @param \DateTime|null $endDate (optional) * @param int|null $statusCode (optional) * * @throws InvalidArgumentException @@ -1121,14 +1156,15 @@ private function blackfireProfilesListRequest( ?string $isPublic = null, ?string $sortBy = null, ?string $sortOrder = null, - ?DateTime $startDate = null, - ?DateTime $endDate = null, + ?\DateTime $startDate = null, + ?\DateTime $endDate = null, ?int $statusCode = null, - ?FilterSelect $owner = null, - ?FilterSelect $languages = null, - ?FilterSelect $frameworks = null, + ?\Upsun\Model\FilterSelect $owner = null, + ?\Upsun\Model\FilterSelect $languages = null, + ?\Upsun\Model\FilterSelect $frameworks = null, ?int $itemsPerPage = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1137,6 +1173,8 @@ private function blackfireProfilesListRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1152,6 +1190,8 @@ private function blackfireProfilesListRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1159,6 +1199,8 @@ private function blackfireProfilesListRequest( ); } + + if ($page !== null && $page < 1) { throw new InvalidArgumentException( 'invalid value for "$page" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1166,6 +1208,8 @@ private function blackfireProfilesListRequest( ); } + + if ($limit !== null && $limit > 100) { throw new InvalidArgumentException( 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1180,6 +1224,8 @@ private function blackfireProfilesListRequest( ); } + + if ($itemsPerPage !== null && $itemsPerPage > 100) { throw new InvalidArgumentException( 'invalid value for "$itemsPerPage" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1194,6 +1240,8 @@ private function blackfireProfilesListRequest( ); } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles'; $formParams = []; $queryParams = []; @@ -1214,6 +1262,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -1227,6 +1277,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -1240,6 +1292,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($url !== null) { if ('form' === 'form' && is_array($url)) { @@ -1253,6 +1307,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($isAuto !== null) { if ('form' === 'form' && is_array($isAuto)) { @@ -1266,6 +1322,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($isPublic !== null) { if ('form' === 'form' && is_array($isPublic)) { @@ -1279,6 +1337,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($sortBy !== null) { if ('form' === 'form' && is_array($sortBy)) { @@ -1292,6 +1352,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($sortOrder !== null) { if ('form' === 'form' && is_array($sortOrder)) { @@ -1305,6 +1367,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($startDate !== null) { if ('form' === 'form' && is_array($startDate)) { @@ -1318,6 +1382,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($endDate !== null) { if ('form' === 'form' && is_array($endDate)) { @@ -1331,6 +1397,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($statusCode !== null) { if ('form' === 'form' && is_array($statusCode)) { @@ -1344,6 +1412,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($owner !== null) { if ('form' === 'form' && is_array($owner)) { @@ -1357,6 +1427,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($languages !== null) { if ('form' === 'form' && is_array($languages)) { @@ -1370,6 +1442,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($frameworks !== null) { if ('form' === 'form' && is_array($frameworks)) { @@ -1383,6 +1457,8 @@ private function blackfireProfilesListRequest( } } + + // query params if ($itemsPerPage !== null) { if ('form' === 'form' && is_array($itemsPerPage)) { @@ -1396,6 +1472,8 @@ private function blackfireProfilesListRequest( } } + + // path params if ($projectId !== null) { @@ -1415,6 +1493,7 @@ private function blackfireProfilesListRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1584,6 +1663,7 @@ private function blackfireProfilesRecommendationsRequest( ?string $transaction = null, ?int $limit = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1592,6 +1672,8 @@ private function blackfireProfilesRecommendationsRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, @@ -1607,6 +1689,8 @@ private function blackfireProfilesRecommendationsRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, @@ -1614,6 +1698,7 @@ private function blackfireProfilesRecommendationsRequest( ); } + if ($limit !== null && $limit > 200) { throw new InvalidArgumentException( 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, @@ -1628,6 +1713,8 @@ private function blackfireProfilesRecommendationsRequest( ); } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/recommendations'; $formParams = []; $queryParams = []; @@ -1648,6 +1735,8 @@ private function blackfireProfilesRecommendationsRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1661,6 +1750,8 @@ private function blackfireProfilesRecommendationsRequest( } } + + // query params if ($transaction !== null) { if ('form' === 'form' && is_array($transaction)) { @@ -1674,6 +1765,8 @@ private function blackfireProfilesRecommendationsRequest( } } + + // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -1687,6 +1780,8 @@ private function blackfireProfilesRecommendationsRequest( } } + + // path params if ($projectId !== null) { @@ -1706,6 +1801,7 @@ private function blackfireProfilesRecommendationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/CertManagementApi.php b/src/Api/CertManagementApi.php index 12d4da614..b348a8526 100644 --- a/src/Api/CertManagementApi.php +++ b/src/Api/CertManagementApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,12 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Certificate; -use Upsun\Model\CertificateCreateInput; -use Upsun\Model\CertificatePatch; -use Upsun\Model\CertificateProvisioner; -use Upsun\Model\CertificateProvisionerPatch; /** * Low level CertManagementApi (auto-generated) @@ -30,13 +25,13 @@ final class CertManagementApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -48,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -66,8 +61,8 @@ public function __construct( */ public function createProjectsCertificates( string $projectId, - CertificateCreateInput $certificateCreateInput - ): AcceptedResponse { + \Upsun\Model\CertificateCreateInput $certificateCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsCertificatesWithHttpInfo( $projectId, $certificateCreateInput @@ -84,8 +79,8 @@ public function createProjectsCertificates( */ private function createProjectsCertificatesWithHttpInfo( string $projectId, - CertificateCreateInput $certificateCreateInput - ): AcceptedResponse { + \Upsun\Model\CertificateCreateInput $certificateCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsCertificatesRequest( $projectId, $certificateCreateInput @@ -127,8 +122,9 @@ private function createProjectsCertificatesWithHttpInfo( */ private function createProjectsCertificatesRequest( string $projectId, - CertificateCreateInput $certificateCreateInput + \Upsun\Model\CertificateCreateInput $certificateCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -161,6 +157,7 @@ private function createProjectsCertificatesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -238,7 +235,7 @@ private function createProjectsCertificatesRequest( public function deleteProjectsCertificates( string $projectId, string $certificateId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsCertificatesWithHttpInfo( $projectId, $certificateId @@ -255,7 +252,7 @@ public function deleteProjectsCertificates( private function deleteProjectsCertificatesWithHttpInfo( string $projectId, string $certificateId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsCertificatesRequest( $projectId, $certificateId @@ -298,6 +295,7 @@ private function deleteProjectsCertificatesRequest( string $projectId, string $certificateId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -339,6 +337,7 @@ private function deleteProjectsCertificatesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -408,7 +407,7 @@ private function deleteProjectsCertificatesRequest( public function getProjectsCertificates( string $projectId, string $certificateId - ): Certificate { + ): \Upsun\Model\Certificate { return $this->getProjectsCertificatesWithHttpInfo( $projectId, $certificateId @@ -425,7 +424,7 @@ public function getProjectsCertificates( private function getProjectsCertificatesWithHttpInfo( string $projectId, string $certificateId - ): Certificate { + ): \Upsun\Model\Certificate { $request = $this->getProjectsCertificatesRequest( $projectId, $certificateId @@ -468,6 +467,7 @@ private function getProjectsCertificatesRequest( string $projectId, string $certificateId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -509,6 +509,7 @@ private function getProjectsCertificatesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -575,7 +576,7 @@ private function getProjectsCertificatesRequest( public function getProjectsProvisioners( string $projectId, string $certificateProvisionerDocumentId - ): CertificateProvisioner { + ): \Upsun\Model\CertificateProvisioner { return $this->getProjectsProvisionersWithHttpInfo( $projectId, $certificateProvisionerDocumentId @@ -591,7 +592,7 @@ public function getProjectsProvisioners( private function getProjectsProvisionersWithHttpInfo( string $projectId, string $certificateProvisionerDocumentId - ): CertificateProvisioner { + ): \Upsun\Model\CertificateProvisioner { $request = $this->getProjectsProvisionersRequest( $projectId, $certificateProvisionerDocumentId @@ -634,6 +635,7 @@ private function getProjectsProvisionersRequest( string $projectId, string $certificateProvisionerDocumentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -675,6 +677,7 @@ private function getProjectsProvisionersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -803,6 +806,7 @@ private function listProjectsCertificatesWithHttpInfo( private function listProjectsCertificatesRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -828,6 +832,7 @@ private function listProjectsCertificatesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -952,6 +957,7 @@ private function listProjectsProvisionersWithHttpInfo( private function listProjectsProvisionersRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -977,6 +983,7 @@ private function listProjectsProvisionersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1047,8 +1054,8 @@ private function listProjectsProvisionersRequest( public function updateProjectsCertificates( string $projectId, string $certificateId, - CertificatePatch $certificatePatch - ): AcceptedResponse { + \Upsun\Model\CertificatePatch $certificatePatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsCertificatesWithHttpInfo( $projectId, $certificateId, @@ -1067,8 +1074,8 @@ public function updateProjectsCertificates( private function updateProjectsCertificatesWithHttpInfo( string $projectId, string $certificateId, - CertificatePatch $certificatePatch - ): AcceptedResponse { + \Upsun\Model\CertificatePatch $certificatePatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsCertificatesRequest( $projectId, $certificateId, @@ -1112,8 +1119,9 @@ private function updateProjectsCertificatesWithHttpInfo( private function updateProjectsCertificatesRequest( string $projectId, string $certificateId, - CertificatePatch $certificatePatch + \Upsun\Model\CertificatePatch $certificatePatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1162,6 +1170,7 @@ private function updateProjectsCertificatesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1237,8 +1246,8 @@ private function updateProjectsCertificatesRequest( public function updateProjectsProvisioners( string $projectId, string $certificateProvisionerDocumentId, - CertificateProvisionerPatch $certificateProvisionerPatch - ): AcceptedResponse { + \Upsun\Model\CertificateProvisionerPatch $certificateProvisionerPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsProvisionersWithHttpInfo( $projectId, $certificateProvisionerDocumentId, @@ -1256,8 +1265,8 @@ public function updateProjectsProvisioners( private function updateProjectsProvisionersWithHttpInfo( string $projectId, string $certificateProvisionerDocumentId, - CertificateProvisionerPatch $certificateProvisionerPatch - ): AcceptedResponse { + \Upsun\Model\CertificateProvisionerPatch $certificateProvisionerPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsProvisionersRequest( $projectId, $certificateProvisionerDocumentId, @@ -1301,8 +1310,9 @@ private function updateProjectsProvisionersWithHttpInfo( private function updateProjectsProvisionersRequest( string $projectId, string $certificateProvisionerDocumentId, - CertificateProvisionerPatch $certificateProvisionerPatch + \Upsun\Model\CertificateProvisionerPatch $certificateProvisionerPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1351,6 +1361,7 @@ private function updateProjectsProvisionersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ConnectionsApi.php b/src/Api/ConnectionsApi.php index 1e2153555..2dc71d970 100644 --- a/src/Api/ConnectionsApi.php +++ b/src/Api/ConnectionsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,7 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Connection; /** * Low level ConnectionsApi (auto-generated) @@ -25,13 +25,13 @@ final class ConnectionsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -124,6 +124,7 @@ private function deleteLoginConnectionRequest( string $provider, string $userId ): RequestInterface { + // verify the required parameter 'provider' is set if (empty($provider)) { throw new InvalidArgumentException( @@ -165,6 +166,7 @@ private function deleteLoginConnectionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -237,7 +239,7 @@ private function deleteLoginConnectionRequest( public function getLoginConnection( string $provider, string $userId - ): Connection { + ): \Upsun\Model\Connection { return $this->getLoginConnectionWithHttpInfo( $provider, $userId @@ -257,7 +259,7 @@ public function getLoginConnection( private function getLoginConnectionWithHttpInfo( string $provider, string $userId - ): Connection { + ): \Upsun\Model\Connection { $request = $this->getLoginConnectionRequest( $provider, $userId @@ -303,6 +305,7 @@ private function getLoginConnectionRequest( string $provider, string $userId ): RequestInterface { + // verify the required parameter 'provider' is set if (empty($provider)) { throw new InvalidArgumentException( @@ -344,6 +347,7 @@ private function getLoginConnectionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -478,6 +482,7 @@ private function listLoginConnectionsWithHttpInfo( private function listLoginConnectionsRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -503,6 +508,7 @@ private function listLoginConnectionsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ContinuousProfilingApi.php b/src/Api/ContinuousProfilingApi.php index b94894778..1bcc22c3c 100644 --- a/src/Api/ContinuousProfilingApi.php +++ b/src/Api/ContinuousProfilingApi.php @@ -25,13 +25,13 @@ final class ContinuousProfilingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -342,6 +342,7 @@ private function getApplicationFilterRequest( ?int $probeVersionMode = null, ?array $probeVersion = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -350,6 +351,8 @@ private function getApplicationFilterRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.getApplicationFilter, @@ -365,6 +368,8 @@ private function getApplicationFilterRequest( ); } + + if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.getApplicationFilter, @@ -380,6 +385,8 @@ private function getApplicationFilterRequest( ); } + + if (!preg_match("/.+/", $app)) { throw new InvalidArgumentException( "invalid value for \"app\" when calling ContinuousProfilingApi.getApplicationFilter, @@ -387,6 +394,7 @@ private function getApplicationFilterRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter'; $formParams = []; $queryParams = []; @@ -407,6 +415,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -420,6 +430,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($profileType !== null) { if ('form' === 'form' && is_array($profileType)) { @@ -433,6 +445,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtimeMode !== null) { if ('form' === 'form' && is_array($runtimeMode)) { @@ -446,6 +460,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtime !== null) { if ('form' === 'form' && is_array($runtime)) { @@ -459,6 +475,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtimeVersionMode !== null) { if ('form' === 'form' && is_array($runtimeVersionMode)) { @@ -472,6 +490,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtimeVersion !== null) { if ('form' === 'form' && is_array($runtimeVersion)) { @@ -485,6 +505,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtimeArchMode !== null) { if ('form' === 'form' && is_array($runtimeArchMode)) { @@ -498,6 +520,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtimeArch !== null) { if ('form' === 'form' && is_array($runtimeArch)) { @@ -511,6 +535,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtimeOsMode !== null) { if ('form' === 'form' && is_array($runtimeOsMode)) { @@ -524,6 +550,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($runtimeOs !== null) { if ('form' === 'form' && is_array($runtimeOs)) { @@ -537,6 +565,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($probeVersionMode !== null) { if ('form' === 'form' && is_array($probeVersionMode)) { @@ -550,6 +580,8 @@ private function getApplicationFilterRequest( } } + + // query params if ($probeVersion !== null) { if ('form' === 'form' && is_array($probeVersion)) { @@ -563,6 +595,8 @@ private function getApplicationFilterRequest( } } + + // path params if ($projectId !== null) { @@ -591,6 +625,7 @@ private function getApplicationFilterRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -950,6 +985,7 @@ private function getApplicationMergeRequest( ?int $probeVersionMode = null, ?array $probeVersion = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -958,6 +994,8 @@ private function getApplicationMergeRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.getApplicationMerge, @@ -973,6 +1011,8 @@ private function getApplicationMergeRequest( ); } + + if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.getApplicationMerge, @@ -988,6 +1028,8 @@ private function getApplicationMergeRequest( ); } + + if (!preg_match("/.+/", $app)) { throw new InvalidArgumentException( "invalid value for \"app\" when calling ContinuousProfilingApi.getApplicationMerge, @@ -995,6 +1037,7 @@ private function getApplicationMergeRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/merge'; $formParams = []; $queryParams = []; @@ -1015,6 +1058,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1028,6 +1073,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($profileType !== null) { if ('form' === 'form' && is_array($profileType)) { @@ -1041,6 +1088,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($out !== null) { if ('form' === 'form' && is_array($out)) { @@ -1054,6 +1103,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtimeMode !== null) { if ('form' === 'form' && is_array($runtimeMode)) { @@ -1067,6 +1118,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtime !== null) { if ('form' === 'form' && is_array($runtime)) { @@ -1080,6 +1133,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtimeVersionMode !== null) { if ('form' === 'form' && is_array($runtimeVersionMode)) { @@ -1093,6 +1148,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtimeVersion !== null) { if ('form' === 'form' && is_array($runtimeVersion)) { @@ -1106,6 +1163,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtimeArchMode !== null) { if ('form' === 'form' && is_array($runtimeArchMode)) { @@ -1119,6 +1178,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtimeArch !== null) { if ('form' === 'form' && is_array($runtimeArch)) { @@ -1132,6 +1193,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtimeOsMode !== null) { if ('form' === 'form' && is_array($runtimeOsMode)) { @@ -1145,6 +1208,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($runtimeOs !== null) { if ('form' === 'form' && is_array($runtimeOs)) { @@ -1158,6 +1223,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($probeVersionMode !== null) { if ('form' === 'form' && is_array($probeVersionMode)) { @@ -1171,6 +1238,8 @@ private function getApplicationMergeRequest( } } + + // query params if ($probeVersion !== null) { if ('form' === 'form' && is_array($probeVersion)) { @@ -1184,6 +1253,8 @@ private function getApplicationMergeRequest( } } + + // path params if ($projectId !== null) { @@ -1212,6 +1283,7 @@ private function getApplicationMergeRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/octet-stream', 'text/vnd.graphviz', 'application/json'], '', @@ -1563,6 +1635,7 @@ private function getApplicationTimelineRequest( ?int $probeVersionMode = null, ?array $probeVersion = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1571,6 +1644,8 @@ private function getApplicationTimelineRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.getApplicationTimeline, @@ -1586,6 +1661,8 @@ private function getApplicationTimelineRequest( ); } + + if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.getApplicationTimeline, @@ -1601,6 +1678,8 @@ private function getApplicationTimelineRequest( ); } + + if (!preg_match("/.+/", $app)) { throw new InvalidArgumentException( "invalid value for \"app\" when calling ContinuousProfilingApi.getApplicationTimeline, @@ -1608,6 +1687,7 @@ private function getApplicationTimelineRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}'; $formParams = []; $queryParams = []; @@ -1628,6 +1708,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1641,6 +1723,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($profileType !== null) { if ('form' === 'form' && is_array($profileType)) { @@ -1654,6 +1738,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtimeMode !== null) { if ('form' === 'form' && is_array($runtimeMode)) { @@ -1667,6 +1753,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtime !== null) { if ('form' === 'form' && is_array($runtime)) { @@ -1680,6 +1768,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtimeVersionMode !== null) { if ('form' === 'form' && is_array($runtimeVersionMode)) { @@ -1693,6 +1783,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtimeVersion !== null) { if ('form' === 'form' && is_array($runtimeVersion)) { @@ -1706,6 +1798,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtimeArchMode !== null) { if ('form' === 'form' && is_array($runtimeArchMode)) { @@ -1719,6 +1813,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtimeArch !== null) { if ('form' === 'form' && is_array($runtimeArch)) { @@ -1732,6 +1828,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtimeOsMode !== null) { if ('form' === 'form' && is_array($runtimeOsMode)) { @@ -1745,6 +1843,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($runtimeOs !== null) { if ('form' === 'form' && is_array($runtimeOs)) { @@ -1758,6 +1858,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($probeVersionMode !== null) { if ('form' === 'form' && is_array($probeVersionMode)) { @@ -1771,6 +1873,8 @@ private function getApplicationTimelineRequest( } } + + // query params if ($probeVersion !== null) { if ('form' === 'form' && is_array($probeVersion)) { @@ -1784,6 +1888,8 @@ private function getApplicationTimelineRequest( } } + + // path params if ($projectId !== null) { @@ -1812,6 +1918,7 @@ private function getApplicationTimelineRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1965,6 +2072,7 @@ private function listApplicationsRequest( ?int $from = null, ?int $to = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1973,6 +2081,8 @@ private function listApplicationsRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.listApplications, @@ -1988,6 +2098,8 @@ private function listApplicationsRequest( ); } + + if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.listApplications, @@ -1995,6 +2107,7 @@ private function listApplicationsRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling'; $formParams = []; $queryParams = []; @@ -2015,6 +2128,8 @@ private function listApplicationsRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -2028,6 +2143,8 @@ private function listApplicationsRequest( } } + + // path params if ($projectId !== null) { @@ -2047,6 +2164,7 @@ private function listApplicationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/DefaultApi.php b/src/Api/DefaultApi.php index 06c493c61..12d22e85c 100644 --- a/src/Api/DefaultApi.php +++ b/src/Api/DefaultApi.php @@ -13,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\DateTimeFilter; -use Upsun\Model\ListTickets200Response; -use Upsun\Model\OrganizationCarbon; /** * Low level DefaultApi (auto-generated) @@ -28,13 +25,13 @@ final class DefaultApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -57,9 +54,9 @@ public function __construct( * * @param int|null $filterTicketId * The ID of the ticket. (optional) - * @param DateTime|null $filterCreated + * @param \DateTime|null $filterCreated * ISO dateformat expected. The time when the support ticket was created. (optional) - * @param DateTime|null $filterUpdated + * @param \DateTime|null $filterUpdated * ISO dateformat expected. The time when the support ticket was updated. (optional) * @param string|null $filterType * The type of the support ticket. (optional) @@ -75,7 +72,7 @@ public function __construct( * UUID of the ticket assignee. Converted from the ZID value. (optional) * @param bool|null $filterHasIncidents * Whether or not this ticket has incidents. (optional) - * @param DateTime|null $filterDue + * @param \DateTime|null $filterDue * ISO dateformat expected. A time that the ticket is due at. (optional) * @param string|null $search (optional) * @param int|null $page @@ -87,8 +84,8 @@ public function __construct( */ public function listTickets( ?int $filterTicketId = null, - ?DateTime $filterCreated = null, - ?DateTime $filterUpdated = null, + ?\DateTime $filterCreated = null, + ?\DateTime $filterUpdated = null, ?string $filterType = null, ?string $filterPriority = null, ?string $filterStatus = null, @@ -96,10 +93,10 @@ public function listTickets( ?string $filterSubmitterId = null, ?string $filterAssigneeId = null, ?bool $filterHasIncidents = null, - ?DateTime $filterDue = null, + ?\DateTime $filterDue = null, ?string $search = null, ?int $page = null - ): ListTickets200Response { + ): \Upsun\Model\ListTickets200Response { return $this->listTicketsWithHttpInfo( $filterTicketId, $filterCreated, @@ -122,9 +119,9 @@ public function listTickets( * * @param int|null $filterTicketId * The ID of the ticket. (optional) - * @param DateTime|null $filterCreated + * @param \DateTime|null $filterCreated * ISO dateformat expected. The time when the support ticket was created. (optional) - * @param DateTime|null $filterUpdated + * @param \DateTime|null $filterUpdated * ISO dateformat expected. The time when the support ticket was updated. (optional) * @param string|null $filterType * The type of the support ticket. (optional) @@ -140,7 +137,7 @@ public function listTickets( * UUID of the ticket assignee. Converted from the ZID value. (optional) * @param bool|null $filterHasIncidents * Whether or not this ticket has incidents. (optional) - * @param DateTime|null $filterDue + * @param \DateTime|null $filterDue * ISO dateformat expected. A time that the ticket is due at. (optional) * @param string|null $search (optional) * @param int|null $page @@ -151,8 +148,8 @@ public function listTickets( */ private function listTicketsWithHttpInfo( ?int $filterTicketId = null, - ?DateTime $filterCreated = null, - ?DateTime $filterUpdated = null, + ?\DateTime $filterCreated = null, + ?\DateTime $filterUpdated = null, ?string $filterType = null, ?string $filterPriority = null, ?string $filterStatus = null, @@ -160,10 +157,10 @@ private function listTicketsWithHttpInfo( ?string $filterSubmitterId = null, ?string $filterAssigneeId = null, ?bool $filterHasIncidents = null, - ?DateTime $filterDue = null, + ?\DateTime $filterDue = null, ?string $search = null, ?int $page = null - ): ListTickets200Response { + ): \Upsun\Model\ListTickets200Response { $request = $this->listTicketsRequest( $filterTicketId, $filterCreated, @@ -212,9 +209,9 @@ private function listTicketsWithHttpInfo( * * @param int|null $filterTicketId * The ID of the ticket. (optional) - * @param DateTime|null $filterCreated + * @param \DateTime|null $filterCreated * ISO dateformat expected. The time when the support ticket was created. (optional) - * @param DateTime|null $filterUpdated + * @param \DateTime|null $filterUpdated * ISO dateformat expected. The time when the support ticket was updated. (optional) * @param string|null $filterType * The type of the support ticket. (optional) @@ -230,7 +227,7 @@ private function listTicketsWithHttpInfo( * UUID of the ticket assignee. Converted from the ZID value. (optional) * @param bool|null $filterHasIncidents * Whether or not this ticket has incidents. (optional) - * @param DateTime|null $filterDue + * @param \DateTime|null $filterDue * ISO dateformat expected. A time that the ticket is due at. (optional) * @param string|null $search (optional) * @param int|null $page @@ -240,8 +237,8 @@ private function listTicketsWithHttpInfo( */ private function listTicketsRequest( ?int $filterTicketId = null, - ?DateTime $filterCreated = null, - ?DateTime $filterUpdated = null, + ?\DateTime $filterCreated = null, + ?\DateTime $filterUpdated = null, ?string $filterType = null, ?string $filterPriority = null, ?string $filterStatus = null, @@ -249,10 +246,12 @@ private function listTicketsRequest( ?string $filterSubmitterId = null, ?string $filterAssigneeId = null, ?bool $filterHasIncidents = null, - ?DateTime $filterDue = null, + ?\DateTime $filterDue = null, ?string $search = null, ?int $page = null ): RequestInterface { + + $resourcePath = '/tickets'; $formParams = []; $queryParams = []; @@ -273,6 +272,8 @@ private function listTicketsRequest( } } + + // query params if ($filterCreated !== null) { if ('form' === 'form' && is_array($filterCreated)) { @@ -286,6 +287,8 @@ private function listTicketsRequest( } } + + // query params if ($filterUpdated !== null) { if ('form' === 'form' && is_array($filterUpdated)) { @@ -299,6 +302,8 @@ private function listTicketsRequest( } } + + // query params if ($filterType !== null) { if ('form' === 'form' && is_array($filterType)) { @@ -312,6 +317,8 @@ private function listTicketsRequest( } } + + // query params if ($filterPriority !== null) { if ('form' === 'form' && is_array($filterPriority)) { @@ -325,6 +332,8 @@ private function listTicketsRequest( } } + + // query params if ($filterStatus !== null) { if ('form' === 'form' && is_array($filterStatus)) { @@ -338,6 +347,8 @@ private function listTicketsRequest( } } + + // query params if ($filterRequesterId !== null) { if ('form' === 'form' && is_array($filterRequesterId)) { @@ -351,6 +362,8 @@ private function listTicketsRequest( } } + + // query params if ($filterSubmitterId !== null) { if ('form' === 'form' && is_array($filterSubmitterId)) { @@ -364,6 +377,8 @@ private function listTicketsRequest( } } + + // query params if ($filterAssigneeId !== null) { if ('form' === 'form' && is_array($filterAssigneeId)) { @@ -377,6 +392,8 @@ private function listTicketsRequest( } } + + // query params if ($filterHasIncidents !== null) { if ('form' === 'form' && is_array($filterHasIncidents)) { @@ -390,6 +407,8 @@ private function listTicketsRequest( } } + + // query params if ($filterDue !== null) { if ('form' === 'form' && is_array($filterDue)) { @@ -403,6 +422,8 @@ private function listTicketsRequest( } } + + // query params if ($search !== null) { if ('form' === 'form' && is_array($search)) { @@ -416,6 +437,8 @@ private function listTicketsRequest( } } + + // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -429,6 +452,10 @@ private function listTicketsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -506,10 +533,10 @@ private function listTicketsRequest( */ public function queryOrganiationCarbon( string $organizationId, - ?DateTimeFilter $from = null, - ?DateTimeFilter $to = null, + ?\Upsun\Model\DateTimeFilter $from = null, + ?\Upsun\Model\DateTimeFilter $to = null, ?string $interval = null - ): OrganizationCarbon { + ): \Upsun\Model\OrganizationCarbon { return $this->queryOrganiationCarbonWithHttpInfo( $organizationId, $from, @@ -536,10 +563,10 @@ public function queryOrganiationCarbon( */ private function queryOrganiationCarbonWithHttpInfo( string $organizationId, - ?DateTimeFilter $from = null, - ?DateTimeFilter $to = null, + ?\Upsun\Model\DateTimeFilter $from = null, + ?\Upsun\Model\DateTimeFilter $to = null, ?string $interval = null - ): OrganizationCarbon { + ): \Upsun\Model\OrganizationCarbon { $request = $this->queryOrganiationCarbonRequest( $organizationId, $from, @@ -591,10 +618,11 @@ private function queryOrganiationCarbonWithHttpInfo( */ private function queryOrganiationCarbonRequest( string $organizationId, - ?DateTimeFilter $from = null, - ?DateTimeFilter $to = null, + ?\Upsun\Model\DateTimeFilter $from = null, + ?\Upsun\Model\DateTimeFilter $to = null, ?string $interval = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -623,6 +651,8 @@ private function queryOrganiationCarbonRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -636,6 +666,8 @@ private function queryOrganiationCarbonRequest( } } + + // query params if ($interval !== null) { if ('form' === 'form' && is_array($interval)) { @@ -649,6 +681,8 @@ private function queryOrganiationCarbonRequest( } } + + // path params if ($organizationId !== null) { @@ -659,6 +693,7 @@ private function queryOrganiationCarbonRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/DeploymentApi.php b/src/Api/DeploymentApi.php index 753a707d7..28d8f6b4a 100644 --- a/src/Api/DeploymentApi.php +++ b/src/Api/DeploymentApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Deployment; -use Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest; /** * Low level DeploymentApi (auto-generated) @@ -27,13 +25,13 @@ final class DeploymentApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -65,7 +63,7 @@ public function getProjectsEnvironmentsDeployments( string $projectId, string $environmentId, string $deploymentId - ): Deployment { + ): \Upsun\Model\Deployment { return $this->getProjectsEnvironmentsDeploymentsWithHttpInfo( $projectId, $environmentId, @@ -84,7 +82,7 @@ private function getProjectsEnvironmentsDeploymentsWithHttpInfo( string $projectId, string $environmentId, string $deploymentId - ): Deployment { + ): \Upsun\Model\Deployment { $request = $this->getProjectsEnvironmentsDeploymentsRequest( $projectId, $environmentId, @@ -129,6 +127,7 @@ private function getProjectsEnvironmentsDeploymentsRequest( string $environmentId, string $deploymentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -186,6 +185,7 @@ private function getProjectsEnvironmentsDeploymentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -324,6 +324,7 @@ private function listProjectsEnvironmentsDeploymentsRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -365,6 +366,7 @@ private function listProjectsEnvironmentsDeploymentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -434,8 +436,8 @@ private function listProjectsEnvironmentsDeploymentsRequest( public function updateProjectsEnvironmentsDeploymentsNext( string $projectId, string $environmentId, - UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest - ): AcceptedResponse { + \Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsEnvironmentsDeploymentsNextWithHttpInfo( $projectId, $environmentId, @@ -453,8 +455,8 @@ public function updateProjectsEnvironmentsDeploymentsNext( private function updateProjectsEnvironmentsDeploymentsNextWithHttpInfo( string $projectId, string $environmentId, - UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest - ): AcceptedResponse { + \Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsEnvironmentsDeploymentsNextRequest( $projectId, $environmentId, @@ -497,8 +499,9 @@ private function updateProjectsEnvironmentsDeploymentsNextWithHttpInfo( private function updateProjectsEnvironmentsDeploymentsNextRequest( string $projectId, string $environmentId, - UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest + \Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -547,6 +550,7 @@ private function updateProjectsEnvironmentsDeploymentsNextRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/DeploymentTargetApi.php b/src/Api/DeploymentTargetApi.php index 71c5f3276..cda22a7e4 100644 --- a/src/Api/DeploymentTargetApi.php +++ b/src/Api/DeploymentTargetApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\DeploymentTarget; -use Upsun\Model\DeploymentTargetCreateInput; -use Upsun\Model\DeploymentTargetPatch; /** * Low level DeploymentTargetApi (auto-generated) @@ -28,13 +25,13 @@ final class DeploymentTargetApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -64,8 +61,8 @@ public function __construct( */ public function createProjectsDeployments( string $projectId, - DeploymentTargetCreateInput $deploymentTargetCreateInput - ): AcceptedResponse { + \Upsun\Model\DeploymentTargetCreateInput $deploymentTargetCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetCreateInput @@ -82,8 +79,8 @@ public function createProjectsDeployments( */ private function createProjectsDeploymentsWithHttpInfo( string $projectId, - DeploymentTargetCreateInput $deploymentTargetCreateInput - ): AcceptedResponse { + \Upsun\Model\DeploymentTargetCreateInput $deploymentTargetCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsDeploymentsRequest( $projectId, $deploymentTargetCreateInput @@ -125,8 +122,9 @@ private function createProjectsDeploymentsWithHttpInfo( */ private function createProjectsDeploymentsRequest( string $projectId, - DeploymentTargetCreateInput $deploymentTargetCreateInput + \Upsun\Model\DeploymentTargetCreateInput $deploymentTargetCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -159,6 +157,7 @@ private function createProjectsDeploymentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -236,7 +235,7 @@ private function createProjectsDeploymentsRequest( public function deleteProjectsDeployments( string $projectId, string $deploymentTargetConfigurationId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetConfigurationId @@ -253,7 +252,7 @@ public function deleteProjectsDeployments( private function deleteProjectsDeploymentsWithHttpInfo( string $projectId, string $deploymentTargetConfigurationId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsDeploymentsRequest( $projectId, $deploymentTargetConfigurationId @@ -296,6 +295,7 @@ private function deleteProjectsDeploymentsRequest( string $projectId, string $deploymentTargetConfigurationId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -337,6 +337,7 @@ private function deleteProjectsDeploymentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -406,7 +407,7 @@ private function deleteProjectsDeploymentsRequest( public function getProjectsDeployments( string $projectId, string $deploymentTargetConfigurationId - ): DeploymentTarget { + ): \Upsun\Model\DeploymentTarget { return $this->getProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetConfigurationId @@ -423,7 +424,7 @@ public function getProjectsDeployments( private function getProjectsDeploymentsWithHttpInfo( string $projectId, string $deploymentTargetConfigurationId - ): DeploymentTarget { + ): \Upsun\Model\DeploymentTarget { $request = $this->getProjectsDeploymentsRequest( $projectId, $deploymentTargetConfigurationId @@ -466,6 +467,7 @@ private function getProjectsDeploymentsRequest( string $projectId, string $deploymentTargetConfigurationId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -507,6 +509,7 @@ private function getProjectsDeploymentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -635,6 +638,7 @@ private function listProjectsDeploymentsWithHttpInfo( private function listProjectsDeploymentsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -660,6 +664,7 @@ private function listProjectsDeploymentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -729,8 +734,8 @@ private function listProjectsDeploymentsRequest( public function updateProjectsDeployments( string $projectId, string $deploymentTargetConfigurationId, - DeploymentTargetPatch $deploymentTargetPatch - ): AcceptedResponse { + \Upsun\Model\DeploymentTargetPatch $deploymentTargetPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetConfigurationId, @@ -749,8 +754,8 @@ public function updateProjectsDeployments( private function updateProjectsDeploymentsWithHttpInfo( string $projectId, string $deploymentTargetConfigurationId, - DeploymentTargetPatch $deploymentTargetPatch - ): AcceptedResponse { + \Upsun\Model\DeploymentTargetPatch $deploymentTargetPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsDeploymentsRequest( $projectId, $deploymentTargetConfigurationId, @@ -794,8 +799,9 @@ private function updateProjectsDeploymentsWithHttpInfo( private function updateProjectsDeploymentsRequest( string $projectId, string $deploymentTargetConfigurationId, - DeploymentTargetPatch $deploymentTargetPatch + \Upsun\Model\DeploymentTargetPatch $deploymentTargetPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -844,6 +850,7 @@ private function updateProjectsDeploymentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/DiffApi.php b/src/Api/DiffApi.php index 8dbd7bb29..3e35a73ce 100644 --- a/src/Api/DiffApi.php +++ b/src/Api/DiffApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -24,13 +25,13 @@ final class DiffApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -42,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -125,6 +126,7 @@ private function listProjectsGitDiffsRequest( string $diffBaseId, string $diffTargetId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -182,6 +184,7 @@ private function listProjectsGitDiffsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/DiscountsApi.php b/src/Api/DiscountsApi.php index a48b7c533..c48c6b123 100644 --- a/src/Api/DiscountsApi.php +++ b/src/Api/DiscountsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Discount; -use Upsun\Model\GetTypeAllowance200Response; -use Upsun\Model\ListOrgDiscounts200Response; /** * Low level DiscountsApi (auto-generated) @@ -27,13 +25,13 @@ final class DiscountsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -63,7 +61,7 @@ public function __construct( */ public function getDiscount( string $id - ): Discount { + ): \Upsun\Model\Discount { return $this->getDiscountWithHttpInfo( $id ); @@ -80,7 +78,7 @@ public function getDiscount( */ private function getDiscountWithHttpInfo( string $id - ): Discount { + ): \Upsun\Model\Discount { $request = $this->getDiscountRequest( $id ); @@ -123,6 +121,7 @@ private function getDiscountWithHttpInfo( private function getDiscountRequest( string $id ): RequestInterface { + // verify the required parameter 'id' is set if (empty($id)) { throw new InvalidArgumentException( @@ -148,6 +147,7 @@ private function getDiscountRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -212,7 +212,8 @@ private function getDiscountRequest( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Discounts/operation/get-type-allowance */ - public function getTypeAllowance(): GetTypeAllowance200Response + public function getTypeAllowance( + ): \Upsun\Model\GetTypeAllowance200Response { return $this->getTypeAllowanceWithHttpInfo( ); @@ -224,7 +225,8 @@ public function getTypeAllowance(): GetTypeAllowance200Response * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getTypeAllowanceWithHttpInfo(): GetTypeAllowance200Response + private function getTypeAllowanceWithHttpInfo( + ): \Upsun\Model\GetTypeAllowance200Response { $request = $this->getTypeAllowanceRequest( ); @@ -261,8 +263,10 @@ private function getTypeAllowanceWithHttpInfo(): GetTypeAllowance200Response * * @throws InvalidArgumentException */ - private function getTypeAllowanceRequest(): RequestInterface - { + private function getTypeAllowanceRequest( + ): RequestInterface { + + $resourcePath = '/discounts/types/allowance'; $formParams = []; $queryParams = []; @@ -270,6 +274,8 @@ private function getTypeAllowanceRequest(): RequestInterface $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -341,7 +347,7 @@ private function getTypeAllowanceRequest(): RequestInterface */ public function listOrgDiscounts( string $organizationId - ): ListOrgDiscounts200Response { + ): \Upsun\Model\ListOrgDiscounts200Response { return $this->listOrgDiscountsWithHttpInfo( $organizationId ); @@ -359,7 +365,7 @@ public function listOrgDiscounts( */ private function listOrgDiscountsWithHttpInfo( string $organizationId - ): ListOrgDiscounts200Response { + ): \Upsun\Model\ListOrgDiscounts200Response { $request = $this->listOrgDiscountsRequest( $organizationId ); @@ -403,6 +409,7 @@ private function listOrgDiscountsWithHttpInfo( private function listOrgDiscountsRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -428,6 +435,7 @@ private function listOrgDiscountsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/DomainClaimApi.php b/src/Api/DomainClaimApi.php index 5ceb267ff..01cc1db61 100644 --- a/src/Api/DomainClaimApi.php +++ b/src/Api/DomainClaimApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\DomainClaim; /** * Low level DomainClaimApi (auto-generated) @@ -26,13 +25,13 @@ final class DomainClaimApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -60,7 +59,7 @@ public function __construct( public function createProjectsDomainClaims( string $projectId, object $body - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsDomainClaimsWithHttpInfo( $projectId, $body @@ -77,7 +76,7 @@ public function createProjectsDomainClaims( private function createProjectsDomainClaimsWithHttpInfo( string $projectId, object $body - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsDomainClaimsRequest( $projectId, $body @@ -121,6 +120,7 @@ private function createProjectsDomainClaimsRequest( string $projectId, object $body ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -153,6 +153,7 @@ private function createProjectsDomainClaimsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -227,7 +228,7 @@ private function createProjectsDomainClaimsRequest( public function deleteProjectsDomainClaims( string $projectId, string $domainClaimId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsDomainClaimsWithHttpInfo( $projectId, $domainClaimId @@ -243,7 +244,7 @@ public function deleteProjectsDomainClaims( private function deleteProjectsDomainClaimsWithHttpInfo( string $projectId, string $domainClaimId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsDomainClaimsRequest( $projectId, $domainClaimId @@ -286,6 +287,7 @@ private function deleteProjectsDomainClaimsRequest( string $projectId, string $domainClaimId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -327,6 +329,7 @@ private function deleteProjectsDomainClaimsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -393,7 +396,7 @@ private function deleteProjectsDomainClaimsRequest( public function getProjectsDomainClaims( string $projectId, string $domainClaimId - ): DomainClaim { + ): \Upsun\Model\DomainClaim { return $this->getProjectsDomainClaimsWithHttpInfo( $projectId, $domainClaimId @@ -409,7 +412,7 @@ public function getProjectsDomainClaims( private function getProjectsDomainClaimsWithHttpInfo( string $projectId, string $domainClaimId - ): DomainClaim { + ): \Upsun\Model\DomainClaim { $request = $this->getProjectsDomainClaimsRequest( $projectId, $domainClaimId @@ -452,6 +455,7 @@ private function getProjectsDomainClaimsRequest( string $projectId, string $domainClaimId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -493,6 +497,7 @@ private function getProjectsDomainClaimsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -617,6 +622,7 @@ private function listProjectsDomainClaimsWithHttpInfo( private function listProjectsDomainClaimsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -642,6 +648,7 @@ private function listProjectsDomainClaimsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -710,7 +717,7 @@ public function updateProjectsDomainClaims( string $projectId, string $domainClaimId, object $body - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsDomainClaimsWithHttpInfo( $projectId, $domainClaimId, @@ -729,7 +736,7 @@ private function updateProjectsDomainClaimsWithHttpInfo( string $projectId, string $domainClaimId, object $body - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsDomainClaimsRequest( $projectId, $domainClaimId, @@ -775,6 +782,7 @@ private function updateProjectsDomainClaimsRequest( string $domainClaimId, object $body ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -823,6 +831,7 @@ private function updateProjectsDomainClaimsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/DomainManagementApi.php b/src/Api/DomainManagementApi.php index 92d33219c..5b533bcfb 100644 --- a/src/Api/DomainManagementApi.php +++ b/src/Api/DomainManagementApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Domain; -use Upsun\Model\DomainCreateInput; -use Upsun\Model\DomainPatch; /** * Low level DomainManagementApi (auto-generated) @@ -28,13 +25,13 @@ final class DomainManagementApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -66,8 +63,8 @@ public function __construct( */ public function createProjectsDomains( string $projectId, - DomainCreateInput $domainCreateInput - ): AcceptedResponse { + \Upsun\Model\DomainCreateInput $domainCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsDomainsWithHttpInfo( $projectId, $domainCreateInput @@ -84,8 +81,8 @@ public function createProjectsDomains( */ private function createProjectsDomainsWithHttpInfo( string $projectId, - DomainCreateInput $domainCreateInput - ): AcceptedResponse { + \Upsun\Model\DomainCreateInput $domainCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsDomainsRequest( $projectId, $domainCreateInput @@ -127,8 +124,9 @@ private function createProjectsDomainsWithHttpInfo( */ private function createProjectsDomainsRequest( string $projectId, - DomainCreateInput $domainCreateInput + \Upsun\Model\DomainCreateInput $domainCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -161,6 +159,7 @@ private function createProjectsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -242,8 +241,8 @@ private function createProjectsDomainsRequest( public function createProjectsEnvironmentsDomains( string $projectId, string $environmentId, - DomainCreateInput $domainCreateInput - ): AcceptedResponse { + \Upsun\Model\DomainCreateInput $domainCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -262,8 +261,8 @@ public function createProjectsEnvironmentsDomains( private function createProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, - DomainCreateInput $domainCreateInput - ): AcceptedResponse { + \Upsun\Model\DomainCreateInput $domainCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -307,8 +306,9 @@ private function createProjectsEnvironmentsDomainsWithHttpInfo( private function createProjectsEnvironmentsDomainsRequest( string $projectId, string $environmentId, - DomainCreateInput $domainCreateInput + \Upsun\Model\DomainCreateInput $domainCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -357,6 +357,7 @@ private function createProjectsEnvironmentsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -434,7 +435,7 @@ private function createProjectsEnvironmentsDomainsRequest( public function deleteProjectsDomains( string $projectId, string $domainId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsDomainsWithHttpInfo( $projectId, $domainId @@ -451,7 +452,7 @@ public function deleteProjectsDomains( private function deleteProjectsDomainsWithHttpInfo( string $projectId, string $domainId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsDomainsRequest( $projectId, $domainId @@ -494,6 +495,7 @@ private function deleteProjectsDomainsRequest( string $projectId, string $domainId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -535,6 +537,7 @@ private function deleteProjectsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -605,7 +608,7 @@ public function deleteProjectsEnvironmentsDomains( string $projectId, string $environmentId, string $domainId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -624,7 +627,7 @@ private function deleteProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, string $domainId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -669,6 +672,7 @@ private function deleteProjectsEnvironmentsDomainsRequest( string $environmentId, string $domainId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -726,6 +730,7 @@ private function deleteProjectsEnvironmentsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -795,7 +800,7 @@ private function deleteProjectsEnvironmentsDomainsRequest( public function getProjectsDomains( string $projectId, string $domainId - ): Domain { + ): \Upsun\Model\Domain { return $this->getProjectsDomainsWithHttpInfo( $projectId, $domainId @@ -812,7 +817,7 @@ public function getProjectsDomains( private function getProjectsDomainsWithHttpInfo( string $projectId, string $domainId - ): Domain { + ): \Upsun\Model\Domain { $request = $this->getProjectsDomainsRequest( $projectId, $domainId @@ -855,6 +860,7 @@ private function getProjectsDomainsRequest( string $projectId, string $domainId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -896,6 +902,7 @@ private function getProjectsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -966,7 +973,7 @@ public function getProjectsEnvironmentsDomains( string $projectId, string $environmentId, string $domainId - ): Domain { + ): \Upsun\Model\Domain { return $this->getProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -985,7 +992,7 @@ private function getProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, string $domainId - ): Domain { + ): \Upsun\Model\Domain { $request = $this->getProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -1030,6 +1037,7 @@ private function getProjectsEnvironmentsDomainsRequest( string $environmentId, string $domainId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1087,6 +1095,7 @@ private function getProjectsEnvironmentsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1217,6 +1226,7 @@ private function listProjectsDomainsWithHttpInfo( private function listProjectsDomainsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1242,6 +1252,7 @@ private function listProjectsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1376,6 +1387,7 @@ private function listProjectsEnvironmentsDomainsRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1417,6 +1429,7 @@ private function listProjectsEnvironmentsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1487,8 +1500,8 @@ private function listProjectsEnvironmentsDomainsRequest( public function updateProjectsDomains( string $projectId, string $domainId, - DomainPatch $domainPatch - ): AcceptedResponse { + \Upsun\Model\DomainPatch $domainPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsDomainsWithHttpInfo( $projectId, $domainId, @@ -1507,8 +1520,8 @@ public function updateProjectsDomains( private function updateProjectsDomainsWithHttpInfo( string $projectId, string $domainId, - DomainPatch $domainPatch - ): AcceptedResponse { + \Upsun\Model\DomainPatch $domainPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsDomainsRequest( $projectId, $domainId, @@ -1552,8 +1565,9 @@ private function updateProjectsDomainsWithHttpInfo( private function updateProjectsDomainsRequest( string $projectId, string $domainId, - DomainPatch $domainPatch + \Upsun\Model\DomainPatch $domainPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1602,6 +1616,7 @@ private function updateProjectsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1681,8 +1696,8 @@ public function updateProjectsEnvironmentsDomains( string $projectId, string $environmentId, string $domainId, - DomainPatch $domainPatch - ): AcceptedResponse { + \Upsun\Model\DomainPatch $domainPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -1703,8 +1718,8 @@ private function updateProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, string $domainId, - DomainPatch $domainPatch - ): AcceptedResponse { + \Upsun\Model\DomainPatch $domainPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -1750,8 +1765,9 @@ private function updateProjectsEnvironmentsDomainsRequest( string $projectId, string $environmentId, string $domainId, - DomainPatch $domainPatch + \Upsun\Model\DomainPatch $domainPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1816,6 +1832,7 @@ private function updateProjectsEnvironmentsDomainsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/EntrypointApi.php b/src/Api/EntrypointApi.php index 63146f454..9787d46b2 100644 --- a/src/Api/EntrypointApi.php +++ b/src/Api/EntrypointApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -24,13 +25,13 @@ final class EntrypointApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -42,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -129,6 +130,7 @@ private function observabilityEntrypointRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -137,6 +139,8 @@ private function observabilityEntrypointRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling EntrypointApi.observabilityEntrypoint, @@ -152,6 +156,8 @@ private function observabilityEntrypointRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling EntrypointApi.observabilityEntrypoint, @@ -159,6 +165,7 @@ private function observabilityEntrypointRequest( ); } + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability'; $formParams = []; $queryParams = []; @@ -185,6 +192,7 @@ private function observabilityEntrypointRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/EnvironmentActivityApi.php b/src/Api/EnvironmentActivityApi.php index 198d0fd91..fcc320abe 100644 --- a/src/Api/EnvironmentActivityApi.php +++ b/src/Api/EnvironmentActivityApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Activity; /** * Low level EnvironmentActivityApi (auto-generated) @@ -26,13 +25,13 @@ final class EnvironmentActivityApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -65,7 +64,7 @@ public function actionProjectsEnvironmentsActivitiesCancel( string $projectId, string $environmentId, string $activityId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->actionProjectsEnvironmentsActivitiesCancelWithHttpInfo( $projectId, $environmentId, @@ -84,7 +83,7 @@ private function actionProjectsEnvironmentsActivitiesCancelWithHttpInfo( string $projectId, string $environmentId, string $activityId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->actionProjectsEnvironmentsActivitiesCancelRequest( $projectId, $environmentId, @@ -129,6 +128,7 @@ private function actionProjectsEnvironmentsActivitiesCancelRequest( string $environmentId, string $activityId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -186,6 +186,7 @@ private function actionProjectsEnvironmentsActivitiesCancelRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -259,7 +260,7 @@ public function getProjectsEnvironmentsActivities( string $projectId, string $environmentId, string $activityId - ): Activity { + ): \Upsun\Model\Activity { return $this->getProjectsEnvironmentsActivitiesWithHttpInfo( $projectId, $environmentId, @@ -278,7 +279,7 @@ private function getProjectsEnvironmentsActivitiesWithHttpInfo( string $projectId, string $environmentId, string $activityId - ): Activity { + ): \Upsun\Model\Activity { $request = $this->getProjectsEnvironmentsActivitiesRequest( $projectId, $environmentId, @@ -323,6 +324,7 @@ private function getProjectsEnvironmentsActivitiesRequest( string $environmentId, string $activityId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -380,6 +382,7 @@ private function getProjectsEnvironmentsActivitiesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -521,6 +524,7 @@ private function listProjectsEnvironmentsActivitiesRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -562,6 +566,7 @@ private function listProjectsEnvironmentsActivitiesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/EnvironmentApi.php b/src/Api/EnvironmentApi.php index 55e56cb52..430f96f41 100644 --- a/src/Api/EnvironmentApi.php +++ b/src/Api/EnvironmentApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,15 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Environment; -use Upsun\Model\EnvironmentActivateInput; -use Upsun\Model\EnvironmentBranchInput; -use Upsun\Model\EnvironmentDeployInput; -use Upsun\Model\EnvironmentInitializeInput; -use Upsun\Model\EnvironmentMergeInput; -use Upsun\Model\EnvironmentPatch; -use Upsun\Model\EnvironmentSynchronizeInput; /** * Low level EnvironmentApi (auto-generated) @@ -33,13 +25,13 @@ final class EnvironmentApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -51,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -70,8 +62,8 @@ public function __construct( public function activateEnvironment( string $projectId, string $environmentId, - EnvironmentActivateInput $environmentActivateInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentActivateInput $environmentActivateInput + ): \Upsun\Model\AcceptedResponse { return $this->activateEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -90,8 +82,8 @@ public function activateEnvironment( private function activateEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentActivateInput $environmentActivateInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentActivateInput $environmentActivateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->activateEnvironmentRequest( $projectId, $environmentId, @@ -135,8 +127,9 @@ private function activateEnvironmentWithHttpInfo( private function activateEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentActivateInput $environmentActivateInput + \Upsun\Model\EnvironmentActivateInput $environmentActivateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -185,6 +178,7 @@ private function activateEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -263,8 +257,8 @@ private function activateEnvironmentRequest( public function branchEnvironment( string $projectId, string $environmentId, - EnvironmentBranchInput $environmentBranchInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentBranchInput $environmentBranchInput + ): \Upsun\Model\AcceptedResponse { return $this->branchEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -283,8 +277,8 @@ public function branchEnvironment( private function branchEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentBranchInput $environmentBranchInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentBranchInput $environmentBranchInput + ): \Upsun\Model\AcceptedResponse { $request = $this->branchEnvironmentRequest( $projectId, $environmentId, @@ -328,8 +322,9 @@ private function branchEnvironmentWithHttpInfo( private function branchEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentBranchInput $environmentBranchInput + \Upsun\Model\EnvironmentBranchInput $environmentBranchInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -378,6 +373,7 @@ private function branchEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -457,7 +453,7 @@ private function branchEnvironmentRequest( public function deactivateEnvironment( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deactivateEnvironmentWithHttpInfo( $projectId, $environmentId @@ -474,7 +470,7 @@ public function deactivateEnvironment( private function deactivateEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deactivateEnvironmentRequest( $projectId, $environmentId @@ -517,6 +513,7 @@ private function deactivateEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -558,6 +555,7 @@ private function deactivateEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -627,7 +625,7 @@ private function deactivateEnvironmentRequest( public function deleteEnvironment( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteEnvironmentWithHttpInfo( $projectId, $environmentId @@ -644,7 +642,7 @@ public function deleteEnvironment( private function deleteEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteEnvironmentRequest( $projectId, $environmentId @@ -687,6 +685,7 @@ private function deleteEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -728,6 +727,7 @@ private function deleteEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -800,8 +800,8 @@ private function deleteEnvironmentRequest( public function deployEnvironment( string $projectId, string $environmentId, - EnvironmentDeployInput $environmentDeployInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentDeployInput $environmentDeployInput + ): \Upsun\Model\AcceptedResponse { return $this->deployEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -820,8 +820,8 @@ public function deployEnvironment( private function deployEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentDeployInput $environmentDeployInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentDeployInput $environmentDeployInput + ): \Upsun\Model\AcceptedResponse { $request = $this->deployEnvironmentRequest( $projectId, $environmentId, @@ -865,8 +865,9 @@ private function deployEnvironmentWithHttpInfo( private function deployEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentDeployInput $environmentDeployInput + \Upsun\Model\EnvironmentDeployInput $environmentDeployInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -915,6 +916,7 @@ private function deployEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -992,7 +994,7 @@ private function deployEnvironmentRequest( public function getEnvironment( string $projectId, string $environmentId - ): Environment { + ): \Upsun\Model\Environment { return $this->getEnvironmentWithHttpInfo( $projectId, $environmentId @@ -1009,7 +1011,7 @@ public function getEnvironment( private function getEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): Environment { + ): \Upsun\Model\Environment { $request = $this->getEnvironmentRequest( $projectId, $environmentId @@ -1052,6 +1054,7 @@ private function getEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1093,6 +1096,7 @@ private function getEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1169,8 +1173,8 @@ private function getEnvironmentRequest( public function initializeEnvironment( string $projectId, string $environmentId, - EnvironmentInitializeInput $environmentInitializeInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentInitializeInput $environmentInitializeInput + ): \Upsun\Model\AcceptedResponse { return $this->initializeEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -1189,8 +1193,8 @@ public function initializeEnvironment( private function initializeEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentInitializeInput $environmentInitializeInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentInitializeInput $environmentInitializeInput + ): \Upsun\Model\AcceptedResponse { $request = $this->initializeEnvironmentRequest( $projectId, $environmentId, @@ -1234,8 +1238,9 @@ private function initializeEnvironmentWithHttpInfo( private function initializeEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentInitializeInput $environmentInitializeInput + \Upsun\Model\EnvironmentInitializeInput $environmentInitializeInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1284,6 +1289,7 @@ private function initializeEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1420,6 +1426,7 @@ private function listProjectsEnvironmentsWithHttpInfo( private function listProjectsEnvironmentsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1445,6 +1452,7 @@ private function listProjectsEnvironmentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1511,7 +1519,7 @@ private function listProjectsEnvironmentsRequest( public function maintenanceRedeployEnvironment( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->maintenanceRedeployEnvironmentWithHttpInfo( $projectId, $environmentId @@ -1527,7 +1535,7 @@ public function maintenanceRedeployEnvironment( private function maintenanceRedeployEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->maintenanceRedeployEnvironmentRequest( $projectId, $environmentId @@ -1570,6 +1578,7 @@ private function maintenanceRedeployEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1611,6 +1620,7 @@ private function maintenanceRedeployEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1683,8 +1693,8 @@ private function maintenanceRedeployEnvironmentRequest( public function mergeEnvironment( string $projectId, string $environmentId, - EnvironmentMergeInput $environmentMergeInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentMergeInput $environmentMergeInput + ): \Upsun\Model\AcceptedResponse { return $this->mergeEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -1703,8 +1713,8 @@ public function mergeEnvironment( private function mergeEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentMergeInput $environmentMergeInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentMergeInput $environmentMergeInput + ): \Upsun\Model\AcceptedResponse { $request = $this->mergeEnvironmentRequest( $projectId, $environmentId, @@ -1748,8 +1758,9 @@ private function mergeEnvironmentWithHttpInfo( private function mergeEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentMergeInput $environmentMergeInput + \Upsun\Model\EnvironmentMergeInput $environmentMergeInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1798,6 +1809,7 @@ private function mergeEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1879,7 +1891,7 @@ private function mergeEnvironmentRequest( public function pauseEnvironment( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->pauseEnvironmentWithHttpInfo( $projectId, $environmentId @@ -1896,7 +1908,7 @@ public function pauseEnvironment( private function pauseEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->pauseEnvironmentRequest( $projectId, $environmentId @@ -1939,6 +1951,7 @@ private function pauseEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1980,6 +1993,7 @@ private function pauseEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2049,7 +2063,7 @@ private function pauseEnvironmentRequest( public function redeployEnvironment( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->redeployEnvironmentWithHttpInfo( $projectId, $environmentId @@ -2066,7 +2080,7 @@ public function redeployEnvironment( private function redeployEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->redeployEnvironmentRequest( $projectId, $environmentId @@ -2109,6 +2123,7 @@ private function redeployEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2150,6 +2165,7 @@ private function redeployEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2222,7 +2238,7 @@ private function redeployEnvironmentRequest( public function resumeEnvironment( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->resumeEnvironmentWithHttpInfo( $projectId, $environmentId @@ -2239,7 +2255,7 @@ public function resumeEnvironment( private function resumeEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->resumeEnvironmentRequest( $projectId, $environmentId @@ -2282,6 +2298,7 @@ private function resumeEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2323,6 +2340,7 @@ private function resumeEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2395,8 +2413,8 @@ private function resumeEnvironmentRequest( public function synchronizeEnvironment( string $projectId, string $environmentId, - EnvironmentSynchronizeInput $environmentSynchronizeInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentSynchronizeInput $environmentSynchronizeInput + ): \Upsun\Model\AcceptedResponse { return $this->synchronizeEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -2415,8 +2433,8 @@ public function synchronizeEnvironment( private function synchronizeEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentSynchronizeInput $environmentSynchronizeInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentSynchronizeInput $environmentSynchronizeInput + ): \Upsun\Model\AcceptedResponse { $request = $this->synchronizeEnvironmentRequest( $projectId, $environmentId, @@ -2460,8 +2478,9 @@ private function synchronizeEnvironmentWithHttpInfo( private function synchronizeEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentSynchronizeInput $environmentSynchronizeInput + \Upsun\Model\EnvironmentSynchronizeInput $environmentSynchronizeInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2510,6 +2529,7 @@ private function synchronizeEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -2588,8 +2608,8 @@ private function synchronizeEnvironmentRequest( public function updateEnvironment( string $projectId, string $environmentId, - EnvironmentPatch $environmentPatch - ): AcceptedResponse { + \Upsun\Model\EnvironmentPatch $environmentPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -2608,8 +2628,8 @@ public function updateEnvironment( private function updateEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentPatch $environmentPatch - ): AcceptedResponse { + \Upsun\Model\EnvironmentPatch $environmentPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateEnvironmentRequest( $projectId, $environmentId, @@ -2653,8 +2673,9 @@ private function updateEnvironmentWithHttpInfo( private function updateEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentPatch $environmentPatch + \Upsun\Model\EnvironmentPatch $environmentPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2703,6 +2724,7 @@ private function updateEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/EnvironmentBackupsApi.php b/src/Api/EnvironmentBackupsApi.php index 7a5c96573..fe3bddd5b 100644 --- a/src/Api/EnvironmentBackupsApi.php +++ b/src/Api/EnvironmentBackupsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Backup; -use Upsun\Model\EnvironmentBackupInput; -use Upsun\Model\EnvironmentRestoreInput; /** * Low level EnvironmentBackupsApi (auto-generated) @@ -28,13 +25,13 @@ final class EnvironmentBackupsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -66,8 +63,8 @@ public function __construct( public function backupEnvironment( string $projectId, string $environmentId, - EnvironmentBackupInput $environmentBackupInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentBackupInput $environmentBackupInput + ): \Upsun\Model\AcceptedResponse { return $this->backupEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -86,8 +83,8 @@ public function backupEnvironment( private function backupEnvironmentWithHttpInfo( string $projectId, string $environmentId, - EnvironmentBackupInput $environmentBackupInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentBackupInput $environmentBackupInput + ): \Upsun\Model\AcceptedResponse { $request = $this->backupEnvironmentRequest( $projectId, $environmentId, @@ -131,8 +128,9 @@ private function backupEnvironmentWithHttpInfo( private function backupEnvironmentRequest( string $projectId, string $environmentId, - EnvironmentBackupInput $environmentBackupInput + \Upsun\Model\EnvironmentBackupInput $environmentBackupInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -181,6 +179,7 @@ private function backupEnvironmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -261,7 +260,7 @@ public function deleteProjectsEnvironmentsBackups( string $projectId, string $environmentId, string $backupId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsEnvironmentsBackupsWithHttpInfo( $projectId, $environmentId, @@ -280,7 +279,7 @@ private function deleteProjectsEnvironmentsBackupsWithHttpInfo( string $projectId, string $environmentId, string $backupId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsEnvironmentsBackupsRequest( $projectId, $environmentId, @@ -325,6 +324,7 @@ private function deleteProjectsEnvironmentsBackupsRequest( string $environmentId, string $backupId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -382,6 +382,7 @@ private function deleteProjectsEnvironmentsBackupsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -455,7 +456,7 @@ public function getProjectsEnvironmentsBackups( string $projectId, string $environmentId, string $backupId - ): Backup { + ): \Upsun\Model\Backup { return $this->getProjectsEnvironmentsBackupsWithHttpInfo( $projectId, $environmentId, @@ -474,7 +475,7 @@ private function getProjectsEnvironmentsBackupsWithHttpInfo( string $projectId, string $environmentId, string $backupId - ): Backup { + ): \Upsun\Model\Backup { $request = $this->getProjectsEnvironmentsBackupsRequest( $projectId, $environmentId, @@ -519,6 +520,7 @@ private function getProjectsEnvironmentsBackupsRequest( string $environmentId, string $backupId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -576,6 +578,7 @@ private function getProjectsEnvironmentsBackupsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -709,6 +712,7 @@ private function listProjectsEnvironmentsBackupsRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -750,6 +754,7 @@ private function listProjectsEnvironmentsBackupsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -823,8 +828,8 @@ public function restoreBackup( string $projectId, string $environmentId, string $backupId, - EnvironmentRestoreInput $environmentRestoreInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentRestoreInput $environmentRestoreInput + ): \Upsun\Model\AcceptedResponse { return $this->restoreBackupWithHttpInfo( $projectId, $environmentId, @@ -845,8 +850,8 @@ private function restoreBackupWithHttpInfo( string $projectId, string $environmentId, string $backupId, - EnvironmentRestoreInput $environmentRestoreInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentRestoreInput $environmentRestoreInput + ): \Upsun\Model\AcceptedResponse { $request = $this->restoreBackupRequest( $projectId, $environmentId, @@ -892,8 +897,9 @@ private function restoreBackupRequest( string $projectId, string $environmentId, string $backupId, - EnvironmentRestoreInput $environmentRestoreInput + \Upsun\Model\EnvironmentRestoreInput $environmentRestoreInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -958,6 +964,7 @@ private function restoreBackupRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/EnvironmentTypeApi.php b/src/Api/EnvironmentTypeApi.php index 68405150e..3e58bdb18 100644 --- a/src/Api/EnvironmentTypeApi.php +++ b/src/Api/EnvironmentTypeApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,7 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\EnvironmentType; /** * Low level EnvironmentTypeApi (auto-generated) @@ -25,13 +25,13 @@ final class EnvironmentTypeApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -61,7 +61,7 @@ public function __construct( public function getEnvironmentType( string $projectId, string $environmentTypeId - ): EnvironmentType { + ): \Upsun\Model\EnvironmentType { return $this->getEnvironmentTypeWithHttpInfo( $projectId, $environmentTypeId @@ -78,7 +78,7 @@ public function getEnvironmentType( private function getEnvironmentTypeWithHttpInfo( string $projectId, string $environmentTypeId - ): EnvironmentType { + ): \Upsun\Model\EnvironmentType { $request = $this->getEnvironmentTypeRequest( $projectId, $environmentTypeId @@ -121,6 +121,7 @@ private function getEnvironmentTypeRequest( string $projectId, string $environmentTypeId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -162,6 +163,7 @@ private function getEnvironmentTypeRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -290,6 +292,7 @@ private function listProjectsEnvironmentTypesWithHttpInfo( private function listProjectsEnvironmentTypesRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -315,6 +318,7 @@ private function listProjectsEnvironmentTypesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/EnvironmentVariablesApi.php b/src/Api/EnvironmentVariablesApi.php index 2f9fb4243..871962139 100644 --- a/src/Api/EnvironmentVariablesApi.php +++ b/src/Api/EnvironmentVariablesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\EnvironmentVariable; -use Upsun\Model\EnvironmentVariableCreateInput; -use Upsun\Model\EnvironmentVariablePatch; /** * Low level EnvironmentVariablesApi (auto-generated) @@ -28,13 +25,13 @@ final class EnvironmentVariablesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -69,8 +66,8 @@ public function __construct( public function createProjectsEnvironmentsVariables( string $projectId, string $environmentId, - EnvironmentVariableCreateInput $environmentVariableCreateInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentVariableCreateInput $environmentVariableCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -89,8 +86,8 @@ public function createProjectsEnvironmentsVariables( private function createProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, - EnvironmentVariableCreateInput $environmentVariableCreateInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentVariableCreateInput $environmentVariableCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -134,8 +131,9 @@ private function createProjectsEnvironmentsVariablesWithHttpInfo( private function createProjectsEnvironmentsVariablesRequest( string $projectId, string $environmentId, - EnvironmentVariableCreateInput $environmentVariableCreateInput + \Upsun\Model\EnvironmentVariableCreateInput $environmentVariableCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -184,6 +182,7 @@ private function createProjectsEnvironmentsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -262,7 +261,7 @@ public function deleteProjectsEnvironmentsVariables( string $projectId, string $environmentId, string $variableId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -281,7 +280,7 @@ private function deleteProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, string $variableId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -326,6 +325,7 @@ private function deleteProjectsEnvironmentsVariablesRequest( string $environmentId, string $variableId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -383,6 +383,7 @@ private function deleteProjectsEnvironmentsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -453,7 +454,7 @@ public function getProjectsEnvironmentsVariables( string $projectId, string $environmentId, string $variableId - ): EnvironmentVariable { + ): \Upsun\Model\EnvironmentVariable { return $this->getProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -472,7 +473,7 @@ private function getProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, string $variableId - ): EnvironmentVariable { + ): \Upsun\Model\EnvironmentVariable { $request = $this->getProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -517,6 +518,7 @@ private function getProjectsEnvironmentsVariablesRequest( string $environmentId, string $variableId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -574,6 +576,7 @@ private function getProjectsEnvironmentsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -707,6 +710,7 @@ private function listProjectsEnvironmentsVariablesRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -748,6 +752,7 @@ private function listProjectsEnvironmentsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -822,8 +827,8 @@ public function updateProjectsEnvironmentsVariables( string $projectId, string $environmentId, string $variableId, - EnvironmentVariablePatch $environmentVariablePatch - ): AcceptedResponse { + \Upsun\Model\EnvironmentVariablePatch $environmentVariablePatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -844,8 +849,8 @@ private function updateProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, string $variableId, - EnvironmentVariablePatch $environmentVariablePatch - ): AcceptedResponse { + \Upsun\Model\EnvironmentVariablePatch $environmentVariablePatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -891,8 +896,9 @@ private function updateProjectsEnvironmentsVariablesRequest( string $projectId, string $environmentId, string $variableId, - EnvironmentVariablePatch $environmentVariablePatch + \Upsun\Model\EnvironmentVariablePatch $environmentVariablePatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -957,6 +963,7 @@ private function updateProjectsEnvironmentsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/GrantsApi.php b/src/Api/GrantsApi.php index fe0ab827a..b0e287db5 100644 --- a/src/Api/GrantsApi.php +++ b/src/Api/GrantsApi.php @@ -13,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ListUserExtendedAccess200Response; -use Upsun\Model\StringFilter; /** * Low level GrantsApi (auto-generated) @@ -27,13 +25,13 @@ final class GrantsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -121,6 +119,7 @@ private function getAccessDocumentWithHttpInfo( private function getAccessDocumentRequest( string $accessId ): RequestInterface { + // verify the required parameter 'accessId' is set if (empty($accessId)) { throw new InvalidArgumentException( @@ -146,6 +145,7 @@ private function getAccessDocumentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -220,10 +220,10 @@ private function getAccessDocumentRequest( */ public function listUserExtendedAccess( string $userId, - ?StringFilter $filterResourceType = null, - ?StringFilter $filterOrganizationId = null, - ?StringFilter $filterPermissions = null - ): ListUserExtendedAccess200Response { + ?\Upsun\Model\StringFilter $filterResourceType = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\StringFilter $filterPermissions = null + ): \Upsun\Model\ListUserExtendedAccess200Response { return $this->listUserExtendedAccessWithHttpInfo( $userId, $filterResourceType, @@ -246,10 +246,10 @@ public function listUserExtendedAccess( */ private function listUserExtendedAccessWithHttpInfo( string $userId, - ?StringFilter $filterResourceType = null, - ?StringFilter $filterOrganizationId = null, - ?StringFilter $filterPermissions = null - ): ListUserExtendedAccess200Response { + ?\Upsun\Model\StringFilter $filterResourceType = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\StringFilter $filterPermissions = null + ): \Upsun\Model\ListUserExtendedAccess200Response { $request = $this->listUserExtendedAccessRequest( $userId, $filterResourceType, @@ -297,10 +297,11 @@ private function listUserExtendedAccessWithHttpInfo( */ private function listUserExtendedAccessRequest( string $userId, - ?StringFilter $filterResourceType = null, - ?StringFilter $filterOrganizationId = null, - ?StringFilter $filterPermissions = null + ?\Upsun\Model\StringFilter $filterResourceType = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\StringFilter $filterPermissions = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -329,6 +330,8 @@ private function listUserExtendedAccessRequest( } } + + // query params if ($filterOrganizationId !== null) { if ('form' === 'deepObject' && is_array($filterOrganizationId)) { @@ -342,6 +345,8 @@ private function listUserExtendedAccessRequest( } } + + // query params if ($filterPermissions !== null) { if ('form' === 'deepObject' && is_array($filterPermissions)) { @@ -355,6 +360,8 @@ private function listUserExtendedAccessRequest( } } + + // path params if ($userId !== null) { @@ -365,6 +372,7 @@ private function listUserExtendedAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/HttpTrafficApi.php b/src/Api/HttpTrafficApi.php index c0229f08b..5a2136788 100644 --- a/src/Api/HttpTrafficApi.php +++ b/src/Api/HttpTrafficApi.php @@ -25,13 +25,13 @@ final class HttpTrafficApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -259,6 +259,7 @@ private function httpMetricsTimelineIpsRequest( ?array $requestDurationSlots = null, ?string $requestDurationSlotsMode = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -267,6 +268,8 @@ private function httpMetricsTimelineIpsRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineIps, @@ -282,6 +285,8 @@ private function httpMetricsTimelineIpsRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineIps, @@ -318,6 +323,8 @@ private function httpMetricsTimelineIpsRequest( ); } + + if ($topHitsCount !== null && $topHitsCount > 15) { throw new InvalidArgumentException( 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineIps, @@ -332,6 +339,8 @@ private function httpMetricsTimelineIpsRequest( ); } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/ips'; $formParams = []; $queryParams = []; @@ -352,6 +361,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -365,6 +376,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -378,6 +391,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($topHitsCount !== null) { if ('form' === 'form' && is_array($topHitsCount)) { @@ -391,6 +406,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -404,6 +421,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -417,6 +436,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -430,6 +451,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -443,6 +466,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($domains !== null) { if ('form' === 'form' && is_array($domains)) { @@ -456,6 +481,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($domainsMode !== null) { if ('form' === 'form' && is_array($domainsMode)) { @@ -469,6 +496,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($codeSlots !== null) { if ('form' === 'form' && is_array($codeSlots)) { @@ -482,6 +511,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($codeSlotsMode !== null) { if ('form' === 'form' && is_array($codeSlotsMode)) { @@ -495,6 +526,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($codes !== null) { if ('form' === 'form' && is_array($codes)) { @@ -508,6 +541,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($codesMode !== null) { if ('form' === 'form' && is_array($codesMode)) { @@ -521,6 +556,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($requestDurationSlots !== null) { if ('form' === 'form' && is_array($requestDurationSlots)) { @@ -534,6 +571,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // query params if ($requestDurationSlotsMode !== null) { if ('form' === 'form' && is_array($requestDurationSlotsMode)) { @@ -547,6 +586,8 @@ private function httpMetricsTimelineIpsRequest( } } + + // path params if ($projectId !== null) { @@ -566,6 +607,7 @@ private function httpMetricsTimelineIpsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -834,6 +876,7 @@ private function httpMetricsTimelineUrlsRequest( ?array $requestDurationSlots = null, ?string $requestDurationSlotsMode = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -842,6 +885,8 @@ private function httpMetricsTimelineUrlsRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineUrls, @@ -857,6 +902,8 @@ private function httpMetricsTimelineUrlsRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineUrls, @@ -893,6 +940,8 @@ private function httpMetricsTimelineUrlsRequest( ); } + + if ($topHitsCount !== null && $topHitsCount > 15) { throw new InvalidArgumentException( 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUrls, @@ -907,6 +956,8 @@ private function httpMetricsTimelineUrlsRequest( ); } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls'; $formParams = []; $queryParams = []; @@ -927,6 +978,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -940,6 +993,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -953,6 +1008,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($topHitsCount !== null) { if ('form' === 'form' && is_array($topHitsCount)) { @@ -966,6 +1023,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -979,6 +1038,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -992,6 +1053,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -1005,6 +1068,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -1018,6 +1083,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($domains !== null) { if ('form' === 'form' && is_array($domains)) { @@ -1031,6 +1098,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($domainsMode !== null) { if ('form' === 'form' && is_array($domainsMode)) { @@ -1044,6 +1113,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($codeSlots !== null) { if ('form' === 'form' && is_array($codeSlots)) { @@ -1057,6 +1128,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($codeSlotsMode !== null) { if ('form' === 'form' && is_array($codeSlotsMode)) { @@ -1070,6 +1143,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($codes !== null) { if ('form' === 'form' && is_array($codes)) { @@ -1083,6 +1158,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($codesMode !== null) { if ('form' === 'form' && is_array($codesMode)) { @@ -1096,6 +1173,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($requestDurationSlots !== null) { if ('form' === 'form' && is_array($requestDurationSlots)) { @@ -1109,6 +1188,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // query params if ($requestDurationSlotsMode !== null) { if ('form' === 'form' && is_array($requestDurationSlotsMode)) { @@ -1122,6 +1203,8 @@ private function httpMetricsTimelineUrlsRequest( } } + + // path params if ($projectId !== null) { @@ -1141,6 +1224,7 @@ private function httpMetricsTimelineUrlsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1408,6 +1492,7 @@ private function httpMetricsTimelineUserAgentsRequest( ?array $requestDurationSlots = null, ?string $requestDurationSlotsMode = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1416,6 +1501,8 @@ private function httpMetricsTimelineUserAgentsRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, @@ -1431,6 +1518,8 @@ private function httpMetricsTimelineUserAgentsRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, @@ -1467,6 +1556,8 @@ private function httpMetricsTimelineUserAgentsRequest( ); } + + if ($topHitsCount !== null && $topHitsCount > 15) { throw new InvalidArgumentException( 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, @@ -1481,6 +1572,8 @@ private function httpMetricsTimelineUserAgentsRequest( ); } + + $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/user-agents'; $formParams = []; $queryParams = []; @@ -1501,6 +1594,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1514,6 +1609,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -1527,6 +1624,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($topHitsCount !== null) { if ('form' === 'form' && is_array($topHitsCount)) { @@ -1540,6 +1639,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -1553,6 +1654,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -1566,6 +1669,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -1579,6 +1684,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -1592,6 +1699,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($domains !== null) { if ('form' === 'form' && is_array($domains)) { @@ -1605,6 +1714,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($domainsMode !== null) { if ('form' === 'form' && is_array($domainsMode)) { @@ -1618,6 +1729,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($codeSlots !== null) { if ('form' === 'form' && is_array($codeSlots)) { @@ -1631,6 +1744,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($codeSlotsMode !== null) { if ('form' === 'form' && is_array($codeSlotsMode)) { @@ -1644,6 +1759,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($codes !== null) { if ('form' === 'form' && is_array($codes)) { @@ -1657,6 +1774,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($codesMode !== null) { if ('form' === 'form' && is_array($codesMode)) { @@ -1670,6 +1789,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($requestDurationSlots !== null) { if ('form' === 'form' && is_array($requestDurationSlots)) { @@ -1683,6 +1804,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // query params if ($requestDurationSlotsMode !== null) { if ('form' === 'form' && is_array($requestDurationSlotsMode)) { @@ -1696,6 +1819,8 @@ private function httpMetricsTimelineUserAgentsRequest( } } + + // path params if ($projectId !== null) { @@ -1715,6 +1840,7 @@ private function httpMetricsTimelineUserAgentsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/InvoicesApi.php b/src/Api/InvoicesApi.php index e1131456f..ee976def5 100644 --- a/src/Api/InvoicesApi.php +++ b/src/Api/InvoicesApi.php @@ -13,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Invoice; -use Upsun\Model\ListOrgInvoices200Response; /** * Low level InvoicesApi (auto-generated) @@ -27,13 +25,13 @@ final class InvoicesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -68,7 +66,7 @@ public function __construct( public function getOrgInvoice( string $invoiceId, string $organizationId - ): Invoice { + ): \Upsun\Model\Invoice { return $this->getOrgInvoiceWithHttpInfo( $invoiceId, $organizationId @@ -90,7 +88,7 @@ public function getOrgInvoice( private function getOrgInvoiceWithHttpInfo( string $invoiceId, string $organizationId - ): Invoice { + ): \Upsun\Model\Invoice { $request = $this->getOrgInvoiceRequest( $invoiceId, $organizationId @@ -138,6 +136,7 @@ private function getOrgInvoiceRequest( string $invoiceId, string $organizationId ): RequestInterface { + // verify the required parameter 'invoiceId' is set if (empty($invoiceId)) { throw new InvalidArgumentException( @@ -179,6 +178,7 @@ private function getOrgInvoiceRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -263,7 +263,7 @@ public function listOrgInvoices( ?string $filterType = null, ?string $filterOrderId = null, ?int $page = null - ): ListOrgInvoices200Response { + ): \Upsun\Model\ListOrgInvoices200Response { return $this->listOrgInvoicesWithHttpInfo( $organizationId, $filterStatus, @@ -298,7 +298,7 @@ private function listOrgInvoicesWithHttpInfo( ?string $filterType = null, ?string $filterOrderId = null, ?int $page = null - ): ListOrgInvoices200Response { + ): \Upsun\Model\ListOrgInvoices200Response { $request = $this->listOrgInvoicesRequest( $organizationId, $filterStatus, @@ -359,6 +359,7 @@ private function listOrgInvoicesRequest( ?string $filterOrderId = null, ?int $page = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -387,6 +388,8 @@ private function listOrgInvoicesRequest( } } + + // query params if ($filterType !== null) { if ('form' === 'form' && is_array($filterType)) { @@ -400,6 +403,8 @@ private function listOrgInvoicesRequest( } } + + // query params if ($filterOrderId !== null) { if ('form' === 'form' && is_array($filterOrderId)) { @@ -413,6 +418,8 @@ private function listOrgInvoicesRequest( } } + + // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -426,6 +433,8 @@ private function listOrgInvoicesRequest( } } + + // path params if ($organizationId !== null) { @@ -436,6 +445,7 @@ private function listOrgInvoicesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/MfaApi.php b/src/Api/MfaApi.php index 085f60102..cb8365516 100644 --- a/src/Api/MfaApi.php +++ b/src/Api/MfaApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,11 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ConfirmTotpEnrollment200Response; -use Upsun\Model\ConfirmTotpEnrollmentRequest; -use Upsun\Model\GetTotpEnrollment200Response; -use Upsun\Model\OrganizationMfaEnforcement; -use Upsun\Model\SendOrgMfaRemindersRequest; /** * Low level MfaApi (auto-generated) @@ -29,13 +25,13 @@ final class MfaApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -47,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -67,8 +63,8 @@ public function __construct( */ public function confirmTotpEnrollment( string $userId, - ?ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null - ): ConfirmTotpEnrollment200Response { + ?\Upsun\Model\ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null + ): \Upsun\Model\ConfirmTotpEnrollment200Response { return $this->confirmTotpEnrollmentWithHttpInfo( $userId, $confirmTotpEnrollmentRequest @@ -87,8 +83,8 @@ public function confirmTotpEnrollment( */ private function confirmTotpEnrollmentWithHttpInfo( string $userId, - ?ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null - ): ConfirmTotpEnrollment200Response { + ?\Upsun\Model\ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null + ): \Upsun\Model\ConfirmTotpEnrollment200Response { $request = $this->confirmTotpEnrollmentRequest( $userId, $confirmTotpEnrollmentRequest @@ -132,8 +128,9 @@ private function confirmTotpEnrollmentWithHttpInfo( */ private function confirmTotpEnrollmentRequest( string $userId, - ?ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null + ?\Upsun\Model\ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -159,6 +156,7 @@ private function confirmTotpEnrollmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -291,6 +289,7 @@ private function disableOrgMfaEnforcementWithHttpInfo( private function disableOrgMfaEnforcementRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -316,6 +315,7 @@ private function disableOrgMfaEnforcementRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -440,6 +440,7 @@ private function enableOrgMfaEnforcementWithHttpInfo( private function enableOrgMfaEnforcementRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -465,6 +466,7 @@ private function enableOrgMfaEnforcementRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -536,7 +538,7 @@ private function enableOrgMfaEnforcementRequest( */ public function getOrgMfaEnforcement( string $organizationId - ): OrganizationMfaEnforcement { + ): \Upsun\Model\OrganizationMfaEnforcement { return $this->getOrgMfaEnforcementWithHttpInfo( $organizationId ); @@ -554,7 +556,7 @@ public function getOrgMfaEnforcement( */ private function getOrgMfaEnforcementWithHttpInfo( string $organizationId - ): OrganizationMfaEnforcement { + ): \Upsun\Model\OrganizationMfaEnforcement { $request = $this->getOrgMfaEnforcementRequest( $organizationId ); @@ -598,6 +600,7 @@ private function getOrgMfaEnforcementWithHttpInfo( private function getOrgMfaEnforcementRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -623,6 +626,7 @@ private function getOrgMfaEnforcementRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -693,7 +697,7 @@ private function getOrgMfaEnforcementRequest( */ public function getTotpEnrollment( string $userId - ): GetTotpEnrollment200Response { + ): \Upsun\Model\GetTotpEnrollment200Response { return $this->getTotpEnrollmentWithHttpInfo( $userId ); @@ -710,7 +714,7 @@ public function getTotpEnrollment( */ private function getTotpEnrollmentWithHttpInfo( string $userId - ): GetTotpEnrollment200Response { + ): \Upsun\Model\GetTotpEnrollment200Response { $request = $this->getTotpEnrollmentRequest( $userId ); @@ -753,6 +757,7 @@ private function getTotpEnrollmentWithHttpInfo( private function getTotpEnrollmentRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -778,6 +783,7 @@ private function getTotpEnrollmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -848,7 +854,7 @@ private function getTotpEnrollmentRequest( */ public function recreateRecoveryCodes( string $userId - ): ConfirmTotpEnrollment200Response { + ): \Upsun\Model\ConfirmTotpEnrollment200Response { return $this->recreateRecoveryCodesWithHttpInfo( $userId ); @@ -865,7 +871,7 @@ public function recreateRecoveryCodes( */ private function recreateRecoveryCodesWithHttpInfo( string $userId - ): ConfirmTotpEnrollment200Response { + ): \Upsun\Model\ConfirmTotpEnrollment200Response { $request = $this->recreateRecoveryCodesRequest( $userId ); @@ -908,6 +914,7 @@ private function recreateRecoveryCodesWithHttpInfo( private function recreateRecoveryCodesRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -933,6 +940,7 @@ private function recreateRecoveryCodesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1003,7 +1011,7 @@ private function recreateRecoveryCodesRequest( */ public function sendOrgMfaReminders( string $organizationId, - ?SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null + ?\Upsun\Model\SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null ): array { return $this->sendOrgMfaRemindersWithHttpInfo( $organizationId, @@ -1022,7 +1030,7 @@ public function sendOrgMfaReminders( */ private function sendOrgMfaRemindersWithHttpInfo( string $organizationId, - ?SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null + ?\Upsun\Model\SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null ): array { $request = $this->sendOrgMfaRemindersRequest( $organizationId, @@ -1066,8 +1074,9 @@ private function sendOrgMfaRemindersWithHttpInfo( */ private function sendOrgMfaRemindersRequest( string $organizationId, - ?SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null + ?\Upsun\Model\SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1093,6 +1102,7 @@ private function sendOrgMfaRemindersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1225,6 +1235,7 @@ private function withdrawTotpEnrollmentWithHttpInfo( private function withdrawTotpEnrollmentRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1250,6 +1261,7 @@ private function withdrawTotpEnrollmentRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/OrdersApi.php b/src/Api/OrdersApi.php index 48d14b869..76f08f3f0 100644 --- a/src/Api/OrdersApi.php +++ b/src/Api/OrdersApi.php @@ -13,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CreateAuthorizationCredentials200Response; -use Upsun\Model\ListOrgOrders200Response; -use Upsun\Model\Order; /** * Low level OrdersApi (auto-generated) @@ -28,13 +25,13 @@ final class OrdersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -69,7 +66,7 @@ public function __construct( public function createAuthorizationCredentials( string $organizationId, string $orderId - ): CreateAuthorizationCredentials200Response { + ): \Upsun\Model\CreateAuthorizationCredentials200Response { return $this->createAuthorizationCredentialsWithHttpInfo( $organizationId, $orderId @@ -91,7 +88,7 @@ public function createAuthorizationCredentials( private function createAuthorizationCredentialsWithHttpInfo( string $organizationId, string $orderId - ): CreateAuthorizationCredentials200Response { + ): \Upsun\Model\CreateAuthorizationCredentials200Response { $request = $this->createAuthorizationCredentialsRequest( $organizationId, $orderId @@ -139,6 +136,7 @@ private function createAuthorizationCredentialsRequest( string $organizationId, string $orderId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -180,6 +178,7 @@ private function createAuthorizationCredentialsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -306,6 +305,7 @@ private function downloadInvoiceWithHttpInfo( private function downloadInvoiceRequest( string $token ): RequestInterface { + // verify the required parameter 'token' is set if (empty($token)) { throw new InvalidArgumentException( @@ -334,6 +334,10 @@ private function downloadInvoiceRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/pdf'], '', @@ -411,7 +415,7 @@ public function getOrgOrder( string $organizationId, string $orderId, ?string $mode = null - ): Order { + ): \Upsun\Model\Order { return $this->getOrgOrderWithHttpInfo( $organizationId, $orderId, @@ -437,7 +441,7 @@ private function getOrgOrderWithHttpInfo( string $organizationId, string $orderId, ?string $mode = null - ): Order { + ): \Upsun\Model\Order { $request = $this->getOrgOrderRequest( $organizationId, $orderId, @@ -489,6 +493,7 @@ private function getOrgOrderRequest( string $orderId, ?string $mode = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -524,6 +529,8 @@ private function getOrgOrderRequest( } } + + // path params if ($organizationId !== null) { @@ -543,6 +550,7 @@ private function getOrgOrderRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -626,7 +634,7 @@ public function listOrgOrders( ?int $filterTotal = null, ?int $page = null, ?string $mode = null - ): ListOrgOrders200Response { + ): \Upsun\Model\ListOrgOrders200Response { return $this->listOrgOrdersWithHttpInfo( $organizationId, $filterStatus, @@ -660,7 +668,7 @@ private function listOrgOrdersWithHttpInfo( ?int $filterTotal = null, ?int $page = null, ?string $mode = null - ): ListOrgOrders200Response { + ): \Upsun\Model\ListOrgOrders200Response { $request = $this->listOrgOrdersRequest( $organizationId, $filterStatus, @@ -720,6 +728,7 @@ private function listOrgOrdersRequest( ?int $page = null, ?string $mode = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -748,6 +757,8 @@ private function listOrgOrdersRequest( } } + + // query params if ($filterTotal !== null) { if ('form' === 'form' && is_array($filterTotal)) { @@ -761,6 +772,8 @@ private function listOrgOrdersRequest( } } + + // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -774,6 +787,8 @@ private function listOrgOrdersRequest( } } + + // query params if ($mode !== null) { if ('form' === 'form' && is_array($mode)) { @@ -787,6 +802,8 @@ private function listOrgOrdersRequest( } } + + // path params if ($organizationId !== null) { @@ -797,6 +814,7 @@ private function listOrgOrdersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/OrganizationInvitationsApi.php b/src/Api/OrganizationInvitationsApi.php index ea8b06543..89c7bdc9b 100644 --- a/src/Api/OrganizationInvitationsApi.php +++ b/src/Api/OrganizationInvitationsApi.php @@ -13,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CreateOrgInviteRequest; -use Upsun\Model\OrganizationInvitation; -use Upsun\Model\StringFilter; /** * Low level OrganizationInvitationsApi (auto-generated) @@ -28,13 +25,13 @@ final class OrganizationInvitationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -130,6 +127,7 @@ private function cancelOrgInviteRequest( string $organizationId, string $invitationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -171,6 +169,7 @@ private function cancelOrgInviteRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -241,8 +240,8 @@ private function cancelOrgInviteRequest( */ public function createOrgInvite( string $organizationId, - ?CreateOrgInviteRequest $createOrgInviteRequest = null - ): OrganizationInvitation { + ?\Upsun\Model\CreateOrgInviteRequest $createOrgInviteRequest = null + ): \Upsun\Model\OrganizationInvitation { return $this->createOrgInviteWithHttpInfo( $organizationId, $createOrgInviteRequest @@ -260,8 +259,8 @@ public function createOrgInvite( */ private function createOrgInviteWithHttpInfo( string $organizationId, - ?CreateOrgInviteRequest $createOrgInviteRequest = null - ): OrganizationInvitation { + ?\Upsun\Model\CreateOrgInviteRequest $createOrgInviteRequest = null + ): \Upsun\Model\OrganizationInvitation { $request = $this->createOrgInviteRequest( $organizationId, $createOrgInviteRequest @@ -304,8 +303,9 @@ private function createOrgInviteWithHttpInfo( */ private function createOrgInviteRequest( string $organizationId, - ?CreateOrgInviteRequest $createOrgInviteRequest = null + ?\Upsun\Model\CreateOrgInviteRequest $createOrgInviteRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -331,6 +331,7 @@ private function createOrgInviteRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -416,7 +417,7 @@ private function createOrgInviteRequest( */ public function listOrgInvites( string $organizationId, - ?StringFilter $filterState = null, + ?\Upsun\Model\StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -450,7 +451,7 @@ public function listOrgInvites( */ private function listOrgInvitesWithHttpInfo( string $organizationId, - ?StringFilter $filterState = null, + ?\Upsun\Model\StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -507,12 +508,13 @@ private function listOrgInvitesWithHttpInfo( */ private function listOrgInvitesRequest( string $organizationId, - ?StringFilter $filterState = null, + ?\Upsun\Model\StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -535,6 +537,8 @@ private function listOrgInvitesRequest( ); } + + $resourcePath = '/organizations/{organization_id}/invitations'; $formParams = []; $queryParams = []; @@ -555,6 +559,8 @@ private function listOrgInvitesRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -568,6 +574,8 @@ private function listOrgInvitesRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -581,6 +589,8 @@ private function listOrgInvitesRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -594,6 +604,8 @@ private function listOrgInvitesRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -607,6 +619,8 @@ private function listOrgInvitesRequest( } } + + // path params if ($organizationId !== null) { @@ -617,6 +631,7 @@ private function listOrgInvitesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/OrganizationManagementApi.php b/src/Api/OrganizationManagementApi.php index f1a049b4d..87c0b80fa 100644 --- a/src/Api/OrganizationManagementApi.php +++ b/src/Api/OrganizationManagementApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,11 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\GetOrgPrepaymentInfo200Response; -use Upsun\Model\ListOrgPrepaymentTransactions200Response; -use Upsun\Model\OrganizationAlertConfig; -use Upsun\Model\OrganizationEstimationObject; -use Upsun\Model\UpdateOrgBillingAlertConfigRequest; /** * Low level OrganizationManagementApi (auto-generated) @@ -29,13 +25,13 @@ final class OrganizationManagementApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -47,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -67,7 +63,7 @@ public function __construct( */ public function estimateOrg( string $organizationId - ): OrganizationEstimationObject { + ): \Upsun\Model\OrganizationEstimationObject { return $this->estimateOrgWithHttpInfo( $organizationId ); @@ -85,7 +81,7 @@ public function estimateOrg( */ private function estimateOrgWithHttpInfo( string $organizationId - ): OrganizationEstimationObject { + ): \Upsun\Model\OrganizationEstimationObject { $request = $this->estimateOrgRequest( $organizationId ); @@ -129,6 +125,7 @@ private function estimateOrgWithHttpInfo( private function estimateOrgRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -154,6 +151,7 @@ private function estimateOrgRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -225,7 +223,7 @@ private function estimateOrgRequest( */ public function getOrgBillingAlertConfig( string $organizationId - ): OrganizationAlertConfig { + ): \Upsun\Model\OrganizationAlertConfig { return $this->getOrgBillingAlertConfigWithHttpInfo( $organizationId ); @@ -243,7 +241,7 @@ public function getOrgBillingAlertConfig( */ private function getOrgBillingAlertConfigWithHttpInfo( string $organizationId - ): OrganizationAlertConfig { + ): \Upsun\Model\OrganizationAlertConfig { $request = $this->getOrgBillingAlertConfigRequest( $organizationId ); @@ -287,6 +285,7 @@ private function getOrgBillingAlertConfigWithHttpInfo( private function getOrgBillingAlertConfigRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -312,6 +311,7 @@ private function getOrgBillingAlertConfigRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -382,7 +382,7 @@ private function getOrgBillingAlertConfigRequest( */ public function getOrgPrepaymentInfo( string $organizationId - ): GetOrgPrepaymentInfo200Response { + ): \Upsun\Model\GetOrgPrepaymentInfo200Response { return $this->getOrgPrepaymentInfoWithHttpInfo( $organizationId ); @@ -399,7 +399,7 @@ public function getOrgPrepaymentInfo( */ private function getOrgPrepaymentInfoWithHttpInfo( string $organizationId - ): GetOrgPrepaymentInfo200Response { + ): \Upsun\Model\GetOrgPrepaymentInfo200Response { $request = $this->getOrgPrepaymentInfoRequest( $organizationId ); @@ -442,6 +442,7 @@ private function getOrgPrepaymentInfoWithHttpInfo( private function getOrgPrepaymentInfoRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -467,6 +468,7 @@ private function getOrgPrepaymentInfoRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -537,7 +539,7 @@ private function getOrgPrepaymentInfoRequest( */ public function listOrgPrepaymentTransactions( string $organizationId - ): ListOrgPrepaymentTransactions200Response { + ): \Upsun\Model\ListOrgPrepaymentTransactions200Response { return $this->listOrgPrepaymentTransactionsWithHttpInfo( $organizationId ); @@ -554,7 +556,7 @@ public function listOrgPrepaymentTransactions( */ private function listOrgPrepaymentTransactionsWithHttpInfo( string $organizationId - ): ListOrgPrepaymentTransactions200Response { + ): \Upsun\Model\ListOrgPrepaymentTransactions200Response { $request = $this->listOrgPrepaymentTransactionsRequest( $organizationId ); @@ -597,6 +599,7 @@ private function listOrgPrepaymentTransactionsWithHttpInfo( private function listOrgPrepaymentTransactionsRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -622,6 +625,7 @@ private function listOrgPrepaymentTransactionsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -693,8 +697,8 @@ private function listOrgPrepaymentTransactionsRequest( */ public function updateOrgBillingAlertConfig( string $organizationId, - ?UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null - ): OrganizationAlertConfig { + ?\Upsun\Model\UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null + ): \Upsun\Model\OrganizationAlertConfig { return $this->updateOrgBillingAlertConfigWithHttpInfo( $organizationId, $updateOrgBillingAlertConfigRequest @@ -713,8 +717,8 @@ public function updateOrgBillingAlertConfig( */ private function updateOrgBillingAlertConfigWithHttpInfo( string $organizationId, - ?UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null - ): OrganizationAlertConfig { + ?\Upsun\Model\UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null + ): \Upsun\Model\OrganizationAlertConfig { $request = $this->updateOrgBillingAlertConfigRequest( $organizationId, $updateOrgBillingAlertConfigRequest @@ -758,8 +762,9 @@ private function updateOrgBillingAlertConfigWithHttpInfo( */ private function updateOrgBillingAlertConfigRequest( string $organizationId, - ?UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null + ?\Upsun\Model\UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -785,6 +790,7 @@ private function updateOrgBillingAlertConfigRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/OrganizationMembersApi.php b/src/Api/OrganizationMembersApi.php index 829db9c2b..72965b24e 100644 --- a/src/Api/OrganizationMembersApi.php +++ b/src/Api/OrganizationMembersApi.php @@ -13,11 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ArrayFilter; -use Upsun\Model\CreateOrgMemberRequest; -use Upsun\Model\ListOrgMembers200Response; -use Upsun\Model\OrganizationMember; -use Upsun\Model\UpdateOrgMemberRequest; /** * Low level OrganizationMembersApi (auto-generated) @@ -30,13 +25,13 @@ final class OrganizationMembersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -48,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -67,8 +62,8 @@ public function __construct( */ public function createOrgMember( string $organizationId, - CreateOrgMemberRequest $createOrgMemberRequest - ): OrganizationMember { + \Upsun\Model\CreateOrgMemberRequest $createOrgMemberRequest + ): \Upsun\Model\OrganizationMember { return $this->createOrgMemberWithHttpInfo( $organizationId, $createOrgMemberRequest @@ -86,8 +81,8 @@ public function createOrgMember( */ private function createOrgMemberWithHttpInfo( string $organizationId, - CreateOrgMemberRequest $createOrgMemberRequest - ): OrganizationMember { + \Upsun\Model\CreateOrgMemberRequest $createOrgMemberRequest + ): \Upsun\Model\OrganizationMember { $request = $this->createOrgMemberRequest( $organizationId, $createOrgMemberRequest @@ -130,8 +125,9 @@ private function createOrgMemberWithHttpInfo( */ private function createOrgMemberRequest( string $organizationId, - CreateOrgMemberRequest $createOrgMemberRequest + \Upsun\Model\CreateOrgMemberRequest $createOrgMemberRequest ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -164,6 +160,7 @@ private function createOrgMemberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -307,6 +304,7 @@ private function deleteOrgMemberRequest( string $organizationId, string $userId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -348,6 +346,7 @@ private function deleteOrgMemberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -422,7 +421,7 @@ private function deleteOrgMemberRequest( public function getOrgMember( string $organizationId, string $userId - ): OrganizationMember { + ): \Upsun\Model\OrganizationMember { return $this->getOrgMemberWithHttpInfo( $organizationId, $userId @@ -444,7 +443,7 @@ public function getOrgMember( private function getOrgMemberWithHttpInfo( string $organizationId, string $userId - ): OrganizationMember { + ): \Upsun\Model\OrganizationMember { $request = $this->getOrgMemberRequest( $organizationId, $userId @@ -492,6 +491,7 @@ private function getOrgMemberRequest( string $organizationId, string $userId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -533,6 +533,7 @@ private function getOrgMemberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -609,12 +610,12 @@ private function getOrgMemberRequest( */ public function listOrgMembers( string $organizationId, - ?ArrayFilter $filterPermissions = null, + ?\Upsun\Model\ArrayFilter $filterPermissions = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListOrgMembers200Response { + ): \Upsun\Model\ListOrgMembers200Response { return $this->listOrgMembersWithHttpInfo( $organizationId, $filterPermissions, @@ -642,12 +643,12 @@ public function listOrgMembers( */ private function listOrgMembersWithHttpInfo( string $organizationId, - ?ArrayFilter $filterPermissions = null, + ?\Upsun\Model\ArrayFilter $filterPermissions = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListOrgMembers200Response { + ): \Upsun\Model\ListOrgMembers200Response { $request = $this->listOrgMembersRequest( $organizationId, $filterPermissions, @@ -700,12 +701,13 @@ private function listOrgMembersWithHttpInfo( */ private function listOrgMembersRequest( string $organizationId, - ?ArrayFilter $filterPermissions = null, + ?\Upsun\Model\ArrayFilter $filterPermissions = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -728,6 +730,8 @@ private function listOrgMembersRequest( ); } + + $resourcePath = '/organizations/{organization_id}/members'; $formParams = []; $queryParams = []; @@ -748,6 +752,8 @@ private function listOrgMembersRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -761,6 +767,8 @@ private function listOrgMembersRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -774,6 +782,8 @@ private function listOrgMembersRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -787,6 +797,8 @@ private function listOrgMembersRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -800,6 +812,8 @@ private function listOrgMembersRequest( } } + + // path params if ($organizationId !== null) { @@ -810,6 +824,7 @@ private function listOrgMembersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -883,8 +898,8 @@ private function listOrgMembersRequest( public function updateOrgMember( string $organizationId, string $userId, - ?UpdateOrgMemberRequest $updateOrgMemberRequest = null - ): OrganizationMember { + ?\Upsun\Model\UpdateOrgMemberRequest $updateOrgMemberRequest = null + ): \Upsun\Model\OrganizationMember { return $this->updateOrgMemberWithHttpInfo( $organizationId, $userId, @@ -906,8 +921,8 @@ public function updateOrgMember( private function updateOrgMemberWithHttpInfo( string $organizationId, string $userId, - ?UpdateOrgMemberRequest $updateOrgMemberRequest = null - ): OrganizationMember { + ?\Upsun\Model\UpdateOrgMemberRequest $updateOrgMemberRequest = null + ): \Upsun\Model\OrganizationMember { $request = $this->updateOrgMemberRequest( $organizationId, $userId, @@ -954,8 +969,9 @@ private function updateOrgMemberWithHttpInfo( private function updateOrgMemberRequest( string $organizationId, string $userId, - ?UpdateOrgMemberRequest $updateOrgMemberRequest = null + ?\Upsun\Model\UpdateOrgMemberRequest $updateOrgMemberRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -997,6 +1013,7 @@ private function updateOrgMemberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/OrganizationProjectsApi.php b/src/Api/OrganizationProjectsApi.php index 95bae7d22..d86982290 100644 --- a/src/Api/OrganizationProjectsApi.php +++ b/src/Api/OrganizationProjectsApi.php @@ -4,7 +4,6 @@ use DateTime; use Exception; -use Generator; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; use Psr\Http\Client\ClientExceptionInterface; @@ -14,12 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CreateOrgProjectRequest; -use Upsun\Model\DateTimeFilter; -use Upsun\Model\OrganizationProject; -use Upsun\Model\ProjectCarbon; -use Upsun\Model\StringFilter; -use Upsun\Model\UpdateOrgProjectRequest; /** * Low level OrganizationProjectsApi (auto-generated) @@ -32,13 +25,13 @@ final class OrganizationProjectsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -50,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -69,8 +62,8 @@ public function __construct( */ public function createOrgProject( string $organizationId, - CreateOrgProjectRequest $createOrgProjectRequest - ): OrganizationProject { + \Upsun\Model\CreateOrgProjectRequest $createOrgProjectRequest + ): \Upsun\Model\OrganizationProject { return $this->createOrgProjectWithHttpInfo( $organizationId, $createOrgProjectRequest @@ -88,8 +81,8 @@ public function createOrgProject( */ private function createOrgProjectWithHttpInfo( string $organizationId, - CreateOrgProjectRequest $createOrgProjectRequest - ): OrganizationProject { + \Upsun\Model\CreateOrgProjectRequest $createOrgProjectRequest + ): \Upsun\Model\OrganizationProject { $request = $this->createOrgProjectRequest( $organizationId, $createOrgProjectRequest @@ -132,8 +125,9 @@ private function createOrgProjectWithHttpInfo( */ private function createOrgProjectRequest( string $organizationId, - CreateOrgProjectRequest $createOrgProjectRequest + \Upsun\Model\CreateOrgProjectRequest $createOrgProjectRequest ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -166,6 +160,7 @@ private function createOrgProjectRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -309,6 +304,7 @@ private function deleteOrgProjectRequest( string $organizationId, string $projectId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -350,6 +346,7 @@ private function deleteOrgProjectRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -423,7 +420,7 @@ private function deleteOrgProjectRequest( public function getOrgProject( string $organizationId, string $projectId - ): OrganizationProject { + ): \Upsun\Model\OrganizationProject { return $this->getOrgProjectWithHttpInfo( $organizationId, $projectId @@ -444,7 +441,7 @@ public function getOrgProject( private function getOrgProjectWithHttpInfo( string $organizationId, string $projectId - ): OrganizationProject { + ): \Upsun\Model\OrganizationProject { $request = $this->getOrgProjectRequest( $organizationId, $projectId @@ -491,6 +488,7 @@ private function getOrgProjectRequest( string $organizationId, string $projectId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -532,6 +530,7 @@ private function getOrgProjectRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -620,11 +619,11 @@ private function getOrgProjectRequest( */ public function listOrgProjects( string $organizationId, - ?StringFilter $filterId = null, - ?StringFilter $filterTitle = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, - ?DateTimeFilter $filterCreatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterTitle = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\DateTimeFilter $filterCreatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -673,11 +672,11 @@ public function listOrgProjects( */ private function listOrgProjectsWithHttpInfo( string $organizationId, - ?StringFilter $filterId = null, - ?StringFilter $filterTitle = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, - ?DateTimeFilter $filterCreatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterTitle = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\DateTimeFilter $filterCreatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -751,16 +750,17 @@ private function listOrgProjectsWithHttpInfo( */ private function listOrgProjectsRequest( string $organizationId, - ?StringFilter $filterId = null, - ?StringFilter $filterTitle = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, - ?DateTimeFilter $filterCreatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterTitle = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\DateTimeFilter $filterCreatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -783,6 +783,8 @@ private function listOrgProjectsRequest( ); } + + $resourcePath = '/organizations/{organization_id}/projects'; $formParams = []; $queryParams = []; @@ -803,6 +805,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($filterTitle !== null) { if ('form' === 'deepObject' && is_array($filterTitle)) { @@ -816,6 +820,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($filterStatus !== null) { if ('form' === 'deepObject' && is_array($filterStatus)) { @@ -829,6 +835,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -842,6 +850,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($filterCreatedAt !== null) { if ('form' === 'deepObject' && is_array($filterCreatedAt)) { @@ -855,6 +865,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -868,6 +880,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -881,6 +895,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -894,6 +910,8 @@ private function listOrgProjectsRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -907,6 +925,8 @@ private function listOrgProjectsRequest( } } + + // path params if ($organizationId !== null) { @@ -917,6 +937,7 @@ private function listOrgProjectsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -997,10 +1018,10 @@ private function listOrgProjectsRequest( public function queryProjectCarbon( string $organizationId, string $projectId, - ?DateTimeFilter $from = null, - ?DateTimeFilter $to = null, + ?\Upsun\Model\DateTimeFilter $from = null, + ?\Upsun\Model\DateTimeFilter $to = null, ?string $interval = null - ): ProjectCarbon { + ): \Upsun\Model\ProjectCarbon { return $this->queryProjectCarbonWithHttpInfo( $organizationId, $projectId, @@ -1031,10 +1052,10 @@ public function queryProjectCarbon( private function queryProjectCarbonWithHttpInfo( string $organizationId, string $projectId, - ?DateTimeFilter $from = null, - ?DateTimeFilter $to = null, + ?\Upsun\Model\DateTimeFilter $from = null, + ?\Upsun\Model\DateTimeFilter $to = null, ?string $interval = null - ): ProjectCarbon { + ): \Upsun\Model\ProjectCarbon { $request = $this->queryProjectCarbonRequest( $organizationId, $projectId, @@ -1090,10 +1111,11 @@ private function queryProjectCarbonWithHttpInfo( private function queryProjectCarbonRequest( string $organizationId, string $projectId, - ?DateTimeFilter $from = null, - ?DateTimeFilter $to = null, + ?\Upsun\Model\DateTimeFilter $from = null, + ?\Upsun\Model\DateTimeFilter $to = null, ?string $interval = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1129,6 +1151,8 @@ private function queryProjectCarbonRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1142,6 +1166,8 @@ private function queryProjectCarbonRequest( } } + + // query params if ($interval !== null) { if ('form' === 'form' && is_array($interval)) { @@ -1155,6 +1181,8 @@ private function queryProjectCarbonRequest( } } + + // path params if ($organizationId !== null) { @@ -1174,6 +1202,7 @@ private function queryProjectCarbonRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1252,7 +1281,7 @@ private function queryProjectCarbonRequest( */ public function streamOrgProjectProvisioning( string $organizationId - ): Generator { + ): \Generator { return $this->streamOrgProjectProvisioningWithHttpInfo( $organizationId ); @@ -1271,7 +1300,7 @@ public function streamOrgProjectProvisioning( */ private function streamOrgProjectProvisioningWithHttpInfo( string $organizationId - ): Generator { + ): \Generator { $request = $this->streamOrgProjectProvisioningRequest( $organizationId ); @@ -1314,6 +1343,7 @@ private function streamOrgProjectProvisioningWithHttpInfo( private function streamOrgProjectProvisioningRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1339,6 +1369,7 @@ private function streamOrgProjectProvisioningRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/x-ndjson', 'application/problem+json'], '', @@ -1412,8 +1443,8 @@ private function streamOrgProjectProvisioningRequest( public function updateOrgProject( string $organizationId, string $projectId, - ?UpdateOrgProjectRequest $updateOrgProjectRequest = null - ): OrganizationProject { + ?\Upsun\Model\UpdateOrgProjectRequest $updateOrgProjectRequest = null + ): \Upsun\Model\OrganizationProject { return $this->updateOrgProjectWithHttpInfo( $organizationId, $projectId, @@ -1435,8 +1466,8 @@ public function updateOrgProject( private function updateOrgProjectWithHttpInfo( string $organizationId, string $projectId, - ?UpdateOrgProjectRequest $updateOrgProjectRequest = null - ): OrganizationProject { + ?\Upsun\Model\UpdateOrgProjectRequest $updateOrgProjectRequest = null + ): \Upsun\Model\OrganizationProject { $request = $this->updateOrgProjectRequest( $organizationId, $projectId, @@ -1483,8 +1514,9 @@ private function updateOrgProjectWithHttpInfo( private function updateOrgProjectRequest( string $organizationId, string $projectId, - ?UpdateOrgProjectRequest $updateOrgProjectRequest = null + ?\Upsun\Model\UpdateOrgProjectRequest $updateOrgProjectRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1526,6 +1558,7 @@ private function updateOrgProjectRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index dcc8e1b23..08fc3b32d 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -13,14 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ArrayFilter; -use Upsun\Model\CreateOrgRequest; -use Upsun\Model\DateTimeFilter; -use Upsun\Model\ListOrgs200Response; -use Upsun\Model\ListUserOrgs200Response; -use Upsun\Model\Organization; -use Upsun\Model\StringFilter; -use Upsun\Model\UpdateOrgRequest; /** * Low level OrganizationsApi (auto-generated) @@ -33,13 +25,13 @@ final class OrganizationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -51,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -67,8 +59,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Organizations/operation/create-org */ public function createOrg( - CreateOrgRequest $createOrgRequest - ): Organization { + \Upsun\Model\CreateOrgRequest $createOrgRequest + ): \Upsun\Model\Organization { return $this->createOrgWithHttpInfo( $createOrgRequest ); @@ -82,8 +74,8 @@ public function createOrg( * @throws ClientExceptionInterface */ private function createOrgWithHttpInfo( - CreateOrgRequest $createOrgRequest - ): Organization { + \Upsun\Model\CreateOrgRequest $createOrgRequest + ): \Upsun\Model\Organization { $request = $this->createOrgRequest( $createOrgRequest ); @@ -122,8 +114,9 @@ private function createOrgWithHttpInfo( * @throws InvalidArgumentException */ private function createOrgRequest( - CreateOrgRequest $createOrgRequest + \Upsun\Model\CreateOrgRequest $createOrgRequest ): RequestInterface { + // verify the required parameter 'createOrgRequest' is set if (empty($createOrgRequest)) { throw new InvalidArgumentException( @@ -139,6 +132,8 @@ private function createOrgRequest( $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -271,6 +266,7 @@ private function deleteOrgWithHttpInfo( private function deleteOrgRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -296,6 +292,7 @@ private function deleteOrgRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -367,7 +364,7 @@ private function deleteOrgRequest( */ public function getOrg( string $organizationId - ): Organization { + ): \Upsun\Model\Organization { return $this->getOrgWithHttpInfo( $organizationId ); @@ -385,7 +382,7 @@ public function getOrg( */ private function getOrgWithHttpInfo( string $organizationId - ): Organization { + ): \Upsun\Model\Organization { $request = $this->getOrgRequest( $organizationId ); @@ -429,6 +426,7 @@ private function getOrgWithHttpInfo( private function getOrgRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -454,6 +452,7 @@ private function getOrgRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -535,21 +534,21 @@ private function getOrgRequest( * @see https://docs.upsun.com/api/#tag/Organizations/operation/list-orgs */ public function listOrgs( - ?StringFilter $filterId = null, - ?StringFilter $filterType = null, - ?StringFilter $filterOwnerId = null, - ?StringFilter $filterName = null, - ?StringFilter $filterLabel = null, - ?StringFilter $filterBillingProfileId = null, - ?StringFilter $filterVendor = null, - ?ArrayFilter $filterCapabilities = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterType = null, + ?\Upsun\Model\StringFilter $filterOwnerId = null, + ?\Upsun\Model\StringFilter $filterName = null, + ?\Upsun\Model\StringFilter $filterLabel = null, + ?\Upsun\Model\StringFilter $filterBillingProfileId = null, + ?\Upsun\Model\StringFilter $filterVendor = null, + ?\Upsun\Model\ArrayFilter $filterCapabilities = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListOrgs200Response { + ): \Upsun\Model\ListOrgs200Response { return $this->listOrgsWithHttpInfo( $filterId, $filterType, @@ -590,21 +589,21 @@ public function listOrgs( * @throws ClientExceptionInterface */ private function listOrgsWithHttpInfo( - ?StringFilter $filterId = null, - ?StringFilter $filterType = null, - ?StringFilter $filterOwnerId = null, - ?StringFilter $filterName = null, - ?StringFilter $filterLabel = null, - ?StringFilter $filterBillingProfileId = null, - ?StringFilter $filterVendor = null, - ?ArrayFilter $filterCapabilities = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterType = null, + ?\Upsun\Model\StringFilter $filterOwnerId = null, + ?\Upsun\Model\StringFilter $filterName = null, + ?\Upsun\Model\StringFilter $filterLabel = null, + ?\Upsun\Model\StringFilter $filterBillingProfileId = null, + ?\Upsun\Model\StringFilter $filterVendor = null, + ?\Upsun\Model\ArrayFilter $filterCapabilities = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListOrgs200Response { + ): \Upsun\Model\ListOrgs200Response { $request = $this->listOrgsRequest( $filterId, $filterType, @@ -670,21 +669,23 @@ private function listOrgsWithHttpInfo( * @throws InvalidArgumentException */ private function listOrgsRequest( - ?StringFilter $filterId = null, - ?StringFilter $filterType = null, - ?StringFilter $filterOwnerId = null, - ?StringFilter $filterName = null, - ?StringFilter $filterLabel = null, - ?StringFilter $filterBillingProfileId = null, - ?StringFilter $filterVendor = null, - ?ArrayFilter $filterCapabilities = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterType = null, + ?\Upsun\Model\StringFilter $filterOwnerId = null, + ?\Upsun\Model\StringFilter $filterName = null, + ?\Upsun\Model\StringFilter $filterLabel = null, + ?\Upsun\Model\StringFilter $filterBillingProfileId = null, + ?\Upsun\Model\StringFilter $filterVendor = null, + ?\Upsun\Model\ArrayFilter $filterCapabilities = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + + if ($pageSize !== null && $pageSize > 100) { throw new InvalidArgumentException( 'invalid value for "$pageSize" when calling OrganizationsApi.listOrgs, @@ -699,6 +700,8 @@ private function listOrgsRequest( ); } + + $resourcePath = '/organizations'; $formParams = []; $queryParams = []; @@ -719,6 +722,8 @@ private function listOrgsRequest( } } + + // query params if ($filterType !== null) { if ('form' === 'deepObject' && is_array($filterType)) { @@ -732,6 +737,8 @@ private function listOrgsRequest( } } + + // query params if ($filterOwnerId !== null) { if ('form' === 'deepObject' && is_array($filterOwnerId)) { @@ -745,6 +752,8 @@ private function listOrgsRequest( } } + + // query params if ($filterName !== null) { if ('form' === 'deepObject' && is_array($filterName)) { @@ -758,6 +767,8 @@ private function listOrgsRequest( } } + + // query params if ($filterLabel !== null) { if ('form' === 'deepObject' && is_array($filterLabel)) { @@ -771,6 +782,8 @@ private function listOrgsRequest( } } + + // query params if ($filterBillingProfileId !== null) { if ('form' === 'deepObject' && is_array($filterBillingProfileId)) { @@ -784,6 +797,8 @@ private function listOrgsRequest( } } + + // query params if ($filterVendor !== null) { if ('form' === 'deepObject' && is_array($filterVendor)) { @@ -797,6 +812,8 @@ private function listOrgsRequest( } } + + // query params if ($filterCapabilities !== null) { if ('form' === 'deepObject' && is_array($filterCapabilities)) { @@ -810,6 +827,8 @@ private function listOrgsRequest( } } + + // query params if ($filterStatus !== null) { if ('form' === 'deepObject' && is_array($filterStatus)) { @@ -823,6 +842,8 @@ private function listOrgsRequest( } } + + // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -836,6 +857,8 @@ private function listOrgsRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -849,6 +872,8 @@ private function listOrgsRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -862,6 +887,8 @@ private function listOrgsRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -875,6 +902,8 @@ private function listOrgsRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -888,6 +917,10 @@ private function listOrgsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -967,16 +1000,16 @@ private function listOrgsRequest( */ public function listUserOrgs( string $userId, - ?StringFilter $filterId = null, - ?StringFilter $filterType = null, - ?StringFilter $filterVendor = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterType = null, + ?\Upsun\Model\StringFilter $filterVendor = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListUserOrgs200Response { + ): \Upsun\Model\ListUserOrgs200Response { return $this->listUserOrgsWithHttpInfo( $userId, $filterId, @@ -1011,16 +1044,16 @@ public function listUserOrgs( */ private function listUserOrgsWithHttpInfo( string $userId, - ?StringFilter $filterId = null, - ?StringFilter $filterType = null, - ?StringFilter $filterVendor = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterType = null, + ?\Upsun\Model\StringFilter $filterVendor = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListUserOrgs200Response { + ): \Upsun\Model\ListUserOrgs200Response { $request = $this->listUserOrgsRequest( $userId, $filterId, @@ -1080,16 +1113,17 @@ private function listUserOrgsWithHttpInfo( */ private function listUserOrgsRequest( string $userId, - ?StringFilter $filterId = null, - ?StringFilter $filterType = null, - ?StringFilter $filterVendor = null, - ?StringFilter $filterStatus = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterType = null, + ?\Upsun\Model\StringFilter $filterVendor = null, + ?\Upsun\Model\StringFilter $filterStatus = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1112,6 +1146,8 @@ private function listUserOrgsRequest( ); } + + $resourcePath = '/users/{user_id}/organizations'; $formParams = []; $queryParams = []; @@ -1132,6 +1168,8 @@ private function listUserOrgsRequest( } } + + // query params if ($filterType !== null) { if ('form' === 'deepObject' && is_array($filterType)) { @@ -1145,6 +1183,8 @@ private function listUserOrgsRequest( } } + + // query params if ($filterVendor !== null) { if ('form' === 'deepObject' && is_array($filterVendor)) { @@ -1158,6 +1198,8 @@ private function listUserOrgsRequest( } } + + // query params if ($filterStatus !== null) { if ('form' === 'deepObject' && is_array($filterStatus)) { @@ -1171,6 +1213,8 @@ private function listUserOrgsRequest( } } + + // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -1184,6 +1228,8 @@ private function listUserOrgsRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1197,6 +1243,8 @@ private function listUserOrgsRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1210,6 +1258,8 @@ private function listUserOrgsRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1223,6 +1273,8 @@ private function listUserOrgsRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1236,6 +1288,8 @@ private function listUserOrgsRequest( } } + + // path params if ($userId !== null) { @@ -1246,6 +1300,7 @@ private function listUserOrgsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1316,8 +1371,8 @@ private function listUserOrgsRequest( */ public function updateOrg( string $organizationId, - ?UpdateOrgRequest $updateOrgRequest = null - ): Organization { + ?\Upsun\Model\UpdateOrgRequest $updateOrgRequest = null + ): \Upsun\Model\Organization { return $this->updateOrgWithHttpInfo( $organizationId, $updateOrgRequest @@ -1335,8 +1390,8 @@ public function updateOrg( */ private function updateOrgWithHttpInfo( string $organizationId, - ?UpdateOrgRequest $updateOrgRequest = null - ): Organization { + ?\Upsun\Model\UpdateOrgRequest $updateOrgRequest = null + ): \Upsun\Model\Organization { $request = $this->updateOrgRequest( $organizationId, $updateOrgRequest @@ -1379,8 +1434,9 @@ private function updateOrgWithHttpInfo( */ private function updateOrgRequest( string $organizationId, - ?UpdateOrgRequest $updateOrgRequest = null + ?\Upsun\Model\UpdateOrgRequest $updateOrgRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1406,6 +1462,7 @@ private function updateOrgRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/PhoneNumberApi.php b/src/Api/PhoneNumberApi.php index 9dc60f074..5addd60f1 100644 --- a/src/Api/PhoneNumberApi.php +++ b/src/Api/PhoneNumberApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ConfirmPhoneNumberRequest; -use Upsun\Model\VerifyPhoneNumber200Response; -use Upsun\Model\VerifyPhoneNumberRequest; /** * Low level PhoneNumberApi (auto-generated) @@ -27,13 +25,13 @@ final class PhoneNumberApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -66,7 +64,7 @@ public function __construct( public function confirmPhoneNumber( string $sid, string $userId, - ?ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null + ?\Upsun\Model\ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null ): void { $this->confirmPhoneNumberWithHttpInfo( $sid, @@ -88,7 +86,7 @@ public function confirmPhoneNumber( private function confirmPhoneNumberWithHttpInfo( string $sid, string $userId, - ?ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null + ?\Upsun\Model\ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null ): void { $request = $this->confirmPhoneNumberRequest( $sid, @@ -129,8 +127,9 @@ private function confirmPhoneNumberWithHttpInfo( private function confirmPhoneNumberRequest( string $sid, string $userId, - ?ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null + ?\Upsun\Model\ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null ): RequestInterface { + // verify the required parameter 'sid' is set if (empty($sid)) { throw new InvalidArgumentException( @@ -172,6 +171,7 @@ private function confirmPhoneNumberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -250,8 +250,8 @@ private function confirmPhoneNumberRequest( */ public function verifyPhoneNumber( string $userId, - ?VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null - ): VerifyPhoneNumber200Response { + ?\Upsun\Model\VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null + ): \Upsun\Model\VerifyPhoneNumber200Response { return $this->verifyPhoneNumberWithHttpInfo( $userId, $verifyPhoneNumberRequest @@ -269,8 +269,8 @@ public function verifyPhoneNumber( */ private function verifyPhoneNumberWithHttpInfo( string $userId, - ?VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null - ): VerifyPhoneNumber200Response { + ?\Upsun\Model\VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null + ): \Upsun\Model\VerifyPhoneNumber200Response { $request = $this->verifyPhoneNumberRequest( $userId, $verifyPhoneNumberRequest @@ -313,8 +313,9 @@ private function verifyPhoneNumberWithHttpInfo( */ private function verifyPhoneNumberRequest( string $userId, - ?VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null + ?\Upsun\Model\VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -340,6 +341,7 @@ private function verifyPhoneNumberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ProfilesApi.php b/src/Api/ProfilesApi.php index 345d62b58..88c025c79 100644 --- a/src/Api/ProfilesApi.php +++ b/src/Api/ProfilesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Address; -use Upsun\Model\Profile; -use Upsun\Model\UpdateOrgProfileRequest; /** * Low level ProfilesApi (auto-generated) @@ -27,13 +25,13 @@ final class ProfilesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -65,7 +63,7 @@ public function __construct( */ public function getOrgAddress( string $organizationId - ): Address { + ): \Upsun\Model\Address { return $this->getOrgAddressWithHttpInfo( $organizationId ); @@ -83,7 +81,7 @@ public function getOrgAddress( */ private function getOrgAddressWithHttpInfo( string $organizationId - ): Address { + ): \Upsun\Model\Address { $request = $this->getOrgAddressRequest( $organizationId ); @@ -127,6 +125,7 @@ private function getOrgAddressWithHttpInfo( private function getOrgAddressRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -152,6 +151,7 @@ private function getOrgAddressRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -223,7 +223,7 @@ private function getOrgAddressRequest( */ public function getOrgProfile( string $organizationId - ): Profile { + ): \Upsun\Model\Profile { return $this->getOrgProfileWithHttpInfo( $organizationId ); @@ -241,7 +241,7 @@ public function getOrgProfile( */ private function getOrgProfileWithHttpInfo( string $organizationId - ): Profile { + ): \Upsun\Model\Profile { $request = $this->getOrgProfileRequest( $organizationId ); @@ -285,6 +285,7 @@ private function getOrgProfileWithHttpInfo( private function getOrgProfileRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -310,6 +311,7 @@ private function getOrgProfileRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -380,8 +382,8 @@ private function getOrgProfileRequest( */ public function updateOrgAddress( string $organizationId, - ?Address $address = null - ): Address { + ?\Upsun\Model\Address $address = null + ): \Upsun\Model\Address { return $this->updateOrgAddressWithHttpInfo( $organizationId, $address @@ -399,8 +401,8 @@ public function updateOrgAddress( */ private function updateOrgAddressWithHttpInfo( string $organizationId, - ?Address $address = null - ): Address { + ?\Upsun\Model\Address $address = null + ): \Upsun\Model\Address { $request = $this->updateOrgAddressRequest( $organizationId, $address @@ -443,8 +445,9 @@ private function updateOrgAddressWithHttpInfo( */ private function updateOrgAddressRequest( string $organizationId, - ?Address $address = null + ?\Upsun\Model\Address $address = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -470,6 +473,7 @@ private function updateOrgAddressRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -548,8 +552,8 @@ private function updateOrgAddressRequest( */ public function updateOrgProfile( string $organizationId, - ?UpdateOrgProfileRequest $updateOrgProfileRequest = null - ): Profile { + ?\Upsun\Model\UpdateOrgProfileRequest $updateOrgProfileRequest = null + ): \Upsun\Model\Profile { return $this->updateOrgProfileWithHttpInfo( $organizationId, $updateOrgProfileRequest @@ -567,8 +571,8 @@ public function updateOrgProfile( */ private function updateOrgProfileWithHttpInfo( string $organizationId, - ?UpdateOrgProfileRequest $updateOrgProfileRequest = null - ): Profile { + ?\Upsun\Model\UpdateOrgProfileRequest $updateOrgProfileRequest = null + ): \Upsun\Model\Profile { $request = $this->updateOrgProfileRequest( $organizationId, $updateOrgProfileRequest @@ -611,8 +615,9 @@ private function updateOrgProfileWithHttpInfo( */ private function updateOrgProfileRequest( string $organizationId, - ?UpdateOrgProfileRequest $updateOrgProfileRequest = null + ?\Upsun\Model\UpdateOrgProfileRequest $updateOrgProfileRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -638,6 +643,7 @@ private function updateOrgProfileRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/ProjectActivityApi.php b/src/Api/ProjectActivityApi.php index 6998f4e1c..857e5b55c 100644 --- a/src/Api/ProjectActivityApi.php +++ b/src/Api/ProjectActivityApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Activity; /** * Low level ProjectActivityApi (auto-generated) @@ -26,13 +25,13 @@ final class ProjectActivityApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -64,7 +63,7 @@ public function __construct( public function actionProjectsActivitiesCancel( string $projectId, string $activityId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->actionProjectsActivitiesCancelWithHttpInfo( $projectId, $activityId @@ -81,7 +80,7 @@ public function actionProjectsActivitiesCancel( private function actionProjectsActivitiesCancelWithHttpInfo( string $projectId, string $activityId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->actionProjectsActivitiesCancelRequest( $projectId, $activityId @@ -124,6 +123,7 @@ private function actionProjectsActivitiesCancelRequest( string $projectId, string $activityId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -165,6 +165,7 @@ private function actionProjectsActivitiesCancelRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -236,7 +237,7 @@ private function actionProjectsActivitiesCancelRequest( public function getProjectsActivities( string $projectId, string $activityId - ): Activity { + ): \Upsun\Model\Activity { return $this->getProjectsActivitiesWithHttpInfo( $projectId, $activityId @@ -253,7 +254,7 @@ public function getProjectsActivities( private function getProjectsActivitiesWithHttpInfo( string $projectId, string $activityId - ): Activity { + ): \Upsun\Model\Activity { $request = $this->getProjectsActivitiesRequest( $projectId, $activityId @@ -296,6 +297,7 @@ private function getProjectsActivitiesRequest( string $projectId, string $activityId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -337,6 +339,7 @@ private function getProjectsActivitiesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -476,6 +479,7 @@ private function listProjectsActivitiesWithHttpInfo( private function listProjectsActivitiesRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -501,6 +505,7 @@ private function listProjectsActivitiesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ProjectApi.php b/src/Api/ProjectApi.php index ab9332f30..988ae16ab 100644 --- a/src/Api/ProjectApi.php +++ b/src/Api/ProjectApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Project; -use Upsun\Model\ProjectCapabilities; /** * Low level ProjectApi (auto-generated) @@ -27,13 +25,13 @@ final class ProjectApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -64,7 +62,7 @@ public function __construct( */ public function actionProjectsClearBuildCache( string $projectId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->actionProjectsClearBuildCacheWithHttpInfo( $projectId ); @@ -79,7 +77,7 @@ public function actionProjectsClearBuildCache( */ private function actionProjectsClearBuildCacheWithHttpInfo( string $projectId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->actionProjectsClearBuildCacheRequest( $projectId ); @@ -120,6 +118,7 @@ private function actionProjectsClearBuildCacheWithHttpInfo( private function actionProjectsClearBuildCacheRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -145,6 +144,7 @@ private function actionProjectsClearBuildCacheRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -213,7 +213,7 @@ private function actionProjectsClearBuildCacheRequest( */ public function getProjects( string $projectId - ): Project { + ): \Upsun\Model\Project { return $this->getProjectsWithHttpInfo( $projectId ); @@ -228,7 +228,7 @@ public function getProjects( */ private function getProjectsWithHttpInfo( string $projectId - ): Project { + ): \Upsun\Model\Project { $request = $this->getProjectsRequest( $projectId ); @@ -269,6 +269,7 @@ private function getProjectsWithHttpInfo( private function getProjectsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -294,6 +295,7 @@ private function getProjectsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -363,7 +365,7 @@ private function getProjectsRequest( */ public function getProjectsCapabilities( string $projectId - ): ProjectCapabilities { + ): \Upsun\Model\ProjectCapabilities { return $this->getProjectsCapabilitiesWithHttpInfo( $projectId ); @@ -378,7 +380,7 @@ public function getProjectsCapabilities( */ private function getProjectsCapabilitiesWithHttpInfo( string $projectId - ): ProjectCapabilities { + ): \Upsun\Model\ProjectCapabilities { $request = $this->getProjectsCapabilitiesRequest( $projectId ); @@ -419,6 +421,7 @@ private function getProjectsCapabilitiesWithHttpInfo( private function getProjectsCapabilitiesRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -444,6 +447,7 @@ private function getProjectsCapabilitiesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -509,7 +513,7 @@ private function getProjectsCapabilitiesRequest( */ public function maintenanceRedeployProject( string $projectId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->maintenanceRedeployProjectWithHttpInfo( $projectId ); @@ -523,7 +527,7 @@ public function maintenanceRedeployProject( */ private function maintenanceRedeployProjectWithHttpInfo( string $projectId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->maintenanceRedeployProjectRequest( $projectId ); @@ -564,6 +568,7 @@ private function maintenanceRedeployProjectWithHttpInfo( private function maintenanceRedeployProjectRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -589,6 +594,7 @@ private function maintenanceRedeployProjectRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ProjectInvitationsApi.php b/src/Api/ProjectInvitationsApi.php index ceae532c9..6fd49aec5 100644 --- a/src/Api/ProjectInvitationsApi.php +++ b/src/Api/ProjectInvitationsApi.php @@ -13,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CreateProjectInviteRequest; -use Upsun\Model\ProjectInvitation; -use Upsun\Model\StringFilter; /** * Low level ProjectInvitationsApi (auto-generated) @@ -28,13 +25,13 @@ final class ProjectInvitationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -130,6 +127,7 @@ private function cancelProjectInviteRequest( string $projectId, string $invitationId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -171,6 +169,7 @@ private function cancelProjectInviteRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -241,8 +240,8 @@ private function cancelProjectInviteRequest( */ public function createProjectInvite( string $projectId, - ?CreateProjectInviteRequest $createProjectInviteRequest = null - ): ProjectInvitation { + ?\Upsun\Model\CreateProjectInviteRequest $createProjectInviteRequest = null + ): \Upsun\Model\ProjectInvitation { return $this->createProjectInviteWithHttpInfo( $projectId, $createProjectInviteRequest @@ -260,8 +259,8 @@ public function createProjectInvite( */ private function createProjectInviteWithHttpInfo( string $projectId, - ?CreateProjectInviteRequest $createProjectInviteRequest = null - ): ProjectInvitation { + ?\Upsun\Model\CreateProjectInviteRequest $createProjectInviteRequest = null + ): \Upsun\Model\ProjectInvitation { $request = $this->createProjectInviteRequest( $projectId, $createProjectInviteRequest @@ -304,8 +303,9 @@ private function createProjectInviteWithHttpInfo( */ private function createProjectInviteRequest( string $projectId, - ?CreateProjectInviteRequest $createProjectInviteRequest = null + ?\Upsun\Model\CreateProjectInviteRequest $createProjectInviteRequest = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -331,6 +331,7 @@ private function createProjectInviteRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -416,7 +417,7 @@ private function createProjectInviteRequest( */ public function listProjectInvites( string $projectId, - ?StringFilter $filterState = null, + ?\Upsun\Model\StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -450,7 +451,7 @@ public function listProjectInvites( */ private function listProjectInvitesWithHttpInfo( string $projectId, - ?StringFilter $filterState = null, + ?\Upsun\Model\StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -507,12 +508,13 @@ private function listProjectInvitesWithHttpInfo( */ private function listProjectInvitesRequest( string $projectId, - ?StringFilter $filterState = null, + ?\Upsun\Model\StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -535,6 +537,8 @@ private function listProjectInvitesRequest( ); } + + $resourcePath = '/projects/{project_id}/invitations'; $formParams = []; $queryParams = []; @@ -555,6 +559,8 @@ private function listProjectInvitesRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -568,6 +574,8 @@ private function listProjectInvitesRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -581,6 +589,8 @@ private function listProjectInvitesRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -594,6 +604,8 @@ private function listProjectInvitesRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -607,6 +619,8 @@ private function listProjectInvitesRequest( } } + + // path params if ($projectId !== null) { @@ -617,6 +631,7 @@ private function listProjectInvitesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ProjectSettingsApi.php b/src/Api/ProjectSettingsApi.php index 42fda5de4..f86245677 100644 --- a/src/Api/ProjectSettingsApi.php +++ b/src/Api/ProjectSettingsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\ProjectSettings; -use Upsun\Model\ProjectSettingsPatch; /** * Low level ProjectSettingsApi (auto-generated) @@ -27,13 +25,13 @@ final class ProjectSettingsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -62,7 +60,7 @@ public function __construct( */ public function getProjectsSettings( string $projectId - ): ProjectSettings { + ): \Upsun\Model\ProjectSettings { return $this->getProjectsSettingsWithHttpInfo( $projectId ); @@ -77,7 +75,7 @@ public function getProjectsSettings( */ private function getProjectsSettingsWithHttpInfo( string $projectId - ): ProjectSettings { + ): \Upsun\Model\ProjectSettings { $request = $this->getProjectsSettingsRequest( $projectId ); @@ -118,6 +116,7 @@ private function getProjectsSettingsWithHttpInfo( private function getProjectsSettingsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -143,6 +142,7 @@ private function getProjectsSettingsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -212,8 +212,8 @@ private function getProjectsSettingsRequest( */ public function updateProjectsSettings( string $projectId, - ProjectSettingsPatch $projectSettingsPatch - ): AcceptedResponse { + \Upsun\Model\ProjectSettingsPatch $projectSettingsPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsSettingsWithHttpInfo( $projectId, $projectSettingsPatch @@ -230,8 +230,8 @@ public function updateProjectsSettings( */ private function updateProjectsSettingsWithHttpInfo( string $projectId, - ProjectSettingsPatch $projectSettingsPatch - ): AcceptedResponse { + \Upsun\Model\ProjectSettingsPatch $projectSettingsPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsSettingsRequest( $projectId, $projectSettingsPatch @@ -273,8 +273,9 @@ private function updateProjectsSettingsWithHttpInfo( */ private function updateProjectsSettingsRequest( string $projectId, - ProjectSettingsPatch $projectSettingsPatch + \Upsun\Model\ProjectSettingsPatch $projectSettingsPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -307,6 +308,7 @@ private function updateProjectsSettingsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ProjectVariablesApi.php b/src/Api/ProjectVariablesApi.php index 042b786c9..49495fa93 100644 --- a/src/Api/ProjectVariablesApi.php +++ b/src/Api/ProjectVariablesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\ProjectVariable; -use Upsun\Model\ProjectVariableCreateInput; -use Upsun\Model\ProjectVariablePatch; /** * Low level ProjectVariablesApi (auto-generated) @@ -28,13 +25,13 @@ final class ProjectVariablesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -66,8 +63,8 @@ public function __construct( */ public function createProjectsVariables( string $projectId, - ProjectVariableCreateInput $projectVariableCreateInput - ): AcceptedResponse { + \Upsun\Model\ProjectVariableCreateInput $projectVariableCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsVariablesWithHttpInfo( $projectId, $projectVariableCreateInput @@ -84,8 +81,8 @@ public function createProjectsVariables( */ private function createProjectsVariablesWithHttpInfo( string $projectId, - ProjectVariableCreateInput $projectVariableCreateInput - ): AcceptedResponse { + \Upsun\Model\ProjectVariableCreateInput $projectVariableCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsVariablesRequest( $projectId, $projectVariableCreateInput @@ -127,8 +124,9 @@ private function createProjectsVariablesWithHttpInfo( */ private function createProjectsVariablesRequest( string $projectId, - ProjectVariableCreateInput $projectVariableCreateInput + \Upsun\Model\ProjectVariableCreateInput $projectVariableCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -161,6 +159,7 @@ private function createProjectsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -238,7 +237,7 @@ private function createProjectsVariablesRequest( public function deleteProjectsVariables( string $projectId, string $projectVariableId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsVariablesWithHttpInfo( $projectId, $projectVariableId @@ -255,7 +254,7 @@ public function deleteProjectsVariables( private function deleteProjectsVariablesWithHttpInfo( string $projectId, string $projectVariableId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsVariablesRequest( $projectId, $projectVariableId @@ -298,6 +297,7 @@ private function deleteProjectsVariablesRequest( string $projectId, string $projectVariableId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -339,6 +339,7 @@ private function deleteProjectsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -408,7 +409,7 @@ private function deleteProjectsVariablesRequest( public function getProjectsVariables( string $projectId, string $projectVariableId - ): ProjectVariable { + ): \Upsun\Model\ProjectVariable { return $this->getProjectsVariablesWithHttpInfo( $projectId, $projectVariableId @@ -425,7 +426,7 @@ public function getProjectsVariables( private function getProjectsVariablesWithHttpInfo( string $projectId, string $projectVariableId - ): ProjectVariable { + ): \Upsun\Model\ProjectVariable { $request = $this->getProjectsVariablesRequest( $projectId, $projectVariableId @@ -468,6 +469,7 @@ private function getProjectsVariablesRequest( string $projectId, string $projectVariableId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -509,6 +511,7 @@ private function getProjectsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -637,6 +640,7 @@ private function listProjectsVariablesWithHttpInfo( private function listProjectsVariablesRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -662,6 +666,7 @@ private function listProjectsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -735,8 +740,8 @@ private function listProjectsVariablesRequest( public function updateProjectsVariables( string $projectId, string $projectVariableId, - ProjectVariablePatch $projectVariablePatch - ): AcceptedResponse { + \Upsun\Model\ProjectVariablePatch $projectVariablePatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsVariablesWithHttpInfo( $projectId, $projectVariableId, @@ -755,8 +760,8 @@ public function updateProjectsVariables( private function updateProjectsVariablesWithHttpInfo( string $projectId, string $projectVariableId, - ProjectVariablePatch $projectVariablePatch - ): AcceptedResponse { + \Upsun\Model\ProjectVariablePatch $projectVariablePatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsVariablesRequest( $projectId, $projectVariableId, @@ -800,8 +805,9 @@ private function updateProjectsVariablesWithHttpInfo( private function updateProjectsVariablesRequest( string $projectId, string $projectVariableId, - ProjectVariablePatch $projectVariablePatch + \Upsun\Model\ProjectVariablePatch $projectVariablePatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -850,6 +856,7 @@ private function updateProjectsVariablesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index b24ab1fda..265cb5a5c 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -24,13 +25,13 @@ final class ProjectsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -42,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -132,6 +133,7 @@ private function listOrgProjectHistoryRequest( string $organizationId, string $projectId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -173,6 +175,7 @@ private function listOrgProjectHistoryRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/RecordsApi.php b/src/Api/RecordsApi.php index 1b58f10cb..e0d5bd2c8 100644 --- a/src/Api/RecordsApi.php +++ b/src/Api/RecordsApi.php @@ -13,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ListOrgPlanRecords200Response; -use Upsun\Model\ListOrgUsageRecords200Response; /** * Low level RecordsApi (auto-generated) @@ -27,13 +25,13 @@ final class RecordsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -64,19 +62,19 @@ public function __construct( * The plan type of the subscription. (optional) * @param string|null $filterStatus * The status of the plan record. (optional) - * @param DateTime|null $filterStart + * @param \DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param DateTime|null $filterEnd + * @param \DateTime|null $filterEnd * The end of the observation period for the record. E.g. filter[end]=2018-01-01 * will display all records that were active on (i.e. they started before) * 2018-01-01 (optional) - * @param DateTime|null $filterStartedAt + * @param \DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) - * @param DateTime|null $filterEndedAt + * @param \DateTime|null $filterEndedAt * The record's end timestamp. You can use this filter to list records ended after, * or before a certain time. E.g. * filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=> (optional) @@ -92,12 +90,12 @@ public function listOrgPlanRecords( ?string $filterSubscriptionId = null, ?string $filterPlan = null, ?string $filterStatus = null, - ?DateTime $filterStart = null, - ?DateTime $filterEnd = null, - ?DateTime $filterStartedAt = null, - ?DateTime $filterEndedAt = null, + ?\DateTime $filterStart = null, + ?\DateTime $filterEnd = null, + ?\DateTime $filterStartedAt = null, + ?\DateTime $filterEndedAt = null, ?int $page = null - ): ListOrgPlanRecords200Response { + ): \Upsun\Model\ListOrgPlanRecords200Response { return $this->listOrgPlanRecordsWithHttpInfo( $organizationId, $filterSubscriptionId, @@ -123,19 +121,19 @@ public function listOrgPlanRecords( * The plan type of the subscription. (optional) * @param string|null $filterStatus * The status of the plan record. (optional) - * @param DateTime|null $filterStart + * @param \DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param DateTime|null $filterEnd + * @param \DateTime|null $filterEnd * The end of the observation period for the record. E.g. filter[end]=2018-01-01 * will display all records that were active on (i.e. they started before) * 2018-01-01 (optional) - * @param DateTime|null $filterStartedAt + * @param \DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) - * @param DateTime|null $filterEndedAt + * @param \DateTime|null $filterEndedAt * The record's end timestamp. You can use this filter to list records ended after, * or before a certain time. E.g. * filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=> (optional) @@ -150,12 +148,12 @@ private function listOrgPlanRecordsWithHttpInfo( ?string $filterSubscriptionId = null, ?string $filterPlan = null, ?string $filterStatus = null, - ?DateTime $filterStart = null, - ?DateTime $filterEnd = null, - ?DateTime $filterStartedAt = null, - ?DateTime $filterEndedAt = null, + ?\DateTime $filterStart = null, + ?\DateTime $filterEnd = null, + ?\DateTime $filterStartedAt = null, + ?\DateTime $filterEndedAt = null, ?int $page = null - ): ListOrgPlanRecords200Response { + ): \Upsun\Model\ListOrgPlanRecords200Response { $request = $this->listOrgPlanRecordsRequest( $organizationId, $filterSubscriptionId, @@ -207,19 +205,19 @@ private function listOrgPlanRecordsWithHttpInfo( * The plan type of the subscription. (optional) * @param string|null $filterStatus * The status of the plan record. (optional) - * @param DateTime|null $filterStart + * @param \DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param DateTime|null $filterEnd + * @param \DateTime|null $filterEnd * The end of the observation period for the record. E.g. filter[end]=2018-01-01 * will display all records that were active on (i.e. they started before) * 2018-01-01 (optional) - * @param DateTime|null $filterStartedAt + * @param \DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) - * @param DateTime|null $filterEndedAt + * @param \DateTime|null $filterEndedAt * The record's end timestamp. You can use this filter to list records ended after, * or before a certain time. E.g. * filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=> (optional) @@ -233,12 +231,13 @@ private function listOrgPlanRecordsRequest( ?string $filterSubscriptionId = null, ?string $filterPlan = null, ?string $filterStatus = null, - ?DateTime $filterStart = null, - ?DateTime $filterEnd = null, - ?DateTime $filterStartedAt = null, - ?DateTime $filterEndedAt = null, + ?\DateTime $filterStart = null, + ?\DateTime $filterEnd = null, + ?\DateTime $filterStartedAt = null, + ?\DateTime $filterEndedAt = null, ?int $page = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -267,6 +266,8 @@ private function listOrgPlanRecordsRequest( } } + + // query params if ($filterPlan !== null) { if ('form' === 'form' && is_array($filterPlan)) { @@ -280,6 +281,8 @@ private function listOrgPlanRecordsRequest( } } + + // query params if ($filterStatus !== null) { if ('form' === 'form' && is_array($filterStatus)) { @@ -293,6 +296,8 @@ private function listOrgPlanRecordsRequest( } } + + // query params if ($filterStart !== null) { if ('form' === 'form' && is_array($filterStart)) { @@ -306,6 +311,8 @@ private function listOrgPlanRecordsRequest( } } + + // query params if ($filterEnd !== null) { if ('form' === 'form' && is_array($filterEnd)) { @@ -319,6 +326,8 @@ private function listOrgPlanRecordsRequest( } } + + // query params if ($filterStartedAt !== null) { if ('form' === 'form' && is_array($filterStartedAt)) { @@ -332,6 +341,8 @@ private function listOrgPlanRecordsRequest( } } + + // query params if ($filterEndedAt !== null) { if ('form' === 'form' && is_array($filterEndedAt)) { @@ -345,6 +356,8 @@ private function listOrgPlanRecordsRequest( } } + + // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -358,6 +371,8 @@ private function listOrgPlanRecordsRequest( } } + + // path params if ($organizationId !== null) { @@ -368,6 +383,7 @@ private function listOrgPlanRecordsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -436,11 +452,11 @@ private function listOrgPlanRecordsRequest( * The ID of the subscription (optional) * @param string|null $filterUsageGroup * Filter records by the type of usage. (optional) - * @param DateTime|null $filterStart + * @param \DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param DateTime|null $filterStartedAt + * @param \DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) @@ -455,10 +471,10 @@ public function listOrgUsageRecords( string $organizationId, ?string $filterSubscriptionId = null, ?string $filterUsageGroup = null, - ?DateTime $filterStart = null, - ?DateTime $filterStartedAt = null, + ?\DateTime $filterStart = null, + ?\DateTime $filterStartedAt = null, ?int $page = null - ): ListOrgUsageRecords200Response { + ): \Upsun\Model\ListOrgUsageRecords200Response { return $this->listOrgUsageRecordsWithHttpInfo( $organizationId, $filterSubscriptionId, @@ -479,11 +495,11 @@ public function listOrgUsageRecords( * The ID of the subscription (optional) * @param string|null $filterUsageGroup * Filter records by the type of usage. (optional) - * @param DateTime|null $filterStart + * @param \DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param DateTime|null $filterStartedAt + * @param \DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) @@ -497,10 +513,10 @@ private function listOrgUsageRecordsWithHttpInfo( string $organizationId, ?string $filterSubscriptionId = null, ?string $filterUsageGroup = null, - ?DateTime $filterStart = null, - ?DateTime $filterStartedAt = null, + ?\DateTime $filterStart = null, + ?\DateTime $filterStartedAt = null, ?int $page = null - ): ListOrgUsageRecords200Response { + ): \Upsun\Model\ListOrgUsageRecords200Response { $request = $this->listOrgUsageRecordsRequest( $organizationId, $filterSubscriptionId, @@ -547,11 +563,11 @@ private function listOrgUsageRecordsWithHttpInfo( * The ID of the subscription (optional) * @param string|null $filterUsageGroup * Filter records by the type of usage. (optional) - * @param DateTime|null $filterStart + * @param \DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param DateTime|null $filterStartedAt + * @param \DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) @@ -564,10 +580,11 @@ private function listOrgUsageRecordsRequest( string $organizationId, ?string $filterSubscriptionId = null, ?string $filterUsageGroup = null, - ?DateTime $filterStart = null, - ?DateTime $filterStartedAt = null, + ?\DateTime $filterStart = null, + ?\DateTime $filterStartedAt = null, ?int $page = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -596,6 +613,8 @@ private function listOrgUsageRecordsRequest( } } + + // query params if ($filterUsageGroup !== null) { if ('form' === 'form' && is_array($filterUsageGroup)) { @@ -609,6 +628,8 @@ private function listOrgUsageRecordsRequest( } } + + // query params if ($filterStart !== null) { if ('form' === 'form' && is_array($filterStart)) { @@ -622,6 +643,8 @@ private function listOrgUsageRecordsRequest( } } + + // query params if ($filterStartedAt !== null) { if ('form' === 'form' && is_array($filterStartedAt)) { @@ -635,6 +658,8 @@ private function listOrgUsageRecordsRequest( } } + + // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -648,6 +673,8 @@ private function listOrgUsageRecordsRequest( } } + + // path params if ($organizationId !== null) { @@ -658,6 +685,7 @@ private function listOrgUsageRecordsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/ReferencesApi.php b/src/Api/ReferencesApi.php index a88ffe76e..594f146a2 100644 --- a/src/Api/ReferencesApi.php +++ b/src/Api/ReferencesApi.php @@ -25,13 +25,13 @@ final class ReferencesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -133,6 +133,7 @@ private function listReferencedOrgsRequest( string $in, string $sig ): RequestInterface { + // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -168,6 +169,8 @@ private function listReferencedOrgsRequest( } } + + // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -181,6 +184,10 @@ private function listReferencedOrgsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -322,6 +329,7 @@ private function listReferencedProjectsRequest( string $in, string $sig ): RequestInterface { + // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -357,6 +365,8 @@ private function listReferencedProjectsRequest( } } + + // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -370,6 +380,10 @@ private function listReferencedProjectsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -511,6 +525,7 @@ private function listReferencedRegionsRequest( string $in, string $sig ): RequestInterface { + // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -546,6 +561,8 @@ private function listReferencedRegionsRequest( } } + + // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -559,6 +576,10 @@ private function listReferencedRegionsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -700,6 +721,7 @@ private function listReferencedTeamsRequest( string $in, string $sig ): RequestInterface { + // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -735,6 +757,8 @@ private function listReferencedTeamsRequest( } } + + // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -748,6 +772,10 @@ private function listReferencedTeamsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -889,6 +917,7 @@ private function listReferencedUsersRequest( string $in, string $sig ): RequestInterface { + // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -924,6 +953,8 @@ private function listReferencedUsersRequest( } } + + // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -937,6 +968,10 @@ private function listReferencedUsersRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/RegionsApi.php b/src/Api/RegionsApi.php index 28bc68cfe..bd522b955 100644 --- a/src/Api/RegionsApi.php +++ b/src/Api/RegionsApi.php @@ -13,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Region; -use Upsun\Model\StringFilter; /** * Low level RegionsApi (auto-generated) @@ -27,13 +25,13 @@ final class RegionsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -64,7 +62,7 @@ public function __construct( */ public function getRegion( string $regionId - ): Region { + ): \Upsun\Model\Region { return $this->getRegionWithHttpInfo( $regionId ); @@ -81,7 +79,7 @@ public function getRegion( */ private function getRegionWithHttpInfo( string $regionId - ): Region { + ): \Upsun\Model\Region { $request = $this->getRegionRequest( $regionId ); @@ -124,6 +122,7 @@ private function getRegionWithHttpInfo( private function getRegionRequest( string $regionId ): RequestInterface { + // verify the required parameter 'regionId' is set if (empty($regionId)) { throw new InvalidArgumentException( @@ -149,6 +148,7 @@ private function getRegionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -228,9 +228,9 @@ private function getRegionRequest( * @see https://docs.upsun.com/api/#tag/Regions/operation/list-regions */ public function listRegions( - ?StringFilter $filterAvailable = null, - ?StringFilter $filterPrivate = null, - ?StringFilter $filterZone = null, + ?\Upsun\Model\StringFilter $filterAvailable = null, + ?\Upsun\Model\StringFilter $filterPrivate = null, + ?\Upsun\Model\StringFilter $filterZone = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -267,9 +267,9 @@ public function listRegions( * @throws ClientExceptionInterface */ private function listRegionsWithHttpInfo( - ?StringFilter $filterAvailable = null, - ?StringFilter $filterPrivate = null, - ?StringFilter $filterZone = null, + ?\Upsun\Model\StringFilter $filterAvailable = null, + ?\Upsun\Model\StringFilter $filterPrivate = null, + ?\Upsun\Model\StringFilter $filterZone = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -331,14 +331,16 @@ private function listRegionsWithHttpInfo( * @throws InvalidArgumentException */ private function listRegionsRequest( - ?StringFilter $filterAvailable = null, - ?StringFilter $filterPrivate = null, - ?StringFilter $filterZone = null, + ?\Upsun\Model\StringFilter $filterAvailable = null, + ?\Upsun\Model\StringFilter $filterPrivate = null, + ?\Upsun\Model\StringFilter $filterZone = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + + if ($pageSize !== null && $pageSize > 100) { throw new InvalidArgumentException( 'invalid value for "$pageSize" when calling RegionsApi.listRegions, @@ -353,6 +355,8 @@ private function listRegionsRequest( ); } + + $resourcePath = '/regions'; $formParams = []; $queryParams = []; @@ -373,6 +377,8 @@ private function listRegionsRequest( } } + + // query params if ($filterPrivate !== null) { if ('form' === 'deepObject' && is_array($filterPrivate)) { @@ -386,6 +392,8 @@ private function listRegionsRequest( } } + + // query params if ($filterZone !== null) { if ('form' === 'deepObject' && is_array($filterZone)) { @@ -399,6 +407,8 @@ private function listRegionsRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -412,6 +422,8 @@ private function listRegionsRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -425,6 +437,8 @@ private function listRegionsRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -438,6 +452,8 @@ private function listRegionsRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -451,6 +467,10 @@ private function listRegionsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/RegistryCredentialApi.php b/src/Api/RegistryCredentialApi.php index 8d15f9694..388ba7baf 100644 --- a/src/Api/RegistryCredentialApi.php +++ b/src/Api/RegistryCredentialApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\RegistryCredential; -use Upsun\Model\RegistryCredentialCreateInput; -use Upsun\Model\RegistryCredentialPatch; /** * Low level RegistryCredentialApi (auto-generated) @@ -28,13 +25,13 @@ final class RegistryCredentialApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -61,8 +58,8 @@ public function __construct( */ public function createProjectsOciRegistries( string $projectId, - RegistryCredentialCreateInput $registryCredentialCreateInput - ): AcceptedResponse { + \Upsun\Model\RegistryCredentialCreateInput $registryCredentialCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialCreateInput @@ -78,8 +75,8 @@ public function createProjectsOciRegistries( */ private function createProjectsOciRegistriesWithHttpInfo( string $projectId, - RegistryCredentialCreateInput $registryCredentialCreateInput - ): AcceptedResponse { + \Upsun\Model\RegistryCredentialCreateInput $registryCredentialCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsOciRegistriesRequest( $projectId, $registryCredentialCreateInput @@ -121,8 +118,9 @@ private function createProjectsOciRegistriesWithHttpInfo( */ private function createProjectsOciRegistriesRequest( string $projectId, - RegistryCredentialCreateInput $registryCredentialCreateInput + \Upsun\Model\RegistryCredentialCreateInput $registryCredentialCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -155,6 +153,7 @@ private function createProjectsOciRegistriesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -229,7 +228,7 @@ private function createProjectsOciRegistriesRequest( public function deleteProjectsOciRegistries( string $projectId, string $registryCredentialId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialId @@ -245,7 +244,7 @@ public function deleteProjectsOciRegistries( private function deleteProjectsOciRegistriesWithHttpInfo( string $projectId, string $registryCredentialId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsOciRegistriesRequest( $projectId, $registryCredentialId @@ -288,6 +287,7 @@ private function deleteProjectsOciRegistriesRequest( string $projectId, string $registryCredentialId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -329,6 +329,7 @@ private function deleteProjectsOciRegistriesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -395,7 +396,7 @@ private function deleteProjectsOciRegistriesRequest( public function getProjectsOciRegistries( string $projectId, string $registryCredentialId - ): RegistryCredential { + ): \Upsun\Model\RegistryCredential { return $this->getProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialId @@ -411,7 +412,7 @@ public function getProjectsOciRegistries( private function getProjectsOciRegistriesWithHttpInfo( string $projectId, string $registryCredentialId - ): RegistryCredential { + ): \Upsun\Model\RegistryCredential { $request = $this->getProjectsOciRegistriesRequest( $projectId, $registryCredentialId @@ -454,6 +455,7 @@ private function getProjectsOciRegistriesRequest( string $projectId, string $registryCredentialId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -495,6 +497,7 @@ private function getProjectsOciRegistriesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -619,6 +622,7 @@ private function listProjectsOciRegistriesWithHttpInfo( private function listProjectsOciRegistriesRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -644,6 +648,7 @@ private function listProjectsOciRegistriesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -711,8 +716,8 @@ private function listProjectsOciRegistriesRequest( public function updateProjectsOciRegistries( string $projectId, string $registryCredentialId, - RegistryCredentialPatch $registryCredentialPatch - ): AcceptedResponse { + \Upsun\Model\RegistryCredentialPatch $registryCredentialPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialId, @@ -730,8 +735,8 @@ public function updateProjectsOciRegistries( private function updateProjectsOciRegistriesWithHttpInfo( string $projectId, string $registryCredentialId, - RegistryCredentialPatch $registryCredentialPatch - ): AcceptedResponse { + \Upsun\Model\RegistryCredentialPatch $registryCredentialPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsOciRegistriesRequest( $projectId, $registryCredentialId, @@ -775,8 +780,9 @@ private function updateProjectsOciRegistriesWithHttpInfo( private function updateProjectsOciRegistriesRequest( string $projectId, string $registryCredentialId, - RegistryCredentialPatch $registryCredentialPatch + \Upsun\Model\RegistryCredentialPatch $registryCredentialPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -825,6 +831,7 @@ private function updateProjectsOciRegistriesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/RepositoryApi.php b/src/Api/RepositoryApi.php index e3001a084..eb7c1757c 100644 --- a/src/Api/RepositoryApi.php +++ b/src/Api/RepositoryApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Blob; -use Upsun\Model\Commit; -use Upsun\Model\Ref; -use Upsun\Model\Tree; /** * Low level RepositoryApi (auto-generated) @@ -28,13 +25,13 @@ final class RepositoryApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -66,7 +63,7 @@ public function __construct( public function getProjectsGitBlobs( string $projectId, string $repositoryBlobId - ): Blob { + ): \Upsun\Model\Blob { return $this->getProjectsGitBlobsWithHttpInfo( $projectId, $repositoryBlobId @@ -83,7 +80,7 @@ public function getProjectsGitBlobs( private function getProjectsGitBlobsWithHttpInfo( string $projectId, string $repositoryBlobId - ): Blob { + ): \Upsun\Model\Blob { $request = $this->getProjectsGitBlobsRequest( $projectId, $repositoryBlobId @@ -126,6 +123,7 @@ private function getProjectsGitBlobsRequest( string $projectId, string $repositoryBlobId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -167,6 +165,7 @@ private function getProjectsGitBlobsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -240,7 +239,7 @@ private function getProjectsGitBlobsRequest( public function getProjectsGitCommits( string $projectId, string $repositoryCommitId - ): Commit { + ): \Upsun\Model\Commit { return $this->getProjectsGitCommitsWithHttpInfo( $projectId, $repositoryCommitId @@ -257,7 +256,7 @@ public function getProjectsGitCommits( private function getProjectsGitCommitsWithHttpInfo( string $projectId, string $repositoryCommitId - ): Commit { + ): \Upsun\Model\Commit { $request = $this->getProjectsGitCommitsRequest( $projectId, $repositoryCommitId @@ -300,6 +299,7 @@ private function getProjectsGitCommitsRequest( string $projectId, string $repositoryCommitId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -341,6 +341,7 @@ private function getProjectsGitCommitsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -413,7 +414,7 @@ private function getProjectsGitCommitsRequest( public function getProjectsGitRefs( string $projectId, string $repositoryRefId - ): Ref { + ): \Upsun\Model\Ref { return $this->getProjectsGitRefsWithHttpInfo( $projectId, $repositoryRefId @@ -430,7 +431,7 @@ public function getProjectsGitRefs( private function getProjectsGitRefsWithHttpInfo( string $projectId, string $repositoryRefId - ): Ref { + ): \Upsun\Model\Ref { $request = $this->getProjectsGitRefsRequest( $projectId, $repositoryRefId @@ -473,6 +474,7 @@ private function getProjectsGitRefsRequest( string $projectId, string $repositoryRefId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -514,6 +516,7 @@ private function getProjectsGitRefsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -586,7 +589,7 @@ private function getProjectsGitRefsRequest( public function getProjectsGitTrees( string $projectId, string $repositoryTreeId - ): Tree { + ): \Upsun\Model\Tree { return $this->getProjectsGitTreesWithHttpInfo( $projectId, $repositoryTreeId @@ -603,7 +606,7 @@ public function getProjectsGitTrees( private function getProjectsGitTreesWithHttpInfo( string $projectId, string $repositoryTreeId - ): Tree { + ): \Upsun\Model\Tree { $request = $this->getProjectsGitTreesRequest( $projectId, $repositoryTreeId @@ -646,6 +649,7 @@ private function getProjectsGitTreesRequest( string $projectId, string $repositoryTreeId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -687,6 +691,7 @@ private function getProjectsGitTreesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -819,6 +824,7 @@ private function listProjectsGitRefsWithHttpInfo( private function listProjectsGitRefsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -844,6 +850,7 @@ private function listProjectsGitRefsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ResourcesApi.php b/src/Api/ResourcesApi.php index fc693959f..33e6a4c43 100644 --- a/src/Api/ResourcesApi.php +++ b/src/Api/ResourcesApi.php @@ -25,13 +25,13 @@ final class ResourcesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -170,6 +170,7 @@ private function resourcesByServiceRequest( ?array $aggs = null, ?array $types = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -178,6 +179,8 @@ private function resourcesByServiceRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ResourcesApi.resourcesByService, @@ -193,6 +196,8 @@ private function resourcesByServiceRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling ResourcesApi.resourcesByService, @@ -242,6 +247,8 @@ private function resourcesByServiceRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -255,6 +262,8 @@ private function resourcesByServiceRequest( } } + + // query params if ($aggs !== null) { if ('form' === 'form' && is_array($aggs)) { @@ -268,6 +277,8 @@ private function resourcesByServiceRequest( } } + + // query params if ($types !== null) { if ('form' === 'form' && is_array($types)) { @@ -281,6 +292,8 @@ private function resourcesByServiceRequest( } } + + // path params if ($projectId !== null) { @@ -309,6 +322,7 @@ private function resourcesByServiceRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -487,6 +501,7 @@ private function resourcesOverviewRequest( ?array $services = null, ?string $servicesMode = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -495,6 +510,8 @@ private function resourcesOverviewRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ResourcesApi.resourcesOverview, @@ -510,6 +527,8 @@ private function resourcesOverviewRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling ResourcesApi.resourcesOverview, @@ -552,6 +571,8 @@ private function resourcesOverviewRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -565,6 +586,8 @@ private function resourcesOverviewRequest( } } + + // query params if ($service !== null) { if ('form' === 'form' && is_array($service)) { @@ -578,6 +601,8 @@ private function resourcesOverviewRequest( } } + + // query params if ($services !== null) { if ('form' === 'form' && is_array($services)) { @@ -591,6 +616,8 @@ private function resourcesOverviewRequest( } } + + // query params if ($servicesMode !== null) { if ('form' === 'form' && is_array($servicesMode)) { @@ -604,6 +631,8 @@ private function resourcesOverviewRequest( } } + + // path params if ($projectId !== null) { @@ -623,6 +652,7 @@ private function resourcesOverviewRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -809,6 +839,7 @@ private function resourcesSummaryRequest( ?array $services = null, ?string $servicesMode = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -817,6 +848,8 @@ private function resourcesSummaryRequest( ); } + + if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ResourcesApi.resourcesSummary, @@ -832,6 +865,8 @@ private function resourcesSummaryRequest( ); } + + if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling ResourcesApi.resourcesSummary, @@ -874,6 +909,8 @@ private function resourcesSummaryRequest( } } + + // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -887,6 +924,8 @@ private function resourcesSummaryRequest( } } + + // query params if ($aggs !== null) { if ('form' === 'form' && is_array($aggs)) { @@ -900,6 +939,8 @@ private function resourcesSummaryRequest( } } + + // query params if ($types !== null) { if ('form' === 'form' && is_array($types)) { @@ -913,6 +954,8 @@ private function resourcesSummaryRequest( } } + + // query params if ($services !== null) { if ('form' === 'form' && is_array($services)) { @@ -926,6 +969,8 @@ private function resourcesSummaryRequest( } } + + // query params if ($servicesMode !== null) { if ('form' === 'form' && is_array($servicesMode)) { @@ -939,6 +984,8 @@ private function resourcesSummaryRequest( } } + + // path params if ($projectId !== null) { @@ -958,6 +1005,7 @@ private function resourcesSummaryRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/RoutingApi.php b/src/Api/RoutingApi.php index 7980b4fd5..b2988cf95 100644 --- a/src/Api/RoutingApi.php +++ b/src/Api/RoutingApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,7 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Route; /** * Low level RoutingApi (auto-generated) @@ -25,13 +25,13 @@ final class RoutingApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -65,7 +65,7 @@ public function getProjectsEnvironmentsRoutes( string $projectId, string $environmentId, string $routeId - ): Route { + ): \Upsun\Model\Route { return $this->getProjectsEnvironmentsRoutesWithHttpInfo( $projectId, $environmentId, @@ -84,7 +84,7 @@ private function getProjectsEnvironmentsRoutesWithHttpInfo( string $projectId, string $environmentId, string $routeId - ): Route { + ): \Upsun\Model\Route { $request = $this->getProjectsEnvironmentsRoutesRequest( $projectId, $environmentId, @@ -129,6 +129,7 @@ private function getProjectsEnvironmentsRoutesRequest( string $environmentId, string $routeId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -186,6 +187,7 @@ private function getProjectsEnvironmentsRoutesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -320,6 +322,7 @@ private function listProjectsEnvironmentsRoutesRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -361,6 +364,7 @@ private function listProjectsEnvironmentsRoutesRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/RuntimeOperationsApi.php b/src/Api/RuntimeOperationsApi.php index 88e1cdc23..4760330fd 100644 --- a/src/Api/RuntimeOperationsApi.php +++ b/src/Api/RuntimeOperationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\EnvironmentOperationInput; /** * Low level RuntimeOperationsApi (auto-generated) @@ -26,13 +25,13 @@ final class RuntimeOperationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -67,8 +66,8 @@ public function runOperation( string $projectId, string $environmentId, string $deploymentId, - EnvironmentOperationInput $environmentOperationInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentOperationInput $environmentOperationInput + ): \Upsun\Model\AcceptedResponse { return $this->runOperationWithHttpInfo( $projectId, $environmentId, @@ -89,8 +88,8 @@ private function runOperationWithHttpInfo( string $projectId, string $environmentId, string $deploymentId, - EnvironmentOperationInput $environmentOperationInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentOperationInput $environmentOperationInput + ): \Upsun\Model\AcceptedResponse { $request = $this->runOperationRequest( $projectId, $environmentId, @@ -136,8 +135,9 @@ private function runOperationRequest( string $projectId, string $environmentId, string $deploymentId, - EnvironmentOperationInput $environmentOperationInput + \Upsun\Model\EnvironmentOperationInput $environmentOperationInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -202,6 +202,7 @@ private function runOperationRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/SbomApi.php b/src/Api/SbomApi.php index 4b676e122..aa9f21fd2 100644 --- a/src/Api/SbomApi.php +++ b/src/Api/SbomApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,7 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Sbom; /** * Low level SbomApi (auto-generated) @@ -25,13 +25,13 @@ final class SbomApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -43,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -60,7 +60,7 @@ public function getProjectsEnvironmentsDeploymentsSboms( string $environmentId, string $deploymentId, string $sbomServiceId - ): Sbom { + ): \Upsun\Model\Sbom { return $this->getProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( $projectId, $environmentId, @@ -80,7 +80,7 @@ private function getProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( string $environmentId, string $deploymentId, string $sbomServiceId - ): Sbom { + ): \Upsun\Model\Sbom { $request = $this->getProjectsEnvironmentsDeploymentsSbomsRequest( $projectId, $environmentId, @@ -127,6 +127,7 @@ private function getProjectsEnvironmentsDeploymentsSbomsRequest( string $deploymentId, string $sbomServiceId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -200,6 +201,7 @@ private function getProjectsEnvironmentsDeploymentsSbomsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -334,6 +336,7 @@ private function listProjectsEnvironmentsDeploymentsSbomsRequest( string $environmentId, string $deploymentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -391,6 +394,7 @@ private function listProjectsEnvironmentsDeploymentsSbomsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/Serializer/ApiObjectAttributesMapper.php b/src/Api/Serializer/ApiObjectAttributesMapper.php index b6871f472..46a4018dc 100644 --- a/src/Api/Serializer/ApiObjectAttributesMapper.php +++ b/src/Api/Serializer/ApiObjectAttributesMapper.php @@ -24,6 +24,7 @@ public static function attributeMap(string $classname): array } private static array $attributeMap = [ + 'Upsun\Model\AcceptedResponse' => [ 'status' => 'status', 'code' => 'code' @@ -148,6 +149,7 @@ public static function attributeMap(string $classname): array 'enabled' => 'enabled' ], 'Upsun\Model\AutoscalerDuration' => [ + ], 'Upsun\Model\AutoscalerInstances' => [ 'min' => 'min', @@ -875,6 +877,7 @@ public static function attributeMap(string $classname): array 'email' => 'email' ], 'Upsun\Model\CommunityPackagesInner' => [ + ], 'Upsun\Model\Components' => [ 'voucherVatBaseprice' => 'voucher/vat/baseprice' @@ -1604,6 +1607,7 @@ public static function attributeMap(string $classname): array 'values' => 'values' ], 'Upsun\Model\FilterSelectValues' => [ + ], 'Upsun\Model\Firewall' => [ 'outbound' => 'outbound' @@ -2657,6 +2661,7 @@ public static function attributeMap(string $classname): array 'profileSize' => 'profile_size' ], 'Upsun\Model\Mode' => [ + ], 'Upsun\Model\MountsValue' => [ 'source' => 'source', @@ -3596,8 +3601,10 @@ public static function attributeMap(string $classname): array 'maintenanceWindow' => 'maintenance_window' ], 'Upsun\Model\ProjectStatus' => [ + ], 'Upsun\Model\ProjectType' => [ + ], 'Upsun\Model\ProjectVariable' => [ 'id' => 'id', diff --git a/src/Api/Serializer/ApiObjectFormatsMapper.php b/src/Api/Serializer/ApiObjectFormatsMapper.php index 8bf102b15..c9c05ad05 100644 --- a/src/Api/Serializer/ApiObjectFormatsMapper.php +++ b/src/Api/Serializer/ApiObjectFormatsMapper.php @@ -26,6 +26,7 @@ public static function openApiFormats(string $classname) } protected static $openApiFormats = [ + 'Upsun\Model\AcceptedResponse' => [ 'status' => null, 'code' => null @@ -170,6 +171,7 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\AutoscalerDuration' => [ + ], 'Upsun\Model\AutoscalerInstances' => [ @@ -994,6 +996,7 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\CommunityPackagesInner' => [ + ], 'Upsun\Model\Components' => [ @@ -1822,6 +1825,7 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\FilterSelectValues' => [ + ], 'Upsun\Model\Firewall' => [ @@ -3026,6 +3030,7 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\Mode' => [ + ], 'Upsun\Model\MountsValue' => [ @@ -4111,9 +4116,11 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\ProjectStatus' => [ + ], 'Upsun\Model\ProjectType' => [ + ], 'Upsun\Model\ProjectVariable' => [ @@ -5957,5 +5964,6 @@ public static function openApiFormats(string $classname) 'slugId' => null, 'supportsHorizontalScaling' => null ], + ]; } diff --git a/src/Api/Serializer/ApiObjectTypesMapper.php b/src/Api/Serializer/ApiObjectTypesMapper.php index 465d76059..9d81c3cbd 100644 --- a/src/Api/Serializer/ApiObjectTypesMapper.php +++ b/src/Api/Serializer/ApiObjectTypesMapper.php @@ -24,6 +24,7 @@ public static function openApiTypes(string $classname): array } private static array $openApiTypes = [ + 'Upsun\Model\AcceptedResponse' => [ 'status' => 'string', 'code' => 'int', @@ -5955,5 +5956,6 @@ public static function openApiTypes(string $classname): array 'slug_id' => 'string', 'supports_horizontal_scaling' => 'bool', ], + ]; } diff --git a/src/Api/Serializer/ObjectSerializer.php b/src/Api/Serializer/ObjectSerializer.php index 6c0e5fbe6..2c58b487d 100644 --- a/src/Api/Serializer/ObjectSerializer.php +++ b/src/Api/Serializer/ObjectSerializer.php @@ -2,23 +2,17 @@ namespace Upsun\Api\Serializer; +use ReflectionClass; +use stdClass; +use SplFileObject; use DateTime; use DateTimeInterface; use Exception; -use GuzzleHttp\Psr7\Utils; use InvalidArgumentException; use Psr\Http\Message\StreamInterface; -use ReflectionClass; -use SplFileObject; -use stdClass; -use Upsun\Api\ApiConfiguration; +use GuzzleHttp\Psr7\Utils; use Upsun\Model\Model; - -use function count; -use function is_array; -use function is_callable; -use function is_object; -use function is_scalar; +use Upsun\Api\ApiConfiguration; /** * ObjectSerializer Class Doc Comment @@ -40,7 +34,7 @@ public static function sanitizeForSerialization( ?string $type = null, ?string $format = null ): float|object|array|bool|int|string|null { - if (is_scalar($data) || null === $data) { + if (\is_scalar($data) || null === $data) { return $data; } @@ -48,14 +42,14 @@ public static function sanitizeForSerialization( return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat); } - if (is_array($data)) { + if (\is_array($data)) { foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } return $data; } - if (is_object($data)) { + if (\is_object($data)) { $values = []; if ($data instanceof Model) { $formats = ApiObjectFormatsMapper::openApiFormats($data->getModelName()); @@ -73,7 +67,7 @@ public static function sanitizeForSerialization( if ($value !== null && !in_array($openApiType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openApiType, 'getAllowableEnumValues']; - if (is_callable($callable)) { + if (\is_callable($callable)) { /** array $callable */ $allowedEnumTypes = $callable(); if (!\in_array($value, $allowedEnumTypes, true)) { @@ -170,11 +164,11 @@ private static function deserializeSimplifiedModel($data, string $class) if (str_ends_with($class, '[]')) { $subClass = substr($class, 0, -2); - if (!is_array($data)) { + if (!\is_array($data)) { throw new InvalidArgumentException('Data must be an array to deserialize into ' . $class); } - return array_map(fn ($item) => self::deserializeSimplifiedModel($item, $subClass), $data); + return array_map(fn($item) => self::deserializeSimplifiedModel($item, $subClass), $data); } $fullClass = ltrim($class, '\\'); @@ -195,9 +189,9 @@ private static function deserializeSimplifiedModel($data, string $class) $jsonKey = $attributeMap[$paramName] ?? $paramName; $value = null; - if (is_object($data)) { + if (\is_object($data)) { $value = $data->{$jsonKey} ?? $data->{$paramName} ?? null; - } elseif (is_array($data)) { + } elseif (\is_array($data)) { $value = $data[$jsonKey] ?? $data[$paramName] ?? null; } @@ -221,7 +215,7 @@ private static function deserializeSimplifiedModel($data, string $class) if ($paramType) { $typeName = $paramType->getName(); - if ($paramType->getName() === 'array' && is_array($value)) { + if ($paramType->getName() === 'array' && \is_array($value)) { $types = ApiObjectTypesMapper::openApiTypes($fullClass); if (isset($types[$paramName]) && str_ends_with($types[$paramName], '[]')) { @@ -242,7 +236,7 @@ private static function deserializeSimplifiedModel($data, string $class) if (str_ends_with($typeName, '[]')) { $subClass = substr($typeName, 0, -2); $args[] = $value !== null - ? array_map(fn ($item) => self::deserializeSimplifiedModel($item, $subClass), (array)$value) + ? array_map(fn($item) => self::deserializeSimplifiedModel($item, $subClass), (array)$value) : []; continue; } @@ -252,7 +246,7 @@ private static function deserializeSimplifiedModel($data, string $class) case 'string': if ($value === null) { $args[] = null; - } elseif (is_scalar($value)) { + } elseif (\is_scalar($value)) { $args[] = (string) $value; } else { $args[] = json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: ''; @@ -279,7 +273,7 @@ private static function deserializeSimplifiedModel($data, string $class) } elseif ($typeName === 'DateTime') { $args[] = $value !== null ? new DateTime($value) : null; } elseif (class_exists($typeName)) { - if (\is_string($value) && in_array('getAllowableEnumValues', get_class_methods($typeName), true)) { + if (\is_string($value) && in_array('getAllowableEnumValues', get_class_methods($typeName))) { // Generated Enum $args[] = new $typeName($value); } else { @@ -292,7 +286,7 @@ private static function deserializeSimplifiedModel($data, string $class) $args[] = $value; } - if ($args[count($args) - 1] === null && !$allowsNull) { + if ($args[\count($args) - 1] === null && !$allowsNull) { $types = ApiObjectTypesMapper::openApiTypes($fullClass); if (isset($types[$jsonKey]) && str_contains($types[$jsonKey], 'null')) { continue; @@ -307,6 +301,7 @@ private static function deserializeSimplifiedModel($data, string $class) return new $class(...$args); } + /** * @throws Exception */ @@ -318,7 +313,7 @@ public static function deserialize($data, string $class, $httpHeaders = null) // Handle any class with array properties if (class_exists($class) && is_subclass_of($class, Model::class)) { - if (is_array($data)) { + if (\is_array($data)) { $data = self::preprocessArrayProperties($data, $class); } @@ -330,7 +325,7 @@ public static function deserialize($data, string $class, $httpHeaders = null) $subClass = substr($class, 0, -2); // remove [] $values = []; - if (!is_array($data)) { + if (!\is_array($data)) { throw new InvalidArgumentException('Data must be an array to deserialize into ' . $class); } @@ -354,11 +349,12 @@ public static function deserialize($data, string $class, $httpHeaders = null) return (float)$data; case 'string': case 'byte': - if (is_scalar($data)) { + if (\is_scalar($data)) { return (string) $data; } return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: ''; + case 'mixed': return $data; case 'array': @@ -373,7 +369,7 @@ public static function deserialize($data, string $class, $httpHeaders = null) // determine file name if ( - is_array($httpHeaders) + \is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match( '/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', @@ -421,7 +417,7 @@ private static function preprocessArrayProperties(array $data, string $class): a $subClass = ltrim(substr($propertyType, 0, -2), '?'); // remove [] et ? // If the data contains this property and it's an array - if (isset($data[$propertyName]) && is_array($data[$propertyName])) { + if (isset($data[$propertyName]) && \is_array($data[$propertyName])) { // If it's a model class, deserialize each element if (\class_exists($subClass)) { $values = []; @@ -465,18 +461,18 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): $castBool = ApiConfiguration::BOOLEAN_FORMAT_INT - === ApiConfiguration::getDefaultConfiguration()->getBooleanFormatForQueryString() + == ApiConfiguration::getDefaultConfiguration()->getBooleanFormatForQueryString() ? function ($v) { return (int)$v; } - : function ($v) { - return $v ? 'true' : 'false'; - }; + : function ($v) { + return $v ? 'true' : 'false'; + }; $qs = ''; foreach ($params as $k => $v) { $k = $encoder((string)$k); - if (!is_array($v)) { + if (!\is_array($v)) { $qs .= $k; $v = \is_bool($v) ? $castBool($v) : $v; if ($v !== null) { @@ -505,16 +501,16 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): * * @param string $interface The interface class name * @param mixed $data The data containing the discriminator - * @throws InvalidArgumentException if unable to resolve * @return string The concrete class name + * @throws InvalidArgumentException if unable to resolve */ private static function resolvePolymorphicClass(string $interface, $data): string { // Extract discriminator value (typically 'type') $discriminatorValue = null; - if (is_object($data) && isset($data->type)) { + if (\is_object($data) && isset($data->type)) { $discriminatorValue = $data->type; - } elseif (is_array($data) && isset($data['type'])) { + } elseif (\is_array($data) && isset($data['type'])) { $discriminatorValue = $data['type']; } @@ -526,16 +522,16 @@ private static function resolvePolymorphicClass(string $interface, $data): strin // Cache for discovered polymorphic implementations static $polymorphicCache = []; - + $normalizedInterface = ltrim($interface, '\\'); - + // If not cached, discover implementations if (!isset($polymorphicCache[$normalizedInterface])) { $polymorphicCache[$normalizedInterface] = self::discoverPolymorphicImplementations($normalizedInterface); } - + $classMap = $polymorphicCache[$normalizedInterface]; - + if (!isset($classMap[$discriminatorValue])) { $available = implode(', ', array_keys($classMap)); throw new InvalidArgumentException( @@ -560,12 +556,12 @@ private static function resolvePolymorphicClass(string $interface, $data): strin private static function discoverPolymorphicImplementations(string $interface): array { $mapping = []; - + // Determine the namespace to scan (typically the Model namespace) $namespaceParts = explode('\\', $interface); $className = array_pop($namespaceParts); $namespace = implode('\\', $namespaceParts); - + // Try to force-load potential implementations by naming convention // e.g., for Route interface, try ProxyRoute, RedirectRoute, UpstreamRoute, etc. $potentialPrefixes = ['Proxy', 'Redirect', 'Upstream', 'Primary', 'Secondary', 'Custom', 'Default']; @@ -575,24 +571,24 @@ private static function discoverPolymorphicImplementations(string $interface): a // Class exists and was autoloaded } } - + // Get all declared classes (now including the ones we just loaded) $declaredClasses = get_declared_classes(); - + foreach ($declaredClasses as $class) { // Only check classes in the same namespace if (strpos($class, $namespace . '\\') !== 0) { continue; } - + // Skip the interface itself if ($class === $interface) { continue; } - + // Check if class implements the interface $reflectionClass = new ReflectionClass($class); - + // For interfaces if (interface_exists($interface)) { if (!$reflectionClass->implementsInterface($interface)) { @@ -606,7 +602,7 @@ private static function discoverPolymorphicImplementations(string $interface): a continue; } } - + // Look for TYPE_* constants that indicate discriminator values $foundForThisClass = false; $constants = $reflectionClass->getConstants(); @@ -616,7 +612,7 @@ private static function discoverPolymorphicImplementations(string $interface): a $foundForThisClass = true; } } - + // Fallback: use class name pattern (ProxyRoute -> "proxy") if (!$foundForThisClass) { $shortName = $reflectionClass->getShortName(); @@ -628,13 +624,13 @@ private static function discoverPolymorphicImplementations(string $interface): a } } } - + if (empty($mapping)) { throw new InvalidArgumentException( sprintf('No polymorphic implementations found for interface %s', $interface) ); } - + return $mapping; } } diff --git a/src/Api/SourceOperationsApi.php b/src/Api/SourceOperationsApi.php index b0b7fd2cd..2a9670335 100644 --- a/src/Api/SourceOperationsApi.php +++ b/src/Api/SourceOperationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\EnvironmentSourceOperationInput; /** * Low level SourceOperationsApi (auto-generated) @@ -26,13 +25,13 @@ final class SourceOperationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -128,6 +127,7 @@ private function listProjectsEnvironmentsSourceOperationsRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -169,6 +169,7 @@ private function listProjectsEnvironmentsSourceOperationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -241,8 +242,8 @@ private function listProjectsEnvironmentsSourceOperationsRequest( public function runSourceOperation( string $projectId, string $environmentId, - EnvironmentSourceOperationInput $environmentSourceOperationInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentSourceOperationInput $environmentSourceOperationInput + ): \Upsun\Model\AcceptedResponse { return $this->runSourceOperationWithHttpInfo( $projectId, $environmentId, @@ -261,8 +262,8 @@ public function runSourceOperation( private function runSourceOperationWithHttpInfo( string $projectId, string $environmentId, - EnvironmentSourceOperationInput $environmentSourceOperationInput - ): AcceptedResponse { + \Upsun\Model\EnvironmentSourceOperationInput $environmentSourceOperationInput + ): \Upsun\Model\AcceptedResponse { $request = $this->runSourceOperationRequest( $projectId, $environmentId, @@ -306,8 +307,9 @@ private function runSourceOperationWithHttpInfo( private function runSourceOperationRequest( string $projectId, string $environmentId, - EnvironmentSourceOperationInput $environmentSourceOperationInput + \Upsun\Model\EnvironmentSourceOperationInput $environmentSourceOperationInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -356,6 +358,7 @@ private function runSourceOperationRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/SshKeysApi.php b/src/Api/SshKeysApi.php index 212d07540..845350140 100644 --- a/src/Api/SshKeysApi.php +++ b/src/Api/SshKeysApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CreateSshKeyRequest; -use Upsun\Model\SshKey; /** * Low level SshKeysApi (auto-generated) @@ -26,13 +25,13 @@ final class SshKeysApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -59,8 +58,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Ssh-Keys/operation/create-ssh-key */ public function createSshKey( - ?CreateSshKeyRequest $createSshKeyRequest = null - ): SshKey { + ?\Upsun\Model\CreateSshKeyRequest $createSshKeyRequest = null + ): \Upsun\Model\SshKey { return $this->createSshKeyWithHttpInfo( $createSshKeyRequest ); @@ -74,8 +73,8 @@ public function createSshKey( * @throws ClientExceptionInterface */ private function createSshKeyWithHttpInfo( - ?CreateSshKeyRequest $createSshKeyRequest = null - ): SshKey { + ?\Upsun\Model\CreateSshKeyRequest $createSshKeyRequest = null + ): \Upsun\Model\SshKey { $request = $this->createSshKeyRequest( $createSshKeyRequest ); @@ -114,8 +113,10 @@ private function createSshKeyWithHttpInfo( * @throws InvalidArgumentException */ private function createSshKeyRequest( - ?CreateSshKeyRequest $createSshKeyRequest = null + ?\Upsun\Model\CreateSshKeyRequest $createSshKeyRequest = null ): RequestInterface { + + $resourcePath = '/ssh_keys'; $formParams = []; $queryParams = []; @@ -123,6 +124,8 @@ private function createSshKeyRequest( $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -251,6 +254,7 @@ private function deleteSshKeyWithHttpInfo( private function deleteSshKeyRequest( int $keyId ): RequestInterface { + // verify the required parameter 'keyId' is set if (empty($keyId)) { throw new InvalidArgumentException( @@ -276,6 +280,7 @@ private function deleteSshKeyRequest( ); } + $headers = $this->headerSelector->selectHeaders( [], '', @@ -344,7 +349,7 @@ private function deleteSshKeyRequest( */ public function getSshKey( int $keyId - ): SshKey { + ): \Upsun\Model\SshKey { return $this->getSshKeyWithHttpInfo( $keyId ); @@ -360,7 +365,7 @@ public function getSshKey( */ private function getSshKeyWithHttpInfo( int $keyId - ): SshKey { + ): \Upsun\Model\SshKey { $request = $this->getSshKeyRequest( $keyId ); @@ -402,6 +407,7 @@ private function getSshKeyWithHttpInfo( private function getSshKeyRequest( int $keyId ): RequestInterface { + // verify the required parameter 'keyId' is set if (empty($keyId)) { throw new InvalidArgumentException( @@ -427,6 +433,7 @@ private function getSshKeyRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/SubscriptionsApi.php b/src/Api/SubscriptionsApi.php index 6f8fbed9e..24ab21438 100644 --- a/src/Api/SubscriptionsApi.php +++ b/src/Api/SubscriptionsApi.php @@ -13,19 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CanAffordSubscriptionRequest; -use Upsun\Model\CanCreateNewOrgSubscription200Response; -use Upsun\Model\CanUpdateSubscription200Response; -use Upsun\Model\CreateOrgSubscriptionRequest; -use Upsun\Model\DateTimeFilter; -use Upsun\Model\EstimationObject; -use Upsun\Model\GetSubscriptionUsageAlerts200Response; -use Upsun\Model\StringFilter; -use Upsun\Model\Subscription; -use Upsun\Model\SubscriptionAddonsObject; -use Upsun\Model\SubscriptionCurrentUsageObject; -use Upsun\Model\UpdateOrgSubscriptionRequest; -use Upsun\Model\UpdateSubscriptionUsageAlertsRequest; /** * Low level SubscriptionsApi (auto-generated) @@ -38,13 +25,13 @@ final class SubscriptionsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -56,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -74,7 +61,7 @@ public function __construct( */ public function canAffordSubscription( string $subscriptionId, - ?CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null + ?\Upsun\Model\CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null ): void { $this->canAffordSubscriptionWithHttpInfo( $subscriptionId, @@ -93,7 +80,7 @@ public function canAffordSubscription( */ private function canAffordSubscriptionWithHttpInfo( string $subscriptionId, - ?CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null + ?\Upsun\Model\CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null ): void { $request = $this->canAffordSubscriptionRequest( $subscriptionId, @@ -131,8 +118,9 @@ private function canAffordSubscriptionWithHttpInfo( */ private function canAffordSubscriptionRequest( string $subscriptionId, - ?CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null + ?\Upsun\Model\CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null ): RequestInterface { + // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -158,6 +146,7 @@ private function canAffordSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( [], 'application/json', @@ -235,7 +224,7 @@ private function canAffordSubscriptionRequest( */ public function canCreateNewOrgSubscription( string $organizationId - ): CanCreateNewOrgSubscription200Response { + ): \Upsun\Model\CanCreateNewOrgSubscription200Response { return $this->canCreateNewOrgSubscriptionWithHttpInfo( $organizationId ); @@ -252,7 +241,7 @@ public function canCreateNewOrgSubscription( */ private function canCreateNewOrgSubscriptionWithHttpInfo( string $organizationId - ): CanCreateNewOrgSubscription200Response { + ): \Upsun\Model\CanCreateNewOrgSubscription200Response { $request = $this->canCreateNewOrgSubscriptionRequest( $organizationId ); @@ -295,6 +284,7 @@ private function canCreateNewOrgSubscriptionWithHttpInfo( private function canCreateNewOrgSubscriptionRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -320,6 +310,7 @@ private function canCreateNewOrgSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -402,7 +393,7 @@ public function canUpdateSubscription( ?int $environments = null, ?int $storage = null, ?int $userLicenses = null - ): CanUpdateSubscription200Response { + ): \Upsun\Model\CanUpdateSubscription200Response { return $this->canUpdateSubscriptionWithHttpInfo( $subscriptionId, $plan, @@ -436,7 +427,7 @@ private function canUpdateSubscriptionWithHttpInfo( ?int $environments = null, ?int $storage = null, ?int $userLicenses = null - ): CanUpdateSubscription200Response { + ): \Upsun\Model\CanUpdateSubscription200Response { $request = $this->canUpdateSubscriptionRequest( $subscriptionId, $plan, @@ -496,6 +487,7 @@ private function canUpdateSubscriptionRequest( ?int $storage = null, ?int $userLicenses = null ): RequestInterface { + // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -524,6 +516,8 @@ private function canUpdateSubscriptionRequest( } } + + // query params if ($environments !== null) { if ('form' === 'form' && is_array($environments)) { @@ -537,6 +531,8 @@ private function canUpdateSubscriptionRequest( } } + + // query params if ($storage !== null) { if ('form' === 'form' && is_array($storage)) { @@ -550,6 +546,8 @@ private function canUpdateSubscriptionRequest( } } + + // query params if ($userLicenses !== null) { if ('form' === 'form' && is_array($userLicenses)) { @@ -563,6 +561,8 @@ private function canUpdateSubscriptionRequest( } } + + // path params if ($subscriptionId !== null) { @@ -573,6 +573,7 @@ private function canUpdateSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -643,8 +644,8 @@ private function canUpdateSubscriptionRequest( */ public function createOrgSubscription( string $organizationId, - CreateOrgSubscriptionRequest $createOrgSubscriptionRequest - ): Subscription { + \Upsun\Model\CreateOrgSubscriptionRequest $createOrgSubscriptionRequest + ): \Upsun\Model\Subscription { return $this->createOrgSubscriptionWithHttpInfo( $organizationId, $createOrgSubscriptionRequest @@ -662,8 +663,8 @@ public function createOrgSubscription( */ private function createOrgSubscriptionWithHttpInfo( string $organizationId, - CreateOrgSubscriptionRequest $createOrgSubscriptionRequest - ): Subscription { + \Upsun\Model\CreateOrgSubscriptionRequest $createOrgSubscriptionRequest + ): \Upsun\Model\Subscription { $request = $this->createOrgSubscriptionRequest( $organizationId, $createOrgSubscriptionRequest @@ -706,8 +707,9 @@ private function createOrgSubscriptionWithHttpInfo( */ private function createOrgSubscriptionRequest( string $organizationId, - CreateOrgSubscriptionRequest $createOrgSubscriptionRequest + \Upsun\Model\CreateOrgSubscriptionRequest $createOrgSubscriptionRequest ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -740,6 +742,7 @@ private function createOrgSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -883,6 +886,7 @@ private function deleteOrgSubscriptionRequest( string $organizationId, string $subscriptionId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -924,6 +928,7 @@ private function deleteOrgSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1003,7 +1008,7 @@ public function estimateNewOrgSubscription( int $storage, int $userLicenses, ?string $format = null - ): EstimationObject { + ): \Upsun\Model\EstimationObject { return $this->estimateNewOrgSubscriptionWithHttpInfo( $organizationId, $plan, @@ -1035,7 +1040,7 @@ private function estimateNewOrgSubscriptionWithHttpInfo( int $storage, int $userLicenses, ?string $format = null - ): EstimationObject { + ): \Upsun\Model\EstimationObject { $request = $this->estimateNewOrgSubscriptionRequest( $organizationId, $plan, @@ -1093,6 +1098,7 @@ private function estimateNewOrgSubscriptionRequest( int $userLicenses, ?string $format = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1149,6 +1155,8 @@ private function estimateNewOrgSubscriptionRequest( } } + + // query params if ($environments !== null) { if ('form' === 'form' && is_array($environments)) { @@ -1162,6 +1170,8 @@ private function estimateNewOrgSubscriptionRequest( } } + + // query params if ($storage !== null) { if ('form' === 'form' && is_array($storage)) { @@ -1175,6 +1185,8 @@ private function estimateNewOrgSubscriptionRequest( } } + + // query params if ($userLicenses !== null) { if ('form' === 'form' && is_array($userLicenses)) { @@ -1188,6 +1200,8 @@ private function estimateNewOrgSubscriptionRequest( } } + + // query params if ($format !== null) { if ('form' === 'form' && is_array($format)) { @@ -1201,6 +1215,8 @@ private function estimateNewOrgSubscriptionRequest( } } + + // path params if ($organizationId !== null) { @@ -1211,6 +1227,7 @@ private function estimateNewOrgSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1293,7 +1310,7 @@ public function estimateOrgSubscription( ?int $storage = null, ?int $userLicenses = null, ?string $format = null - ): EstimationObject { + ): \Upsun\Model\EstimationObject { return $this->estimateOrgSubscriptionWithHttpInfo( $organizationId, $subscriptionId, @@ -1329,7 +1346,7 @@ private function estimateOrgSubscriptionWithHttpInfo( ?int $storage = null, ?int $userLicenses = null, ?string $format = null - ): EstimationObject { + ): \Upsun\Model\EstimationObject { $request = $this->estimateOrgSubscriptionRequest( $organizationId, $subscriptionId, @@ -1391,6 +1408,7 @@ private function estimateOrgSubscriptionRequest( ?int $userLicenses = null, ?string $format = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1433,6 +1451,8 @@ private function estimateOrgSubscriptionRequest( } } + + // query params if ($environments !== null) { if ('form' === 'form' && is_array($environments)) { @@ -1446,6 +1466,8 @@ private function estimateOrgSubscriptionRequest( } } + + // query params if ($storage !== null) { if ('form' === 'form' && is_array($storage)) { @@ -1459,6 +1481,8 @@ private function estimateOrgSubscriptionRequest( } } + + // query params if ($userLicenses !== null) { if ('form' === 'form' && is_array($userLicenses)) { @@ -1472,6 +1496,8 @@ private function estimateOrgSubscriptionRequest( } } + + // query params if ($format !== null) { if ('form' === 'form' && is_array($format)) { @@ -1485,6 +1511,8 @@ private function estimateOrgSubscriptionRequest( } } + + // path params if ($organizationId !== null) { @@ -1504,6 +1532,7 @@ private function estimateOrgSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1577,7 +1606,7 @@ private function estimateOrgSubscriptionRequest( public function getOrgSubscription( string $organizationId, string $subscriptionId - ): Subscription { + ): \Upsun\Model\Subscription { return $this->getOrgSubscriptionWithHttpInfo( $organizationId, $subscriptionId @@ -1598,7 +1627,7 @@ public function getOrgSubscription( private function getOrgSubscriptionWithHttpInfo( string $organizationId, string $subscriptionId - ): Subscription { + ): \Upsun\Model\Subscription { $request = $this->getOrgSubscriptionRequest( $organizationId, $subscriptionId @@ -1645,6 +1674,7 @@ private function getOrgSubscriptionRequest( string $organizationId, string $subscriptionId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1686,6 +1716,7 @@ private function getOrgSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1762,7 +1793,7 @@ public function getOrgSubscriptionCurrentUsage( string $subscriptionId, ?string $usageGroups = null, ?bool $includeNotCharged = null - ): SubscriptionCurrentUsageObject { + ): \Upsun\Model\SubscriptionCurrentUsageObject { return $this->getOrgSubscriptionCurrentUsageWithHttpInfo( $organizationId, $subscriptionId, @@ -1789,7 +1820,7 @@ private function getOrgSubscriptionCurrentUsageWithHttpInfo( string $subscriptionId, ?string $usageGroups = null, ?bool $includeNotCharged = null - ): SubscriptionCurrentUsageObject { + ): \Upsun\Model\SubscriptionCurrentUsageObject { $request = $this->getOrgSubscriptionCurrentUsageRequest( $organizationId, $subscriptionId, @@ -1842,6 +1873,7 @@ private function getOrgSubscriptionCurrentUsageRequest( ?string $usageGroups = null, ?bool $includeNotCharged = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1877,6 +1909,8 @@ private function getOrgSubscriptionCurrentUsageRequest( } } + + // query params if ($includeNotCharged !== null) { if ('form' === 'form' && is_array($includeNotCharged)) { @@ -1890,6 +1924,8 @@ private function getOrgSubscriptionCurrentUsageRequest( } } + + // path params if ($organizationId !== null) { @@ -1909,6 +1945,7 @@ private function getOrgSubscriptionCurrentUsageRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1983,7 +2020,7 @@ private function getOrgSubscriptionCurrentUsageRequest( public function getSubscriptionUsageAlerts( string $organizationId, string $subscriptionId - ): GetSubscriptionUsageAlerts200Response { + ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { return $this->getSubscriptionUsageAlertsWithHttpInfo( $organizationId, $subscriptionId @@ -2005,7 +2042,7 @@ public function getSubscriptionUsageAlerts( private function getSubscriptionUsageAlertsWithHttpInfo( string $organizationId, string $subscriptionId - ): GetSubscriptionUsageAlerts200Response { + ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { $request = $this->getSubscriptionUsageAlertsRequest( $organizationId, $subscriptionId @@ -2053,6 +2090,7 @@ private function getSubscriptionUsageAlertsRequest( string $organizationId, string $subscriptionId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2094,6 +2132,7 @@ private function getSubscriptionUsageAlertsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -2183,11 +2222,11 @@ private function getSubscriptionUsageAlertsRequest( public function listOrgSubscriptions( string $organizationId, ?string $filterStatus = null, - ?StringFilter $filterId = null, - ?StringFilter $filterProjectId = null, - ?StringFilter $filterProjectTitle = null, - ?StringFilter $filterRegion = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterProjectId = null, + ?\Upsun\Model\StringFilter $filterProjectTitle = null, + ?\Upsun\Model\StringFilter $filterRegion = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -2238,11 +2277,11 @@ public function listOrgSubscriptions( private function listOrgSubscriptionsWithHttpInfo( string $organizationId, ?string $filterStatus = null, - ?StringFilter $filterId = null, - ?StringFilter $filterProjectId = null, - ?StringFilter $filterProjectTitle = null, - ?StringFilter $filterRegion = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterProjectId = null, + ?\Upsun\Model\StringFilter $filterProjectTitle = null, + ?\Upsun\Model\StringFilter $filterRegion = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -2318,16 +2357,17 @@ private function listOrgSubscriptionsWithHttpInfo( private function listOrgSubscriptionsRequest( string $organizationId, ?string $filterStatus = null, - ?StringFilter $filterId = null, - ?StringFilter $filterProjectId = null, - ?StringFilter $filterProjectTitle = null, - ?StringFilter $filterRegion = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\StringFilter $filterProjectId = null, + ?\Upsun\Model\StringFilter $filterProjectTitle = null, + ?\Upsun\Model\StringFilter $filterRegion = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2350,6 +2390,8 @@ private function listOrgSubscriptionsRequest( ); } + + $resourcePath = '/organizations/{organization_id}/subscriptions'; $formParams = []; $queryParams = []; @@ -2370,6 +2412,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($filterId !== null) { if ('form' === 'deepObject' && is_array($filterId)) { @@ -2383,6 +2427,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($filterProjectId !== null) { if ('form' === 'deepObject' && is_array($filterProjectId)) { @@ -2396,6 +2442,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($filterProjectTitle !== null) { if ('form' === 'deepObject' && is_array($filterProjectTitle)) { @@ -2409,6 +2457,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($filterRegion !== null) { if ('form' === 'deepObject' && is_array($filterRegion)) { @@ -2422,6 +2472,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -2435,6 +2487,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -2448,6 +2502,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -2461,6 +2517,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -2474,6 +2532,8 @@ private function listOrgSubscriptionsRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -2487,6 +2547,8 @@ private function listOrgSubscriptionsRequest( } } + + // path params if ($organizationId !== null) { @@ -2497,6 +2559,7 @@ private function listOrgSubscriptionsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -2569,7 +2632,7 @@ private function listOrgSubscriptionsRequest( public function listSubscriptionAddons( string $organizationId, string $subscriptionId - ): SubscriptionAddonsObject { + ): \Upsun\Model\SubscriptionAddonsObject { return $this->listSubscriptionAddonsWithHttpInfo( $organizationId, $subscriptionId @@ -2590,7 +2653,7 @@ public function listSubscriptionAddons( private function listSubscriptionAddonsWithHttpInfo( string $organizationId, string $subscriptionId - ): SubscriptionAddonsObject { + ): \Upsun\Model\SubscriptionAddonsObject { $request = $this->listSubscriptionAddonsRequest( $organizationId, $subscriptionId @@ -2637,6 +2700,7 @@ private function listSubscriptionAddonsRequest( string $organizationId, string $subscriptionId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2678,6 +2742,7 @@ private function listSubscriptionAddonsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -2751,8 +2816,8 @@ private function listSubscriptionAddonsRequest( public function updateOrgSubscription( string $organizationId, string $subscriptionId, - ?UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null - ): Subscription { + ?\Upsun\Model\UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null + ): \Upsun\Model\Subscription { return $this->updateOrgSubscriptionWithHttpInfo( $organizationId, $subscriptionId, @@ -2774,8 +2839,8 @@ public function updateOrgSubscription( private function updateOrgSubscriptionWithHttpInfo( string $organizationId, string $subscriptionId, - ?UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null - ): Subscription { + ?\Upsun\Model\UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null + ): \Upsun\Model\Subscription { $request = $this->updateOrgSubscriptionRequest( $organizationId, $subscriptionId, @@ -2822,8 +2887,9 @@ private function updateOrgSubscriptionWithHttpInfo( private function updateOrgSubscriptionRequest( string $organizationId, string $subscriptionId, - ?UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null + ?\Upsun\Model\UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2865,6 +2931,7 @@ private function updateOrgSubscriptionRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -2947,8 +3014,8 @@ private function updateOrgSubscriptionRequest( public function updateSubscriptionUsageAlerts( string $organizationId, string $subscriptionId, - ?UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null - ): GetSubscriptionUsageAlerts200Response { + ?\Upsun\Model\UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null + ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { return $this->updateSubscriptionUsageAlertsWithHttpInfo( $organizationId, $subscriptionId, @@ -2971,8 +3038,8 @@ public function updateSubscriptionUsageAlerts( private function updateSubscriptionUsageAlertsWithHttpInfo( string $organizationId, string $subscriptionId, - ?UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null - ): GetSubscriptionUsageAlerts200Response { + ?\Upsun\Model\UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null + ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { $request = $this->updateSubscriptionUsageAlertsRequest( $organizationId, $subscriptionId, @@ -3020,8 +3087,9 @@ private function updateSubscriptionUsageAlertsWithHttpInfo( private function updateSubscriptionUsageAlertsRequest( string $organizationId, string $subscriptionId, - ?UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null + ?\Upsun\Model\UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -3063,6 +3131,7 @@ private function updateSubscriptionUsageAlertsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/SupportApi.php b/src/Api/SupportApi.php index 4a5d2b2f8..cc98ef725 100644 --- a/src/Api/SupportApi.php +++ b/src/Api/SupportApi.php @@ -13,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CreateTicketRequest; -use Upsun\Model\Ticket; -use Upsun\Model\UpdateTicketRequest; /** * Low level SupportApi (auto-generated) @@ -28,13 +25,13 @@ final class SupportApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -61,8 +58,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Support/operation/create-ticket */ public function createTicket( - ?CreateTicketRequest $createTicketRequest = null - ): Ticket { + ?\Upsun\Model\CreateTicketRequest $createTicketRequest = null + ): \Upsun\Model\Ticket { return $this->createTicketWithHttpInfo( $createTicketRequest ); @@ -76,8 +73,8 @@ public function createTicket( * @throws ClientExceptionInterface */ private function createTicketWithHttpInfo( - ?CreateTicketRequest $createTicketRequest = null - ): Ticket { + ?\Upsun\Model\CreateTicketRequest $createTicketRequest = null + ): \Upsun\Model\Ticket { $request = $this->createTicketRequest( $createTicketRequest ); @@ -116,8 +113,10 @@ private function createTicketWithHttpInfo( * @throws InvalidArgumentException */ private function createTicketRequest( - ?CreateTicketRequest $createTicketRequest = null + ?\Upsun\Model\CreateTicketRequest $createTicketRequest = null ): RequestInterface { + + $resourcePath = '/tickets'; $formParams = []; $queryParams = []; @@ -125,6 +124,8 @@ private function createTicketRequest( $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -271,6 +272,8 @@ private function listTicketCategoriesRequest( ?string $subscriptionId = null, ?string $organizationId = null ): RequestInterface { + + $resourcePath = '/tickets/category'; $formParams = []; $queryParams = []; @@ -291,6 +294,8 @@ private function listTicketCategoriesRequest( } } + + // query params if ($organizationId !== null) { if ('form' === 'form' && is_array($organizationId)) { @@ -304,6 +309,10 @@ private function listTicketCategoriesRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -442,6 +451,8 @@ private function listTicketPrioritiesRequest( ?string $subscriptionId = null, ?string $category = null ): RequestInterface { + + $resourcePath = '/tickets/priority'; $formParams = []; $queryParams = []; @@ -462,6 +473,8 @@ private function listTicketPrioritiesRequest( } } + + // query params if ($category !== null) { if ('form' === 'form' && is_array($category)) { @@ -475,6 +488,10 @@ private function listTicketPrioritiesRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -543,8 +560,8 @@ private function listTicketPrioritiesRequest( */ public function updateTicket( string $ticketId, - ?UpdateTicketRequest $updateTicketRequest = null - ): Ticket { + ?\Upsun\Model\UpdateTicketRequest $updateTicketRequest = null + ): \Upsun\Model\Ticket { return $this->updateTicketWithHttpInfo( $ticketId, $updateTicketRequest @@ -561,8 +578,8 @@ public function updateTicket( */ private function updateTicketWithHttpInfo( string $ticketId, - ?UpdateTicketRequest $updateTicketRequest = null - ): Ticket { + ?\Upsun\Model\UpdateTicketRequest $updateTicketRequest = null + ): \Upsun\Model\Ticket { $request = $this->updateTicketRequest( $ticketId, $updateTicketRequest @@ -604,8 +621,9 @@ private function updateTicketWithHttpInfo( */ private function updateTicketRequest( string $ticketId, - ?UpdateTicketRequest $updateTicketRequest = null + ?\Upsun\Model\UpdateTicketRequest $updateTicketRequest = null ): RequestInterface { + // verify the required parameter 'ticketId' is set if (empty($ticketId)) { throw new InvalidArgumentException( @@ -631,6 +649,7 @@ private function updateTicketRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/SystemInformationApi.php b/src/Api/SystemInformationApi.php index 8e5c3661b..76d8d7035 100644 --- a/src/Api/SystemInformationApi.php +++ b/src/Api/SystemInformationApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\SystemInformation; /** * Low level SystemInformationApi (auto-generated) @@ -26,13 +25,13 @@ final class SystemInformationApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -61,7 +60,7 @@ public function __construct( */ public function actionProjectsSystemRestart( string $projectId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->actionProjectsSystemRestartWithHttpInfo( $projectId ); @@ -76,7 +75,7 @@ public function actionProjectsSystemRestart( */ private function actionProjectsSystemRestartWithHttpInfo( string $projectId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->actionProjectsSystemRestartRequest( $projectId ); @@ -117,6 +116,7 @@ private function actionProjectsSystemRestartWithHttpInfo( private function actionProjectsSystemRestartRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -142,6 +142,7 @@ private function actionProjectsSystemRestartRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -210,7 +211,7 @@ private function actionProjectsSystemRestartRequest( */ public function getProjectsSystem( string $projectId - ): SystemInformation { + ): \Upsun\Model\SystemInformation { return $this->getProjectsSystemWithHttpInfo( $projectId ); @@ -225,7 +226,7 @@ public function getProjectsSystem( */ private function getProjectsSystemWithHttpInfo( string $projectId - ): SystemInformation { + ): \Upsun\Model\SystemInformation { $request = $this->getProjectsSystemRequest( $projectId ); @@ -266,6 +267,7 @@ private function getProjectsSystemWithHttpInfo( private function getProjectsSystemRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -291,6 +293,7 @@ private function getProjectsSystemRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/TaskApi.php b/src/Api/TaskApi.php index 54e242f90..21c26339a 100644 --- a/src/Api/TaskApi.php +++ b/src/Api/TaskApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,9 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Task; -use Upsun\Model\TaskTriggerInput; /** * Low level TaskApi (auto-generated) @@ -27,13 +25,13 @@ final class TaskApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -61,7 +59,7 @@ public function getProjectsEnvironmentsTasks( string $projectId, string $environmentId, string $taskId - ): Task { + ): \Upsun\Model\Task { return $this->getProjectsEnvironmentsTasksWithHttpInfo( $projectId, $environmentId, @@ -79,7 +77,7 @@ private function getProjectsEnvironmentsTasksWithHttpInfo( string $projectId, string $environmentId, string $taskId - ): Task { + ): \Upsun\Model\Task { $request = $this->getProjectsEnvironmentsTasksRequest( $projectId, $environmentId, @@ -124,6 +122,7 @@ private function getProjectsEnvironmentsTasksRequest( string $environmentId, string $taskId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -181,6 +180,7 @@ private function getProjectsEnvironmentsTasksRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -310,6 +310,7 @@ private function listProjectsEnvironmentsTasksRequest( string $projectId, string $environmentId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -351,6 +352,7 @@ private function listProjectsEnvironmentsTasksRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -419,8 +421,8 @@ public function runTask( string $projectId, string $environmentId, string $taskId, - TaskTriggerInput $taskTriggerInput - ): AcceptedResponse { + \Upsun\Model\TaskTriggerInput $taskTriggerInput + ): \Upsun\Model\AcceptedResponse { return $this->runTaskWithHttpInfo( $projectId, $environmentId, @@ -440,8 +442,8 @@ private function runTaskWithHttpInfo( string $projectId, string $environmentId, string $taskId, - TaskTriggerInput $taskTriggerInput - ): AcceptedResponse { + \Upsun\Model\TaskTriggerInput $taskTriggerInput + ): \Upsun\Model\AcceptedResponse { $request = $this->runTaskRequest( $projectId, $environmentId, @@ -487,8 +489,9 @@ private function runTaskRequest( string $projectId, string $environmentId, string $taskId, - TaskTriggerInput $taskTriggerInput + \Upsun\Model\TaskTriggerInput $taskTriggerInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -553,6 +556,7 @@ private function runTaskRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/TeamAccessApi.php b/src/Api/TeamAccessApi.php index d2d68e8ee..c68fec398 100644 --- a/src/Api/TeamAccessApi.php +++ b/src/Api/TeamAccessApi.php @@ -13,7 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\TeamProjectAccess; /** * Low level TeamAccessApi (auto-generated) @@ -26,13 +25,13 @@ final class TeamAccessApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -66,7 +65,7 @@ public function __construct( public function getProjectTeamAccess( string $projectId, string $teamId - ): TeamProjectAccess { + ): \Upsun\Model\TeamProjectAccess { return $this->getProjectTeamAccessWithHttpInfo( $projectId, $teamId @@ -87,7 +86,7 @@ public function getProjectTeamAccess( private function getProjectTeamAccessWithHttpInfo( string $projectId, string $teamId - ): TeamProjectAccess { + ): \Upsun\Model\TeamProjectAccess { $request = $this->getProjectTeamAccessRequest( $projectId, $teamId @@ -134,6 +133,7 @@ private function getProjectTeamAccessRequest( string $projectId, string $teamId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -175,6 +175,7 @@ private function getProjectTeamAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -248,7 +249,7 @@ private function getProjectTeamAccessRequest( public function getTeamProjectAccess( string $teamId, string $projectId - ): TeamProjectAccess { + ): \Upsun\Model\TeamProjectAccess { return $this->getTeamProjectAccessWithHttpInfo( $teamId, $projectId @@ -269,7 +270,7 @@ public function getTeamProjectAccess( private function getTeamProjectAccessWithHttpInfo( string $teamId, string $projectId - ): TeamProjectAccess { + ): \Upsun\Model\TeamProjectAccess { $request = $this->getTeamProjectAccessRequest( $teamId, $projectId @@ -316,6 +317,7 @@ private function getTeamProjectAccessRequest( string $teamId, string $projectId ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -357,6 +359,7 @@ private function getTeamProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -486,6 +489,7 @@ private function grantProjectTeamAccessRequest( string $projectId, array $grantProjectTeamAccessRequestInner ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -518,6 +522,7 @@ private function grantProjectTeamAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -655,6 +660,7 @@ private function grantTeamProjectAccessRequest( string $teamId, array $grantTeamProjectAccessRequestInner ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -687,6 +693,7 @@ private function grantTeamProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -872,6 +879,7 @@ private function listProjectTeamAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -894,6 +902,8 @@ private function listProjectTeamAccessRequest( ); } + + $resourcePath = '/projects/{project_id}/team-access'; $formParams = []; $queryParams = []; @@ -914,6 +924,8 @@ private function listProjectTeamAccessRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -927,6 +939,8 @@ private function listProjectTeamAccessRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -940,6 +954,8 @@ private function listProjectTeamAccessRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -953,6 +969,8 @@ private function listProjectTeamAccessRequest( } } + + // path params if ($projectId !== null) { @@ -963,6 +981,7 @@ private function listProjectTeamAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1140,6 +1159,7 @@ private function listTeamProjectAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1162,6 +1182,8 @@ private function listTeamProjectAccessRequest( ); } + + $resourcePath = '/teams/{team_id}/project-access'; $formParams = []; $queryParams = []; @@ -1182,6 +1204,8 @@ private function listTeamProjectAccessRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1195,6 +1219,8 @@ private function listTeamProjectAccessRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1208,6 +1234,8 @@ private function listTeamProjectAccessRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1221,6 +1249,8 @@ private function listTeamProjectAccessRequest( } } + + // path params if ($teamId !== null) { @@ -1231,6 +1261,7 @@ private function listTeamProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1366,6 +1397,7 @@ private function removeProjectTeamAccessRequest( string $projectId, string $teamId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1407,6 +1439,7 @@ private function removeProjectTeamAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1542,6 +1575,7 @@ private function removeTeamProjectAccessRequest( string $teamId, string $projectId ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1583,6 +1617,7 @@ private function removeTeamProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', diff --git a/src/Api/TeamsApi.php b/src/Api/TeamsApi.php index e796a7242..857c493be 100644 --- a/src/Api/TeamsApi.php +++ b/src/Api/TeamsApi.php @@ -13,15 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CreateTeamMemberRequest; -use Upsun\Model\CreateTeamRequest; -use Upsun\Model\DateTimeFilter; -use Upsun\Model\ListTeamMembers200Response; -use Upsun\Model\ListTeams200Response; -use Upsun\Model\StringFilter; -use Upsun\Model\Team; -use Upsun\Model\TeamMember; -use Upsun\Model\UpdateTeamRequest; /** * Low level TeamsApi (auto-generated) @@ -34,13 +25,13 @@ final class TeamsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -52,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -68,8 +59,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Teams/operation/create-team */ public function createTeam( - CreateTeamRequest $createTeamRequest - ): Team { + \Upsun\Model\CreateTeamRequest $createTeamRequest + ): \Upsun\Model\Team { return $this->createTeamWithHttpInfo( $createTeamRequest ); @@ -83,8 +74,8 @@ public function createTeam( * @throws ClientExceptionInterface */ private function createTeamWithHttpInfo( - CreateTeamRequest $createTeamRequest - ): Team { + \Upsun\Model\CreateTeamRequest $createTeamRequest + ): \Upsun\Model\Team { $request = $this->createTeamRequest( $createTeamRequest ); @@ -123,8 +114,9 @@ private function createTeamWithHttpInfo( * @throws InvalidArgumentException */ private function createTeamRequest( - CreateTeamRequest $createTeamRequest + \Upsun\Model\CreateTeamRequest $createTeamRequest ): RequestInterface { + // verify the required parameter 'createTeamRequest' is set if (empty($createTeamRequest)) { throw new InvalidArgumentException( @@ -140,6 +132,8 @@ private function createTeamRequest( $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -218,8 +212,8 @@ private function createTeamRequest( */ public function createTeamMember( string $teamId, - CreateTeamMemberRequest $createTeamMemberRequest - ): TeamMember { + \Upsun\Model\CreateTeamMemberRequest $createTeamMemberRequest + ): \Upsun\Model\TeamMember { return $this->createTeamMemberWithHttpInfo( $teamId, $createTeamMemberRequest @@ -237,8 +231,8 @@ public function createTeamMember( */ private function createTeamMemberWithHttpInfo( string $teamId, - CreateTeamMemberRequest $createTeamMemberRequest - ): TeamMember { + \Upsun\Model\CreateTeamMemberRequest $createTeamMemberRequest + ): \Upsun\Model\TeamMember { $request = $this->createTeamMemberRequest( $teamId, $createTeamMemberRequest @@ -281,8 +275,9 @@ private function createTeamMemberWithHttpInfo( */ private function createTeamMemberRequest( string $teamId, - CreateTeamMemberRequest $createTeamMemberRequest + \Upsun\Model\CreateTeamMemberRequest $createTeamMemberRequest ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -315,6 +310,7 @@ private function createTeamMemberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -447,6 +443,7 @@ private function deleteTeamWithHttpInfo( private function deleteTeamRequest( string $teamId ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -472,6 +469,7 @@ private function deleteTeamRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -607,6 +605,7 @@ private function deleteTeamMemberRequest( string $teamId, string $userId ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -648,6 +647,7 @@ private function deleteTeamMemberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -718,7 +718,7 @@ private function deleteTeamMemberRequest( */ public function getTeam( string $teamId - ): Team { + ): \Upsun\Model\Team { return $this->getTeamWithHttpInfo( $teamId ); @@ -735,7 +735,7 @@ public function getTeam( */ private function getTeamWithHttpInfo( string $teamId - ): Team { + ): \Upsun\Model\Team { $request = $this->getTeamRequest( $teamId ); @@ -778,6 +778,7 @@ private function getTeamWithHttpInfo( private function getTeamRequest( string $teamId ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -803,6 +804,7 @@ private function getTeamRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -876,7 +878,7 @@ private function getTeamRequest( public function getTeamMember( string $teamId, string $userId - ): TeamMember { + ): \Upsun\Model\TeamMember { return $this->getTeamMemberWithHttpInfo( $teamId, $userId @@ -897,7 +899,7 @@ public function getTeamMember( private function getTeamMemberWithHttpInfo( string $teamId, string $userId - ): TeamMember { + ): \Upsun\Model\TeamMember { $request = $this->getTeamMemberRequest( $teamId, $userId @@ -944,6 +946,7 @@ private function getTeamMemberRequest( string $teamId, string $userId ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -985,6 +988,7 @@ private function getTeamMemberRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1061,7 +1065,7 @@ public function listTeamMembers( ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListTeamMembers200Response { + ): \Upsun\Model\ListTeamMembers200Response { return $this->listTeamMembersWithHttpInfo( $teamId, $pageBefore, @@ -1087,7 +1091,7 @@ private function listTeamMembersWithHttpInfo( ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListTeamMembers200Response { + ): \Upsun\Model\ListTeamMembers200Response { $request = $this->listTeamMembersRequest( $teamId, $pageBefore, @@ -1139,6 +1143,7 @@ private function listTeamMembersRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1167,6 +1172,8 @@ private function listTeamMembersRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1180,6 +1187,8 @@ private function listTeamMembersRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1193,6 +1202,8 @@ private function listTeamMembersRequest( } } + + // path params if ($teamId !== null) { @@ -1203,6 +1214,7 @@ private function listTeamMembersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1277,14 +1289,14 @@ private function listTeamMembersRequest( * @see https://docs.upsun.com/api/#tag/Teams/operation/list-teams */ public function listTeams( - ?StringFilter $filterOrganizationId = null, - ?StringFilter $filterId = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListTeams200Response { + ): \Upsun\Model\ListTeams200Response { return $this->listTeamsWithHttpInfo( $filterOrganizationId, $filterId, @@ -1311,14 +1323,14 @@ public function listTeams( * @throws ClientExceptionInterface */ private function listTeamsWithHttpInfo( - ?StringFilter $filterOrganizationId = null, - ?StringFilter $filterId = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListTeams200Response { + ): \Upsun\Model\ListTeams200Response { $request = $this->listTeamsRequest( $filterOrganizationId, $filterId, @@ -1370,14 +1382,16 @@ private function listTeamsWithHttpInfo( * @throws InvalidArgumentException */ private function listTeamsRequest( - ?StringFilter $filterOrganizationId = null, - ?StringFilter $filterId = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\StringFilter $filterId = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + + if ($pageSize !== null && $pageSize > 100) { throw new InvalidArgumentException( 'invalid value for "$pageSize" when calling TeamsApi.listTeams, @@ -1392,6 +1406,8 @@ private function listTeamsRequest( ); } + + $resourcePath = '/teams'; $formParams = []; $queryParams = []; @@ -1412,6 +1428,8 @@ private function listTeamsRequest( } } + + // query params if ($filterId !== null) { if ('form' === 'deepObject' && is_array($filterId)) { @@ -1425,6 +1443,8 @@ private function listTeamsRequest( } } + + // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -1438,6 +1458,8 @@ private function listTeamsRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1451,6 +1473,8 @@ private function listTeamsRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1464,6 +1488,8 @@ private function listTeamsRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1477,6 +1503,8 @@ private function listTeamsRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1490,6 +1518,10 @@ private function listTeamsRequest( } } + + + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1566,13 +1598,13 @@ private function listTeamsRequest( */ public function listUserTeams( string $userId, - ?StringFilter $filterOrganizationId = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListTeams200Response { + ): \Upsun\Model\ListTeams200Response { return $this->listUserTeamsWithHttpInfo( $userId, $filterOrganizationId, @@ -1601,13 +1633,13 @@ public function listUserTeams( */ private function listUserTeamsWithHttpInfo( string $userId, - ?StringFilter $filterOrganizationId = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): ListTeams200Response { + ): \Upsun\Model\ListTeams200Response { $request = $this->listUserTeamsRequest( $userId, $filterOrganizationId, @@ -1661,13 +1693,14 @@ private function listUserTeamsWithHttpInfo( */ private function listUserTeamsRequest( string $userId, - ?StringFilter $filterOrganizationId = null, - ?DateTimeFilter $filterUpdatedAt = null, + ?\Upsun\Model\StringFilter $filterOrganizationId = null, + ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1690,6 +1723,8 @@ private function listUserTeamsRequest( ); } + + $resourcePath = '/users/{user_id}/teams'; $formParams = []; $queryParams = []; @@ -1710,6 +1745,8 @@ private function listUserTeamsRequest( } } + + // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -1723,6 +1760,8 @@ private function listUserTeamsRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1736,6 +1775,8 @@ private function listUserTeamsRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1749,6 +1790,8 @@ private function listUserTeamsRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1762,6 +1805,8 @@ private function listUserTeamsRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1775,6 +1820,8 @@ private function listUserTeamsRequest( } } + + // path params if ($userId !== null) { @@ -1785,6 +1832,7 @@ private function listUserTeamsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1855,8 +1903,8 @@ private function listUserTeamsRequest( */ public function updateTeam( string $teamId, - ?UpdateTeamRequest $updateTeamRequest = null - ): Team { + ?\Upsun\Model\UpdateTeamRequest $updateTeamRequest = null + ): \Upsun\Model\Team { return $this->updateTeamWithHttpInfo( $teamId, $updateTeamRequest @@ -1874,8 +1922,8 @@ public function updateTeam( */ private function updateTeamWithHttpInfo( string $teamId, - ?UpdateTeamRequest $updateTeamRequest = null - ): Team { + ?\Upsun\Model\UpdateTeamRequest $updateTeamRequest = null + ): \Upsun\Model\Team { $request = $this->updateTeamRequest( $teamId, $updateTeamRequest @@ -1918,8 +1966,9 @@ private function updateTeamWithHttpInfo( */ private function updateTeamRequest( string $teamId, - ?UpdateTeamRequest $updateTeamRequest = null + ?\Upsun\Model\UpdateTeamRequest $updateTeamRequest = null ): RequestInterface { + // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1945,6 +1994,7 @@ private function updateTeamRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ThirdPartyIntegrationsApi.php b/src/Api/ThirdPartyIntegrationsApi.php index 34e729562..167d395e3 100644 --- a/src/Api/ThirdPartyIntegrationsApi.php +++ b/src/Api/ThirdPartyIntegrationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,10 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\AcceptedResponse; -use Upsun\Model\Integration; -use Upsun\Model\IntegrationCreateCreateInput; -use Upsun\Model\IntegrationPatch; /** * Low level ThirdPartyIntegrationsApi (auto-generated) @@ -28,13 +25,13 @@ final class ThirdPartyIntegrationsApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -46,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -63,8 +60,8 @@ public function __construct( */ public function createProjectsIntegrations( string $projectId, - IntegrationCreateCreateInput $integrationCreateCreateInput - ): AcceptedResponse { + \Upsun\Model\IntegrationCreateCreateInput $integrationCreateCreateInput + ): \Upsun\Model\AcceptedResponse { return $this->createProjectsIntegrationsWithHttpInfo( $projectId, $integrationCreateCreateInput @@ -81,8 +78,8 @@ public function createProjectsIntegrations( */ private function createProjectsIntegrationsWithHttpInfo( string $projectId, - IntegrationCreateCreateInput $integrationCreateCreateInput - ): AcceptedResponse { + \Upsun\Model\IntegrationCreateCreateInput $integrationCreateCreateInput + ): \Upsun\Model\AcceptedResponse { $request = $this->createProjectsIntegrationsRequest( $projectId, $integrationCreateCreateInput @@ -124,8 +121,9 @@ private function createProjectsIntegrationsWithHttpInfo( */ private function createProjectsIntegrationsRequest( string $projectId, - IntegrationCreateCreateInput $integrationCreateCreateInput + \Upsun\Model\IntegrationCreateCreateInput $integrationCreateCreateInput ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -158,6 +156,7 @@ private function createProjectsIntegrationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -234,7 +233,7 @@ private function createProjectsIntegrationsRequest( public function deleteProjectsIntegrations( string $projectId, string $integrationId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { return $this->deleteProjectsIntegrationsWithHttpInfo( $projectId, $integrationId @@ -251,7 +250,7 @@ public function deleteProjectsIntegrations( private function deleteProjectsIntegrationsWithHttpInfo( string $projectId, string $integrationId - ): AcceptedResponse { + ): \Upsun\Model\AcceptedResponse { $request = $this->deleteProjectsIntegrationsRequest( $projectId, $integrationId @@ -294,6 +293,7 @@ private function deleteProjectsIntegrationsRequest( string $projectId, string $integrationId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -335,6 +335,7 @@ private function deleteProjectsIntegrationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -403,7 +404,7 @@ private function deleteProjectsIntegrationsRequest( public function getProjectsIntegrations( string $projectId, string $integrationId - ): Integration { + ): \Upsun\Model\Integration { return $this->getProjectsIntegrationsWithHttpInfo( $projectId, $integrationId @@ -420,7 +421,7 @@ public function getProjectsIntegrations( private function getProjectsIntegrationsWithHttpInfo( string $projectId, string $integrationId - ): Integration { + ): \Upsun\Model\Integration { $request = $this->getProjectsIntegrationsRequest( $projectId, $integrationId @@ -463,6 +464,7 @@ private function getProjectsIntegrationsRequest( string $projectId, string $integrationId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -504,6 +506,7 @@ private function getProjectsIntegrationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -631,6 +634,7 @@ private function listProjectsIntegrationsWithHttpInfo( private function listProjectsIntegrationsRequest( string $projectId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -656,6 +660,7 @@ private function listProjectsIntegrationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -725,8 +730,8 @@ private function listProjectsIntegrationsRequest( public function updateProjectsIntegrations( string $projectId, string $integrationId, - IntegrationPatch $integrationPatch - ): AcceptedResponse { + \Upsun\Model\IntegrationPatch $integrationPatch + ): \Upsun\Model\AcceptedResponse { return $this->updateProjectsIntegrationsWithHttpInfo( $projectId, $integrationId, @@ -745,8 +750,8 @@ public function updateProjectsIntegrations( private function updateProjectsIntegrationsWithHttpInfo( string $projectId, string $integrationId, - IntegrationPatch $integrationPatch - ): AcceptedResponse { + \Upsun\Model\IntegrationPatch $integrationPatch + ): \Upsun\Model\AcceptedResponse { $request = $this->updateProjectsIntegrationsRequest( $projectId, $integrationId, @@ -790,8 +795,9 @@ private function updateProjectsIntegrationsWithHttpInfo( private function updateProjectsIntegrationsRequest( string $projectId, string $integrationId, - IntegrationPatch $integrationPatch + \Upsun\Model\IntegrationPatch $integrationPatch ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -840,6 +846,7 @@ private function updateProjectsIntegrationsRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/UserAccessApi.php b/src/Api/UserAccessApi.php index 07eef3714..cba3d62ae 100644 --- a/src/Api/UserAccessApi.php +++ b/src/Api/UserAccessApi.php @@ -13,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\UpdateProjectUserAccessRequest; -use Upsun\Model\UserProjectAccess; /** * Low level UserAccessApi (auto-generated) @@ -27,13 +25,13 @@ final class UserAccessApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -45,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -67,7 +65,7 @@ public function __construct( public function getProjectUserAccess( string $projectId, string $userId - ): UserProjectAccess { + ): \Upsun\Model\UserProjectAccess { return $this->getProjectUserAccessWithHttpInfo( $projectId, $userId @@ -88,7 +86,7 @@ public function getProjectUserAccess( private function getProjectUserAccessWithHttpInfo( string $projectId, string $userId - ): UserProjectAccess { + ): \Upsun\Model\UserProjectAccess { $request = $this->getProjectUserAccessRequest( $projectId, $userId @@ -135,6 +133,7 @@ private function getProjectUserAccessRequest( string $projectId, string $userId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -176,6 +175,7 @@ private function getProjectUserAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -249,7 +249,7 @@ private function getProjectUserAccessRequest( public function getUserProjectAccess( string $userId, string $projectId - ): UserProjectAccess { + ): \Upsun\Model\UserProjectAccess { return $this->getUserProjectAccessWithHttpInfo( $userId, $projectId @@ -270,7 +270,7 @@ public function getUserProjectAccess( private function getUserProjectAccessWithHttpInfo( string $userId, string $projectId - ): UserProjectAccess { + ): \Upsun\Model\UserProjectAccess { $request = $this->getUserProjectAccessRequest( $userId, $projectId @@ -317,6 +317,7 @@ private function getUserProjectAccessRequest( string $userId, string $projectId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -358,6 +359,7 @@ private function getUserProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -487,6 +489,7 @@ private function grantProjectUserAccessRequest( string $projectId, array $grantProjectUserAccessRequestInner ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -519,6 +522,7 @@ private function grantProjectUserAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -656,6 +660,7 @@ private function grantUserProjectAccessRequest( string $userId, array $grantUserProjectAccessRequestInner ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -688,6 +693,7 @@ private function grantUserProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -873,6 +879,7 @@ private function listProjectUserAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -895,6 +902,8 @@ private function listProjectUserAccessRequest( ); } + + $resourcePath = '/projects/{project_id}/user-access'; $formParams = []; $queryParams = []; @@ -915,6 +924,8 @@ private function listProjectUserAccessRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -928,6 +939,8 @@ private function listProjectUserAccessRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -941,6 +954,8 @@ private function listProjectUserAccessRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -954,6 +969,8 @@ private function listProjectUserAccessRequest( } } + + // path params if ($projectId !== null) { @@ -964,6 +981,7 @@ private function listProjectUserAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1149,6 +1167,7 @@ private function listUserProjectAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1171,6 +1190,8 @@ private function listUserProjectAccessRequest( ); } + + $resourcePath = '/users/{user_id}/project-access'; $formParams = []; $queryParams = []; @@ -1191,6 +1212,8 @@ private function listUserProjectAccessRequest( } } + + // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1204,6 +1227,8 @@ private function listUserProjectAccessRequest( } } + + // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1217,6 +1242,8 @@ private function listUserProjectAccessRequest( } } + + // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1230,6 +1257,8 @@ private function listUserProjectAccessRequest( } } + + // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1243,6 +1272,8 @@ private function listUserProjectAccessRequest( } } + + // path params if ($userId !== null) { @@ -1253,6 +1284,7 @@ private function listUserProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1388,6 +1420,7 @@ private function removeProjectUserAccessRequest( string $projectId, string $userId ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1429,6 +1462,7 @@ private function removeProjectUserAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1564,6 +1598,7 @@ private function removeUserProjectAccessRequest( string $userId, string $projectId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1605,6 +1640,7 @@ private function removeUserProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1678,7 +1714,7 @@ private function removeUserProjectAccessRequest( public function updateProjectUserAccess( string $projectId, string $userId, - ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $this->updateProjectUserAccessWithHttpInfo( $projectId, @@ -1701,7 +1737,7 @@ public function updateProjectUserAccess( private function updateProjectUserAccessWithHttpInfo( string $projectId, string $userId, - ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $request = $this->updateProjectUserAccessRequest( $projectId, @@ -1743,8 +1779,9 @@ private function updateProjectUserAccessWithHttpInfo( private function updateProjectUserAccessRequest( string $projectId, string $userId, - ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): RequestInterface { + // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1786,6 +1823,7 @@ private function updateProjectUserAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -1867,7 +1905,7 @@ private function updateProjectUserAccessRequest( public function updateUserProjectAccess( string $userId, string $projectId, - ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $this->updateUserProjectAccessWithHttpInfo( $userId, @@ -1890,7 +1928,7 @@ public function updateUserProjectAccess( private function updateUserProjectAccessWithHttpInfo( string $userId, string $projectId, - ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $request = $this->updateUserProjectAccessRequest( $userId, @@ -1932,8 +1970,9 @@ private function updateUserProjectAccessWithHttpInfo( private function updateUserProjectAccessRequest( string $userId, string $projectId, - ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1975,6 +2014,7 @@ private function updateUserProjectAccessRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', diff --git a/src/Api/UserProfilesApi.php b/src/Api/UserProfilesApi.php index 92196c2be..29770031d 100644 --- a/src/Api/UserProfilesApi.php +++ b/src/Api/UserProfilesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -10,14 +11,8 @@ use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; -use SplFileObject; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\Address; -use Upsun\Model\CreateProfilePicture200Response; -use Upsun\Model\ListProfiles200Response; -use Upsun\Model\Profile; -use Upsun\Model\UpdateProfileRequest; /** * Low level UserProfilesApi (auto-generated) @@ -30,13 +25,13 @@ final class UserProfilesApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -48,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -58,7 +53,7 @@ public function __construct( * * * @param string $uuid (required) - * @param SplFileObject|null $file (optional) + * @param \SplFileObject|null $file (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface @@ -66,8 +61,8 @@ public function __construct( */ public function createProfilePicture( string $uuid, - ?SplFileObject $file = null - ): CreateProfilePicture200Response { + ?\SplFileObject $file = null + ): \Upsun\Model\CreateProfilePicture200Response { return $this->createProfilePictureWithHttpInfo( $uuid, $file @@ -78,15 +73,15 @@ public function createProfilePicture( * Create a user profile picture with HTTP Info * * @param string $uuid (required) - * @param SplFileObject|null $file (optional) + * @param \SplFileObject|null $file (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ private function createProfilePictureWithHttpInfo( string $uuid, - ?SplFileObject $file = null - ): CreateProfilePicture200Response { + ?\SplFileObject $file = null + ): \Upsun\Model\CreateProfilePicture200Response { $request = $this->createProfilePictureRequest( $uuid, $file @@ -123,14 +118,15 @@ private function createProfilePictureWithHttpInfo( * Create request for operation 'createProfilePicture' * * @param string $uuid (required) - * @param SplFileObject|null $file (optional) + * @param \SplFileObject|null $file (optional) * * @throws InvalidArgumentException */ private function createProfilePictureRequest( string $uuid, - ?SplFileObject $file = null + ?\SplFileObject $file = null ): RequestInterface { + // verify the required parameter 'uuid' is set if (empty($uuid)) { throw new InvalidArgumentException( @@ -165,6 +161,7 @@ private function createProfilePictureRequest( $formParams = $formDataProcessor->flatten($formData); $multipart = $formDataProcessor->has_file; + $headers = $this->headerSelector->selectHeaders( ['application/json'], @@ -286,6 +283,7 @@ private function deleteProfilePictureWithHttpInfo( private function deleteProfilePictureRequest( string $uuid ): RequestInterface { + // verify the required parameter 'uuid' is set if (empty($uuid)) { throw new InvalidArgumentException( @@ -311,6 +309,7 @@ private function deleteProfilePictureRequest( ); } + $headers = $this->headerSelector->selectHeaders( [], '', @@ -440,6 +439,7 @@ private function getAddressWithHttpInfo( private function getAddressRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -465,6 +465,7 @@ private function getAddressRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -534,7 +535,7 @@ private function getAddressRequest( */ public function getProfile( string $userId - ): Profile { + ): \Upsun\Model\Profile { return $this->getProfileWithHttpInfo( $userId ); @@ -551,7 +552,7 @@ public function getProfile( */ private function getProfileWithHttpInfo( string $userId - ): Profile { + ): \Upsun\Model\Profile { $request = $this->getProfileRequest( $userId ); @@ -594,6 +595,7 @@ private function getProfileWithHttpInfo( private function getProfileRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -619,6 +621,7 @@ private function getProfileRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -683,7 +686,8 @@ private function getProfileRequest( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/User-Profiles/operation/list-profiles */ - public function listProfiles(): ListProfiles200Response + public function listProfiles( + ): \Upsun\Model\ListProfiles200Response { return $this->listProfilesWithHttpInfo( ); @@ -695,7 +699,8 @@ public function listProfiles(): ListProfiles200Response * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function listProfilesWithHttpInfo(): ListProfiles200Response + private function listProfilesWithHttpInfo( + ): \Upsun\Model\ListProfiles200Response { $request = $this->listProfilesRequest( ); @@ -732,8 +737,10 @@ private function listProfilesWithHttpInfo(): ListProfiles200Response * * @throws InvalidArgumentException */ - private function listProfilesRequest(): RequestInterface - { + private function listProfilesRequest( + ): RequestInterface { + + $resourcePath = '/profiles'; $formParams = []; $queryParams = []; @@ -741,6 +748,8 @@ private function listProfilesRequest(): RequestInterface $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -811,7 +820,7 @@ private function listProfilesRequest(): RequestInterface */ public function updateAddress( string $userId, - ?Address $address = null + ?\Upsun\Model\Address $address = null ): mixed { return $this->updateAddressWithHttpInfo( $userId, @@ -830,7 +839,7 @@ public function updateAddress( */ private function updateAddressWithHttpInfo( string $userId, - ?Address $address = null + ?\Upsun\Model\Address $address = null ): mixed { $request = $this->updateAddressRequest( $userId, @@ -874,8 +883,9 @@ private function updateAddressWithHttpInfo( */ private function updateAddressRequest( string $userId, - ?Address $address = null + ?\Upsun\Model\Address $address = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -901,6 +911,7 @@ private function updateAddressRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -979,8 +990,8 @@ private function updateAddressRequest( */ public function updateProfile( string $userId, - ?UpdateProfileRequest $updateProfileRequest = null - ): Profile { + ?\Upsun\Model\UpdateProfileRequest $updateProfileRequest = null + ): \Upsun\Model\Profile { return $this->updateProfileWithHttpInfo( $userId, $updateProfileRequest @@ -998,8 +1009,8 @@ public function updateProfile( */ private function updateProfileWithHttpInfo( string $userId, - ?UpdateProfileRequest $updateProfileRequest = null - ): Profile { + ?\Upsun\Model\UpdateProfileRequest $updateProfileRequest = null + ): \Upsun\Model\Profile { $request = $this->updateProfileRequest( $userId, $updateProfileRequest @@ -1042,8 +1053,9 @@ private function updateProfileWithHttpInfo( */ private function updateProfileRequest( string $userId, - ?UpdateProfileRequest $updateProfileRequest = null + ?\Upsun\Model\UpdateProfileRequest $updateProfileRequest = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1069,6 +1081,7 @@ private function updateProfileRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/UsersApi.php b/src/Api/UsersApi.php index ad7bab8a6..1c30fd9b4 100644 --- a/src/Api/UsersApi.php +++ b/src/Api/UsersApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,12 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\CurrentUser; -use Upsun\Model\GetCurrentUserVerificationStatus200Response; -use Upsun\Model\GetCurrentUserVerificationStatusFull200Response; -use Upsun\Model\ResetEmailAddressRequest; -use Upsun\Model\UpdateUserRequest; -use Upsun\Model\User; /** * Low level UsersApi (auto-generated) @@ -30,13 +25,13 @@ final class UsersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -48,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -62,7 +57,8 @@ public function __construct( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Users/operation/get-current-user */ - public function getCurrentUser(): User + public function getCurrentUser( + ): \Upsun\Model\User { return $this->getCurrentUserWithHttpInfo( ); @@ -74,7 +70,8 @@ public function getCurrentUser(): User * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserWithHttpInfo(): User + private function getCurrentUserWithHttpInfo( + ): \Upsun\Model\User { $request = $this->getCurrentUserRequest( ); @@ -111,8 +108,10 @@ private function getCurrentUserWithHttpInfo(): User * * @throws InvalidArgumentException */ - private function getCurrentUserRequest(): RequestInterface - { + private function getCurrentUserRequest( + ): RequestInterface { + + $resourcePath = '/users/me'; $formParams = []; $queryParams = []; @@ -120,6 +119,8 @@ private function getCurrentUserRequest(): RequestInterface $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -187,7 +188,8 @@ private function getCurrentUserRequest(): RequestInterface * * @deprecated */ - public function getCurrentUserDeprecated(): CurrentUser + public function getCurrentUserDeprecated( + ): \Upsun\Model\CurrentUser { return $this->getCurrentUserDeprecatedWithHttpInfo( ); @@ -201,7 +203,8 @@ public function getCurrentUserDeprecated(): CurrentUser * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserDeprecatedWithHttpInfo(): CurrentUser + private function getCurrentUserDeprecatedWithHttpInfo( + ): \Upsun\Model\CurrentUser { $request = $this->getCurrentUserDeprecatedRequest( ); @@ -240,8 +243,10 @@ private function getCurrentUserDeprecatedWithHttpInfo(): CurrentUser * * @deprecated */ - private function getCurrentUserDeprecatedRequest(): RequestInterface - { + private function getCurrentUserDeprecatedRequest( + ): RequestInterface { + + $resourcePath = '/me'; $formParams = []; $queryParams = []; @@ -249,6 +254,8 @@ private function getCurrentUserDeprecatedRequest(): RequestInterface $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -314,7 +321,8 @@ private function getCurrentUserDeprecatedRequest(): RequestInterface * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Users/operation/get-current-user-verification-status */ - public function getCurrentUserVerificationStatus(): GetCurrentUserVerificationStatus200Response + public function getCurrentUserVerificationStatus( + ): \Upsun\Model\GetCurrentUserVerificationStatus200Response { return $this->getCurrentUserVerificationStatusWithHttpInfo( ); @@ -326,7 +334,8 @@ public function getCurrentUserVerificationStatus(): GetCurrentUserVerificationSt * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserVerificationStatusWithHttpInfo(): GetCurrentUserVerificationStatus200Response + private function getCurrentUserVerificationStatusWithHttpInfo( + ): \Upsun\Model\GetCurrentUserVerificationStatus200Response { $request = $this->getCurrentUserVerificationStatusRequest( ); @@ -363,8 +372,10 @@ private function getCurrentUserVerificationStatusWithHttpInfo(): GetCurrentUserV * * @throws InvalidArgumentException */ - private function getCurrentUserVerificationStatusRequest(): RequestInterface - { + private function getCurrentUserVerificationStatusRequest( + ): RequestInterface { + + $resourcePath = '/me/phone'; $formParams = []; $queryParams = []; @@ -372,6 +383,8 @@ private function getCurrentUserVerificationStatusRequest(): RequestInterface $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -437,7 +450,8 @@ private function getCurrentUserVerificationStatusRequest(): RequestInterface * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Users/operation/get-current-user-verification-status-full */ - public function getCurrentUserVerificationStatusFull(): GetCurrentUserVerificationStatusFull200Response + public function getCurrentUserVerificationStatusFull( + ): \Upsun\Model\GetCurrentUserVerificationStatusFull200Response { return $this->getCurrentUserVerificationStatusFullWithHttpInfo( ); @@ -449,7 +463,8 @@ public function getCurrentUserVerificationStatusFull(): GetCurrentUserVerificati * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserVerificationStatusFullWithHttpInfo(): GetCurrentUserVerificationStatusFull200Response + private function getCurrentUserVerificationStatusFullWithHttpInfo( + ): \Upsun\Model\GetCurrentUserVerificationStatusFull200Response { $request = $this->getCurrentUserVerificationStatusFullRequest( ); @@ -486,8 +501,10 @@ private function getCurrentUserVerificationStatusFullWithHttpInfo(): GetCurrentU * * @throws InvalidArgumentException */ - private function getCurrentUserVerificationStatusFullRequest(): RequestInterface - { + private function getCurrentUserVerificationStatusFullRequest( + ): RequestInterface { + + $resourcePath = '/me/verification'; $formParams = []; $queryParams = []; @@ -495,6 +512,8 @@ private function getCurrentUserVerificationStatusFullRequest(): RequestInterface $httpBody = null; $multipart = false; + + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -565,7 +584,7 @@ private function getCurrentUserVerificationStatusFullRequest(): RequestInterface */ public function getUser( string $userId - ): User { + ): \Upsun\Model\User { return $this->getUserWithHttpInfo( $userId ); @@ -582,7 +601,7 @@ public function getUser( */ private function getUserWithHttpInfo( string $userId - ): User { + ): \Upsun\Model\User { $request = $this->getUserRequest( $userId ); @@ -625,6 +644,7 @@ private function getUserWithHttpInfo( private function getUserRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -650,6 +670,7 @@ private function getUserRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -719,7 +740,7 @@ private function getUserRequest( */ public function getUserByEmailAddress( string $email - ): User { + ): \Upsun\Model\User { return $this->getUserByEmailAddressWithHttpInfo( $email ); @@ -735,7 +756,7 @@ public function getUserByEmailAddress( */ private function getUserByEmailAddressWithHttpInfo( string $email - ): User { + ): \Upsun\Model\User { $request = $this->getUserByEmailAddressRequest( $email ); @@ -777,6 +798,7 @@ private function getUserByEmailAddressWithHttpInfo( private function getUserByEmailAddressRequest( string $email ): RequestInterface { + // verify the required parameter 'email' is set if (empty($email)) { throw new InvalidArgumentException( @@ -802,6 +824,7 @@ private function getUserByEmailAddressRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -871,7 +894,7 @@ private function getUserByEmailAddressRequest( */ public function getUserByUsername( string $username - ): User { + ): \Upsun\Model\User { return $this->getUserByUsernameWithHttpInfo( $username ); @@ -887,7 +910,7 @@ public function getUserByUsername( */ private function getUserByUsernameWithHttpInfo( string $username - ): User { + ): \Upsun\Model\User { $request = $this->getUserByUsernameRequest( $username ); @@ -929,6 +952,7 @@ private function getUserByUsernameWithHttpInfo( private function getUserByUsernameRequest( string $username ): RequestInterface { + // verify the required parameter 'username' is set if (empty($username)) { throw new InvalidArgumentException( @@ -954,6 +978,7 @@ private function getUserByUsernameRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1026,7 +1051,7 @@ private function getUserByUsernameRequest( */ public function resetEmailAddress( string $userId, - ?ResetEmailAddressRequest $resetEmailAddressRequest = null + ?\Upsun\Model\ResetEmailAddressRequest $resetEmailAddressRequest = null ): void { $this->resetEmailAddressWithHttpInfo( $userId, @@ -1046,7 +1071,7 @@ public function resetEmailAddress( */ private function resetEmailAddressWithHttpInfo( string $userId, - ?ResetEmailAddressRequest $resetEmailAddressRequest = null + ?\Upsun\Model\ResetEmailAddressRequest $resetEmailAddressRequest = null ): void { $request = $this->resetEmailAddressRequest( $userId, @@ -1085,8 +1110,9 @@ private function resetEmailAddressWithHttpInfo( */ private function resetEmailAddressRequest( string $userId, - ?ResetEmailAddressRequest $resetEmailAddressRequest = null + ?\Upsun\Model\ResetEmailAddressRequest $resetEmailAddressRequest = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1112,6 +1138,7 @@ private function resetEmailAddressRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1245,6 +1272,7 @@ private function resetPasswordWithHttpInfo( private function resetPasswordRequest( string $userId ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1270,6 +1298,7 @@ private function resetPasswordRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1340,8 +1369,8 @@ private function resetPasswordRequest( */ public function updateUser( string $userId, - ?UpdateUserRequest $updateUserRequest = null - ): User { + ?\Upsun\Model\UpdateUserRequest $updateUserRequest = null + ): \Upsun\Model\User { return $this->updateUserWithHttpInfo( $userId, $updateUserRequest @@ -1359,8 +1388,8 @@ public function updateUser( */ private function updateUserWithHttpInfo( string $userId, - ?UpdateUserRequest $updateUserRequest = null - ): User { + ?\Upsun\Model\UpdateUserRequest $updateUserRequest = null + ): \Upsun\Model\User { $request = $this->updateUserRequest( $userId, $updateUserRequest @@ -1403,8 +1432,9 @@ private function updateUserWithHttpInfo( */ private function updateUserRequest( string $userId, - ?UpdateUserRequest $updateUserRequest = null + ?\Upsun\Model\UpdateUserRequest $updateUserRequest = null ): RequestInterface { + // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1430,6 +1460,7 @@ private function updateUserRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/VouchersApi.php b/src/Api/VouchersApi.php index 47367a842..a3efe76af 100644 --- a/src/Api/VouchersApi.php +++ b/src/Api/VouchersApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,8 +13,6 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; -use Upsun\Model\ApplyOrgVoucherRequest; -use Upsun\Model\Vouchers; /** * Low level VouchersApi (auto-generated) @@ -26,13 +25,13 @@ final class VouchersApi extends AbstractApi { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -44,7 +43,7 @@ public function __construct( $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } @@ -63,7 +62,7 @@ public function __construct( */ public function applyOrgVoucher( string $organizationId, - ApplyOrgVoucherRequest $applyOrgVoucherRequest + \Upsun\Model\ApplyOrgVoucherRequest $applyOrgVoucherRequest ): void { $this->applyOrgVoucherWithHttpInfo( $organizationId, @@ -82,7 +81,7 @@ public function applyOrgVoucher( */ private function applyOrgVoucherWithHttpInfo( string $organizationId, - ApplyOrgVoucherRequest $applyOrgVoucherRequest + \Upsun\Model\ApplyOrgVoucherRequest $applyOrgVoucherRequest ): void { $request = $this->applyOrgVoucherRequest( $organizationId, @@ -120,8 +119,9 @@ private function applyOrgVoucherWithHttpInfo( */ private function applyOrgVoucherRequest( string $organizationId, - ApplyOrgVoucherRequest $applyOrgVoucherRequest + \Upsun\Model\ApplyOrgVoucherRequest $applyOrgVoucherRequest ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -154,6 +154,7 @@ private function applyOrgVoucherRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -233,7 +234,7 @@ private function applyOrgVoucherRequest( */ public function listOrgVouchers( string $organizationId - ): Vouchers { + ): \Upsun\Model\Vouchers { return $this->listOrgVouchersWithHttpInfo( $organizationId ); @@ -251,7 +252,7 @@ public function listOrgVouchers( */ private function listOrgVouchersWithHttpInfo( string $organizationId - ): Vouchers { + ): \Upsun\Model\Vouchers { $request = $this->listOrgVouchersRequest( $organizationId ); @@ -295,6 +296,7 @@ private function listOrgVouchersWithHttpInfo( private function listOrgVouchersRequest( string $organizationId ): RequestInterface { + // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -320,6 +322,7 @@ private function listOrgVouchersRequest( ); } + $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/templates/php/Configuration.mustache b/templates/php/Configuration.mustache index 9d421ea69..2393885f7 100644 --- a/templates/php/Configuration.mustache +++ b/templates/php/Configuration.mustache @@ -5,7 +5,7 @@ namespace {{apiPackage}}; use Upsun\Core\UserAgent; /** - * APIConfiguration holder for the Upsun API Client. + * ApiConfiguration holder for the Upsun API Client. * * This class holds API token and other runtime options * used by the generated client classes. diff --git a/templates/php/libraries/psr-18/api.mustache b/templates/php/libraries/psr-18/api.mustache index c97f2a26c..f611fe818 100644 --- a/templates/php/libraries/psr-18/api.mustache +++ b/templates/php/libraries/psr-18/api.mustache @@ -22,13 +22,13 @@ use {{invokerPackage}}\Core\OAuthProvider; { private readonly ApiHeaderSelector $headerSelector; - private APIConfiguration $config; + private ApiConfiguration $config; public function __construct( OAuthProvider $oauthProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, - ?APIConfiguration $config = null, + ?ApiConfiguration $config = null, ?StreamFactoryInterface $streamFactory = null, ?ApiHeaderSelector $selector = null, ) { @@ -40,7 +40,7 @@ use {{invokerPackage}}\Core\OAuthProvider; $streamFactory ); - $this->config = $config ?? (new APIConfiguration())->setHost(AbstractApi::BASE_PATH); + $this->config = $config ?? (new ApiConfiguration())->setHost(AbstractApi::BASE_PATH); $this->headerSelector = $selector ?? new ApiHeaderSelector(); } From 4a299c31f7adbcf78c1229998432e065b5942edd Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 11:32:11 +0200 Subject: [PATCH 03/13] chore(regen): regenerate SDK models and update OAuthProvider post-regen edits --- composer.json | 2 - src/Core/OAuthProvider.php | 5 +- src/Model/AcceptedResponse.php | 16 +- src/Model/AccessControlInner.php | 3 + src/Model/Activity.php | 150 ++++---- src/Model/AddonCredential.php | 16 +- src/Model/AddonCredential1.php | 22 +- src/Model/Address.php | 64 ++-- src/Model/AddressGrantsInner.php | 3 + src/Model/AddressMetadata.php | 10 +- src/Model/AddressMetadataMetadata.php | 16 +- src/Model/AggregatedFeatures.php | 10 +- src/Model/Alert.php | 49 +-- src/Model/ApiToken.php | 65 ++-- src/Model/ApplyOrgVoucherRequest.php | 4 + src/Model/ArrayFilter.php | 28 +- src/Model/Author.php | 27 +- src/Model/AuthorizationsInner.php | 3 + src/Model/AutoscalerCPUPressureTrigger.php | 22 +- src/Model/AutoscalerCPUResources.php | 16 +- src/Model/AutoscalerCPUTrigger.php | 22 +- src/Model/AutoscalerCondition.php | 16 +- src/Model/AutoscalerDuration.php | 1 + src/Model/AutoscalerInstances.php | 16 +- src/Model/AutoscalerMemoryPressureTrigger.php | 22 +- src/Model/AutoscalerMemoryResources.php | 16 +- src/Model/AutoscalerMemoryTrigger.php | 22 +- src/Model/AutoscalerResources.php | 20 +- src/Model/AutoscalerScalingCooldown.php | 16 +- src/Model/AutoscalerScalingFactor.php | 16 +- src/Model/AutoscalerServiceSettings.php | 34 +- src/Model/AutoscalerSettings.php | 4 + src/Model/AutoscalerTriggers.php | 36 +- src/Model/Autoscaling.php | 10 +- src/Model/Backup.php | 100 ++--- src/Model/BasicAuth.php | 16 +- src/Model/Bitbucket.php | 16 +- src/Model/BitbucketIntegration.php | 103 ++--- src/Model/BitbucketIntegrationCreateInput.php | 70 ++-- src/Model/BitbucketIntegrationPatch.php | 70 ++-- src/Model/BitbucketServer.php | 16 +- src/Model/BitbucketServerIntegration.php | 97 ++--- .../BitbucketServerIntegrationCreateInput.php | 70 ++-- src/Model/BitbucketServerIntegrationPatch.php | 70 ++-- src/Model/Blackfire.php | 16 +- src/Model/BlackfireIntegration.php | 58 +-- src/Model/BlackfireIntegrationCreateInput.php | 11 +- src/Model/BlackfireIntegrationPatch.php | 11 +- .../BlackfirePhpServerCaches200Response.php | 9 +- ...irePhpServerCaches200ResponseDataInner.php | 4 + .../BlackfirePhpServerCaches400Response.php | 4 + .../BlackfirePhpServerCaches499Response.php | 4 + .../BlackfireProfileGraph200Response.php | 3 + .../BlackfireProfileProfile200Response.php | 4 + ...BlackfireProfileSubprofiles200Response.php | 4 + .../BlackfireProfileTimeline200Response.php | 3 + .../BlackfireProfilesList200Response.php | 10 +- ...reProfilesList200ResponseProfilesInner.php | 13 +- ...filesList200ResponseProfilesInnerAgent.php | 4 + ...lesList200ResponseProfilesInnerContext.php | 3 + ...ofilesList200ResponseProfilesInnerData.php | 4 + ...st200ResponseProfilesInnerDataEnvelope.php | 4 + ...ponseProfilesInnerDataImportantMetrics.php | 4 + ...sInnerDataImportantMetricsHttpRequests.php | 4 + ...lesInnerDataImportantMetricsSqlQueries.php | 4 + ...filesList200ResponseProfilesInnerLinks.php | 4 + ...t200ResponseProfilesInnerLinksGraphUrl.php | 3 + ...filesList200ResponseProfilesInnerOwner.php | 4 + ...fireProfilesRecommendations200Response.php | 10 +- ...dations200ResponseRecommendationsInner.php | 4 + ...ns200ResponseRecommendationsInnerLinks.php | 4 + ...ponseRecommendationsInnerLinksApiGraph.php | 3 + ...nseRecommendationsInnerLinksApiProfile.php | 3 + ...ecommendationsInnerLinksApiSubprofiles.php | 3 + ...seRecommendationsInnerLinksApiTimeline.php | 3 + .../BlackfireServerGlobal200Response.php | 9 +- ...Global200ResponseAlertEvaluationsInner.php | 3 + .../BlackfireServerGlobal200ResponseQuota.php | 13 +- ...BlackfireServerGlobal200ResponseServer.php | 10 +- ...ServerGlobal200ResponseServerDataInner.php | 4 + .../BlackfireServerTopSpans200Response.php | 3 + ...rverTopSpans200ResponseAdvancedFilters.php | 10 +- ...s200ResponseAdvancedFiltersFieldsValue.php | 10 +- ...eAdvancedFiltersFieldsValueValuesInner.php | 4 + ...kfireServerTopSpans200ResponseTopSpans.php | 10 +- ...erTopSpans200ResponseTopSpansDataInner.php | 4 + ...ServerTransactionsBreakdown200Response.php | 3 + ...nsBreakdown200ResponseBreakdownTopHits.php | 4 + ...onsBreakdown200ResponseTopHitsTimeline.php | 10 +- ...own200ResponseTopHitsTimelineDataInner.php | 10 +- ...HitsTimelineDataInnerTransactionsValue.php | 4 + ...ctionsBreakdown200ResponseTransactions.php | 10 +- ...akdown200ResponseTransactionsDataInner.php | 4 + ...n200ResponseTransactionsDataInnerLinks.php | 4 + ...onseTransactionsDataInnerLinksProfiles.php | 4 + ...nsactionsDataInnerLinksRecommendations.php | 4 + ...onseTransactionsDataInnerLinksTopSpans.php | 4 + src/Model/Blob.php | 33 +- src/Model/BuildCachesValue.php | 4 + src/Model/BuildConfiguration.php | 10 +- src/Model/BuildResources.php | 10 +- src/Model/BuildResources1.php | 4 + src/Model/BuildResources2.php | 4 + src/Model/CacheConfiguration.php | 16 +- src/Model/CanAffordSubscriptionRequest.php | 4 + ...CanCreateNewOrgSubscription200Response.php | 4 + ...gSubscription200ResponseRequiredAction.php | 4 + .../CanUpdateSubscription200Response.php | 4 + src/Model/Certificate.php | 73 ++-- src/Model/CertificateCreateInput.php | 22 +- src/Model/CertificatePatch.php | 10 +- src/Model/CertificateProvisioner.php | 34 +- src/Model/CertificateProvisionerPatch.php | 28 +- src/Model/Commands.php | 4 + src/Model/Commands1.php | 4 + src/Model/Commands2.php | 4 + src/Model/CommandsInner.php | 4 + src/Model/Commit.php | 40 +- src/Model/Committer.php | 27 +- src/Model/CommunityPackagesInner.php | 8 +- src/Model/Components.php | 10 +- src/Model/ComposableImages.php | 10 +- src/Model/Config.php | 112 +++--- src/Model/ConfirmPhoneNumberRequest.php | 4 + .../ConfirmTotpEnrollment200Response.php | 4 + src/Model/ConfirmTotpEnrollmentRequest.php | 4 + src/Model/Connection.php | 55 +-- src/Model/ContainerProfilesValueValue.php | 3 + .../ContinuousProfilingConfiguration.php | 4 + src/Model/CreateApiTokenRequest.php | 4 + ...ateAuthorizationCredentials200Response.php | 4 + ...ionCredentials200ResponseRedirectToUrl.php | 4 + src/Model/CreateOrgInviteRequest.php | 3 + src/Model/CreateOrgMemberRequest.php | 3 + src/Model/CreateOrgProjectRequest.php | 40 +- src/Model/CreateOrgRequest.php | 3 + src/Model/CreateOrgSubscriptionRequest.php | 10 +- src/Model/CreateProfilePicture200Response.php | 4 + src/Model/CreateProjectInviteRequest.php | 15 +- ...eProjectInviteRequestEnvironmentsInner.php | 3 + ...teProjectInviteRequestPermissionsInner.php | 3 + src/Model/CreateSshKeyRequest.php | 4 + src/Model/CreateTeamMemberRequest.php | 4 + src/Model/CreateTeamRequest.php | 4 + src/Model/CreateTicketRequest.php | 9 +- .../CreateTicketRequestAttachmentsInner.php | 4 + src/Model/CronsDeploymentState.php | 15 +- src/Model/CronsValue.php | 4 + src/Model/CurrencyAmount.php | 28 +- src/Model/CurrencyAmountNullable.php | 28 +- src/Model/CurrentUser.php | 78 ++-- src/Model/CurrentUserProjectsInner.php | 15 +- src/Model/CustomDomains.php | 16 +- src/Model/DataRetention.php | 10 +- src/Model/DataRetentionConfigurationValue.php | 4 + .../DataRetentionConfigurationValue1.php | 4 + src/Model/DateTimeFilter.php | 46 +-- src/Model/DedicatedDeploymentTarget.php | 84 +++-- .../DedicatedDeploymentTargetCreateInput.php | 22 +- src/Model/DedicatedDeploymentTargetPatch.php | 22 +- src/Model/DefaultConfig.php | 10 +- src/Model/DefaultConfig1.php | 10 +- src/Model/DefaultResources.php | 3 + src/Model/Deployment.php | 145 +++---- src/Model/DeploymentHostsInner.php | 3 + src/Model/DeploymentState.php | 76 ++-- src/Model/DeploymentTarget.php | 3 + src/Model/DeploymentTargetCreateInput.php | 3 + src/Model/DeploymentTargetPatch.php | 3 + src/Model/DevelopmentResources.php | 28 +- src/Model/Diff.php | 34 +- src/Model/Discount.php | 78 ++-- src/Model/DiscountCommitment.php | 22 +- src/Model/DiscountCommitmentAmount.php | 22 +- src/Model/DiscountCommitmentNet.php | 22 +- src/Model/DiscountDiscount.php | 22 +- src/Model/DiskResources.php | 4 + src/Model/DiskResources1.php | 4 + src/Model/DiskResources2.php | 4 + src/Model/DocrootsValue.php | 4 + src/Model/Domain.php | 3 + src/Model/DomainClaim.php | 43 ++- src/Model/DomainCreateInput.php | 3 + src/Model/DomainPatch.php | 3 + src/Model/EmailIntegration.php | 50 +-- src/Model/EmailIntegrationCreateInput.php | 17 +- src/Model/EmailIntegrationPatch.php | 17 +- src/Model/EnterpriseDeploymentTarget.php | 54 +-- .../EnterpriseDeploymentTargetCreateInput.php | 28 +- src/Model/EnterpriseDeploymentTargetPatch.php | 28 +- src/Model/Environment.php | 238 ++++++------ src/Model/EnvironmentActivateInput.php | 4 + src/Model/EnvironmentBackupInput.php | 10 +- src/Model/EnvironmentBranchInput.php | 15 +- src/Model/EnvironmentDeployInput.php | 9 +- src/Model/EnvironmentInfo.php | 52 +-- src/Model/EnvironmentInitializeInput.php | 30 +- src/Model/EnvironmentMergeInput.php | 4 + src/Model/EnvironmentOperationInput.php | 16 +- src/Model/EnvironmentPatch.php | 51 +-- src/Model/EnvironmentRestoreInput.php | 16 +- src/Model/EnvironmentSourceOperation.php | 28 +- src/Model/EnvironmentSourceOperationInput.php | 10 +- src/Model/EnvironmentSynchronizeInput.php | 28 +- src/Model/EnvironmentType.php | 10 +- src/Model/EnvironmentVariable.php | 97 ++--- src/Model/EnvironmentVariableCreateInput.php | 52 +-- src/Model/EnvironmentVariablePatch.php | 52 +-- src/Model/EnvironmentVariablesInner.php | 4 + src/Model/EnvironmentsCredentialsValue.php | 4 + src/Model/Error.php | 10 +- src/Model/EstimationObject.php | 40 +- src/Model/FastlyCDN.php | 16 +- src/Model/FastlyIntegration.php | 61 +-- src/Model/FastlyIntegrationCreateInput.php | 34 +- src/Model/FastlyIntegrationPatch.php | 34 +- src/Model/FilesInner.php | 4 + src/Model/FilterSelect.php | 4 + src/Model/FilterSelectValues.php | 3 + src/Model/Firewall.php | 10 +- src/Model/FoundationDeploymentTarget.php | 46 +-- .../FoundationDeploymentTargetCreateInput.php | 34 +- src/Model/FoundationDeploymentTargetPatch.php | 34 +- src/Model/GetAddress200Response.php | 70 ++-- src/Model/GetApplicationFilter200Response.php | 10 +- ...pplicationFilter200ResponseFieldsValue.php | 10 +- ...ilter200ResponseFieldsValueValuesInner.php | 4 + src/Model/GetApplicationMerge200Response.php | 18 +- ...ApplicationMerge200ResponseFlamebearer.php | 4 + ...ApplicationMerge200ResponseGroupsValue.php | 4 + .../GetApplicationMerge200ResponseHeatmap.php | 4 + ...GetApplicationMerge200ResponseMetadata.php | 4 + ...GetApplicationMerge200ResponseTimeline.php | 4 + src/Model/GetApplicationMerge400Response.php | 4 + .../GetApplicationTimeline200Response.php | 9 +- ...licationTimeline200ResponsePointsInner.php | 4 + .../GetApplicationTimeline400Response.php | 4 + ...rrentUserVerificationStatus200Response.php | 4 + ...tUserVerificationStatusFull200Response.php | 4 + src/Model/GetOrgPrepaymentInfo200Response.php | 10 +- .../GetOrgPrepaymentInfo200ResponseLinks.php | 4 + ...tOrgPrepaymentInfo200ResponseLinksSelf.php | 4 + ...aymentInfo200ResponseLinksTransactions.php | 4 + .../GetSubscriptionUsageAlerts200Response.php | 16 +- src/Model/GetTotpEnrollment200Response.php | 4 + src/Model/GetTypeAllowance200Response.php | 4 + .../GetTypeAllowance200ResponseCurrencies.php | 4 + ...tTypeAllowance200ResponseCurrenciesAUD.php | 4 + ...tTypeAllowance200ResponseCurrenciesCAD.php | 4 + ...tTypeAllowance200ResponseCurrenciesEUR.php | 4 + ...tTypeAllowance200ResponseCurrenciesGBP.php | 4 + ...tTypeAllowance200ResponseCurrenciesUSD.php | 4 + src/Model/GetUsageAlerts200Response.php | 16 +- src/Model/GitHub.php | 16 +- src/Model/GitLab.php | 16 +- src/Model/GitLabIntegration.php | 113 +++--- src/Model/GitLabIntegrationCreateInput.php | 76 ++-- src/Model/GitLabIntegrationPatch.php | 76 ++-- src/Model/GitServerConfiguration.php | 10 +- src/Model/GithubIntegration.php | 103 ++--- src/Model/GithubIntegrationCreateInput.php | 70 ++-- src/Model/GithubIntegrationPatch.php | 70 ++-- .../GrantProjectTeamAccessRequestInner.php | 4 + .../GrantProjectUserAccessRequestInner.php | 3 + .../GrantTeamProjectAccessRequestInner.php | 4 + .../GrantUserProjectAccessRequestInner.php | 3 + src/Model/GuaranteedResources.php | 16 +- src/Model/HTTPLogForwarding.php | 16 +- src/Model/HalLinks.php | 22 +- src/Model/HalLinksNext.php | 16 +- src/Model/HalLinksPrevious.php | 16 +- src/Model/HalLinksSelf.php | 16 +- src/Model/HealthEmail.php | 16 +- src/Model/HealthPagerDuty.php | 16 +- src/Model/HealthSlack.php | 16 +- src/Model/HealthWebHook.php | 16 +- src/Model/HealthWebHookIntegration.php | 50 +-- .../HealthWebHookIntegrationCreateInput.php | 23 +- src/Model/HealthWebHookIntegrationPatch.php | 23 +- src/Model/History.php | 63 ++-- src/Model/Hooks.php | 4 + src/Model/Hooks1.php | 16 +- src/Model/HostsInner.php | 3 + src/Model/HttpAccessPermissions.php | 16 +- src/Model/HttpAccessPermissions1.php | 16 +- src/Model/HttpAccessPermissions2.php | 16 +- src/Model/HttpLogIntegration.php | 56 +-- src/Model/HttpLogIntegrationCreateInput.php | 23 +- src/Model/HttpLogIntegrationPatch.php | 29 +- .../HttpMetricsTimelineIps200Response.php | 3 + ...MetricsTimelineIps200ResponseBreakdown.php | 9 +- ...melineIps200ResponseBreakdownDataInner.php | 4 + ...sTimelineIps200ResponseTopHitsTimeline.php | 10 +- ...Ips200ResponseTopHitsTimelineDataInner.php | 10 +- ...ponseTopHitsTimelineDataInnerDataValue.php | 4 + .../HttpMetricsTimelineUrls200Response.php | 3 + ...etricsTimelineUrls200ResponseBreakdown.php | 9 +- ...elineUrls200ResponseBreakdownDataInner.php | 3 + ...pMetricsTimelineUrls200ResponseFilters.php | 10 +- ...elineUrls200ResponseFiltersFieldsValue.php | 10 +- ...0ResponseFiltersFieldsValueValuesInner.php | 4 + ...TimelineUrls200ResponseTopHitsTimeline.php | 10 +- ...rls200ResponseTopHitsTimelineDataInner.php | 10 +- ...0ResponseTopHitsTimelineDataInnerCodes.php | 4 + ...ponseTopHitsTimelineDataInnerUrlsValue.php | 4 + ...tpMetricsTimelineUserAgents200Response.php | 3 + ...TimelineUserAgents200ResponseBreakdown.php | 9 +- ...serAgents200ResponseBreakdownDataInner.php | 4 + ...neUserAgents200ResponseTopHitsTimeline.php | 10 +- ...nts200ResponseTopHitsTimelineDataInner.php | 10 +- ...ponseTopHitsTimelineDataInnerDataValue.php | 4 + src/Model/ImageTypeRestrictions.php | 4 + src/Model/ImagesValueValue.php | 4 + src/Model/Integration.php | 3 + src/Model/IntegrationCreateCreateInput.php | 3 + src/Model/IntegrationPatch.php | 3 + src/Model/Integrations.php | 10 +- src/Model/Invoice.php | 116 +++--- src/Model/InvoicePDF.php | 19 +- src/Model/IssuerInner.php | 4 + .../KubernetesDeploymentTargetStorage.php | 40 +- ...etesDeploymentTargetStorageCreateInput.php | 16 +- ...KubernetesDeploymentTargetStoragePatch.php | 16 +- src/Model/LastDeploymentCommandsInner.php | 4 + src/Model/LineItem.php | 59 +-- src/Model/LineItemComponent.php | 28 +- src/Model/Link.php | 10 +- src/Model/ListApplications200Response.php | 10 +- ...plications200ResponseApplicationsValue.php | 10 +- ...onseApplicationsValueProfileTypesValue.php | 3 + src/Model/ListApplications400Response.php | 4 + src/Model/ListApplications499Response.php | 4 + src/Model/ListLinks.php | 22 +- src/Model/ListOrgDiscounts200Response.php | 10 +- src/Model/ListOrgInvoices200Response.php | 10 +- src/Model/ListOrgMembers200Response.php | 10 +- src/Model/ListOrgOrders200Response.php | 10 +- src/Model/ListOrgPlanRecords200Response.php | 10 +- ...stOrgPrepaymentTransactions200Response.php | 10 +- ...PrepaymentTransactions200ResponseLinks.php | 4 + ...aymentTransactions200ResponseLinksNext.php | 4 + ...Transactions200ResponseLinksPrepayment.php | 4 + ...ntTransactions200ResponseLinksPrevious.php | 4 + ...aymentTransactions200ResponseLinksSelf.php | 4 + .../ListOrgProjectHistory200Response.php | 10 +- src/Model/ListOrgProjects200Response.php | 16 +- src/Model/ListOrgSubscriptions200Response.php | 10 +- src/Model/ListOrgUsageRecords200Response.php | 10 +- src/Model/ListOrgs200Response.php | 10 +- src/Model/ListProfiles200Response.php | 16 +- .../ListProjectTeamAccess200Response.php | 10 +- .../ListProjectUserAccess200Response.php | 10 +- src/Model/ListRegions200Response.php | 10 +- src/Model/ListTeamMembers200Response.php | 10 +- src/Model/ListTeams200Response.php | 10 +- .../ListTicketCategories200ResponseInner.php | 4 + .../ListTicketPriorities200ResponseInner.php | 4 + src/Model/ListTickets200Response.php | 16 +- .../ListUserExtendedAccess200Response.php | 10 +- ...serExtendedAccess200ResponseItemsInner.php | 12 +- src/Model/ListUserOrgs200Response.php | 10 +- src/Model/LogsForwarding.php | 10 +- src/Model/Maintenance.php | 15 +- src/Model/MaintenanceWindowConfiguration.php | 10 +- src/Model/MergeInfo.php | 22 +- src/Model/Metrics.php | 10 +- src/Model/MetricsMetadata.php | 28 +- src/Model/MetricsValue.php | 16 +- src/Model/MinimumResources.php | 3 + src/Model/Mode.php | 1 + src/Model/MountsValue.php | 3 + src/Model/NewRelic.php | 16 +- src/Model/NewRelicIntegration.php | 56 +-- src/Model/NewRelicIntegrationCreateInput.php | 29 +- src/Model/NewRelicIntegrationPatch.php | 29 +- src/Model/OAuth2Consumer.php | 10 +- src/Model/OAuth2Consumer1.php | 16 +- src/Model/OCIImage.php | 4 + src/Model/Object.php | 10 +- src/Model/ObjectStorage.php | 56 +-- .../ObservabilityEntrypoint200Response.php | 3 + ...lityEntrypoint200ResponseDataRetention.php | 4 + ...sponseDataRetentionContinuousProfiling.php | 4 + ...int200ResponseDataRetentionHttpTraffic.php | 4 + ...Entrypoint200ResponseDataRetentionLogs.php | 4 + ...point200ResponseDataRetentionResources.php | 4 + ...0ResponseDataRetentionServerMonitoring.php | 4 + ...bservabilityEntrypoint200ResponseLinks.php | 10 +- ...0ResponseLinksBlackfirePhpServerCaches.php | 4 + ...t200ResponseLinksBlackfireServerGlobal.php | 4 + ...ksBlackfireServerTransactionsBreakdown.php | 4 + ...ResponseLinksConprofApplicationFilters.php | 4 + ...int200ResponseLinksConprofApplications.php | 4 + ...point200ResponseLinksConprofFlamegraph.php | 4 + ...rypoint200ResponseLinksConprofTimeline.php | 4 + ...nt200ResponseLinksConsoleSandboxAccess.php | 4 + ...200ResponseLinksHttpMetricsTimelineIps.php | 4 + ...00ResponseLinksHttpMetricsTimelineUrls.php | 4 + ...onseLinksHttpMetricsTimelineUserAgents.php | 4 + ...Entrypoint200ResponseLinksLogsOverview.php | 4 + ...ityEntrypoint200ResponseLinksLogsQuery.php | 4 + ...00ResponseLinksResourcesByServiceValue.php | 4 + ...point200ResponseLinksResourcesOverview.php | 4 + ...ypoint200ResponseLinksResourcesSummary.php | 4 + ...vabilityEntrypoint200ResponseLinksSelf.php | 4 + ...vabilityEntrypoint200ResponseRetention.php | 4 + src/Model/OpenTelemetry.php | 16 +- src/Model/OperationsValue.php | 3 + src/Model/Order.php | 142 +++---- src/Model/OrderBillingPeriodLabel.php | 28 +- src/Model/OrderLinks.php | 10 +- src/Model/OrderLinksInvoices.php | 10 +- src/Model/Organization.php | 102 ++--- src/Model/OrganizationAddonsObject.php | 22 +- .../OrganizationAddonsObjectAvailable.php | 4 + src/Model/OrganizationAddonsObjectCurrent.php | 4 + ...anizationAddonsObjectUpgradesAvailable.php | 4 + src/Model/OrganizationAiAgentSettings.php | 22 +- src/Model/OrganizationAlertConfig.php | 40 +- src/Model/OrganizationAlertConfigConfig.php | 16 +- ...OrganizationAlertConfigConfigThreshold.php | 28 +- src/Model/OrganizationCarbon.php | 22 +- src/Model/OrganizationEstimationObject.php | 46 +-- ...anizationEstimationObjectSubscriptions.php | 18 +- ...EstimationObjectSubscriptionsListInner.php | 4 + ...ationObjectSubscriptionsListInnerUsage.php | 4 + ...ganizationEstimationObjectUserLicenses.php | 4 + ...zationEstimationObjectUserLicensesBase.php | 16 +- ...onEstimationObjectUserLicensesBaseList.php | 16 +- ...ionObjectUserLicensesBaseListAdminUser.php | 16 +- ...onObjectUserLicensesBaseListViewerUser.php | 16 +- ...mationObjectUserLicensesUserManagement.php | 16 +- ...onObjectUserLicensesUserManagementList.php | 16 +- ...erManagementListAdvancedManagementUser.php | 16 +- ...erManagementListStandardManagementUser.php | 16 +- src/Model/OrganizationInvitation.php | 64 ++-- src/Model/OrganizationInvitationOwner.php | 16 +- src/Model/OrganizationLinks.php | 124 +++--- src/Model/OrganizationLinksAccount.php | 10 +- src/Model/OrganizationLinksAddress.php | 10 +- src/Model/OrganizationLinksApplyVoucher.php | 16 +- src/Model/OrganizationLinksBillingProfile.php | 10 +- src/Model/OrganizationLinksCreateMember.php | 16 +- .../OrganizationLinksCreateSubscription.php | 16 +- src/Model/OrganizationLinksDelete.php | 16 +- src/Model/OrganizationLinksDiscounts.php | 10 +- .../OrganizationLinksEstimateSubscription.php | 10 +- src/Model/OrganizationLinksMembers.php | 10 +- src/Model/OrganizationLinksMfaEnforcement.php | 10 +- src/Model/OrganizationLinksOrders.php | 10 +- src/Model/OrganizationLinksPaymentSource.php | 10 +- src/Model/OrganizationLinksPrepayment.php | 10 +- src/Model/OrganizationLinksProfile.php | 10 +- src/Model/OrganizationLinksSelf.php | 10 +- src/Model/OrganizationLinksSso.php | 10 +- src/Model/OrganizationLinksSubscriptions.php | 10 +- src/Model/OrganizationLinksUpdate.php | 16 +- src/Model/OrganizationLinksVouchers.php | 10 +- src/Model/OrganizationMember.php | 54 +-- src/Model/OrganizationMemberLinks.php | 22 +- src/Model/OrganizationMemberLinksDelete.php | 16 +- src/Model/OrganizationMemberLinksSelf.php | 10 +- src/Model/OrganizationMemberLinksUpdate.php | 16 +- src/Model/OrganizationMfaEnforcement.php | 10 +- src/Model/OrganizationProject.php | 117 +++--- src/Model/OrganizationProjectCarbon.php | 22 +- src/Model/OrganizationProjectLinks.php | 64 ++-- .../OrganizationProjectLinksActivities.php | 10 +- src/Model/OrganizationProjectLinksAddons.php | 10 +- src/Model/OrganizationProjectLinksApi.php | 10 +- src/Model/OrganizationProjectLinksDelete.php | 16 +- src/Model/OrganizationProjectLinksPlanUri.php | 10 +- src/Model/OrganizationProjectLinksSelf.php | 10 +- .../OrganizationProjectLinksSubscription.php | 10 +- src/Model/OrganizationProjectLinksUpdate.php | 16 +- ...anizationProjectLinksUpdateUsageAlerts.php | 16 +- ...rganizationProjectLinksViewUsageAlerts.php | 10 +- src/Model/OrganizationReference.php | 61 +-- src/Model/OtlpLogIntegration.php | 56 +-- .../OtlpLogIntegrationCreateCreateInput.php | 23 +- src/Model/OtlpLogIntegrationPatch.php | 23 +- src/Model/OutboundFirewall.php | 10 +- .../OutboundFirewallRestrictionsInner.php | 3 + src/Model/OwnerInfo.php | 22 +- src/Model/PagerDutyIntegration.php | 50 +-- src/Model/PagerDutyIntegrationCreateInput.php | 17 +- src/Model/PagerDutyIntegrationPatch.php | 17 +- src/Model/PathValue.php | 3 + src/Model/PlanRecords.php | 61 +-- .../PreServiceResourcesOverridesValue.php | 4 + src/Model/PreflightChecks.php | 4 + src/Model/PrepaymentObject.php | 10 +- src/Model/PrepaymentObjectPrepayment.php | 34 +- .../PrepaymentObjectPrepaymentBalance.php | 28 +- src/Model/PrepaymentTransactionObject.php | 46 +-- .../PrepaymentTransactionObjectAmount.php | 28 +- src/Model/ProdDomainStorage.php | 62 +-- src/Model/ProdDomainStorageCreateInput.php | 17 +- src/Model/ProdDomainStoragePatch.php | 11 +- src/Model/ProductionResources.php | 28 +- src/Model/Profile.php | 150 ++++---- src/Model/Project.php | 109 +++--- src/Model/ProjectCapabilities.php | 10 +- src/Model/ProjectCarbon.php | 28 +- src/Model/ProjectFacets.php | 4 + src/Model/ProjectInfo.php | 4 + src/Model/ProjectInvitation.php | 76 ++-- .../ProjectInvitationEnvironmentsInner.php | 3 + src/Model/ProjectOptions.php | 22 +- src/Model/ProjectOptionsAggregated.php | 10 +- src/Model/ProjectOptionsDefaults.php | 28 +- src/Model/ProjectOptionsEnforced.php | 16 +- src/Model/ProjectReference.php | 79 ++-- src/Model/ProjectSettings.php | 355 +++++++++--------- src/Model/ProjectSettingsPatch.php | 18 +- src/Model/ProjectStatus.php | 1 + src/Model/ProjectType.php | 1 + src/Model/ProjectVariable.php | 67 ++-- src/Model/ProjectVariableCreateInput.php | 40 +- src/Model/ProjectVariablePatch.php | 40 +- src/Model/ProvisionEvent.php | 52 +-- src/Model/ProvisionStep.php | 16 +- src/Model/ProxyRoute.php | 70 ++-- src/Model/Recurrence.php | 22 +- src/Model/RedirectConfiguration.php | 18 +- src/Model/RedirectRoute.php | 70 ++-- src/Model/Ref.php | 32 +- src/Model/Region.php | 78 ++-- src/Model/RegionCompliance.php | 10 +- src/Model/RegionDatacenter.php | 4 + src/Model/RegionEnvImpact.php | 28 +- src/Model/RegionEnvironmentalImpact.php | 4 + src/Model/RegionProvider.php | 4 + src/Model/RegionReference.php | 111 +++--- src/Model/RegistryCredential.php | 57 +-- src/Model/RegistryCredentialCreateInput.php | 30 +- src/Model/RegistryCredentialPatch.php | 30 +- src/Model/ReplacementDomainStorage.php | 62 +-- .../ReplacementDomainStorageCreateInput.php | 17 +- src/Model/ReplacementDomainStoragePatch.php | 11 +- src/Model/RepositoryInformation.php | 16 +- src/Model/RequestBuffering.php | 4 + src/Model/ResetEmailAddressRequest.php | 4 + src/Model/ResourceConfig.php | 10 +- src/Model/Resources.php | 4 + src/Model/Resources1.php | 4 + src/Model/Resources2.php | 4 + src/Model/Resources3.php | 4 + src/Model/Resources4.php | 9 +- src/Model/Resources5.php | 9 +- src/Model/Resources6.php | 9 +- src/Model/Resources7.php | 9 +- src/Model/Resources8.php | 9 +- src/Model/Resources9.php | 16 +- src/Model/ResourcesByService200Response.php | 9 +- ...ResourcesByService200ResponseDataInner.php | 10 +- ...vice200ResponseDataInnerInstancesValue.php | 10 +- ...esponseDataInnerInstancesValueCpuLimit.php | 4 + ...onseDataInnerInstancesValueCpuPressure.php | 4 + ...ResponseDataInnerInstancesValueCpuUsed.php | 4 + ...ponseDataInnerInstancesValueIoPressure.php | 4 + ...onseDataInnerInstancesValueIrqPressure.php | 4 + ...onseDataInnerInstancesValueMemoryLimit.php | 4 + ...eDataInnerInstancesValueMemoryPressure.php | 4 + ...ponseDataInnerInstancesValueMemoryUsed.php | 4 + ...ataInnerInstancesValueMountpointsValue.php | 4 + ...nstancesValueMountpointsValueDiskLimit.php | 4 + ...InstancesValueMountpointsValueDiskUsed.php | 4 + ...tancesValueMountpointsValueInodesLimit.php | 4 + ...stancesValueMountpointsValueInodesUsed.php | 4 + ...esponseDataInnerInstancesValueSwapUsed.php | 4 + src/Model/ResourcesLimits.php | 22 +- src/Model/ResourcesOverridesValue.php | 19 +- src/Model/ResourcesOverview200Response.php | 10 +- .../ResourcesOverview200ResponseDataInner.php | 10 +- ...rview200ResponseDataInnerServicesValue.php | 10 +- ...ResponseDataInnerServicesValueCpuLimit.php | 4 + ...ponseDataInnerServicesValueCpuPressure.php | 4 + ...0ResponseDataInnerServicesValueCpuUsed.php | 4 + ...sponseDataInnerServicesValueIoPressure.php | 4 + ...ponseDataInnerServicesValueIrqPressure.php | 4 + ...ponseDataInnerServicesValueMemoryLimit.php | 4 + ...seDataInnerServicesValueMemoryPressure.php | 4 + ...sponseDataInnerServicesValueMemoryUsed.php | 4 + ...DataInnerServicesValueMountpointsValue.php | 4 + ...ServicesValueMountpointsValueDiskLimit.php | 4 + ...rServicesValueMountpointsValueDiskUsed.php | 4 + ...rvicesValueMountpointsValueInodesLimit.php | 4 + ...ervicesValueMountpointsValueInodesUsed.php | 4 + ...esponseDataInnerServicesValueSwapLimit.php | 4 + ...ResponseDataInnerServicesValueSwapUsed.php | 4 + src/Model/ResourcesSummary200Response.php | 4 + src/Model/ResourcesSummary200ResponseData.php | 4 + ...mmary200ResponseDataServicesValueValue.php | 10 +- ...ponseDataServicesValueValueCpuPressure.php | 4 + ...0ResponseDataServicesValueValueCpuUsed.php | 4 + ...sponseDataServicesValueValueIoPressure.php | 4 + ...ponseDataServicesValueValueIrqPressure.php | 4 + ...seDataServicesValueValueMemoryPressure.php | 4 + ...sponseDataServicesValueValueMemoryUsed.php | 4 + ...DataServicesValueValueMountpointsValue.php | 4 + ...icesValueValueMountpointsValueDiskUsed.php | 4 + ...esValueValueMountpointsValueInodesUsed.php | 4 + ...ResponseDataServicesValueValueSwapUsed.php | 4 + src/Model/ResourcesSummary400Response.php | 4 + src/Model/Route.php | 3 + src/Model/RouterResources.php | 28 +- src/Model/RoutesValue.php | 3 + src/Model/RunConfiguration.php | 16 +- src/Model/RuntimeOperations.php | 10 +- src/Model/SSIConfiguration.php | 10 +- src/Model/ScheduleInner.php | 4 + src/Model/Script.php | 16 +- src/Model/ScriptIntegration.php | 55 +-- src/Model/ScriptIntegrationCreateInput.php | 22 +- src/Model/ScriptIntegrationPatch.php | 22 +- .../SendOrgMfaReminders200ResponseValue.php | 4 + src/Model/SendOrgMfaRemindersRequest.php | 4 + src/Model/ServiceRelationshipsValue.php | 4 + src/Model/ServicesValue.php | 3 + src/Model/ServicesValue1.php | 4 + src/Model/Sizing.php | 28 +- src/Model/SlackIntegration.php | 50 +-- src/Model/SlackIntegrationCreateInput.php | 23 +- src/Model/SlackIntegrationPatch.php | 23 +- src/Model/SourceCodeConfiguration.php | 10 +- src/Model/SourceCodeConfiguration1.php | 10 +- src/Model/SourceOperations.php | 10 +- src/Model/SourceOperationsValue.php | 4 + src/Model/SpecificOverridesValue.php | 4 + src/Model/Splunk.php | 16 +- src/Model/SplunkIntegration.php | 68 ++-- src/Model/SplunkIntegrationCreateInput.php | 41 +- src/Model/SplunkIntegrationPatch.php | 41 +- src/Model/SshKey.php | 40 +- src/Model/Status.php | 4 + src/Model/StickyConfiguration.php | 10 +- src/Model/StrictTransportSecurityOptions.php | 22 +- src/Model/StringFilter.php | 52 +-- src/Model/Subscription.php | 156 ++++---- src/Model/Subscription1.php | 69 ++-- src/Model/SubscriptionAddonsObject.php | 22 +- .../SubscriptionAddonsObjectAvailable.php | 4 + src/Model/SubscriptionAddonsObjectCurrent.php | 4 + ...scriptionAddonsObjectUpgradesAvailable.php | 4 + src/Model/SubscriptionCurrentUsageObject.php | 82 ++-- src/Model/SubscriptionInformation.php | 69 ++-- src/Model/SumoLogic.php | 16 +- src/Model/SumologicIntegration.php | 62 +-- src/Model/SumologicIntegrationCreateInput.php | 29 +- src/Model/SumologicIntegrationPatch.php | 29 +- src/Model/Syslog.php | 16 +- src/Model/SyslogIntegration.php | 79 ++-- src/Model/SyslogIntegrationCreateInput.php | 46 +-- src/Model/SyslogIntegrationPatch.php | 46 +-- src/Model/SystemInformation.php | 21 +- src/Model/TLSSettings.php | 15 +- src/Model/Task.php | 88 ++--- src/Model/TaskTriggerInput.php | 4 + src/Model/Tasks.php | 10 +- src/Model/TasksValue.php | 4 + src/Model/Team.php | 42 ++- src/Model/TeamCounts.php | 16 +- src/Model/TeamMember.php | 37 +- src/Model/TeamProjectAccess.php | 49 +-- src/Model/TeamProjectAccessLinks.php | 22 +- src/Model/TeamProjectAccessLinksDelete.php | 16 +- src/Model/TeamProjectAccessLinksSelf.php | 10 +- src/Model/TeamProjectAccessLinksUpdate.php | 16 +- src/Model/TeamReference.php | 42 ++- src/Model/Ticket.php | 224 +++++------ src/Model/TicketJiraInner.php | 4 + src/Model/Tree.php | 24 +- src/Model/TreeItemsInner.php | 3 + src/Model/UpdateOrgAddonsRequest.php | 3 + .../UpdateOrgBillingAlertConfigRequest.php | 4 + ...dateOrgBillingAlertConfigRequestConfig.php | 4 + src/Model/UpdateOrgMemberRequest.php | 3 + src/Model/UpdateOrgProfileRequest.php | 3 + src/Model/UpdateOrgProjectRequest.php | 22 +- src/Model/UpdateOrgRequest.php | 4 + src/Model/UpdateOrgSubscriptionRequest.php | 22 +- src/Model/UpdateProfileRequest.php | 4 + src/Model/UpdateProjectUserAccessRequest.php | 3 + ...ectsEnvironmentsDeploymentsNextRequest.php | 22 +- ...ntsDeploymentsNextRequestServicesValue.php | 4 + ...entsDeploymentsNextRequestWebappsValue.php | 4 + ...entsDeploymentsNextRequestWorkersValue.php | 4 + .../UpdateSubscriptionUsageAlertsRequest.php | 10 +- ...scriptionUsageAlertsRequestAlertsInner.php | 4 + ...ionUsageAlertsRequestAlertsInnerConfig.php | 4 + src/Model/UpdateTeamRequest.php | 4 + src/Model/UpdateTicketRequest.php | 3 + src/Model/UpdateUsageAlertsRequest.php | 10 +- src/Model/UpdateUserRequest.php | 4 + src/Model/UpstreamConfiguration.php | 3 + src/Model/UpstreamRoute.php | 70 ++-- src/Model/Usage.php | 39 +- src/Model/UsageAlert.php | 40 +- src/Model/UsageAlertConfig.php | 10 +- src/Model/UsageAlertConfigThreshold.php | 22 +- .../UsageGroupCurrentUsageProperties.php | 58 +-- src/Model/User.php | 112 +++--- src/Model/UserProjectAccess.php | 48 +-- src/Model/UserReference.php | 54 +-- src/Model/VPNConfiguration.php | 75 ++-- src/Model/VerifyPhoneNumber200Response.php | 4 + src/Model/VerifyPhoneNumberRequest.php | 3 + src/Model/Vouchers.php | 42 ++- src/Model/VouchersLinks.php | 10 +- src/Model/VouchersLinksSelf.php | 10 +- src/Model/VouchersVouchersInner.php | 10 +- .../VouchersVouchersInnerOrdersInner.php | 4 + src/Model/WebApplicationsValue.php | 33 +- src/Model/WebApplicationsValue1.php | 4 + src/Model/WebConfiguration.php | 10 +- src/Model/WebHookIntegration.php | 61 +-- src/Model/WebHookIntegrationCreateInput.php | 28 +- src/Model/WebHookIntegrationPatch.php | 28 +- src/Model/WebLocationsValue.php | 10 +- src/Model/Webhook.php | 16 +- src/Model/WorkerConfiguration.php | 4 + src/Model/WorkersValue.php | 27 +- 723 files changed, 8656 insertions(+), 5924 deletions(-) diff --git a/composer.json b/composer.json index 848da30fd..2231134a0 100644 --- a/composer.json +++ b/composer.json @@ -76,9 +76,7 @@ }, "prefer-stable": true, "scripts": { - "clean": "rm -rf ./coverage/ ./coverage.xml", "install:ci": "composer install --prefer-dist --no-progress --no-interaction", - "lint:phpcs": "./vendor/bin/phpcs --standard=phpcs.xml src/", "lint:phpcs:tests": "./vendor/bin/phpcs --standard=phpcs.xml tests/", "lint:rector": "./vendor/bin/rector process src --dry-run", diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index 74c253208..8d40a0282 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -9,7 +9,7 @@ use Nyholm\Psr7\Stream; /** - * OAuthProvider class (auto-generated) + * class (auto-generated) * * Token lifecycle follows RFC 6749 §6 and RFC 6750 §3.1: * - Proactive refresh when token is within the 120 s expiry buffer (FIX 3) @@ -40,7 +40,7 @@ public function __construct( private readonly string $tokenEndpoint, private readonly string $clientId, private readonly string $clientSecret, - private readonly ?string $refreshEndpoint = null, + ?string $refreshEndpoint = null, ) { $this->effectiveRefreshEndpoint = $refreshEndpoint ?? $this->tokenEndpoint; } @@ -65,6 +65,7 @@ public function exchangeCodeForToken(): bool ->withHeader('Content-Type', 'application/x-www-form-urlencoded') ->withBody(Stream::create($body)); + $response = $this->httpClient->sendRequest($request); if ($response->getStatusCode() !== 200) { diff --git a/src/Model/AcceptedResponse.php b/src/Model/AcceptedResponse.php index cef1e923d..91585f819 100644 --- a/src/Model/AcceptedResponse.php +++ b/src/Model/AcceptedResponse.php @@ -13,12 +13,15 @@ */ final class AcceptedResponse implements Model, JsonSerializable { + + public function __construct( private readonly string $status, private readonly int $code, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +40,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The status text of the response - */ + /** + * The status text of the response + */ public function getStatus(): string { return $this->status; } - /** - * The status code of the response - */ + /** + * The status code of the response + */ public function getCode(): int { return $this->code; } } + diff --git a/src/Model/AccessControlInner.php b/src/Model/AccessControlInner.php index 2bbcc85c9..e593e5eeb 100644 --- a/src/Model/AccessControlInner.php +++ b/src/Model/AccessControlInner.php @@ -13,6 +13,7 @@ */ final class AccessControlInner implements Model, JsonSerializable { + public const ROLE_ADMIN = 'admin'; public const ROLE_CONTRIBUTOR = 'contributor'; public const ROLE_VIEWER = 'viewer'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,3 +53,4 @@ public function getRole(): string return $this->role; } } + diff --git a/src/Model/Activity.php b/src/Model/Activity.php index a9c31b2c5..f8798ac16 100644 --- a/src/Model/Activity.php +++ b/src/Model/Activity.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class Activity implements Model, JsonSerializable { + public const STATE_CANCELLED = 'cancelled'; public const STATE_COMPLETE = 'complete'; public const STATE_IN_PROGRESS = 'in_progress'; @@ -36,21 +36,22 @@ public function __construct( private readonly string $log, private readonly object $payload, private readonly array $commands, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $result, private readonly ?string $failureReason, - private readonly ?DateTime $startedAt, - private readonly ?DateTime $completedAt, - private readonly ?DateTime $cancelledAt, + private readonly ?\DateTime $startedAt, + private readonly ?\DateTime $completedAt, + private readonly ?\DateTime $cancelledAt, private readonly ?string $description, private readonly ?string $text, - private readonly ?DateTime $expiresAt, + private readonly ?\DateTime $expiresAt, private readonly ?string $integration = null, private readonly ?array $environments = [], ) { } + public function getModelName(): string { return self::class; @@ -89,106 +90,106 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Activity - */ + /** + * The identifier of Activity + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the activity - */ + /** + * The type of the activity + */ public function getType(): string { return $this->type; } - /** - * The parameters of the activity - */ + /** + * The parameters of the activity + */ public function getParameters(): object { return $this->parameters; } - /** - * The project the activity belongs to - */ + /** + * The project the activity belongs to + */ public function getProject(): string { return $this->project; } - /** - * The state of the activity - */ + /** + * The state of the activity + */ public function getState(): string { return $this->state; } - /** - * The result of the activity - */ + /** + * The result of the activity + */ public function getResult(): ?string { return $this->result; } - /** - * The reason for activity failure - */ + /** + * The reason for activity failure + */ public function getFailureReason(): ?string { return $this->failureReason; } - /** - * The start date of the activity - */ - public function getStartedAt(): ?DateTime + /** + * The start date of the activity + */ + public function getStartedAt(): ?\DateTime { return $this->startedAt; } - /** - * The completion date of the activity - */ - public function getCompletedAt(): ?DateTime + /** + * The completion date of the activity + */ + public function getCompletedAt(): ?\DateTime { return $this->completedAt; } - /** - * The completion percentage of the activity - */ + /** + * The completion percentage of the activity + */ public function getCompletionPercent(): int { return $this->completionPercent; } - /** - * The Cancellation date of the activity - */ - public function getCancelledAt(): ?DateTime + /** + * The Cancellation date of the activity + */ + public function getCancelledAt(): ?\DateTime { return $this->cancelledAt; } @@ -198,58 +199,58 @@ public function getTimings(): array return $this->timings; } - /** - * The log of the activity - */ + /** + * The log of the activity + */ public function getLog(): string { return $this->log; } - /** - * The payload of the activity - */ + /** + * The payload of the activity + */ public function getPayload(): object { return $this->payload; } - /** - * The description of the activity, formatted with HTML - */ + /** + * The description of the activity, formatted with HTML + */ public function getDescription(): ?string { return $this->description; } - /** - * The description of the activity, formatted as plain text - */ + /** + * The description of the activity, formatted as plain text + */ public function getText(): ?string { return $this->text; } - /** - * The date at which the activity will expire - */ - public function getExpiresAt(): ?DateTime + /** + * The date at which the activity will expire + */ + public function getExpiresAt(): ?\DateTime { return $this->expiresAt; } - /** - * The commands of the activity - * @return CommandsInner[] - */ + /** + * The commands of the activity + * @return CommandsInner[] + */ public function getCommands(): array { return $this->commands; } - /** - * The integration the activity belongs to - */ + /** + * The integration the activity belongs to + */ public function getIntegration(): ?string { return $this->integration; @@ -260,3 +261,4 @@ public function getEnvironments(): ?array return $this->environments; } } + diff --git a/src/Model/AddonCredential.php b/src/Model/AddonCredential.php index 11e155f35..d08ed9508 100644 --- a/src/Model/AddonCredential.php +++ b/src/Model/AddonCredential.php @@ -14,12 +14,15 @@ */ final class AddonCredential implements Model, JsonSerializable { + + public function __construct( private readonly string $addonKey, private readonly string $clientKey, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The addon key (public identifier). - */ + /** + * The addon key (public identifier). + */ public function getAddonKey(): string { return $this->addonKey; } - /** - * The client key (public identifier). - */ + /** + * The client key (public identifier). + */ public function getClientKey(): string { return $this->clientKey; } } + diff --git a/src/Model/AddonCredential1.php b/src/Model/AddonCredential1.php index 1cfbbccae..437890104 100644 --- a/src/Model/AddonCredential1.php +++ b/src/Model/AddonCredential1.php @@ -14,6 +14,8 @@ */ final class AddonCredential1 implements Model, JsonSerializable { + + public function __construct( private readonly string $addonKey, private readonly string $clientKey, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The addon key (public identifier). - */ + /** + * The addon key (public identifier). + */ public function getAddonKey(): string { return $this->addonKey; } - /** - * The client key (public identifier). - */ + /** + * The client key (public identifier). + */ public function getClientKey(): string { return $this->clientKey; } - /** - * The secret of the client. - */ + /** + * The secret of the client. + */ public function getSharedSecret(): string { return $this->sharedSecret; } } + diff --git a/src/Model/Address.php b/src/Model/Address.php index 2c3624c7a..3f23e94cb 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -14,6 +14,8 @@ */ final class Address implements Model, JsonSerializable { + + public function __construct( private readonly ?string $country = null, private readonly ?string $nameLine = null, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,83 +57,84 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Two-letter country codes are used to represent countries and states - */ + /** + * Two-letter country codes are used to represent countries and states + */ public function getCountry(): ?string { return $this->country; } - /** - * The full name of the user - */ + /** + * The full name of the user + */ public function getNameLine(): ?string { return $this->nameLine; } - /** - * Premise (i.e. Apt, Suite, Bldg.) - */ + /** + * Premise (i.e. Apt, Suite, Bldg.) + */ public function getPremise(): ?string { return $this->premise; } - /** - * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. - */ + /** + * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. + */ public function getSubPremise(): ?string { return $this->subPremise; } - /** - * The address of the user - */ + /** + * The address of the user + */ public function getThoroughfare(): ?string { return $this->thoroughfare; } - /** - * The administrative area of the user address - */ + /** + * The administrative area of the user address + */ public function getAdministrativeArea(): ?string { return $this->administrativeArea; } - /** - * The sub-administrative area of the user address - */ + /** + * The sub-administrative area of the user address + */ public function getSubAdministrativeArea(): ?string { return $this->subAdministrativeArea; } - /** - * The locality of the user address - */ + /** + * The locality of the user address + */ public function getLocality(): ?string { return $this->locality; } - /** - * The dependant_locality area of the user address - */ + /** + * The dependant_locality area of the user address + */ public function getDependentLocality(): ?string { return $this->dependentLocality; } - /** - * The postal code area of the user address - */ + /** + * The postal code area of the user address + */ public function getPostalCode(): ?string { return $this->postalCode; } } + diff --git a/src/Model/AddressGrantsInner.php b/src/Model/AddressGrantsInner.php index 44045a5d5..6c918bc4e 100644 --- a/src/Model/AddressGrantsInner.php +++ b/src/Model/AddressGrantsInner.php @@ -13,6 +13,7 @@ */ final class AddressGrantsInner implements Model, JsonSerializable { + public const PERMISSION_ALLOW = 'allow'; public const PERMISSION_DENY = 'deny'; @@ -22,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -50,3 +52,4 @@ public function getAddress(): string return $this->address; } } + diff --git a/src/Model/AddressMetadata.php b/src/Model/AddressMetadata.php index df3fec2fc..bf6b7eea1 100644 --- a/src/Model/AddressMetadata.php +++ b/src/Model/AddressMetadata.php @@ -14,11 +14,14 @@ */ final class AddressMetadata implements Model, JsonSerializable { + + public function __construct( private readonly ?AddressMetadataMetadata $metadata = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Address field metadata. - */ + /** + * Address field metadata. + */ public function getMetadata(): ?AddressMetadataMetadata { return $this->metadata; } } + diff --git a/src/Model/AddressMetadataMetadata.php b/src/Model/AddressMetadataMetadata.php index da0794c2c..a0a5137e6 100644 --- a/src/Model/AddressMetadataMetadata.php +++ b/src/Model/AddressMetadataMetadata.php @@ -14,6 +14,8 @@ */ final class AddressMetadataMetadata implements Model, JsonSerializable { + + public function __construct( private readonly ?array $requiredFields = [], private readonly ?object $fieldLabels = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,19 +48,20 @@ public function getRequiredFields(): ?array return $this->requiredFields; } - /** - * Localized labels for address fields. - */ + /** + * Localized labels for address fields. + */ public function getFieldLabels(): ?object { return $this->fieldLabels; } - /** - * Whether this country supports a VAT number. - */ + /** + * Whether this country supports a VAT number. + */ public function getShowVat(): ?bool { return $this->showVat; } } + diff --git a/src/Model/AggregatedFeatures.php b/src/Model/AggregatedFeatures.php index 82b58862d..2448f5b2c 100644 --- a/src/Model/AggregatedFeatures.php +++ b/src/Model/AggregatedFeatures.php @@ -13,11 +13,14 @@ */ final class AggregatedFeatures implements Model, JsonSerializable { + + public function __construct( private readonly ?object $backups = null, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Backup features configuration. - */ + /** + * Backup features configuration. + */ public function getBackups(): ?object { return $this->backups; } } + diff --git a/src/Model/Alert.php b/src/Model/Alert.php index 6ae93bbf6..af304c0c4 100644 --- a/src/Model/Alert.php +++ b/src/Model/Alert.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,16 +14,19 @@ */ final class Alert implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?bool $active = null, private readonly ?int $alertsSent = null, - private readonly ?DateTime $lastAlertAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $lastAlertAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?object $config = null, ) { } + public function getModelName(): string { return self::class; @@ -47,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identification of the alert type. - */ + /** + * The identification of the alert type. + */ public function getId(): ?string { return $this->id; } - /** - * Whether the alert is currently active. - */ + /** + * Whether the alert is currently active. + */ public function getActive(): ?bool { return $this->active; } - /** - * The amount of alerts of this type that have been sent so far. - */ + /** + * The amount of alerts of this type that have been sent so far. + */ public function getAlertsSent(): ?int { return $this->alertsSent; } - /** - * The time the last alert has been sent. - */ - public function getLastAlertAt(): ?DateTime + /** + * The time the last alert has been sent. + */ + public function getLastAlertAt(): ?\DateTime { return $this->lastAlertAt; } - /** - * The time the alert has last been updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The time the alert has last been updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The alert type specific configuration. - */ + /** + * The alert type specific configuration. + */ public function getConfig(): ?object { return $this->config; } } + diff --git a/src/Model/ApiToken.php b/src/Model/ApiToken.php index b3bade716..a78edc478 100644 --- a/src/Model/ApiToken.php +++ b/src/Model/ApiToken.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,17 +13,20 @@ */ final class ApiToken implements Model, JsonSerializable { + + public function __construct( - private readonly ?DateTime $lastUsedAt = null, + private readonly ?\DateTime $lastUsedAt = null, private readonly ?string $id = null, private readonly ?string $name = null, private readonly ?bool $mfaOnCreation = null, private readonly ?string $token = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, ) { } + public function getModelName(): string { return self::class; @@ -48,62 +50,63 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the token. - */ + /** + * The ID of the token. + */ public function getId(): ?string { return $this->id; } - /** - * The token name. - */ + /** + * The token name. + */ public function getName(): ?string { return $this->name; } - /** - * Whether the user had multi-factor authentication (MFA) enabled when they created the token. - */ + /** + * Whether the user had multi-factor authentication (MFA) enabled when they created the token. + */ public function getMfaOnCreation(): ?bool { return $this->mfaOnCreation; } - /** - * The token in plain text (available only when created). - */ + /** + * The token in plain text (available only when created). + */ public function getToken(): ?string { return $this->token; } - /** - * The date and time when the token was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the token was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the token was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the token was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The date and time when the token was last exchanged for an access token. This will be null for a - * token which has never been used, or not used since this API property was added. Note: After an - * API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH - * certificate(s) derived from the access token. - */ - public function getLastUsedAt(): ?DateTime + /** + * The date and time when the token was last exchanged for an access token. This will be null for a + * token which has never been used, or not used since this API property was added. Note: After an + * API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH + * certificate(s) derived from the access token. + */ + public function getLastUsedAt(): ?\DateTime { return $this->lastUsedAt; } } + diff --git a/src/Model/ApplyOrgVoucherRequest.php b/src/Model/ApplyOrgVoucherRequest.php index 4e391ae7e..2020ae89a 100644 --- a/src/Model/ApplyOrgVoucherRequest.php +++ b/src/Model/ApplyOrgVoucherRequest.php @@ -13,11 +13,14 @@ */ final class ApplyOrgVoucherRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $code, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getCode(): string return $this->code; } } + diff --git a/src/Model/ArrayFilter.php b/src/Model/ArrayFilter.php index 8d3ae6d38..85928c569 100644 --- a/src/Model/ArrayFilter.php +++ b/src/Model/ArrayFilter.php @@ -13,6 +13,8 @@ */ final class ArrayFilter implements Model, JsonSerializable { + + public function __construct( private readonly ?string $eq = null, private readonly ?string $ne = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,35 +44,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Equal - */ + /** + * Equal + */ public function getEq(): ?string { return $this->eq; } - /** - * Not equal - */ + /** + * Not equal + */ public function getNe(): ?string { return $this->ne; } - /** - * In (comma-separated list) - */ + /** + * In (comma-separated list) + */ public function getIn(): ?string { return $this->in; } - /** - * Not in (comma-separated list) - */ + /** + * Not in (comma-separated list) + */ public function getNin(): ?string { return $this->nin; } } + diff --git a/src/Model/Author.php b/src/Model/Author.php index d553787c8..e50873e1f 100644 --- a/src/Model/Author.php +++ b/src/Model/Author.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,13 +14,16 @@ */ final class Author implements Model, JsonSerializable { + + public function __construct( - private readonly DateTime $date, + private readonly \DateTime $date, private readonly string $name, private readonly string $email, ) { } + public function getModelName(): string { return self::class; @@ -41,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The time of the author or committer - */ - public function getDate(): DateTime + /** + * The time of the author or committer + */ + public function getDate(): \DateTime { return $this->date; } - /** - * The name of the author or committer - */ + /** + * The name of the author or committer + */ public function getName(): string { return $this->name; } - /** - * The email of the author or committer - */ + /** + * The email of the author or committer + */ public function getEmail(): string { return $this->email; } } + diff --git a/src/Model/AuthorizationsInner.php b/src/Model/AuthorizationsInner.php index cafab4491..094c3d1ae 100644 --- a/src/Model/AuthorizationsInner.php +++ b/src/Model/AuthorizationsInner.php @@ -13,6 +13,7 @@ */ final class AuthorizationsInner implements Model, JsonSerializable { + public const TYPE_ENV = 'env'; public const TYPE_TASK = 'task'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -57,3 +59,4 @@ public function getResource(): ?string return $this->resource; } } + diff --git a/src/Model/AutoscalerCPUPressureTrigger.php b/src/Model/AutoscalerCPUPressureTrigger.php index e278af59a..6692bb8fa 100644 --- a/src/Model/AutoscalerCPUPressureTrigger.php +++ b/src/Model/AutoscalerCPUPressureTrigger.php @@ -15,6 +15,8 @@ */ final class AutoscalerCPUPressureTrigger implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,27 +44,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } + diff --git a/src/Model/AutoscalerCPUResources.php b/src/Model/AutoscalerCPUResources.php index fe1633532..0398510ff 100644 --- a/src/Model/AutoscalerCPUResources.php +++ b/src/Model/AutoscalerCPUResources.php @@ -14,12 +14,15 @@ */ final class AutoscalerCPUResources implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Minimum CPUs when scaling down vertically - */ + /** + * Minimum CPUs when scaling down vertically + */ public function getMin(): ?float { return $this->min; } - /** - * Maximum CPUs when scaling up vertically - */ + /** + * Maximum CPUs when scaling up vertically + */ public function getMax(): ?float { return $this->max; } } + diff --git a/src/Model/AutoscalerCPUTrigger.php b/src/Model/AutoscalerCPUTrigger.php index 9291d3a44..5e365110a 100644 --- a/src/Model/AutoscalerCPUTrigger.php +++ b/src/Model/AutoscalerCPUTrigger.php @@ -15,6 +15,8 @@ */ final class AutoscalerCPUTrigger implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,27 +44,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } + diff --git a/src/Model/AutoscalerCondition.php b/src/Model/AutoscalerCondition.php index 0e3419e99..5b486642e 100644 --- a/src/Model/AutoscalerCondition.php +++ b/src/Model/AutoscalerCondition.php @@ -14,6 +14,8 @@ */ final class AutoscalerCondition implements Model, JsonSerializable { + + public function __construct( private readonly float $threshold, private readonly ?bool $enabled = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,9 +43,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Value at which the condition is satisfied - */ + /** + * Value at which the condition is satisfied + */ public function getThreshold(): float { return $this->threshold; @@ -53,11 +56,12 @@ public function getDuration(): ?AutoscalerDuration return $this->duration; } - /** - * Whether the condition should be used for generating alerts - */ + /** + * Whether the condition should be used for generating alerts + */ public function getEnabled(): ?bool { return $this->enabled; } } + diff --git a/src/Model/AutoscalerDuration.php b/src/Model/AutoscalerDuration.php index b60e9153f..d0fb088f2 100644 --- a/src/Model/AutoscalerDuration.php +++ b/src/Model/AutoscalerDuration.php @@ -78,3 +78,4 @@ public function __toString(): string return $this->value; } } + diff --git a/src/Model/AutoscalerInstances.php b/src/Model/AutoscalerInstances.php index c31deb040..b159ff0b4 100644 --- a/src/Model/AutoscalerInstances.php +++ b/src/Model/AutoscalerInstances.php @@ -14,12 +14,15 @@ */ final class AutoscalerInstances implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Minimum number of instances when scaling down horizontally - */ + /** + * Minimum number of instances when scaling down horizontally + */ public function getMin(): ?int { return $this->min; } - /** - * Maximum number of instances when scaling up horizontally - */ + /** + * Maximum number of instances when scaling up horizontally + */ public function getMax(): ?int { return $this->max; } } + diff --git a/src/Model/AutoscalerMemoryPressureTrigger.php b/src/Model/AutoscalerMemoryPressureTrigger.php index 61e00e2cf..6a1ce0c29 100644 --- a/src/Model/AutoscalerMemoryPressureTrigger.php +++ b/src/Model/AutoscalerMemoryPressureTrigger.php @@ -15,6 +15,8 @@ */ final class AutoscalerMemoryPressureTrigger implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,27 +44,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } + diff --git a/src/Model/AutoscalerMemoryResources.php b/src/Model/AutoscalerMemoryResources.php index 48b90c182..9eedd8da4 100644 --- a/src/Model/AutoscalerMemoryResources.php +++ b/src/Model/AutoscalerMemoryResources.php @@ -14,12 +14,15 @@ */ final class AutoscalerMemoryResources implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Minimum memory (bytes) when scaling down vertically - */ + /** + * Minimum memory (bytes) when scaling down vertically + */ public function getMin(): ?int { return $this->min; } - /** - * Maximum memory (bytes) when scaling up vertically - */ + /** + * Maximum memory (bytes) when scaling up vertically + */ public function getMax(): ?int { return $this->max; } } + diff --git a/src/Model/AutoscalerMemoryTrigger.php b/src/Model/AutoscalerMemoryTrigger.php index 52abe1d3c..76f6def98 100644 --- a/src/Model/AutoscalerMemoryTrigger.php +++ b/src/Model/AutoscalerMemoryTrigger.php @@ -15,6 +15,8 @@ */ final class AutoscalerMemoryTrigger implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,27 +44,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } + diff --git a/src/Model/AutoscalerResources.php b/src/Model/AutoscalerResources.php index 62e48a23f..7d09e2cb3 100644 --- a/src/Model/AutoscalerResources.php +++ b/src/Model/AutoscalerResources.php @@ -14,12 +14,15 @@ */ final class AutoscalerResources implements Model, JsonSerializable { + + public function __construct( private readonly ?array $cpu = [], private readonly ?array $memory = [], ) { } + public function getModelName(): string { return self::class; @@ -37,21 +40,22 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Lower/Upper bounds on CPU allocation when scaling - * @return AutoscalerCPUResources[]|null - */ + /** + * Lower/Upper bounds on CPU allocation when scaling + * @return AutoscalerCPUResources[]|null + */ public function getCpu(): ?array { return $this->cpu; } - /** - * Lower/Upper bounds on Memory allocation when scaling - * @return AutoscalerMemoryResources[]|null - */ + /** + * Lower/Upper bounds on Memory allocation when scaling + * @return AutoscalerMemoryResources[]|null + */ public function getMemory(): ?array { return $this->memory; } } + diff --git a/src/Model/AutoscalerScalingCooldown.php b/src/Model/AutoscalerScalingCooldown.php index 28c7939cb..c3cedd9ba 100644 --- a/src/Model/AutoscalerScalingCooldown.php +++ b/src/Model/AutoscalerScalingCooldown.php @@ -14,12 +14,15 @@ */ final class AutoscalerScalingCooldown implements Model, JsonSerializable { + + public function __construct( private readonly ?int $up = null, private readonly ?int $down = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Number of seconds to wait until scaling up can be done again (since last attempt) - */ + /** + * Number of seconds to wait until scaling up can be done again (since last attempt) + */ public function getUp(): ?int { return $this->up; } - /** - * Number of seconds to wait until scaling down can be done again (since last attempt) - */ + /** + * Number of seconds to wait until scaling down can be done again (since last attempt) + */ public function getDown(): ?int { return $this->down; } } + diff --git a/src/Model/AutoscalerScalingFactor.php b/src/Model/AutoscalerScalingFactor.php index 6ea7821e0..be25b1464 100644 --- a/src/Model/AutoscalerScalingFactor.php +++ b/src/Model/AutoscalerScalingFactor.php @@ -14,12 +14,15 @@ */ final class AutoscalerScalingFactor implements Model, JsonSerializable { + + public function __construct( private readonly ?int $up = null, private readonly ?int $down = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Number of instances to add when scaling up horizontally - */ + /** + * Number of instances to add when scaling up horizontally + */ public function getUp(): ?int { return $this->up; } - /** - * Number of instances to remove when scaling down horizontally - */ + /** + * Number of instances to remove when scaling down horizontally + */ public function getDown(): ?int { return $this->down; } } + diff --git a/src/Model/AutoscalerServiceSettings.php b/src/Model/AutoscalerServiceSettings.php index 604101c35..64dd11e03 100644 --- a/src/Model/AutoscalerServiceSettings.php +++ b/src/Model/AutoscalerServiceSettings.php @@ -14,6 +14,8 @@ */ final class AutoscalerServiceSettings implements Model, JsonSerializable { + + public function __construct( private readonly ?AutoscalerTriggers $triggers = null, private readonly ?AutoscalerInstances $instances = null, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,43 +47,44 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Scaling triggers settings - */ + /** + * Scaling triggers settings + */ public function getTriggers(): ?AutoscalerTriggers { return $this->triggers; } - /** - * Horizontal scaling settings - */ + /** + * Horizontal scaling settings + */ public function getInstances(): ?AutoscalerInstances { return $this->instances; } - /** - * Vertical scaling settings - */ + /** + * Vertical scaling settings + */ public function getResources(): ?AutoscalerResources { return $this->resources; } - /** - * Scaling factor settings - */ + /** + * Scaling factor settings + */ public function getScaleFactor(): ?AutoscalerScalingFactor { return $this->scaleFactor; } - /** - * Scaling cooldown settings - */ + /** + * Scaling cooldown settings + */ public function getScaleCooldown(): ?AutoscalerScalingCooldown { return $this->scaleCooldown; } } + diff --git a/src/Model/AutoscalerSettings.php b/src/Model/AutoscalerSettings.php index aa4a4384c..5d9edbc5e 100644 --- a/src/Model/AutoscalerSettings.php +++ b/src/Model/AutoscalerSettings.php @@ -15,11 +15,14 @@ */ final class AutoscalerSettings implements Model, JsonSerializable { + + public function __construct( private readonly ?array $services = [], ) { } + public function getModelName(): string { return self::class; @@ -42,3 +45,4 @@ public function getServices(): ?array return $this->services; } } + diff --git a/src/Model/AutoscalerTriggers.php b/src/Model/AutoscalerTriggers.php index 3fb8edbe8..6b4461589 100644 --- a/src/Model/AutoscalerTriggers.php +++ b/src/Model/AutoscalerTriggers.php @@ -14,6 +14,8 @@ */ final class AutoscalerTriggers implements Model, JsonSerializable { + + public function __construct( private readonly ?array $cpu = [], private readonly ?array $memory = [], @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,39 +44,40 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Settings for scaling based on CPU usage - * @return AutoscalerCPUTrigger[]|null - */ + /** + * Settings for scaling based on CPU usage + * @return AutoscalerCPUTrigger[]|null + */ public function getCpu(): ?array { return $this->cpu; } - /** - * Settings for scaling based on Memory usage - * @return AutoscalerMemoryTrigger[]|null - */ + /** + * Settings for scaling based on Memory usage + * @return AutoscalerMemoryTrigger[]|null + */ public function getMemory(): ?array { return $this->memory; } - /** - * Settings for scaling based on CPU pressure - * @return AutoscalerCPUPressureTrigger[]|null - */ + /** + * Settings for scaling based on CPU pressure + * @return AutoscalerCPUPressureTrigger[]|null + */ public function getCpuPressure(): ?array { return $this->cpuPressure; } - /** - * Settings for scaling based on Memory pressure - * @return AutoscalerMemoryPressureTrigger[]|null - */ + /** + * Settings for scaling based on Memory pressure + * @return AutoscalerMemoryPressureTrigger[]|null + */ public function getMemoryPressure(): ?array { return $this->memoryPressure; } } + diff --git a/src/Model/Autoscaling.php b/src/Model/Autoscaling.php index c4e1b4884..d7dc2eb34 100644 --- a/src/Model/Autoscaling.php +++ b/src/Model/Autoscaling.php @@ -13,11 +13,14 @@ */ final class Autoscaling implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, autoscaling can be configured. - */ + /** + * If true, autoscaling can be configured. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/Backup.php b/src/Model/Backup.php index 1cbae5df0..59b8bec4a 100644 --- a/src/Model/Backup.php +++ b/src/Model/Backup.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class Backup implements Model, JsonSerializable { + public const STATUS_CREATED = 'CREATED'; public const STATUS_DELETING = 'DELETING'; @@ -26,9 +26,9 @@ public function __construct( private readonly bool $safe, private readonly bool $restorable, private readonly bool $automated, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, - private readonly ?DateTime $expiresAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, + private readonly ?\DateTime $expiresAt, private readonly ?int $index, private readonly ?int $sizeOfVolumes, private readonly ?int $sizeUsed, @@ -36,6 +36,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -67,26 +68,26 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Backup - */ + /** + * The identifier of Backup + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } @@ -96,91 +97,92 @@ public function getAttributes(): array return $this->attributes; } - /** - * The status of the backup - */ + /** + * The status of the backup + */ public function getStatus(): string { return $this->status; } - /** - * Expiration date of the backup - */ - public function getExpiresAt(): ?DateTime + /** + * Expiration date of the backup + */ + public function getExpiresAt(): ?\DateTime { return $this->expiresAt; } - /** - * The index of this automated backup - */ + /** + * The index of this automated backup + */ public function getIndex(): ?int { return $this->index; } - /** - * The ID of the code commit attached to the backup - */ + /** + * The ID of the code commit attached to the backup + */ public function getCommitId(): string { return $this->commitId; } - /** - * The environment the backup belongs to - */ + /** + * The environment the backup belongs to + */ public function getEnvironment(): string { return $this->environment; } - /** - * Whether this backup was taken in a safe way - */ + /** + * Whether this backup was taken in a safe way + */ public function getSafe(): bool { return $this->safe; } - /** - * Total size of volumes backed up - */ + /** + * Total size of volumes backed up + */ public function getSizeOfVolumes(): ?int { return $this->sizeOfVolumes; } - /** - * Total size of space used on volumes backed up - */ + /** + * Total size of space used on volumes backed up + */ public function getSizeUsed(): ?int { return $this->sizeUsed; } - /** - * The current deployment at the time of backup - */ + /** + * The current deployment at the time of backup + */ public function getDeployment(): ?string { return $this->deployment; } - /** - * Whether the backup is restorable - */ + /** + * Whether the backup is restorable + */ public function getRestorable(): bool { return $this->restorable; } - /** - * Whether the backup is automated - */ + /** + * Whether the backup is automated + */ public function getAutomated(): bool { return $this->automated; } } + diff --git a/src/Model/BasicAuth.php b/src/Model/BasicAuth.php index 7a6dfcc96..725e48e5c 100644 --- a/src/Model/BasicAuth.php +++ b/src/Model/BasicAuth.php @@ -14,12 +14,15 @@ */ final class BasicAuth implements Model, JsonSerializable { + + public function __construct( private readonly string $username, private readonly string $password, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Username used to basic auth to container registry - */ + /** + * Username used to basic auth to container registry + */ public function getUsername(): string { return $this->username; } - /** - * Password used to basic auth to container registry - */ + /** + * Password used to basic auth to container registry + */ public function getPassword(): string { return $this->password; } } + diff --git a/src/Model/Bitbucket.php b/src/Model/Bitbucket.php index 6d2f70ed2..409298958 100644 --- a/src/Model/Bitbucket.php +++ b/src/Model/Bitbucket.php @@ -14,12 +14,15 @@ */ final class Bitbucket implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/BitbucketIntegration.php b/src/Model/BitbucketIntegration.php index dfa3fabf5..35d08510f 100644 --- a/src/Model/BitbucketIntegration.php +++ b/src/Model/BitbucketIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level BitbucketIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class BitbucketIntegration implements Model, JsonSerializable, Integration { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -29,8 +30,8 @@ public function __construct( private readonly bool $buildPullRequests, private readonly bool $pullRequestsCloneParentData, private readonly bool $resyncPullRequests, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?int $pullRequestsMaxPages, private readonly ?OAuth2Consumer $appCredentials = null, private readonly ?AddonCredential $addonCredentials = null, @@ -38,6 +39,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -69,123 +71,124 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * The Bitbucket repository (in the form `user/repo`) - */ + /** + * The Bitbucket repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): bool { return $this->pullRequestsCloneParentData; } - /** - * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit - */ + /** + * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit + */ public function getPullRequestsMaxPages(): ?int { return $this->pullRequestsMaxPages; } - /** - * Whether or not pull request environment data should be re-synced on every build - */ + /** + * Whether or not pull request environment data should be re-synced on every build + */ public function getResyncPullRequests(): bool { return $this->resyncPullRequests; } - /** - * The identifier of BitbucketIntegration - */ + /** + * The identifier of BitbucketIntegration + */ public function getId(): ?string { return $this->id; } - /** - * The OAuth2 consumer information (optional) - */ + /** + * The OAuth2 consumer information (optional) + */ public function getAppCredentials(): ?OAuth2Consumer { return $this->appCredentials; } - /** - * The addon credential information (optional) - */ + /** + * The addon credential information (optional) + */ public function getAddonCredentials(): ?AddonCredential { return $this->addonCredentials; } } + diff --git a/src/Model/BitbucketIntegrationCreateInput.php b/src/Model/BitbucketIntegrationCreateInput.php index f40ce7e99..b4938c084 100644 --- a/src/Model/BitbucketIntegrationCreateInput.php +++ b/src/Model/BitbucketIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level BitbucketIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class BitbucketIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,91 +63,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Bitbucket repository (in the form `user/repo`) - */ + /** + * The Bitbucket repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The OAuth2 consumer information (optional) - */ + /** + * The OAuth2 consumer information (optional) + */ public function getAppCredentials(): ?OAuth2Consumer1 { return $this->appCredentials; } - /** - * The addon credential information (optional) - */ + /** + * The addon credential information (optional) + */ public function getAddonCredentials(): ?AddonCredential1 { return $this->addonCredentials; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } - /** - * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit - */ + /** + * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit + */ public function getPullRequestsMaxPages(): ?int { return $this->pullRequestsMaxPages; } - /** - * Whether or not pull request environment data should be re-synced on every build - */ + /** + * Whether or not pull request environment data should be re-synced on every build + */ public function getResyncPullRequests(): ?bool { return $this->resyncPullRequests; } } + diff --git a/src/Model/BitbucketIntegrationPatch.php b/src/Model/BitbucketIntegrationPatch.php index efa7aeea5..a8ea63daf 100644 --- a/src/Model/BitbucketIntegrationPatch.php +++ b/src/Model/BitbucketIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level BitbucketIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class BitbucketIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,91 +63,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Bitbucket repository (in the form `user/repo`) - */ + /** + * The Bitbucket repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The OAuth2 consumer information (optional) - */ + /** + * The OAuth2 consumer information (optional) + */ public function getAppCredentials(): ?OAuth2Consumer1 { return $this->appCredentials; } - /** - * The addon credential information (optional) - */ + /** + * The addon credential information (optional) + */ public function getAddonCredentials(): ?AddonCredential1 { return $this->addonCredentials; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } - /** - * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit - */ + /** + * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit + */ public function getPullRequestsMaxPages(): ?int { return $this->pullRequestsMaxPages; } - /** - * Whether or not pull request environment data should be re-synced on every build - */ + /** + * Whether or not pull request environment data should be re-synced on every build + */ public function getResyncPullRequests(): ?bool { return $this->resyncPullRequests; } } + diff --git a/src/Model/BitbucketServer.php b/src/Model/BitbucketServer.php index cdd5c7d58..39134f731 100644 --- a/src/Model/BitbucketServer.php +++ b/src/Model/BitbucketServer.php @@ -14,12 +14,15 @@ */ final class BitbucketServer implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/BitbucketServerIntegration.php b/src/Model/BitbucketServerIntegration.php index 4460dea28..ed50105e7 100644 --- a/src/Model/BitbucketServerIntegration.php +++ b/src/Model/BitbucketServerIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level BitbucketServerIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class BitbucketServerIntegration implements Model, JsonSerializable, Integration { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -31,12 +32,13 @@ public function __construct( private readonly string $repository, private readonly bool $buildPullRequests, private readonly bool $pullRequestsCloneParentData, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -67,115 +69,116 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * The base URL of the Bitbucket Server installation - */ + /** + * The base URL of the Bitbucket Server installation + */ public function getUrl(): string { return $this->url; } - /** - * The Bitbucket Server user - */ + /** + * The Bitbucket Server user + */ public function getUsername(): string { return $this->username; } - /** - * The Bitbucket Server project - */ + /** + * The Bitbucket Server project + */ public function getProject(): string { return $this->project; } - /** - * The Bitbucket Server repository - */ + /** + * The Bitbucket Server repository + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): bool { return $this->pullRequestsCloneParentData; } - /** - * The identifier of BitbucketServerIntegration - */ + /** + * The identifier of BitbucketServerIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/BitbucketServerIntegrationCreateInput.php b/src/Model/BitbucketServerIntegrationCreateInput.php index ded7eaafb..664228599 100644 --- a/src/Model/BitbucketServerIntegrationCreateInput.php +++ b/src/Model/BitbucketServerIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level BitbucketServerIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class BitbucketServerIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,91 +63,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The base URL of the Bitbucket Server installation - */ + /** + * The base URL of the Bitbucket Server installation + */ public function getUrl(): string { return $this->url; } - /** - * The Bitbucket Server user - */ + /** + * The Bitbucket Server user + */ public function getUsername(): string { return $this->username; } - /** - * The Bitbucket Server personal access token - */ + /** + * The Bitbucket Server personal access token + */ public function getToken(): string { return $this->token; } - /** - * The Bitbucket Server project - */ + /** + * The Bitbucket Server project + */ public function getProject(): string { return $this->project; } - /** - * The Bitbucket Server repository - */ + /** + * The Bitbucket Server repository + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } + diff --git a/src/Model/BitbucketServerIntegrationPatch.php b/src/Model/BitbucketServerIntegrationPatch.php index 6d137c026..baf78a937 100644 --- a/src/Model/BitbucketServerIntegrationPatch.php +++ b/src/Model/BitbucketServerIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level BitbucketServerIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class BitbucketServerIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,91 +63,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The base URL of the Bitbucket Server installation - */ + /** + * The base URL of the Bitbucket Server installation + */ public function getUrl(): string { return $this->url; } - /** - * The Bitbucket Server user - */ + /** + * The Bitbucket Server user + */ public function getUsername(): string { return $this->username; } - /** - * The Bitbucket Server personal access token - */ + /** + * The Bitbucket Server personal access token + */ public function getToken(): string { return $this->token; } - /** - * The Bitbucket Server project - */ + /** + * The Bitbucket Server project + */ public function getProject(): string { return $this->project; } - /** - * The Bitbucket Server repository - */ + /** + * The Bitbucket Server repository + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } + diff --git a/src/Model/Blackfire.php b/src/Model/Blackfire.php index 4fe5a6447..9fed990e0 100644 --- a/src/Model/Blackfire.php +++ b/src/Model/Blackfire.php @@ -14,12 +14,15 @@ */ final class Blackfire implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/BlackfireIntegration.php b/src/Model/BlackfireIntegration.php index 0601ac6ad..dbde69a35 100644 --- a/src/Model/BlackfireIntegration.php +++ b/src/Model/BlackfireIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level BlackfireIntegration (auto-generated) @@ -14,17 +14,20 @@ */ final class BlackfireIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, private readonly array $environmentsCredentials, private readonly bool $continuousProfiling, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -48,60 +51,61 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Blackfire environments credentials - * @return EnvironmentsCredentialsValue[] - */ + /** + * Blackfire environments credentials + * @return EnvironmentsCredentialsValue[] + */ public function getEnvironmentsCredentials(): array { return $this->environmentsCredentials; } - /** - * Whether continuous profiling is enabled for the project - */ + /** + * Whether continuous profiling is enabled for the project + */ public function getContinuousProfiling(): bool { return $this->continuousProfiling; } - /** - * The identifier of BlackfireIntegration - */ + /** + * The identifier of BlackfireIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/BlackfireIntegrationCreateInput.php b/src/Model/BlackfireIntegrationCreateInput.php index 970449300..35d18da69 100644 --- a/src/Model/BlackfireIntegrationCreateInput.php +++ b/src/Model/BlackfireIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level BlackfireIntegrationCreateInput (auto-generated) @@ -13,11 +14,14 @@ */ final class BlackfireIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } } + diff --git a/src/Model/BlackfireIntegrationPatch.php b/src/Model/BlackfireIntegrationPatch.php index 5f117fc14..c2a56ee6c 100644 --- a/src/Model/BlackfireIntegrationPatch.php +++ b/src/Model/BlackfireIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level BlackfireIntegrationPatch (auto-generated) @@ -13,11 +14,14 @@ */ final class BlackfireIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } } + diff --git a/src/Model/BlackfirePhpServerCaches200Response.php b/src/Model/BlackfirePhpServerCaches200Response.php index 00970dae9..a16bdd9bd 100644 --- a/src/Model/BlackfirePhpServerCaches200Response.php +++ b/src/Model/BlackfirePhpServerCaches200Response.php @@ -13,6 +13,7 @@ */ final class BlackfirePhpServerCaches200Response implements Model, JsonSerializable { + public const _DISTRIBUTION_COST_WT = 'wt'; public const _DISTRIBUTION_COST_PMU = 'pmu'; public const _CONTEXTS_MODE_ADDITIVE = 'additive'; @@ -41,6 +42,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -112,9 +114,9 @@ public function getDistributionCost(): string return $this->distributionCost; } - /** - * @return BlackfirePhpServerCaches200ResponseDataInner[] - */ + /** + * @return BlackfirePhpServerCaches200ResponseDataInner[] + */ public function getData(): array { return $this->data; @@ -150,3 +152,4 @@ public function getInstancesMode(): ?string return $this->instancesMode; } } + diff --git a/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php b/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php index 12a1e6813..280afed64 100644 --- a/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php +++ b/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php @@ -13,6 +13,8 @@ */ final class BlackfirePhpServerCaches200ResponseDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?float $opcacheUsage = null, @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -89,3 +92,4 @@ public function getOpcacheHitrate(): ?float return $this->opcacheHitrate; } } + diff --git a/src/Model/BlackfirePhpServerCaches400Response.php b/src/Model/BlackfirePhpServerCaches400Response.php index 2df920b58..4665b2ed1 100644 --- a/src/Model/BlackfirePhpServerCaches400Response.php +++ b/src/Model/BlackfirePhpServerCaches400Response.php @@ -13,6 +13,8 @@ */ final class BlackfirePhpServerCaches400Response implements Model, JsonSerializable { + + public function __construct( private readonly string $type, private readonly string $title, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getViolations(): array return $this->violations; } } + diff --git a/src/Model/BlackfirePhpServerCaches499Response.php b/src/Model/BlackfirePhpServerCaches499Response.php index ca8ff2708..9aaad451b 100644 --- a/src/Model/BlackfirePhpServerCaches499Response.php +++ b/src/Model/BlackfirePhpServerCaches499Response.php @@ -13,12 +13,15 @@ */ final class BlackfirePhpServerCaches499Response implements Model, JsonSerializable { + + public function __construct( private readonly string $error, private readonly string $message, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMessage(): string return $this->message; } } + diff --git a/src/Model/BlackfireProfileGraph200Response.php b/src/Model/BlackfireProfileGraph200Response.php index b76a003ef..9b35467a4 100644 --- a/src/Model/BlackfireProfileGraph200Response.php +++ b/src/Model/BlackfireProfileGraph200Response.php @@ -13,6 +13,7 @@ */ final class BlackfireProfileGraph200Response implements Model, JsonSerializable { + public const LANGUAGE_PHP = 'php'; public const LANGUAGE_PYTHON = 'python'; @@ -38,6 +39,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -162,3 +164,4 @@ public function getHierarchy(): ?object return $this->hierarchy; } } + diff --git a/src/Model/BlackfireProfileProfile200Response.php b/src/Model/BlackfireProfileProfile200Response.php index c1478fd15..2c59b388e 100644 --- a/src/Model/BlackfireProfileProfile200Response.php +++ b/src/Model/BlackfireProfileProfile200Response.php @@ -13,6 +13,8 @@ */ final class BlackfireProfileProfile200Response implements Model, JsonSerializable { + + public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function getProfile(): object return $this->profile; } } + diff --git a/src/Model/BlackfireProfileSubprofiles200Response.php b/src/Model/BlackfireProfileSubprofiles200Response.php index 7df172132..98859c241 100644 --- a/src/Model/BlackfireProfileSubprofiles200Response.php +++ b/src/Model/BlackfireProfileSubprofiles200Response.php @@ -13,6 +13,8 @@ */ final class BlackfireProfileSubprofiles200Response implements Model, JsonSerializable { + + public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function getSubprofiles(): object return $this->subprofiles; } } + diff --git a/src/Model/BlackfireProfileTimeline200Response.php b/src/Model/BlackfireProfileTimeline200Response.php index 39b8372f6..03773b00c 100644 --- a/src/Model/BlackfireProfileTimeline200Response.php +++ b/src/Model/BlackfireProfileTimeline200Response.php @@ -13,6 +13,7 @@ */ final class BlackfireProfileTimeline200Response implements Model, JsonSerializable { + public const LANGUAGE_PHP = 'php'; public const LANGUAGE_PYTHON = 'python'; @@ -29,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -99,3 +101,4 @@ public function getLanguage(): string return $this->language; } } + diff --git a/src/Model/BlackfireProfilesList200Response.php b/src/Model/BlackfireProfilesList200Response.php index 281cacdd2..2acc7783c 100644 --- a/src/Model/BlackfireProfilesList200Response.php +++ b/src/Model/BlackfireProfilesList200Response.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesList200Response implements Model, JsonSerializable { + + public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -69,9 +72,9 @@ public function getAgent(): string return $this->agent; } - /** - * @return BlackfireProfilesList200ResponseProfilesInner[] - */ + /** + * @return BlackfireProfilesList200ResponseProfilesInner[] + */ public function getProfiles(): array { return $this->profiles; @@ -92,3 +95,4 @@ public function getTotal(): int return $this->total; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInner.php b/src/Model/BlackfireProfilesList200ResponseProfilesInner.php index 57ee21824..fb3bc1c74 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInner.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInner.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,14 +13,16 @@ */ final class BlackfireProfilesList200ResponseProfilesInner implements Model, JsonSerializable { + + public function __construct( private readonly string $uuid, private readonly string $name, private readonly BlackfireProfilesList200ResponseProfilesInnerLinks $links, private readonly ?int $recommendations = null, private readonly ?object $report = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?object $metadata = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerData $data = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerContext $context = null, @@ -38,6 +39,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -89,12 +91,12 @@ public function getLinks(): BlackfireProfilesList200ResponseProfilesInnerLinks return $this->links; } - public function getCreatedAt(): ?DateTime + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - public function getUpdatedAt(): ?DateTime + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } @@ -174,3 +176,4 @@ public function getKeyPage(): ?object return $this->keyPage; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php index cc71a82ae..9967cc733 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerAgent implements Model, JsonSerializable { + + public function __construct( private readonly ?string $uuid = null, private readonly ?string $name = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getIsEnv(): ?bool return $this->isEnv; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php index 7601294b5..57b0a75d8 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php @@ -13,6 +13,7 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerContext implements Model, JsonSerializable { + public const TYPE_HTTP_REQUEST = 'http-request'; public const TYPE_CLI = 'cli'; public const TYPE_NO_OP = 'no-op'; @@ -27,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -79,3 +81,4 @@ public function getArgs(): ?array return $this->args; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php index 9be47903c..5dafd3db0 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php @@ -13,12 +13,15 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerData implements Model, JsonSerializable { + + public function __construct( private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataEnvelope $envelope = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics $importantMetrics = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getImportantMetrics(): ?BlackfireProfilesList200ResponseProfiles return $this->importantMetrics; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php index 3c3120be4..3e1ae8d38 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataEnvelope implements Model, JsonSerializable { + + public function __construct( private readonly ?float $wt = null, private readonly ?float $cpu = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -82,3 +85,4 @@ public function getCt(): ?float return $this->ct; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php index ca18dfe83..27e7e855e 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php @@ -13,12 +13,15 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics implements Model, JsonSerializable { + + public function __construct( private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries $sqlQueries = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests $httpRequests = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getHttpRequests(): ?BlackfireProfilesList200ResponseProfilesInne return $this->httpRequests; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php index 238e6d6f7..bff0d6e31 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php @@ -13,12 +13,15 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests implements Model, JsonSerializable { + + public function __construct( private readonly ?float $ct = null, private readonly ?float $wt = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getWt(): ?float return $this->wt; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php index c436ecf6c..80d3af60f 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php @@ -13,12 +13,15 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries implements Model, JsonSerializable { + + public function __construct( private readonly ?float $ct = null, private readonly ?float $wt = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getWt(): ?float return $this->wt; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php index 6b3246306..c9f62f995 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerLinks implements Model, JsonSerializable { + + public function __construct( private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles $apiSubprofiles, private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile $apiProfile, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -68,3 +71,4 @@ public function getApiTimeline(): ?BlackfireProfilesRecommendations200ResponseRe return $this->apiTimeline; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php index 7f630dcc7..3a3d15dbc 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php @@ -13,6 +13,7 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl implements Model, JsonSerializable { + public const TYPE_TEXT_HTML = 'text/html'; public function __construct( @@ -21,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,3 +51,4 @@ public function getType(): string return $this->type; } } + diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php index 7fabc4b65..223077940 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerOwner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $uuid = null, private readonly ?string $name = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getAvatar(): ?string return $this->avatar; } } + diff --git a/src/Model/BlackfireProfilesRecommendations200Response.php b/src/Model/BlackfireProfilesRecommendations200Response.php index e3c670baf..2b19a41a7 100644 --- a/src/Model/BlackfireProfilesRecommendations200Response.php +++ b/src/Model/BlackfireProfilesRecommendations200Response.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesRecommendations200Response implements Model, JsonSerializable { + + public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -85,9 +88,9 @@ public function getTo(): int return $this->to; } - /** - * @return BlackfireProfilesRecommendations200ResponseRecommendationsInner[] - */ + /** + * @return BlackfireProfilesRecommendations200ResponseRecommendationsInner[] + */ public function getRecommendations(): array { return $this->recommendations; @@ -113,3 +116,4 @@ public function getUntestedTopTransactions(): ?array return $this->untestedTopTransactions; } } + diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php index 5757ed9db..0a594b269 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInner implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly int $total, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getLinks(): ?BlackfireProfilesRecommendations200ResponseRecommen return $this->links; } } + diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php index d26175854..3b2957ac8 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php @@ -13,6 +13,8 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks implements Model, JsonSerializable { + + public function __construct( private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles $apiSubprofiles, private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile $apiProfile, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getApiTimeline(): ?BlackfireProfilesRecommendations200ResponseRe return $this->apiTimeline; } } + diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php index 878e696f3..04de024d9 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php @@ -13,6 +13,7 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph implements Model, JsonSerializable { + public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -21,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,3 +51,4 @@ public function getType(): string return $this->type; } } + diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php index 158fcfb62..f68ac65c0 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php @@ -13,6 +13,7 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile implements Model, JsonSerializable { + public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -21,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,3 +51,4 @@ public function getType(): string return $this->type; } } + diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php index cef8ccfc7..f140ac391 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php @@ -13,6 +13,7 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles implements Model, JsonSerializable { + public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -21,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,3 +51,4 @@ public function getType(): string return $this->type; } } + diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php index 78a3e56f0..5c4046479 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php @@ -13,6 +13,7 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline implements Model, JsonSerializable { + public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -21,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,3 +51,4 @@ public function getType(): string return $this->type; } } + diff --git a/src/Model/BlackfireServerGlobal200Response.php b/src/Model/BlackfireServerGlobal200Response.php index acc8eb64b..ebd157d5d 100644 --- a/src/Model/BlackfireServerGlobal200Response.php +++ b/src/Model/BlackfireServerGlobal200Response.php @@ -13,6 +13,7 @@ */ final class BlackfireServerGlobal200Response implements Model, JsonSerializable { + public const _CONTEXTS_MODE_ADDITIVE = 'additive'; public const _CONTEXTS_MODE_SUBTRACTIVE = 'subtractive'; public const _APPLICATIONS_MODE_ADDITIVE = 'additive'; @@ -44,6 +45,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -133,9 +135,9 @@ public function getBranchMachineName(): string return $this->branchMachineName; } - /** - * @return BlackfireServerGlobal200ResponseAlertEvaluationsInner[] - */ + /** + * @return BlackfireServerGlobal200ResponseAlertEvaluationsInner[] + */ public function getAlertEvaluations(): array { return $this->alertEvaluations; @@ -171,3 +173,4 @@ public function getDistributionCost(): ?string return $this->distributionCost; } } + diff --git a/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php b/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php index c5d6b79d9..38cceb5c3 100644 --- a/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php +++ b/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php @@ -13,6 +13,7 @@ */ final class BlackfireServerGlobal200ResponseAlertEvaluationsInner implements Model, JsonSerializable { + public const STATE_NORMAL = 'normal'; public const STATE_WARN = 'warn'; public const STATE_ALARM = 'alarm'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -65,3 +67,4 @@ public function getState(): string return $this->state; } } + diff --git a/src/Model/BlackfireServerGlobal200ResponseQuota.php b/src/Model/BlackfireServerGlobal200ResponseQuota.php index 9edaad958..7c43359c2 100644 --- a/src/Model/BlackfireServerGlobal200ResponseQuota.php +++ b/src/Model/BlackfireServerGlobal200ResponseQuota.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,15 +13,18 @@ */ final class BlackfireServerGlobal200ResponseQuota implements Model, JsonSerializable { + + public function __construct( private readonly int $allowed, private readonly int $used, private readonly bool $exceeded, - private readonly ?DateTime $periodStartedAt, - private readonly ?DateTime $periodEndsAt, + private readonly ?\DateTime $periodStartedAt, + private readonly ?\DateTime $periodEndsAt, ) { } + public function getModelName(): string { return self::class; @@ -59,13 +61,14 @@ public function getExceeded(): bool return $this->exceeded; } - public function getPeriodStartedAt(): ?DateTime + public function getPeriodStartedAt(): ?\DateTime { return $this->periodStartedAt; } - public function getPeriodEndsAt(): ?DateTime + public function getPeriodEndsAt(): ?\DateTime { return $this->periodEndsAt; } } + diff --git a/src/Model/BlackfireServerGlobal200ResponseServer.php b/src/Model/BlackfireServerGlobal200ResponseServer.php index 5f5b57336..297584f63 100644 --- a/src/Model/BlackfireServerGlobal200ResponseServer.php +++ b/src/Model/BlackfireServerGlobal200ResponseServer.php @@ -13,12 +13,15 @@ */ final class BlackfireServerGlobal200ResponseServer implements Model, JsonSerializable { + + public function __construct( private readonly float $total, private readonly array $data, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getTotal(): float return $this->total; } - /** - * @return BlackfireServerGlobal200ResponseServerDataInner[] - */ + /** + * @return BlackfireServerGlobal200ResponseServerDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php b/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php index 3d0052239..32df63ad5 100644 --- a/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php +++ b/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php @@ -13,6 +13,8 @@ */ final class BlackfireServerGlobal200ResponseServerDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?float $wt = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -82,3 +85,4 @@ public function getRpms(): ?float return $this->rpms; } } + diff --git a/src/Model/BlackfireServerTopSpans200Response.php b/src/Model/BlackfireServerTopSpans200Response.php index de703f745..b2d4dcc26 100644 --- a/src/Model/BlackfireServerTopSpans200Response.php +++ b/src/Model/BlackfireServerTopSpans200Response.php @@ -13,6 +13,7 @@ */ final class BlackfireServerTopSpans200Response implements Model, JsonSerializable { + public const _SORT_PERCENTAGE = 'percentage'; public const _SORT_P_96 = 'p_96'; public const _SORT_COUNT = 'count'; @@ -93,6 +94,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -343,3 +345,4 @@ public function getDistributionCost(): ?string return $this->distributionCost; } } + diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php index 7a569da17..9914cfbb5 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php @@ -13,12 +13,15 @@ */ final class BlackfireServerTopSpans200ResponseAdvancedFilters implements Model, JsonSerializable { + + public function __construct( private readonly array $fields, private readonly int $maxApplicableFilters, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue[] - */ + /** + * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue[] + */ public function getFields(): array { return $this->fields; @@ -49,3 +52,4 @@ public function getMaxApplicableFilters(): int return $this->maxApplicableFilters; } } + diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php index 92ffa2b5d..72f6d762a 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php @@ -13,6 +13,8 @@ */ final class BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue implements Model, JsonSerializable { + + public function __construct( private readonly int $distinctValues, private readonly string $type, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,11 +52,12 @@ public function getType(): string return $this->type; } - /** - * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner[] - */ + /** + * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner[] + */ public function getValues(): array { return $this->values; } } + diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php index a092ab66c..d2c34a44b 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php @@ -13,12 +13,15 @@ */ final class BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner implements Model, JsonSerializable { + + public function __construct( private readonly string $value, private readonly int $count, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getCount(): int return $this->count; } } + diff --git a/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php b/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php index fac99f604..17066e102 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php +++ b/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php @@ -13,11 +13,14 @@ */ final class BlackfireServerTopSpans200ResponseTopSpans implements Model, JsonSerializable { + + public function __construct( private readonly array $data, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTopSpans200ResponseTopSpansDataInner[] - */ + /** + * @return BlackfireServerTopSpans200ResponseTopSpansDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php b/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php index 150d59281..7bfa9ef4c 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php +++ b/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php @@ -13,6 +13,8 @@ */ final class BlackfireServerTopSpans200ResponseTopSpansDataInner implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $label, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getImpact(): float return $this->impact; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200Response.php b/src/Model/BlackfireServerTransactionsBreakdown200Response.php index 3e73147dd..8211fad87 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200Response.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200Response.php @@ -13,6 +13,7 @@ */ final class BlackfireServerTransactionsBreakdown200Response implements Model, JsonSerializable { + public const _BREAKDOWN_DIMENSION_WT = 'wt'; public const _BREAKDOWN_DIMENSION_PMU = 'pmu'; public const _BREAKDOWN_DIMENSION_STDOUT = 'stdout'; @@ -100,6 +101,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -368,3 +370,4 @@ public function getDistributionCost(): ?string return $this->distributionCost; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php index 1888a5e8f..0ae6f000f 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php @@ -13,12 +13,15 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits implements Model, JsonSerializable { + + public function __construct( private readonly int $maxQuantity, private readonly float $maxPercentage, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMaxPercentage(): float return $this->maxPercentage; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php index cd629157e..2c5387505 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php @@ -13,11 +13,14 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline implements Model, JsonSerializable { + + public function __construct( private readonly array $data, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php index d8cfc5fac..13246963e 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php @@ -13,6 +13,8 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -56,11 +59,12 @@ public function getTotalCount(): ?float return $this->totalCount; } - /** - * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue[]|null - */ + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue[]|null + */ public function getTransactionsFilter(): ?array { return $this->_transactionsFilter; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php index 8cf480bc2..2adcb359c 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php @@ -13,12 +13,15 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue implements Model, JsonSerializable { + + public function __construct( private readonly float $average, private readonly float $count, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getCount(): float return $this->count; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php index 1293b4b13..a967082ee 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php @@ -13,11 +13,14 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactions implements Model, JsonSerializable { + + public function __construct( private readonly array $data, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner[] - */ + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php index 7df801fb9..d591b53fe 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php @@ -13,6 +13,8 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner implements Model, JsonSerializable { + + public function __construct( private readonly string $transaction, private readonly float $wt96thPercentile, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -110,3 +113,4 @@ public function getLinks(): BlackfireServerTransactionsBreakdown200ResponseTrans return $this->links; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php index 10f37f2ac..8ad7c97b8 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php @@ -13,6 +13,8 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks implements Model, JsonSerializable { + + public function __construct( private readonly BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans $topSpans, private readonly BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations $recommendations, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getProfiles(): BlackfireServerTransactionsBreakdown200ResponseTr return $this->profiles; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php index 4d1e93c00..b06895dbf 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php @@ -13,11 +13,14 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php index 744c40643..5ae5ce6fb 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php @@ -13,11 +13,14 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php index 844903958..1955a776c 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php @@ -13,11 +13,14 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/Blob.php b/src/Model/Blob.php index 380ce29b5..8f8293188 100644 --- a/src/Model/Blob.php +++ b/src/Model/Blob.php @@ -13,6 +13,7 @@ */ final class Blob implements Model, JsonSerializable { + public const ENCODING_BASE64 = 'base64'; public const ENCODING_UTF_8 = 'utf-8'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,43 +48,44 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Blob - */ + /** + * The identifier of Blob + */ public function getId(): string { return $this->id; } - /** - * The identifier of the tag - */ + /** + * The identifier of the tag + */ public function getSha(): string { return $this->sha; } - /** - * The size of the blob - */ + /** + * The size of the blob + */ public function getSize(): int { return $this->size; } - /** - * The encoding of the contents - */ + /** + * The encoding of the contents + */ public function getEncoding(): string { return $this->encoding; } - /** - * The contents - */ + /** + * The contents + */ public function getContent(): string { return $this->content; } } + diff --git a/src/Model/BuildCachesValue.php b/src/Model/BuildCachesValue.php index 5511311d0..63cf8d252 100644 --- a/src/Model/BuildCachesValue.php +++ b/src/Model/BuildCachesValue.php @@ -13,6 +13,8 @@ */ final class BuildCachesValue implements Model, JsonSerializable { + + public function __construct( private readonly array $watch, private readonly bool $allowStale, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getShareBetweenApps(): bool return $this->shareBetweenApps; } } + diff --git a/src/Model/BuildConfiguration.php b/src/Model/BuildConfiguration.php index 6776c3953..b4186b70d 100644 --- a/src/Model/BuildConfiguration.php +++ b/src/Model/BuildConfiguration.php @@ -13,12 +13,15 @@ */ final class BuildConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly array $caches, private readonly ?string $flavor, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getFlavor(): ?string return $this->flavor; } - /** - * @return BuildCachesValue[] - */ + /** + * @return BuildCachesValue[] + */ public function getCaches(): array { return $this->caches; } } + diff --git a/src/Model/BuildResources.php b/src/Model/BuildResources.php index 3dd810088..ccce47c14 100644 --- a/src/Model/BuildResources.php +++ b/src/Model/BuildResources.php @@ -13,6 +13,8 @@ */ final class BuildResources implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly float $maxCpu, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,9 +42,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, build resources can be modified. - */ + /** + * If true, build resources can be modified. + */ public function getEnabled(): bool { return $this->enabled; @@ -57,3 +60,4 @@ public function getMaxMemory(): int return $this->maxMemory; } } + diff --git a/src/Model/BuildResources1.php b/src/Model/BuildResources1.php index 753976534..f78fa2cc7 100644 --- a/src/Model/BuildResources1.php +++ b/src/Model/BuildResources1.php @@ -13,12 +13,15 @@ */ final class BuildResources1 implements Model, JsonSerializable { + + public function __construct( private readonly float $cpu, private readonly int $memory, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMemory(): int return $this->memory; } } + diff --git a/src/Model/BuildResources2.php b/src/Model/BuildResources2.php index f69caeac8..9eb230832 100644 --- a/src/Model/BuildResources2.php +++ b/src/Model/BuildResources2.php @@ -13,12 +13,15 @@ */ final class BuildResources2 implements Model, JsonSerializable { + + public function __construct( private readonly ?float $cpu = null, private readonly ?int $memory = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMemory(): ?int return $this->memory; } } + diff --git a/src/Model/CacheConfiguration.php b/src/Model/CacheConfiguration.php index accdc90dc..728502dcf 100644 --- a/src/Model/CacheConfiguration.php +++ b/src/Model/CacheConfiguration.php @@ -14,6 +14,8 @@ */ final class CacheConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly int $defaultTtl, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,17 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the cache is enabled. - */ + /** + * Whether the cache is enabled. + */ public function getEnabled(): bool { return $this->enabled; } - /** - * The TTL to apply when the response doesn't specify one. Only applies to static files. - */ + /** + * The TTL to apply when the response doesn't specify one. Only applies to static files. + */ public function getDefaultTtl(): int { return $this->defaultTtl; @@ -68,3 +71,4 @@ public function getHeaders(): array return $this->headers; } } + diff --git a/src/Model/CanAffordSubscriptionRequest.php b/src/Model/CanAffordSubscriptionRequest.php index ebe1b273c..f1238ced6 100644 --- a/src/Model/CanAffordSubscriptionRequest.php +++ b/src/Model/CanAffordSubscriptionRequest.php @@ -13,11 +13,14 @@ */ final class CanAffordSubscriptionRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?array $resources = [], ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getResources(): ?array return $this->resources; } } + diff --git a/src/Model/CanCreateNewOrgSubscription200Response.php b/src/Model/CanCreateNewOrgSubscription200Response.php index cdd61b9b9..b6e20f948 100644 --- a/src/Model/CanCreateNewOrgSubscription200Response.php +++ b/src/Model/CanCreateNewOrgSubscription200Response.php @@ -13,6 +13,8 @@ */ final class CanCreateNewOrgSubscription200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?CanCreateNewOrgSubscription200ResponseRequiredAction $requiredAction = null, private readonly ?bool $canCreate = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getRequiredAction(): ?CanCreateNewOrgSubscription200ResponseRequ return $this->requiredAction; } } + diff --git a/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php b/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php index 4eb5f8eca..45a9e52c5 100644 --- a/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php +++ b/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php @@ -13,6 +13,8 @@ */ final class CanCreateNewOrgSubscription200ResponseRequiredAction implements Model, JsonSerializable { + + public function __construct( private readonly ?object $credentials = null, private readonly ?string $reference = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getReference(): ?string return $this->reference; } } + diff --git a/src/Model/CanUpdateSubscription200Response.php b/src/Model/CanUpdateSubscription200Response.php index 1311f9717..1643bf677 100644 --- a/src/Model/CanUpdateSubscription200Response.php +++ b/src/Model/CanUpdateSubscription200Response.php @@ -13,6 +13,8 @@ */ final class CanUpdateSubscription200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $canUpdate = null, private readonly ?string $message = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getRequiredAction(): ?object return $this->requiredAction; } } + diff --git a/src/Model/Certificate.php b/src/Model/Certificate.php index 0c1cb6b3a..a309500be 100644 --- a/src/Model/Certificate.php +++ b/src/Model/Certificate.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class Certificate implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $certificate, @@ -24,12 +25,13 @@ public function __construct( private readonly array $domains, private readonly array $authType, private readonly array $issuer, - private readonly DateTime $expiresAt, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly \DateTime $expiresAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, ) { } + public function getModelName(): string { return self::class; @@ -58,33 +60,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Certificate - */ + /** + * The identifier of Certificate + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The PEM-encoded certificate - */ + /** + * The PEM-encoded certificate + */ public function getCertificate(): string { return $this->certificate; @@ -95,25 +97,25 @@ public function getChain(): array return $this->chain; } - /** - * Whether this certificate is automatically provisioned - */ + /** + * Whether this certificate is automatically provisioned + */ public function getIsProvisioned(): bool { return $this->isProvisioned; } - /** - * Whether this certificate should be skipped during provisioning - */ + /** + * Whether this certificate should be skipped during provisioning + */ public function getIsInvalid(): bool { return $this->isInvalid; } - /** - * Whether this certificate is root type - */ + /** + * Whether this certificate is root type + */ public function getIsRoot(): bool { return $this->isRoot; @@ -129,20 +131,21 @@ public function getAuthType(): array return $this->authType; } - /** - * The issuer of the certificate - * @return IssuerInner[] - */ + /** + * The issuer of the certificate + * @return IssuerInner[] + */ public function getIssuer(): array { return $this->issuer; } - /** - * Expiration date - */ - public function getExpiresAt(): DateTime + /** + * Expiration date + */ + public function getExpiresAt(): \DateTime { return $this->expiresAt; } } + diff --git a/src/Model/CertificateCreateInput.php b/src/Model/CertificateCreateInput.php index f72517aee..82dde45da 100644 --- a/src/Model/CertificateCreateInput.php +++ b/src/Model/CertificateCreateInput.php @@ -13,6 +13,8 @@ */ final class CertificateCreateInput implements Model, JsonSerializable { + + public function __construct( private readonly string $certificate, private readonly string $key, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,17 +44,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The PEM-encoded certificate - */ + /** + * The PEM-encoded certificate + */ public function getCertificate(): string { return $this->certificate; } - /** - * The PEM-encoded private key - */ + /** + * The PEM-encoded private key + */ public function getKey(): string { return $this->key; @@ -62,11 +65,12 @@ public function getChain(): ?array return $this->chain; } - /** - * Whether this certificate should be skipped during provisioning - */ + /** + * Whether this certificate should be skipped during provisioning + */ public function getIsInvalid(): ?bool { return $this->isInvalid; } } + diff --git a/src/Model/CertificatePatch.php b/src/Model/CertificatePatch.php index c5e65f015..647486f01 100644 --- a/src/Model/CertificatePatch.php +++ b/src/Model/CertificatePatch.php @@ -13,12 +13,15 @@ */ final class CertificatePatch implements Model, JsonSerializable { + + public function __construct( private readonly ?array $chain = [], private readonly ?bool $isInvalid = null, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getChain(): ?array return $this->chain; } - /** - * Whether this certificate should be skipped during provisioning - */ + /** + * Whether this certificate should be skipped during provisioning + */ public function getIsInvalid(): ?bool { return $this->isInvalid; } } + diff --git a/src/Model/CertificateProvisioner.php b/src/Model/CertificateProvisioner.php index bf7999d23..0ae293293 100644 --- a/src/Model/CertificateProvisioner.php +++ b/src/Model/CertificateProvisioner.php @@ -13,6 +13,8 @@ */ final class CertificateProvisioner implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $directoryUrl, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -43,43 +46,44 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of CertificateProvisioner - */ + /** + * The identifier of CertificateProvisioner + */ public function getId(): string { return $this->id; } - /** - * The URL to the ACME directory - */ + /** + * The URL to the ACME directory + */ public function getDirectoryUrl(): string { return $this->directoryUrl; } - /** - * The email address for contact information - */ + /** + * The email address for contact information + */ public function getEmail(): string { return $this->email; } - /** - * The key identifier for Entity Attestation Binding - */ + /** + * The key identifier for Entity Attestation Binding + */ public function getEabKid(): ?string { return $this->eabKid; } - /** - * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding - */ + /** + * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding + */ public function getEabHmacKey(): ?string { return $this->eabHmacKey; } } + diff --git a/src/Model/CertificateProvisionerPatch.php b/src/Model/CertificateProvisionerPatch.php index e9544ea42..aec0d1679 100644 --- a/src/Model/CertificateProvisionerPatch.php +++ b/src/Model/CertificateProvisionerPatch.php @@ -13,6 +13,8 @@ */ final class CertificateProvisionerPatch implements Model, JsonSerializable { + + public function __construct( private readonly ?string $eabKid = null, private readonly ?string $eabHmacKey = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,35 +44,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The URL to the ACME directory - */ + /** + * The URL to the ACME directory + */ public function getDirectoryUrl(): ?string { return $this->directoryUrl; } - /** - * The email address for contact information - */ + /** + * The email address for contact information + */ public function getEmail(): ?string { return $this->email; } - /** - * The key identifier for Entity Attestation Binding - */ + /** + * The key identifier for Entity Attestation Binding + */ public function getEabKid(): ?string { return $this->eabKid; } - /** - * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding - */ + /** + * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding + */ public function getEabHmacKey(): ?string { return $this->eabHmacKey; } } + diff --git a/src/Model/Commands.php b/src/Model/Commands.php index d61cb86d9..86b4e7453 100644 --- a/src/Model/Commands.php +++ b/src/Model/Commands.php @@ -13,12 +13,15 @@ */ final class Commands implements Model, JsonSerializable { + + public function __construct( private readonly string $start, private readonly ?string $stop = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getStop(): ?string return $this->stop; } } + diff --git a/src/Model/Commands1.php b/src/Model/Commands1.php index c8a54a448..84d9865e5 100644 --- a/src/Model/Commands1.php +++ b/src/Model/Commands1.php @@ -13,6 +13,8 @@ */ final class Commands1 implements Model, JsonSerializable { + + public function __construct( private readonly ?string $preStart = null, private readonly ?string $start = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getPostStart(): ?string return $this->postStart; } } + diff --git a/src/Model/Commands2.php b/src/Model/Commands2.php index 47524071f..a73ad2bd8 100644 --- a/src/Model/Commands2.php +++ b/src/Model/Commands2.php @@ -13,6 +13,8 @@ */ final class Commands2 implements Model, JsonSerializable { + + public function __construct( private readonly string $start, private readonly ?string $preStart = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getPostStart(): ?string return $this->postStart; } } + diff --git a/src/Model/CommandsInner.php b/src/Model/CommandsInner.php index 04012a38d..55bb20b4e 100644 --- a/src/Model/CommandsInner.php +++ b/src/Model/CommandsInner.php @@ -13,6 +13,8 @@ */ final class CommandsInner implements Model, JsonSerializable { + + public function __construct( private readonly string $app, private readonly string $type, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getExitCode(): int return $this->exitCode; } } + diff --git a/src/Model/Commit.php b/src/Model/Commit.php index 237b7e09c..4e4ac2787 100644 --- a/src/Model/Commit.php +++ b/src/Model/Commit.php @@ -13,6 +13,8 @@ */ final class Commit implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $sha, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -47,49 +50,49 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Commit - */ + /** + * The identifier of Commit + */ public function getId(): string { return $this->id; } - /** - * The identifier of the commit - */ + /** + * The identifier of the commit + */ public function getSha(): string { return $this->sha; } - /** - * The information about the author - */ + /** + * The information about the author + */ public function getAuthor(): Author { return $this->author; } - /** - * The information about the committer - */ + /** + * The information about the committer + */ public function getCommitter(): Committer { return $this->committer; } - /** - * The commit message - */ + /** + * The commit message + */ public function getMessage(): string { return $this->message; } - /** - * The identifier of the tree - */ + /** + * The identifier of the tree + */ public function getTree(): string { return $this->tree; @@ -100,3 +103,4 @@ public function getParents(): array return $this->parents; } } + diff --git a/src/Model/Committer.php b/src/Model/Committer.php index b8f5c0165..de80af692 100644 --- a/src/Model/Committer.php +++ b/src/Model/Committer.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,13 +14,16 @@ */ final class Committer implements Model, JsonSerializable { + + public function __construct( - private readonly DateTime $date, + private readonly \DateTime $date, private readonly string $name, private readonly string $email, ) { } + public function getModelName(): string { return self::class; @@ -41,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The time of the author or committer - */ - public function getDate(): DateTime + /** + * The time of the author or committer + */ + public function getDate(): \DateTime { return $this->date; } - /** - * The name of the author or committer - */ + /** + * The name of the author or committer + */ public function getName(): string { return $this->name; } - /** - * The email of the author or committer - */ + /** + * The email of the author or committer + */ public function getEmail(): string { return $this->email; } } + diff --git a/src/Model/CommunityPackagesInner.php b/src/Model/CommunityPackagesInner.php index 83f442e83..918fad22b 100644 --- a/src/Model/CommunityPackagesInner.php +++ b/src/Model/CommunityPackagesInner.php @@ -13,10 +13,13 @@ */ final class CommunityPackagesInner implements Model, JsonSerializable { - public function __construct() - { + + + public function __construct( + ) { } + public function getModelName(): string { return self::class; @@ -33,3 +36,4 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } } + diff --git a/src/Model/Components.php b/src/Model/Components.php index c3a1cb076..c89bf7e39 100644 --- a/src/Model/Components.php +++ b/src/Model/Components.php @@ -14,11 +14,14 @@ */ final class Components implements Model, JsonSerializable { + + public function __construct( private readonly ?object $voucherVatBaseprice = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * stub - */ + /** + * stub + */ public function getVoucherVatBaseprice(): ?object { return $this->voucherVatBaseprice; } } + diff --git a/src/Model/ComposableImages.php b/src/Model/ComposableImages.php index c4f261f28..252c4c18b 100644 --- a/src/Model/ComposableImages.php +++ b/src/Model/ComposableImages.php @@ -13,12 +13,15 @@ */ final class ComposableImages implements Model, JsonSerializable { + + public function __construct( private readonly array $runtimes, private readonly array $packages, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getRuntimes(): array return $this->runtimes; } - /** - * @return CommunityPackagesInner[] - */ + /** + * @return CommunityPackagesInner[] + */ public function getPackages(): array { return $this->packages; } } + diff --git a/src/Model/Config.php b/src/Model/Config.php index b4c5af1c8..efff50843 100644 --- a/src/Model/Config.php +++ b/src/Model/Config.php @@ -13,6 +13,8 @@ */ final class Config implements Model, JsonSerializable { + + public function __construct( private readonly ?NewRelic $newrelic = null, private readonly ?SumoLogic $sumologic = null, @@ -35,6 +37,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -69,147 +72,148 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * New Relic log-forwarding integration configurations - */ + /** + * New Relic log-forwarding integration configurations + */ public function getNewrelic(): ?NewRelic { return $this->newrelic; } - /** - * Sumo Logic log-forwarding integration configurations - */ + /** + * Sumo Logic log-forwarding integration configurations + */ public function getSumologic(): ?SumoLogic { return $this->sumologic; } - /** - * Splunk log-forwarding integration configurations - */ + /** + * Splunk log-forwarding integration configurations + */ public function getSplunk(): ?Splunk { return $this->splunk; } - /** - * HTTP log-forwarding integration configurations - */ + /** + * HTTP log-forwarding integration configurations + */ public function getHttplog(): ?HTTPLogForwarding { return $this->httplog; } - /** - * Syslog log-forwarding integration configurations - */ + /** + * Syslog log-forwarding integration configurations + */ public function getSyslog(): ?Syslog { return $this->syslog; } - /** - * Webhook integration configurations - */ + /** + * Webhook integration configurations + */ public function getWebhook(): ?Webhook { return $this->webhook; } - /** - * Script integration configurations - */ + /** + * Script integration configurations + */ public function getScript(): ?Script { return $this->script; } - /** - * GitHub integration configurations - */ + /** + * GitHub integration configurations + */ public function getGithub(): ?GitHub { return $this->github; } - /** - * GitLab integration configurations - */ + /** + * GitLab integration configurations + */ public function getGitlab(): ?GitLab { return $this->gitlab; } - /** - * Bitbucket integration configurations - */ + /** + * Bitbucket integration configurations + */ public function getBitbucket(): ?Bitbucket { return $this->bitbucket; } - /** - * Bitbucket server integration configurations - */ + /** + * Bitbucket server integration configurations + */ public function getBitbucketServer(): ?BitbucketServer { return $this->bitbucketServer; } - /** - * Health Email notification integration configurations - */ + /** + * Health Email notification integration configurations + */ public function getHealthEmail(): ?HealthEmail { return $this->healthEmail; } - /** - * Health Webhook notification integration configurations - */ + /** + * Health Webhook notification integration configurations + */ public function getHealthWebhook(): ?HealthWebHook { return $this->healthWebhook; } - /** - * Health PagerDuty notification integration configurations - */ + /** + * Health PagerDuty notification integration configurations + */ public function getHealthPagerduty(): ?HealthPagerDuty { return $this->healthPagerduty; } - /** - * Health Slack notification integration configurations - */ + /** + * Health Slack notification integration configurations + */ public function getHealthSlack(): ?HealthSlack { return $this->healthSlack; } - /** - * Fastly CDN integration configurations - */ + /** + * Fastly CDN integration configurations + */ public function getCdnFastly(): ?FastlyCDN { return $this->cdnFastly; } - /** - * Blackfire integration configurations - */ + /** + * Blackfire integration configurations + */ public function getBlackfire(): ?Blackfire { return $this->blackfire; } - /** - * OpenTelemetry log-forwarding integration configurations - */ + /** + * OpenTelemetry log-forwarding integration configurations + */ public function getOtlplog(): ?OpenTelemetry { return $this->otlplog; } } + diff --git a/src/Model/ConfirmPhoneNumberRequest.php b/src/Model/ConfirmPhoneNumberRequest.php index e8161e37a..2af196aea 100644 --- a/src/Model/ConfirmPhoneNumberRequest.php +++ b/src/Model/ConfirmPhoneNumberRequest.php @@ -13,11 +13,14 @@ */ final class ConfirmPhoneNumberRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $code, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getCode(): string return $this->code; } } + diff --git a/src/Model/ConfirmTotpEnrollment200Response.php b/src/Model/ConfirmTotpEnrollment200Response.php index 78966ee75..7e70b3518 100644 --- a/src/Model/ConfirmTotpEnrollment200Response.php +++ b/src/Model/ConfirmTotpEnrollment200Response.php @@ -13,11 +13,14 @@ */ final class ConfirmTotpEnrollment200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $recoveryCodes = [], ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getRecoveryCodes(): ?array return $this->recoveryCodes; } } + diff --git a/src/Model/ConfirmTotpEnrollmentRequest.php b/src/Model/ConfirmTotpEnrollmentRequest.php index ac2a5f286..c83293620 100644 --- a/src/Model/ConfirmTotpEnrollmentRequest.php +++ b/src/Model/ConfirmTotpEnrollmentRequest.php @@ -13,12 +13,15 @@ */ final class ConfirmTotpEnrollmentRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $secret, private readonly string $passcode, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getPasscode(): string return $this->passcode; } } + diff --git a/src/Model/Connection.php b/src/Model/Connection.php index a11059cef..e574f8ab9 100644 --- a/src/Model/Connection.php +++ b/src/Model/Connection.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,17 +13,20 @@ */ final class Connection implements Model, JsonSerializable { + + public function __construct( private readonly ?string $provider = null, private readonly ?string $providerType = null, private readonly ?bool $isMandatory = null, private readonly ?string $subject = null, private readonly ?string $emailAddress = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, ) { } + public function getModelName(): string { return self::class; @@ -48,59 +50,60 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the federation provider. - */ + /** + * The name of the federation provider. + */ public function getProvider(): ?string { return $this->provider; } - /** - * The type of the federation provider. - */ + /** + * The type of the federation provider. + */ public function getProviderType(): ?string { return $this->providerType; } - /** - * Whether the federated login connection is mandatory. - */ + /** + * Whether the federated login connection is mandatory. + */ public function getIsMandatory(): ?bool { return $this->isMandatory; } - /** - * The identity on the federation provider. - */ + /** + * The identity on the federation provider. + */ public function getSubject(): ?string { return $this->subject; } - /** - * The email address presented on the federated login connection. - */ + /** + * The email address presented on the federated login connection. + */ public function getEmailAddress(): ?string { return $this->emailAddress; } - /** - * The date and time when the connection was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the connection was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the connection was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the connection was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } } + diff --git a/src/Model/ContainerProfilesValueValue.php b/src/Model/ContainerProfilesValueValue.php index 6b0d9257c..3310c04cf 100644 --- a/src/Model/ContainerProfilesValueValue.php +++ b/src/Model/ContainerProfilesValueValue.php @@ -13,6 +13,7 @@ */ final class ContainerProfilesValueValue implements Model, JsonSerializable { + public const CPU_TYPE_GUARANTEED = 'guaranteed'; public const CPU_TYPE_SHARED = 'shared'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -57,3 +59,4 @@ public function getCpuType(): string return $this->cpuType; } } + diff --git a/src/Model/ContinuousProfilingConfiguration.php b/src/Model/ContinuousProfilingConfiguration.php index e923a94a5..fb816605f 100644 --- a/src/Model/ContinuousProfilingConfiguration.php +++ b/src/Model/ContinuousProfilingConfiguration.php @@ -14,11 +14,14 @@ */ final class ContinuousProfilingConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly array $supportedRuntimes, ) { } + public function getModelName(): string { return self::class; @@ -41,3 +44,4 @@ public function getSupportedRuntimes(): array return $this->supportedRuntimes; } } + diff --git a/src/Model/CreateApiTokenRequest.php b/src/Model/CreateApiTokenRequest.php index adf63945d..5d4edd528 100644 --- a/src/Model/CreateApiTokenRequest.php +++ b/src/Model/CreateApiTokenRequest.php @@ -13,11 +13,14 @@ */ final class CreateApiTokenRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $name, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getName(): string return $this->name; } } + diff --git a/src/Model/CreateAuthorizationCredentials200Response.php b/src/Model/CreateAuthorizationCredentials200Response.php index dac5a8630..75a8c60cd 100644 --- a/src/Model/CreateAuthorizationCredentials200Response.php +++ b/src/Model/CreateAuthorizationCredentials200Response.php @@ -13,12 +13,15 @@ */ final class CreateAuthorizationCredentials200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?CreateAuthorizationCredentials200ResponseRedirectToUrl $redirectToUrl = null, private readonly ?string $type = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getType(): ?string return $this->type; } } + diff --git a/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php b/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php index c60312acd..47637554d 100644 --- a/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php +++ b/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php @@ -13,12 +13,15 @@ */ final class CreateAuthorizationCredentials200ResponseRedirectToUrl implements Model, JsonSerializable { + + public function __construct( private readonly ?string $returnUrl = null, private readonly ?string $url = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getUrl(): ?string return $this->url; } } + diff --git a/src/Model/CreateOrgInviteRequest.php b/src/Model/CreateOrgInviteRequest.php index efd87dc11..7b9cd606d 100644 --- a/src/Model/CreateOrgInviteRequest.php +++ b/src/Model/CreateOrgInviteRequest.php @@ -13,6 +13,7 @@ */ final class CreateOrgInviteRequest implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_PLANS = 'plans'; @@ -27,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +63,4 @@ public function getForce(): ?bool return $this->force; } } + diff --git a/src/Model/CreateOrgMemberRequest.php b/src/Model/CreateOrgMemberRequest.php index f06422686..1aa12054b 100644 --- a/src/Model/CreateOrgMemberRequest.php +++ b/src/Model/CreateOrgMemberRequest.php @@ -13,6 +13,7 @@ */ final class CreateOrgMemberRequest implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_MEMBERS = 'members'; @@ -26,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +56,4 @@ public function getPermissions(): ?array return $this->permissions; } } + diff --git a/src/Model/CreateOrgProjectRequest.php b/src/Model/CreateOrgProjectRequest.php index 0c263a2b6..5bbda00ab 100644 --- a/src/Model/CreateOrgProjectRequest.php +++ b/src/Model/CreateOrgProjectRequest.php @@ -13,6 +13,8 @@ */ final class CreateOrgProjectRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $region, private readonly ?string $organizationId = null, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,51 +48,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getRegion(): string { return $this->region; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): ?string { return $this->title; } - /** - * The type of projects. - */ + /** + * The type of projects. + */ public function getType(): ?ProjectType { return $this->type; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Default branch. - */ + /** + * Default branch. + */ public function getDefaultBranch(): ?string { return $this->defaultBranch; } } + diff --git a/src/Model/CreateOrgRequest.php b/src/Model/CreateOrgRequest.php index 38f03ac0a..674e77733 100644 --- a/src/Model/CreateOrgRequest.php +++ b/src/Model/CreateOrgRequest.php @@ -13,6 +13,7 @@ */ final class CreateOrgRequest implements Model, JsonSerializable { + public const TYPE_FIXED = 'fixed'; public const TYPE_FLEXIBLE = 'flexible'; @@ -26,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -78,3 +80,4 @@ public function getSecurityContact(): ?string return $this->securityContact; } } + diff --git a/src/Model/CreateOrgSubscriptionRequest.php b/src/Model/CreateOrgSubscriptionRequest.php index 6c437eaa7..65cae6068 100644 --- a/src/Model/CreateOrgSubscriptionRequest.php +++ b/src/Model/CreateOrgSubscriptionRequest.php @@ -13,6 +13,8 @@ */ final class CreateOrgSubscriptionRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $projectRegion, private readonly ?string $plan = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,9 +55,9 @@ public function getProjectRegion(): string return $this->projectRegion; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; @@ -85,3 +88,4 @@ public function getStorage(): ?int return $this->storage; } } + diff --git a/src/Model/CreateProfilePicture200Response.php b/src/Model/CreateProfilePicture200Response.php index dcc7a30d8..585fedf95 100644 --- a/src/Model/CreateProfilePicture200Response.php +++ b/src/Model/CreateProfilePicture200Response.php @@ -13,11 +13,14 @@ */ final class CreateProfilePicture200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?string $url = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getUrl(): ?string return $this->url; } } + diff --git a/src/Model/CreateProjectInviteRequest.php b/src/Model/CreateProjectInviteRequest.php index ce23c8af2..921eeac90 100644 --- a/src/Model/CreateProjectInviteRequest.php +++ b/src/Model/CreateProjectInviteRequest.php @@ -13,6 +13,7 @@ */ final class CreateProjectInviteRequest implements Model, JsonSerializable { + public const ROLE_ADMIN = 'admin'; public const ROLE_VIEWER = 'viewer'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -56,17 +58,17 @@ public function getRole(): ?string return $this->role; } - /** - * @return CreateProjectInviteRequestPermissionsInner[]|null - */ + /** + * @return CreateProjectInviteRequestPermissionsInner[]|null + */ public function getPermissions(): ?array { return $this->permissions; } - /** - * @return CreateProjectInviteRequestEnvironmentsInner[]|null - */ + /** + * @return CreateProjectInviteRequestEnvironmentsInner[]|null + */ public function getEnvironments(): ?array { return $this->environments; @@ -77,3 +79,4 @@ public function getForce(): ?bool return $this->force; } } + diff --git a/src/Model/CreateProjectInviteRequestEnvironmentsInner.php b/src/Model/CreateProjectInviteRequestEnvironmentsInner.php index 548a3e2c0..92eac2e96 100644 --- a/src/Model/CreateProjectInviteRequestEnvironmentsInner.php +++ b/src/Model/CreateProjectInviteRequestEnvironmentsInner.php @@ -13,6 +13,7 @@ */ final class CreateProjectInviteRequestEnvironmentsInner implements Model, JsonSerializable { + public const ROLE_ADMIN = 'admin'; public const ROLE_VIEWER = 'viewer'; public const ROLE_CONTRIBUTOR = 'contributor'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,3 +53,4 @@ public function getRole(): ?string return $this->role; } } + diff --git a/src/Model/CreateProjectInviteRequestPermissionsInner.php b/src/Model/CreateProjectInviteRequestPermissionsInner.php index 6754e4de9..765daeb30 100644 --- a/src/Model/CreateProjectInviteRequestPermissionsInner.php +++ b/src/Model/CreateProjectInviteRequestPermissionsInner.php @@ -13,6 +13,7 @@ */ final class CreateProjectInviteRequestPermissionsInner implements Model, JsonSerializable { + public const TYPE_PRODUCTION = 'production'; public const TYPE_STAGING = 'staging'; public const TYPE_DEVELOPMENT = 'development'; @@ -26,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +56,4 @@ public function getRole(): ?string return $this->role; } } + diff --git a/src/Model/CreateSshKeyRequest.php b/src/Model/CreateSshKeyRequest.php index d271a2066..596e02877 100644 --- a/src/Model/CreateSshKeyRequest.php +++ b/src/Model/CreateSshKeyRequest.php @@ -13,6 +13,8 @@ */ final class CreateSshKeyRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $value, private readonly ?string $title = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getUuid(): ?string return $this->uuid; } } + diff --git a/src/Model/CreateTeamMemberRequest.php b/src/Model/CreateTeamMemberRequest.php index 9f981abac..64311f25a 100644 --- a/src/Model/CreateTeamMemberRequest.php +++ b/src/Model/CreateTeamMemberRequest.php @@ -13,11 +13,14 @@ */ final class CreateTeamMemberRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $userId, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getUserId(): string return $this->userId; } } + diff --git a/src/Model/CreateTeamRequest.php b/src/Model/CreateTeamRequest.php index efa2e1b6a..10e873ea0 100644 --- a/src/Model/CreateTeamRequest.php +++ b/src/Model/CreateTeamRequest.php @@ -13,6 +13,8 @@ */ final class CreateTeamRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $organizationId, private readonly string $label, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getProjectPermissions(): ?array return $this->projectPermissions; } } + diff --git a/src/Model/CreateTicketRequest.php b/src/Model/CreateTicketRequest.php index 43b9d54b0..aba2caf0e 100644 --- a/src/Model/CreateTicketRequest.php +++ b/src/Model/CreateTicketRequest.php @@ -13,6 +13,7 @@ */ final class CreateTicketRequest implements Model, JsonSerializable { + public const PRIORITY_LOW = 'low'; public const PRIORITY_NORMAL = 'normal'; public const PRIORITY_HIGH = 'high'; @@ -44,6 +45,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -116,9 +118,9 @@ public function getCategory(): ?string return $this->category; } - /** - * @return CreateTicketRequestAttachmentsInner[]|null - */ + /** + * @return CreateTicketRequestAttachmentsInner[]|null + */ public function getAttachments(): ?array { return $this->attachments; @@ -129,3 +131,4 @@ public function getCollaboratorIds(): ?array return $this->collaboratorIds; } } + diff --git a/src/Model/CreateTicketRequestAttachmentsInner.php b/src/Model/CreateTicketRequestAttachmentsInner.php index 31ffda03b..f0157c3fb 100644 --- a/src/Model/CreateTicketRequestAttachmentsInner.php +++ b/src/Model/CreateTicketRequestAttachmentsInner.php @@ -13,12 +13,15 @@ */ final class CreateTicketRequestAttachmentsInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $filename = null, private readonly ?string $data = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getData(): ?string return $this->data; } } + diff --git a/src/Model/CronsDeploymentState.php b/src/Model/CronsDeploymentState.php index 478eb3115..646d07602 100644 --- a/src/Model/CronsDeploymentState.php +++ b/src/Model/CronsDeploymentState.php @@ -14,6 +14,7 @@ */ final class CronsDeploymentState implements Model, JsonSerializable { + public const STATUS_PAUSED = 'paused'; public const STATUS_RUNNING = 'running'; public const STATUS_SLEEPING = 'sleeping'; @@ -24,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,19 +44,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enabled or disabled - */ + /** + * Enabled or disabled + */ public function getEnabled(): bool { return $this->enabled; } - /** - * The status of the crons - */ + /** + * The status of the crons + */ public function getStatus(): string { return $this->status; } } + diff --git a/src/Model/CronsValue.php b/src/Model/CronsValue.php index 4a4f0dc9b..6fc713e8f 100644 --- a/src/Model/CronsValue.php +++ b/src/Model/CronsValue.php @@ -13,6 +13,8 @@ */ final class CronsValue implements Model, JsonSerializable { + + public function __construct( private readonly string $spec, private readonly Commands $commands, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -68,3 +71,4 @@ public function getCmd(): ?string return $this->cmd; } } + diff --git a/src/Model/CurrencyAmount.php b/src/Model/CurrencyAmount.php index c2e67cbab..f1d627d9a 100644 --- a/src/Model/CurrencyAmount.php +++ b/src/Model/CurrencyAmount.php @@ -14,6 +14,8 @@ */ final class CurrencyAmount implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted currency value. - */ + /** + * Formatted currency value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Plain amount. - */ + /** + * Plain amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Currency code. - */ + /** + * Currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * Currency symbol. - */ + /** + * Currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } + diff --git a/src/Model/CurrencyAmountNullable.php b/src/Model/CurrencyAmountNullable.php index 9679183f0..1cd30c82e 100644 --- a/src/Model/CurrencyAmountNullable.php +++ b/src/Model/CurrencyAmountNullable.php @@ -14,6 +14,8 @@ */ final class CurrencyAmountNullable implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted currency value. - */ + /** + * Formatted currency value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Plain amount. - */ + /** + * Plain amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Currency code. - */ + /** + * Currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * Currency symbol. - */ + /** + * Currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } + diff --git a/src/Model/CurrentUser.php b/src/Model/CurrentUser.php index d672e11e0..b8aae3bf3 100644 --- a/src/Model/CurrentUser.php +++ b/src/Model/CurrentUser.php @@ -14,6 +14,8 @@ */ final class CurrentUser implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $uuid = null, @@ -31,6 +33,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,82 +63,82 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getId(): ?string { return $this->id; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getUuid(): ?string { return $this->uuid; } - /** - * The username of the owner. - */ + /** + * The username of the owner. + */ public function getUsername(): ?string { return $this->username; } - /** - * The full name of the owner. - */ + /** + * The full name of the owner. + */ public function getDisplayName(): ?string { return $this->displayName; } - /** - * Status of the user. 0 = blocked; 1 = active. - */ + /** + * Status of the user. 0 = blocked; 1 = active. + */ public function getStatus(): ?int { return $this->status; } - /** - * The email address of the owner. - */ + /** + * The email address of the owner. + */ public function getMail(): ?string { return $this->mail; } - /** - * The list of user's public SSH keys. - * @return SshKey[]|null - */ + /** + * The list of user's public SSH keys. + * @return SshKey[]|null + */ public function getSshKeys(): ?array { return $this->sshKeys; } - /** - * The indicator whether the user has a public ssh key on file or not. - */ + /** + * The indicator whether the user has a public ssh key on file or not. + */ public function getHasKey(): ?bool { return $this->hasKey; } - /** - * @return CurrentUserProjectsInner[]|null - */ + /** + * @return CurrentUserProjectsInner[]|null + */ public function getProjects(): ?array { return $this->projects; } - /** - * The sequential ID of the user. - */ + /** + * The sequential ID of the user. + */ public function getSequence(): ?int { return $this->sequence; @@ -146,19 +149,20 @@ public function getRoles(): ?array return $this->roles; } - /** - * The URL of the user image. - */ + /** + * The URL of the user image. + */ public function getPicture(): ?string { return $this->picture; } - /** - * Number of support tickets by status. - */ + /** + * Number of support tickets by status. + */ public function getTickets(): ?object { return $this->tickets; } } + diff --git a/src/Model/CurrentUserProjectsInner.php b/src/Model/CurrentUserProjectsInner.php index 2ff0dd16b..b7b331b91 100644 --- a/src/Model/CurrentUserProjectsInner.php +++ b/src/Model/CurrentUserProjectsInner.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class CurrentUserProjectsInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $name = null, @@ -34,10 +35,11 @@ public function __construct( private readonly ?string $vendorLabel = null, private readonly ?string $vendorWebsite = null, private readonly ?string $vendorResources = null, - private readonly ?DateTime $createdAt = null, + private readonly ?\DateTime $createdAt = null, ) { } + public function getModelName(): string { return self::class; @@ -129,9 +131,9 @@ public function getOwner(): ?string return $this->owner; } - /** - * Project owner information that can be exposed to collaborators. - */ + /** + * Project owner information that can be exposed to collaborators. + */ public function getOwnerInfo(): ?OwnerInfo { return $this->ownerInfo; @@ -172,8 +174,9 @@ public function getVendorResources(): ?string return $this->vendorResources; } - public function getCreatedAt(): ?DateTime + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } } + diff --git a/src/Model/CustomDomains.php b/src/Model/CustomDomains.php index c147524c1..cc7068696 100644 --- a/src/Model/CustomDomains.php +++ b/src/Model/CustomDomains.php @@ -13,12 +13,15 @@ */ final class CustomDomains implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly int $environmentsWithDomainsLimit, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +40,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, custom domains can be added to the project. - */ + /** + * If true, custom domains can be added to the project. + */ public function getEnabled(): bool { return $this->enabled; } - /** - * Limit on the amount of non-production environments that can have domains set - */ + /** + * Limit on the amount of non-production environments that can have domains set + */ public function getEnvironmentsWithDomainsLimit(): int { return $this->environmentsWithDomainsLimit; } } + diff --git a/src/Model/DataRetention.php b/src/Model/DataRetention.php index 037b9974f..935485234 100644 --- a/src/Model/DataRetention.php +++ b/src/Model/DataRetention.php @@ -13,11 +13,14 @@ */ final class DataRetention implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, data retention configuration can be modified. - */ + /** + * If true, data retention configuration can be modified. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/DataRetentionConfigurationValue.php b/src/Model/DataRetentionConfigurationValue.php index 04b2aadc5..b76ba8f82 100644 --- a/src/Model/DataRetentionConfigurationValue.php +++ b/src/Model/DataRetentionConfigurationValue.php @@ -13,12 +13,15 @@ */ final class DataRetentionConfigurationValue implements Model, JsonSerializable { + + public function __construct( private readonly int $maxBackups, private readonly DefaultConfig $defaultConfig, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getDefaultConfig(): DefaultConfig return $this->defaultConfig; } } + diff --git a/src/Model/DataRetentionConfigurationValue1.php b/src/Model/DataRetentionConfigurationValue1.php index 038d668a2..c71c73985 100644 --- a/src/Model/DataRetentionConfigurationValue1.php +++ b/src/Model/DataRetentionConfigurationValue1.php @@ -13,12 +13,15 @@ */ final class DataRetentionConfigurationValue1 implements Model, JsonSerializable { + + public function __construct( private readonly DefaultConfig1 $defaultConfig, private readonly ?int $maxBackups = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMaxBackups(): ?int return $this->maxBackups; } } + diff --git a/src/Model/DateTimeFilter.php b/src/Model/DateTimeFilter.php index b1a0082b0..df5fad8c4 100644 --- a/src/Model/DateTimeFilter.php +++ b/src/Model/DateTimeFilter.php @@ -13,6 +13,8 @@ */ final class DateTimeFilter implements Model, JsonSerializable { + + public function __construct( private readonly ?string $eq = null, private readonly ?string $ne = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -47,59 +50,60 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Equal - */ + /** + * Equal + */ public function getEq(): ?string { return $this->eq; } - /** - * Not equal - */ + /** + * Not equal + */ public function getNe(): ?string { return $this->ne; } - /** - * Between (comma-separated list) - */ + /** + * Between (comma-separated list) + */ public function getBetween(): ?string { return $this->between; } - /** - * Greater than - */ + /** + * Greater than + */ public function getGt(): ?string { return $this->gt; } - /** - * Greater than or equal - */ + /** + * Greater than or equal + */ public function getGte(): ?string { return $this->gte; } - /** - * Less than - */ + /** + * Less than + */ public function getLt(): ?string { return $this->lt; } - /** - * Less than or equal - */ + /** + * Less than or equal + */ public function getLte(): ?string { return $this->lte; } } + diff --git a/src/Model/DedicatedDeploymentTarget.php b/src/Model/DedicatedDeploymentTarget.php index 35f73af79..53a774aa7 100644 --- a/src/Model/DedicatedDeploymentTarget.php +++ b/src/Model/DedicatedDeploymentTarget.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTarget; /** * Low level DedicatedDeploymentTarget (auto-generated) @@ -13,6 +14,7 @@ */ final class DedicatedDeploymentTarget implements Model, JsonSerializable, DeploymentTarget { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -36,6 +38,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -66,58 +69,58 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The host to deploy to - */ + /** + * The host to deploy to + */ public function getDeployHost(): ?string { return $this->deployHost; } - /** - * The port to deploy to - */ + /** + * The port to deploy to + */ public function getDeployPort(): ?int { return $this->deployPort; } - /** - * The host to use to SSH to app containers - */ + /** + * The host to use to SSH to app containers + */ public function getSshHost(): ?string { return $this->sshHost; } - /** - * The hosts of the deployment target - * @return HostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return HostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * Whether to take application mounts from the pushed data or the deployment target - */ + /** + * Whether to take application mounts from the pushed data or the deployment target + */ public function getAutoMounts(): bool { return $this->autoMounts; @@ -128,51 +131,52 @@ public function getExcludedMounts(): array return $this->excludedMounts; } - /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) - */ + /** + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) + */ public function getEnforcedMounts(): object { return $this->enforcedMounts; } - /** - * Whether to take application crons from the pushed data or the deployment target - */ + /** + * Whether to take application crons from the pushed data or the deployment target + */ public function getAutoCrons(): bool { return $this->autoCrons; } - /** - * Whether to take application crons from the pushed data or the deployment target - */ + /** + * Whether to take application crons from the pushed data or the deployment target + */ public function getAutoNginx(): bool { return $this->autoNginx; } - /** - * Whether to perform deployments or not - */ + /** + * Whether to perform deployments or not + */ public function getMaintenanceMode(): bool { return $this->maintenanceMode; } - /** - * which phase of guardrails are we in - */ + /** + * which phase of guardrails are we in + */ public function getGuardrailsPhase(): int { return $this->guardrailsPhase; } - /** - * The identifier of DedicatedDeploymentTarget - */ + /** + * The identifier of DedicatedDeploymentTarget + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/DedicatedDeploymentTargetCreateInput.php b/src/Model/DedicatedDeploymentTargetCreateInput.php index b77c76a2c..05b0b0d9d 100644 --- a/src/Model/DedicatedDeploymentTargetCreateInput.php +++ b/src/Model/DedicatedDeploymentTargetCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetCreateInput; /** * Low level DedicatedDeploymentTargetCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class DedicatedDeploymentTargetCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,27 +47,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) - */ + /** + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) + */ public function getEnforcedMounts(): ?object { return $this->enforcedMounts; } } + diff --git a/src/Model/DedicatedDeploymentTargetPatch.php b/src/Model/DedicatedDeploymentTargetPatch.php index e898b7355..962811d0b 100644 --- a/src/Model/DedicatedDeploymentTargetPatch.php +++ b/src/Model/DedicatedDeploymentTargetPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetPatch; /** * Low level DedicatedDeploymentTargetPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class DedicatedDeploymentTargetPatch implements Model, JsonSerializable, DeploymentTargetPatch { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,27 +47,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) - */ + /** + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) + */ public function getEnforcedMounts(): ?object { return $this->enforcedMounts; } } + diff --git a/src/Model/DefaultConfig.php b/src/Model/DefaultConfig.php index f5d8801a6..4a848228b 100644 --- a/src/Model/DefaultConfig.php +++ b/src/Model/DefaultConfig.php @@ -13,12 +13,15 @@ */ final class DefaultConfig implements Model, JsonSerializable { + + public function __construct( private readonly int $manualCount, private readonly array $schedule, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getManualCount(): int return $this->manualCount; } - /** - * @return ScheduleInner[] - */ + /** + * @return ScheduleInner[] + */ public function getSchedule(): array { return $this->schedule; } } + diff --git a/src/Model/DefaultConfig1.php b/src/Model/DefaultConfig1.php index 252e3a287..887f64008 100644 --- a/src/Model/DefaultConfig1.php +++ b/src/Model/DefaultConfig1.php @@ -13,12 +13,15 @@ */ final class DefaultConfig1 implements Model, JsonSerializable { + + public function __construct( private readonly ?int $manualCount = null, private readonly ?array $schedule = [], ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getManualCount(): ?int return $this->manualCount; } - /** - * @return ScheduleInner[]|null - */ + /** + * @return ScheduleInner[]|null + */ public function getSchedule(): ?array { return $this->schedule; } } + diff --git a/src/Model/DefaultResources.php b/src/Model/DefaultResources.php index 61160d2e7..454dc1f03 100644 --- a/src/Model/DefaultResources.php +++ b/src/Model/DefaultResources.php @@ -13,6 +13,7 @@ */ final class DefaultResources implements Model, JsonSerializable { + public const CPU_TYPE_GUARANTEED = 'guaranteed'; public const CPU_TYPE_SHARED = 'shared'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -71,3 +73,4 @@ public function getProfileSize(): ?string return $this->profileSize; } } + diff --git a/src/Model/Deployment.php b/src/Model/Deployment.php index 88f9e9406..76ed5c292 100644 --- a/src/Model/Deployment.php +++ b/src/Model/Deployment.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class Deployment implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $clusterName, @@ -33,12 +34,13 @@ public function __construct( private readonly array $containerProfiles, private readonly string $tasks, private readonly ?VPNConfiguration $vpn, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?string $fingerprint = null, ) { } + public function getModelName(): string { return self::class; @@ -76,135 +78,135 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Deployment - */ + /** + * The identifier of Deployment + */ public function getId(): string { return $this->id; } - /** - * The name of the cluster - */ + /** + * The name of the cluster + */ public function getClusterName(): string { return $this->clusterName; } - /** - * The project information - */ + /** + * The project information + */ public function getProjectInfo(): ProjectInfo { return $this->projectInfo; } - /** - * The environment information - */ + /** + * The environment information + */ public function getEnvironmentInfo(): EnvironmentInfo { return $this->environmentInfo; } - /** - * The deployment target - */ + /** + * The deployment target + */ public function getDeploymentTarget(): string { return $this->deploymentTarget; } - /** - * The configuration of the VPN - */ + /** + * The configuration of the VPN + */ public function getVpn(): ?VPNConfiguration { return $this->vpn; } - /** - * The permissions of the HTTP access - */ + /** + * The permissions of the HTTP access + */ public function getHttpAccess(): HttpAccessPermissions { return $this->httpAccess; } - /** - * Whether to configure SMTP for this environment - */ + /** + * Whether to configure SMTP for this environment + */ public function getEnableSmtp(): bool { return $this->enableSmtp; } - /** - * Whether to restrict robots for this environment - */ + /** + * Whether to restrict robots for this environment + */ public function getRestrictRobots(): bool { return $this->restrictRobots; } - /** - * The variables applying to this environment - * @return EnvironmentVariablesInner[] - */ + /** + * The variables applying to this environment + * @return EnvironmentVariablesInner[] + */ public function getVariables(): array { return $this->variables; } - /** - * Access control definition for this enviroment - * @return AccessControlInner[] - */ + /** + * Access control definition for this enviroment + * @return AccessControlInner[] + */ public function getAccess(): array { return $this->access; } - /** - * Subscription - */ + /** + * Subscription + */ public function getSubscription(): Subscription1 { return $this->subscription; } - /** - * The services - * @return ServicesValue[] - */ + /** + * The services + * @return ServicesValue[] + */ public function getServices(): array { return $this->services; } - /** - * The routes - * @return RoutesValue[] - */ + /** + * The routes + * @return RoutesValue[] + */ public function getRoutes(): array { return $this->routes; } - /** - * The Web applications - * @return WebApplicationsValue[] - */ + /** + * The Web applications + * @return WebApplicationsValue[] + */ public function getWebapps(): array { return $this->webapps; } - /** - * The workers - * @return WorkersValue[] - */ + /** + * The workers + * @return WorkersValue[] + */ public function getWorkers(): array { return $this->workers; @@ -215,35 +217,36 @@ public function getContainerProfiles(): array return $this->containerProfiles; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getTasks(): string { return $this->tasks; } - /** - * The creation date of the deployment - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date of the deployment + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date of the deployment - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date of the deployment + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The fingerprint of the deployment - */ + /** + * The fingerprint of the deployment + */ public function getFingerprint(): ?string { return $this->fingerprint; } } + diff --git a/src/Model/DeploymentHostsInner.php b/src/Model/DeploymentHostsInner.php index 57381ff4e..3b1da943e 100644 --- a/src/Model/DeploymentHostsInner.php +++ b/src/Model/DeploymentHostsInner.php @@ -13,6 +13,7 @@ */ final class DeploymentHostsInner implements Model, JsonSerializable { + public const TYPE_CORE = 'core'; public const TYPE_SATELLITE = 'satellite'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -57,3 +59,4 @@ public function getServices(): ?array return $this->services; } } + diff --git a/src/Model/DeploymentState.php b/src/Model/DeploymentState.php index 7a2609f42..8b1d4309f 100644 --- a/src/Model/DeploymentState.php +++ b/src/Model/DeploymentState.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class DeploymentState implements Model, JsonSerializable { + public const LAST_DEPLOYMENT_FAILURE_REASON_ERROR = 'error'; public const LAST_DEPLOYMENT_FAILURE_REASON_SHELL = 'shell'; @@ -24,13 +24,14 @@ public function __construct( private readonly array $lastDeploymentCommands, private readonly CronsDeploymentState $crons, private readonly ?string $lastDeploymentFailureReason, - private readonly ?DateTime $lastDeploymentAt, - private readonly ?DateTime $lastAutoscaleUpAt, - private readonly ?DateTime $lastAutoscaleDownAt, - private readonly ?DateTime $lastMaintenanceAt, + private readonly ?\DateTime $lastDeploymentAt, + private readonly ?\DateTime $lastAutoscaleUpAt, + private readonly ?\DateTime $lastAutoscaleDownAt, + private readonly ?\DateTime $lastMaintenanceAt, ) { } + public function getModelName(): string { return self::class; @@ -56,76 +57,77 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the last deployment has correctly switched state (does not mean it was successful) - */ + /** + * Whether the last deployment has correctly switched state (does not mean it was successful) + */ public function getLastStateUpdateSuccessful(): bool { return $this->lastStateUpdateSuccessful; } - /** - * Whether the last deployment was successful - */ + /** + * Whether the last deployment was successful + */ public function getLastDeploymentSuccessful(): bool { return $this->lastDeploymentSuccessful; } - /** - * The reason for failure of the last deployment - */ + /** + * The reason for failure of the last deployment + */ public function getLastDeploymentFailureReason(): ?string { return $this->lastDeploymentFailureReason; } - /** - * The commands executed during the last deployment - * @return LastDeploymentCommandsInner[] - */ + /** + * The commands executed during the last deployment + * @return LastDeploymentCommandsInner[] + */ public function getLastDeploymentCommands(): array { return $this->lastDeploymentCommands; } - /** - * Datetime of the last deployment - */ - public function getLastDeploymentAt(): ?DateTime + /** + * Datetime of the last deployment + */ + public function getLastDeploymentAt(): ?\DateTime { return $this->lastDeploymentAt; } - /** - * Datetime of the last autoscale up deployment - */ - public function getLastAutoscaleUpAt(): ?DateTime + /** + * Datetime of the last autoscale up deployment + */ + public function getLastAutoscaleUpAt(): ?\DateTime { return $this->lastAutoscaleUpAt; } - /** - * Datetime of the last autoscale down deployment - */ - public function getLastAutoscaleDownAt(): ?DateTime + /** + * Datetime of the last autoscale down deployment + */ + public function getLastAutoscaleDownAt(): ?\DateTime { return $this->lastAutoscaleDownAt; } - /** - * Datetime of the last maintenance - */ - public function getLastMaintenanceAt(): ?DateTime + /** + * Datetime of the last maintenance + */ + public function getLastMaintenanceAt(): ?\DateTime { return $this->lastMaintenanceAt; } - /** - * The crons deployment state - */ + /** + * The crons deployment state + */ public function getCrons(): CronsDeploymentState { return $this->crons; } } + diff --git a/src/Model/DeploymentTarget.php b/src/Model/DeploymentTarget.php index 91ac3cc14..b9dfbdf84 100644 --- a/src/Model/DeploymentTarget.php +++ b/src/Model/DeploymentTarget.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level DeploymentTarget (auto-generated) * @@ -21,3 +23,4 @@ public function getType(): mixed; public function getName(): mixed; } + diff --git a/src/Model/DeploymentTargetCreateInput.php b/src/Model/DeploymentTargetCreateInput.php index 4678a5ca3..9bb9a2f53 100644 --- a/src/Model/DeploymentTargetCreateInput.php +++ b/src/Model/DeploymentTargetCreateInput.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level DeploymentTargetCreateInput (auto-generated) * @@ -21,3 +23,4 @@ public function getType(): mixed; public function getName(): mixed; } + diff --git a/src/Model/DeploymentTargetPatch.php b/src/Model/DeploymentTargetPatch.php index 6865c5d46..0f2621b98 100644 --- a/src/Model/DeploymentTargetPatch.php +++ b/src/Model/DeploymentTargetPatch.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level DeploymentTargetPatch (auto-generated) * @@ -21,3 +23,4 @@ public function getType(): mixed; public function getName(): mixed; } + diff --git a/src/Model/DevelopmentResources.php b/src/Model/DevelopmentResources.php index 286c490ee..8ed992f34 100644 --- a/src/Model/DevelopmentResources.php +++ b/src/Model/DevelopmentResources.php @@ -14,6 +14,8 @@ */ final class DevelopmentResources implements Model, JsonSerializable { + + public function __construct( private readonly bool $legacyDevelopment, private readonly ?float $maxCpu, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enable legacy development sizing for this environment type - */ + /** + * Enable legacy development sizing for this environment type + */ public function getLegacyDevelopment(): bool { return $this->legacyDevelopment; } - /** - * Maximum number of allocated CPU units - */ + /** + * Maximum number of allocated CPU units + */ public function getMaxCpu(): ?float { return $this->maxCpu; } - /** - * Maximum amount of allocated RAM - */ + /** + * Maximum amount of allocated RAM + */ public function getMaxMemory(): ?int { return $this->maxMemory; } - /** - * Maximum number of environments - */ + /** + * Maximum number of environments + */ public function getMaxEnvironments(): ?int { return $this->maxEnvironments; } } + diff --git a/src/Model/Diff.php b/src/Model/Diff.php index fa844e7df..82795bd98 100644 --- a/src/Model/Diff.php +++ b/src/Model/Diff.php @@ -13,6 +13,8 @@ */ final class Diff implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $diff, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,41 +48,41 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Diff - */ + /** + * The identifier of Diff + */ public function getId(): string { return $this->id; } - /** - * The unified diff between two trees - */ + /** + * The unified diff between two trees + */ public function getDiff(): string { return $this->diff; } - /** - * The new path of the file in the diff - */ + /** + * The new path of the file in the diff + */ public function getNewPath(): ?string { return $this->newPath; } - /** - * The new object ID of the file in the diff - */ + /** + * The new object ID of the file in the diff + */ public function getNewId(): ?string { return $this->newId; } - /** - * The old path of the file in the diff - */ + /** + * The old path of the file in the diff + */ public function getOldPath(): ?string { return $this->oldPath; @@ -90,3 +93,4 @@ public function getOldId(): array return $this->oldId; } } + diff --git a/src/Model/Discount.php b/src/Model/Discount.php index a70c6f7e3..4ad9ec839 100644 --- a/src/Model/Discount.php +++ b/src/Model/Discount.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class Discount implements Model, JsonSerializable { + public const TYPE_ALLOWANCE = 'allowance'; public const TYPE_STARTUP = 'startup'; public const TYPE_ENTERPRISE = 'enterprise'; @@ -26,7 +26,7 @@ final class Discount implements Model, JsonSerializable public function __construct( private readonly ?DiscountCommitment $commitment = null, private readonly ?int $totalMonths = null, - private readonly ?DateTime $endAt = null, + private readonly ?\DateTime $endAt = null, private readonly ?int $id = null, private readonly ?string $organizationId = null, private readonly ?string $type = null, @@ -34,10 +34,11 @@ public function __construct( private readonly ?string $status = null, private readonly ?DiscountDiscount $discount = null, private readonly ?object $config = null, - private readonly ?DateTime $startAt = null, + private readonly ?\DateTime $startAt = null, ) { } + public function getModelName(): string { return self::class; @@ -65,91 +66,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization discount. - */ + /** + * The ID of the organization discount. + */ public function getId(): ?int { return $this->id; } - /** - * The ULID of the organization the discount applies to. - */ + /** + * The ULID of the organization the discount applies to. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The machine name of the discount type. - */ + /** + * The machine name of the discount type. + */ public function getType(): ?string { return $this->type; } - /** - * The label of the discount type. - */ + /** + * The label of the discount type. + */ public function getTypeLabel(): ?string { return $this->typeLabel; } - /** - * The status of the discount. - */ + /** + * The status of the discount. + */ public function getStatus(): ?string { return $this->status; } - /** - * The minimum commitment associated with the discount (if applicable). - */ + /** + * The minimum commitment associated with the discount (if applicable). + */ public function getCommitment(): ?DiscountCommitment { return $this->commitment; } - /** - * The contract length in months (if applicable). - */ + /** + * The contract length in months (if applicable). + */ public function getTotalMonths(): ?int { return $this->totalMonths; } - /** - * Discount value per relevant time periods. - */ + /** + * Discount value per relevant time periods. + */ public function getDiscount(): ?DiscountDiscount { return $this->discount; } - /** - * The discount type specific configuration. - */ + /** + * The discount type specific configuration. + */ public function getConfig(): ?object { return $this->config; } - /** - * The start time of the discount period. - */ - public function getStartAt(): ?DateTime + /** + * The start time of the discount period. + */ + public function getStartAt(): ?\DateTime { return $this->startAt; } - /** - * The end time of the discount period (if applicable). - */ - public function getEndAt(): ?DateTime + /** + * The end time of the discount period (if applicable). + */ + public function getEndAt(): ?\DateTime { return $this->endAt; } } + diff --git a/src/Model/DiscountCommitment.php b/src/Model/DiscountCommitment.php index 9240e6b76..57e387816 100644 --- a/src/Model/DiscountCommitment.php +++ b/src/Model/DiscountCommitment.php @@ -14,6 +14,8 @@ */ final class DiscountCommitment implements Model, JsonSerializable { + + public function __construct( private readonly ?int $months = null, private readonly ?DiscountCommitmentAmount $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Commitment period length in months. - */ + /** + * Commitment period length in months. + */ public function getMonths(): ?int { return $this->months; } - /** - * Commitment amounts. - */ + /** + * Commitment amounts. + */ public function getAmount(): ?DiscountCommitmentAmount { return $this->amount; } - /** - * Net commitment amounts (discount deducted). - */ + /** + * Net commitment amounts (discount deducted). + */ public function getNet(): ?DiscountCommitmentNet { return $this->net; } } + diff --git a/src/Model/DiscountCommitmentAmount.php b/src/Model/DiscountCommitmentAmount.php index ad299c40f..609b28b51 100644 --- a/src/Model/DiscountCommitmentAmount.php +++ b/src/Model/DiscountCommitmentAmount.php @@ -14,6 +14,8 @@ */ final class DiscountCommitmentAmount implements Model, JsonSerializable { + + public function __construct( private readonly ?CurrencyAmount $monthly = null, private readonly ?CurrencyAmount $commitmentPeriod = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getMonthly(): ?CurrencyAmount { return $this->monthly; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getCommitmentPeriod(): ?CurrencyAmount { return $this->commitmentPeriod; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getContractTotal(): ?CurrencyAmount { return $this->contractTotal; } } + diff --git a/src/Model/DiscountCommitmentNet.php b/src/Model/DiscountCommitmentNet.php index b839acc76..65dfe4288 100644 --- a/src/Model/DiscountCommitmentNet.php +++ b/src/Model/DiscountCommitmentNet.php @@ -14,6 +14,8 @@ */ final class DiscountCommitmentNet implements Model, JsonSerializable { + + public function __construct( private readonly ?CurrencyAmount $monthly = null, private readonly ?CurrencyAmount $commitmentPeriod = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getMonthly(): ?CurrencyAmount { return $this->monthly; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getCommitmentPeriod(): ?CurrencyAmount { return $this->commitmentPeriod; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getContractTotal(): ?CurrencyAmount { return $this->contractTotal; } } + diff --git a/src/Model/DiscountDiscount.php b/src/Model/DiscountDiscount.php index fa97a2803..64b7d9b3a 100644 --- a/src/Model/DiscountDiscount.php +++ b/src/Model/DiscountDiscount.php @@ -14,6 +14,8 @@ */ final class DiscountDiscount implements Model, JsonSerializable { + + public function __construct( private readonly ?CurrencyAmountNullable $commitmentPeriod = null, private readonly ?CurrencyAmountNullable $contractTotal = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getMonthly(): ?CurrencyAmount { return $this->monthly; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getCommitmentPeriod(): ?CurrencyAmountNullable { return $this->commitmentPeriod; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getContractTotal(): ?CurrencyAmountNullable { return $this->contractTotal; } } + diff --git a/src/Model/DiskResources.php b/src/Model/DiskResources.php index c9be73924..033867bd1 100644 --- a/src/Model/DiskResources.php +++ b/src/Model/DiskResources.php @@ -13,6 +13,8 @@ */ final class DiskResources implements Model, JsonSerializable { + + public function __construct( private readonly ?int $temporary, private readonly ?int $instance, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getStorage(): ?int return $this->storage; } } + diff --git a/src/Model/DiskResources1.php b/src/Model/DiskResources1.php index 7e0161ad2..392d434eb 100644 --- a/src/Model/DiskResources1.php +++ b/src/Model/DiskResources1.php @@ -13,6 +13,8 @@ */ final class DiskResources1 implements Model, JsonSerializable { + + public function __construct( private readonly ?int $temporary, private readonly ?int $instance, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getObject(): ?int return $this->object; } } + diff --git a/src/Model/DiskResources2.php b/src/Model/DiskResources2.php index cba2442be..2ef8d7afb 100644 --- a/src/Model/DiskResources2.php +++ b/src/Model/DiskResources2.php @@ -13,11 +13,14 @@ */ final class DiskResources2 implements Model, JsonSerializable { + + public function __construct( private readonly ?int $object, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getObject(): ?int return $this->object; } } + diff --git a/src/Model/DocrootsValue.php b/src/Model/DocrootsValue.php index 86f2543a4..63a2b765c 100644 --- a/src/Model/DocrootsValue.php +++ b/src/Model/DocrootsValue.php @@ -13,12 +13,15 @@ */ final class DocrootsValue implements Model, JsonSerializable { + + public function __construct( private readonly ?string $activeDocroot, private readonly ?array $docrootVersions, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getDocrootVersions(): ?array return $this->docrootVersions; } } + diff --git a/src/Model/Domain.php b/src/Model/Domain.php index 96fcc3e05..993d1f594 100644 --- a/src/Model/Domain.php +++ b/src/Model/Domain.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level Domain (auto-generated) * @@ -23,3 +25,4 @@ public function getName(): mixed; public function getAttributes(): mixed; } + diff --git a/src/Model/DomainClaim.php b/src/Model/DomainClaim.php index de04bf83d..9c1d22114 100644 --- a/src/Model/DomainClaim.php +++ b/src/Model/DomainClaim.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,15 +13,18 @@ */ final class DomainClaim implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $name, private readonly string $count, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, ) { } + public function getModelName(): string { return self::class; @@ -44,43 +46,44 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of DomainClaim - */ + /** + * The identifier of DomainClaim + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The claimed domain name - */ + /** + * The claimed domain name + */ public function getName(): string { return $this->name; } - /** - * The domain name - */ + /** + * The domain name + */ public function getCount(): string { return $this->count; } } + diff --git a/src/Model/DomainCreateInput.php b/src/Model/DomainCreateInput.php index 6a90a5510..8c52b92f8 100644 --- a/src/Model/DomainCreateInput.php +++ b/src/Model/DomainCreateInput.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level DomainCreateInput (auto-generated) * @@ -19,3 +21,4 @@ public function __toString(): string; public function getName(): mixed; } + diff --git a/src/Model/DomainPatch.php b/src/Model/DomainPatch.php index 6b01b86c5..c4611569c 100644 --- a/src/Model/DomainPatch.php +++ b/src/Model/DomainPatch.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level DomainPatch (auto-generated) * @@ -17,3 +19,4 @@ public function jsonSerialize(): array; public function __toString(): string; } + diff --git a/src/Model/EmailIntegration.php b/src/Model/EmailIntegration.php index 160b17774..91b77919b 100644 --- a/src/Model/EmailIntegration.php +++ b/src/Model/EmailIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level EmailIntegration (auto-generated) @@ -14,17 +14,20 @@ */ final class EmailIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, private readonly array $recipients, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $fromAddress, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -48,41 +51,41 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The email address to use - */ + /** + * The email address to use + */ public function getFromAddress(): ?string { return $this->fromAddress; @@ -93,11 +96,12 @@ public function getRecipients(): array return $this->recipients; } - /** - * The identifier of EmailIntegration - */ + /** + * The identifier of EmailIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/EmailIntegrationCreateInput.php b/src/Model/EmailIntegrationCreateInput.php index a0b77ec4e..70c9006e9 100644 --- a/src/Model/EmailIntegrationCreateInput.php +++ b/src/Model/EmailIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level EmailIntegrationCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class EmailIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly array $recipients, @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,9 +43,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -52,11 +56,12 @@ public function getRecipients(): array return $this->recipients; } - /** - * The email address to use - */ + /** + * The email address to use + */ public function getFromAddress(): ?string { return $this->fromAddress; } } + diff --git a/src/Model/EmailIntegrationPatch.php b/src/Model/EmailIntegrationPatch.php index 335dd3372..503699775 100644 --- a/src/Model/EmailIntegrationPatch.php +++ b/src/Model/EmailIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level EmailIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class EmailIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly array $recipients, @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,9 +43,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -52,11 +56,12 @@ public function getRecipients(): array return $this->recipients; } - /** - * The email address to use - */ + /** + * The email address to use + */ public function getFromAddress(): ?string { return $this->fromAddress; } } + diff --git a/src/Model/EnterpriseDeploymentTarget.php b/src/Model/EnterpriseDeploymentTarget.php index ad573d7a3..42c631355 100644 --- a/src/Model/EnterpriseDeploymentTarget.php +++ b/src/Model/EnterpriseDeploymentTarget.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTarget; /** * Low level EnterpriseDeploymentTarget (auto-generated) @@ -13,6 +14,7 @@ */ final class EnterpriseDeploymentTarget implements Model, JsonSerializable, DeploymentTarget { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -31,6 +33,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -56,42 +59,42 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The host to deploy to - */ + /** + * The host to deploy to + */ public function getDeployHost(): ?string { return $this->deployHost; } - /** - * Mapping of clusters to Enterprise applications - * @return DocrootsValue[] - */ + /** + * Mapping of clusters to Enterprise applications + * @return DocrootsValue[] + */ public function getDocroots(): array { return $this->docroots; } - /** - * List of URLs of the site - */ + /** + * List of URLs of the site + */ public function getSiteUrls(): object { return $this->siteUrls; @@ -102,27 +105,28 @@ public function getSshHosts(): array return $this->sshHosts; } - /** - * Whether to perform deployments or not - */ + /** + * Whether to perform deployments or not + */ public function getMaintenanceMode(): bool { return $this->maintenanceMode; } - /** - * The identifier of EnterpriseDeploymentTarget - */ + /** + * The identifier of EnterpriseDeploymentTarget + */ public function getId(): ?string { return $this->id; } - /** - * Mapping of clusters to Enterprise applications - */ + /** + * Mapping of clusters to Enterprise applications + */ public function getEnterpriseEnvironmentsMapping(): ?object { return $this->enterpriseEnvironmentsMapping; } } + diff --git a/src/Model/EnterpriseDeploymentTargetCreateInput.php b/src/Model/EnterpriseDeploymentTargetCreateInput.php index 1a321b4c4..8ffe1ee7a 100644 --- a/src/Model/EnterpriseDeploymentTargetCreateInput.php +++ b/src/Model/EnterpriseDeploymentTargetCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetCreateInput; /** * Low level EnterpriseDeploymentTargetCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class EnterpriseDeploymentTargetCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -48,25 +51,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * List of URLs of the site - */ + /** + * List of URLs of the site + */ public function getSiteUrls(): ?object { return $this->siteUrls; @@ -77,11 +80,12 @@ public function getSshHosts(): ?array return $this->sshHosts; } - /** - * Mapping of clusters to Enterprise applications - */ + /** + * Mapping of clusters to Enterprise applications + */ public function getEnterpriseEnvironmentsMapping(): ?object { return $this->enterpriseEnvironmentsMapping; } } + diff --git a/src/Model/EnterpriseDeploymentTargetPatch.php b/src/Model/EnterpriseDeploymentTargetPatch.php index c16d823e8..432c34d07 100644 --- a/src/Model/EnterpriseDeploymentTargetPatch.php +++ b/src/Model/EnterpriseDeploymentTargetPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetPatch; /** * Low level EnterpriseDeploymentTargetPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class EnterpriseDeploymentTargetPatch implements Model, JsonSerializable, DeploymentTargetPatch { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -48,25 +51,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * List of URLs of the site - */ + /** + * List of URLs of the site + */ public function getSiteUrls(): ?object { return $this->siteUrls; @@ -77,11 +80,12 @@ public function getSshHosts(): ?array return $this->sshHosts; } - /** - * Mapping of clusters to Enterprise applications - */ + /** + * Mapping of clusters to Enterprise applications + */ public function getEnterpriseEnvironmentsMapping(): ?object { return $this->enterpriseEnvironmentsMapping; } } + diff --git a/src/Model/Environment.php b/src/Model/Environment.php index e4fd32d6f..2ebb7183e 100644 --- a/src/Model/Environment.php +++ b/src/Model/Environment.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class Environment implements Model, JsonSerializable { + public const TYPE_DEVELOPMENT = 'development'; public const TYPE_PRODUCTION = 'production'; public const TYPE_STAGING = 'staging'; @@ -50,20 +50,21 @@ public function __construct( private readonly MergeInfo $mergeInfo, private readonly bool $hasDeployment, private readonly bool $supportsRestrictRobots, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $parent, private readonly ?string $defaultDomain, private readonly ?string $deploymentTarget, private readonly ?DeploymentState $deploymentState, private readonly ?Sizing $sizing, private readonly ?int $maxInstanceCount, - private readonly ?DateTime $lastActiveAt, - private readonly ?DateTime $lastBackupAt, + private readonly ?\DateTime $lastActiveAt, + private readonly ?\DateTime $lastBackupAt, private readonly ?string $headCommit, ) { } + public function getModelName(): string { return self::class; @@ -117,49 +118,49 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Environment - */ + /** + * The identifier of Environment + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The name of the environment - */ + /** + * The name of the environment + */ public function getName(): string { return $this->name; } - /** - * The machine name for the environment - */ + /** + * The machine name for the environment + */ public function getMachineName(): string { return $this->machineName; } - /** - * The title of the environment - */ + /** + * The title of the environment + */ public function getTitle(): string { return $this->title; @@ -170,244 +171,245 @@ public function getAttributes(): array return $this->attributes; } - /** - * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated - */ + /** + * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated + */ public function getType(): string { return $this->type; } - /** - * The name of the parent environment - */ + /** + * The name of the parent environment + */ public function getParent(): ?string { return $this->parent; } - /** - * The default domain - */ + /** + * The default domain + */ public function getDefaultDomain(): ?string { return $this->defaultDomain; } - /** - * Whether the environment has domains - */ + /** + * Whether the environment has domains + */ public function getHasDomains(): bool { return $this->hasDomains; } - /** - * Clone data when creating that environment - */ + /** + * Clone data when creating that environment + */ public function getCloneParentOnCreate(): bool { return $this->cloneParentOnCreate; } - /** - * Deployment target of the environment - */ + /** + * Deployment target of the environment + */ public function getDeploymentTarget(): ?string { return $this->deploymentTarget; } - /** - * Is this environment a pull request / merge request - */ + /** + * Is this environment a pull request / merge request + */ public function getIsPr(): bool { return $this->isPr; } - /** - * Does this environment have a remote repository - */ + /** + * Does this environment have a remote repository + */ public function getHasRemote(): bool { return $this->hasRemote; } - /** - * The status of the environment - */ + /** + * The status of the environment + */ public function getStatus(): string { return $this->status; } - /** - * The Http access permissions for this environment - */ + /** + * The Http access permissions for this environment + */ public function getHttpAccess(): HttpAccessPermissions1 { return $this->httpAccess; } - /** - * Whether to configure SMTP for this environment - */ + /** + * Whether to configure SMTP for this environment + */ public function getEnableSmtp(): bool { return $this->enableSmtp; } - /** - * Whether to restrict robots for this environment - */ + /** + * Whether to restrict robots for this environment + */ public function getRestrictRobots(): bool { return $this->restrictRobots; } - /** - * The hostname to use as the CNAME - */ + /** + * The hostname to use as the CNAME + */ public function getEdgeHostname(): string { return $this->edgeHostname; } - /** - * The environment deployment state - */ + /** + * The environment deployment state + */ public function getDeploymentState(): ?DeploymentState { return $this->deploymentState; } - /** - * The environment sizing configuration - */ + /** + * The environment sizing configuration + */ public function getSizing(): ?Sizing { return $this->sizing; } - /** - * Resources overrides - * @return ResourcesOverridesValue[] - */ + /** + * Resources overrides + * @return ResourcesOverridesValue[] + */ public function getResourcesOverrides(): array { return $this->resourcesOverrides; } - /** - * Max number of instances for this environment - */ + /** + * Max number of instances for this environment + */ public function getMaxInstanceCount(): ?int { return $this->maxInstanceCount; } - /** - * Last activity date - */ - public function getLastActiveAt(): ?DateTime + /** + * Last activity date + */ + public function getLastActiveAt(): ?\DateTime { return $this->lastActiveAt; } - /** - * Last backup date - */ - public function getLastBackupAt(): ?DateTime + /** + * Last backup date + */ + public function getLastBackupAt(): ?\DateTime { return $this->lastBackupAt; } - /** - * The project the environment belongs to - */ + /** + * The project the environment belongs to + */ public function getProject(): string { return $this->project; } - /** - * Is this environment the main environment - */ + /** + * Is this environment the main environment + */ public function getIsMain(): bool { return $this->isMain; } - /** - * Is there any pending activity on this environment - */ + /** + * Is there any pending activity on this environment + */ public function getIsDirty(): bool { return $this->isDirty; } - /** - * Is there any staged activity on this environment - */ + /** + * Is there any staged activity on this environment + */ public function getHasStagedActivities(): bool { return $this->hasStagedActivities; } - /** - * If the environment has rolling deployments ready for use - */ + /** + * If the environment has rolling deployments ready for use + */ public function getCanRollingDeploy(): bool { return $this->canRollingDeploy; } - /** - * If the environment supports rolling deployments - */ + /** + * If the environment supports rolling deployments + */ public function getSupportsRollingDeployments(): bool { return $this->supportsRollingDeployments; } - /** - * Does this environment have code - */ + /** + * Does this environment have code + */ public function getHasCode(): bool { return $this->hasCode; } - /** - * The SHA of the head commit for this environment - */ + /** + * The SHA of the head commit for this environment + */ public function getHeadCommit(): ?string { return $this->headCommit; } - /** - * The commit distance info between parent and child environments - */ + /** + * The commit distance info between parent and child environments + */ public function getMergeInfo(): MergeInfo { return $this->mergeInfo; } - /** - * Whether this environment had a successful deployment - */ + /** + * Whether this environment had a successful deployment + */ public function getHasDeployment(): bool { return $this->hasDeployment; } - /** - * Does this environment support configuring restrict_robots - */ + /** + * Does this environment support configuring restrict_robots + */ public function getSupportsRestrictRobots(): bool { return $this->supportsRestrictRobots; } } + diff --git a/src/Model/EnvironmentActivateInput.php b/src/Model/EnvironmentActivateInput.php index e28b3994b..875dd4097 100644 --- a/src/Model/EnvironmentActivateInput.php +++ b/src/Model/EnvironmentActivateInput.php @@ -13,11 +13,14 @@ */ final class EnvironmentActivateInput implements Model, JsonSerializable { + + public function __construct( private readonly ?Resources4 $resources = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getResources(): ?Resources4 return $this->resources; } } + diff --git a/src/Model/EnvironmentBackupInput.php b/src/Model/EnvironmentBackupInput.php index 34d8a00d4..3f265b443 100644 --- a/src/Model/EnvironmentBackupInput.php +++ b/src/Model/EnvironmentBackupInput.php @@ -13,11 +13,14 @@ */ final class EnvironmentBackupInput implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $safe = null, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Take a safe or a live backup - */ + /** + * Take a safe or a live backup + */ public function getSafe(): ?bool { return $this->safe; } } + diff --git a/src/Model/EnvironmentBranchInput.php b/src/Model/EnvironmentBranchInput.php index 657dfa0cc..fad8af765 100644 --- a/src/Model/EnvironmentBranchInput.php +++ b/src/Model/EnvironmentBranchInput.php @@ -13,6 +13,7 @@ */ final class EnvironmentBranchInput implements Model, JsonSerializable { + public const TYPE_DEVELOPMENT = 'development'; public const TYPE_STAGING = 'staging'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -56,17 +58,17 @@ public function getName(): string return $this->name; } - /** - * Clone data from the parent environment - */ + /** + * Clone data from the parent environment + */ public function getCloneParent(): ?bool { return $this->cloneParent; } - /** - * The type of environment (`staging` or `development`) - */ + /** + * The type of environment (`staging` or `development`) + */ public function getType(): ?string { return $this->type; @@ -77,3 +79,4 @@ public function getResources(): ?Resources5 return $this->resources; } } + diff --git a/src/Model/EnvironmentDeployInput.php b/src/Model/EnvironmentDeployInput.php index 29ccc5c13..6beddedcb 100644 --- a/src/Model/EnvironmentDeployInput.php +++ b/src/Model/EnvironmentDeployInput.php @@ -13,6 +13,7 @@ */ final class EnvironmentDeployInput implements Model, JsonSerializable { + public const STRATEGY_ROLLING = 'rolling'; public const STRATEGY_STOPSTART = 'stopstart'; @@ -21,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -38,11 +40,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The deployment strategy (`rolling` or `stopstart`) - */ + /** + * The deployment strategy (`rolling` or `stopstart`) + */ public function getStrategy(): ?string { return $this->strategy; } } + diff --git a/src/Model/EnvironmentInfo.php b/src/Model/EnvironmentInfo.php index 70a7821af..9af354c73 100644 --- a/src/Model/EnvironmentInfo.php +++ b/src/Model/EnvironmentInfo.php @@ -14,6 +14,8 @@ */ final class EnvironmentInfo implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly string $status, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,65 +55,65 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The machine name of the environment - */ + /** + * The machine name of the environment + */ public function getName(): string { return $this->name; } - /** - * The enviroment status - */ + /** + * The enviroment status + */ public function getStatus(): string { return $this->status; } - /** - * Is this environment the main environment - */ + /** + * Is this environment the main environment + */ public function getIsMain(): bool { return $this->isMain; } - /** - * Is this environment a production environment - */ + /** + * Is this environment a production environment + */ public function getIsProduction(): bool { return $this->isProduction; } - /** - * Constraints of the environment's deployment - */ + /** + * Constraints of the environment's deployment + */ public function getConstraints(): object { return $this->constraints; } - /** - * The reference in Git for this environment - */ + /** + * The reference in Git for this environment + */ public function getReference(): string { return $this->reference; } - /** - * The machine name of the environment - */ + /** + * The machine name of the environment + */ public function getMachineName(): string { return $this->machineName; } - /** - * The type of environment (Production, Staging or Development) - */ + /** + * The type of environment (Production, Staging or Development) + */ public function getEnvironmentType(): string { return $this->environmentType; @@ -121,3 +124,4 @@ public function getLinks(): object return $this->links; } } + diff --git a/src/Model/EnvironmentInitializeInput.php b/src/Model/EnvironmentInitializeInput.php index ab56721c7..54fe1cb51 100644 --- a/src/Model/EnvironmentInitializeInput.php +++ b/src/Model/EnvironmentInitializeInput.php @@ -13,6 +13,8 @@ */ final class EnvironmentInitializeInput implements Model, JsonSerializable { + + public function __construct( private readonly string $profile, private readonly string $repository, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -43,34 +46,34 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the profile to show in the UI - */ + /** + * Name of the profile to show in the UI + */ public function getProfile(): string { return $this->profile; } - /** - * Repository to clone from - */ + /** + * Repository to clone from + */ public function getRepository(): string { return $this->repository; } - /** - * Repository to clone the configuration files from - */ + /** + * Repository to clone the configuration files from + */ public function getConfig(): ?string { return $this->config; } - /** - * A list of files to add to the repository during initialization - * @return FilesInner[]|null - */ + /** + * A list of files to add to the repository during initialization + * @return FilesInner[]|null + */ public function getFiles(): ?array { return $this->files; @@ -81,3 +84,4 @@ public function getResources(): ?Resources6 return $this->resources; } } + diff --git a/src/Model/EnvironmentMergeInput.php b/src/Model/EnvironmentMergeInput.php index e08e76815..e28e196d0 100644 --- a/src/Model/EnvironmentMergeInput.php +++ b/src/Model/EnvironmentMergeInput.php @@ -13,11 +13,14 @@ */ final class EnvironmentMergeInput implements Model, JsonSerializable { + + public function __construct( private readonly ?Resources7 $resources = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getResources(): ?Resources7 return $this->resources; } } + diff --git a/src/Model/EnvironmentOperationInput.php b/src/Model/EnvironmentOperationInput.php index 2e857696b..3e0aefa00 100644 --- a/src/Model/EnvironmentOperationInput.php +++ b/src/Model/EnvironmentOperationInput.php @@ -13,6 +13,8 @@ */ final class EnvironmentOperationInput implements Model, JsonSerializable { + + public function __construct( private readonly string $service, private readonly string $operation, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,17 +42,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the application or worker to run the operation on - */ + /** + * The name of the application or worker to run the operation on + */ public function getService(): string { return $this->service; } - /** - * The name of the operation - */ + /** + * The name of the operation + */ public function getOperation(): string { return $this->operation; @@ -60,3 +63,4 @@ public function getParameters(): ?array return $this->parameters; } } + diff --git a/src/Model/EnvironmentPatch.php b/src/Model/EnvironmentPatch.php index 248904180..de54ba0ca 100644 --- a/src/Model/EnvironmentPatch.php +++ b/src/Model/EnvironmentPatch.php @@ -13,6 +13,7 @@ */ final class EnvironmentPatch implements Model, JsonSerializable { + public const TYPE_DEVELOPMENT = 'development'; public const TYPE_PRODUCTION = 'production'; public const TYPE_STAGING = 'staging'; @@ -30,6 +31,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -55,17 +57,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the environment - */ + /** + * The name of the environment + */ public function getName(): ?string { return $this->name; } - /** - * The title of the environment - */ + /** + * The title of the environment + */ public function getTitle(): ?string { return $this->title; @@ -76,51 +78,52 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated - */ + /** + * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated + */ public function getType(): ?string { return $this->type; } - /** - * The name of the parent environment - */ + /** + * The name of the parent environment + */ public function getParent(): ?string { return $this->parent; } - /** - * Clone data when creating that environment - */ + /** + * Clone data when creating that environment + */ public function getCloneParentOnCreate(): ?bool { return $this->cloneParentOnCreate; } - /** - * The Http access permissions for this environment - */ + /** + * The Http access permissions for this environment + */ public function getHttpAccess(): ?HttpAccessPermissions2 { return $this->httpAccess; } - /** - * Whether to configure SMTP for this environment - */ + /** + * Whether to configure SMTP for this environment + */ public function getEnableSmtp(): ?bool { return $this->enableSmtp; } - /** - * Whether to restrict robots for this environment - */ + /** + * Whether to restrict robots for this environment + */ public function getRestrictRobots(): ?bool { return $this->restrictRobots; } } + diff --git a/src/Model/EnvironmentRestoreInput.php b/src/Model/EnvironmentRestoreInput.php index 53f7c55ae..a7ebef9b3 100644 --- a/src/Model/EnvironmentRestoreInput.php +++ b/src/Model/EnvironmentRestoreInput.php @@ -13,6 +13,8 @@ */ final class EnvironmentRestoreInput implements Model, JsonSerializable { + + public function __construct( private readonly ?string $environmentName = null, private readonly ?string $branchFrom = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -53,17 +56,17 @@ public function getBranchFrom(): ?string return $this->branchFrom; } - /** - * Whether we should restore the code or only the data - */ + /** + * Whether we should restore the code or only the data + */ public function getRestoreCode(): ?bool { return $this->restoreCode; } - /** - * Whether we should restore resources configuration from the backup - */ + /** + * Whether we should restore resources configuration from the backup + */ public function getRestoreResources(): ?bool { return $this->restoreResources; @@ -74,3 +77,4 @@ public function getResources(): ?Resources8 return $this->resources; } } + diff --git a/src/Model/EnvironmentSourceOperation.php b/src/Model/EnvironmentSourceOperation.php index 9b6865afc..064a6a91e 100644 --- a/src/Model/EnvironmentSourceOperation.php +++ b/src/Model/EnvironmentSourceOperation.php @@ -13,6 +13,8 @@ */ final class EnvironmentSourceOperation implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $app, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,35 +44,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of EnvironmentSourceOperation - */ + /** + * The identifier of EnvironmentSourceOperation + */ public function getId(): string { return $this->id; } - /** - * The name of the application - */ + /** + * The name of the application + */ public function getApp(): string { return $this->app; } - /** - * The name of the source operation - */ + /** + * The name of the source operation + */ public function getOperation(): string { return $this->operation; } - /** - * The command that will be triggered - */ + /** + * The command that will be triggered + */ public function getCommand(): string { return $this->command; } } + diff --git a/src/Model/EnvironmentSourceOperationInput.php b/src/Model/EnvironmentSourceOperationInput.php index 8a6030585..01a49cb0d 100644 --- a/src/Model/EnvironmentSourceOperationInput.php +++ b/src/Model/EnvironmentSourceOperationInput.php @@ -13,12 +13,15 @@ */ final class EnvironmentSourceOperationInput implements Model, JsonSerializable { + + public function __construct( private readonly string $operation, private readonly ?array $variables = [], ) { } + public function getModelName(): string { return self::class; @@ -37,9 +40,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the operation to execute - */ + /** + * The name of the operation to execute + */ public function getOperation(): string { return $this->operation; @@ -50,3 +53,4 @@ public function getVariables(): ?array return $this->variables; } } + diff --git a/src/Model/EnvironmentSynchronizeInput.php b/src/Model/EnvironmentSynchronizeInput.php index f1f98c2ec..a4562b8ff 100644 --- a/src/Model/EnvironmentSynchronizeInput.php +++ b/src/Model/EnvironmentSynchronizeInput.php @@ -13,6 +13,8 @@ */ final class EnvironmentSynchronizeInput implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $synchronizeCode = null, private readonly ?bool $rebase = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,35 +44,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Synchronize code? - */ + /** + * Synchronize code? + */ public function getSynchronizeCode(): ?bool { return $this->synchronizeCode; } - /** - * Synchronize code by rebasing instead of merging - */ + /** + * Synchronize code by rebasing instead of merging + */ public function getRebase(): ?bool { return $this->rebase; } - /** - * Synchronize data? - */ + /** + * Synchronize data? + */ public function getSynchronizeData(): ?bool { return $this->synchronizeData; } - /** - * Synchronize resources? - */ + /** + * Synchronize resources? + */ public function getSynchronizeResources(): ?bool { return $this->synchronizeResources; } } + diff --git a/src/Model/EnvironmentType.php b/src/Model/EnvironmentType.php index 7251a81bd..2dccd5fbc 100644 --- a/src/Model/EnvironmentType.php +++ b/src/Model/EnvironmentType.php @@ -13,12 +13,15 @@ */ final class EnvironmentType implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly array $attributes, ) { } + public function getModelName(): string { return self::class; @@ -37,9 +40,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of EnvironmentType - */ + /** + * The identifier of EnvironmentType + */ public function getId(): string { return $this->id; @@ -50,3 +53,4 @@ public function getAttributes(): array return $this->attributes; } } + diff --git a/src/Model/EnvironmentVariable.php b/src/Model/EnvironmentVariable.php index 9a70ebff2..4b02bb489 100644 --- a/src/Model/EnvironmentVariable.php +++ b/src/Model/EnvironmentVariable.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class EnvironmentVariable implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $name, @@ -28,12 +29,13 @@ public function __construct( private readonly bool $inherited, private readonly bool $isEnabled, private readonly bool $isInheritable, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $value = null, ) { } + public function getModelName(): string { return self::class; @@ -66,33 +68,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of EnvironmentVariable - */ + /** + * The identifier of EnvironmentVariable + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; @@ -103,33 +105,33 @@ public function getAttributes(): array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): bool { return $this->visibleRuntime; @@ -140,51 +142,52 @@ public function getApplicationScope(): array return $this->applicationScope; } - /** - * The name of the project - */ + /** + * The name of the project + */ public function getProject(): string { return $this->project; } - /** - * The name of the environment - */ + /** + * The name of the environment + */ public function getEnvironment(): string { return $this->environment; } - /** - * The variable is inherited from a parent environment - */ + /** + * The variable is inherited from a parent environment + */ public function getInherited(): bool { return $this->inherited; } - /** - * The variable is enabled on this environment - */ + /** + * The variable is enabled on this environment + */ public function getIsEnabled(): bool { return $this->isEnabled; } - /** - * The variable is inheritable to child environments - */ + /** + * The variable is inheritable to child environments + */ public function getIsInheritable(): bool { return $this->isInheritable; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } } + diff --git a/src/Model/EnvironmentVariableCreateInput.php b/src/Model/EnvironmentVariableCreateInput.php index 4d4c712eb..412af52fd 100644 --- a/src/Model/EnvironmentVariableCreateInput.php +++ b/src/Model/EnvironmentVariableCreateInput.php @@ -13,6 +13,8 @@ */ final class EnvironmentVariableCreateInput implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly string $value, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -53,17 +56,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): string { return $this->value; @@ -74,33 +77,33 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -111,19 +114,20 @@ public function getApplicationScope(): ?array return $this->applicationScope; } - /** - * The variable is enabled on this environment - */ + /** + * The variable is enabled on this environment + */ public function getIsEnabled(): ?bool { return $this->isEnabled; } - /** - * The variable is inheritable to child environments - */ + /** + * The variable is inheritable to child environments + */ public function getIsInheritable(): ?bool { return $this->isInheritable; } } + diff --git a/src/Model/EnvironmentVariablePatch.php b/src/Model/EnvironmentVariablePatch.php index 9e2a3a4f4..8e9f4fe85 100644 --- a/src/Model/EnvironmentVariablePatch.php +++ b/src/Model/EnvironmentVariablePatch.php @@ -13,6 +13,8 @@ */ final class EnvironmentVariablePatch implements Model, JsonSerializable { + + public function __construct( private readonly ?string $name = null, private readonly ?array $attributes = [], @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -53,9 +56,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): ?string { return $this->name; @@ -66,41 +69,41 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -111,19 +114,20 @@ public function getApplicationScope(): ?array return $this->applicationScope; } - /** - * The variable is enabled on this environment - */ + /** + * The variable is enabled on this environment + */ public function getIsEnabled(): ?bool { return $this->isEnabled; } - /** - * The variable is inheritable to child environments - */ + /** + * The variable is inheritable to child environments + */ public function getIsInheritable(): ?bool { return $this->isInheritable; } } + diff --git a/src/Model/EnvironmentVariablesInner.php b/src/Model/EnvironmentVariablesInner.php index 21a6e4d0b..eba218706 100644 --- a/src/Model/EnvironmentVariablesInner.php +++ b/src/Model/EnvironmentVariablesInner.php @@ -13,6 +13,8 @@ */ final class EnvironmentVariablesInner implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly bool $isSensitive, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function getValue(): ?string return $this->value; } } + diff --git a/src/Model/EnvironmentsCredentialsValue.php b/src/Model/EnvironmentsCredentialsValue.php index 72ebfc2be..9440035be 100644 --- a/src/Model/EnvironmentsCredentialsValue.php +++ b/src/Model/EnvironmentsCredentialsValue.php @@ -13,12 +13,15 @@ */ final class EnvironmentsCredentialsValue implements Model, JsonSerializable { + + public function __construct( private readonly string $serverUuid, private readonly string $serverToken, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getServerToken(): string return $this->serverToken; } } + diff --git a/src/Model/Error.php b/src/Model/Error.php index c606a71f7..c2f6e3eef 100644 --- a/src/Model/Error.php +++ b/src/Model/Error.php @@ -13,11 +13,14 @@ */ final class Error implements Model, JsonSerializable { + + public function __construct( private readonly string $error, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Error message - */ + /** + * Error message + */ public function getError(): string { return $this->error; } } + diff --git a/src/Model/EstimationObject.php b/src/Model/EstimationObject.php index 5bdf976cb..27154953f 100644 --- a/src/Model/EstimationObject.php +++ b/src/Model/EstimationObject.php @@ -14,6 +14,8 @@ */ final class EstimationObject implements Model, JsonSerializable { + + public function __construct( private readonly ?string $plan = null, private readonly ?string $userLicenses = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The monthly price of the plan. - */ + /** + * The monthly price of the plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * The monthly price of the user licenses. - */ + /** + * The monthly price of the user licenses. + */ public function getUserLicenses(): ?string { return $this->userLicenses; } - /** - * The monthly price of the environments. - */ + /** + * The monthly price of the environments. + */ public function getEnvironments(): ?string { return $this->environments; } - /** - * The monthly price of the storage. - */ + /** + * The monthly price of the storage. + */ public function getStorage(): ?string { return $this->storage; } - /** - * The total monthly price. - */ + /** + * The total monthly price. + */ public function getTotal(): ?string { return $this->total; } - /** - * The unit prices of the options. - */ + /** + * The unit prices of the options. + */ public function getOptions(): ?object { return $this->options; } } + diff --git a/src/Model/FastlyCDN.php b/src/Model/FastlyCDN.php index 41856ef7c..7d3dc291e 100644 --- a/src/Model/FastlyCDN.php +++ b/src/Model/FastlyCDN.php @@ -14,12 +14,15 @@ */ final class FastlyCDN implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/FastlyIntegration.php b/src/Model/FastlyIntegration.php index dcfc0d60d..7571966fe 100644 --- a/src/Model/FastlyIntegration.php +++ b/src/Model/FastlyIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level FastlyIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class FastlyIntegration implements Model, JsonSerializable, Integration { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -28,12 +29,13 @@ public function __construct( private readonly string $result, private readonly string $serviceId, private readonly bool $tlsCertificates, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -62,33 +64,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -114,35 +116,36 @@ public function getStates(): array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): string { return $this->result; } - /** - * The Fastly Service ID - */ + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; } - /** - * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions - */ + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ public function getTlsCertificates(): bool { return $this->tlsCertificates; } - /** - * The identifier of FastlyIntegration - */ + /** + * The identifier of FastlyIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/FastlyIntegrationCreateInput.php b/src/Model/FastlyIntegrationCreateInput.php index 7af22c2b7..dcb82f805 100644 --- a/src/Model/FastlyIntegrationCreateInput.php +++ b/src/Model/FastlyIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level FastlyIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class FastlyIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -30,6 +32,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -55,25 +58,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * Fastly API Token - */ + /** + * Fastly API Token + */ public function getToken(): string { return $this->token; } - /** - * The Fastly Service ID - */ + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; @@ -99,19 +102,20 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions - */ + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ public function getTlsCertificates(): ?bool { return $this->tlsCertificates; } } + diff --git a/src/Model/FastlyIntegrationPatch.php b/src/Model/FastlyIntegrationPatch.php index 5a86b8411..7323dd6f9 100644 --- a/src/Model/FastlyIntegrationPatch.php +++ b/src/Model/FastlyIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level FastlyIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class FastlyIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -30,6 +32,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -55,25 +58,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * Fastly API Token - */ + /** + * Fastly API Token + */ public function getToken(): string { return $this->token; } - /** - * The Fastly Service ID - */ + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; @@ -99,19 +102,20 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions - */ + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ public function getTlsCertificates(): ?bool { return $this->tlsCertificates; } } + diff --git a/src/Model/FilesInner.php b/src/Model/FilesInner.php index fda068555..539a76d0e 100644 --- a/src/Model/FilesInner.php +++ b/src/Model/FilesInner.php @@ -13,6 +13,8 @@ */ final class FilesInner implements Model, JsonSerializable { + + public function __construct( private readonly string $path, private readonly ?int $mode = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getContents(): ?string return $this->contents; } } + diff --git a/src/Model/FilterSelect.php b/src/Model/FilterSelect.php index 6527a2303..76ca30fc9 100644 --- a/src/Model/FilterSelect.php +++ b/src/Model/FilterSelect.php @@ -13,12 +13,15 @@ */ final class FilterSelect implements Model, JsonSerializable { + + public function __construct( private readonly ?Mode $mode = null, private readonly ?FilterSelectValues $values = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getValues(): ?FilterSelectValues return $this->values; } } + diff --git a/src/Model/FilterSelectValues.php b/src/Model/FilterSelectValues.php index 5bf82fe26..02561c68f 100644 --- a/src/Model/FilterSelectValues.php +++ b/src/Model/FilterSelectValues.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level FilterSelectValues (auto-generated) * @@ -17,3 +19,4 @@ public function jsonSerialize(): array; public function __toString(): string; } + diff --git a/src/Model/Firewall.php b/src/Model/Firewall.php index 4aaa6cf19..384368483 100644 --- a/src/Model/Firewall.php +++ b/src/Model/Firewall.php @@ -13,11 +13,14 @@ */ final class Firewall implements Model, JsonSerializable { + + public function __construct( private readonly ?array $outbound, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return OutboundFirewallRestrictionsInner[]|null - */ + /** + * @return OutboundFirewallRestrictionsInner[]|null + */ public function getOutbound(): ?array { return $this->outbound; } } + diff --git a/src/Model/FoundationDeploymentTarget.php b/src/Model/FoundationDeploymentTarget.php index f78678d78..be657e387 100644 --- a/src/Model/FoundationDeploymentTarget.php +++ b/src/Model/FoundationDeploymentTarget.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTarget; /** * Low level FoundationDeploymentTarget (auto-generated) @@ -13,6 +14,7 @@ */ final class FoundationDeploymentTarget implements Model, JsonSerializable, DeploymentTarget { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -50,54 +53,55 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The hosts of the deployment target - * @return HostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return HostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. - * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as - * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. - */ + /** + * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. + * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as + * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. + */ public function getUseDedicatedGrid(): bool { return $this->useDedicatedGrid; } - /** - * The storage type - */ + /** + * The storage type + */ public function getStorageType(): ?string { return $this->storageType; } - /** - * The identifier of FoundationDeploymentTarget - */ + /** + * The identifier of FoundationDeploymentTarget + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/FoundationDeploymentTargetCreateInput.php b/src/Model/FoundationDeploymentTargetCreateInput.php index 08826e7e1..b079af73f 100644 --- a/src/Model/FoundationDeploymentTargetCreateInput.php +++ b/src/Model/FoundationDeploymentTargetCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetCreateInput; /** * Low level FoundationDeploymentTargetCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class FoundationDeploymentTargetCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -26,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,38 +49,39 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The hosts of the deployment target - * @return DeploymentHostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return DeploymentHostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. - * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as - * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. - */ + /** + * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. + * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as + * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. + */ public function getUseDedicatedGrid(): ?bool { return $this->useDedicatedGrid; } } + diff --git a/src/Model/FoundationDeploymentTargetPatch.php b/src/Model/FoundationDeploymentTargetPatch.php index aeb735215..429c599ae 100644 --- a/src/Model/FoundationDeploymentTargetPatch.php +++ b/src/Model/FoundationDeploymentTargetPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetPatch; /** * Low level FoundationDeploymentTargetPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class FoundationDeploymentTargetPatch implements Model, JsonSerializable, DeploymentTargetPatch { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -26,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,38 +49,39 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The hosts of the deployment target - * @return DeploymentHostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return DeploymentHostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. - * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as - * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. - */ + /** + * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. + * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as + * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. + */ public function getUseDedicatedGrid(): ?bool { return $this->useDedicatedGrid; } } + diff --git a/src/Model/GetAddress200Response.php b/src/Model/GetAddress200Response.php index b0bf5fb5c..fad924af0 100644 --- a/src/Model/GetAddress200Response.php +++ b/src/Model/GetAddress200Response.php @@ -13,6 +13,8 @@ */ final class GetAddress200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?string $country = null, private readonly ?string $nameLine = null, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -55,91 +58,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Two-letter country codes are used to represent countries and states - */ + /** + * Two-letter country codes are used to represent countries and states + */ public function getCountry(): ?string { return $this->country; } - /** - * The full name of the user - */ + /** + * The full name of the user + */ public function getNameLine(): ?string { return $this->nameLine; } - /** - * Premise (i.e. Apt, Suite, Bldg.) - */ + /** + * Premise (i.e. Apt, Suite, Bldg.) + */ public function getPremise(): ?string { return $this->premise; } - /** - * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. - */ + /** + * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. + */ public function getSubPremise(): ?string { return $this->subPremise; } - /** - * The address of the user - */ + /** + * The address of the user + */ public function getThoroughfare(): ?string { return $this->thoroughfare; } - /** - * The administrative area of the user address - */ + /** + * The administrative area of the user address + */ public function getAdministrativeArea(): ?string { return $this->administrativeArea; } - /** - * The sub-administrative area of the user address - */ + /** + * The sub-administrative area of the user address + */ public function getSubAdministrativeArea(): ?string { return $this->subAdministrativeArea; } - /** - * The locality of the user address - */ + /** + * The locality of the user address + */ public function getLocality(): ?string { return $this->locality; } - /** - * The dependant_locality area of the user address - */ + /** + * The dependant_locality area of the user address + */ public function getDependentLocality(): ?string { return $this->dependentLocality; } - /** - * The postal code area of the user address - */ + /** + * The postal code area of the user address + */ public function getPostalCode(): ?string { return $this->postalCode; } - /** - * Address field metadata. - */ + /** + * Address field metadata. + */ public function getMetadata(): ?AddressMetadataMetadata { return $this->metadata; } } + diff --git a/src/Model/GetApplicationFilter200Response.php b/src/Model/GetApplicationFilter200Response.php index d53c64c7f..0ba6e95de 100644 --- a/src/Model/GetApplicationFilter200Response.php +++ b/src/Model/GetApplicationFilter200Response.php @@ -13,12 +13,15 @@ */ final class GetApplicationFilter200Response implements Model, JsonSerializable { + + public function __construct( private readonly array $fields, private readonly int $maxApplicableFilters, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return GetApplicationFilter200ResponseFieldsValue[] - */ + /** + * @return GetApplicationFilter200ResponseFieldsValue[] + */ public function getFields(): array { return $this->fields; @@ -49,3 +52,4 @@ public function getMaxApplicableFilters(): int return $this->maxApplicableFilters; } } + diff --git a/src/Model/GetApplicationFilter200ResponseFieldsValue.php b/src/Model/GetApplicationFilter200ResponseFieldsValue.php index bacc9016d..5dd3448d7 100644 --- a/src/Model/GetApplicationFilter200ResponseFieldsValue.php +++ b/src/Model/GetApplicationFilter200ResponseFieldsValue.php @@ -13,12 +13,15 @@ */ final class GetApplicationFilter200ResponseFieldsValue implements Model, JsonSerializable { + + public function __construct( private readonly int $distinctValues, private readonly array $values, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getDistinctValues(): int return $this->distinctValues; } - /** - * @return GetApplicationFilter200ResponseFieldsValueValuesInner[] - */ + /** + * @return GetApplicationFilter200ResponseFieldsValueValuesInner[] + */ public function getValues(): array { return $this->values; } } + diff --git a/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php b/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php index 1f191386b..f4ee87fd3 100644 --- a/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php +++ b/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php @@ -13,12 +13,15 @@ */ final class GetApplicationFilter200ResponseFieldsValueValuesInner implements Model, JsonSerializable { + + public function __construct( private readonly string $value, private readonly int $count, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getCount(): int return $this->count; } } + diff --git a/src/Model/GetApplicationMerge200Response.php b/src/Model/GetApplicationMerge200Response.php index 11be3c082..b916c5ba4 100644 --- a/src/Model/GetApplicationMerge200Response.php +++ b/src/Model/GetApplicationMerge200Response.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class GetApplicationMerge200Response implements Model, JsonSerializable { + public const _AGGREGATION_TYPE_AVG = 'avg'; public const _AGGREGATION_TYPE_SUM = 'sum'; @@ -28,12 +28,13 @@ public function __construct( private readonly ?array $groups = [], private readonly ?string $aggregationType = null, private readonly ?string $application = null, - private readonly ?DateTime $from = null, - private readonly ?DateTime $to = null, + private readonly ?\DateTime $from = null, + private readonly ?\DateTime $to = null, private readonly ?int $scaleFactor = null, ) { } + public function getModelName(): string { return self::class; @@ -93,9 +94,9 @@ public function getTimeline(): ?GetApplicationMerge200ResponseTimeline return $this->timeline; } - /** - * @return GetApplicationMerge200ResponseGroupsValue[]|null - */ + /** + * @return GetApplicationMerge200ResponseGroupsValue[]|null + */ public function getGroups(): ?array { return $this->groups; @@ -116,12 +117,12 @@ public function getApplication(): ?string return $this->application; } - public function getFrom(): ?DateTime + public function getFrom(): ?\DateTime { return $this->from; } - public function getTo(): ?DateTime + public function getTo(): ?\DateTime { return $this->to; } @@ -131,3 +132,4 @@ public function getScaleFactor(): ?int return $this->scaleFactor; } } + diff --git a/src/Model/GetApplicationMerge200ResponseFlamebearer.php b/src/Model/GetApplicationMerge200ResponseFlamebearer.php index 5b1dce126..0a9896dac 100644 --- a/src/Model/GetApplicationMerge200ResponseFlamebearer.php +++ b/src/Model/GetApplicationMerge200ResponseFlamebearer.php @@ -13,6 +13,8 @@ */ final class GetApplicationMerge200ResponseFlamebearer implements Model, JsonSerializable { + + public function __construct( private readonly array $names, private readonly array $levels, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getMaxSelf(): int return $this->maxSelf; } } + diff --git a/src/Model/GetApplicationMerge200ResponseGroupsValue.php b/src/Model/GetApplicationMerge200ResponseGroupsValue.php index e7f5005e0..47e6d6fc5 100644 --- a/src/Model/GetApplicationMerge200ResponseGroupsValue.php +++ b/src/Model/GetApplicationMerge200ResponseGroupsValue.php @@ -13,6 +13,8 @@ */ final class GetApplicationMerge200ResponseGroupsValue implements Model, JsonSerializable { + + public function __construct( private readonly int $startTime, private readonly array $samples, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getWatermarks(): ?array return $this->watermarks; } } + diff --git a/src/Model/GetApplicationMerge200ResponseHeatmap.php b/src/Model/GetApplicationMerge200ResponseHeatmap.php index f70d59824..abe37614d 100644 --- a/src/Model/GetApplicationMerge200ResponseHeatmap.php +++ b/src/Model/GetApplicationMerge200ResponseHeatmap.php @@ -13,6 +13,8 @@ */ final class GetApplicationMerge200ResponseHeatmap implements Model, JsonSerializable { + + public function __construct( private readonly array $values, private readonly int $timeBuckets, @@ -26,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -96,3 +99,4 @@ public function getMaxDepth(): int return $this->maxDepth; } } + diff --git a/src/Model/GetApplicationMerge200ResponseMetadata.php b/src/Model/GetApplicationMerge200ResponseMetadata.php index dd3d9c2ae..fc5b2418f 100644 --- a/src/Model/GetApplicationMerge200ResponseMetadata.php +++ b/src/Model/GetApplicationMerge200ResponseMetadata.php @@ -13,6 +13,8 @@ */ final class GetApplicationMerge200ResponseMetadata implements Model, JsonSerializable { + + public function __construct( private readonly string $format, private readonly string $spyName, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -68,3 +71,4 @@ public function getName(): string return $this->name; } } + diff --git a/src/Model/GetApplicationMerge200ResponseTimeline.php b/src/Model/GetApplicationMerge200ResponseTimeline.php index 89b6255a3..45c282fd8 100644 --- a/src/Model/GetApplicationMerge200ResponseTimeline.php +++ b/src/Model/GetApplicationMerge200ResponseTimeline.php @@ -13,6 +13,8 @@ */ final class GetApplicationMerge200ResponseTimeline implements Model, JsonSerializable { + + public function __construct( private readonly int $startTime, private readonly array $samples, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getWatermarks(): ?array return $this->watermarks; } } + diff --git a/src/Model/GetApplicationMerge400Response.php b/src/Model/GetApplicationMerge400Response.php index ad9bf16bf..0694428e7 100644 --- a/src/Model/GetApplicationMerge400Response.php +++ b/src/Model/GetApplicationMerge400Response.php @@ -13,12 +13,15 @@ */ final class GetApplicationMerge400Response implements Model, JsonSerializable { + + public function __construct( private readonly int $code, private readonly string $message, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMessage(): string return $this->message; } } + diff --git a/src/Model/GetApplicationTimeline200Response.php b/src/Model/GetApplicationTimeline200Response.php index 377c3e1ea..546c151c8 100644 --- a/src/Model/GetApplicationTimeline200Response.php +++ b/src/Model/GetApplicationTimeline200Response.php @@ -13,6 +13,7 @@ */ final class GetApplicationTimeline200Response implements Model, JsonSerializable { + public const AGGREGATION_TYPE_AVG = 'avg'; public const AGGREGATION_TYPE_SUM = 'sum'; @@ -27,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -80,11 +82,12 @@ public function getRetention(): int return $this->retention; } - /** - * @return GetApplicationTimeline200ResponsePointsInner[] - */ + /** + * @return GetApplicationTimeline200ResponsePointsInner[] + */ public function getPoints(): array { return $this->points; } } + diff --git a/src/Model/GetApplicationTimeline200ResponsePointsInner.php b/src/Model/GetApplicationTimeline200ResponsePointsInner.php index abe97f10a..71ad6e3f0 100644 --- a/src/Model/GetApplicationTimeline200ResponsePointsInner.php +++ b/src/Model/GetApplicationTimeline200ResponsePointsInner.php @@ -13,12 +13,15 @@ */ final class GetApplicationTimeline200ResponsePointsInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?int $value = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getValue(): ?int return $this->value; } } + diff --git a/src/Model/GetApplicationTimeline400Response.php b/src/Model/GetApplicationTimeline400Response.php index cf62ad783..5c5f2799d 100644 --- a/src/Model/GetApplicationTimeline400Response.php +++ b/src/Model/GetApplicationTimeline400Response.php @@ -13,12 +13,15 @@ */ final class GetApplicationTimeline400Response implements Model, JsonSerializable { + + public function __construct( private readonly int $code, private readonly string $message, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMessage(): string return $this->message; } } + diff --git a/src/Model/GetCurrentUserVerificationStatus200Response.php b/src/Model/GetCurrentUserVerificationStatus200Response.php index 0115afe27..9366e2df5 100644 --- a/src/Model/GetCurrentUserVerificationStatus200Response.php +++ b/src/Model/GetCurrentUserVerificationStatus200Response.php @@ -13,11 +13,14 @@ */ final class GetCurrentUserVerificationStatus200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $verifyPhone = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getVerifyPhone(): ?bool return $this->verifyPhone; } } + diff --git a/src/Model/GetCurrentUserVerificationStatusFull200Response.php b/src/Model/GetCurrentUserVerificationStatusFull200Response.php index d733f6442..40590d941 100644 --- a/src/Model/GetCurrentUserVerificationStatusFull200Response.php +++ b/src/Model/GetCurrentUserVerificationStatusFull200Response.php @@ -13,12 +13,15 @@ */ final class GetCurrentUserVerificationStatusFull200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $state = null, private readonly ?string $type = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getType(): ?string return $this->type; } } + diff --git a/src/Model/GetOrgPrepaymentInfo200Response.php b/src/Model/GetOrgPrepaymentInfo200Response.php index d37c5208c..b500ff7fc 100644 --- a/src/Model/GetOrgPrepaymentInfo200Response.php +++ b/src/Model/GetOrgPrepaymentInfo200Response.php @@ -13,12 +13,15 @@ */ final class GetOrgPrepaymentInfo200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?PrepaymentObject $prepayment = null, private readonly ?GetOrgPrepaymentInfo200ResponseLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -37,9 +40,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Prepayment information for an organization. - */ + /** + * Prepayment information for an organization. + */ public function getPrepayment(): ?PrepaymentObject { return $this->prepayment; @@ -50,3 +53,4 @@ public function getLinks(): ?GetOrgPrepaymentInfo200ResponseLinks return $this->links; } } + diff --git a/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php b/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php index b65dfb923..684af9903 100644 --- a/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php +++ b/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php @@ -13,12 +13,15 @@ */ final class GetOrgPrepaymentInfo200ResponseLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?GetOrgPrepaymentInfo200ResponseLinksSelf $self = null, private readonly ?GetOrgPrepaymentInfo200ResponseLinksTransactions $transactions = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getTransactions(): ?GetOrgPrepaymentInfo200ResponseLinksTransact return $this->transactions; } } + diff --git a/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php b/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php index a8b123bdd..b12d6b18f 100644 --- a/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php +++ b/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php @@ -13,11 +13,14 @@ */ final class GetOrgPrepaymentInfo200ResponseLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): ?string return $this->href; } } + diff --git a/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php b/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php index c75954ba7..af7f00e67 100644 --- a/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php +++ b/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php @@ -13,11 +13,14 @@ */ final class GetOrgPrepaymentInfo200ResponseLinksTransactions implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): ?string return $this->href; } } + diff --git a/src/Model/GetSubscriptionUsageAlerts200Response.php b/src/Model/GetSubscriptionUsageAlerts200Response.php index 084d74c61..dd2dc8ac7 100644 --- a/src/Model/GetSubscriptionUsageAlerts200Response.php +++ b/src/Model/GetSubscriptionUsageAlerts200Response.php @@ -13,12 +13,15 @@ */ final class GetSubscriptionUsageAlerts200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $current = [], private readonly ?array $available = [], ) { } + public function getModelName(): string { return self::class; @@ -36,19 +39,20 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UsageAlert[]|null - */ + /** + * @return UsageAlert[]|null + */ public function getCurrent(): ?array { return $this->current; } - /** - * @return UsageAlert[]|null - */ + /** + * @return UsageAlert[]|null + */ public function getAvailable(): ?array { return $this->available; } } + diff --git a/src/Model/GetTotpEnrollment200Response.php b/src/Model/GetTotpEnrollment200Response.php index 9ff8ca3ab..d8dacb276 100644 --- a/src/Model/GetTotpEnrollment200Response.php +++ b/src/Model/GetTotpEnrollment200Response.php @@ -13,6 +13,8 @@ */ final class GetTotpEnrollment200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?string $issuer = null, private readonly ?string $accountName = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getQrCode(): ?string return $this->qrCode; } } + diff --git a/src/Model/GetTypeAllowance200Response.php b/src/Model/GetTypeAllowance200Response.php index ce78571ed..d65206db5 100644 --- a/src/Model/GetTypeAllowance200Response.php +++ b/src/Model/GetTypeAllowance200Response.php @@ -13,11 +13,14 @@ */ final class GetTypeAllowance200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?GetTypeAllowance200ResponseCurrencies $currencies = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getCurrencies(): ?GetTypeAllowance200ResponseCurrencies return $this->currencies; } } + diff --git a/src/Model/GetTypeAllowance200ResponseCurrencies.php b/src/Model/GetTypeAllowance200ResponseCurrencies.php index cefe90ba7..8bdd4f500 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrencies.php +++ b/src/Model/GetTypeAllowance200ResponseCurrencies.php @@ -13,6 +13,8 @@ */ final class GetTypeAllowance200ResponseCurrencies implements Model, JsonSerializable { + + public function __construct( private readonly ?GetTypeAllowance200ResponseCurrenciesEUR $eUR = null, private readonly ?GetTypeAllowance200ResponseCurrenciesUSD $uSD = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -68,3 +71,4 @@ public function getCAD(): ?GetTypeAllowance200ResponseCurrenciesCAD return $this->cAD; } } + diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php b/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php index 3dd998dac..e2c2fb1f4 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php @@ -13,6 +13,8 @@ */ final class GetTypeAllowance200ResponseCurrenciesAUD implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } + diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php b/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php index 149d14d0a..2019d1eef 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php @@ -13,6 +13,8 @@ */ final class GetTypeAllowance200ResponseCurrenciesCAD implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } + diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php b/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php index 51344d422..e4ff684a6 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php @@ -13,6 +13,8 @@ */ final class GetTypeAllowance200ResponseCurrenciesEUR implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } + diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php b/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php index 3d9509156..d59ce9200 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php @@ -13,6 +13,8 @@ */ final class GetTypeAllowance200ResponseCurrenciesGBP implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } + diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php b/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php index c1a87ae4e..f840c0d04 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php @@ -13,6 +13,8 @@ */ final class GetTypeAllowance200ResponseCurrenciesUSD implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } + diff --git a/src/Model/GetUsageAlerts200Response.php b/src/Model/GetUsageAlerts200Response.php index e8b5b90ae..e54707896 100644 --- a/src/Model/GetUsageAlerts200Response.php +++ b/src/Model/GetUsageAlerts200Response.php @@ -13,12 +13,15 @@ */ final class GetUsageAlerts200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $available = [], private readonly ?array $current = [], ) { } + public function getModelName(): string { return self::class; @@ -36,19 +39,20 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Alert[]|null - */ + /** + * @return Alert[]|null + */ public function getAvailable(): ?array { return $this->available; } - /** - * @return Alert[]|null - */ + /** + * @return Alert[]|null + */ public function getCurrent(): ?array { return $this->current; } } + diff --git a/src/Model/GitHub.php b/src/Model/GitHub.php index 91c35522b..a2f3675ed 100644 --- a/src/Model/GitHub.php +++ b/src/Model/GitHub.php @@ -14,12 +14,15 @@ */ final class GitHub implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/GitLab.php b/src/Model/GitLab.php index d64fc1545..adfbfadff 100644 --- a/src/Model/GitLab.php +++ b/src/Model/GitLab.php @@ -14,12 +14,15 @@ */ final class GitLab implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/GitLabIntegration.php b/src/Model/GitLabIntegration.php index 4e0ddd445..ebc67473c 100644 --- a/src/Model/GitLabIntegration.php +++ b/src/Model/GitLabIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level GitLabIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class GitLabIntegration implements Model, JsonSerializable, Integration { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -32,13 +33,14 @@ public function __construct( private readonly bool $buildMergeRequests, private readonly bool $buildWipMergeRequests, private readonly bool $mergeRequestsCloneParentData, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, - private readonly ?DateTime $tokenExpiresAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, + private readonly ?\DateTime $tokenExpiresAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -71,131 +73,132 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * 'expires_at' value of the current token - */ - public function getTokenExpiresAt(): ?DateTime + /** + * 'expires_at' value of the current token + */ + public function getTokenExpiresAt(): ?\DateTime { return $this->tokenExpiresAt; } - /** - * Whether or not to rotate token automatically using Gitlab API - */ + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): bool { return $this->rotateToken; } - /** - * Validity in weeks of a new token after rotation - */ + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): int { return $this->rotateTokenValidityInWeeks; } - /** - * The base URL of the GitLab installation - */ + /** + * The base URL of the GitLab installation + */ public function getBaseUrl(): string { return $this->baseUrl; } - /** - * The GitLab project (in the form `namespace/repo`) - */ + /** + * The GitLab project (in the form `namespace/repo`) + */ public function getProject(): string { return $this->project; } - /** - * Whether or not to build merge requests - */ + /** + * Whether or not to build merge requests + */ public function getBuildMergeRequests(): bool { return $this->buildMergeRequests; } - /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`) - */ + /** + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) + */ public function getBuildWipMergeRequests(): bool { return $this->buildWipMergeRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getMergeRequestsCloneParentData(): bool { return $this->mergeRequestsCloneParentData; } - /** - * The identifier of GitLabIntegration - */ + /** + * The identifier of GitLabIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/GitLabIntegrationCreateInput.php b/src/Model/GitLabIntegrationCreateInput.php index c9d9a16dd..cd6d9c264 100644 --- a/src/Model/GitLabIntegrationCreateInput.php +++ b/src/Model/GitLabIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level GitLabIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class GitLabIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -34,6 +36,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -62,99 +65,100 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitLab private token - */ + /** + * The GitLab private token + */ public function getToken(): string { return $this->token; } - /** - * The GitLab project (in the form `namespace/repo`) - */ + /** + * The GitLab project (in the form `namespace/repo`) + */ public function getProject(): string { return $this->project; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to rotate token automatically using Gitlab API - */ + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): ?bool { return $this->rotateToken; } - /** - * Validity in weeks of a new token after rotation - */ + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): ?int { return $this->rotateTokenValidityInWeeks; } - /** - * The base URL of the GitLab installation - */ + /** + * The base URL of the GitLab installation + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build merge requests - */ + /** + * Whether or not to build merge requests + */ public function getBuildMergeRequests(): ?bool { return $this->buildMergeRequests; } - /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`) - */ + /** + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) + */ public function getBuildWipMergeRequests(): ?bool { return $this->buildWipMergeRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getMergeRequestsCloneParentData(): ?bool { return $this->mergeRequestsCloneParentData; } } + diff --git a/src/Model/GitLabIntegrationPatch.php b/src/Model/GitLabIntegrationPatch.php index 4fe8173e2..80082a6dd 100644 --- a/src/Model/GitLabIntegrationPatch.php +++ b/src/Model/GitLabIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level GitLabIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class GitLabIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -34,6 +36,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -62,99 +65,100 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitLab private token - */ + /** + * The GitLab private token + */ public function getToken(): string { return $this->token; } - /** - * The GitLab project (in the form `namespace/repo`) - */ + /** + * The GitLab project (in the form `namespace/repo`) + */ public function getProject(): string { return $this->project; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to rotate token automatically using Gitlab API - */ + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): ?bool { return $this->rotateToken; } - /** - * Validity in weeks of a new token after rotation - */ + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): ?int { return $this->rotateTokenValidityInWeeks; } - /** - * The base URL of the GitLab installation - */ + /** + * The base URL of the GitLab installation + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build merge requests - */ + /** + * Whether or not to build merge requests + */ public function getBuildMergeRequests(): ?bool { return $this->buildMergeRequests; } - /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`) - */ + /** + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) + */ public function getBuildWipMergeRequests(): ?bool { return $this->buildWipMergeRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getMergeRequestsCloneParentData(): ?bool { return $this->mergeRequestsCloneParentData; } } + diff --git a/src/Model/GitServerConfiguration.php b/src/Model/GitServerConfiguration.php index 66ad7fe4f..1c8a5d0b4 100644 --- a/src/Model/GitServerConfiguration.php +++ b/src/Model/GitServerConfiguration.php @@ -13,11 +13,14 @@ */ final class GitServerConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly int $pushSizeHardLimit, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Push Size Reject Limit - */ + /** + * Push Size Reject Limit + */ public function getPushSizeHardLimit(): int { return $this->pushSizeHardLimit; } } + diff --git a/src/Model/GithubIntegration.php b/src/Model/GithubIntegration.php index e11efe8fc..03cae8cad 100644 --- a/src/Model/GithubIntegration.php +++ b/src/Model/GithubIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level GithubIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class GithubIntegration implements Model, JsonSerializable, Integration { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,13 +34,14 @@ public function __construct( private readonly bool $buildPullRequestsPostMerge, private readonly bool $pullRequestsCloneParentData, private readonly string $tokenType, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $baseUrl, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -71,123 +73,124 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * The base URL of the Github API endpoint - */ + /** + * The base URL of the Github API endpoint + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * The GitHub repository (in the form `user/repo`) - */ + /** + * The GitHub repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): bool { return $this->buildPullRequests; } - /** - * Whether or not to build draft pull requests (requires `build_pull_requests`) - */ + /** + * Whether or not to build draft pull requests (requires `build_pull_requests`) + */ public function getBuildDraftPullRequests(): bool { return $this->buildDraftPullRequests; } - /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false) - */ + /** + * Whether to build pull requests post-merge (if true) or pre-merge (if false) + */ public function getBuildPullRequestsPostMerge(): bool { return $this->buildPullRequestsPostMerge; } - /** - * Whether or not to clone parent data when building pull requests - */ + /** + * Whether or not to clone parent data when building pull requests + */ public function getPullRequestsCloneParentData(): bool { return $this->pullRequestsCloneParentData; } - /** - * The type of the token of this GitHub integration - */ + /** + * The type of the token of this GitHub integration + */ public function getTokenType(): string { return $this->tokenType; } - /** - * The identifier of GithubIntegration - */ + /** + * The identifier of GithubIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/GithubIntegrationCreateInput.php b/src/Model/GithubIntegrationCreateInput.php index 65f0df70b..3244db1ca 100644 --- a/src/Model/GithubIntegrationCreateInput.php +++ b/src/Model/GithubIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level GithubIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class GithubIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,91 +63,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitHub token. - */ + /** + * The GitHub token. + */ public function getToken(): string { return $this->token; } - /** - * The GitHub repository (in the form `user/repo`) - */ + /** + * The GitHub repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The base URL of the Github API endpoint - */ + /** + * The base URL of the Github API endpoint + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to build draft pull requests (requires `build_pull_requests`) - */ + /** + * Whether or not to build draft pull requests (requires `build_pull_requests`) + */ public function getBuildDraftPullRequests(): ?bool { return $this->buildDraftPullRequests; } - /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false) - */ + /** + * Whether to build pull requests post-merge (if true) or pre-merge (if false) + */ public function getBuildPullRequestsPostMerge(): ?bool { return $this->buildPullRequestsPostMerge; } - /** - * Whether or not to clone parent data when building pull requests - */ + /** + * Whether or not to clone parent data when building pull requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } + diff --git a/src/Model/GithubIntegrationPatch.php b/src/Model/GithubIntegrationPatch.php index 8d071c7f7..e0329d3b1 100644 --- a/src/Model/GithubIntegrationPatch.php +++ b/src/Model/GithubIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level GithubIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class GithubIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,91 +63,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitHub token. - */ + /** + * The GitHub token. + */ public function getToken(): string { return $this->token; } - /** - * The GitHub repository (in the form `user/repo`) - */ + /** + * The GitHub repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The base URL of the Github API endpoint - */ + /** + * The base URL of the Github API endpoint + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to build draft pull requests (requires `build_pull_requests`) - */ + /** + * Whether or not to build draft pull requests (requires `build_pull_requests`) + */ public function getBuildDraftPullRequests(): ?bool { return $this->buildDraftPullRequests; } - /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false) - */ + /** + * Whether to build pull requests post-merge (if true) or pre-merge (if false) + */ public function getBuildPullRequestsPostMerge(): ?bool { return $this->buildPullRequestsPostMerge; } - /** - * Whether or not to clone parent data when building pull requests - */ + /** + * Whether or not to clone parent data when building pull requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } + diff --git a/src/Model/GrantProjectTeamAccessRequestInner.php b/src/Model/GrantProjectTeamAccessRequestInner.php index a032f4e6f..06498cbae 100644 --- a/src/Model/GrantProjectTeamAccessRequestInner.php +++ b/src/Model/GrantProjectTeamAccessRequestInner.php @@ -13,11 +13,14 @@ */ final class GrantProjectTeamAccessRequestInner implements Model, JsonSerializable { + + public function __construct( private readonly string $teamId, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getTeamId(): string return $this->teamId; } } + diff --git a/src/Model/GrantProjectUserAccessRequestInner.php b/src/Model/GrantProjectUserAccessRequestInner.php index 8c4e5b314..322148a10 100644 --- a/src/Model/GrantProjectUserAccessRequestInner.php +++ b/src/Model/GrantProjectUserAccessRequestInner.php @@ -13,6 +13,7 @@ */ final class GrantProjectUserAccessRequestInner implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -32,6 +33,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -66,3 +68,4 @@ public function getAutoAddMember(): ?bool return $this->autoAddMember; } } + diff --git a/src/Model/GrantTeamProjectAccessRequestInner.php b/src/Model/GrantTeamProjectAccessRequestInner.php index 83f467941..caaf0b1e0 100644 --- a/src/Model/GrantTeamProjectAccessRequestInner.php +++ b/src/Model/GrantTeamProjectAccessRequestInner.php @@ -13,11 +13,14 @@ */ final class GrantTeamProjectAccessRequestInner implements Model, JsonSerializable { + + public function __construct( private readonly string $projectId, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getProjectId(): string return $this->projectId; } } + diff --git a/src/Model/GrantUserProjectAccessRequestInner.php b/src/Model/GrantUserProjectAccessRequestInner.php index 7492ea67c..bbfbe7d9b 100644 --- a/src/Model/GrantUserProjectAccessRequestInner.php +++ b/src/Model/GrantUserProjectAccessRequestInner.php @@ -13,6 +13,7 @@ */ final class GrantUserProjectAccessRequestInner implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -31,6 +32,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -59,3 +61,4 @@ public function getPermissions(): array return $this->permissions; } } + diff --git a/src/Model/GuaranteedResources.php b/src/Model/GuaranteedResources.php index 68c89eee1..d6f6f701c 100644 --- a/src/Model/GuaranteedResources.php +++ b/src/Model/GuaranteedResources.php @@ -13,12 +13,15 @@ */ final class GuaranteedResources implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly int $instanceLimit, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +40,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, guaranteed resources can be used - */ + /** + * If true, guaranteed resources can be used + */ public function getEnabled(): bool { return $this->enabled; } - /** - * Instance limit for guaranteed resources - */ + /** + * Instance limit for guaranteed resources + */ public function getInstanceLimit(): int { return $this->instanceLimit; } } + diff --git a/src/Model/HTTPLogForwarding.php b/src/Model/HTTPLogForwarding.php index b950c87c6..808c0ebdf 100644 --- a/src/Model/HTTPLogForwarding.php +++ b/src/Model/HTTPLogForwarding.php @@ -14,12 +14,15 @@ */ final class HTTPLogForwarding implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/HalLinks.php b/src/Model/HalLinks.php index 17aed0aa1..df3de63e7 100644 --- a/src/Model/HalLinks.php +++ b/src/Model/HalLinks.php @@ -14,6 +14,8 @@ */ final class HalLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?HalLinksSelf $self = null, private readonly ?HalLinksPrevious $previous = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The cardinal link to the self resource. - */ + /** + * The cardinal link to the self resource. + */ public function getSelf(): ?HalLinksSelf { return $this->self; } - /** - * The link to the previous resource page, given that it exists. - */ + /** + * The link to the previous resource page, given that it exists. + */ public function getPrevious(): ?HalLinksPrevious { return $this->previous; } - /** - * The link to the next resource page, given that it exists. - */ + /** + * The link to the next resource page, given that it exists. + */ public function getNext(): ?HalLinksNext { return $this->next; } } + diff --git a/src/Model/HalLinksNext.php b/src/Model/HalLinksNext.php index e87c1f9d9..dc852dbd4 100644 --- a/src/Model/HalLinksNext.php +++ b/src/Model/HalLinksNext.php @@ -14,12 +14,15 @@ */ final class HalLinksNext implements Model, JsonSerializable { + + public function __construct( private readonly ?string $title = null, private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Title of the link - */ + /** + * Title of the link + */ public function getTitle(): ?string { return $this->title; } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/HalLinksPrevious.php b/src/Model/HalLinksPrevious.php index 3a6ceb1bb..e7b923297 100644 --- a/src/Model/HalLinksPrevious.php +++ b/src/Model/HalLinksPrevious.php @@ -14,12 +14,15 @@ */ final class HalLinksPrevious implements Model, JsonSerializable { + + public function __construct( private readonly ?string $title = null, private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Title of the link - */ + /** + * Title of the link + */ public function getTitle(): ?string { return $this->title; } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/HalLinksSelf.php b/src/Model/HalLinksSelf.php index 164454ee4..e8a1696a8 100644 --- a/src/Model/HalLinksSelf.php +++ b/src/Model/HalLinksSelf.php @@ -14,12 +14,15 @@ */ final class HalLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $title = null, private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Title of the link - */ + /** + * Title of the link + */ public function getTitle(): ?string { return $this->title; } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/HealthEmail.php b/src/Model/HealthEmail.php index 4c7820f33..2a12c40d3 100644 --- a/src/Model/HealthEmail.php +++ b/src/Model/HealthEmail.php @@ -14,12 +14,15 @@ */ final class HealthEmail implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/HealthPagerDuty.php b/src/Model/HealthPagerDuty.php index a60270a42..424145317 100644 --- a/src/Model/HealthPagerDuty.php +++ b/src/Model/HealthPagerDuty.php @@ -14,12 +14,15 @@ */ final class HealthPagerDuty implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/HealthSlack.php b/src/Model/HealthSlack.php index 54ddc5d2b..6fed9b151 100644 --- a/src/Model/HealthSlack.php +++ b/src/Model/HealthSlack.php @@ -14,12 +14,15 @@ */ final class HealthSlack implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/HealthWebHook.php b/src/Model/HealthWebHook.php index 416d49fd1..233270c14 100644 --- a/src/Model/HealthWebHook.php +++ b/src/Model/HealthWebHook.php @@ -14,12 +14,15 @@ */ final class HealthWebHook implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/HealthWebHookIntegration.php b/src/Model/HealthWebHookIntegration.php index 539e2bcb8..c1f72dba3 100644 --- a/src/Model/HealthWebHookIntegration.php +++ b/src/Model/HealthWebHookIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level HealthWebHookIntegration (auto-generated) @@ -14,16 +14,19 @@ */ final class HealthWebHookIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, private readonly string $url, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -46,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The identifier of HealthWebHookIntegration - */ + /** + * The identifier of HealthWebHookIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/HealthWebHookIntegrationCreateInput.php b/src/Model/HealthWebHookIntegrationCreateInput.php index 016a995c4..2f58656b4 100644 --- a/src/Model/HealthWebHookIntegrationCreateInput.php +++ b/src/Model/HealthWebHookIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level HealthWebHookIntegrationCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class HealthWebHookIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $url, @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } + diff --git a/src/Model/HealthWebHookIntegrationPatch.php b/src/Model/HealthWebHookIntegrationPatch.php index 8a6ce8255..0f534fb05 100644 --- a/src/Model/HealthWebHookIntegrationPatch.php +++ b/src/Model/HealthWebHookIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level HealthWebHookIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class HealthWebHookIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $url, @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } + diff --git a/src/Model/History.php b/src/Model/History.php index 19503575e..3e9365eda 100644 --- a/src/Model/History.php +++ b/src/Model/History.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class History implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $projectId = null, @@ -22,11 +23,12 @@ public function __construct( private readonly ?string $resource = null, private readonly ?string $environment = null, private readonly ?string $quantity = null, - private readonly ?DateTime $timestamp = null, + private readonly ?\DateTime $timestamp = null, private readonly ?string $user = null, ) { } + public function getModelName(): string { return self::class; @@ -52,75 +54,76 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The unique identifier of the history record. - */ + /** + * The unique identifier of the history record. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The type of event that triggered the record. - */ + /** + * The type of event that triggered the record. + */ public function getEventType(): ?string { return $this->eventType; } - /** - * The ID of the event. - */ + /** + * The ID of the event. + */ public function getEventId(): ?string { return $this->eventId; } - /** - * The resource type (e.g., cpu_app, memory_services, storage). - */ + /** + * The resource type (e.g., cpu_app, memory_services, storage). + */ public function getResource(): ?string { return $this->resource; } - /** - * The environment name. - */ + /** + * The environment name. + */ public function getEnvironment(): ?string { return $this->environment; } - /** - * The quantity of the resource. - */ + /** + * The quantity of the resource. + */ public function getQuantity(): ?string { return $this->quantity; } - /** - * The timestamp when the record was created. - */ - public function getTimestamp(): ?DateTime + /** + * The timestamp when the record was created. + */ + public function getTimestamp(): ?\DateTime { return $this->timestamp; } - /** - * The ID of the user who triggered the event. - */ + /** + * The ID of the user who triggered the event. + */ public function getUser(): ?string { return $this->user; } } + diff --git a/src/Model/Hooks.php b/src/Model/Hooks.php index b7b5419b1..194a59bf3 100644 --- a/src/Model/Hooks.php +++ b/src/Model/Hooks.php @@ -13,6 +13,8 @@ */ final class Hooks implements Model, JsonSerializable { + + public function __construct( private readonly ?string $build, private readonly ?string $deploy, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getPostDeploy(): ?string return $this->postDeploy; } } + diff --git a/src/Model/Hooks1.php b/src/Model/Hooks1.php index aac922ad9..53e9b6f84 100644 --- a/src/Model/Hooks1.php +++ b/src/Model/Hooks1.php @@ -14,12 +14,15 @@ */ final class Hooks1 implements Model, JsonSerializable { + + public function __construct( private readonly ?string $build, private readonly ?string $deploy, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Hook executed after the build process - */ + /** + * Hook executed after the build process + */ public function getBuild(): ?string { return $this->build; } - /** - * Hook executed before the task's run command - */ + /** + * Hook executed before the task's run command + */ public function getDeploy(): ?string { return $this->deploy; } } + diff --git a/src/Model/HostsInner.php b/src/Model/HostsInner.php index 61eb1efe5..ad53a31be 100644 --- a/src/Model/HostsInner.php +++ b/src/Model/HostsInner.php @@ -13,6 +13,7 @@ */ final class HostsInner implements Model, JsonSerializable { + public const TYPE_CORE = 'core'; public const TYPE_SATELLITE = 'satellite'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -57,3 +59,4 @@ public function getServices(): ?array return $this->services; } } + diff --git a/src/Model/HttpAccessPermissions.php b/src/Model/HttpAccessPermissions.php index 7c9f5a86d..963846582 100644 --- a/src/Model/HttpAccessPermissions.php +++ b/src/Model/HttpAccessPermissions.php @@ -14,6 +14,8 @@ */ final class HttpAccessPermissions implements Model, JsonSerializable { + + public function __construct( private readonly bool $isEnabled, private readonly array $addresses, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,17 +43,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether http_access control is enabled - */ + /** + * Whether http_access control is enabled + */ public function getIsEnabled(): bool { return $this->isEnabled; } - /** - * @return AddressGrantsInner[] - */ + /** + * @return AddressGrantsInner[] + */ public function getAddresses(): array { return $this->addresses; @@ -61,3 +64,4 @@ public function getBasicAuth(): array return $this->basicAuth; } } + diff --git a/src/Model/HttpAccessPermissions1.php b/src/Model/HttpAccessPermissions1.php index a6f95b7c0..f18385d64 100644 --- a/src/Model/HttpAccessPermissions1.php +++ b/src/Model/HttpAccessPermissions1.php @@ -14,6 +14,8 @@ */ final class HttpAccessPermissions1 implements Model, JsonSerializable { + + public function __construct( private readonly bool $isEnabled, private readonly array $addresses, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,17 +43,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether http_access control is enabled - */ + /** + * Whether http_access control is enabled + */ public function getIsEnabled(): bool { return $this->isEnabled; } - /** - * @return AddressGrantsInner[] - */ + /** + * @return AddressGrantsInner[] + */ public function getAddresses(): array { return $this->addresses; @@ -61,3 +64,4 @@ public function getBasicAuth(): array return $this->basicAuth; } } + diff --git a/src/Model/HttpAccessPermissions2.php b/src/Model/HttpAccessPermissions2.php index 752e20bbd..50d02d59a 100644 --- a/src/Model/HttpAccessPermissions2.php +++ b/src/Model/HttpAccessPermissions2.php @@ -14,6 +14,8 @@ */ final class HttpAccessPermissions2 implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $isEnabled = null, private readonly ?array $addresses = [], @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,17 +43,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether http_access control is enabled - */ + /** + * Whether http_access control is enabled + */ public function getIsEnabled(): ?bool { return $this->isEnabled; } - /** - * @return AddressGrantsInner[]|null - */ + /** + * @return AddressGrantsInner[]|null + */ public function getAddresses(): ?array { return $this->addresses; @@ -61,3 +64,4 @@ public function getBasicAuth(): ?array return $this->basicAuth; } } + diff --git a/src/Model/HttpLogIntegration.php b/src/Model/HttpLogIntegration.php index 5a5a85b92..12dbd91a1 100644 --- a/src/Model/HttpLogIntegration.php +++ b/src/Model/HttpLogIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level HttpLogIntegration (auto-generated) @@ -14,6 +14,8 @@ */ final class HttpLogIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, @@ -22,12 +24,13 @@ public function __construct( private readonly array $headers, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -54,33 +57,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -91,9 +94,9 @@ public function getExtra(): array return $this->extra; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -104,9 +107,9 @@ public function getHeaders(): array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -117,11 +120,12 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of HttpLogIntegration - */ + /** + * The identifier of HttpLogIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/HttpLogIntegrationCreateInput.php b/src/Model/HttpLogIntegrationCreateInput.php index 8b859ad2a..647c159fe 100644 --- a/src/Model/HttpLogIntegrationCreateInput.php +++ b/src/Model/HttpLogIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level HttpLogIntegrationCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class HttpLogIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,17 +49,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -71,9 +75,9 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -84,3 +88,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/HttpLogIntegrationPatch.php b/src/Model/HttpLogIntegrationPatch.php index d76b63564..1bd98d55c 100644 --- a/src/Model/HttpLogIntegrationPatch.php +++ b/src/Model/HttpLogIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level HttpLogIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class HttpLogIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,17 +49,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -71,19 +75,20 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getExcludedServices(): ?string { return $this->excludedServices; } } + diff --git a/src/Model/HttpMetricsTimelineIps200Response.php b/src/Model/HttpMetricsTimelineIps200Response.php index 822af4ab9..fb2a325b5 100644 --- a/src/Model/HttpMetricsTimelineIps200Response.php +++ b/src/Model/HttpMetricsTimelineIps200Response.php @@ -13,6 +13,7 @@ */ final class HttpMetricsTimelineIps200Response implements Model, JsonSerializable { + public const _ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const _ENVIRONMENT_TYPE_STAGING = 'staging'; public const _ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -56,6 +57,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -210,3 +212,4 @@ public function getRequestDurationSlotsMode(): ?string return $this->requestDurationSlotsMode; } } + diff --git a/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php index 868244c97..20f5e9101 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php @@ -13,6 +13,7 @@ */ final class HttpMetricsTimelineIps200ResponseBreakdown implements Model, JsonSerializable { + public const KIND_IP = 'ip'; public function __construct( @@ -22,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,11 +53,12 @@ public function getTotal(): int return $this->total; } - /** - * @return HttpMetricsTimelineIps200ResponseBreakdownDataInner[] - */ + /** + * @return HttpMetricsTimelineIps200ResponseBreakdownDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php index 47073e70a..3d4349abe 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php @@ -13,6 +13,8 @@ */ final class HttpMetricsTimelineIps200ResponseBreakdownDataInner implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly float $impact, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -82,3 +85,4 @@ public function getTopHit(): bool return $this->topHit; } } + diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php index e43ff1197..983598b0e 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php @@ -13,11 +13,14 @@ */ final class HttpMetricsTimelineIps200ResponseTopHitsTimeline implements Model, JsonSerializable { + + public function __construct( private readonly array $data, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php index 4e8e4e138..c012e2203 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php @@ -13,6 +13,8 @@ */ final class HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -56,11 +59,12 @@ public function getTotalCount(): ?int return $this->totalCount; } - /** - * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue[]|null - */ + /** + * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue[]|null + */ public function getData(): ?array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php index 6435f04e2..a375a8add 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php @@ -13,12 +13,15 @@ */ final class HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue implements Model, JsonSerializable { + + public function __construct( private readonly int $count, private readonly ?float $impact, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getImpact(): ?float return $this->impact; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200Response.php b/src/Model/HttpMetricsTimelineUrls200Response.php index fcc65ed8f..b7f34fce2 100644 --- a/src/Model/HttpMetricsTimelineUrls200Response.php +++ b/src/Model/HttpMetricsTimelineUrls200Response.php @@ -13,6 +13,7 @@ */ final class HttpMetricsTimelineUrls200Response implements Model, JsonSerializable { + public const _ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const _ENVIRONMENT_TYPE_STAGING = 'staging'; public const _ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -57,6 +58,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -217,3 +219,4 @@ public function getRequestDurationSlotsMode(): ?string return $this->requestDurationSlotsMode; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php index d576a5bca..a3df35cc5 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php @@ -13,6 +13,7 @@ */ final class HttpMetricsTimelineUrls200ResponseBreakdown implements Model, JsonSerializable { + public const KIND_URL = 'url'; public function __construct( @@ -22,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,11 +53,12 @@ public function getTotal(): int return $this->total; } - /** - * @return HttpMetricsTimelineUrls200ResponseBreakdownDataInner[] - */ + /** + * @return HttpMetricsTimelineUrls200ResponseBreakdownDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php index 5b6264d00..840e98b5f 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php @@ -13,6 +13,7 @@ */ final class HttpMetricsTimelineUrls200ResponseBreakdownDataInner implements Model, JsonSerializable { + public const METHOD_GET = 'GET'; public const METHOD_POST = 'POST'; public const METHOD_PUT = 'PUT'; @@ -33,6 +34,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -97,3 +99,4 @@ public function getTopHit(): bool return $this->topHit; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php b/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php index 373b79079..0aa8f4eba 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php @@ -13,12 +13,15 @@ */ final class HttpMetricsTimelineUrls200ResponseFilters implements Model, JsonSerializable { + + public function __construct( private readonly int $maxApplicableFilters, private readonly ?array $fields = [], ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getMaxApplicableFilters(): int return $this->maxApplicableFilters; } - /** - * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValue[]|null - */ + /** + * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValue[]|null + */ public function getFields(): ?array { return $this->fields; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php index f53dab6d4..f94522091 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php @@ -13,6 +13,8 @@ */ final class HttpMetricsTimelineUrls200ResponseFiltersFieldsValue implements Model, JsonSerializable { + + public function __construct( private readonly int $distinctValues, private readonly string $type, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,11 +52,12 @@ public function getType(): string return $this->type; } - /** - * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner[] - */ + /** + * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner[] + */ public function getValues(): array { return $this->values; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php index 058a97faf..52926a875 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php @@ -13,12 +13,15 @@ */ final class HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner implements Model, JsonSerializable { + + public function __construct( private readonly string $value, private readonly int $count, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getCount(): int return $this->count; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php index 0e7cfbc39..9fbab6817 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php @@ -13,11 +13,14 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimeline implements Model, JsonSerializable { + + public function __construct( private readonly array $data, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php index fa9ee8918..452fc4e95 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php @@ -13,6 +13,8 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -72,9 +75,9 @@ public function getResponseSize(): ?int return $this->responseSize; } - /** - * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue[]|null - */ + /** + * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue[]|null + */ public function getUrls(): ?array { return $this->urls; @@ -85,3 +88,4 @@ public function getCodes(): ?HttpMetricsTimelineUrls200ResponseTopHitsTimelineDa return $this->codes; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php index f71e25f94..7fc12d44c 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php @@ -13,6 +13,8 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes implements Model, JsonSerializable { + + public function __construct( private readonly int $uNKNOWN, private readonly int $_1xX, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function get5xX(): int return $this->_5xX; } } + diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php index ce76ba016..c3e6a148b 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php @@ -13,12 +13,15 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue implements Model, JsonSerializable { + + public function __construct( private readonly int $count, private readonly ?float $impact, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getImpact(): ?float return $this->impact; } } + diff --git a/src/Model/HttpMetricsTimelineUserAgents200Response.php b/src/Model/HttpMetricsTimelineUserAgents200Response.php index 4674ff5bc..61cbc1290 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200Response.php +++ b/src/Model/HttpMetricsTimelineUserAgents200Response.php @@ -13,6 +13,7 @@ */ final class HttpMetricsTimelineUserAgents200Response implements Model, JsonSerializable { + public const _ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const _ENVIRONMENT_TYPE_STAGING = 'staging'; public const _ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -56,6 +57,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -210,3 +212,4 @@ public function getRequestDurationSlotsMode(): ?string return $this->requestDurationSlotsMode; } } + diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php index 7a06e5b93..95e9aecb2 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php @@ -13,6 +13,7 @@ */ final class HttpMetricsTimelineUserAgents200ResponseBreakdown implements Model, JsonSerializable { + public const KIND_USER_AGENT = 'user_agent'; public function __construct( @@ -22,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,11 +53,12 @@ public function getTotal(): int return $this->total; } - /** - * @return HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner[] - */ + /** + * @return HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php index 17759ca32..9938c37c1 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php @@ -13,6 +13,8 @@ */ final class HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly float $impact, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -82,3 +85,4 @@ public function getTopHit(): bool return $this->topHit; } } + diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php index c37bf19c7..b3e5ce078 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php @@ -13,11 +13,14 @@ */ final class HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline implements Model, JsonSerializable { + + public function __construct( private readonly array $data, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php index 464868af8..c37988cfc 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php @@ -13,6 +13,8 @@ */ final class HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -56,11 +59,12 @@ public function getTotalCount(): ?int return $this->totalCount; } - /** - * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue[]|null - */ + /** + * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue[]|null + */ public function getData(): ?array { return $this->data; } } + diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php index 472e70c65..77e66d944 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php @@ -13,12 +13,15 @@ */ final class HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue implements Model, JsonSerializable { + + public function __construct( private readonly int $count, private readonly ?float $impact, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getImpact(): ?float return $this->impact; } } + diff --git a/src/Model/ImageTypeRestrictions.php b/src/Model/ImageTypeRestrictions.php index eeabac03c..1b85c6e52 100644 --- a/src/Model/ImageTypeRestrictions.php +++ b/src/Model/ImageTypeRestrictions.php @@ -14,12 +14,15 @@ */ final class ImageTypeRestrictions implements Model, JsonSerializable { + + public function __construct( private readonly ?array $only = [], private readonly ?array $exclude = [], ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getExclude(): ?array return $this->exclude; } } + diff --git a/src/Model/ImagesValueValue.php b/src/Model/ImagesValueValue.php index 60299ad67..c251b09ea 100644 --- a/src/Model/ImagesValueValue.php +++ b/src/Model/ImagesValueValue.php @@ -13,11 +13,14 @@ */ final class ImagesValueValue implements Model, JsonSerializable { + + public function __construct( private readonly bool $available, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getAvailable(): bool return $this->available; } } + diff --git a/src/Model/Integration.php b/src/Model/Integration.php index d3182684b..64f0951cd 100644 --- a/src/Model/Integration.php +++ b/src/Model/Integration.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level Integration (auto-generated) * @@ -21,3 +23,4 @@ public function getType(): mixed; public function getRole(): mixed; } + diff --git a/src/Model/IntegrationCreateCreateInput.php b/src/Model/IntegrationCreateCreateInput.php index 9081fbfaf..70bf3cd74 100644 --- a/src/Model/IntegrationCreateCreateInput.php +++ b/src/Model/IntegrationCreateCreateInput.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level IntegrationCreateCreateInput (auto-generated) * @@ -19,3 +21,4 @@ public function __toString(): string; public function getType(): mixed; } + diff --git a/src/Model/IntegrationPatch.php b/src/Model/IntegrationPatch.php index dc4cab74c..d069f8d57 100644 --- a/src/Model/IntegrationPatch.php +++ b/src/Model/IntegrationPatch.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level IntegrationPatch (auto-generated) * @@ -19,3 +21,4 @@ public function __toString(): string; public function getType(): mixed; } + diff --git a/src/Model/Integrations.php b/src/Model/Integrations.php index 0ab94faae..38ede9ec4 100644 --- a/src/Model/Integrations.php +++ b/src/Model/Integrations.php @@ -13,6 +13,8 @@ */ final class Integrations implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly ?Config $config = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,9 +42,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, integrations can be used - */ + /** + * If true, integrations can be used + */ public function getEnabled(): bool { return $this->enabled; @@ -57,3 +60,4 @@ public function getAllowedIntegrations(): ?array return $this->allowedIntegrations; } } + diff --git a/src/Model/Invoice.php b/src/Model/Invoice.php index 4aad8cf51..df43614aa 100644 --- a/src/Model/Invoice.php +++ b/src/Model/Invoice.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class Invoice implements Model, JsonSerializable { + public const TYPE_INVOICE = 'invoice'; public const TYPE_CREDIT_MEMO = 'credit_memo'; public const STATUS_PAID = 'paid'; @@ -26,10 +26,10 @@ final class Invoice implements Model, JsonSerializable public function __construct( private readonly ?string $relatedInvoiceId = null, - private readonly ?DateTime $invoiceDate = null, - private readonly ?DateTime $invoiceDue = null, - private readonly ?DateTime $created = null, - private readonly ?DateTime $changed = null, + private readonly ?\DateTime $invoiceDate = null, + private readonly ?\DateTime $invoiceDue = null, + private readonly ?\DateTime $created = null, + private readonly ?\DateTime $changed = null, private readonly ?string $id = null, private readonly ?string $invoiceNumber = null, private readonly ?string $type = null, @@ -44,6 +44,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -76,131 +77,132 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The invoice id. - */ + /** + * The invoice id. + */ public function getId(): ?string { return $this->id; } - /** - * The invoice number. - */ + /** + * The invoice number. + */ public function getInvoiceNumber(): ?string { return $this->invoiceNumber; } - /** - * Invoice type. - */ + /** + * Invoice type. + */ public function getType(): ?string { return $this->type; } - /** - * The id of the related order. - */ + /** + * The id of the related order. + */ public function getOrderId(): ?string { return $this->orderId; } - /** - * If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice. - */ + /** + * If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice. + */ public function getRelatedInvoiceId(): ?string { return $this->relatedInvoiceId; } - /** - * The invoice status. - */ + /** + * The invoice status. + */ public function getStatus(): ?string { return $this->status; } - /** - * The ULID of the owner. - */ + /** + * The ULID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * The invoice date. - */ - public function getInvoiceDate(): ?DateTime + /** + * The invoice date. + */ + public function getInvoiceDate(): ?\DateTime { return $this->invoiceDate; } - /** - * The invoice due date. - */ - public function getInvoiceDue(): ?DateTime + /** + * The invoice due date. + */ + public function getInvoiceDue(): ?\DateTime { return $this->invoiceDue; } - /** - * The time when the invoice was created. - */ - public function getCreated(): ?DateTime + /** + * The time when the invoice was created. + */ + public function getCreated(): ?\DateTime { return $this->created; } - /** - * The time when the invoice was changed. - */ - public function getChanged(): ?DateTime + /** + * The time when the invoice was changed. + */ + public function getChanged(): ?\DateTime { return $this->changed; } - /** - * Company name (if any). - */ + /** + * Company name (if any). + */ public function getCompany(): ?string { return $this->company; } - /** - * The invoice total. - */ + /** + * The invoice total. + */ public function getTotal(): ?float { return $this->total; } - /** - * The address of the user. - */ + /** + * The address of the user. + */ public function getAddress(): ?Address { return $this->address; } - /** - * The invoice note. - */ + /** + * The invoice note. + */ public function getNotes(): ?string { return $this->notes; } - /** - * Invoice PDF document details. - */ + /** + * Invoice PDF document details. + */ public function getInvoicePdf(): ?InvoicePDF { return $this->invoicePdf; } } + diff --git a/src/Model/InvoicePDF.php b/src/Model/InvoicePDF.php index 3a0225345..c37379087 100644 --- a/src/Model/InvoicePDF.php +++ b/src/Model/InvoicePDF.php @@ -14,6 +14,7 @@ */ final class InvoicePDF implements Model, JsonSerializable { + public const STATUS_READY = 'ready'; public const STATUS_PENDING = 'pending'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,21 +43,22 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * A link to the PDF invoice. - */ + /** + * A link to the PDF invoice. + */ public function getUrl(): ?string { return $this->url; } - /** - * The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not - * be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF - * is not created but queued up. If you get this status, try again later. - */ + /** + * The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not + * be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF + * is not created but queued up. If you get this status, try again later. + */ public function getStatus(): ?string { return $this->status; } } + diff --git a/src/Model/IssuerInner.php b/src/Model/IssuerInner.php index 6cea49b52..4c60ce8f0 100644 --- a/src/Model/IssuerInner.php +++ b/src/Model/IssuerInner.php @@ -13,6 +13,8 @@ */ final class IssuerInner implements Model, JsonSerializable { + + public function __construct( private readonly string $oid, private readonly string $value, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getValue(): string return $this->value; } } + diff --git a/src/Model/KubernetesDeploymentTargetStorage.php b/src/Model/KubernetesDeploymentTargetStorage.php index f8be8c69d..2acb5b159 100644 --- a/src/Model/KubernetesDeploymentTargetStorage.php +++ b/src/Model/KubernetesDeploymentTargetStorage.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTarget; /** * Low level KubernetesDeploymentTargetStorage (auto-generated) @@ -13,6 +14,7 @@ */ final class KubernetesDeploymentTargetStorage implements Model, JsonSerializable, DeploymentTarget { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -50,51 +53,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * K8S config - */ + /** + * K8S config + */ public function getK8sConfig(): ?string { return $this->k8sConfig; } - /** - * The bastion-nodes ssh user - */ + /** + * The bastion-nodes ssh user + */ public function getBastionNodesUser(): ?string { return $this->bastionNodesUser; } - /** - * The bastion node endpoint - */ + /** + * The bastion node endpoint + */ public function getBastionNodesHost(): ?string { return $this->bastionNodesHost; } - /** - * The identifier of KubernetesDeploymentTargetStorage - */ + /** + * The identifier of KubernetesDeploymentTargetStorage + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/KubernetesDeploymentTargetStorageCreateInput.php b/src/Model/KubernetesDeploymentTargetStorageCreateInput.php index 5cf3654db..3210afbd2 100644 --- a/src/Model/KubernetesDeploymentTargetStorageCreateInput.php +++ b/src/Model/KubernetesDeploymentTargetStorageCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetCreateInput; /** * Low level KubernetesDeploymentTargetStorageCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class KubernetesDeploymentTargetStorageCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,19 +45,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } } + diff --git a/src/Model/KubernetesDeploymentTargetStoragePatch.php b/src/Model/KubernetesDeploymentTargetStoragePatch.php index 77b96caac..53d8adc8b 100644 --- a/src/Model/KubernetesDeploymentTargetStoragePatch.php +++ b/src/Model/KubernetesDeploymentTargetStoragePatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DeploymentTargetPatch; /** * Low level KubernetesDeploymentTargetStoragePatch (auto-generated) @@ -13,6 +14,7 @@ */ final class KubernetesDeploymentTargetStoragePatch implements Model, JsonSerializable, DeploymentTargetPatch { + public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,19 +45,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } } + diff --git a/src/Model/LastDeploymentCommandsInner.php b/src/Model/LastDeploymentCommandsInner.php index 558861620..f3dea5eaf 100644 --- a/src/Model/LastDeploymentCommandsInner.php +++ b/src/Model/LastDeploymentCommandsInner.php @@ -13,6 +13,8 @@ */ final class LastDeploymentCommandsInner implements Model, JsonSerializable { + + public function __construct( private readonly string $app, private readonly string $type, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getExitCode(): int return $this->exitCode; } } + diff --git a/src/Model/LineItem.php b/src/Model/LineItem.php index 6e4e96198..80846ade1 100644 --- a/src/Model/LineItem.php +++ b/src/Model/LineItem.php @@ -14,6 +14,7 @@ */ final class LineItem implements Model, JsonSerializable { + public const TYPE_PROJECT_PLAN = 'project_plan'; public const TYPE_PROJECT_FEATURE = 'project_feature'; public const TYPE_PROJECT_SUBTOTAL = 'project_subtotal'; @@ -34,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -59,76 +61,77 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of line item. - */ + /** + * The type of line item. + */ public function getType(): ?string { return $this->type; } - /** - * The associated subscription identifier. - */ + /** + * The associated subscription identifier. + */ public function getLicenseId(): ?float { return $this->licenseId; } - /** - * The associated project identifier. - */ + /** + * The associated project identifier. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * Display name of the line item product. - */ + /** + * Display name of the line item product. + */ public function getProduct(): ?string { return $this->product; } - /** - * The line item product SKU. - */ + /** + * The line item product SKU. + */ public function getSku(): ?string { return $this->sku; } - /** - * Total price as a decimal. - */ + /** + * Total price as a decimal. + */ public function getTotal(): ?float { return $this->total; } - /** - * Total price, formatted with currency. - */ + /** + * Total price, formatted with currency. + */ public function getTotalFormatted(): ?string { return $this->totalFormatted; } - /** - * The price components for the line item, keyed by type. - * @return LineItemComponent[]|null - */ + /** + * The price components for the line item, keyed by type. + * @return LineItemComponent[]|null + */ public function getComponents(): ?array { return $this->components; } - /** - * Line item should not be considered billable. - */ + /** + * Line item should not be considered billable. + */ public function getExcludeFromInvoice(): ?bool { return $this->excludeFromInvoice; } } + diff --git a/src/Model/LineItemComponent.php b/src/Model/LineItemComponent.php index f7b311e66..da18f78f0 100644 --- a/src/Model/LineItemComponent.php +++ b/src/Model/LineItemComponent.php @@ -14,6 +14,8 @@ */ final class LineItemComponent implements Model, JsonSerializable { + + public function __construct( private readonly ?float $amount = null, private readonly ?string $amountFormatted = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The price as a decimal. - */ + /** + * The price as a decimal. + */ public function getAmount(): ?float { return $this->amount; } - /** - * The price formatted with currency. - */ + /** + * The price formatted with currency. + */ public function getAmountFormatted(): ?string { return $this->amountFormatted; } - /** - * The display title for the component. - */ + /** + * The display title for the component. + */ public function getDisplayTitle(): ?string { return $this->displayTitle; } - /** - * The currency code for the component. - */ + /** + * The currency code for the component. + */ public function getCurrency(): ?string { return $this->currency; } } + diff --git a/src/Model/Link.php b/src/Model/Link.php index bf69ced9b..dd847b822 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -14,11 +14,14 @@ */ final class Link implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/ListApplications200Response.php b/src/Model/ListApplications200Response.php index a5b100173..cc7669a4d 100644 --- a/src/Model/ListApplications200Response.php +++ b/src/Model/ListApplications200Response.php @@ -13,11 +13,14 @@ */ final class ListApplications200Response implements Model, JsonSerializable { + + public function __construct( private readonly array $applications, ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return ListApplications200ResponseApplicationsValue[] - */ + /** + * @return ListApplications200ResponseApplicationsValue[] + */ public function getApplications(): array { return $this->applications; } } + diff --git a/src/Model/ListApplications200ResponseApplicationsValue.php b/src/Model/ListApplications200ResponseApplicationsValue.php index 7f9936fe5..2d035c374 100644 --- a/src/Model/ListApplications200ResponseApplicationsValue.php +++ b/src/Model/ListApplications200ResponseApplicationsValue.php @@ -13,6 +13,8 @@ */ final class ListApplications200ResponseApplicationsValue implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly array $profileTypes, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,9 +47,9 @@ public function getName(): string return $this->name; } - /** - * @return ListApplications200ResponseApplicationsValueProfileTypesValue[] - */ + /** + * @return ListApplications200ResponseApplicationsValueProfileTypesValue[] + */ public function getProfileTypes(): array { return $this->profileTypes; @@ -57,3 +60,4 @@ public function getLanguages(): array return $this->languages; } } + diff --git a/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php b/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php index 3be4900ef..9a77f8b24 100644 --- a/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php +++ b/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php @@ -13,6 +13,7 @@ */ final class ListApplications200ResponseApplicationsValueProfileTypesValue implements Model, JsonSerializable { + public const AGGREGATION_AVG = 'avg'; public const AGGREGATION_SUM = 'sum'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -71,3 +73,4 @@ public function getAggregation(): string return $this->aggregation; } } + diff --git a/src/Model/ListApplications400Response.php b/src/Model/ListApplications400Response.php index 93799276a..3e4ab4865 100644 --- a/src/Model/ListApplications400Response.php +++ b/src/Model/ListApplications400Response.php @@ -13,12 +13,15 @@ */ final class ListApplications400Response implements Model, JsonSerializable { + + public function __construct( private readonly int $code, private readonly string $message, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMessage(): string return $this->message; } } + diff --git a/src/Model/ListApplications499Response.php b/src/Model/ListApplications499Response.php index 184b17a68..dd92495e1 100644 --- a/src/Model/ListApplications499Response.php +++ b/src/Model/ListApplications499Response.php @@ -13,12 +13,15 @@ */ final class ListApplications499Response implements Model, JsonSerializable { + + public function __construct( private readonly int $code, private readonly string $message, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMessage(): string return $this->message; } } + diff --git a/src/Model/ListLinks.php b/src/Model/ListLinks.php index b44579db4..2d4c24d95 100644 --- a/src/Model/ListLinks.php +++ b/src/Model/ListLinks.php @@ -13,6 +13,8 @@ */ final class ListLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?Link $self = null, private readonly ?Link $previous = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +42,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * A hypermedia link to the {current, next, previous} set of items. - */ + /** + * A hypermedia link to the {current, next, previous} set of items. + */ public function getSelf(): ?Link { return $this->self; } - /** - * A hypermedia link to the {current, next, previous} set of items. - */ + /** + * A hypermedia link to the {current, next, previous} set of items. + */ public function getPrevious(): ?Link { return $this->previous; } - /** - * A hypermedia link to the {current, next, previous} set of items. - */ + /** + * A hypermedia link to the {current, next, previous} set of items. + */ public function getNext(): ?Link { return $this->next; } } + diff --git a/src/Model/ListOrgDiscounts200Response.php b/src/Model/ListOrgDiscounts200Response.php index 370c83637..6555024b5 100644 --- a/src/Model/ListOrgDiscounts200Response.php +++ b/src/Model/ListOrgDiscounts200Response.php @@ -13,12 +13,15 @@ */ final class ListOrgDiscounts200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Discount[]|null - */ + /** + * @return Discount[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgInvoices200Response.php b/src/Model/ListOrgInvoices200Response.php index 58ef2b7f0..6e5eec3f2 100644 --- a/src/Model/ListOrgInvoices200Response.php +++ b/src/Model/ListOrgInvoices200Response.php @@ -13,11 +13,14 @@ */ final class ListOrgInvoices200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Invoice[]|null - */ + /** + * @return Invoice[]|null + */ public function getItems(): ?array { return $this->items; } } + diff --git a/src/Model/ListOrgMembers200Response.php b/src/Model/ListOrgMembers200Response.php index 9db75b0a0..824d2978a 100644 --- a/src/Model/ListOrgMembers200Response.php +++ b/src/Model/ListOrgMembers200Response.php @@ -13,6 +13,8 @@ */ final class ListOrgMembers200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,9 +47,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return OrganizationMember[]|null - */ + /** + * @return OrganizationMember[]|null + */ public function getItems(): ?array { return $this->items; @@ -57,3 +60,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgOrders200Response.php b/src/Model/ListOrgOrders200Response.php index 56f638daf..29b01e880 100644 --- a/src/Model/ListOrgOrders200Response.php +++ b/src/Model/ListOrgOrders200Response.php @@ -13,12 +13,15 @@ */ final class ListOrgOrders200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Order[]|null - */ + /** + * @return Order[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgPlanRecords200Response.php b/src/Model/ListOrgPlanRecords200Response.php index ae57a2d17..be4082ae2 100644 --- a/src/Model/ListOrgPlanRecords200Response.php +++ b/src/Model/ListOrgPlanRecords200Response.php @@ -13,12 +13,15 @@ */ final class ListOrgPlanRecords200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return PlanRecords[]|null - */ + /** + * @return PlanRecords[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgPrepaymentTransactions200Response.php b/src/Model/ListOrgPrepaymentTransactions200Response.php index bf7a9df9e..68c94203b 100644 --- a/src/Model/ListOrgPrepaymentTransactions200Response.php +++ b/src/Model/ListOrgPrepaymentTransactions200Response.php @@ -13,6 +13,8 @@ */ final class ListOrgPrepaymentTransactions200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $transactions = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,9 +47,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return PrepaymentTransactionObject[]|null - */ + /** + * @return PrepaymentTransactionObject[]|null + */ public function getTransactions(): ?array { return $this->transactions; @@ -57,3 +60,4 @@ public function getLinks(): ?ListOrgPrepaymentTransactions200ResponseLinks return $this->links; } } + diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php index 23ba71e9b..23e67e4b4 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php @@ -13,6 +13,8 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?ListOrgPrepaymentTransactions200ResponseLinksSelf $self = null, private readonly ?ListOrgPrepaymentTransactions200ResponseLinksPrevious $previous = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getPrepayment(): ?ListOrgPrepaymentTransactions200ResponseLinksP return $this->prepayment; } } + diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php index a5dfb8b53..790f29f5c 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php @@ -13,11 +13,14 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksNext implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): ?string return $this->href; } } + diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php index f7bc08216..1b16dafbe 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php @@ -13,11 +13,14 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksPrepayment implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): ?string return $this->href; } } + diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php index ec8ccd4bf..c8d993d32 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php @@ -13,11 +13,14 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksPrevious implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): ?string return $this->href; } } + diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php index d10eb51e6..f69eb9300 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php @@ -13,11 +13,14 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): ?string return $this->href; } } + diff --git a/src/Model/ListOrgProjectHistory200Response.php b/src/Model/ListOrgProjectHistory200Response.php index 2b6e26967..82ddcbeeb 100644 --- a/src/Model/ListOrgProjectHistory200Response.php +++ b/src/Model/ListOrgProjectHistory200Response.php @@ -13,6 +13,8 @@ */ final class ListOrgProjectHistory200Response implements Model, JsonSerializable { + + public function __construct( private readonly int $count, private readonly array $items, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,9 +47,9 @@ public function getCount(): int return $this->count; } - /** - * @return History[] - */ + /** + * @return History[] + */ public function getItems(): array { return $this->items; @@ -57,3 +60,4 @@ public function getLinks(): ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgProjects200Response.php b/src/Model/ListOrgProjects200Response.php index de22e87be..b1fe96770 100644 --- a/src/Model/ListOrgProjects200Response.php +++ b/src/Model/ListOrgProjects200Response.php @@ -13,6 +13,8 @@ */ final class ListOrgProjects200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,17 +49,17 @@ public function getCount(): ?int return $this->count; } - /** - * @return OrganizationProject[]|null - */ + /** + * @return OrganizationProject[]|null + */ public function getItems(): ?array { return $this->items; } - /** - * Facets for filtering options. - */ + /** + * Facets for filtering options. + */ public function getFacets(): ?ProjectFacets { return $this->facets; @@ -67,3 +70,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgSubscriptions200Response.php b/src/Model/ListOrgSubscriptions200Response.php index 4970f97e5..80a690ea7 100644 --- a/src/Model/ListOrgSubscriptions200Response.php +++ b/src/Model/ListOrgSubscriptions200Response.php @@ -13,6 +13,8 @@ */ final class ListOrgSubscriptions200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,9 +47,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return Subscription[]|null - */ + /** + * @return Subscription[]|null + */ public function getItems(): ?array { return $this->items; @@ -57,3 +60,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgUsageRecords200Response.php b/src/Model/ListOrgUsageRecords200Response.php index 0b7bf4bbc..9f3c4f6cd 100644 --- a/src/Model/ListOrgUsageRecords200Response.php +++ b/src/Model/ListOrgUsageRecords200Response.php @@ -13,12 +13,15 @@ */ final class ListOrgUsageRecords200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Usage[]|null - */ + /** + * @return Usage[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListOrgs200Response.php b/src/Model/ListOrgs200Response.php index 5ec955b3d..0e028ed67 100644 --- a/src/Model/ListOrgs200Response.php +++ b/src/Model/ListOrgs200Response.php @@ -13,6 +13,8 @@ */ final class ListOrgs200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,9 +47,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return Organization[]|null - */ + /** + * @return Organization[]|null + */ public function getItems(): ?array { return $this->items; @@ -57,3 +60,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListProfiles200Response.php b/src/Model/ListProfiles200Response.php index 3a7acba80..97b59c120 100644 --- a/src/Model/ListProfiles200Response.php +++ b/src/Model/ListProfiles200Response.php @@ -13,6 +13,8 @@ */ final class ListProfiles200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $profiles = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,19 +47,20 @@ public function getCount(): ?int return $this->count; } - /** - * @return Profile[]|null - */ + /** + * @return Profile[]|null + */ public function getProfiles(): ?array { return $this->profiles; } - /** - * Links to _self, and previous or next page, given that they exist. - */ + /** + * Links to _self, and previous or next page, given that they exist. + */ public function getLinks(): ?HalLinks { return $this->links; } } + diff --git a/src/Model/ListProjectTeamAccess200Response.php b/src/Model/ListProjectTeamAccess200Response.php index d9b31624f..0f7480fc0 100644 --- a/src/Model/ListProjectTeamAccess200Response.php +++ b/src/Model/ListProjectTeamAccess200Response.php @@ -13,12 +13,15 @@ */ final class ListProjectTeamAccess200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return TeamProjectAccess[]|null - */ + /** + * @return TeamProjectAccess[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListProjectUserAccess200Response.php b/src/Model/ListProjectUserAccess200Response.php index 536de02dc..403ebfba2 100644 --- a/src/Model/ListProjectUserAccess200Response.php +++ b/src/Model/ListProjectUserAccess200Response.php @@ -13,12 +13,15 @@ */ final class ListProjectUserAccess200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UserProjectAccess[]|null - */ + /** + * @return UserProjectAccess[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListRegions200Response.php b/src/Model/ListRegions200Response.php index c4434aed8..21673716f 100644 --- a/src/Model/ListRegions200Response.php +++ b/src/Model/ListRegions200Response.php @@ -13,6 +13,8 @@ */ final class ListRegions200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $regions = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,9 +47,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return Region[]|null - */ + /** + * @return Region[]|null + */ public function getRegions(): ?array { return $this->regions; @@ -57,3 +60,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListTeamMembers200Response.php b/src/Model/ListTeamMembers200Response.php index 44ececc52..59097a602 100644 --- a/src/Model/ListTeamMembers200Response.php +++ b/src/Model/ListTeamMembers200Response.php @@ -13,12 +13,15 @@ */ final class ListTeamMembers200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return TeamMember[]|null - */ + /** + * @return TeamMember[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListTeams200Response.php b/src/Model/ListTeams200Response.php index e030266f0..7cd5bf5c0 100644 --- a/src/Model/ListTeams200Response.php +++ b/src/Model/ListTeams200Response.php @@ -13,6 +13,8 @@ */ final class ListTeams200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?int $count = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -38,9 +41,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Team[]|null - */ + /** + * @return Team[]|null + */ public function getItems(): ?array { return $this->items; @@ -56,3 +59,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListTicketCategories200ResponseInner.php b/src/Model/ListTicketCategories200ResponseInner.php index 45412638f..6f863f042 100644 --- a/src/Model/ListTicketCategories200ResponseInner.php +++ b/src/Model/ListTicketCategories200ResponseInner.php @@ -13,12 +13,15 @@ */ final class ListTicketCategories200ResponseInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $label = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getLabel(): ?string return $this->label; } } + diff --git a/src/Model/ListTicketPriorities200ResponseInner.php b/src/Model/ListTicketPriorities200ResponseInner.php index dd1ee58f0..961088d87 100644 --- a/src/Model/ListTicketPriorities200ResponseInner.php +++ b/src/Model/ListTicketPriorities200ResponseInner.php @@ -13,6 +13,8 @@ */ final class ListTicketPriorities200ResponseInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $label = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getDescription(): ?string return $this->description; } } + diff --git a/src/Model/ListTickets200Response.php b/src/Model/ListTickets200Response.php index f6c5860d8..02420c26e 100644 --- a/src/Model/ListTickets200Response.php +++ b/src/Model/ListTickets200Response.php @@ -13,6 +13,8 @@ */ final class ListTickets200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?array $tickets = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,19 +47,20 @@ public function getCount(): ?int return $this->count; } - /** - * @return Ticket[]|null - */ + /** + * @return Ticket[]|null + */ public function getTickets(): ?array { return $this->tickets; } - /** - * Links to _self, and previous or next page, given that they exist. - */ + /** + * Links to _self, and previous or next page, given that they exist. + */ public function getLinks(): ?HalLinks { return $this->links; } } + diff --git a/src/Model/ListUserExtendedAccess200Response.php b/src/Model/ListUserExtendedAccess200Response.php index 67d222c85..add729cc4 100644 --- a/src/Model/ListUserExtendedAccess200Response.php +++ b/src/Model/ListUserExtendedAccess200Response.php @@ -13,12 +13,15 @@ */ final class ListUserExtendedAccess200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return ListUserExtendedAccess200ResponseItemsInner[]|null - */ + /** + * @return ListUserExtendedAccess200ResponseItemsInner[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/ListUserExtendedAccess200ResponseItemsInner.php b/src/Model/ListUserExtendedAccess200ResponseItemsInner.php index 68ddcfb8c..e5ab0087b 100644 --- a/src/Model/ListUserExtendedAccess200ResponseItemsInner.php +++ b/src/Model/ListUserExtendedAccess200ResponseItemsInner.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class ListUserExtendedAccess200ResponseItemsInner implements Model, JsonSerializable { + public const RESOURCE_TYPE_PROJECT = 'project'; public const RESOURCE_TYPE_ORGANIZATION = 'organization'; @@ -23,11 +23,12 @@ public function __construct( private readonly ?string $resourceType = null, private readonly ?string $organizationId = null, private readonly ?array $permissions = [], - private readonly ?DateTime $grantedAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $grantedAt = null, + private readonly ?\DateTime $updatedAt = null, ) { } + public function getModelName(): string { return self::class; @@ -76,13 +77,14 @@ public function getPermissions(): ?array return $this->permissions; } - public function getGrantedAt(): ?DateTime + public function getGrantedAt(): ?\DateTime { return $this->grantedAt; } - public function getUpdatedAt(): ?DateTime + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } } + diff --git a/src/Model/ListUserOrgs200Response.php b/src/Model/ListUserOrgs200Response.php index 3ab3a6cf8..49618631f 100644 --- a/src/Model/ListUserOrgs200Response.php +++ b/src/Model/ListUserOrgs200Response.php @@ -13,12 +13,15 @@ */ final class ListUserOrgs200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -36,9 +39,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Organization[]|null - */ + /** + * @return Organization[]|null + */ public function getItems(): ?array { return $this->items; @@ -49,3 +52,4 @@ public function getLinks(): ?ListLinks return $this->links; } } + diff --git a/src/Model/LogsForwarding.php b/src/Model/LogsForwarding.php index a2b6d49de..dff8b74d2 100644 --- a/src/Model/LogsForwarding.php +++ b/src/Model/LogsForwarding.php @@ -13,11 +13,14 @@ */ final class LogsForwarding implements Model, JsonSerializable { + + public function __construct( private readonly int $maxExtraPayloadSize, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Limit on the maximum size for the custom extra attributes added to the forwarded logs payload - */ + /** + * Limit on the maximum size for the custom extra attributes added to the forwarded logs payload + */ public function getMaxExtraPayloadSize(): int { return $this->maxExtraPayloadSize; } } + diff --git a/src/Model/Maintenance.php b/src/Model/Maintenance.php index 63c3e107c..7fe118725 100644 --- a/src/Model/Maintenance.php +++ b/src/Model/Maintenance.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,11 +14,14 @@ */ final class Maintenance implements Model, JsonSerializable { + + public function __construct( - private readonly DateTime $nextMaintenance, + private readonly \DateTime $nextMaintenance, ) { } + public function getModelName(): string { return self::class; @@ -37,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Estimated date and time of the next maintenance activity - */ - public function getNextMaintenance(): DateTime + /** + * Estimated date and time of the next maintenance activity + */ + public function getNextMaintenance(): \DateTime { return $this->nextMaintenance; } } + diff --git a/src/Model/MaintenanceWindowConfiguration.php b/src/Model/MaintenanceWindowConfiguration.php index da2a15db7..1d32772c3 100644 --- a/src/Model/MaintenanceWindowConfiguration.php +++ b/src/Model/MaintenanceWindowConfiguration.php @@ -14,11 +14,14 @@ */ final class MaintenanceWindowConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly Recurrence $recurrence, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Defines the recurring schedule for the maintenance window - */ + /** + * Defines the recurring schedule for the maintenance window + */ public function getRecurrence(): Recurrence { return $this->recurrence; } } + diff --git a/src/Model/MergeInfo.php b/src/Model/MergeInfo.php index 1880926ba..2ce06cdc1 100644 --- a/src/Model/MergeInfo.php +++ b/src/Model/MergeInfo.php @@ -14,6 +14,8 @@ */ final class MergeInfo implements Model, JsonSerializable { + + public function __construct( private readonly ?int $commitsAhead, private readonly ?int $commitsBehind, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The amount of commits that are in the environment but not in the parent - */ + /** + * The amount of commits that are in the environment but not in the parent + */ public function getCommitsAhead(): ?int { return $this->commitsAhead; } - /** - * The amount of commits that are in the parent but not in the environment - */ + /** + * The amount of commits that are in the parent but not in the environment + */ public function getCommitsBehind(): ?int { return $this->commitsBehind; } - /** - * The reference in Git for the parent environment - */ + /** + * The reference in Git for the parent environment + */ public function getParentRef(): ?string { return $this->parentRef; } } + diff --git a/src/Model/Metrics.php b/src/Model/Metrics.php index 3aa1103bd..57561adf1 100644 --- a/src/Model/Metrics.php +++ b/src/Model/Metrics.php @@ -13,11 +13,14 @@ */ final class Metrics implements Model, JsonSerializable { + + public function __construct( private readonly string $maxRange, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Limit on the maximum time range allowed in metrics retrieval - */ + /** + * Limit on the maximum time range allowed in metrics retrieval + */ public function getMaxRange(): string { return $this->maxRange; } } + diff --git a/src/Model/MetricsMetadata.php b/src/Model/MetricsMetadata.php index 853eaa31d..bf1557e96 100644 --- a/src/Model/MetricsMetadata.php +++ b/src/Model/MetricsMetadata.php @@ -13,6 +13,8 @@ */ final class MetricsMetadata implements Model, JsonSerializable { + + public function __construct( private readonly mixed $from = null, private readonly mixed $to = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,35 +44,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The value used to calculate the lower bound of the temporal query. Inclusive. - */ + /** + * The value used to calculate the lower bound of the temporal query. Inclusive. + */ public function getFrom(): mixed { return $this->from; } - /** - * The truncated value used to calculate the upper bound of the temporal query. Exclusive. - */ + /** + * The truncated value used to calculate the upper bound of the temporal query. Exclusive. + */ public function getTo(): mixed { return $this->to; } - /** - * The interval used to group the metric values. - */ + /** + * The interval used to group the metric values. + */ public function getInterval(): mixed { return $this->interval; } - /** - * The units associated with the provided values. - */ + /** + * The units associated with the provided values. + */ public function getUnits(): mixed { return $this->units; } } + diff --git a/src/Model/MetricsValue.php b/src/Model/MetricsValue.php index 578419b58..7302fd1d8 100644 --- a/src/Model/MetricsValue.php +++ b/src/Model/MetricsValue.php @@ -13,12 +13,15 @@ */ final class MetricsValue implements Model, JsonSerializable { + + public function __construct( private readonly mixed $value = null, private readonly mixed $startTime = null, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +40,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The measured value of the metric for the given time interval. - */ + /** + * The measured value of the metric for the given time interval. + */ public function getValue(): mixed { return $this->value; } - /** - * The timestamp at which the time interval began. - */ + /** + * The timestamp at which the time interval began. + */ public function getStartTime(): mixed { return $this->startTime; } } + diff --git a/src/Model/MinimumResources.php b/src/Model/MinimumResources.php index 3d1564486..2f5d1a661 100644 --- a/src/Model/MinimumResources.php +++ b/src/Model/MinimumResources.php @@ -13,6 +13,7 @@ */ final class MinimumResources implements Model, JsonSerializable { + public const CPU_TYPE_GUARANTEED = 'guaranteed'; public const CPU_TYPE_SHARED = 'shared'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -71,3 +73,4 @@ public function getProfileSize(): ?string return $this->profileSize; } } + diff --git a/src/Model/Mode.php b/src/Model/Mode.php index 8456bd8a7..7084ff000 100644 --- a/src/Model/Mode.php +++ b/src/Model/Mode.php @@ -66,3 +66,4 @@ public function __toString(): string return $this->value; } } + diff --git a/src/Model/MountsValue.php b/src/Model/MountsValue.php index 9a047eb89..9f0d8f57d 100644 --- a/src/Model/MountsValue.php +++ b/src/Model/MountsValue.php @@ -13,6 +13,7 @@ */ final class MountsValue implements Model, JsonSerializable { + public const SOURCE_INSTANCE = 'instance'; public const SOURCE_LOCAL = 'local'; public const SOURCE_SERVICE = 'service'; @@ -27,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +63,4 @@ public function getService(): ?string return $this->service; } } + diff --git a/src/Model/NewRelic.php b/src/Model/NewRelic.php index 041a7d45c..c036794f2 100644 --- a/src/Model/NewRelic.php +++ b/src/Model/NewRelic.php @@ -14,12 +14,15 @@ */ final class NewRelic implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/NewRelicIntegration.php b/src/Model/NewRelicIntegration.php index 660c28dd5..fa94f16a6 100644 --- a/src/Model/NewRelicIntegration.php +++ b/src/Model/NewRelicIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level NewRelicIntegration (auto-generated) @@ -14,6 +14,8 @@ */ final class NewRelicIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, @@ -21,12 +23,13 @@ public function __construct( private readonly string $url, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -52,33 +55,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -89,17 +92,17 @@ public function getExtra(): array return $this->extra; } - /** - * The NewRelic Logs endpoint - */ + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -110,11 +113,12 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of NewRelicIntegration - */ + /** + * The identifier of NewRelicIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/NewRelicIntegrationCreateInput.php b/src/Model/NewRelicIntegrationCreateInput.php index e075d433d..ac23a6542 100644 --- a/src/Model/NewRelicIntegrationCreateInput.php +++ b/src/Model/NewRelicIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level NewRelicIntegrationCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class NewRelicIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,25 +49,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The NewRelic Logs endpoint - */ + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The NewRelic Logs License Key - */ + /** + * The NewRelic Logs License Key + */ public function getLicenseKey(): string { return $this->licenseKey; @@ -74,9 +78,9 @@ public function getExtra(): ?array return $this->extra; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -87,3 +91,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/NewRelicIntegrationPatch.php b/src/Model/NewRelicIntegrationPatch.php index d88406d8a..19a009262 100644 --- a/src/Model/NewRelicIntegrationPatch.php +++ b/src/Model/NewRelicIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level NewRelicIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class NewRelicIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,25 +49,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The NewRelic Logs endpoint - */ + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The NewRelic Logs License Key - */ + /** + * The NewRelic Logs License Key + */ public function getLicenseKey(): string { return $this->licenseKey; @@ -74,9 +78,9 @@ public function getExtra(): ?array return $this->extra; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -87,3 +91,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/OAuth2Consumer.php b/src/Model/OAuth2Consumer.php index abc40eb29..0c87aeb29 100644 --- a/src/Model/OAuth2Consumer.php +++ b/src/Model/OAuth2Consumer.php @@ -14,11 +14,14 @@ */ final class OAuth2Consumer implements Model, JsonSerializable { + + public function __construct( private readonly string $key, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The OAuth consumer key. - */ + /** + * The OAuth consumer key. + */ public function getKey(): string { return $this->key; } } + diff --git a/src/Model/OAuth2Consumer1.php b/src/Model/OAuth2Consumer1.php index 01d56685e..e7b44e777 100644 --- a/src/Model/OAuth2Consumer1.php +++ b/src/Model/OAuth2Consumer1.php @@ -14,12 +14,15 @@ */ final class OAuth2Consumer1 implements Model, JsonSerializable { + + public function __construct( private readonly string $key, private readonly string $secret, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The OAuth consumer key. - */ + /** + * The OAuth consumer key. + */ public function getKey(): string { return $this->key; } - /** - * The OAuth consumer secret. - */ + /** + * The OAuth consumer secret. + */ public function getSecret(): string { return $this->secret; } } + diff --git a/src/Model/OCIImage.php b/src/Model/OCIImage.php index 001724ff3..88a927671 100644 --- a/src/Model/OCIImage.php +++ b/src/Model/OCIImage.php @@ -13,12 +13,15 @@ */ final class OCIImage implements Model, JsonSerializable { + + public function __construct( private readonly ?string $name = null, private readonly ?string $buildfile = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getBuildfile(): ?string return $this->buildfile; } } + diff --git a/src/Model/Object.php b/src/Model/Object.php index 5d5801dc0..95c8eeddb 100644 --- a/src/Model/Object.php +++ b/src/Model/Object.php @@ -14,12 +14,15 @@ */ final class Object implements Model, JsonSerializable { + + public function __construct( private readonly string $type, private readonly string $sha, ) { } + public function getModelName(): string { return self::class; @@ -38,9 +41,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of object pointed to - */ + /** + * The type of object pointed to + */ public function getType(): string { return $this->type; @@ -51,3 +54,4 @@ public function getSha(): string return $this->sha; } } + diff --git a/src/Model/ObjectStorage.php b/src/Model/ObjectStorage.php index 67178fd16..e02727335 100644 --- a/src/Model/ObjectStorage.php +++ b/src/Model/ObjectStorage.php @@ -13,6 +13,8 @@ */ final class ObjectStorage implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly int $minStorage, @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,69 +52,70 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, implicit object-storage can be used. - */ + /** + * If true, implicit object-storage can be used. + */ public function getEnabled(): bool { return $this->enabled; } - /** - * Lower bound for the size of implicit object-storage on the project, in MiB. - */ + /** + * Lower bound for the size of implicit object-storage on the project, in MiB. + */ public function getMinStorage(): int { return $this->minStorage; } - /** - * Upper bound for the size of implicit object-storage on the project, in MiB. - */ + /** + * Upper bound for the size of implicit object-storage on the project, in MiB. + */ public function getMaxStorage(): int { return $this->maxStorage; } - /** - * Granularity of implicit object-storage allocations, in MiB. resources.disk.object, min_storage and max_storage - * must all be multiples of this value. - */ + /** + * Granularity of implicit object-storage allocations, in MiB. resources.disk.object, min_storage and max_storage + * must all be multiples of this value. + */ public function getStorageStep(): int { return $this->storageStep; } - /** - * CPU granted to the implicit object-storage service for each storage_step of allocated quota. - */ + /** + * CPU granted to the implicit object-storage service for each storage_step of allocated quota. + */ public function getCpuPerStep(): float { return $this->cpuPerStep; } - /** - * Memory granted to the implicit object-storage service for each storage_step of allocated quota, in MiB. - */ + /** + * Memory granted to the implicit object-storage service for each storage_step of allocated quota, in MiB. + */ public function getMemoryPerStep(): int { return $this->memoryPerStep; } - /** - * Upper bound on the CPU granted to the implicit object-storage service, regardless of the configured quota. - */ + /** + * Upper bound on the CPU granted to the implicit object-storage service, regardless of the configured quota. + */ public function getMaxCpu(): float { return $this->maxCpu; } - /** - * Upper bound on the memory granted to the implicit object-storage service, in MiB, regardless of the configured - * quota. - */ + /** + * Upper bound on the memory granted to the implicit object-storage service, in MiB, regardless of the configured + * quota. + */ public function getMaxMemory(): int { return $this->maxMemory; } } + diff --git a/src/Model/ObservabilityEntrypoint200Response.php b/src/Model/ObservabilityEntrypoint200Response.php index 97cc4d0ba..f44b5ffd8 100644 --- a/src/Model/ObservabilityEntrypoint200Response.php +++ b/src/Model/ObservabilityEntrypoint200Response.php @@ -13,6 +13,7 @@ */ final class ObservabilityEntrypoint200Response implements Model, JsonSerializable { + public const ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const ENVIRONMENT_TYPE_STAGING = 'staging'; public const ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -33,6 +34,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -109,3 +111,4 @@ public function getDataRetention(): ObservabilityEntrypoint200ResponseDataRetent return $this->dataRetention; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php index ace445942..0b0d8b85f 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseDataRetention implements Model, JsonSerializable { + + public function __construct( private readonly string $unit, private readonly int $unitInSeconds, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -82,3 +85,4 @@ public function getContinuousProfiling(): ObservabilityEntrypoint200ResponseData return $this->continuousProfiling; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php index f7867bd49..1c198a90a 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling implements Model, JsonSerializable { + + public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php index a59a789e1..05741353c 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic implements Model, JsonSerializable { + + public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php index 2e2cc9c0f..b1b40e566 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionLogs implements Model, JsonSerializable { + + public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php index 2ff486d00..ccb47ef59 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionResources implements Model, JsonSerializable { + + public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php index 032e8c653..d378704cb 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring implements Model, JsonSerializable { + + public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinks.php b/src/Model/ObservabilityEntrypoint200ResponseLinks.php index bbf17c420..b0a53ad30 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinks.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinks.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseLinks implements Model, JsonSerializable { + + public function __construct( private readonly ObservabilityEntrypoint200ResponseLinksSelf $self, private readonly array $resourcesByService, @@ -34,6 +36,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -72,9 +75,9 @@ public function getSelf(): ObservabilityEntrypoint200ResponseLinksSelf return $this->self; } - /** - * @return ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue[] - */ + /** + * @return ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue[] + */ public function getResourcesByService(): array { return $this->resourcesByService; @@ -155,3 +158,4 @@ public function getConprofFlamegraph(): ObservabilityEntrypoint200ResponseLinksC return $this->conprofFlamegraph; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php index 3a93c1e93..c1db4a7a1 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php index 4ea1d1295..8ea0a1542 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php index 097aed4d8..9b728debf 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php index 620659972..111eea87a 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php index 291a60a2f..566ef0a46 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofApplications implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php index 10e8f0541..d85c71dbd 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofFlamegraph implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php index a0c51fa9a..f1d492c95 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofTimeline implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php index d571d07a2..32c9f15eb 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php index 6ddcabc03..2f941e738 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php index 5a489e969..5ef78bab3 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php index c7428f57a..bacaa4aaf 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php index aa4bf9c6d..7f3661911 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksLogsOverview implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php index 2e31a60d5..020abd0d4 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksLogsQuery implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php index 8afb043b8..c38faaefd 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php @@ -13,12 +13,15 @@ */ final class ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php index a925f5db2..569caca9c 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksResourcesOverview implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php index 34d8ce3e7..710662ccf 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksResourcesSummary implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php b/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php index a8f3ca1bf..6955286bf 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php @@ -13,11 +13,14 @@ */ final class ObservabilityEntrypoint200ResponseLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly string $href, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getHref(): string return $this->href; } } + diff --git a/src/Model/ObservabilityEntrypoint200ResponseRetention.php b/src/Model/ObservabilityEntrypoint200ResponseRetention.php index e8b93b5b8..508df91c8 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseRetention.php +++ b/src/Model/ObservabilityEntrypoint200ResponseRetention.php @@ -13,6 +13,8 @@ */ final class ObservabilityEntrypoint200ResponseRetention implements Model, JsonSerializable { + + public function __construct( private readonly int $resources, private readonly int $logs, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getContinuousProfiling(): int return $this->continuousProfiling; } } + diff --git a/src/Model/OpenTelemetry.php b/src/Model/OpenTelemetry.php index fc911f32d..dfe277f2e 100644 --- a/src/Model/OpenTelemetry.php +++ b/src/Model/OpenTelemetry.php @@ -14,12 +14,15 @@ */ final class OpenTelemetry implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/OperationsValue.php b/src/Model/OperationsValue.php index c4621282c..3bb968470 100644 --- a/src/Model/OperationsValue.php +++ b/src/Model/OperationsValue.php @@ -13,6 +13,7 @@ */ final class OperationsValue implements Model, JsonSerializable { + public const ROLE_ADMIN = 'admin'; public const ROLE_CONTRIBUTOR = 'contributor'; public const ROLE_VIEWER = 'viewer'; @@ -24,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -58,3 +60,4 @@ public function getRole(): string return $this->role; } } + diff --git a/src/Model/Order.php b/src/Model/Order.php index 51a054192..d94793de9 100644 --- a/src/Model/Order.php +++ b/src/Model/Order.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class Order implements Model, JsonSerializable { + public const STATUS_COMPLETED = 'completed'; public const STATUS_PAST_DUE = 'past_due'; public const STATUS_PENDING = 'pending'; @@ -23,15 +23,15 @@ final class Order implements Model, JsonSerializable public const STATUS_PAYMENT_FAILED_HARD_DECLINE = 'payment_failed_hard_decline'; public function __construct( - private readonly ?DateTime $paidOn = null, + private readonly ?\DateTime $paidOn = null, private readonly ?string $id = null, private readonly ?string $status = null, private readonly ?string $owner = null, private readonly ?Address $address = null, private readonly ?string $company = null, private readonly ?string $vatNumber = null, - private readonly ?DateTime $billingPeriodStart = null, - private readonly ?DateTime $billingPeriodEnd = null, + private readonly ?\DateTime $billingPeriodStart = null, + private readonly ?\DateTime $billingPeriodEnd = null, private readonly ?OrderBillingPeriodLabel $billingPeriodLabel = null, private readonly ?int $billingPeriodDuration = null, private readonly ?int $total = null, @@ -39,13 +39,14 @@ public function __construct( private readonly ?Components $components = null, private readonly ?string $currency = null, private readonly ?string $invoiceUrl = null, - private readonly ?DateTime $lastRefreshed = null, + private readonly ?\DateTime $lastRefreshed = null, private readonly ?bool $invoiced = null, private readonly ?array $lineItems = [], private readonly ?OrderLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -82,164 +83,165 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the order. - */ + /** + * The ID of the order. + */ public function getId(): ?string { return $this->id; } - /** - * The status of the subscription. - */ + /** + * The status of the subscription. + */ public function getStatus(): ?string { return $this->status; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * The address of the user. - */ + /** + * The address of the user. + */ public function getAddress(): ?Address { return $this->address; } - /** - * The company name. - */ + /** + * The company name. + */ public function getCompany(): ?string { return $this->company; } - /** - * An identifier used in many countries for value added tax purposes. - */ + /** + * An identifier used in many countries for value added tax purposes. + */ public function getVatNumber(): ?string { return $this->vatNumber; } - /** - * The time when the billing period of the order started. - */ - public function getBillingPeriodStart(): ?DateTime + /** + * The time when the billing period of the order started. + */ + public function getBillingPeriodStart(): ?\DateTime { return $this->billingPeriodStart; } - /** - * The time when the billing period of the order ended. - */ - public function getBillingPeriodEnd(): ?DateTime + /** + * The time when the billing period of the order ended. + */ + public function getBillingPeriodEnd(): ?\DateTime { return $this->billingPeriodEnd; } - /** - * Descriptive information about the billing cycle. - */ + /** + * Descriptive information about the billing cycle. + */ public function getBillingPeriodLabel(): ?OrderBillingPeriodLabel { return $this->billingPeriodLabel; } - /** - * The duration of the billing period of the order in seconds. - */ + /** + * The duration of the billing period of the order in seconds. + */ public function getBillingPeriodDuration(): ?int { return $this->billingPeriodDuration; } - /** - * The time when the order was successfully charged. - */ - public function getPaidOn(): ?DateTime + /** + * The time when the order was successfully charged. + */ + public function getPaidOn(): ?\DateTime { return $this->paidOn; } - /** - * The total of the order. - */ + /** + * The total of the order. + */ public function getTotal(): ?int { return $this->total; } - /** - * The total of the order, formatted with currency. - */ + /** + * The total of the order, formatted with currency. + */ public function getTotalFormatted(): ?int { return $this->totalFormatted; } - /** - * The components of the project - */ + /** + * The components of the project + */ public function getComponents(): ?Components { return $this->components; } - /** - * The order currency code. - */ + /** + * The order currency code. + */ public function getCurrency(): ?string { return $this->currency; } - /** - * A link to the PDF invoice. - */ + /** + * A link to the PDF invoice. + */ public function getInvoiceUrl(): ?string { return $this->invoiceUrl; } - /** - * The time when the order was last refreshed. - */ - public function getLastRefreshed(): ?DateTime + /** + * The time when the order was last refreshed. + */ + public function getLastRefreshed(): ?\DateTime { return $this->lastRefreshed; } - /** - * The customer is invoiced. - */ + /** + * The customer is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } - /** - * The line items that comprise the order. - * @return LineItem[]|null - */ + /** + * The line items that comprise the order. + * @return LineItem[]|null + */ public function getLineItems(): ?array { return $this->lineItems; } - /** - * Links to related API endpoints. - */ + /** + * Links to related API endpoints. + */ public function getLinks(): ?OrderLinks { return $this->links; } } + diff --git a/src/Model/OrderBillingPeriodLabel.php b/src/Model/OrderBillingPeriodLabel.php index bd4ca23bb..c372cf3a3 100644 --- a/src/Model/OrderBillingPeriodLabel.php +++ b/src/Model/OrderBillingPeriodLabel.php @@ -14,6 +14,8 @@ */ final class OrderBillingPeriodLabel implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?string $month = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The renderable label for the billing cycle. - */ + /** + * The renderable label for the billing cycle. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * The month of the billing cycle. - */ + /** + * The month of the billing cycle. + */ public function getMonth(): ?string { return $this->month; } - /** - * The year of the billing cycle. - */ + /** + * The year of the billing cycle. + */ public function getYear(): ?string { return $this->year; } - /** - * The name of the next month following this billing cycle. - */ + /** + * The name of the next month following this billing cycle. + */ public function getNextMonth(): ?string { return $this->nextMonth; } } + diff --git a/src/Model/OrderLinks.php b/src/Model/OrderLinks.php index e49730ba1..6dbba5c72 100644 --- a/src/Model/OrderLinks.php +++ b/src/Model/OrderLinks.php @@ -14,11 +14,14 @@ */ final class OrderLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?OrderLinksInvoices $invoices = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to related Invoices API. Use this to retrieve invoices related to this order. - */ + /** + * Link to related Invoices API. Use this to retrieve invoices related to this order. + */ public function getInvoices(): ?OrderLinksInvoices { return $this->invoices; } } + diff --git a/src/Model/OrderLinksInvoices.php b/src/Model/OrderLinksInvoices.php index bca436ba7..531f90794 100644 --- a/src/Model/OrderLinksInvoices.php +++ b/src/Model/OrderLinksInvoices.php @@ -14,11 +14,14 @@ */ final class OrderLinksInvoices implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/Organization.php b/src/Model/Organization.php index ee2d86a42..6bee63ed5 100644 --- a/src/Model/Organization.php +++ b/src/Model/Organization.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class Organization implements Model, JsonSerializable { + public const TYPE_FIXED = 'fixed'; public const TYPE_FLEXIBLE = 'flexible'; public const STATUS_ACTIVE = 'active'; @@ -36,12 +36,13 @@ public function __construct( private readonly ?string $securityContact = null, private readonly ?OrganizationAiAgentSettings $aiAgentSettings = null, private readonly ?string $status = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?OrganizationLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -75,57 +76,57 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getId(): ?string { return $this->id; } - /** - * The type of the organization. - */ + /** + * The type of the organization. + */ public function getType(): ?string { return $this->type; } - /** - * The ID of the owner. - */ + /** + * The ID of the owner. + */ public function getOwnerId(): ?string { return $this->ownerId; } - /** - * The namespace in which the organization name is unique. - */ + /** + * The namespace in which the organization name is unique. + */ public function getNamespace(): ?string { return $this->namespace; } - /** - * A unique machine name representing the organization. - */ + /** + * A unique machine name representing the organization. + */ public function getName(): ?string { return $this->name; } - /** - * The human-readable label of the organization. - */ + /** + * The human-readable label of the organization. + */ public function getLabel(): ?string { return $this->label; } - /** - * The organization country (2-letter country code). - */ + /** + * The organization country (2-letter country code). + */ public function getCountry(): ?string { return $this->country; @@ -136,66 +137,66 @@ public function getCapabilities(): ?array return $this->capabilities; } - /** - * The vendor. - */ + /** + * The vendor. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The Billing Profile ID. - */ + /** + * The Billing Profile ID. + */ public function getBillingProfileId(): ?string { return $this->billingProfileId; } - /** - * Whether the account is billed with the legacy system. - */ + /** + * Whether the account is billed with the legacy system. + */ public function getBillingLegacy(): ?bool { return $this->billingLegacy; } - /** - * The security contact email address for the organization. - */ + /** + * The security contact email address for the organization. + */ public function getSecurityContact(): ?string { return $this->securityContact; } - /** - * AI agent consent settings for the organization. - */ + /** + * AI agent consent settings for the organization. + */ public function getAiAgentSettings(): ?OrganizationAiAgentSettings { return $this->aiAgentSettings; } - /** - * The status of the organization. - */ + /** + * The status of the organization. + */ public function getStatus(): ?string { return $this->status; } - /** - * The date and time when the organization was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the organization was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the organization was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the organization was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } @@ -205,3 +206,4 @@ public function getLinks(): ?OrganizationLinks return $this->links; } } + diff --git a/src/Model/OrganizationAddonsObject.php b/src/Model/OrganizationAddonsObject.php index 1fe62a98a..284bdc832 100644 --- a/src/Model/OrganizationAddonsObject.php +++ b/src/Model/OrganizationAddonsObject.php @@ -14,6 +14,8 @@ */ final class OrganizationAddonsObject implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationAddonsObjectAvailable $available = null, private readonly ?OrganizationAddonsObjectCurrent $current = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The list of available add-ons and their possible values. - */ + /** + * The list of available add-ons and their possible values. + */ public function getAvailable(): ?OrganizationAddonsObjectAvailable { return $this->available; } - /** - * The list of existing add-ons and their current values. - */ + /** + * The list of existing add-ons and their current values. + */ public function getCurrent(): ?OrganizationAddonsObjectCurrent { return $this->current; } - /** - * The upgrades available for current add-ons. - */ + /** + * The upgrades available for current add-ons. + */ public function getUpgradesAvailable(): ?OrganizationAddonsObjectUpgradesAvailable { return $this->upgradesAvailable; } } + diff --git a/src/Model/OrganizationAddonsObjectAvailable.php b/src/Model/OrganizationAddonsObjectAvailable.php index f597aa18a..5e752c44b 100644 --- a/src/Model/OrganizationAddonsObjectAvailable.php +++ b/src/Model/OrganizationAddonsObjectAvailable.php @@ -14,12 +14,15 @@ */ final class OrganizationAddonsObjectAvailable implements Model, JsonSerializable { + + public function __construct( private readonly ?array $userManagement = [], private readonly ?array $supportLevel = [], ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getSupportLevel(): ?array return $this->supportLevel; } } + diff --git a/src/Model/OrganizationAddonsObjectCurrent.php b/src/Model/OrganizationAddonsObjectCurrent.php index a2d7ef298..48b846d48 100644 --- a/src/Model/OrganizationAddonsObjectCurrent.php +++ b/src/Model/OrganizationAddonsObjectCurrent.php @@ -14,12 +14,15 @@ */ final class OrganizationAddonsObjectCurrent implements Model, JsonSerializable { + + public function __construct( private readonly ?array $userManagement = [], private readonly ?array $supportLevel = [], ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getSupportLevel(): ?array return $this->supportLevel; } } + diff --git a/src/Model/OrganizationAddonsObjectUpgradesAvailable.php b/src/Model/OrganizationAddonsObjectUpgradesAvailable.php index bb52f399d..1e4387bd5 100644 --- a/src/Model/OrganizationAddonsObjectUpgradesAvailable.php +++ b/src/Model/OrganizationAddonsObjectUpgradesAvailable.php @@ -14,12 +14,15 @@ */ final class OrganizationAddonsObjectUpgradesAvailable implements Model, JsonSerializable { + + public function __construct( private readonly ?array $userManagement = [], private readonly ?array $supportLevel = [], ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getSupportLevel(): ?array return $this->supportLevel; } } + diff --git a/src/Model/OrganizationAiAgentSettings.php b/src/Model/OrganizationAiAgentSettings.php index 95fc3a52d..9737ab7e7 100644 --- a/src/Model/OrganizationAiAgentSettings.php +++ b/src/Model/OrganizationAiAgentSettings.php @@ -14,6 +14,8 @@ */ final class OrganizationAiAgentSettings implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $canEnable = null, private readonly ?bool $performanceAgentEnabled = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Master switch for AI agent settings. Must be true to enable individual agents. - */ + /** + * Master switch for AI agent settings. Must be true to enable individual agents. + */ public function getCanEnable(): ?bool { return $this->canEnable; } - /** - * Whether the performance agent is enabled. - */ + /** + * Whether the performance agent is enabled. + */ public function getPerformanceAgentEnabled(): ?bool { return $this->performanceAgentEnabled; } - /** - * Whether the log analyzer agent is enabled. - */ + /** + * Whether the log analyzer agent is enabled. + */ public function getLogAnalyzerAgentEnabled(): ?bool { return $this->logAnalyzerAgentEnabled; } } + diff --git a/src/Model/OrganizationAlertConfig.php b/src/Model/OrganizationAlertConfig.php index 4b4eca3b6..52d6a0bdc 100644 --- a/src/Model/OrganizationAlertConfig.php +++ b/src/Model/OrganizationAlertConfig.php @@ -14,6 +14,8 @@ */ final class OrganizationAlertConfig implements Model, JsonSerializable { + + public function __construct( private readonly ?string $lastAlertAt = null, private readonly ?string $updatedAt = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Type of alert (e.g. "billing") - */ + /** + * Type of alert (e.g. "billing") + */ public function getId(): ?string { return $this->id; } - /** - * Whether the billing alert should be active or not. - */ + /** + * Whether the billing alert should be active or not. + */ public function getActive(): ?bool { return $this->active; } - /** - * Number of alerts sent. - */ + /** + * Number of alerts sent. + */ public function getAlertsSent(): ?float { return $this->alertsSent; } - /** - * The datetime the alert was last sent. - */ + /** + * The datetime the alert was last sent. + */ public function getLastAlertAt(): ?string { return $this->lastAlertAt; } - /** - * The datetime the alert was last updated. - */ + /** + * The datetime the alert was last updated. + */ public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * Configuration for threshold and mode. - */ + /** + * Configuration for threshold and mode. + */ public function getConfig(): ?OrganizationAlertConfigConfig { return $this->config; } } + diff --git a/src/Model/OrganizationAlertConfigConfig.php b/src/Model/OrganizationAlertConfigConfig.php index e8d208683..e17736aec 100644 --- a/src/Model/OrganizationAlertConfigConfig.php +++ b/src/Model/OrganizationAlertConfigConfig.php @@ -14,12 +14,15 @@ */ final class OrganizationAlertConfigConfig implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationAlertConfigConfigThreshold $threshold = null, private readonly ?string $mode = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Data regarding threshold spend. - */ + /** + * Data regarding threshold spend. + */ public function getThreshold(): ?OrganizationAlertConfigConfigThreshold { return $this->threshold; } - /** - * The mode of alert. - */ + /** + * The mode of alert. + */ public function getMode(): ?string { return $this->mode; } } + diff --git a/src/Model/OrganizationAlertConfigConfigThreshold.php b/src/Model/OrganizationAlertConfigConfigThreshold.php index 50181cd0c..f0f3e26bc 100644 --- a/src/Model/OrganizationAlertConfigConfigThreshold.php +++ b/src/Model/OrganizationAlertConfigConfigThreshold.php @@ -14,6 +14,8 @@ */ final class OrganizationAlertConfigConfigThreshold implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted threshold value. - */ + /** + * Formatted threshold value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Threshold value. - */ + /** + * Threshold value. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Threshold currency code. - */ + /** + * Threshold currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * Threshold currency symbol. - */ + /** + * Threshold currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } + diff --git a/src/Model/OrganizationCarbon.php b/src/Model/OrganizationCarbon.php index 55ba8e32e..43f39a295 100644 --- a/src/Model/OrganizationCarbon.php +++ b/src/Model/OrganizationCarbon.php @@ -13,6 +13,8 @@ */ final class OrganizationCarbon implements Model, JsonSerializable { + + public function __construct( private readonly ?string $organizationId = null, private readonly ?MetricsMetadata $meta = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,9 +44,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; @@ -54,19 +57,20 @@ public function getMeta(): ?MetricsMetadata return $this->meta; } - /** - * @return OrganizationProjectCarbon[]|null - */ + /** + * @return OrganizationProjectCarbon[]|null + */ public function getProjects(): ?array { return $this->projects; } - /** - * The calculated total of the metric for the given interval. - */ + /** + * The calculated total of the metric for the given interval. + */ public function getTotal(): ?float { return $this->total; } } + diff --git a/src/Model/OrganizationEstimationObject.php b/src/Model/OrganizationEstimationObject.php index bae391316..0fcb4ae65 100644 --- a/src/Model/OrganizationEstimationObject.php +++ b/src/Model/OrganizationEstimationObject.php @@ -14,6 +14,8 @@ */ final class OrganizationEstimationObject implements Model, JsonSerializable { + + public function __construct( private readonly ?string $total = null, private readonly ?string $subTotal = null, @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -48,59 +51,60 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The total estimated price for the organization. - */ + /** + * The total estimated price for the organization. + */ public function getTotal(): ?string { return $this->total; } - /** - * The sub total for all projects and sellables. - */ + /** + * The sub total for all projects and sellables. + */ public function getSubTotal(): ?string { return $this->subTotal; } - /** - * The total amount of vouchers. - */ + /** + * The total amount of vouchers. + */ public function getVouchers(): ?string { return $this->vouchers; } - /** - * An estimation of user licenses cost. - */ + /** + * An estimation of user licenses cost. + */ public function getUserLicenses(): ?OrganizationEstimationObjectUserLicenses { return $this->userLicenses; } - /** - * An estimation of the advanced user management sellable cost. - */ + /** + * An estimation of the advanced user management sellable cost. + */ public function getUserManagement(): ?string { return $this->userManagement; } - /** - * The total monthly price for premium support. - */ + /** + * The total monthly price for premium support. + */ public function getSupportLevel(): ?string { return $this->supportLevel; } - /** - * An estimation of subscriptions cost. - */ + /** + * An estimation of subscriptions cost. + */ public function getSubscriptions(): ?OrganizationEstimationObjectSubscriptions { return $this->subscriptions; } } + diff --git a/src/Model/OrganizationEstimationObjectSubscriptions.php b/src/Model/OrganizationEstimationObjectSubscriptions.php index 1ea87f566..8dd5f0f70 100644 --- a/src/Model/OrganizationEstimationObjectSubscriptions.php +++ b/src/Model/OrganizationEstimationObjectSubscriptions.php @@ -14,12 +14,15 @@ */ final class OrganizationEstimationObjectSubscriptions implements Model, JsonSerializable { + + public function __construct( private readonly ?string $total = null, private readonly ?array $list = [], ) { } + public function getModelName(): string { return self::class; @@ -38,20 +41,21 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The total price for subscriptions. - */ + /** + * The total price for subscriptions. + */ public function getTotal(): ?string { return $this->total; } - /** - * The list of active subscriptions. - * @return OrganizationEstimationObjectSubscriptionsListInner[]|null - */ + /** + * The list of active subscriptions. + * @return OrganizationEstimationObjectSubscriptionsListInner[]|null + */ public function getList(): ?array { return $this->list; } } + diff --git a/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php b/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php index dea7e7e92..943622a38 100644 --- a/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php +++ b/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php @@ -13,6 +13,8 @@ */ final class OrganizationEstimationObjectSubscriptionsListInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $licenseId = null, private readonly ?string $projectTitle = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getUsage(): ?OrganizationEstimationObjectSubscriptionsListInnerU return $this->usage; } } + diff --git a/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php b/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php index 1a558573e..355e7e3ab 100644 --- a/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php +++ b/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php @@ -13,6 +13,8 @@ */ final class OrganizationEstimationObjectSubscriptionsListInnerUsage implements Model, JsonSerializable { + + public function __construct( private readonly ?float $cpu = null, private readonly ?float $memory = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getEnvironments(): ?int return $this->environments; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicenses.php b/src/Model/OrganizationEstimationObjectUserLicenses.php index bab6621df..5e203fb61 100644 --- a/src/Model/OrganizationEstimationObjectUserLicenses.php +++ b/src/Model/OrganizationEstimationObjectUserLicenses.php @@ -14,12 +14,15 @@ */ final class OrganizationEstimationObjectUserLicenses implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationEstimationObjectUserLicensesBase $base = null, private readonly ?OrganizationEstimationObjectUserLicensesUserManagement $userManagement = null, ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getUserManagement(): ?OrganizationEstimationObjectUserLicensesUs return $this->userManagement; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBase.php b/src/Model/OrganizationEstimationObjectUserLicensesBase.php index 03be98faf..0aba62ff8 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBase.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBase.php @@ -13,6 +13,8 @@ */ final class OrganizationEstimationObjectUserLicensesBase implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,17 +42,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of base user licenses. - */ + /** + * The number of base user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for base user licenses. - */ + /** + * The total price for base user licenses. + */ public function getTotal(): ?string { return $this->total; @@ -60,3 +63,4 @@ public function getList(): ?OrganizationEstimationObjectUserLicensesBaseList return $this->list; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php b/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php index 7bde937ca..e4663e18f 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php @@ -13,12 +13,15 @@ */ final class OrganizationEstimationObjectUserLicensesBaseList implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationEstimationObjectUserLicensesBaseListAdminUser $adminUser = null, private readonly ?OrganizationEstimationObjectUserLicensesBaseListViewerUser $viewerUser = null, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +40,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * An estimation of admin users cost. - */ + /** + * An estimation of admin users cost. + */ public function getAdminUser(): ?OrganizationEstimationObjectUserLicensesBaseListAdminUser { return $this->adminUser; } - /** - * An estimation of viewer users cost. - */ + /** + * An estimation of viewer users cost. + */ public function getViewerUser(): ?OrganizationEstimationObjectUserLicensesBaseListViewerUser { return $this->viewerUser; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php b/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php index cfc8858c7..8b7771505 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php @@ -14,12 +14,15 @@ */ final class OrganizationEstimationObjectUserLicensesBaseListAdminUser implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of admin user licenses. - */ + /** + * The number of admin user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for admin user licenses. - */ + /** + * The total price for admin user licenses. + */ public function getTotal(): ?string { return $this->total; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php b/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php index 36282d952..4fcf3f43a 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php @@ -14,12 +14,15 @@ */ final class OrganizationEstimationObjectUserLicensesBaseListViewerUser implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of viewer user licenses. - */ + /** + * The number of viewer user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for viewer user licenses. - */ + /** + * The total price for viewer user licenses. + */ public function getTotal(): ?string { return $this->total; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php index 45dbd36ed..d4ed4970e 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php @@ -13,6 +13,8 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagement implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,17 +42,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of user_management licenses. - */ + /** + * The number of user_management licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for user_management licenses. - */ + /** + * The total price for user_management licenses. + */ public function getTotal(): ?string { return $this->total; @@ -60,3 +63,4 @@ public function getList(): ?OrganizationEstimationObjectUserLicensesUserManageme return $this->list; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php index 6c32b00d9..e6f7c7337 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php @@ -13,12 +13,15 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagementList implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser $standardManagementUser = null, private readonly ?OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser $advancedManagementUser = null, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +40,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * An estimation of standard_management_user cost. - */ + /** + * An estimation of standard_management_user cost. + */ public function getStandardManagementUser(): ?OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser { return $this->standardManagementUser; } - /** - * An estimation of advanced_management_user cost. - */ + /** + * An estimation of advanced_management_user cost. + */ public function getAdvancedManagementUser(): ?OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser { return $this->advancedManagementUser; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php index 095ceb17b..2a3bd5024 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php @@ -14,12 +14,15 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of advanced_management_user licenses. - */ + /** + * The number of advanced_management_user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for advanced_management_user licenses. - */ + /** + * The total price for advanced_management_user licenses. + */ public function getTotal(): ?string { return $this->total; } } + diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php index a996636de..99464f9e7 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php @@ -14,12 +14,15 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser implements Model, JsonSerializable { + + public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of standard_management_user licenses. - */ + /** + * The number of standard_management_user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for standard_management_user licenses. - */ + /** + * The total price for standard_management_user licenses. + */ public function getTotal(): ?string { return $this->total; } } + diff --git a/src/Model/OrganizationInvitation.php b/src/Model/OrganizationInvitation.php index 8d3cf840e..51dea9b1d 100644 --- a/src/Model/OrganizationInvitation.php +++ b/src/Model/OrganizationInvitation.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class OrganizationInvitation implements Model, JsonSerializable { + public const STATE_PENDING = 'pending'; public const STATE_PROCESSING = 'processing'; public const STATE_ACCEPTED = 'accepted'; @@ -27,18 +27,19 @@ final class OrganizationInvitation implements Model, JsonSerializable public const PERMISSIONS_PROJECTS_LIST = 'projects:list'; public function __construct( - private readonly ?DateTime $finishedAt = null, + private readonly ?\DateTime $finishedAt = null, private readonly ?string $id = null, private readonly ?string $state = null, private readonly ?string $organizationId = null, private readonly ?string $email = null, private readonly ?OrganizationInvitationOwner $owner = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?array $permissions = [], ) { } + public function getModelName(): string { return self::class; @@ -64,66 +65,66 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the invitation. - */ + /** + * The ID of the invitation. + */ public function getId(): ?string { return $this->id; } - /** - * The invitation state. - */ + /** + * The invitation state. + */ public function getState(): ?string { return $this->state; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The email address of the invitee. - */ + /** + * The email address of the invitee. + */ public function getEmail(): ?string { return $this->email; } - /** - * The inviter. - */ + /** + * The inviter. + */ public function getOwner(): ?OrganizationInvitationOwner { return $this->owner; } - /** - * The date and time when the invitation was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the invitation was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the invitation was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the invitation was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The date and time when the invitation was finished. - */ - public function getFinishedAt(): ?DateTime + /** + * The date and time when the invitation was finished. + */ + public function getFinishedAt(): ?\DateTime { return $this->finishedAt; } @@ -133,3 +134,4 @@ public function getPermissions(): ?array return $this->permissions; } } + diff --git a/src/Model/OrganizationInvitationOwner.php b/src/Model/OrganizationInvitationOwner.php index e6315cc17..4e691d889 100644 --- a/src/Model/OrganizationInvitationOwner.php +++ b/src/Model/OrganizationInvitationOwner.php @@ -14,12 +14,15 @@ */ final class OrganizationInvitationOwner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $displayName = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): ?string { return $this->id; } - /** - * The user's display name. - */ + /** + * The user's display name. + */ public function getDisplayName(): ?string { return $this->displayName; } } + diff --git a/src/Model/OrganizationLinks.php b/src/Model/OrganizationLinks.php index f59e54e08..f46eecc28 100644 --- a/src/Model/OrganizationLinks.php +++ b/src/Model/OrganizationLinks.php @@ -13,6 +13,8 @@ */ final class OrganizationLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationLinksSelf $self = null, private readonly ?OrganizationLinksUpdate $update = null, @@ -37,6 +39,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -73,163 +76,164 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current organization. - */ + /** + * Link to the current organization. + */ public function getSelf(): ?OrganizationLinksSelf { return $this->self; } - /** - * Link for updating the current organization. - */ + /** + * Link for updating the current organization. + */ public function getUpdate(): ?OrganizationLinksUpdate { return $this->update; } - /** - * Link for deleting the current organization. - */ + /** + * Link for deleting the current organization. + */ public function getDelete(): ?OrganizationLinksDelete { return $this->delete; } - /** - * Link to the current organization's members. - */ + /** + * Link to the current organization's members. + */ public function getMembers(): ?OrganizationLinksMembers { return $this->members; } - /** - * Link for creating a new organization member. - */ + /** + * Link for creating a new organization member. + */ public function getCreateMember(): ?OrganizationLinksCreateMember { return $this->createMember; } - /** - * Link to the current organization's address. This link may not be present for all organizations. - */ + /** + * Link to the current organization's address. This link may not be present for all organizations. + */ public function getAddress(): ?OrganizationLinksAddress { return $this->address; } - /** - * Link to the current organization's billing profile details. This link may not be present for all organizations. - */ + /** + * Link to the current organization's billing profile details. This link may not be present for all organizations. + */ public function getProfile(): ?OrganizationLinksProfile { return $this->profile; } - /** - * Link to the current organization's account. This link may not be present for all organizations. - */ + /** + * Link to the current organization's account. This link may not be present for all organizations. + */ public function getAccount(): ?OrganizationLinksAccount { return $this->account; } - /** - * Link to the current organization's payment source. This link may not be present for all organizations. - */ + /** + * Link to the current organization's payment source. This link may not be present for all organizations. + */ public function getPaymentSource(): ?OrganizationLinksPaymentSource { return $this->paymentSource; } - /** - * Link to the current organization's orders. This link may not be present for all organizations. - */ + /** + * Link to the current organization's orders. This link may not be present for all organizations. + */ public function getOrders(): ?OrganizationLinksOrders { return $this->orders; } - /** - * Link to the current organization's vouchers. This link may not be present for all organizations. - */ + /** + * Link to the current organization's vouchers. This link may not be present for all organizations. + */ public function getVouchers(): ?OrganizationLinksVouchers { return $this->vouchers; } - /** - * Link to the current organization's discounts. This link may not be present for all organizations. - */ + /** + * Link to the current organization's discounts. This link may not be present for all organizations. + */ public function getDiscounts(): ?OrganizationLinksDiscounts { return $this->discounts; } - /** - * Link for applying a voucher for the current organization. This link may not be present for all organizations. - */ + /** + * Link for applying a voucher for the current organization. This link may not be present for all organizations. + */ public function getApplyVoucher(): ?OrganizationLinksApplyVoucher { return $this->applyVoucher; } - /** - * Link to the current organization's subscriptions. This link may not be present for all organizations. - */ + /** + * Link to the current organization's subscriptions. This link may not be present for all organizations. + */ public function getSubscriptions(): ?OrganizationLinksSubscriptions { return $this->subscriptions; } - /** - * Link for creating a new organization subscription. - */ + /** + * Link for creating a new organization subscription. + */ public function getCreateSubscription(): ?OrganizationLinksCreateSubscription { return $this->createSubscription; } - /** - * Link for estimating the price of a new subscription. This link may not be present for all organizations. - */ + /** + * Link for estimating the price of a new subscription. This link may not be present for all organizations. + */ public function getEstimateSubscription(): ?OrganizationLinksEstimateSubscription { return $this->estimateSubscription; } - /** - * Link to the current organization's prepayment information. This link may not be present for all organizations. - */ + /** + * Link to the current organization's prepayment information. This link may not be present for all organizations. + */ public function getPrepayment(): ?OrganizationLinksPrepayment { return $this->prepayment; } - /** - * Link to the organization's billing profile. This link may not be present for all organizations. - */ + /** + * Link to the organization's billing profile. This link may not be present for all organizations. + */ public function getBillingProfile(): ?OrganizationLinksBillingProfile { return $this->billingProfile; } - /** - * Link to the current organization's MFA enforcement settings. This link may not be present for all organizations. - */ + /** + * Link to the current organization's MFA enforcement settings. This link may not be present for all organizations. + */ public function getMfaEnforcement(): ?OrganizationLinksMfaEnforcement { return $this->mfaEnforcement; } - /** - * Link to the current organization's SSO configuration. This link may not be present for all organizations. - */ + /** + * Link to the current organization's SSO configuration. This link may not be present for all organizations. + */ public function getSso(): ?OrganizationLinksSso { return $this->sso; } } + diff --git a/src/Model/OrganizationLinksAccount.php b/src/Model/OrganizationLinksAccount.php index d9ae2f9c6..6f1bd5372 100644 --- a/src/Model/OrganizationLinksAccount.php +++ b/src/Model/OrganizationLinksAccount.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksAccount implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksAddress.php b/src/Model/OrganizationLinksAddress.php index ee3368624..c5c9f6a91 100644 --- a/src/Model/OrganizationLinksAddress.php +++ b/src/Model/OrganizationLinksAddress.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksAddress implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksApplyVoucher.php b/src/Model/OrganizationLinksApplyVoucher.php index fe10631e6..d4043f3b0 100644 --- a/src/Model/OrganizationLinksApplyVoucher.php +++ b/src/Model/OrganizationLinksApplyVoucher.php @@ -14,12 +14,15 @@ */ final class OrganizationLinksApplyVoucher implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationLinksBillingProfile.php b/src/Model/OrganizationLinksBillingProfile.php index 868a5e241..7f1423b37 100644 --- a/src/Model/OrganizationLinksBillingProfile.php +++ b/src/Model/OrganizationLinksBillingProfile.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksBillingProfile implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksCreateMember.php b/src/Model/OrganizationLinksCreateMember.php index 6ed39b111..620b8c8a6 100644 --- a/src/Model/OrganizationLinksCreateMember.php +++ b/src/Model/OrganizationLinksCreateMember.php @@ -14,12 +14,15 @@ */ final class OrganizationLinksCreateMember implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationLinksCreateSubscription.php b/src/Model/OrganizationLinksCreateSubscription.php index 536b35ca9..91353fec3 100644 --- a/src/Model/OrganizationLinksCreateSubscription.php +++ b/src/Model/OrganizationLinksCreateSubscription.php @@ -14,12 +14,15 @@ */ final class OrganizationLinksCreateSubscription implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationLinksDelete.php b/src/Model/OrganizationLinksDelete.php index 086b51fba..92853c4e2 100644 --- a/src/Model/OrganizationLinksDelete.php +++ b/src/Model/OrganizationLinksDelete.php @@ -14,12 +14,15 @@ */ final class OrganizationLinksDelete implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationLinksDiscounts.php b/src/Model/OrganizationLinksDiscounts.php index 0a40f49df..ba56e05d6 100644 --- a/src/Model/OrganizationLinksDiscounts.php +++ b/src/Model/OrganizationLinksDiscounts.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksDiscounts implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksEstimateSubscription.php b/src/Model/OrganizationLinksEstimateSubscription.php index 82a40c91a..0dbbf5482 100644 --- a/src/Model/OrganizationLinksEstimateSubscription.php +++ b/src/Model/OrganizationLinksEstimateSubscription.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksEstimateSubscription implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksMembers.php b/src/Model/OrganizationLinksMembers.php index 81516481f..1cc1ad858 100644 --- a/src/Model/OrganizationLinksMembers.php +++ b/src/Model/OrganizationLinksMembers.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksMembers implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksMfaEnforcement.php b/src/Model/OrganizationLinksMfaEnforcement.php index 10a6c11fb..5eab563f9 100644 --- a/src/Model/OrganizationLinksMfaEnforcement.php +++ b/src/Model/OrganizationLinksMfaEnforcement.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksMfaEnforcement implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksOrders.php b/src/Model/OrganizationLinksOrders.php index cfddd74d4..bc4ccb72f 100644 --- a/src/Model/OrganizationLinksOrders.php +++ b/src/Model/OrganizationLinksOrders.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksOrders implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksPaymentSource.php b/src/Model/OrganizationLinksPaymentSource.php index 6585e65d6..132ecdfa0 100644 --- a/src/Model/OrganizationLinksPaymentSource.php +++ b/src/Model/OrganizationLinksPaymentSource.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksPaymentSource implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksPrepayment.php b/src/Model/OrganizationLinksPrepayment.php index 9e96e2eeb..727bb81aa 100644 --- a/src/Model/OrganizationLinksPrepayment.php +++ b/src/Model/OrganizationLinksPrepayment.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksPrepayment implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksProfile.php b/src/Model/OrganizationLinksProfile.php index 849cd5d61..2db17d32e 100644 --- a/src/Model/OrganizationLinksProfile.php +++ b/src/Model/OrganizationLinksProfile.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksProfile implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksSelf.php b/src/Model/OrganizationLinksSelf.php index ab8f35bab..49d2b7748 100644 --- a/src/Model/OrganizationLinksSelf.php +++ b/src/Model/OrganizationLinksSelf.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksSso.php b/src/Model/OrganizationLinksSso.php index 4a93fc8d0..9e4841fb9 100644 --- a/src/Model/OrganizationLinksSso.php +++ b/src/Model/OrganizationLinksSso.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksSso implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksSubscriptions.php b/src/Model/OrganizationLinksSubscriptions.php index 3e1a37ebb..859f9a75c 100644 --- a/src/Model/OrganizationLinksSubscriptions.php +++ b/src/Model/OrganizationLinksSubscriptions.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksSubscriptions implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationLinksUpdate.php b/src/Model/OrganizationLinksUpdate.php index 164c88437..446a8141f 100644 --- a/src/Model/OrganizationLinksUpdate.php +++ b/src/Model/OrganizationLinksUpdate.php @@ -14,12 +14,15 @@ */ final class OrganizationLinksUpdate implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationLinksVouchers.php b/src/Model/OrganizationLinksVouchers.php index 2118b0566..33b24d5f6 100644 --- a/src/Model/OrganizationLinksVouchers.php +++ b/src/Model/OrganizationLinksVouchers.php @@ -14,11 +14,14 @@ */ final class OrganizationLinksVouchers implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationMember.php b/src/Model/OrganizationMember.php index eb2ec23a9..5af20ab22 100644 --- a/src/Model/OrganizationMember.php +++ b/src/Model/OrganizationMember.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class OrganizationMember implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_MEMBERS = 'members'; @@ -30,12 +30,13 @@ public function __construct( private readonly ?array $permissions = [], private readonly ?string $level = null, private readonly ?bool $owner = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?OrganizationMemberLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -61,25 +62,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getUserId(): ?string { return $this->userId; @@ -90,34 +91,34 @@ public function getPermissions(): ?array return $this->permissions; } - /** - * Access level of the member. - */ + /** + * Access level of the member. + */ public function getLevel(): ?string { return $this->level; } - /** - * Whether the member is the organization owner. - */ + /** + * Whether the member is the organization owner. + */ public function getOwner(): ?bool { return $this->owner; } - /** - * The date and time when the member was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the member was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the member was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the member was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } @@ -127,3 +128,4 @@ public function getLinks(): ?OrganizationMemberLinks return $this->links; } } + diff --git a/src/Model/OrganizationMemberLinks.php b/src/Model/OrganizationMemberLinks.php index 4369ad866..8dfbb0ebf 100644 --- a/src/Model/OrganizationMemberLinks.php +++ b/src/Model/OrganizationMemberLinks.php @@ -13,6 +13,8 @@ */ final class OrganizationMemberLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationMemberLinksSelf $self = null, private readonly ?OrganizationMemberLinksUpdate $update = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +42,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current member. - */ + /** + * Link to the current member. + */ public function getSelf(): ?OrganizationMemberLinksSelf { return $this->self; } - /** - * Link for updating the current member. - */ + /** + * Link for updating the current member. + */ public function getUpdate(): ?OrganizationMemberLinksUpdate { return $this->update; } - /** - * Link for deleting the current member. - */ + /** + * Link for deleting the current member. + */ public function getDelete(): ?OrganizationMemberLinksDelete { return $this->delete; } } + diff --git a/src/Model/OrganizationMemberLinksDelete.php b/src/Model/OrganizationMemberLinksDelete.php index 7d32fdb06..86909c9a7 100644 --- a/src/Model/OrganizationMemberLinksDelete.php +++ b/src/Model/OrganizationMemberLinksDelete.php @@ -14,12 +14,15 @@ */ final class OrganizationMemberLinksDelete implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationMemberLinksSelf.php b/src/Model/OrganizationMemberLinksSelf.php index a00b6ae60..99100d05d 100644 --- a/src/Model/OrganizationMemberLinksSelf.php +++ b/src/Model/OrganizationMemberLinksSelf.php @@ -14,11 +14,14 @@ */ final class OrganizationMemberLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationMemberLinksUpdate.php b/src/Model/OrganizationMemberLinksUpdate.php index 0d711ee60..71f24812d 100644 --- a/src/Model/OrganizationMemberLinksUpdate.php +++ b/src/Model/OrganizationMemberLinksUpdate.php @@ -14,12 +14,15 @@ */ final class OrganizationMemberLinksUpdate implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationMfaEnforcement.php b/src/Model/OrganizationMfaEnforcement.php index ebbf10255..4c48bf673 100644 --- a/src/Model/OrganizationMfaEnforcement.php +++ b/src/Model/OrganizationMfaEnforcement.php @@ -14,11 +14,14 @@ */ final class OrganizationMfaEnforcement implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enforceMfa = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the MFA enforcement is enabled. - */ + /** + * Whether the MFA enforcement is enabled. + */ public function getEnforceMfa(): ?bool { return $this->enforceMfa; } } + diff --git a/src/Model/OrganizationProject.php b/src/Model/OrganizationProject.php index 8f4869dc6..1ca7e7d72 100644 --- a/src/Model/OrganizationProject.php +++ b/src/Model/OrganizationProject.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class OrganizationProject implements Model, JsonSerializable { + + public function __construct( private readonly ?string $dedicatedTag = null, private readonly ?array $activities = [], @@ -32,12 +33,13 @@ public function __construct( private readonly ?ProjectStatus $status = null, private readonly ?bool $trialPlan = null, private readonly ?string $projectUi = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?OrganizationProjectLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -74,138 +76,138 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the subscription. - */ + /** + * The ID of the subscription. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * Vendor of the project. - */ + /** + * Vendor of the project. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getRegion(): ?string { return $this->region; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): ?string { return $this->title; } - /** - * The type of projects. - */ + /** + * The type of projects. + */ public function getType(): ?ProjectType { return $this->type; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Timezone of the project. - */ + /** + * Timezone of the project. + */ public function getTimezone(): ?string { return $this->timezone; } - /** - * Default branch. - */ + /** + * Default branch. + */ public function getDefaultBranch(): ?string { return $this->defaultBranch; } - /** - * The status of the project. - */ + /** + * The status of the project. + */ public function getStatus(): ?ProjectStatus { return $this->status; } - /** - * Whether the project is currently on a trial plan. - */ + /** + * Whether the project is currently on a trial plan. + */ public function getTrialPlan(): ?bool { return $this->trialPlan; } - /** - * The URL for the project's user interface. - */ + /** + * The URL for the project's user interface. + */ public function getProjectUi(): ?string { return $this->projectUi; } - /** - * Dedicated tag. - */ + /** + * Dedicated tag. + */ public function getDedicatedTag(): ?string { return $this->dedicatedTag; } - /** - * The date and time when the resource was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the resource was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * Activities information for the project. - * @return Activity[]|null - */ + /** + * Activities information for the project. + * @return Activity[]|null + */ public function getActivities(): ?array { return $this->activities; @@ -226,3 +228,4 @@ public function getLinks(): ?OrganizationProjectLinks return $this->links; } } + diff --git a/src/Model/OrganizationProjectCarbon.php b/src/Model/OrganizationProjectCarbon.php index 1c4a59dd9..924a265f0 100644 --- a/src/Model/OrganizationProjectCarbon.php +++ b/src/Model/OrganizationProjectCarbon.php @@ -13,6 +13,8 @@ */ final class OrganizationProjectCarbon implements Model, JsonSerializable { + + public function __construct( private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +42,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * @return MetricsValue[]|null - */ + /** + * @return MetricsValue[]|null + */ public function getValues(): ?array { return $this->values; } } + diff --git a/src/Model/OrganizationProjectLinks.php b/src/Model/OrganizationProjectLinks.php index c1dd22b31..064e3f6dd 100644 --- a/src/Model/OrganizationProjectLinks.php +++ b/src/Model/OrganizationProjectLinks.php @@ -13,6 +13,8 @@ */ final class OrganizationProjectLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?OrganizationProjectLinksApi $api = null, private readonly ?OrganizationProjectLinksSubscription $subscription = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -53,83 +56,84 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current project. - */ + /** + * Link to the current project. + */ public function getSelf(): ?OrganizationProjectLinksSelf { return $this->self; } - /** - * Link to the regional API endpoint. Only present if user has project-level access. - */ + /** + * Link to the regional API endpoint. Only present if user has project-level access. + */ public function getApi(): ?OrganizationProjectLinksApi { return $this->api; } - /** - * Link to the subscription. Only present if project has a subscription. - */ + /** + * Link to the subscription. Only present if project has a subscription. + */ public function getSubscription(): ?OrganizationProjectLinksSubscription { return $this->subscription; } - /** - * Link to view usage alerts. Only present if user has view permission. - */ + /** + * Link to view usage alerts. Only present if user has view permission. + */ public function getViewUsageAlerts(): ?OrganizationProjectLinksViewUsageAlerts { return $this->viewUsageAlerts; } - /** - * Link for updating the current project. Only present if user has update permission. - */ + /** + * Link for updating the current project. Only present if user has update permission. + */ public function getUpdate(): ?OrganizationProjectLinksUpdate { return $this->update; } - /** - * Link to the billing plan page. Only present if user has manage permission. - */ + /** + * Link to the billing plan page. Only present if user has manage permission. + */ public function getPlanUri(): ?OrganizationProjectLinksPlanUri { return $this->planUri; } - /** - * Link for deleting the current project. Only present if user has delete permission. - */ + /** + * Link for deleting the current project. Only present if user has delete permission. + */ public function getDelete(): ?OrganizationProjectLinksDelete { return $this->delete; } - /** - * Link to update usage alerts. Only present if user has billing permission. - */ + /** + * Link to update usage alerts. Only present if user has billing permission. + */ public function getUpdateUsageAlerts(): ?OrganizationProjectLinksUpdateUsageAlerts { return $this->updateUsageAlerts; } - /** - * Link to the project's activities. Only present if user has view permission. - */ + /** + * Link to the project's activities. Only present if user has view permission. + */ public function getActivities(): ?OrganizationProjectLinksActivities { return $this->activities; } - /** - * Link to the project's add-ons. Only present if user has view permission. - */ + /** + * Link to the project's add-ons. Only present if user has view permission. + */ public function getAddons(): ?OrganizationProjectLinksAddons { return $this->addons; } } + diff --git a/src/Model/OrganizationProjectLinksActivities.php b/src/Model/OrganizationProjectLinksActivities.php index 602b52314..2a9c095ac 100644 --- a/src/Model/OrganizationProjectLinksActivities.php +++ b/src/Model/OrganizationProjectLinksActivities.php @@ -14,11 +14,14 @@ */ final class OrganizationProjectLinksActivities implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationProjectLinksAddons.php b/src/Model/OrganizationProjectLinksAddons.php index 8fd87d244..a8484e2f3 100644 --- a/src/Model/OrganizationProjectLinksAddons.php +++ b/src/Model/OrganizationProjectLinksAddons.php @@ -14,11 +14,14 @@ */ final class OrganizationProjectLinksAddons implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationProjectLinksApi.php b/src/Model/OrganizationProjectLinksApi.php index 1280cc059..1a97b5e00 100644 --- a/src/Model/OrganizationProjectLinksApi.php +++ b/src/Model/OrganizationProjectLinksApi.php @@ -14,11 +14,14 @@ */ final class OrganizationProjectLinksApi implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationProjectLinksDelete.php b/src/Model/OrganizationProjectLinksDelete.php index f130a2051..d23af38e7 100644 --- a/src/Model/OrganizationProjectLinksDelete.php +++ b/src/Model/OrganizationProjectLinksDelete.php @@ -14,12 +14,15 @@ */ final class OrganizationProjectLinksDelete implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationProjectLinksPlanUri.php b/src/Model/OrganizationProjectLinksPlanUri.php index c05933683..85bac43db 100644 --- a/src/Model/OrganizationProjectLinksPlanUri.php +++ b/src/Model/OrganizationProjectLinksPlanUri.php @@ -14,11 +14,14 @@ */ final class OrganizationProjectLinksPlanUri implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationProjectLinksSelf.php b/src/Model/OrganizationProjectLinksSelf.php index e65d63cd4..8c8ba3be6 100644 --- a/src/Model/OrganizationProjectLinksSelf.php +++ b/src/Model/OrganizationProjectLinksSelf.php @@ -14,11 +14,14 @@ */ final class OrganizationProjectLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationProjectLinksSubscription.php b/src/Model/OrganizationProjectLinksSubscription.php index 1e4328b76..88893df67 100644 --- a/src/Model/OrganizationProjectLinksSubscription.php +++ b/src/Model/OrganizationProjectLinksSubscription.php @@ -14,11 +14,14 @@ */ final class OrganizationProjectLinksSubscription implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationProjectLinksUpdate.php b/src/Model/OrganizationProjectLinksUpdate.php index 8e41d99fb..bd9611ae0 100644 --- a/src/Model/OrganizationProjectLinksUpdate.php +++ b/src/Model/OrganizationProjectLinksUpdate.php @@ -14,12 +14,15 @@ */ final class OrganizationProjectLinksUpdate implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php b/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php index fdc0cffcb..fa7fe3b17 100644 --- a/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php +++ b/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php @@ -14,12 +14,15 @@ */ final class OrganizationProjectLinksUpdateUsageAlerts implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/OrganizationProjectLinksViewUsageAlerts.php b/src/Model/OrganizationProjectLinksViewUsageAlerts.php index 74dd1f694..d8959537c 100644 --- a/src/Model/OrganizationProjectLinksViewUsageAlerts.php +++ b/src/Model/OrganizationProjectLinksViewUsageAlerts.php @@ -14,11 +14,14 @@ */ final class OrganizationProjectLinksViewUsageAlerts implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/OrganizationReference.php b/src/Model/OrganizationReference.php index 95dcdb80c..34a09e726 100644 --- a/src/Model/OrganizationReference.php +++ b/src/Model/OrganizationReference.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,8 @@ */ final class OrganizationReference implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $type = null, @@ -22,11 +23,12 @@ public function __construct( private readonly ?string $name = null, private readonly ?string $label = null, private readonly ?string $vendor = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, ) { } + public function getModelName(): string { return self::class; @@ -51,67 +53,68 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getId(): ?string { return $this->id; } - /** - * The type of the organization. - */ + /** + * The type of the organization. + */ public function getType(): ?string { return $this->type; } - /** - * The ID of the owner. - */ + /** + * The ID of the owner. + */ public function getOwnerId(): ?string { return $this->ownerId; } - /** - * A unique machine name representing the organization. - */ + /** + * A unique machine name representing the organization. + */ public function getName(): ?string { return $this->name; } - /** - * The human-readable label of the organization. - */ + /** + * The human-readable label of the organization. + */ public function getLabel(): ?string { return $this->label; } - /** - * The vendor. - */ + /** + * The vendor. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The date and time when the organization was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the organization was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the organization was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the organization was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } } + diff --git a/src/Model/OtlpLogIntegration.php b/src/Model/OtlpLogIntegration.php index 21dd8c03f..72d80ebfd 100644 --- a/src/Model/OtlpLogIntegration.php +++ b/src/Model/OtlpLogIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level OtlpLogIntegration (auto-generated) @@ -14,6 +14,8 @@ */ final class OtlpLogIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, @@ -22,12 +24,13 @@ public function __construct( private readonly array $headers, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -54,33 +57,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -91,9 +94,9 @@ public function getExtra(): array return $this->extra; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -104,9 +107,9 @@ public function getHeaders(): array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -117,11 +120,12 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of OtlpLogIntegration - */ + /** + * The identifier of OtlpLogIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/OtlpLogIntegrationCreateCreateInput.php b/src/Model/OtlpLogIntegrationCreateCreateInput.php index 2cf2c1443..ab47b7166 100644 --- a/src/Model/OtlpLogIntegrationCreateCreateInput.php +++ b/src/Model/OtlpLogIntegrationCreateCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level OtlpLogIntegrationCreateCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class OtlpLogIntegrationCreateCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,17 +49,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -71,9 +75,9 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -84,3 +88,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/OtlpLogIntegrationPatch.php b/src/Model/OtlpLogIntegrationPatch.php index 421036df7..f66d7a3b0 100644 --- a/src/Model/OtlpLogIntegrationPatch.php +++ b/src/Model/OtlpLogIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level OtlpLogIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class OtlpLogIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,17 +49,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -71,9 +75,9 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -84,3 +88,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/OutboundFirewall.php b/src/Model/OutboundFirewall.php index e32be5882..bd2a35641 100644 --- a/src/Model/OutboundFirewall.php +++ b/src/Model/OutboundFirewall.php @@ -13,11 +13,14 @@ */ final class OutboundFirewall implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, outbound firewall can be used. - */ + /** + * If true, outbound firewall can be used. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/OutboundFirewallRestrictionsInner.php b/src/Model/OutboundFirewallRestrictionsInner.php index 09898abaf..8afe7670b 100644 --- a/src/Model/OutboundFirewallRestrictionsInner.php +++ b/src/Model/OutboundFirewallRestrictionsInner.php @@ -13,6 +13,7 @@ */ final class OutboundFirewallRestrictionsInner implements Model, JsonSerializable { + public const PROTOCOL_TCP = 'tcp'; public function __construct( @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -63,3 +65,4 @@ public function getPorts(): array return $this->ports; } } + diff --git a/src/Model/OwnerInfo.php b/src/Model/OwnerInfo.php index 62f3174dd..5074fbe54 100644 --- a/src/Model/OwnerInfo.php +++ b/src/Model/OwnerInfo.php @@ -14,6 +14,8 @@ */ final class OwnerInfo implements Model, JsonSerializable { + + public function __construct( private readonly ?string $type = null, private readonly ?string $username = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Type of the owner, usually 'user'. - */ + /** + * Type of the owner, usually 'user'. + */ public function getType(): ?string { return $this->type; } - /** - * The username of the owner. - */ + /** + * The username of the owner. + */ public function getUsername(): ?string { return $this->username; } - /** - * The full name of the owner. - */ + /** + * The full name of the owner. + */ public function getDisplayName(): ?string { return $this->displayName; } } + diff --git a/src/Model/PagerDutyIntegration.php b/src/Model/PagerDutyIntegration.php index f7830d348..4185dd986 100644 --- a/src/Model/PagerDutyIntegration.php +++ b/src/Model/PagerDutyIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level PagerDutyIntegration (auto-generated) @@ -14,16 +14,19 @@ */ final class PagerDutyIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, private readonly string $routingKey, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -46,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The PagerDuty routing key - */ + /** + * The PagerDuty routing key + */ public function getRoutingKey(): string { return $this->routingKey; } - /** - * The identifier of PagerDutyIntegration - */ + /** + * The identifier of PagerDutyIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/PagerDutyIntegrationCreateInput.php b/src/Model/PagerDutyIntegrationCreateInput.php index a6ce6ebf3..a5893cdd5 100644 --- a/src/Model/PagerDutyIntegrationCreateInput.php +++ b/src/Model/PagerDutyIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level PagerDutyIntegrationCreateInput (auto-generated) @@ -13,12 +14,15 @@ */ final class PagerDutyIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $routingKey, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The PagerDuty routing key - */ + /** + * The PagerDuty routing key + */ public function getRoutingKey(): string { return $this->routingKey; } } + diff --git a/src/Model/PagerDutyIntegrationPatch.php b/src/Model/PagerDutyIntegrationPatch.php index 2fc8334d5..3293c3e94 100644 --- a/src/Model/PagerDutyIntegrationPatch.php +++ b/src/Model/PagerDutyIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level PagerDutyIntegrationPatch (auto-generated) @@ -13,12 +14,15 @@ */ final class PagerDutyIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $routingKey, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The PagerDuty routing key - */ + /** + * The PagerDuty routing key + */ public function getRoutingKey(): string { return $this->routingKey; } } + diff --git a/src/Model/PathValue.php b/src/Model/PathValue.php index 8b4495b64..ac7a6263e 100644 --- a/src/Model/PathValue.php +++ b/src/Model/PathValue.php @@ -13,6 +13,7 @@ */ final class PathValue implements Model, JsonSerializable { + public const CODE_NUMBER_301 = 301; public const CODE_NUMBER_302 = 302; public const CODE_NUMBER_307 = 307; @@ -28,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -80,3 +82,4 @@ public function getExpires(): ?string return $this->expires; } } + diff --git a/src/Model/PlanRecords.php b/src/Model/PlanRecords.php index c1d1ab79a..3a1406f8f 100644 --- a/src/Model/PlanRecords.php +++ b/src/Model/PlanRecords.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,19 +14,22 @@ */ final class PlanRecords implements Model, JsonSerializable { + + public function __construct( - private readonly ?DateTime $end = null, + private readonly ?\DateTime $end = null, private readonly ?string $id = null, private readonly ?string $owner = null, private readonly ?string $subscriptionId = null, private readonly ?string $sku = null, private readonly ?string $plan = null, private readonly ?array $options = [], - private readonly ?DateTime $start = null, + private readonly ?\DateTime $start = null, private readonly ?string $status = null, ) { } + public function getModelName(): string { return self::class; @@ -53,41 +55,41 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The unique ID of the plan record. - */ + /** + * The unique ID of the plan record. + */ public function getId(): ?string { return $this->id; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * The ID of the subscription this record pertains to. - */ + /** + * The ID of the subscription this record pertains to. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * The product SKU of the plan that this record represents. - */ + /** + * The product SKU of the plan that this record represents. + */ public function getSku(): ?string { return $this->sku; } - /** - * The machine name of the plan that this record represents. - */ + /** + * The machine name of the plan that this record represents. + */ public function getPlan(): ?string { return $this->plan; @@ -98,27 +100,28 @@ public function getOptions(): ?array return $this->options; } - /** - * The start timestamp of this plan record (ISO 8601). - */ - public function getStart(): ?DateTime + /** + * The start timestamp of this plan record (ISO 8601). + */ + public function getStart(): ?\DateTime { return $this->start; } - /** - * The end timestamp of this plan record (ISO 8601). - */ - public function getEnd(): ?DateTime + /** + * The end timestamp of this plan record (ISO 8601). + */ + public function getEnd(): ?\DateTime { return $this->end; } - /** - * The status of the subscription during this record: active or suspended. - */ + /** + * The status of the subscription during this record: active or suspended. + */ public function getStatus(): ?string { return $this->status; } } + diff --git a/src/Model/PreServiceResourcesOverridesValue.php b/src/Model/PreServiceResourcesOverridesValue.php index 82ba0b5f1..5a2f74bce 100644 --- a/src/Model/PreServiceResourcesOverridesValue.php +++ b/src/Model/PreServiceResourcesOverridesValue.php @@ -13,6 +13,8 @@ */ final class PreServiceResourcesOverridesValue implements Model, JsonSerializable { + + public function __construct( private readonly ?float $cpu, private readonly ?int $memory, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getDisk(): ?int return $this->disk; } } + diff --git a/src/Model/PreflightChecks.php b/src/Model/PreflightChecks.php index f3c06f946..597e75911 100644 --- a/src/Model/PreflightChecks.php +++ b/src/Model/PreflightChecks.php @@ -13,12 +13,15 @@ */ final class PreflightChecks implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly array $ignoredRules, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getIgnoredRules(): array return $this->ignoredRules; } } + diff --git a/src/Model/PrepaymentObject.php b/src/Model/PrepaymentObject.php index e0b224ffd..623b9aaea 100644 --- a/src/Model/PrepaymentObject.php +++ b/src/Model/PrepaymentObject.php @@ -14,11 +14,14 @@ */ final class PrepaymentObject implements Model, JsonSerializable { + + public function __construct( private readonly ?PrepaymentObjectPrepayment $prepayment = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Prepayment information for an organization. - */ + /** + * Prepayment information for an organization. + */ public function getPrepayment(): ?PrepaymentObjectPrepayment { return $this->prepayment; } } + diff --git a/src/Model/PrepaymentObjectPrepayment.php b/src/Model/PrepaymentObjectPrepayment.php index 6cf0ce09d..b49445e8e 100644 --- a/src/Model/PrepaymentObjectPrepayment.php +++ b/src/Model/PrepaymentObjectPrepayment.php @@ -14,6 +14,8 @@ */ final class PrepaymentObjectPrepayment implements Model, JsonSerializable { + + public function __construct( private readonly ?string $lastUpdatedAt = null, private readonly ?string $fallback = null, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,43 +47,44 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Organization ID - */ + /** + * Organization ID + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The prepayment balance in complex format. - */ + /** + * The prepayment balance in complex format. + */ public function getBalance(): ?PrepaymentObjectPrepaymentBalance { return $this->balance; } - /** - * The date the prepayment balance was last updated. - */ + /** + * The date the prepayment balance was last updated. + */ public function getLastUpdatedAt(): ?string { return $this->lastUpdatedAt; } - /** - * Whether the prepayment balance is enough to cover the upcoming order. - */ + /** + * Whether the prepayment balance is enough to cover the upcoming order. + */ public function getSufficient(): ?bool { return $this->sufficient; } - /** - * The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order. - */ + /** + * The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order. + */ public function getFallback(): ?string { return $this->fallback; } } + diff --git a/src/Model/PrepaymentObjectPrepaymentBalance.php b/src/Model/PrepaymentObjectPrepaymentBalance.php index ea6b03a5a..d44f1b669 100644 --- a/src/Model/PrepaymentObjectPrepaymentBalance.php +++ b/src/Model/PrepaymentObjectPrepaymentBalance.php @@ -14,6 +14,8 @@ */ final class PrepaymentObjectPrepaymentBalance implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted balance. - */ + /** + * Formatted balance. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * The balance amount. - */ + /** + * The balance amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * The balance currency code. - */ + /** + * The balance currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * The balance currency symbol. - */ + /** + * The balance currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } + diff --git a/src/Model/PrepaymentTransactionObject.php b/src/Model/PrepaymentTransactionObject.php index 35be1e474..3b82bd9a0 100644 --- a/src/Model/PrepaymentTransactionObject.php +++ b/src/Model/PrepaymentTransactionObject.php @@ -14,6 +14,8 @@ */ final class PrepaymentTransactionObject implements Model, JsonSerializable { + + public function __construct( private readonly ?string $updated = null, private readonly ?string $expireDate = null, @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -48,59 +51,60 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Order ID - */ + /** + * Order ID + */ public function getOrderId(): ?string { return $this->orderId; } - /** - * The message associated with transaction. - */ + /** + * The message associated with transaction. + */ public function getMessage(): ?string { return $this->message; } - /** - * Whether the transactions was successful or a failure. - */ + /** + * Whether the transactions was successful or a failure. + */ public function getStatus(): ?string { return $this->status; } - /** - * The prepayment balance in complex format. - */ + /** + * The prepayment balance in complex format. + */ public function getAmount(): ?PrepaymentTransactionObjectAmount { return $this->amount; } - /** - * Time the transaction was created. - */ + /** + * Time the transaction was created. + */ public function getCreated(): ?string { return $this->created; } - /** - * Time the transaction was last updated. - */ + /** + * Time the transaction was last updated. + */ public function getUpdated(): ?string { return $this->updated; } - /** - * The expiration date of the transaction (deposits only). - */ + /** + * The expiration date of the transaction (deposits only). + */ public function getExpireDate(): ?string { return $this->expireDate; } } + diff --git a/src/Model/PrepaymentTransactionObjectAmount.php b/src/Model/PrepaymentTransactionObjectAmount.php index 231b909b0..88378276d 100644 --- a/src/Model/PrepaymentTransactionObjectAmount.php +++ b/src/Model/PrepaymentTransactionObjectAmount.php @@ -14,6 +14,8 @@ */ final class PrepaymentTransactionObjectAmount implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted balance. - */ + /** + * Formatted balance. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * The balance amount. - */ + /** + * The balance amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * The balance currency code. - */ + /** + * The balance currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * The balance currency symbol. - */ + /** + * The balance currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } + diff --git a/src/Model/ProdDomainStorage.php b/src/Model/ProdDomainStorage.php index 465261750..80fd5282b 100644 --- a/src/Model/ProdDomainStorage.php +++ b/src/Model/ProdDomainStorage.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Domain; /** * Low level ProdDomainStorage (auto-generated) @@ -14,12 +14,14 @@ */ final class ProdDomainStorage implements Model, JsonSerializable, Domain { + + public function __construct( private readonly string $type, private readonly string $name, private readonly array $attributes, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, private readonly ?string $project = null, private readonly ?string $registeredName = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,33 +55,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of domain - */ + /** + * The type of domain + */ public function getType(): string { return $this->type; } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -89,35 +92,36 @@ public function getAttributes(): array return $this->attributes; } - /** - * The identifier of ProdDomainStorage - */ + /** + * The identifier of ProdDomainStorage + */ public function getId(): ?string { return $this->id; } - /** - * The name of the project - */ + /** + * The name of the project + */ public function getProject(): ?string { return $this->project; } - /** - * The claimed domain name - */ + /** + * The claimed domain name + */ public function getRegisteredName(): ?string { return $this->registeredName; } - /** - * Is this domain default - */ + /** + * Is this domain default + */ public function getIsDefault(): ?bool { return $this->isDefault; } } + diff --git a/src/Model/ProdDomainStorageCreateInput.php b/src/Model/ProdDomainStorageCreateInput.php index c3ec86f64..7fbee809b 100644 --- a/src/Model/ProdDomainStorageCreateInput.php +++ b/src/Model/ProdDomainStorageCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DomainCreateInput; /** * Low level ProdDomainStorageCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class ProdDomainStorageCreateInput implements Model, JsonSerializable, DomainCreateInput { + + public function __construct( private readonly string $name, private readonly ?array $attributes = [], @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,9 +43,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -52,11 +56,12 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Is this domain default - */ + /** + * Is this domain default + */ public function getIsDefault(): ?bool { return $this->isDefault; } } + diff --git a/src/Model/ProdDomainStoragePatch.php b/src/Model/ProdDomainStoragePatch.php index 2c3c6ce8f..837fac513 100644 --- a/src/Model/ProdDomainStoragePatch.php +++ b/src/Model/ProdDomainStoragePatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DomainPatch; /** * Low level ProdDomainStoragePatch (auto-generated) @@ -13,12 +14,15 @@ */ final class ProdDomainStoragePatch implements Model, JsonSerializable, DomainPatch { + + public function __construct( private readonly ?array $attributes = [], private readonly ?bool $isDefault = null, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +46,12 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Is this domain default - */ + /** + * Is this domain default + */ public function getIsDefault(): ?bool { return $this->isDefault; } } + diff --git a/src/Model/ProductionResources.php b/src/Model/ProductionResources.php index e2a1fc00d..b58fd3e38 100644 --- a/src/Model/ProductionResources.php +++ b/src/Model/ProductionResources.php @@ -14,6 +14,8 @@ */ final class ProductionResources implements Model, JsonSerializable { + + public function __construct( private readonly bool $legacyDevelopment, private readonly ?float $maxCpu, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enable legacy development sizing for this environment type - */ + /** + * Enable legacy development sizing for this environment type + */ public function getLegacyDevelopment(): bool { return $this->legacyDevelopment; } - /** - * Maximum number of allocated CPU units - */ + /** + * Maximum number of allocated CPU units + */ public function getMaxCpu(): ?float { return $this->maxCpu; } - /** - * Maximum amount of allocated RAM - */ + /** + * Maximum amount of allocated RAM + */ public function getMaxMemory(): ?int { return $this->maxMemory; } - /** - * Maximum number of environments - */ + /** + * Maximum number of environments + */ public function getMaxEnvironments(): ?int { return $this->maxEnvironments; } } + diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 50091ed8b..8b7e671ea 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class Profile implements Model, JsonSerializable { + public const TYPE_USER = 'user'; public const TYPE_ORGANIZATION = 'organization'; public const CUSTOMER_TYPE_INDIVIDUAL = 'individual'; @@ -39,8 +39,8 @@ public function __construct( private readonly ?string $defaultCatalog = null, private readonly ?string $projectOptionsUrl = null, private readonly ?bool $marketing = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?string $billingContact = null, private readonly ?bool $invoiced = null, private readonly ?string $customerType = null, @@ -48,6 +48,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -87,187 +88,188 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The user's unique ID. - */ + /** + * The user's unique ID. + */ public function getId(): ?string { return $this->id; } - /** - * The user's display name. - */ + /** + * The user's display name. + */ public function getDisplayName(): ?string { return $this->displayName; } - /** - * The user's email address. - */ + /** + * The user's email address. + */ public function getEmail(): ?string { return $this->email; } - /** - * The user's username. - */ + /** + * The user's username. + */ public function getUsername(): ?string { return $this->username; } - /** - * The user's type (user/organization). - */ + /** + * The user's type (user/organization). + */ public function getType(): ?string { return $this->type; } - /** - * The URL of the user's picture. - */ + /** + * The URL of the user's picture. + */ public function getPicture(): ?string { return $this->picture; } - /** - * The company type. - */ + /** + * The company type. + */ public function getCompanyType(): ?string { return $this->companyType; } - /** - * The name of the company. - */ + /** + * The name of the company. + */ public function getCompanyName(): ?string { return $this->companyName; } - /** - * A 3-letter ISO 4217 currency code (assigned according to the billing address). - */ + /** + * A 3-letter ISO 4217 currency code (assigned according to the billing address). + */ public function getCurrency(): ?string { return $this->currency; } - /** - * The vat number of the user. - */ + /** + * The vat number of the user. + */ public function getVatNumber(): ?string { return $this->vatNumber; } - /** - * The role of the user in the company. - */ + /** + * The role of the user in the company. + */ public function getCompanyRole(): ?string { return $this->companyRole; } - /** - * The user or company website. - */ + /** + * The user or company website. + */ public function getWebsiteUrl(): ?string { return $this->websiteUrl; } - /** - * Whether the new UI features are enabled for this user. - */ + /** + * Whether the new UI features are enabled for this user. + */ public function getNewUi(): ?bool { return $this->newUi; } - /** - * The user's chosen color scheme for user interfaces. - */ + /** + * The user's chosen color scheme for user interfaces. + */ public function getUiColorscheme(): ?string { return $this->uiColorscheme; } - /** - * The URL of a catalog file which overrides the default. - */ + /** + * The URL of a catalog file which overrides the default. + */ public function getDefaultCatalog(): ?string { return $this->defaultCatalog; } - /** - * The URL of an account-wide project options file. - */ + /** + * The URL of an account-wide project options file. + */ public function getProjectOptionsUrl(): ?string { return $this->projectOptionsUrl; } - /** - * Flag if the user agreed to receive marketing communication. - */ + /** + * Flag if the user agreed to receive marketing communication. + */ public function getMarketing(): ?bool { return $this->marketing; } - /** - * The timestamp representing when the user account was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The timestamp representing when the user account was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The timestamp representing when the user account was last modified. - */ - public function getUpdatedAt(): ?DateTime + /** + * The timestamp representing when the user account was last modified. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The e-mail address of a contact to whom billing notices will be sent. - */ + /** + * The e-mail address of a contact to whom billing notices will be sent. + */ public function getBillingContact(): ?string { return $this->billingContact; } - /** - * The customer is invoiced. - */ + /** + * The customer is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } - /** - * The customer type. - */ + /** + * The customer type. + */ public function getCustomerType(): ?string { return $this->customerType; } - /** - * The legal entity name of the customer. - */ + /** + * The legal entity name of the customer. + */ public function getLegalEntityName(): ?string { return $this->legalEntityName; } } + diff --git a/src/Model/Project.php b/src/Model/Project.php index 08a7a3edd..8267431de 100644 --- a/src/Model/Project.php +++ b/src/Model/Project.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class Project implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly array $attributes, @@ -25,8 +26,8 @@ public function __construct( private readonly string $region, private readonly RepositoryInformation $repository, private readonly SubscriptionInformation $subscription, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $namespace, private readonly ?string $organization, private readonly ?string $defaultBranch, @@ -35,6 +36,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -68,26 +70,26 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Project - */ + /** + * The identifier of Project + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } @@ -97,107 +99,108 @@ public function getAttributes(): array return $this->attributes; } - /** - * The title of the project - */ + /** + * The title of the project + */ public function getTitle(): string { return $this->title; } - /** - * The description of the project - */ + /** + * The description of the project + */ public function getDescription(): string { return $this->description; } - /** - * The owner of the project - */ + /** + * The owner of the project + */ public function getOwner(): string { return $this->owner; } - /** - * The namespace the project belongs in - */ + /** + * The namespace the project belongs in + */ public function getNamespace(): ?string { return $this->namespace; } - /** - * The organization the project belongs in - */ + /** + * The organization the project belongs in + */ public function getOrganization(): ?string { return $this->organization; } - /** - * The default branch of the project - */ + /** + * The default branch of the project + */ public function getDefaultBranch(): ?string { return $this->defaultBranch; } - /** - * The status of the project - */ + /** + * The status of the project + */ public function getStatus(): Status { return $this->status; } - /** - * Timezone of the project - */ + /** + * Timezone of the project + */ public function getTimezone(): string { return $this->timezone; } - /** - * The region of the project - */ + /** + * The region of the project + */ public function getRegion(): string { return $this->region; } - /** - * The repository information of the project - */ + /** + * The repository information of the project + */ public function getRepository(): RepositoryInformation { return $this->repository; } - /** - * The default domain of the project - */ + /** + * The default domain of the project + */ public function getDefaultDomain(): ?string { return $this->defaultDomain; } - /** - * The subscription information of the project - */ + /** + * The subscription information of the project + */ public function getSubscription(): SubscriptionInformation { return $this->subscription; } - /** - * The maintenance information of the project - */ + /** + * The maintenance information of the project + */ public function getMaintenance(): ?Maintenance { return $this->maintenance; } } + diff --git a/src/Model/ProjectCapabilities.php b/src/Model/ProjectCapabilities.php index bfd1ca06c..855bdd487 100644 --- a/src/Model/ProjectCapabilities.php +++ b/src/Model/ProjectCapabilities.php @@ -13,6 +13,8 @@ */ final class ProjectCapabilities implements Model, JsonSerializable { + + public function __construct( private readonly Tasks $tasks, private readonly Metrics $metrics, @@ -32,6 +34,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -88,9 +91,9 @@ public function getImages(): array return $this->images; } - /** - * Maximum number of instance per service - */ + /** + * Maximum number of instance per service + */ public function getInstanceLimit(): int { return $this->instanceLimit; @@ -141,3 +144,4 @@ public function getIntegrations(): ?Integrations return $this->integrations; } } + diff --git a/src/Model/ProjectCarbon.php b/src/Model/ProjectCarbon.php index 4fd3d3c6a..395e9a973 100644 --- a/src/Model/ProjectCarbon.php +++ b/src/Model/ProjectCarbon.php @@ -13,6 +13,8 @@ */ final class ProjectCarbon implements Model, JsonSerializable { + + public function __construct( private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -43,17 +46,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; @@ -64,19 +67,20 @@ public function getMeta(): ?MetricsMetadata return $this->meta; } - /** - * @return MetricsValue[]|null - */ + /** + * @return MetricsValue[]|null + */ public function getValues(): ?array { return $this->values; } - /** - * The calculated total of the metric for the given interval. - */ + /** + * The calculated total of the metric for the given interval. + */ public function getTotal(): ?float { return $this->total; } } + diff --git a/src/Model/ProjectFacets.php b/src/Model/ProjectFacets.php index 825e824af..898f62de9 100644 --- a/src/Model/ProjectFacets.php +++ b/src/Model/ProjectFacets.php @@ -14,11 +14,14 @@ */ final class ProjectFacets implements Model, JsonSerializable { + + public function __construct( private readonly ?array $plans = [], ) { } + public function getModelName(): string { return self::class; @@ -41,3 +44,4 @@ public function getPlans(): ?array return $this->plans; } } + diff --git a/src/Model/ProjectInfo.php b/src/Model/ProjectInfo.php index 22aae1da1..9ebaa4aa6 100644 --- a/src/Model/ProjectInfo.php +++ b/src/Model/ProjectInfo.php @@ -14,6 +14,8 @@ */ final class ProjectInfo implements Model, JsonSerializable { + + public function __construct( private readonly string $title, private readonly string $name, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -76,3 +79,4 @@ public function getSettings(): object return $this->settings; } } + diff --git a/src/Model/ProjectInvitation.php b/src/Model/ProjectInvitation.php index 164a0905f..aaf512c86 100644 --- a/src/Model/ProjectInvitation.php +++ b/src/Model/ProjectInvitation.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class ProjectInvitation implements Model, JsonSerializable { + public const STATE_PENDING = 'pending'; public const STATE_PROCESSING = 'processing'; public const STATE_ACCEPTED = 'accepted'; @@ -23,19 +23,20 @@ final class ProjectInvitation implements Model, JsonSerializable public const ROLE_VIEWER = 'viewer'; public function __construct( - private readonly ?DateTime $finishedAt = null, + private readonly ?\DateTime $finishedAt = null, private readonly ?string $id = null, private readonly ?string $state = null, private readonly ?string $projectId = null, private readonly ?string $role = null, private readonly ?string $email = null, private readonly ?OrganizationInvitationOwner $owner = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?array $environments = [], ) { } + public function getModelName(): string { return self::class; @@ -62,83 +63,84 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the invitation. - */ + /** + * The ID of the invitation. + */ public function getId(): ?string { return $this->id; } - /** - * The invitation state. - */ + /** + * The invitation state. + */ public function getState(): ?string { return $this->state; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The project role. - */ + /** + * The project role. + */ public function getRole(): ?string { return $this->role; } - /** - * The email address of the invitee. - */ + /** + * The email address of the invitee. + */ public function getEmail(): ?string { return $this->email; } - /** - * The inviter. - */ + /** + * The inviter. + */ public function getOwner(): ?OrganizationInvitationOwner { return $this->owner; } - /** - * The date and time when the invitation was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the invitation was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the invitation was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the invitation was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The date and time when the invitation was finished. - */ - public function getFinishedAt(): ?DateTime + /** + * The date and time when the invitation was finished. + */ + public function getFinishedAt(): ?\DateTime { return $this->finishedAt; } - /** - * @return ProjectInvitationEnvironmentsInner[]|null - */ + /** + * @return ProjectInvitationEnvironmentsInner[]|null + */ public function getEnvironments(): ?array { return $this->environments; } } + diff --git a/src/Model/ProjectInvitationEnvironmentsInner.php b/src/Model/ProjectInvitationEnvironmentsInner.php index 32bf26421..4c578e844 100644 --- a/src/Model/ProjectInvitationEnvironmentsInner.php +++ b/src/Model/ProjectInvitationEnvironmentsInner.php @@ -13,6 +13,7 @@ */ final class ProjectInvitationEnvironmentsInner implements Model, JsonSerializable { + public const ROLE_ADMIN = 'admin'; public const ROLE_VIEWER = 'viewer'; public const ROLE_CONTRIBUTOR = 'contributor'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -65,3 +67,4 @@ public function getTitle(): ?string return $this->title; } } + diff --git a/src/Model/ProjectOptions.php b/src/Model/ProjectOptions.php index 6fa63e1db..5121de1bf 100644 --- a/src/Model/ProjectOptions.php +++ b/src/Model/ProjectOptions.php @@ -14,6 +14,8 @@ */ final class ProjectOptions implements Model, JsonSerializable { + + public function __construct( private readonly ?ProjectOptionsDefaults $defaults = null, private readonly ?ProjectOptionsEnforced $enforced = null, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -44,17 +47,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The initial values applied to the project. - */ + /** + * The initial values applied to the project. + */ public function getDefaults(): ?ProjectOptionsDefaults { return $this->defaults; } - /** - * The enforced values applied to the project. - */ + /** + * The enforced values applied to the project. + */ public function getEnforced(): ?ProjectOptionsEnforced { return $this->enforced; @@ -70,11 +73,12 @@ public function getPlans(): ?array return $this->plans; } - /** - * The billing settings. - */ + /** + * The billing settings. + */ public function getBilling(): ?object { return $this->billing; } } + diff --git a/src/Model/ProjectOptionsAggregated.php b/src/Model/ProjectOptionsAggregated.php index db731fca8..b30be67e1 100644 --- a/src/Model/ProjectOptionsAggregated.php +++ b/src/Model/ProjectOptionsAggregated.php @@ -13,6 +13,8 @@ */ final class ProjectOptionsAggregated implements Model, JsonSerializable { + + public function __construct( private readonly ?object $billing = null, private readonly ?object $defaults = null, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -105,11 +108,12 @@ public function getContainerSizes(): ?array return $this->containerSizes; } - /** - * Debug configuration. - */ + /** + * Debug configuration. + */ public function getDebug(): ?object { return $this->debug; } } + diff --git a/src/Model/ProjectOptionsDefaults.php b/src/Model/ProjectOptionsDefaults.php index 8dce6968e..69cd67225 100644 --- a/src/Model/ProjectOptionsDefaults.php +++ b/src/Model/ProjectOptionsDefaults.php @@ -14,6 +14,8 @@ */ final class ProjectOptionsDefaults implements Model, JsonSerializable { + + public function __construct( private readonly ?object $settings = null, private readonly ?object $variables = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The project settings. - */ + /** + * The project settings. + */ public function getSettings(): ?object { return $this->settings; } - /** - * The project variables. - */ + /** + * The project variables. + */ public function getVariables(): ?object { return $this->variables; } - /** - * The project access list. - */ + /** + * The project access list. + */ public function getAccess(): ?object { return $this->access; } - /** - * The project capabilities. - */ + /** + * The project capabilities. + */ public function getCapabilities(): ?object { return $this->capabilities; } } + diff --git a/src/Model/ProjectOptionsEnforced.php b/src/Model/ProjectOptionsEnforced.php index 36e611bc1..013384cab 100644 --- a/src/Model/ProjectOptionsEnforced.php +++ b/src/Model/ProjectOptionsEnforced.php @@ -14,12 +14,15 @@ */ final class ProjectOptionsEnforced implements Model, JsonSerializable { + + public function __construct( private readonly ?object $settings = null, private readonly ?object $capabilities = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The project settings. - */ + /** + * The project settings. + */ public function getSettings(): ?object { return $this->settings; } - /** - * The project capabilities. - */ + /** + * The project capabilities. + */ public function getCapabilities(): ?object { return $this->capabilities; } } + diff --git a/src/Model/ProjectReference.php b/src/Model/ProjectReference.php index a3839765c..93797571c 100644 --- a/src/Model/ProjectReference.php +++ b/src/Model/ProjectReference.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,8 @@ */ final class ProjectReference implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $organizationId, @@ -24,12 +25,13 @@ public function __construct( private readonly ProjectType $type, private readonly string $plan, private readonly ProjectStatus $status, - private readonly DateTime $createdAt, - private readonly DateTime $updatedAt, + private readonly \DateTime $createdAt, + private readonly \DateTime $updatedAt, private readonly ?bool $invoiced = null, ) { } + public function getModelName(): string { return self::class; @@ -57,91 +59,92 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getId(): string { return $this->id; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): string { return $this->organizationId; } - /** - * The ID of the subscription. - */ + /** + * The ID of the subscription. + */ public function getSubscriptionId(): string { return $this->subscriptionId; } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getRegion(): string { return $this->region; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): string { return $this->title; } - /** - * The type of projects. - */ + /** + * The type of projects. + */ public function getType(): ProjectType { return $this->type; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): string { return $this->plan; } - /** - * The status of the project. - */ + /** + * The status of the project. + */ public function getStatus(): ProjectStatus { return $this->status; } - /** - * The date and time when the resource was created. - */ - public function getCreatedAt(): DateTime + /** + * The date and time when the resource was created. + */ + public function getCreatedAt(): \DateTime { return $this->createdAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): \DateTime { return $this->updatedAt; } - /** - * Whether the project is invoiced. - */ + /** + * Whether the project is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } } + diff --git a/src/Model/ProjectSettings.php b/src/Model/ProjectSettings.php index 915773475..56098317e 100644 --- a/src/Model/ProjectSettings.php +++ b/src/Model/ProjectSettings.php @@ -13,6 +13,7 @@ */ final class ProjectSettings implements Model, JsonSerializable { + public const DEVELOPMENT_SERVICE_SIZE__2_XL = '2XL'; public const DEVELOPMENT_SERVICE_SIZE__4_XL = '4XL'; public const DEVELOPMENT_SERVICE_SIZE_L = 'L'; @@ -113,6 +114,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -211,97 +213,97 @@ public function getInitialize(): object return $this->initialize; } - /** - * The name of the product. - */ + /** + * The name of the product. + */ public function getProductName(): string { return $this->productName; } - /** - * The lowercase ASCII code of the product. - */ + /** + * The lowercase ASCII code of the product. + */ public function getProductCode(): string { return $this->productCode; } - /** - * The template of the project UI uri - */ + /** + * The template of the project UI uri + */ public function getUiUriTemplate(): string { return $this->uiUriTemplate; } - /** - * The prefix of the generated environment variables. - */ + /** + * The prefix of the generated environment variables. + */ public function getVariablesPrefix(): string { return $this->variablesPrefix; } - /** - * The email of the bot. - */ + /** + * The email of the bot. + */ public function getBotEmail(): string { return $this->botEmail; } - /** - * The name of the application-specific configuration file. - */ + /** + * The name of the application-specific configuration file. + */ public function getApplicationConfigFile(): string { return $this->applicationConfigFile; } - /** - * The name of the project configuration directory. - */ + /** + * The name of the project configuration directory. + */ public function getProjectConfigDir(): string { return $this->projectConfigDir; } - /** - * Whether to use the default Drupal-centric configuration files when missing from the repository. - */ + /** + * Whether to use the default Drupal-centric configuration files when missing from the repository. + */ public function getUseDrupalDefaults(): bool { return $this->useDrupalDefaults; } - /** - * Whether to use legacy subdomain scheme, that replaces `.` by `---` in development subdomains. - */ + /** + * Whether to use legacy subdomain scheme, that replaces `.` by `---` in development subdomains. + */ public function getUseLegacySubdomains(): bool { return $this->useLegacySubdomains; } - /** - * The size of development services. - */ + /** + * The size of development services. + */ public function getDevelopmentServiceSize(): string { return $this->developmentServiceSize; } - /** - * The size of development applications. - */ + /** + * The size of development applications. + */ public function getDevelopmentApplicationSize(): string { return $this->developmentApplicationSize; } - /** - * Enable automatic certificate provisioning. - */ + /** + * Enable automatic certificate provisioning. + */ public function getEnableCertificateProvisioning(): bool { return $this->enableCertificateProvisioning; @@ -312,73 +314,73 @@ public function getCertificateStyle(): string return $this->certificateStyle; } - /** - * Create an activity for certificate renewal - */ + /** + * Create an activity for certificate renewal + */ public function getCertificateRenewalActivity(): bool { return $this->certificateRenewalActivity; } - /** - * The template of the development domain, can include {project} and {environment} placeholders. - */ + /** + * The template of the development domain, can include {project} and {environment} placeholders. + */ public function getDevelopmentDomainTemplate(): ?string { return $this->developmentDomainTemplate; } - /** - * Enable the State API-driven deployments on regions that support them. - */ + /** + * Enable the State API-driven deployments on regions that support them. + */ public function getEnableStateApiDeployments(): bool { return $this->enableStateApiDeployments; } - /** - * Set the size of the temporary disk (/tmp, in MB). - */ + /** + * Set the size of the temporary disk (/tmp, in MB). + */ public function getTemporaryDiskSize(): ?int { return $this->temporaryDiskSize; } - /** - * Set the size of the instance disk (in MB). - */ + /** + * Set the size of the instance disk (in MB). + */ public function getLocalDiskSize(): ?int { return $this->localDiskSize; } - /** - * Minimum interval between cron runs (in minutes) - */ + /** + * Minimum interval between cron runs (in minutes) + */ public function getCronMinimumInterval(): int { return $this->cronMinimumInterval; } - /** - * Maximum jitter inserted in cron runs (in minutes) - */ + /** + * Maximum jitter inserted in cron runs (in minutes) + */ public function getCronMaximumJitter(): int { return $this->cronMaximumJitter; } - /** - * The interval (in days) for which cron activity and logs are kept around - */ + /** + * The interval (in days) for which cron activity and logs are kept around + */ public function getCronProductionExpiryInterval(): int { return $this->cronProductionExpiryInterval; } - /** - * The interval (in days) for which cron activity and logs are kept around - */ + /** + * The interval (in days) for which cron activity and logs are kept around + */ public function getCronNonProductionExpiryInterval(): int { return $this->cronNonProductionExpiryInterval; @@ -389,17 +391,17 @@ public function getConcurrencyLimits(): array return $this->concurrencyLimits; } - /** - * Enable the flexible build cache implementation - */ + /** + * Enable the flexible build cache implementation + */ public function getFlexibleBuildCache(): bool { return $this->flexibleBuildCache; } - /** - * Strict configuration validation. - */ + /** + * Strict configuration validation. + */ public function getStrictConfiguration(): bool { return $this->strictConfiguration; @@ -415,66 +417,66 @@ public function getCronsInGit(): bool return $this->cronsInGit; } - /** - * Custom error template for the router. - */ + /** + * Custom error template for the router. + */ public function getCustomErrorTemplate(): ?string { return $this->customErrorTemplate; } - /** - * Custom error template for the application. - */ + /** + * Custom error template for the application. + */ public function getAppErrorPageTemplate(): ?string { return $this->appErrorPageTemplate; } - /** - * The strategy used to generate environment machine names - */ + /** + * The strategy used to generate environment machine names + */ public function getEnvironmentNameStrategy(): string { return $this->environmentNameStrategy; } - /** - * Data retention configuration - * @return DataRetentionConfigurationValue[]|null - */ + /** + * Data retention configuration + * @return DataRetentionConfigurationValue[]|null + */ public function getDataRetention(): ?array { return $this->dataRetention; } - /** - * Enable pushing commits to codesource integration. - */ + /** + * Enable pushing commits to codesource integration. + */ public function getEnableCodesourceIntegrationPush(): bool { return $this->enableCodesourceIntegrationPush; } - /** - * Enforce multi-factor authentication. - */ + /** + * Enforce multi-factor authentication. + */ public function getEnforceMfa(): bool { return $this->enforceMfa; } - /** - * Use systemd images. - */ + /** + * Use systemd images. + */ public function getSystemd(): bool { return $this->systemd; } - /** - * Use the router v2 image. - */ + /** + * Use the router v2 image. + */ public function getRouterGen2(): bool { return $this->routerGen2; @@ -485,17 +487,17 @@ public function getBuildResources(): BuildResources1 return $this->buildResources; } - /** - * The default policy for firewall outbound restrictions - */ + /** + * The default policy for firewall outbound restrictions + */ public function getOutboundRestrictionsDefaultPolicy(): string { return $this->outboundRestrictionsDefaultPolicy; } - /** - * Whether self-upgrades are enabled - */ + /** + * Whether self-upgrades are enabled + */ public function getSelfUpgrade(): bool { return $this->selfUpgrade; @@ -511,49 +513,49 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * Maximum number of routes allowed - */ + /** + * Maximum number of routes allowed + */ public function getMaxAllowedRoutes(): int { return $this->maxAllowedRoutes; } - /** - * Maximum number of redirect paths allowed - */ + /** + * Maximum number of redirect paths allowed + */ public function getMaxAllowedRedirectsPaths(): int { return $this->maxAllowedRedirectsPaths; } - /** - * Enable incremental backups on regions that support them. - */ + /** + * Enable incremental backups on regions that support them. + */ public function getEnableIncrementalBackups(): bool { return $this->enableIncrementalBackups; } - /** - * Enable sizing api. - */ + /** + * Enable sizing api. + */ public function getSizingApiEnabled(): bool { return $this->sizingApiEnabled; } - /** - * Enable cache grace period. - */ + /** + * Enable cache grace period. + */ public function getEnableCacheGracePeriod(): bool { return $this->enableCacheGracePeriod; } - /** - * Enable zero-downtime deployments for resource-only changes. - */ + /** + * Enable zero-downtime deployments for resource-only changes. + */ public function getEnableZeroDowntimeDeployments(): bool { return $this->enableZeroDowntimeDeployments; @@ -564,41 +566,41 @@ public function getEnableAdminAgent(): bool return $this->enableAdminAgent; } - /** - * The certifier url - */ + /** + * The certifier url + */ public function getCertifierUrl(): string { return $this->certifierUrl; } - /** - * Whether centralized permissions are enabled - */ + /** + * Whether centralized permissions are enabled + */ public function getCentralizedPermissions(): bool { return $this->centralizedPermissions; } - /** - * Maximum size of request to glue-server (in MB) - */ + /** + * Maximum size of request to glue-server (in MB) + */ public function getGlueServerMaxRequestSize(): int { return $this->glueServerMaxRequestSize; } - /** - * Enable SSH access update with persistent endpoint - */ + /** + * Enable SSH access update with persistent endpoint + */ public function getPersistentEndpointsSsh(): bool { return $this->persistentEndpointsSsh; } - /** - * Enable SSL certificate update with persistent endpoint - */ + /** + * Enable SSL certificate update with persistent endpoint + */ public function getPersistentEndpointsSslCertificates(): bool { return $this->persistentEndpointsSslCertificates; @@ -619,26 +621,26 @@ public function getEnableUnifiedConfiguration(): bool return $this->enableUnifiedConfiguration; } - /** - * When enabled, explicitly empty routes configuration (routes: or routes: {}) will result in no routes being - * generated instead of fallback routes. - */ + /** + * When enabled, explicitly empty routes configuration (routes: or routes: {}) will result in no routes being + * generated instead of fallback routes. + */ public function getEnableExplicitEmptyRoutes(): bool { return $this->enableExplicitEmptyRoutes; } - /** - * Enable tracing support in routes - */ + /** + * Enable tracing support in routes + */ public function getEnableRoutesTracing(): bool { return $this->enableRoutesTracing; } - /** - * Enable extended deployment validation by images - */ + /** + * Enable extended deployment validation by images + */ public function getImageDeploymentValidation(): bool { return $this->imageDeploymentValidation; @@ -649,17 +651,17 @@ public function getSupportGenericImages(): bool return $this->supportGenericImages; } - /** - * Enable fetching the GitHub App token from SIA. - */ + /** + * Enable fetching the GitHub App token from SIA. + */ public function getEnableGithubAppTokenExchange(): bool { return $this->enableGithubAppTokenExchange; } - /** - * The continuous profiling configuration - */ + /** + * The continuous profiling configuration + */ public function getContinuousProfiling(): ContinuousProfilingConfiguration { return $this->continuousProfiling; @@ -670,17 +672,17 @@ public function getDisableAgentErrorReporter(): bool return $this->disableAgentErrorReporter; } - /** - * Require ownership proof before domains are added to environments. - */ + /** + * Require ownership proof before domains are added to environments. + */ public function getRequiresDomainOwnership(): bool { return $this->requiresDomainOwnership; } - /** - * Enable guaranteed resources feature - */ + /** + * Enable guaranteed resources feature + */ public function getEnableGuaranteedResources(): bool { return $this->enableGuaranteedResources; @@ -691,41 +693,41 @@ public function getGitServer(): GitServerConfiguration return $this->gitServer; } - /** - * The maximum size of activity logs in bytes. This limit is applied on the pre-compressed log size. - */ + /** + * The maximum size of activity logs in bytes. This limit is applied on the pre-compressed log size. + */ public function getActivityLogsMaxSize(): int { return $this->activityLogsMaxSize; } - /** - * If deployments can be manual, i.e. explicitly triggered by user - */ + /** + * If deployments can be manual, i.e. explicitly triggered by user + */ public function getAllowManualDeployments(): bool { return $this->allowManualDeployments; } - /** - * If the project can use rolling deployments - */ + /** + * If the project can use rolling deployments + */ public function getAllowRollingDeployments(): bool { return $this->allowRollingDeployments; } - /** - * Configuration for the maintenance window schedule - */ + /** + * Configuration for the maintenance window schedule + */ public function getMaintenanceWindow(): ?MaintenanceWindowConfiguration { return $this->maintenanceWindow; } - /** - * Allow certain types of activities to be rescheduled - */ + /** + * Allow certain types of activities to be rescheduled + */ public function getAllowActivityReschedule(): bool { return $this->allowActivityReschedule; @@ -736,9 +738,9 @@ public function getAllowBurst(): bool return $this->allowBurst; } - /** - * Router resource settings for flex plan - */ + /** + * Router resource settings for flex plan + */ public function getRouterResources(): RouterResources { return $this->routerResources; @@ -749,9 +751,9 @@ public function getAllowScalingToZero(): bool return $this->allowScalingToZero; } - /** - * Save vendors.json files locally after builds for SBOM generation. - */ + /** + * Save vendors.json files locally after builds for SBOM generation. + */ public function getSaveApplicationsVendors(): bool { return $this->saveApplicationsVendors; @@ -767,3 +769,4 @@ public function getSupportOciImages(): bool return $this->supportOciImages; } } + diff --git a/src/Model/ProjectSettingsPatch.php b/src/Model/ProjectSettingsPatch.php index c4336f81d..928ec8240 100644 --- a/src/Model/ProjectSettingsPatch.php +++ b/src/Model/ProjectSettingsPatch.php @@ -13,6 +13,8 @@ */ final class ProjectSettingsPatch implements Model, JsonSerializable { + + public function __construct( private readonly ?array $dataRetention = [], private readonly ?MaintenanceWindowConfiguration $maintenanceWindow = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,10 +49,10 @@ public function getInitialize(): ?object return $this->initialize; } - /** - * Data retention configuration - * @return DataRetentionConfigurationValue1[]|null - */ + /** + * Data retention configuration + * @return DataRetentionConfigurationValue1[]|null + */ public function getDataRetention(): ?array { return $this->dataRetention; @@ -60,11 +63,12 @@ public function getBuildResources(): ?BuildResources2 return $this->buildResources; } - /** - * Configuration for the maintenance window schedule - */ + /** + * Configuration for the maintenance window schedule + */ public function getMaintenanceWindow(): ?MaintenanceWindowConfiguration { return $this->maintenanceWindow; } } + diff --git a/src/Model/ProjectStatus.php b/src/Model/ProjectStatus.php index bfe674c4b..3b3acd496 100644 --- a/src/Model/ProjectStatus.php +++ b/src/Model/ProjectStatus.php @@ -76,3 +76,4 @@ public function __toString(): string return $this->value; } } + diff --git a/src/Model/ProjectType.php b/src/Model/ProjectType.php index 05a91a0c5..5c1ef8b94 100644 --- a/src/Model/ProjectType.php +++ b/src/Model/ProjectType.php @@ -67,3 +67,4 @@ public function __toString(): string return $this->value; } } + diff --git a/src/Model/ProjectVariable.php b/src/Model/ProjectVariable.php index b0a05250b..cc93e197b 100644 --- a/src/Model/ProjectVariable.php +++ b/src/Model/ProjectVariable.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,8 @@ */ final class ProjectVariable implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $name, @@ -23,12 +24,13 @@ public function __construct( private readonly bool $visibleBuild, private readonly bool $visibleRuntime, private readonly array $applicationScope, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $value = null, ) { } + public function getModelName(): string { return self::class; @@ -56,33 +58,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of ProjectVariable - */ + /** + * The identifier of ProjectVariable + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; @@ -93,33 +95,33 @@ public function getAttributes(): array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): bool { return $this->visibleRuntime; @@ -130,11 +132,12 @@ public function getApplicationScope(): array return $this->applicationScope; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } } + diff --git a/src/Model/ProjectVariableCreateInput.php b/src/Model/ProjectVariableCreateInput.php index edb38de79..16421fb52 100644 --- a/src/Model/ProjectVariableCreateInput.php +++ b/src/Model/ProjectVariableCreateInput.php @@ -13,6 +13,8 @@ */ final class ProjectVariableCreateInput implements Model, JsonSerializable { + + public function __construct( private readonly string $name, private readonly string $value, @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,17 +52,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): string { return $this->value; @@ -70,33 +73,33 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -107,3 +110,4 @@ public function getApplicationScope(): ?array return $this->applicationScope; } } + diff --git a/src/Model/ProjectVariablePatch.php b/src/Model/ProjectVariablePatch.php index 5ae0a323e..0674f7a7e 100644 --- a/src/Model/ProjectVariablePatch.php +++ b/src/Model/ProjectVariablePatch.php @@ -13,6 +13,8 @@ */ final class ProjectVariablePatch implements Model, JsonSerializable { + + public function __construct( private readonly ?string $name = null, private readonly ?array $attributes = [], @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,9 +52,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): ?string { return $this->name; @@ -62,41 +65,41 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -107,3 +110,4 @@ public function getApplicationScope(): ?array return $this->applicationScope; } } + diff --git a/src/Model/ProvisionEvent.php b/src/Model/ProvisionEvent.php index ddd5901e9..1b14393e5 100644 --- a/src/Model/ProvisionEvent.php +++ b/src/Model/ProvisionEvent.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class ProvisionEvent implements Model, JsonSerializable { + public const TYPE_DATA = 'data'; public const TYPE_DONE = 'done'; public const TYPE_ERROR = 'error'; @@ -26,11 +26,12 @@ public function __construct( private readonly ?string $stage = null, private readonly ?string $label = null, private readonly ?string $reason = null, - private readonly ?DateTime $timestamp = null, + private readonly ?\DateTime $timestamp = null, private readonly ?array $steps = [], ) { } + public function getModelName(): string { return self::class; @@ -54,60 +55,61 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The event type. - */ + /** + * The event type. + */ public function getType(): string { return $this->type; } - /** - * The ID of the project being provisioned. - */ + /** + * The ID of the project being provisioned. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The current provisioning stage. - */ + /** + * The current provisioning stage. + */ public function getStage(): ?string { return $this->stage; } - /** - * A human-readable label for the current stage. - */ + /** + * A human-readable label for the current stage. + */ public function getLabel(): ?string { return $this->label; } - /** - * The reason for failure (only present on error events). - */ + /** + * The reason for failure (only present on error events). + */ public function getReason(): ?string { return $this->reason; } - /** - * The time the event was emitted. - */ - public function getTimestamp(): ?DateTime + /** + * The time the event was emitted. + */ + public function getTimestamp(): ?\DateTime { return $this->timestamp; } - /** - * Ordered list of provisioning steps. - * @return ProvisionStep[]|null - */ + /** + * Ordered list of provisioning steps. + * @return ProvisionStep[]|null + */ public function getSteps(): ?array { return $this->steps; } } + diff --git a/src/Model/ProvisionStep.php b/src/Model/ProvisionStep.php index a0af83f2b..a42960489 100644 --- a/src/Model/ProvisionStep.php +++ b/src/Model/ProvisionStep.php @@ -14,12 +14,15 @@ */ final class ProvisionStep implements Model, JsonSerializable { + + public function __construct( private readonly string $stage, private readonly string $label, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The step identifier. - */ + /** + * The step identifier. + */ public function getStage(): string { return $this->stage; } - /** - * A human-readable label for the step. - */ + /** + * A human-readable label for the step. + */ public function getLabel(): string { return $this->label; } } + diff --git a/src/Model/ProxyRoute.php b/src/Model/ProxyRoute.php index 5f3717b89..f7a410f81 100644 --- a/src/Model/ProxyRoute.php +++ b/src/Model/ProxyRoute.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\Route; /** * Low level ProxyRoute (auto-generated) @@ -13,6 +14,7 @@ */ final class ProxyRoute implements Model, JsonSerializable, Route { + public const TYPE_PROXY = 'proxy'; public const TYPE_REDIRECT = 'redirect'; public const TYPE_UPSTREAM = 'upstream'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -66,91 +69,92 @@ public function getAttributes(): array return $this->attributes; } - /** - * Route type - */ + /** + * Route type + */ public function getType(): string { return $this->type; } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getTls(): TLSSettings { return $this->tls; } - /** - * The destination of the proxy - */ + /** + * The destination of the proxy + */ public function getTo(): string { return $this->to; } - /** - * The identifier of ProxyRoute - */ + /** + * The identifier of ProxyRoute + */ public function getId(): ?string { return $this->id; } - /** - * This route is the primary route of the environment - */ + /** + * This route is the primary route of the environment + */ public function getPrimary(): ?bool { return $this->primary; } - /** - * How this URL route would look on production environment - */ + /** + * How this URL route would look on production environment + */ public function getProductionUrl(): ?string { return $this->productionUrl; } - /** - * The configuration of the redirects - */ + /** + * The configuration of the redirects + */ public function getRedirects(): ?RedirectConfiguration { return $this->redirects; } - /** - * Cache configuration - */ + /** + * Cache configuration + */ public function getCache(): ?CacheConfiguration { return $this->cache; } - /** - * Server-Side Include configuration - */ + /** + * Server-Side Include configuration + */ public function getSsi(): ?SSIConfiguration { return $this->ssi; } - /** - * The upstream to use for this route - */ + /** + * The upstream to use for this route + */ public function getUpstream(): ?string { return $this->upstream; } - /** - * Sticky routing configuration - */ + /** + * Sticky routing configuration + */ public function getSticky(): ?StickyConfiguration { return $this->sticky; } } + diff --git a/src/Model/Recurrence.php b/src/Model/Recurrence.php index 2b28059eb..39f626816 100644 --- a/src/Model/Recurrence.php +++ b/src/Model/Recurrence.php @@ -14,6 +14,8 @@ */ final class Recurrence implements Model, JsonSerializable { + + public function __construct( private readonly string $interval, private readonly int $dayOfWeek, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Interval in weeks, either 2w or 4w - */ + /** + * Interval in weeks, either 2w or 4w + */ public function getInterval(): string { return $this->interval; } - /** - * Day of week, where Monday is 0 - */ + /** + * Day of week, where Monday is 0 + */ public function getDayOfWeek(): int { return $this->dayOfWeek; } - /** - * Exact time in HH:MM format - */ + /** + * Exact time in HH:MM format + */ public function getTime(): string { return $this->time; } } + diff --git a/src/Model/RedirectConfiguration.php b/src/Model/RedirectConfiguration.php index 46fe591a1..abe3a63ff 100644 --- a/src/Model/RedirectConfiguration.php +++ b/src/Model/RedirectConfiguration.php @@ -14,12 +14,15 @@ */ final class RedirectConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly string $expires, private readonly array $paths, ) { } + public function getModelName(): string { return self::class; @@ -38,20 +41,21 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The amount of time, in seconds, to cache the redirects - */ + /** + * The amount of time, in seconds, to cache the redirects + */ public function getExpires(): string { return $this->expires; } - /** - * The paths to redirect - * @return PathValue[] - */ + /** + * The paths to redirect + * @return PathValue[] + */ public function getPaths(): array { return $this->paths; } } + diff --git a/src/Model/RedirectRoute.php b/src/Model/RedirectRoute.php index 6bd51f878..2d1b39ffe 100644 --- a/src/Model/RedirectRoute.php +++ b/src/Model/RedirectRoute.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\Route; /** * Low level RedirectRoute (auto-generated) @@ -13,6 +14,7 @@ */ final class RedirectRoute implements Model, JsonSerializable, Route { + public const TYPE_PROXY = 'proxy'; public const TYPE_REDIRECT = 'redirect'; public const TYPE_UPSTREAM = 'upstream'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -66,91 +69,92 @@ public function getAttributes(): array return $this->attributes; } - /** - * Route type - */ + /** + * Route type + */ public function getType(): string { return $this->type; } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getTls(): TLSSettings { return $this->tls; } - /** - * The destination of the proxy - */ + /** + * The destination of the proxy + */ public function getTo(): string { return $this->to; } - /** - * The identifier of RedirectRoute - */ + /** + * The identifier of RedirectRoute + */ public function getId(): ?string { return $this->id; } - /** - * This route is the primary route of the environment - */ + /** + * This route is the primary route of the environment + */ public function getPrimary(): ?bool { return $this->primary; } - /** - * How this URL route would look on production environment - */ + /** + * How this URL route would look on production environment + */ public function getProductionUrl(): ?string { return $this->productionUrl; } - /** - * The configuration of the redirects - */ + /** + * The configuration of the redirects + */ public function getRedirects(): ?RedirectConfiguration { return $this->redirects; } - /** - * Cache configuration - */ + /** + * Cache configuration + */ public function getCache(): ?CacheConfiguration { return $this->cache; } - /** - * Server-Side Include configuration - */ + /** + * Server-Side Include configuration + */ public function getSsi(): ?SSIConfiguration { return $this->ssi; } - /** - * The upstream to use for this route - */ + /** + * The upstream to use for this route + */ public function getUpstream(): ?string { return $this->upstream; } - /** - * Sticky routing configuration - */ + /** + * Sticky routing configuration + */ public function getSticky(): ?StickyConfiguration { return $this->sticky; } } + diff --git a/src/Model/Ref.php b/src/Model/Ref.php index 524ef3fa0..4d63c0781 100644 --- a/src/Model/Ref.php +++ b/src/Model/Ref.php @@ -13,14 +13,17 @@ */ final class Ref implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $ref, - private readonly object $object, + private readonly Object $object, private readonly string $sha, ) { } + public function getModelName(): string { return self::class; @@ -41,35 +44,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Ref - */ + /** + * The identifier of Ref + */ public function getId(): string { return $this->id; } - /** - * The name of the reference - */ + /** + * The name of the reference + */ public function getRef(): string { return $this->ref; } - /** - * The object the reference points to - */ - public function getObject(): object + /** + * The object the reference points to + */ + public function getObject(): Object { return $this->object; } - /** - * The commit sha of the ref - */ + /** + * The commit sha of the ref + */ public function getSha(): string { return $this->sha; } } + diff --git a/src/Model/Region.php b/src/Model/Region.php index 0a442eb06..bcfb4b0c4 100644 --- a/src/Model/Region.php +++ b/src/Model/Region.php @@ -14,6 +14,8 @@ */ final class Region implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $label = null, @@ -30,6 +32,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -58,100 +61,101 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the region. - */ + /** + * The ID of the region. + */ public function getId(): ?string { return $this->id; } - /** - * The human-readable name of the region. - */ + /** + * The human-readable name of the region. + */ public function getLabel(): ?string { return $this->label; } - /** - * Geographical zone of the region - */ + /** + * Geographical zone of the region + */ public function getZone(): ?string { return $this->zone; } - /** - * The label to display when choosing between regions for new projects. - */ + /** + * The label to display when choosing between regions for new projects. + */ public function getSelectionLabel(): ?string { return $this->selectionLabel; } - /** - * The label to display on existing projects. - */ + /** + * The label to display on existing projects. + */ public function getProjectLabel(): ?string { return $this->projectLabel; } - /** - * Default timezone of the region - */ + /** + * Default timezone of the region + */ public function getTimezone(): ?string { return $this->timezone; } - /** - * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up - * during checkout. - */ + /** + * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up + * during checkout. + */ public function getAvailable(): ?bool { return $this->available; } - /** - * Indicator whether or not this platform is for private use only. - */ + /** + * Indicator whether or not this platform is for private use only. + */ public function getPrivate(): ?bool { return $this->private; } - /** - * Link to the region API endpoint. - */ + /** + * Link to the region API endpoint. + */ public function getEndpoint(): ?string { return $this->endpoint; } - /** - * Information about the region provider. - */ + /** + * Information about the region provider. + */ public function getProvider(): ?RegionProvider { return $this->provider; } - /** - * Information about the region provider data center. - */ + /** + * Information about the region provider data center. + */ public function getDatacenter(): ?RegionDatacenter { return $this->datacenter; } - /** - * Information about the region provider's environmental impact. - */ + /** + * Information about the region provider's environmental impact. + */ public function getEnvironmentalImpact(): ?RegionEnvironmentalImpact { return $this->environmentalImpact; } } + diff --git a/src/Model/RegionCompliance.php b/src/Model/RegionCompliance.php index 6e89e9a24..a9cac5c56 100644 --- a/src/Model/RegionCompliance.php +++ b/src/Model/RegionCompliance.php @@ -14,11 +14,14 @@ */ final class RegionCompliance implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $hipaa = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Indicator whether or not this region is HIPAA compliant. - */ + /** + * Indicator whether or not this region is HIPAA compliant. + */ public function getHipaa(): ?bool { return $this->hipaa; } } + diff --git a/src/Model/RegionDatacenter.php b/src/Model/RegionDatacenter.php index cfdf4460b..8e412a3a5 100644 --- a/src/Model/RegionDatacenter.php +++ b/src/Model/RegionDatacenter.php @@ -14,6 +14,8 @@ */ final class RegionDatacenter implements Model, JsonSerializable { + + public function __construct( private readonly ?string $name = null, private readonly ?string $label = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -55,3 +58,4 @@ public function getLocation(): ?string return $this->location; } } + diff --git a/src/Model/RegionEnvImpact.php b/src/Model/RegionEnvImpact.php index c5658c2a2..8e2637835 100644 --- a/src/Model/RegionEnvImpact.php +++ b/src/Model/RegionEnvImpact.php @@ -14,6 +14,8 @@ */ final class RegionEnvImpact implements Model, JsonSerializable { + + public function __construct( private readonly ?string $zone = null, private readonly ?float $carbonIntensity = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The geographical zone code for carbon intensity. - */ + /** + * The geographical zone code for carbon intensity. + */ public function getZone(): ?string { return $this->zone; } - /** - * The carbon intensity value. - */ + /** + * The carbon intensity value. + */ public function getCarbonIntensity(): ?float { return $this->carbonIntensity; } - /** - * The source of the carbon intensity data. - */ + /** + * The source of the carbon intensity data. + */ public function getCarbonIntensitySource(): ?string { return $this->carbonIntensitySource; } - /** - * Indicator whether the data center uses green energy. - */ + /** + * Indicator whether the data center uses green energy. + */ public function getGreen(): ?bool { return $this->green; } } + diff --git a/src/Model/RegionEnvironmentalImpact.php b/src/Model/RegionEnvironmentalImpact.php index 45570bd23..08a5a32d7 100644 --- a/src/Model/RegionEnvironmentalImpact.php +++ b/src/Model/RegionEnvironmentalImpact.php @@ -14,6 +14,8 @@ */ final class RegionEnvironmentalImpact implements Model, JsonSerializable { + + public function __construct( private readonly ?string $zone = null, private readonly ?string $carbonIntensity = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -55,3 +58,4 @@ public function getGreen(): ?bool return $this->green; } } + diff --git a/src/Model/RegionProvider.php b/src/Model/RegionProvider.php index d5c981405..53c61be1d 100644 --- a/src/Model/RegionProvider.php +++ b/src/Model/RegionProvider.php @@ -14,12 +14,15 @@ */ final class RegionProvider implements Model, JsonSerializable { + + public function __construct( private readonly ?string $name = null, private readonly ?string $logo = null, ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getLogo(): ?string return $this->logo; } } + diff --git a/src/Model/RegionReference.php b/src/Model/RegionReference.php index 475645cae..92deb16e7 100644 --- a/src/Model/RegionReference.php +++ b/src/Model/RegionReference.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,8 @@ */ final class RegionReference implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $label, @@ -27,14 +28,15 @@ public function __construct( private readonly RegionProvider $provider, private readonly RegionDatacenter $datacenter, private readonly RegionCompliance $compliance, - private readonly DateTime $createdAt, - private readonly DateTime $updatedAt, + private readonly \DateTime $createdAt, + private readonly \DateTime $updatedAt, private readonly ?bool $private = null, private readonly ?RegionEnvImpact $envimpact = null, private readonly ?object $environmentalImpact = null, ) { } + public function getModelName(): string { return self::class; @@ -67,132 +69,133 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getId(): string { return $this->id; } - /** - * The human-readable name of the region. - */ + /** + * The human-readable name of the region. + */ public function getLabel(): string { return $this->label; } - /** - * The geographical zone of the region. - */ + /** + * The geographical zone of the region. + */ public function getZone(): string { return $this->zone; } - /** - * The label to display when choosing between regions for new projects. - */ + /** + * The label to display when choosing between regions for new projects. + */ public function getSelectionLabel(): string { return $this->selectionLabel; } - /** - * The label to display on existing projects. - */ + /** + * The label to display on existing projects. + */ public function getProjectLabel(): string { return $this->projectLabel; } - /** - * Default timezone of the region. - */ + /** + * Default timezone of the region. + */ public function getTimezone(): string { return $this->timezone; } - /** - * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up - * during checkout. - */ + /** + * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up + * during checkout. + */ public function getAvailable(): bool { return $this->available; } - /** - * Link to the region API endpoint. - */ + /** + * Link to the region API endpoint. + */ public function getEndpoint(): string { return $this->endpoint; } - /** - * Information about the region provider. - */ + /** + * Information about the region provider. + */ public function getProvider(): RegionProvider { return $this->provider; } - /** - * Information about the region provider data center. - */ + /** + * Information about the region provider data center. + */ public function getDatacenter(): RegionDatacenter { return $this->datacenter; } - /** - * Information about the region's compliance. - */ + /** + * Information about the region's compliance. + */ public function getCompliance(): RegionCompliance { return $this->compliance; } - /** - * The date and time when the resource was created. - */ - public function getCreatedAt(): DateTime + /** + * The date and time when the resource was created. + */ + public function getCreatedAt(): \DateTime { return $this->createdAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): \DateTime { return $this->updatedAt; } - /** - * Indicator whether or not this platform is for private use only. - */ + /** + * Indicator whether or not this platform is for private use only. + */ public function getPrivate(): ?bool { return $this->private; } - /** - * Information about the region provider's environmental impact. - */ + /** + * Information about the region provider's environmental impact. + */ public function getEnvimpact(): ?RegionEnvImpact { return $this->envimpact; } - /** - * Environmental impact information for the region. - */ + /** + * Environmental impact information for the region. + */ public function getEnvironmentalImpact(): ?object { return $this->environmentalImpact; } } + diff --git a/src/Model/RegistryCredential.php b/src/Model/RegistryCredential.php index 3cdabe24a..ae7f0b34c 100644 --- a/src/Model/RegistryCredential.php +++ b/src/Model/RegistryCredential.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,17 +13,20 @@ */ final class RegistryCredential implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $registry, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?BasicAuth $auth, private readonly ?string $identityToken, private readonly ?string $registryToken, ) { } + public function getModelName(): string { return self::class; @@ -48,60 +50,61 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of RegistryCredential - */ + /** + * The identifier of RegistryCredential + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', - * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) - */ + /** + * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', + * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) + */ public function getRegistry(): string { return $this->registry; } - /** - * Basic Auth for the container registry - */ + /** + * Basic Auth for the container registry + */ public function getAuth(): ?BasicAuth { return $this->auth; } - /** - * Refresh token to exchange for bearer token with container registry auth - */ + /** + * Refresh token to exchange for bearer token with container registry auth + */ public function getIdentityToken(): ?string { return $this->identityToken; } - /** - * Bearer token used to auth with container registry auth - */ + /** + * Bearer token used to auth with container registry auth + */ public function getRegistryToken(): ?string { return $this->registryToken; } } + diff --git a/src/Model/RegistryCredentialCreateInput.php b/src/Model/RegistryCredentialCreateInput.php index 172fcba9f..ef8473a01 100644 --- a/src/Model/RegistryCredentialCreateInput.php +++ b/src/Model/RegistryCredentialCreateInput.php @@ -13,6 +13,8 @@ */ final class RegistryCredentialCreateInput implements Model, JsonSerializable { + + public function __construct( private readonly string $registry, private readonly ?BasicAuth $auth = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,36 +44,37 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', - * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) - */ + /** + * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', + * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) + */ public function getRegistry(): string { return $this->registry; } - /** - * Basic Auth for the container registry - */ + /** + * Basic Auth for the container registry + */ public function getAuth(): ?BasicAuth { return $this->auth; } - /** - * Refresh token to exchange for bearer token with container registry auth - */ + /** + * Refresh token to exchange for bearer token with container registry auth + */ public function getIdentityToken(): ?string { return $this->identityToken; } - /** - * Bearer token used to auth with container registry auth - */ + /** + * Bearer token used to auth with container registry auth + */ public function getRegistryToken(): ?string { return $this->registryToken; } } + diff --git a/src/Model/RegistryCredentialPatch.php b/src/Model/RegistryCredentialPatch.php index 4536da8ed..ba04e4819 100644 --- a/src/Model/RegistryCredentialPatch.php +++ b/src/Model/RegistryCredentialPatch.php @@ -13,6 +13,8 @@ */ final class RegistryCredentialPatch implements Model, JsonSerializable { + + public function __construct( private readonly ?BasicAuth $auth = null, private readonly ?string $identityToken = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,36 +44,37 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', - * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) - */ + /** + * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', + * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) + */ public function getRegistry(): ?string { return $this->registry; } - /** - * Basic Auth for the container registry - */ + /** + * Basic Auth for the container registry + */ public function getAuth(): ?BasicAuth { return $this->auth; } - /** - * Refresh token to exchange for bearer token with container registry auth - */ + /** + * Refresh token to exchange for bearer token with container registry auth + */ public function getIdentityToken(): ?string { return $this->identityToken; } - /** - * Bearer token used to auth with container registry auth - */ + /** + * Bearer token used to auth with container registry auth + */ public function getRegistryToken(): ?string { return $this->registryToken; } } + diff --git a/src/Model/ReplacementDomainStorage.php b/src/Model/ReplacementDomainStorage.php index 4ed04686a..fcbf10343 100644 --- a/src/Model/ReplacementDomainStorage.php +++ b/src/Model/ReplacementDomainStorage.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Domain; /** * Low level ReplacementDomainStorage (auto-generated) @@ -14,12 +14,14 @@ */ final class ReplacementDomainStorage implements Model, JsonSerializable, Domain { + + public function __construct( private readonly string $type, private readonly string $name, private readonly array $attributes, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, private readonly ?string $project = null, private readonly ?string $registeredName = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,33 +55,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * Domain type - */ + /** + * Domain type + */ public function getType(): string { return $this->type; } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -89,35 +92,36 @@ public function getAttributes(): array return $this->attributes; } - /** - * The identifier of ReplacementDomainStorage - */ + /** + * The identifier of ReplacementDomainStorage + */ public function getId(): ?string { return $this->id; } - /** - * The name of the project - */ + /** + * The name of the project + */ public function getProject(): ?string { return $this->project; } - /** - * The claimed domain name - */ + /** + * The claimed domain name + */ public function getRegisteredName(): ?string { return $this->registeredName; } - /** - * Prod domain which will be replaced by this domain - */ + /** + * Prod domain which will be replaced by this domain + */ public function getReplacementFor(): ?string { return $this->replacementFor; } } + diff --git a/src/Model/ReplacementDomainStorageCreateInput.php b/src/Model/ReplacementDomainStorageCreateInput.php index 4dc6fe72b..6edf21a7e 100644 --- a/src/Model/ReplacementDomainStorageCreateInput.php +++ b/src/Model/ReplacementDomainStorageCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DomainCreateInput; /** * Low level ReplacementDomainStorageCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class ReplacementDomainStorageCreateInput implements Model, JsonSerializable, DomainCreateInput { + + public function __construct( private readonly string $name, private readonly ?array $attributes = [], @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,9 +43,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -52,11 +56,12 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Prod domain which will be replaced by this domain - */ + /** + * Prod domain which will be replaced by this domain + */ public function getReplacementFor(): ?string { return $this->replacementFor; } } + diff --git a/src/Model/ReplacementDomainStoragePatch.php b/src/Model/ReplacementDomainStoragePatch.php index 094a5a6b6..94635e486 100644 --- a/src/Model/ReplacementDomainStoragePatch.php +++ b/src/Model/ReplacementDomainStoragePatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\DomainPatch; /** * Low level ReplacementDomainStoragePatch (auto-generated) @@ -13,11 +14,14 @@ */ final class ReplacementDomainStoragePatch implements Model, JsonSerializable, DomainPatch { + + public function __construct( private readonly ?TLSSettings $attributes = null, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getAttributes(): ?TLSSettings { return $this->attributes; } } + diff --git a/src/Model/RepositoryInformation.php b/src/Model/RepositoryInformation.php index 99d955916..2850a4a8c 100644 --- a/src/Model/RepositoryInformation.php +++ b/src/Model/RepositoryInformation.php @@ -14,12 +14,15 @@ */ final class RepositoryInformation implements Model, JsonSerializable { + + public function __construct( private readonly string $url, private readonly ?string $clientSshKey, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The Git URL - */ + /** + * The Git URL + */ public function getUrl(): string { return $this->url; } - /** - * SSH Key used to access external private repositories - */ + /** + * SSH Key used to access external private repositories + */ public function getClientSshKey(): ?string { return $this->clientSshKey; } } + diff --git a/src/Model/RequestBuffering.php b/src/Model/RequestBuffering.php index ccd4e7579..4d47c10c9 100644 --- a/src/Model/RequestBuffering.php +++ b/src/Model/RequestBuffering.php @@ -13,12 +13,15 @@ */ final class RequestBuffering implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, private readonly ?string $maxRequestSize, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMaxRequestSize(): ?string return $this->maxRequestSize; } } + diff --git a/src/Model/ResetEmailAddressRequest.php b/src/Model/ResetEmailAddressRequest.php index 2bf8b1524..01bde6f20 100644 --- a/src/Model/ResetEmailAddressRequest.php +++ b/src/Model/ResetEmailAddressRequest.php @@ -13,11 +13,14 @@ */ final class ResetEmailAddressRequest implements Model, JsonSerializable { + + public function __construct( private readonly string $emailAddress, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getEmailAddress(): string return $this->emailAddress; } } + diff --git a/src/Model/ResourceConfig.php b/src/Model/ResourceConfig.php index 75b166dad..ed2465c1e 100644 --- a/src/Model/ResourceConfig.php +++ b/src/Model/ResourceConfig.php @@ -13,11 +13,14 @@ */ final class ResourceConfig implements Model, JsonSerializable { + + public function __construct( private readonly ?string $profileSize = null, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Profile size (e.g. "0.5", "1", "2") - */ + /** + * Profile size (e.g. "0.5", "1", "2") + */ public function getProfileSize(): ?string { return $this->profileSize; } } + diff --git a/src/Model/Resources.php b/src/Model/Resources.php index 7e4f18f14..7207082df 100644 --- a/src/Model/Resources.php +++ b/src/Model/Resources.php @@ -13,6 +13,8 @@ */ final class Resources implements Model, JsonSerializable { + + public function __construct( private readonly ?int $baseMemory, private readonly ?int $memoryRatio, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function getDisk(): ?DiskResources return $this->disk; } } + diff --git a/src/Model/Resources1.php b/src/Model/Resources1.php index f05e9c7d5..bc5edaa89 100644 --- a/src/Model/Resources1.php +++ b/src/Model/Resources1.php @@ -13,6 +13,8 @@ */ final class Resources1 implements Model, JsonSerializable { + + public function __construct( private readonly ?int $baseMemory, private readonly ?int $memoryRatio, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function getDisk(): ?DiskResources1 return $this->disk; } } + diff --git a/src/Model/Resources2.php b/src/Model/Resources2.php index c606ba5aa..6ab1187b4 100644 --- a/src/Model/Resources2.php +++ b/src/Model/Resources2.php @@ -13,11 +13,14 @@ */ final class Resources2 implements Model, JsonSerializable { + + public function __construct( private readonly ?string $profileSize, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getProfileSize(): ?string return $this->profileSize; } } + diff --git a/src/Model/Resources3.php b/src/Model/Resources3.php index b0a9075bf..089925172 100644 --- a/src/Model/Resources3.php +++ b/src/Model/Resources3.php @@ -13,12 +13,15 @@ */ final class Resources3 implements Model, JsonSerializable { + + public function __construct( private readonly DiskResources2 $disk, private readonly ?string $profileSize, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getDisk(): DiskResources2 return $this->disk; } } + diff --git a/src/Model/Resources4.php b/src/Model/Resources4.php index 7ebcbdbe0..d556e5639 100644 --- a/src/Model/Resources4.php +++ b/src/Model/Resources4.php @@ -13,6 +13,7 @@ */ final class Resources4 implements Model, JsonSerializable { + public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; public const INIT_PARENT = 'parent'; @@ -22,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,11 +41,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when activating an environment - */ + /** + * The resources used when activating an environment + */ public function getInit(): ?string { return $this->init; } } + diff --git a/src/Model/Resources5.php b/src/Model/Resources5.php index 9d0f49894..cf0a21f92 100644 --- a/src/Model/Resources5.php +++ b/src/Model/Resources5.php @@ -13,6 +13,7 @@ */ final class Resources5 implements Model, JsonSerializable { + public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; public const INIT_PARENT = 'parent'; @@ -22,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,11 +41,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when initializing services of the new environment - */ + /** + * The resources used when initializing services of the new environment + */ public function getInit(): ?string { return $this->init; } } + diff --git a/src/Model/Resources6.php b/src/Model/Resources6.php index 2c49d57f7..e28e23a39 100644 --- a/src/Model/Resources6.php +++ b/src/Model/Resources6.php @@ -13,6 +13,7 @@ */ final class Resources6 implements Model, JsonSerializable { + public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; @@ -21,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -38,11 +40,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when initializing the environment - */ + /** + * The resources used when initializing the environment + */ public function getInit(): ?string { return $this->init; } } + diff --git a/src/Model/Resources7.php b/src/Model/Resources7.php index cef9398ab..d27ec7142 100644 --- a/src/Model/Resources7.php +++ b/src/Model/Resources7.php @@ -13,6 +13,7 @@ */ final class Resources7 implements Model, JsonSerializable { + public const INIT_CHILD = 'child'; public const INIT__DEFAULT = 'default'; public const INIT_MANUAL = 'manual'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,11 +42,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when merging an environment - */ + /** + * The resources used when merging an environment + */ public function getInit(): ?string { return $this->init; } } + diff --git a/src/Model/Resources8.php b/src/Model/Resources8.php index 321789816..4a0e33c2f 100644 --- a/src/Model/Resources8.php +++ b/src/Model/Resources8.php @@ -13,6 +13,7 @@ */ final class Resources8 implements Model, JsonSerializable { + public const INIT_BACKUP = 'backup'; public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,11 +42,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when initializing services of the environment - */ + /** + * The resources used when initializing services of the environment + */ public function getInit(): ?string { return $this->init; } } + diff --git a/src/Model/Resources9.php b/src/Model/Resources9.php index 884dbe95c..0ce58a26b 100644 --- a/src/Model/Resources9.php +++ b/src/Model/Resources9.php @@ -14,12 +14,15 @@ */ final class Resources9 implements Model, JsonSerializable { + + public function __construct( private readonly int $baseMemory, private readonly int $memoryRatio, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The base memory for the container - */ + /** + * The base memory for the container + */ public function getBaseMemory(): int { return $this->baseMemory; } - /** - * The amount of memory to allocate per units of CPU - */ + /** + * The amount of memory to allocate per units of CPU + */ public function getMemoryRatio(): int { return $this->memoryRatio; } } + diff --git a/src/Model/ResourcesByService200Response.php b/src/Model/ResourcesByService200Response.php index c330cc221..8b404b2f0 100644 --- a/src/Model/ResourcesByService200Response.php +++ b/src/Model/ResourcesByService200Response.php @@ -13,6 +13,7 @@ */ final class ResourcesByService200Response implements Model, JsonSerializable { + public const _DG2_HOST_TYPES_MAPPING_WEB = 'web'; public const _DG2_HOST_TYPES_MAPPING_UNIFIED = 'unified'; public const _DG2_HOST_TYPES_MAPPING_EMPTY = ''; @@ -30,6 +31,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -90,9 +92,9 @@ public function getService(): string return $this->service; } - /** - * @return ResourcesByService200ResponseDataInner[] - */ + /** + * @return ResourcesByService200ResponseDataInner[] + */ public function getData(): array { return $this->data; @@ -103,3 +105,4 @@ public function getDg2HostTypesMapping(): ?array return $this->dg2HostTypesMapping; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInner.php b/src/Model/ResourcesByService200ResponseDataInner.php index 41f861b19..ac4b17058 100644 --- a/src/Model/ResourcesByService200ResponseDataInner.php +++ b/src/Model/ResourcesByService200ResponseDataInner.php @@ -13,12 +13,15 @@ */ final class ResourcesByService200ResponseDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?array $instances = [], ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getTimestamp(): int return $this->timestamp; } - /** - * @return ResourcesByService200ResponseDataInnerInstancesValue[]|null - */ + /** + * @return ResourcesByService200ResponseDataInnerInstancesValue[]|null + */ public function getInstances(): ?array { return $this->instances; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php index fb4ed45d7..6047e98f0 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValue implements Model, JsonSerializable { + + public function __construct( private readonly ?ResourcesByService200ResponseDataInnerInstancesValueCpuUsed $cpuUsed = null, private readonly ?ResourcesByService200ResponseDataInnerInstancesValueCpuLimit $cpuLimit = null, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -105,11 +108,12 @@ public function getIrqPressure(): ?ResourcesByService200ResponseDataInnerInstanc return $this->irqPressure; } - /** - * @return ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue[]|null - */ + /** + * @return ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue[]|null + */ public function getMountpoints(): ?array { return $this->mountpoints; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php index 67ed75f3d..2411cfcd6 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueCpuLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?float $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?float return $this->max; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php index f03e58712..91436a815 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueCpuPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php index 7ffa0481c..af0fe3a32 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueCpuUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php index ef1aff2c6..5c667717e 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueIoPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php index ec2ebe2f6..d413f52ca 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueIrqPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php index 49f6ce9ab..491255fed 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?int return $this->max; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php index 6174281f3..b5cd9a138 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php index 0835616e6..08e15e6c0 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php index dc1507a1b..ddfaccd2c 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue implements Model, JsonSerializable { + + public function __construct( private readonly ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed $diskUsed = null, private readonly ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit $diskLimit = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getInodesLimit(): ?ResourcesByService200ResponseDataInnerInstanc return $this->inodesLimit; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php index 72e8bafe9..fbc1a9013 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?int return $this->max; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php index b3185830a..b1de54b9c 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php index 26f920507..3b51c5d6e 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?int return $this->max; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php index bf2e6e5af..0e10667cb 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php index 85d8d5d79..f35c50bcd 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueSwapUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesLimits.php b/src/Model/ResourcesLimits.php index 124c254c5..fbd9c3fb5 100644 --- a/src/Model/ResourcesLimits.php +++ b/src/Model/ResourcesLimits.php @@ -14,6 +14,8 @@ */ final class ResourcesLimits implements Model, JsonSerializable { + + public function __construct( private readonly bool $containerProfiles, private readonly ProductionResources $production, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enable support for customizable container profiles - */ + /** + * Enable support for customizable container profiles + */ public function getContainerProfiles(): bool { return $this->containerProfiles; } - /** - * Resources for production environments - */ + /** + * Resources for production environments + */ public function getProduction(): ProductionResources { return $this->production; } - /** - * Resources for development environments - */ + /** + * Resources for development environments + */ public function getDevelopment(): DevelopmentResources { return $this->development; } } + diff --git a/src/Model/ResourcesOverridesValue.php b/src/Model/ResourcesOverridesValue.php index e70bae67d..7e4f7daf9 100644 --- a/src/Model/ResourcesOverridesValue.php +++ b/src/Model/ResourcesOverridesValue.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,15 +13,18 @@ */ final class ResourcesOverridesValue implements Model, JsonSerializable { + + public function __construct( private readonly array $services, private readonly bool $redeployedStart, private readonly bool $redeployedEnd, - private readonly ?DateTime $startsAt, - private readonly ?DateTime $endsAt, + private readonly ?\DateTime $startsAt, + private readonly ?\DateTime $endsAt, ) { } + public function getModelName(): string { return self::class; @@ -43,20 +45,20 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return PreServiceResourcesOverridesValue[] - */ + /** + * @return PreServiceResourcesOverridesValue[] + */ public function getServices(): array { return $this->services; } - public function getStartsAt(): ?DateTime + public function getStartsAt(): ?\DateTime { return $this->startsAt; } - public function getEndsAt(): ?DateTime + public function getEndsAt(): ?\DateTime { return $this->endsAt; } @@ -71,3 +73,4 @@ public function getRedeployedEnd(): bool return $this->redeployedEnd; } } + diff --git a/src/Model/ResourcesOverview200Response.php b/src/Model/ResourcesOverview200Response.php index bb381a052..b65a44654 100644 --- a/src/Model/ResourcesOverview200Response.php +++ b/src/Model/ResourcesOverview200Response.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200Response implements Model, JsonSerializable { + + public function __construct( private readonly int $grain, private readonly int $from, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -77,11 +80,12 @@ public function getBranchMachineName(): string return $this->branchMachineName; } - /** - * @return ResourcesOverview200ResponseDataInner[] - */ + /** + * @return ResourcesOverview200ResponseDataInner[] + */ public function getData(): array { return $this->data; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInner.php b/src/Model/ResourcesOverview200ResponseDataInner.php index 4ea1c6768..e0c97d4b6 100644 --- a/src/Model/ResourcesOverview200ResponseDataInner.php +++ b/src/Model/ResourcesOverview200ResponseDataInner.php @@ -13,12 +13,15 @@ */ final class ResourcesOverview200ResponseDataInner implements Model, JsonSerializable { + + public function __construct( private readonly int $timestamp, private readonly ?array $services = [], ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getTimestamp(): int return $this->timestamp; } - /** - * @return ResourcesOverview200ResponseDataInnerServicesValue[]|null - */ + /** + * @return ResourcesOverview200ResponseDataInnerServicesValue[]|null + */ public function getServices(): ?array { return $this->services; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php index b85a7d788..57d77a9e2 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValue implements Model, JsonSerializable { + + public function __construct( private readonly ?ResourcesOverview200ResponseDataInnerServicesValueCpuUsed $cpuUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueCpuLimit $cpuLimit = null, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -105,11 +108,12 @@ public function getIrqPressure(): ?ResourcesOverview200ResponseDataInnerServices return $this->irqPressure; } - /** - * @return ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue[]|null - */ + /** + * @return ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue[]|null + */ public function getMountpoints(): ?array { return $this->mountpoints; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php index 8f0b90b1d..9d3c8063a 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueCpuLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?float $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?float return $this->max; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php index 49ec15d30..b66acc906 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueCpuPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php index 11acea4f4..76214ec56 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueCpuUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php index ad12d047d..dea115e23 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueIoPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php index 2a35fcf1b..ba72fe44c 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueIrqPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php index 95dd8a938..bd3718950 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?int return $this->max; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php index b463fbd2c..e709ac977 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php index 1f126347e..2d8ef7ec1 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php index 12ba59769..740f5eca2 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue implements Model, JsonSerializable { + + public function __construct( private readonly ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed $diskUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit $diskLimit = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getInodesLimit(): ?ResourcesOverview200ResponseDataInnerServices return $this->inodesLimit; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php index 5838ad691..cd1c5ed5c 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?int return $this->max; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php index b315c021c..06fd3e8d6 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php index 034fc365a..2f2542eac 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?int return $this->max; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php index 4a47b0d79..aaceedfb1 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php index f9cd3b765..668ea7050 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php @@ -13,11 +13,14 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueSwapLimit implements Model, JsonSerializable { + + public function __construct( private readonly ?int $max = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getMax(): ?int return $this->max; } } + diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php index 8af89e0e4..cceaad927 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueSwapUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200Response.php b/src/Model/ResourcesSummary200Response.php index 5bdad89ee..609f62e78 100644 --- a/src/Model/ResourcesSummary200Response.php +++ b/src/Model/ResourcesSummary200Response.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200Response implements Model, JsonSerializable { + + public function __construct( private readonly int $from, private readonly int $to, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function getData(): ResourcesSummary200ResponseData return $this->data; } } + diff --git a/src/Model/ResourcesSummary200ResponseData.php b/src/Model/ResourcesSummary200ResponseData.php index 6996008fe..49221ff1e 100644 --- a/src/Model/ResourcesSummary200ResponseData.php +++ b/src/Model/ResourcesSummary200ResponseData.php @@ -13,11 +13,14 @@ */ final class ResourcesSummary200ResponseData implements Model, JsonSerializable { + + public function __construct( private readonly array $services, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getServices(): array return $this->services; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php index 1f5693ae6..af26a2d41 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValue implements Model, JsonSerializable { + + public function __construct( private readonly ?ResourcesSummary200ResponseDataServicesValueValueCpuUsed $cpuUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueCpuLimit $cpuLimit = null, @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -105,11 +108,12 @@ public function getIrqPressure(): ?ResourcesSummary200ResponseDataServicesValueV return $this->irqPressure; } - /** - * @return ResourcesSummary200ResponseDataServicesValueValueMountpointsValue[]|null - */ + /** + * @return ResourcesSummary200ResponseDataServicesValueValueMountpointsValue[]|null + */ public function getMountpoints(): ?array { return $this->mountpoints; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php index d64ea4ffa..92e8c38f1 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueCpuPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php index 09d3809aa..7e5584024 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueCpuUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php index 7a0ef1f48..ff9f61fd6 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueIoPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php index 39bb4df54..15b7aeee0 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueIrqPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php index 85c171bf6..e3eda5922 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMemoryPressure implements Model, JsonSerializable { + + public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php index a312b175e..43e2edcd5 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMemoryUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php index c0d6f9632..e68272e44 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMountpointsValue implements Model, JsonSerializable { + + public function __construct( private readonly ?ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed $diskUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit $diskLimit = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getInodesLimit(): ?ResourcesOverview200ResponseDataInnerServices return $this->inodesLimit; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php index 751cd31e9..dab7ae8dd 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php index 5ee14e8f1..706fdc24e 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php index 929fa0186..7922ec1b3 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueSwapUsed implements Model, JsonSerializable { + + public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -103,3 +106,4 @@ public function getP99(): ?float return $this->p99; } } + diff --git a/src/Model/ResourcesSummary400Response.php b/src/Model/ResourcesSummary400Response.php index 347e22a08..efc101195 100644 --- a/src/Model/ResourcesSummary400Response.php +++ b/src/Model/ResourcesSummary400Response.php @@ -13,6 +13,8 @@ */ final class ResourcesSummary400Response implements Model, JsonSerializable { + + public function __construct( private readonly string $type, private readonly string $title, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -61,3 +64,4 @@ public function getViolations(): array return $this->violations; } } + diff --git a/src/Model/Route.php b/src/Model/Route.php index 3da512752..d295708bd 100644 --- a/src/Model/Route.php +++ b/src/Model/Route.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level Route (auto-generated) * @@ -23,3 +25,4 @@ public function getType(): mixed; public function getTls(): mixed; } + diff --git a/src/Model/RouterResources.php b/src/Model/RouterResources.php index 2eb94b38e..aa3d184e1 100644 --- a/src/Model/RouterResources.php +++ b/src/Model/RouterResources.php @@ -14,6 +14,8 @@ */ final class RouterResources implements Model, JsonSerializable { + + public function __construct( private readonly float $baselineCpu, private readonly int $baselineMemory, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -42,35 +45,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Router baseline CPU for flex plan - */ + /** + * Router baseline CPU for flex plan + */ public function getBaselineCpu(): float { return $this->baselineCpu; } - /** - * Router baseline memory (MB) for flex plan - */ + /** + * Router baseline memory (MB) for flex plan + */ public function getBaselineMemory(): int { return $this->baselineMemory; } - /** - * Router max CPU for flex plan - */ + /** + * Router max CPU for flex plan + */ public function getMaxCpu(): float { return $this->maxCpu; } - /** - * Router max memory (MB) for flex plan - */ + /** + * Router max memory (MB) for flex plan + */ public function getMaxMemory(): int { return $this->maxMemory; } } + diff --git a/src/Model/RoutesValue.php b/src/Model/RoutesValue.php index 13db27eeb..865cb8e38 100644 --- a/src/Model/RoutesValue.php +++ b/src/Model/RoutesValue.php @@ -2,6 +2,8 @@ namespace Upsun\Model; +use JsonSerializable; + /** * Low level RoutesValue (auto-generated) * @@ -17,3 +19,4 @@ public function jsonSerialize(): array; public function __toString(): string; } + diff --git a/src/Model/RunConfiguration.php b/src/Model/RunConfiguration.php index c960445c7..bfbb3bf33 100644 --- a/src/Model/RunConfiguration.php +++ b/src/Model/RunConfiguration.php @@ -14,12 +14,15 @@ */ final class RunConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly string $command, private readonly int $timeout, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The command to execute when running the task - */ + /** + * The command to execute when running the task + */ public function getCommand(): string { return $this->command; } - /** - * The maximum timeout in seconds after which the task will be forcefully killed - */ + /** + * The maximum timeout in seconds after which the task will be forcefully killed + */ public function getTimeout(): int { return $this->timeout; } } + diff --git a/src/Model/RuntimeOperations.php b/src/Model/RuntimeOperations.php index 7e7f4f3e6..96c8aab76 100644 --- a/src/Model/RuntimeOperations.php +++ b/src/Model/RuntimeOperations.php @@ -13,11 +13,14 @@ */ final class RuntimeOperations implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, runtime operations can be triggered. - */ + /** + * If true, runtime operations can be triggered. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/SSIConfiguration.php b/src/Model/SSIConfiguration.php index 059b92c20..5e4106b78 100644 --- a/src/Model/SSIConfiguration.php +++ b/src/Model/SSIConfiguration.php @@ -14,11 +14,14 @@ */ final class SSIConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether SSI include is enabled. - */ + /** + * Whether SSI include is enabled. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/ScheduleInner.php b/src/Model/ScheduleInner.php index f765e9a54..5895a090c 100644 --- a/src/Model/ScheduleInner.php +++ b/src/Model/ScheduleInner.php @@ -13,12 +13,15 @@ */ final class ScheduleInner implements Model, JsonSerializable { + + public function __construct( private readonly string $interval, private readonly int $count, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getCount(): int return $this->count; } } + diff --git a/src/Model/Script.php b/src/Model/Script.php index eff61d202..5cb24cc06 100644 --- a/src/Model/Script.php +++ b/src/Model/Script.php @@ -14,12 +14,15 @@ */ final class Script implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/ScriptIntegration.php b/src/Model/ScriptIntegration.php index 736e9b4d7..833276f1c 100644 --- a/src/Model/ScriptIntegration.php +++ b/src/Model/ScriptIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level ScriptIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class ScriptIntegration implements Model, JsonSerializable, Integration { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -27,12 +28,13 @@ public function __construct( private readonly array $states, private readonly string $result, private readonly string $script, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -60,33 +62,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -112,27 +114,28 @@ public function getStates(): array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): string { return $this->result; } - /** - * The script to run - */ + /** + * The script to run + */ public function getScript(): string { return $this->script; } - /** - * The identifier of ScriptIntegration - */ + /** + * The identifier of ScriptIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/ScriptIntegrationCreateInput.php b/src/Model/ScriptIntegrationCreateInput.php index 0b36eb795..07600c51c 100644 --- a/src/Model/ScriptIntegrationCreateInput.php +++ b/src/Model/ScriptIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level ScriptIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class ScriptIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,17 +54,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The script to run - */ + /** + * The script to run + */ public function getScript(): string { return $this->script; @@ -87,11 +90,12 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } } + diff --git a/src/Model/ScriptIntegrationPatch.php b/src/Model/ScriptIntegrationPatch.php index 4bdee7814..7d6669df7 100644 --- a/src/Model/ScriptIntegrationPatch.php +++ b/src/Model/ScriptIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level ScriptIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class ScriptIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -28,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,17 +54,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The script to run - */ + /** + * The script to run + */ public function getScript(): string { return $this->script; @@ -87,11 +90,12 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } } + diff --git a/src/Model/SendOrgMfaReminders200ResponseValue.php b/src/Model/SendOrgMfaReminders200ResponseValue.php index 996f6208f..6220a4a10 100644 --- a/src/Model/SendOrgMfaReminders200ResponseValue.php +++ b/src/Model/SendOrgMfaReminders200ResponseValue.php @@ -13,12 +13,15 @@ */ final class SendOrgMfaReminders200ResponseValue implements Model, JsonSerializable { + + public function __construct( private readonly ?int $code = null, private readonly ?string $message = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMessage(): ?string return $this->message; } } + diff --git a/src/Model/SendOrgMfaRemindersRequest.php b/src/Model/SendOrgMfaRemindersRequest.php index 5d032c8e6..982c0f58e 100644 --- a/src/Model/SendOrgMfaRemindersRequest.php +++ b/src/Model/SendOrgMfaRemindersRequest.php @@ -13,11 +13,14 @@ */ final class SendOrgMfaRemindersRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?array $userIds = [], ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getUserIds(): ?array return $this->userIds; } } + diff --git a/src/Model/ServiceRelationshipsValue.php b/src/Model/ServiceRelationshipsValue.php index 0aa9f066d..f1f8d77c9 100644 --- a/src/Model/ServiceRelationshipsValue.php +++ b/src/Model/ServiceRelationshipsValue.php @@ -13,12 +13,15 @@ */ final class ServiceRelationshipsValue implements Model, JsonSerializable { + + public function __construct( private readonly ?string $service, private readonly ?string $endpoint, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getEndpoint(): ?string return $this->endpoint; } } + diff --git a/src/Model/ServicesValue.php b/src/Model/ServicesValue.php index b3fa0aef2..91b3806b1 100644 --- a/src/Model/ServicesValue.php +++ b/src/Model/ServicesValue.php @@ -13,6 +13,7 @@ */ final class ServicesValue implements Model, JsonSerializable { + public const SIZE__2_XL = '2XL'; public const SIZE__4_XL = '4XL'; public const SIZE_AUTO = 'AUTO'; @@ -37,6 +38,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -125,3 +127,4 @@ public function getSupportsHorizontalScaling(): bool return $this->supportsHorizontalScaling; } } + diff --git a/src/Model/ServicesValue1.php b/src/Model/ServicesValue1.php index 40649a225..7bc0dfd9d 100644 --- a/src/Model/ServicesValue1.php +++ b/src/Model/ServicesValue1.php @@ -13,6 +13,8 @@ */ final class ServicesValue1 implements Model, JsonSerializable { + + public function __construct( private readonly ?Resources2 $resources, private readonly ?int $instanceCount, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getDisk(): ?int return $this->disk; } } + diff --git a/src/Model/Sizing.php b/src/Model/Sizing.php index b2d614e4d..f61f68e2b 100644 --- a/src/Model/Sizing.php +++ b/src/Model/Sizing.php @@ -14,6 +14,8 @@ */ final class Sizing implements Model, JsonSerializable { + + public function __construct( private readonly array $services, private readonly array $webapps, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -41,35 +44,36 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return ServicesValue1[] - */ + /** + * @return ServicesValue1[] + */ public function getServices(): array { return $this->services; } - /** - * @return WebApplicationsValue1[] - */ + /** + * @return WebApplicationsValue1[] + */ public function getWebapps(): array { return $this->webapps; } - /** - * @return ServicesValue1[] - */ + /** + * @return ServicesValue1[] + */ public function getWorkers(): array { return $this->workers; } - /** - * @return TasksValue[] - */ + /** + * @return TasksValue[] + */ public function getTasks(): array { return $this->tasks; } } + diff --git a/src/Model/SlackIntegration.php b/src/Model/SlackIntegration.php index db0ce2f15..97dacb624 100644 --- a/src/Model/SlackIntegration.php +++ b/src/Model/SlackIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level SlackIntegration (auto-generated) @@ -14,16 +14,19 @@ */ final class SlackIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, private readonly string $channel, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -46,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The Slack channel to post messages to - */ + /** + * The Slack channel to post messages to + */ public function getChannel(): string { return $this->channel; } - /** - * The identifier of SlackIntegration - */ + /** + * The identifier of SlackIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/SlackIntegrationCreateInput.php b/src/Model/SlackIntegrationCreateInput.php index e30d03b6e..78425084d 100644 --- a/src/Model/SlackIntegrationCreateInput.php +++ b/src/Model/SlackIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SlackIntegrationCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class SlackIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $token, @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Slack token to use - */ + /** + * The Slack token to use + */ public function getToken(): string { return $this->token; } - /** - * The Slack channel to post messages to - */ + /** + * The Slack channel to post messages to + */ public function getChannel(): string { return $this->channel; } } + diff --git a/src/Model/SlackIntegrationPatch.php b/src/Model/SlackIntegrationPatch.php index d7633838a..0ffc31102 100644 --- a/src/Model/SlackIntegrationPatch.php +++ b/src/Model/SlackIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level SlackIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class SlackIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $token, @@ -20,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Slack token to use - */ + /** + * The Slack token to use + */ public function getToken(): string { return $this->token; } - /** - * The Slack channel to post messages to - */ + /** + * The Slack channel to post messages to + */ public function getChannel(): string { return $this->channel; } } + diff --git a/src/Model/SourceCodeConfiguration.php b/src/Model/SourceCodeConfiguration.php index 9b96d10d3..d1ea897bd 100644 --- a/src/Model/SourceCodeConfiguration.php +++ b/src/Model/SourceCodeConfiguration.php @@ -13,12 +13,15 @@ */ final class SourceCodeConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly array $operations, private readonly ?string $root, ) { } + public function getModelName(): string { return self::class; @@ -42,11 +45,12 @@ public function getRoot(): ?string return $this->root; } - /** - * @return SourceOperationsValue[] - */ + /** + * @return SourceOperationsValue[] + */ public function getOperations(): array { return $this->operations; } } + diff --git a/src/Model/SourceCodeConfiguration1.php b/src/Model/SourceCodeConfiguration1.php index 508c2a087..d52777801 100644 --- a/src/Model/SourceCodeConfiguration1.php +++ b/src/Model/SourceCodeConfiguration1.php @@ -14,11 +14,14 @@ */ final class SourceCodeConfiguration1 implements Model, JsonSerializable { + + public function __construct( private readonly string $root, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The root of the task relative to the repository root - */ + /** + * The root of the task relative to the repository root + */ public function getRoot(): string { return $this->root; } } + diff --git a/src/Model/SourceOperations.php b/src/Model/SourceOperations.php index e97b7c34a..80159790c 100644 --- a/src/Model/SourceOperations.php +++ b/src/Model/SourceOperations.php @@ -13,11 +13,14 @@ */ final class SourceOperations implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, source operations can be triggered. - */ + /** + * If true, source operations can be triggered. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/SourceOperationsValue.php b/src/Model/SourceOperationsValue.php index ffd8fd044..87ab0cbc7 100644 --- a/src/Model/SourceOperationsValue.php +++ b/src/Model/SourceOperationsValue.php @@ -13,11 +13,14 @@ */ final class SourceOperationsValue implements Model, JsonSerializable { + + public function __construct( private readonly ?string $command, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getCommand(): ?string return $this->command; } } + diff --git a/src/Model/SpecificOverridesValue.php b/src/Model/SpecificOverridesValue.php index 7af7fe4d4..49aef14a6 100644 --- a/src/Model/SpecificOverridesValue.php +++ b/src/Model/SpecificOverridesValue.php @@ -13,6 +13,8 @@ */ final class SpecificOverridesValue implements Model, JsonSerializable { + + public function __construct( private readonly ?string $expires = null, private readonly ?string $passthru = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -68,3 +71,4 @@ public function getHeaders(): ?array return $this->headers; } } + diff --git a/src/Model/Splunk.php b/src/Model/Splunk.php index 9706095ee..09c38d234 100644 --- a/src/Model/Splunk.php +++ b/src/Model/Splunk.php @@ -14,12 +14,15 @@ */ final class Splunk implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/SplunkIntegration.php b/src/Model/SplunkIntegration.php index d4ea9850f..c55a76686 100644 --- a/src/Model/SplunkIntegration.php +++ b/src/Model/SplunkIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level SplunkIntegration (auto-generated) @@ -14,6 +14,8 @@ */ final class SplunkIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, @@ -23,12 +25,13 @@ public function __construct( private readonly string $sourcetype, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -56,33 +59,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -93,33 +96,33 @@ public function getExtra(): array return $this->extra; } - /** - * The Splunk HTTP Event Connector REST API endpoint - */ + /** + * The Splunk HTTP Event Connector REST API endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Splunk Index - */ + /** + * The Splunk Index + */ public function getIndex(): string { return $this->index; } - /** - * The event 'sourcetype' - */ + /** + * The event 'sourcetype' + */ public function getSourcetype(): string { return $this->sourcetype; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -130,11 +133,12 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of SplunkIntegration - */ + /** + * The identifier of SplunkIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/SplunkIntegrationCreateInput.php b/src/Model/SplunkIntegrationCreateInput.php index 29ceac83b..66cb3bf69 100644 --- a/src/Model/SplunkIntegrationCreateInput.php +++ b/src/Model/SplunkIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SplunkIntegrationCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class SplunkIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $url, @@ -25,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,33 +53,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Splunk HTTP Event Connector REST API endpoint - */ + /** + * The Splunk HTTP Event Connector REST API endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Splunk Index - */ + /** + * The Splunk Index + */ public function getIndex(): string { return $this->index; } - /** - * The Splunk Authorization Token - */ + /** + * The Splunk Authorization Token + */ public function getToken(): string { return $this->token; @@ -86,17 +90,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The event 'sourcetype' - */ + /** + * The event 'sourcetype' + */ public function getSourcetype(): ?string { return $this->sourcetype; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -107,3 +111,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/SplunkIntegrationPatch.php b/src/Model/SplunkIntegrationPatch.php index 548daa0b7..7058c3697 100644 --- a/src/Model/SplunkIntegrationPatch.php +++ b/src/Model/SplunkIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level SplunkIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class SplunkIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $url, @@ -25,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,33 +53,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Splunk HTTP Event Connector REST API endpoint - */ + /** + * The Splunk HTTP Event Connector REST API endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Splunk Index - */ + /** + * The Splunk Index + */ public function getIndex(): string { return $this->index; } - /** - * The Splunk Authorization Token - */ + /** + * The Splunk Authorization Token + */ public function getToken(): string { return $this->token; @@ -86,17 +90,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The event 'sourcetype' - */ + /** + * The event 'sourcetype' + */ public function getSourcetype(): ?string { return $this->sourcetype; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -107,3 +111,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/SshKey.php b/src/Model/SshKey.php index 4089bf657..9cdad5aab 100644 --- a/src/Model/SshKey.php +++ b/src/Model/SshKey.php @@ -14,6 +14,8 @@ */ final class SshKey implements Model, JsonSerializable { + + public function __construct( private readonly ?int $keyId = null, private readonly ?int $uid = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the public key. - */ + /** + * The ID of the public key. + */ public function getKeyId(): ?int { return $this->keyId; } - /** - * The internal user ID. - */ + /** + * The internal user ID. + */ public function getUid(): ?int { return $this->uid; } - /** - * The fingerprint of the public key. - */ + /** + * The fingerprint of the public key. + */ public function getFingerprint(): ?string { return $this->fingerprint; } - /** - * The title of the public key. - */ + /** + * The title of the public key. + */ public function getTitle(): ?string { return $this->title; } - /** - * The actual value of the public key. - */ + /** + * The actual value of the public key. + */ public function getValue(): ?string { return $this->value; } - /** - * The time of the last key modification (ISO 8601) - */ + /** + * The time of the last key modification (ISO 8601) + */ public function getChanged(): ?string { return $this->changed; } } + diff --git a/src/Model/Status.php b/src/Model/Status.php index f7ace902c..5b63ee3fd 100644 --- a/src/Model/Status.php +++ b/src/Model/Status.php @@ -14,12 +14,15 @@ */ final class Status implements Model, JsonSerializable { + + public function __construct( private readonly string $code, private readonly string $message, ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getMessage(): string return $this->message; } } + diff --git a/src/Model/StickyConfiguration.php b/src/Model/StickyConfiguration.php index d260f6629..076195ffa 100644 --- a/src/Model/StickyConfiguration.php +++ b/src/Model/StickyConfiguration.php @@ -14,11 +14,14 @@ */ final class StickyConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether sticky routing is enabled. - */ + /** + * Whether sticky routing is enabled. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/StrictTransportSecurityOptions.php b/src/Model/StrictTransportSecurityOptions.php index a3d2d5a5d..9aaaebfd4 100644 --- a/src/Model/StrictTransportSecurityOptions.php +++ b/src/Model/StrictTransportSecurityOptions.php @@ -13,6 +13,8 @@ */ final class StrictTransportSecurityOptions implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled, private readonly ?bool $includeSubdomains, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +42,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether strict transport security is enabled or not - */ + /** + * Whether strict transport security is enabled or not + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Whether the strict transport security policy should include all subdomains - */ + /** + * Whether the strict transport security policy should include all subdomains + */ public function getIncludeSubdomains(): ?bool { return $this->includeSubdomains; } - /** - * Whether the strict transport security policy should be preloaded in browsers - */ + /** + * Whether the strict transport security policy should be preloaded in browsers + */ public function getPreload(): ?bool { return $this->preload; } } + diff --git a/src/Model/StringFilter.php b/src/Model/StringFilter.php index 42619716f..ac75b7641 100644 --- a/src/Model/StringFilter.php +++ b/src/Model/StringFilter.php @@ -13,6 +13,8 @@ */ final class StringFilter implements Model, JsonSerializable { + + public function __construct( private readonly ?string $eq = null, private readonly ?string $ne = null, @@ -25,6 +27,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -49,67 +52,68 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Equal - */ + /** + * Equal + */ public function getEq(): ?string { return $this->eq; } - /** - * Not equal - */ + /** + * Not equal + */ public function getNe(): ?string { return $this->ne; } - /** - * In (comma-separated list) - */ + /** + * In (comma-separated list) + */ public function getIn(): ?string { return $this->in; } - /** - * Not in (comma-separated list) - */ + /** + * Not in (comma-separated list) + */ public function getNin(): ?string { return $this->nin; } - /** - * Between (comma-separated list) - */ + /** + * Between (comma-separated list) + */ public function getBetween(): ?string { return $this->between; } - /** - * Contains - */ + /** + * Contains + */ public function getContains(): ?string { return $this->contains; } - /** - * Starts with - */ + /** + * Starts with + */ public function getStarts(): ?string { return $this->starts; } - /** - * Ends with - */ + /** + * Ends with + */ public function getEnds(): ?string { return $this->ends; } } + diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index 71bf9844c..45dae543d 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class Subscription implements Model, JsonSerializable { + public const STATUS_REQUESTED = 'requested'; public const STATUS_PROVISIONING_FAILURE = 'provisioning failure'; public const STATUS_PROVISIONING = 'provisioning'; @@ -25,8 +25,8 @@ final class Subscription implements Model, JsonSerializable public function __construct( private readonly ?string $id = null, private readonly ?string $status = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?string $owner = null, private readonly ?OwnerInfo $ownerInfo = null, private readonly ?string $vendor = null, @@ -50,6 +50,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -90,179 +91,179 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The internal ID of the subscription. - */ + /** + * The internal ID of the subscription. + */ public function getId(): ?string { return $this->id; } - /** - * The status of the subscription. - */ + /** + * The status of the subscription. + */ public function getStatus(): ?string { return $this->status; } - /** - * The date and time when the subscription was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the subscription was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the subscription was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the subscription was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * Project owner information that can be exposed to collaborators. - */ + /** + * Project owner information that can be exposed to collaborators. + */ public function getOwnerInfo(): ?OwnerInfo { return $this->ownerInfo; } - /** - * The machine name of the vendor the subscription belongs to. - */ + /** + * The machine name of the vendor the subscription belongs to. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The plan type of the subscription. - */ + /** + * The plan type of the subscription. + */ public function getPlan(): ?string { return $this->plan; } - /** - * The number of environments which can be provisioned on the project. - */ + /** + * The number of environments which can be provisioned on the project. + */ public function getEnvironments(): ?int { return $this->environments; } - /** - * The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values. - */ + /** + * The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values. + */ public function getStorage(): ?int { return $this->storage; } - /** - * The number of chargeable users who currently have access to the project. Manage this value by adding and removing - * users through the Platform project API. Staff and billing/administrative contacts can be added to a project for - * no charge. Contact support for questions about user licenses. - */ + /** + * The number of chargeable users who currently have access to the project. Manage this value by adding and removing + * users through the Platform project API. Staff and billing/administrative contacts can be added to a project for + * no charge. Contact support for questions about user licenses. + */ public function getUserLicenses(): ?int { return $this->userLicenses; } - /** - * The unique ID string of the project. - */ + /** + * The unique ID string of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The project API endpoint for the project. - */ + /** + * The project API endpoint for the project. + */ public function getProjectEndpoint(): ?string { return $this->projectEndpoint; } - /** - * The name given to the project. Appears as the title in the UI. - */ + /** + * The name given to the project. Appears as the title in the UI. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * The machine name of the region where the project is located. Cannot be changed after project creation. - */ + /** + * The machine name of the region where the project is located. Cannot be changed after project creation. + */ public function getProjectRegion(): ?string { return $this->projectRegion; } - /** - * The human-readable name of the region where the project is located. - */ + /** + * The human-readable name of the region where the project is located. + */ public function getProjectRegionLabel(): ?string { return $this->projectRegionLabel; } - /** - * The URL for the project's user interface. - */ + /** + * The URL for the project's user interface. + */ public function getProjectUi(): ?string { return $this->projectUi; } - /** - * The project options object. - */ + /** + * The project options object. + */ public function getProjectOptions(): ?ProjectOptions { return $this->projectOptions; } - /** - * True if the project is an agency site. - */ + /** + * True if the project is an agency site. + */ public function getAgencySite(): ?bool { return $this->agencySite; } - /** - * Whether the subscription is invoiced. - */ + /** + * Whether the subscription is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } - /** - * Whether the project is marked as HIPAA. - */ + /** + * Whether the project is marked as HIPAA. + */ public function getHipaa(): ?bool { return $this->hipaa; } - /** - * Whether the project is currently on a trial plan. - */ + /** + * Whether the project is currently on a trial plan. + */ public function getIsTrialPlan(): ?bool { return $this->isTrialPlan; @@ -273,12 +274,13 @@ public function getServices(): ?array return $this->services; } - /** - * Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing - * purposes. - */ + /** + * Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing + * purposes. + */ public function getGreen(): ?bool { return $this->green; } } + diff --git a/src/Model/Subscription1.php b/src/Model/Subscription1.php index 070850d29..fcb03fcab 100644 --- a/src/Model/Subscription1.php +++ b/src/Model/Subscription1.php @@ -14,6 +14,7 @@ */ final class Subscription1 implements Model, JsonSerializable { + public const PLAN__2XLARGE = '2xlarge'; public const PLAN__2XLARGE_HIGH_MEMORY = '2xlarge-high-memory'; public const PLAN__4XLARGE = '4xlarge'; @@ -44,6 +45,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -72,57 +74,57 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URI of the subscription - */ + /** + * URI of the subscription + */ public function getLicenseUri(): string { return $this->licenseUri; } - /** - * Size of storage (in MB) - */ + /** + * Size of storage (in MB) + */ public function getStorage(): int { return $this->storage; } - /** - * Number of users - */ + /** + * Number of users + */ public function getIncludedUsers(): int { return $this->includedUsers; } - /** - * URI for managing the subscription - */ + /** + * URI for managing the subscription + */ public function getSubscriptionManagementUri(): string { return $this->subscriptionManagementUri; } - /** - * True if subscription attributes, like number of users, are frozen - */ + /** + * True if subscription attributes, like number of users, are frozen + */ public function getRestricted(): bool { return $this->restricted; } - /** - * Whether or not the subscription is suspended - */ + /** + * Whether or not the subscription is suspended + */ public function getSuspended(): bool { return $this->suspended; } - /** - * Current number of users - */ + /** + * Current number of users + */ public function getUserLicenses(): int { return $this->userLicenses; @@ -133,35 +135,36 @@ public function getPlan(): ?string return $this->plan; } - /** - * Number of environments - */ + /** + * Number of environments + */ public function getEnvironments(): ?int { return $this->environments; } - /** - * Resources limits - */ + /** + * Resources limits + */ public function getResources(): ?ResourcesLimits { return $this->resources; } - /** - * URL for resources validation - */ + /** + * URL for resources validation + */ public function getResourceValidationUrl(): ?string { return $this->resourceValidationUrl; } - /** - * Restricted and denied image types - */ + /** + * Restricted and denied image types + */ public function getImageTypes(): ?ImageTypeRestrictions { return $this->imageTypes; } } + diff --git a/src/Model/SubscriptionAddonsObject.php b/src/Model/SubscriptionAddonsObject.php index 285061ff3..26e65d6a4 100644 --- a/src/Model/SubscriptionAddonsObject.php +++ b/src/Model/SubscriptionAddonsObject.php @@ -14,6 +14,8 @@ */ final class SubscriptionAddonsObject implements Model, JsonSerializable { + + public function __construct( private readonly ?SubscriptionAddonsObjectAvailable $available = null, private readonly ?SubscriptionAddonsObjectCurrent $current = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The list of available addons. - */ + /** + * The list of available addons. + */ public function getAvailable(): ?SubscriptionAddonsObjectAvailable { return $this->available; } - /** - * The list of existing addons and their current values. - */ + /** + * The list of existing addons and their current values. + */ public function getCurrent(): ?SubscriptionAddonsObjectCurrent { return $this->current; } - /** - * The upgrades available for current addons. - */ + /** + * The upgrades available for current addons. + */ public function getUpgradesAvailable(): ?SubscriptionAddonsObjectUpgradesAvailable { return $this->upgradesAvailable; } } + diff --git a/src/Model/SubscriptionAddonsObjectAvailable.php b/src/Model/SubscriptionAddonsObjectAvailable.php index 3a05a1c1e..dad860e5a 100644 --- a/src/Model/SubscriptionAddonsObjectAvailable.php +++ b/src/Model/SubscriptionAddonsObjectAvailable.php @@ -14,12 +14,15 @@ */ final class SubscriptionAddonsObjectAvailable implements Model, JsonSerializable { + + public function __construct( private readonly ?array $continuousProfiling = [], private readonly ?array $projectSupportLevel = [], ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getProjectSupportLevel(): ?array return $this->projectSupportLevel; } } + diff --git a/src/Model/SubscriptionAddonsObjectCurrent.php b/src/Model/SubscriptionAddonsObjectCurrent.php index 5326c00c5..926b81861 100644 --- a/src/Model/SubscriptionAddonsObjectCurrent.php +++ b/src/Model/SubscriptionAddonsObjectCurrent.php @@ -14,12 +14,15 @@ */ final class SubscriptionAddonsObjectCurrent implements Model, JsonSerializable { + + public function __construct( private readonly ?array $continuousProfiling = [], private readonly ?array $projectSupportLevel = [], ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getProjectSupportLevel(): ?array return $this->projectSupportLevel; } } + diff --git a/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php b/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php index 88bc24281..d5a8e6e68 100644 --- a/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php +++ b/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php @@ -14,12 +14,15 @@ */ final class SubscriptionAddonsObjectUpgradesAvailable implements Model, JsonSerializable { + + public function __construct( private readonly ?array $continuousProfiling = [], private readonly ?array $projectSupportLevel = [], ) { } + public function getModelName(): string { return self::class; @@ -48,3 +51,4 @@ public function getProjectSupportLevel(): ?array return $this->projectSupportLevel; } } + diff --git a/src/Model/SubscriptionCurrentUsageObject.php b/src/Model/SubscriptionCurrentUsageObject.php index 4c486f33b..3bcdef6c0 100644 --- a/src/Model/SubscriptionCurrentUsageObject.php +++ b/src/Model/SubscriptionCurrentUsageObject.php @@ -14,6 +14,8 @@ */ final class SubscriptionCurrentUsageObject implements Model, JsonSerializable { + + public function __construct( private readonly ?UsageGroupCurrentUsageProperties $cpuApp = null, private readonly ?UsageGroupCurrentUsageProperties $storageAppServices = null, @@ -31,6 +33,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -60,107 +63,108 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getCpuApp(): ?UsageGroupCurrentUsageProperties { return $this->cpuApp; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getStorageAppServices(): ?UsageGroupCurrentUsageProperties { return $this->storageAppServices; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getMemoryApp(): ?UsageGroupCurrentUsageProperties { return $this->memoryApp; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getCpuServices(): ?UsageGroupCurrentUsageProperties { return $this->cpuServices; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getMemoryServices(): ?UsageGroupCurrentUsageProperties { return $this->memoryServices; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getBackupStorage(): ?UsageGroupCurrentUsageProperties { return $this->backupStorage; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getBuildCpu(): ?UsageGroupCurrentUsageProperties { return $this->buildCpu; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getBuildMemory(): ?UsageGroupCurrentUsageProperties { return $this->buildMemory; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getEgressBandwidth(): ?UsageGroupCurrentUsageProperties { return $this->egressBandwidth; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getIngressRequests(): ?UsageGroupCurrentUsageProperties { return $this->ingressRequests; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getLogsFwdContentSize(): ?UsageGroupCurrentUsageProperties { return $this->logsFwdContentSize; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getFastlyBandwidth(): ?UsageGroupCurrentUsageProperties { return $this->fastlyBandwidth; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getFastlyRequests(): ?UsageGroupCurrentUsageProperties { return $this->fastlyRequests; } } + diff --git a/src/Model/SubscriptionInformation.php b/src/Model/SubscriptionInformation.php index df1188f87..c97bce696 100644 --- a/src/Model/SubscriptionInformation.php +++ b/src/Model/SubscriptionInformation.php @@ -14,6 +14,7 @@ */ final class SubscriptionInformation implements Model, JsonSerializable { + public const PLAN__2XLARGE = '2xlarge'; public const PLAN__2XLARGE_HIGH_MEMORY = '2xlarge-high-memory'; public const PLAN__4XLARGE = '4xlarge'; @@ -44,6 +45,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -72,57 +74,57 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URI of the subscription - */ + /** + * URI of the subscription + */ public function getLicenseUri(): string { return $this->licenseUri; } - /** - * Size of storage (in MB) - */ + /** + * Size of storage (in MB) + */ public function getStorage(): int { return $this->storage; } - /** - * Number of users - */ + /** + * Number of users + */ public function getIncludedUsers(): int { return $this->includedUsers; } - /** - * URI for managing the subscription - */ + /** + * URI for managing the subscription + */ public function getSubscriptionManagementUri(): string { return $this->subscriptionManagementUri; } - /** - * True if subscription attributes, like number of users, are frozen - */ + /** + * True if subscription attributes, like number of users, are frozen + */ public function getRestricted(): bool { return $this->restricted; } - /** - * Whether or not the subscription is suspended - */ + /** + * Whether or not the subscription is suspended + */ public function getSuspended(): bool { return $this->suspended; } - /** - * Current number of users - */ + /** + * Current number of users + */ public function getUserLicenses(): int { return $this->userLicenses; @@ -133,35 +135,36 @@ public function getPlan(): ?string return $this->plan; } - /** - * Number of environments - */ + /** + * Number of environments + */ public function getEnvironments(): ?int { return $this->environments; } - /** - * Resources limits - */ + /** + * Resources limits + */ public function getResources(): ?ResourcesLimits { return $this->resources; } - /** - * URL for resources validation - */ + /** + * URL for resources validation + */ public function getResourceValidationUrl(): ?string { return $this->resourceValidationUrl; } - /** - * Restricted and denied image types - */ + /** + * Restricted and denied image types + */ public function getImageTypes(): ?ImageTypeRestrictions { return $this->imageTypes; } } + diff --git a/src/Model/SumoLogic.php b/src/Model/SumoLogic.php index ae9ccadb7..af17b3d0d 100644 --- a/src/Model/SumoLogic.php +++ b/src/Model/SumoLogic.php @@ -14,12 +14,15 @@ */ final class SumoLogic implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/SumologicIntegration.php b/src/Model/SumologicIntegration.php index 5fda2ee19..458095363 100644 --- a/src/Model/SumologicIntegration.php +++ b/src/Model/SumologicIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level SumologicIntegration (auto-generated) @@ -14,6 +14,8 @@ */ final class SumologicIntegration implements Model, JsonSerializable, Integration { + + public function __construct( private readonly string $type, private readonly string $role, @@ -22,12 +24,13 @@ public function __construct( private readonly string $category, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -54,33 +57,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -91,25 +94,25 @@ public function getExtra(): array return $this->extra; } - /** - * The Sumologic HTTPS endpoint - */ + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Category used to easy filtering (sent as X-Sumo-Category header) - */ + /** + * The Category used to easy filtering (sent as X-Sumo-Category header) + */ public function getCategory(): string { return $this->category; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -120,11 +123,12 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of SumologicIntegration - */ + /** + * The identifier of SumologicIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/SumologicIntegrationCreateInput.php b/src/Model/SumologicIntegrationCreateInput.php index 6e122a9db..daeae78c2 100644 --- a/src/Model/SumologicIntegrationCreateInput.php +++ b/src/Model/SumologicIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SumologicIntegrationCreateInput (auto-generated) @@ -13,6 +14,8 @@ */ final class SumologicIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,17 +49,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Sumologic HTTPS endpoint - */ + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; @@ -66,17 +70,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The Category used to easy filtering (sent as X-Sumo-Category header) - */ + /** + * The Category used to easy filtering (sent as X-Sumo-Category header) + */ public function getCategory(): ?string { return $this->category; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -87,3 +91,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/SumologicIntegrationPatch.php b/src/Model/SumologicIntegrationPatch.php index 2fca2383c..c3704327a 100644 --- a/src/Model/SumologicIntegrationPatch.php +++ b/src/Model/SumologicIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level SumologicIntegrationPatch (auto-generated) @@ -13,6 +14,8 @@ */ final class SumologicIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + + public function __construct( private readonly string $type, private readonly string $url, @@ -23,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -45,17 +49,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Sumologic HTTPS endpoint - */ + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; @@ -66,17 +70,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The Category used to easy filtering (sent as X-Sumo-Category header) - */ + /** + * The Category used to easy filtering (sent as X-Sumo-Category header) + */ public function getCategory(): ?string { return $this->category; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -87,3 +91,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/Syslog.php b/src/Model/Syslog.php index 9e8611a8f..ae0705a5d 100644 --- a/src/Model/Syslog.php +++ b/src/Model/Syslog.php @@ -14,12 +14,15 @@ */ final class Syslog implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/SyslogIntegration.php b/src/Model/SyslogIntegration.php index 2784ac8a0..87ca66471 100644 --- a/src/Model/SyslogIntegration.php +++ b/src/Model/SyslogIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level SyslogIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class SyslogIntegration implements Model, JsonSerializable, Integration { + public const PROTOCOL_TCP = 'tcp'; public const PROTOCOL_TLS = 'tls'; public const PROTOCOL_UDP = 'udp'; @@ -31,12 +32,13 @@ public function __construct( private readonly string $messageFormat, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -66,33 +68,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -103,49 +105,49 @@ public function getExtra(): array return $this->extra; } - /** - * Syslog relay/collector host - */ + /** + * Syslog relay/collector host + */ public function getHost(): string { return $this->host; } - /** - * Syslog relay/collector port - */ + /** + * Syslog relay/collector port + */ public function getPort(): int { return $this->port; } - /** - * Transport protocol - */ + /** + * Transport protocol + */ public function getProtocol(): string { return $this->protocol; } - /** - * Syslog facility - */ + /** + * Syslog facility + */ public function getFacility(): int { return $this->facility; } - /** - * Syslog message format - */ + /** + * Syslog message format + */ public function getMessageFormat(): string { return $this->messageFormat; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -156,11 +158,12 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of SyslogIntegration - */ + /** + * The identifier of SyslogIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/SyslogIntegrationCreateInput.php b/src/Model/SyslogIntegrationCreateInput.php index c74d8a3ef..17ae1e6d6 100644 --- a/src/Model/SyslogIntegrationCreateInput.php +++ b/src/Model/SyslogIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SyslogIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class SyslogIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const PROTOCOL_TCP = 'tcp'; public const PROTOCOL_TLS = 'tls'; public const PROTOCOL_UDP = 'udp'; @@ -36,6 +38,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -63,9 +66,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -76,41 +79,41 @@ public function getExtra(): ?array return $this->extra; } - /** - * Syslog relay/collector host - */ + /** + * Syslog relay/collector host + */ public function getHost(): ?string { return $this->host; } - /** - * Syslog relay/collector port - */ + /** + * Syslog relay/collector port + */ public function getPort(): ?int { return $this->port; } - /** - * Transport protocol - */ + /** + * Transport protocol + */ public function getProtocol(): ?string { return $this->protocol; } - /** - * Syslog facility - */ + /** + * Syslog facility + */ public function getFacility(): ?int { return $this->facility; } - /** - * Syslog message format - */ + /** + * Syslog message format + */ public function getMessageFormat(): ?string { return $this->messageFormat; @@ -126,9 +129,9 @@ public function getAuthMode(): ?string return $this->authMode; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -139,3 +142,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/SyslogIntegrationPatch.php b/src/Model/SyslogIntegrationPatch.php index e635d7dd6..92fe55561 100644 --- a/src/Model/SyslogIntegrationPatch.php +++ b/src/Model/SyslogIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level SyslogIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class SyslogIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const PROTOCOL_TCP = 'tcp'; public const PROTOCOL_TLS = 'tls'; public const PROTOCOL_UDP = 'udp'; @@ -36,6 +38,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -63,9 +66,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -76,41 +79,41 @@ public function getExtra(): ?array return $this->extra; } - /** - * Syslog relay/collector host - */ + /** + * Syslog relay/collector host + */ public function getHost(): ?string { return $this->host; } - /** - * Syslog relay/collector port - */ + /** + * Syslog relay/collector port + */ public function getPort(): ?int { return $this->port; } - /** - * Transport protocol - */ + /** + * Transport protocol + */ public function getProtocol(): ?string { return $this->protocol; } - /** - * Syslog facility - */ + /** + * Syslog facility + */ public function getFacility(): ?int { return $this->facility; } - /** - * Syslog message format - */ + /** + * Syslog message format + */ public function getMessageFormat(): ?string { return $this->messageFormat; @@ -126,9 +129,9 @@ public function getAuthMode(): ?string return $this->authMode; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -139,3 +142,4 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } + diff --git a/src/Model/SystemInformation.php b/src/Model/SystemInformation.php index 5beb57b5a..e622ccd98 100644 --- a/src/Model/SystemInformation.php +++ b/src/Model/SystemInformation.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,13 +13,16 @@ */ final class SystemInformation implements Model, JsonSerializable { + + public function __construct( private readonly string $version, private readonly string $image, - private readonly DateTime $startedAt, + private readonly \DateTime $startedAt, ) { } + public function getModelName(): string { return self::class; @@ -40,24 +42,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The version of this project server - */ + /** + * The version of this project server + */ public function getVersion(): string { return $this->version; } - /** - * The image version of the project server - */ + /** + * The image version of the project server + */ public function getImage(): string { return $this->image; } - public function getStartedAt(): DateTime + public function getStartedAt(): \DateTime { return $this->startedAt; } } + diff --git a/src/Model/TLSSettings.php b/src/Model/TLSSettings.php index ba4a9929b..a28efca3f 100644 --- a/src/Model/TLSSettings.php +++ b/src/Model/TLSSettings.php @@ -14,6 +14,7 @@ */ final class TLSSettings implements Model, JsonSerializable { + public const MIN_VERSION_TLSV1_0 = 'TLSv1.0'; public const MIN_VERSION_TLSV1_1 = 'TLSv1.1'; public const MIN_VERSION_TLSV1_2 = 'TLSv1.2'; @@ -29,6 +30,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,17 +56,17 @@ public function getStrictTransportSecurity(): StrictTransportSecurityOptions return $this->strictTransportSecurity; } - /** - * The minimum TLS version to support. - */ + /** + * The minimum TLS version to support. + */ public function getMinVersion(): ?string { return $this->minVersion; } - /** - * The type of client authentication to request. - */ + /** + * The type of client authentication to request. + */ public function getClientAuthentication(): ?string { return $this->clientAuthentication; @@ -75,3 +77,4 @@ public function getClientCertificateAuthorities(): array return $this->clientCertificateAuthorities; } } + diff --git a/src/Model/Task.php b/src/Model/Task.php index d985b3e1b..54ada3450 100644 --- a/src/Model/Task.php +++ b/src/Model/Task.php @@ -13,6 +13,8 @@ */ final class Task implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $type, @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -65,42 +68,42 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Task - */ + /** + * The identifier of Task + */ public function getId(): string { return $this->id; } - /** - * The runtime type and version for the task (e.g., python:3.8) - */ + /** + * The runtime type and version for the task (e.g., python:3.8) + */ public function getType(): string { return $this->type; } - /** - * Configuration related to the source code of the task - */ + /** + * Configuration related to the source code of the task + */ public function getSource(): SourceCodeConfiguration1 { return $this->source; } - /** - * Scripts executed at various points in the lifecycle of the task - */ + /** + * Scripts executed at various points in the lifecycle of the task + */ public function getHooks(): Hooks1 { return $this->hooks; } - /** - * The relationships of the task to defined services and applications - * @return ServiceRelationshipsValue[] - */ + /** + * The relationships of the task to defined services and applications + * @return ServiceRelationshipsValue[] + */ public function getRelationships(): array { return $this->relationships; @@ -111,18 +114,18 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * Filesystem mounts of this task - * @return MountsValue[] - */ + /** + * Filesystem mounts of this task + * @return MountsValue[] + */ public function getMounts(): array { return $this->mounts; } - /** - * The timezone of the task. Defaults to the project's timezone if not specified - */ + /** + * The timezone of the task. Defaults to the project's timezone if not specified + */ public function getTimezone(): ?string { return $this->timezone; @@ -138,52 +141,53 @@ public function getDependencies(): array return $this->dependencies; } - /** - * Runtime-specific configuration - */ + /** + * Runtime-specific configuration + */ public function getRuntime(): object { return $this->runtime; } - /** - * Authorizations available to this task - * @return AuthorizationsInner[] - */ + /** + * Authorizations available to this task + * @return AuthorizationsInner[] + */ public function getAuthorizations(): array { return $this->authorizations; } - /** - * Configuration for task execution - */ + /** + * Configuration for task execution + */ public function getRun(): RunConfiguration { return $this->run; } - /** - * Resources configuration (base memory and memory ratio) - */ + /** + * Resources configuration (base memory and memory ratio) + */ public function getResources(): ?Resources9 { return $this->resources; } - /** - * Selected container profile for the task - */ + /** + * Selected container profile for the task + */ public function getContainerProfile(): ?string { return $this->containerProfile; } - /** - * The unique name of the task - */ + /** + * The unique name of the task + */ public function getName(): string { return $this->name; } } + diff --git a/src/Model/TaskTriggerInput.php b/src/Model/TaskTriggerInput.php index cb1895c1b..15ba826d5 100644 --- a/src/Model/TaskTriggerInput.php +++ b/src/Model/TaskTriggerInput.php @@ -13,11 +13,14 @@ */ final class TaskTriggerInput implements Model, JsonSerializable { + + public function __construct( private readonly ?array $variables = [], ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getVariables(): ?array return $this->variables; } } + diff --git a/src/Model/Tasks.php b/src/Model/Tasks.php index bd768ee2c..b6ecf7d82 100644 --- a/src/Model/Tasks.php +++ b/src/Model/Tasks.php @@ -13,11 +13,14 @@ */ final class Tasks implements Model, JsonSerializable { + + public function __construct( private readonly bool $enabled, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, background tasks can be triggered. - */ + /** + * If true, background tasks can be triggered. + */ public function getEnabled(): bool { return $this->enabled; } } + diff --git a/src/Model/TasksValue.php b/src/Model/TasksValue.php index 328462015..77fe30715 100644 --- a/src/Model/TasksValue.php +++ b/src/Model/TasksValue.php @@ -13,11 +13,14 @@ */ final class TasksValue implements Model, JsonSerializable { + + public function __construct( private readonly ?Resources2 $resources, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getResources(): ?Resources2 return $this->resources; } } + diff --git a/src/Model/Team.php b/src/Model/Team.php index 84f87839f..898768c44 100644 --- a/src/Model/Team.php +++ b/src/Model/Team.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class Team implements Model, JsonSerializable { + public const PROJECT_PERMISSIONS_ADMIN = 'admin'; public const PROJECT_PERMISSIONS_VIEWER = 'viewer'; public const PROJECT_PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -32,11 +32,12 @@ public function __construct( private readonly ?string $label = null, private readonly ?array $projectPermissions = [], private readonly ?TeamCounts $counts = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, ) { } + public function getModelName(): string { return self::class; @@ -60,25 +61,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the parent organization. - */ + /** + * The ID of the parent organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The human-readable label of the team. - */ + /** + * The human-readable label of the team. + */ public function getLabel(): ?string { return $this->label; @@ -94,19 +95,20 @@ public function getCounts(): ?TeamCounts return $this->counts; } - /** - * The date and time when the team was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the team was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the team was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the team was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } } + diff --git a/src/Model/TeamCounts.php b/src/Model/TeamCounts.php index 5be7e60a9..5045489d9 100644 --- a/src/Model/TeamCounts.php +++ b/src/Model/TeamCounts.php @@ -13,12 +13,15 @@ */ final class TeamCounts implements Model, JsonSerializable { + + public function __construct( private readonly ?int $memberCount = null, private readonly ?int $projectCount = null, ) { } + public function getModelName(): string { return self::class; @@ -37,19 +40,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Total count of members of the team. - */ + /** + * Total count of members of the team. + */ public function getMemberCount(): ?int { return $this->memberCount; } - /** - * Total count of projects that the team has access to. - */ + /** + * Total count of projects that the team has access to. + */ public function getProjectCount(): ?int { return $this->projectCount; } } + diff --git a/src/Model/TeamMember.php b/src/Model/TeamMember.php index 680532559..d10ea4f59 100644 --- a/src/Model/TeamMember.php +++ b/src/Model/TeamMember.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,14 +13,17 @@ */ final class TeamMember implements Model, JsonSerializable { + + public function __construct( private readonly ?string $teamId = null, private readonly ?string $userId = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, ) { } + public function getModelName(): string { return self::class; @@ -42,35 +44,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getTeamId(): ?string { return $this->teamId; } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getUserId(): ?string { return $this->userId; } - /** - * The date and time when the team member was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the team member was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the team member was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the team member was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } } + diff --git a/src/Model/TeamProjectAccess.php b/src/Model/TeamProjectAccess.php index f283ba51a..d416b1a26 100644 --- a/src/Model/TeamProjectAccess.php +++ b/src/Model/TeamProjectAccess.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,17 +13,20 @@ */ final class TeamProjectAccess implements Model, JsonSerializable { + + public function __construct( private readonly ?string $teamId = null, private readonly ?string $organizationId = null, private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, - private readonly ?DateTime $grantedAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $grantedAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?TeamProjectAccessLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -48,50 +50,50 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getTeamId(): ?string { return $this->teamId; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * The date and time when the access was granted. - */ - public function getGrantedAt(): ?DateTime + /** + * The date and time when the access was granted. + */ + public function getGrantedAt(): ?\DateTime { return $this->grantedAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } @@ -101,3 +103,4 @@ public function getLinks(): ?TeamProjectAccessLinks return $this->links; } } + diff --git a/src/Model/TeamProjectAccessLinks.php b/src/Model/TeamProjectAccessLinks.php index c00b34a31..2366a3f0c 100644 --- a/src/Model/TeamProjectAccessLinks.php +++ b/src/Model/TeamProjectAccessLinks.php @@ -13,6 +13,8 @@ */ final class TeamProjectAccessLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?TeamProjectAccessLinksUpdate $update = null, private readonly ?TeamProjectAccessLinksDelete $delete = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +42,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current access item. - */ + /** + * Link to the current access item. + */ public function getSelf(): ?TeamProjectAccessLinksSelf { return $this->self; } - /** - * Link for updating the current access item. Only present if user has update permission. - */ + /** + * Link for updating the current access item. Only present if user has update permission. + */ public function getUpdate(): ?TeamProjectAccessLinksUpdate { return $this->update; } - /** - * Link for deleting the current access item. Only present if user has delete permission. - */ + /** + * Link for deleting the current access item. Only present if user has delete permission. + */ public function getDelete(): ?TeamProjectAccessLinksDelete { return $this->delete; } } + diff --git a/src/Model/TeamProjectAccessLinksDelete.php b/src/Model/TeamProjectAccessLinksDelete.php index 162675fee..3a73637af 100644 --- a/src/Model/TeamProjectAccessLinksDelete.php +++ b/src/Model/TeamProjectAccessLinksDelete.php @@ -14,12 +14,15 @@ */ final class TeamProjectAccessLinksDelete implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/TeamProjectAccessLinksSelf.php b/src/Model/TeamProjectAccessLinksSelf.php index 2d0915a7f..bb798ffb4 100644 --- a/src/Model/TeamProjectAccessLinksSelf.php +++ b/src/Model/TeamProjectAccessLinksSelf.php @@ -14,11 +14,14 @@ */ final class TeamProjectAccessLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/TeamProjectAccessLinksUpdate.php b/src/Model/TeamProjectAccessLinksUpdate.php index ea79031b8..92764f6c9 100644 --- a/src/Model/TeamProjectAccessLinksUpdate.php +++ b/src/Model/TeamProjectAccessLinksUpdate.php @@ -14,12 +14,15 @@ */ final class TeamProjectAccessLinksUpdate implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } + diff --git a/src/Model/TeamReference.php b/src/Model/TeamReference.php index 25bbe8eb5..f4195435d 100644 --- a/src/Model/TeamReference.php +++ b/src/Model/TeamReference.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class TeamReference implements Model, JsonSerializable { + public const PROJECT_PERMISSIONS_ADMIN = 'admin'; public const PROJECT_PERMISSIONS_VIEWER = 'viewer'; public const PROJECT_PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -33,11 +33,12 @@ public function __construct( private readonly ?string $label = null, private readonly ?array $projectPermissions = [], private readonly ?TeamCounts $counts = null, - private readonly ?DateTime $createdAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $createdAt = null, + private readonly ?\DateTime $updatedAt = null, ) { } + public function getModelName(): string { return self::class; @@ -61,25 +62,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the parent organization. - */ + /** + * The ID of the parent organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The human-readable label of the team. - */ + /** + * The human-readable label of the team. + */ public function getLabel(): ?string { return $this->label; @@ -95,19 +96,20 @@ public function getCounts(): ?TeamCounts return $this->counts; } - /** - * The date and time when the team was created. - */ - public function getCreatedAt(): ?DateTime + /** + * The date and time when the team was created. + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The date and time when the team was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the team was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } } + diff --git a/src/Model/Ticket.php b/src/Model/Ticket.php index 2ec41705f..430b8a5ef 100644 --- a/src/Model/Ticket.php +++ b/src/Model/Ticket.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,6 +14,7 @@ */ final class Ticket implements Model, JsonSerializable { + public const TYPE_PROBLEM = 'problem'; public const TYPE_TASK = 'task'; public const TYPE_INCIDENT = 'incident'; @@ -52,8 +52,8 @@ final class Ticket implements Model, JsonSerializable public function __construct( private readonly ?int $ticketId = null, - private readonly ?DateTime $created = null, - private readonly ?DateTime $updated = null, + private readonly ?\DateTime $created = null, + private readonly ?\DateTime $updated = null, private readonly ?string $type = null, private readonly ?string $subject = null, private readonly ?string $description = null, @@ -67,7 +67,7 @@ public function __construct( private readonly ?string $organizationId = null, private readonly ?array $collaboratorIds = [], private readonly ?bool $hasIncidents = null, - private readonly ?DateTime $due = null, + private readonly ?\DateTime $due = null, private readonly ?array $tags = [], private readonly ?string $subscriptionId = null, private readonly ?string $ticketGroup = null, @@ -75,8 +75,8 @@ public function __construct( private readonly ?string $affectedUrl = null, private readonly ?string $queue = null, private readonly ?string $issueType = null, - private readonly ?DateTime $resolutionTime = null, - private readonly ?DateTime $responseTime = null, + private readonly ?\DateTime $resolutionTime = null, + private readonly ?\DateTime $responseTime = null, private readonly ?string $projectUrl = null, private readonly ?string $region = null, private readonly ?string $category = null, @@ -89,6 +89,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -140,113 +141,113 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the ticket. - */ + /** + * The ID of the ticket. + */ public function getTicketId(): ?int { return $this->ticketId; } - /** - * The time when the support ticket was created. - */ - public function getCreated(): ?DateTime + /** + * The time when the support ticket was created. + */ + public function getCreated(): ?\DateTime { return $this->created; } - /** - * The time when the support ticket was updated. - */ - public function getUpdated(): ?DateTime + /** + * The time when the support ticket was updated. + */ + public function getUpdated(): ?\DateTime { return $this->updated; } - /** - * A type of the ticket. - */ + /** + * A type of the ticket. + */ public function getType(): ?string { return $this->type; } - /** - * A title of the ticket. - */ + /** + * A title of the ticket. + */ public function getSubject(): ?string { return $this->subject; } - /** - * The description body of the support ticket. - */ + /** + * The description body of the support ticket. + */ public function getDescription(): ?string { return $this->description; } - /** - * A priority of the ticket. - */ + /** + * A priority of the ticket. + */ public function getPriority(): ?string { return $this->priority; } - /** - * Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to. - */ + /** + * Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to. + */ public function getFollowupTid(): ?string { return $this->followupTid; } - /** - * The status of the support ticket. - */ + /** + * The status of the support ticket. + */ public function getStatus(): ?string { return $this->status; } - /** - * Email address of the ticket recipient, defaults to support@upsun.com. - */ + /** + * Email address of the ticket recipient, defaults to support@upsun.com. + */ public function getRecipient(): ?string { return $this->recipient; } - /** - * UUID of the ticket requester. - */ + /** + * UUID of the ticket requester. + */ public function getRequesterId(): ?string { return $this->requesterId; } - /** - * UUID of the ticket submitter. - */ + /** + * UUID of the ticket submitter. + */ public function getSubmitterId(): ?string { return $this->submitterId; } - /** - * UUID of the ticket assignee. - */ + /** + * UUID of the ticket assignee. + */ public function getAssigneeId(): ?string { return $this->assigneeId; } - /** - * A reference id that is usable to find the commerce license. - */ + /** + * A reference id that is usable to find the commerce license. + */ public function getOrganizationId(): ?string { return $this->organizationId; @@ -257,18 +258,18 @@ public function getCollaboratorIds(): ?array return $this->collaboratorIds; } - /** - * Whether or not this ticket has incidents. - */ + /** + * Whether or not this ticket has incidents. + */ public function getHasIncidents(): ?bool { return $this->hasIncidents; } - /** - * A time that the ticket is due at. - */ - public function getDue(): ?DateTime + /** + * A time that the ticket is due at. + */ + public function getDue(): ?\DateTime { return $this->due; } @@ -278,140 +279,141 @@ public function getTags(): ?array return $this->tags; } - /** - * The internal ID of the subscription. - */ + /** + * The internal ID of the subscription. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * Maps to zendesk field 'Request group'. - */ + /** + * Maps to zendesk field 'Request group'. + */ public function getTicketGroup(): ?string { return $this->ticketGroup; } - /** - * Maps to zendesk field 'The support plan associated with this ticket. - */ + /** + * Maps to zendesk field 'The support plan associated with this ticket. + */ public function getSupportPlan(): ?string { return $this->supportPlan; } - /** - * The affected URL associated with the support ticket. - */ + /** + * The affected URL associated with the support ticket. + */ public function getAffectedUrl(): ?string { return $this->affectedUrl; } - /** - * The queue the support ticket is in. - */ + /** + * The queue the support ticket is in. + */ public function getQueue(): ?string { return $this->queue; } - /** - * The issue type of the support ticket. - */ + /** + * The issue type of the support ticket. + */ public function getIssueType(): ?string { return $this->issueType; } - /** - * Maps to zendesk field 'Resolution Time'. - */ - public function getResolutionTime(): ?DateTime + /** + * Maps to zendesk field 'Resolution Time'. + */ + public function getResolutionTime(): ?\DateTime { return $this->resolutionTime; } - /** - * Maps to zendesk field 'Response Time (time from request to reply). - */ - public function getResponseTime(): ?DateTime + /** + * Maps to zendesk field 'Response Time (time from request to reply). + */ + public function getResponseTime(): ?\DateTime { return $this->responseTime; } - /** - * Maps to zendesk field 'Project URL'. - */ + /** + * Maps to zendesk field 'Project URL'. + */ public function getProjectUrl(): ?string { return $this->projectUrl; } - /** - * Maps to zendesk field 'Region'. - */ + /** + * Maps to zendesk field 'Region'. + */ public function getRegion(): ?string { return $this->region; } - /** - * Maps to zendesk field 'Category'. - */ + /** + * Maps to zendesk field 'Category'. + */ public function getCategory(): ?string { return $this->category; } - /** - * Maps to zendesk field 'Environment'. - */ + /** + * Maps to zendesk field 'Environment'. + */ public function getEnvironment(): ?string { return $this->environment; } - /** - * Maps to zendesk field 'Ticket Sharing Status'. - */ + /** + * Maps to zendesk field 'Ticket Sharing Status'. + */ public function getTicketSharingStatus(): ?string { return $this->ticketSharingStatus; } - /** - * Maps to zendesk field 'Application Ticket URL'. - */ + /** + * Maps to zendesk field 'Application Ticket URL'. + */ public function getApplicationTicketUrl(): ?string { return $this->applicationTicketUrl; } - /** - * Maps to zendesk field 'Infrastructure Ticket URL'. - */ + /** + * Maps to zendesk field 'Infrastructure Ticket URL'. + */ public function getInfrastructureTicketUrl(): ?string { return $this->infrastructureTicketUrl; } - /** - * A list of JIRA issues related to the support ticket. - * @return TicketJiraInner[]|null - */ + /** + * A list of JIRA issues related to the support ticket. + * @return TicketJiraInner[]|null + */ public function getJira(): ?array { return $this->jira; } - /** - * URL to the customer-facing ticket in Zendesk. - */ + /** + * URL to the customer-facing ticket in Zendesk. + */ public function getZdTicketUrl(): ?string { return $this->zdTicketUrl; } } + diff --git a/src/Model/TicketJiraInner.php b/src/Model/TicketJiraInner.php index fe6186957..7f1c47f17 100644 --- a/src/Model/TicketJiraInner.php +++ b/src/Model/TicketJiraInner.php @@ -13,6 +13,8 @@ */ final class TicketJiraInner implements Model, JsonSerializable { + + public function __construct( private readonly ?int $id = null, private readonly ?int $ticketId = null, @@ -23,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -75,3 +78,4 @@ public function getUpdatedAt(): ?float return $this->updatedAt; } } + diff --git a/src/Model/Tree.php b/src/Model/Tree.php index 87b67a95d..be940d99d 100644 --- a/src/Model/Tree.php +++ b/src/Model/Tree.php @@ -13,6 +13,8 @@ */ final class Tree implements Model, JsonSerializable { + + public function __construct( private readonly string $id, private readonly string $sha, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,28 +42,29 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Tree - */ + /** + * The identifier of Tree + */ public function getId(): string { return $this->id; } - /** - * The identifier of the tree - */ + /** + * The identifier of the tree + */ public function getSha(): string { return $this->sha; } - /** - * The tree items - * @return TreeItemsInner[] - */ + /** + * The tree items + * @return TreeItemsInner[] + */ public function getTree(): array { return $this->tree; } } + diff --git a/src/Model/TreeItemsInner.php b/src/Model/TreeItemsInner.php index a3875445d..015afa398 100644 --- a/src/Model/TreeItemsInner.php +++ b/src/Model/TreeItemsInner.php @@ -13,6 +13,7 @@ */ final class TreeItemsInner implements Model, JsonSerializable { + public const MODE__040000 = '040000'; public const MODE__100644 = '100644'; public const MODE__100755 = '100755'; @@ -27,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -67,3 +69,4 @@ public function getSha(): ?string return $this->sha; } } + diff --git a/src/Model/UpdateOrgAddonsRequest.php b/src/Model/UpdateOrgAddonsRequest.php index 91a1d87f0..ac82252ff 100644 --- a/src/Model/UpdateOrgAddonsRequest.php +++ b/src/Model/UpdateOrgAddonsRequest.php @@ -13,6 +13,7 @@ */ final class UpdateOrgAddonsRequest implements Model, JsonSerializable { + public const USER_MANAGEMENT_STANDARD = 'standard'; public const USER_MANAGEMENT_ENHANCED = 'enhanced'; public const SUPPORT_LEVEL_BASIC = 'basic'; @@ -24,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,3 +54,4 @@ public function getSupportLevel(): ?string return $this->supportLevel; } } + diff --git a/src/Model/UpdateOrgBillingAlertConfigRequest.php b/src/Model/UpdateOrgBillingAlertConfigRequest.php index 007c20cac..84b6df023 100644 --- a/src/Model/UpdateOrgBillingAlertConfigRequest.php +++ b/src/Model/UpdateOrgBillingAlertConfigRequest.php @@ -13,12 +13,15 @@ */ final class UpdateOrgBillingAlertConfigRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $active = null, private readonly ?UpdateOrgBillingAlertConfigRequestConfig $config = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getConfig(): ?UpdateOrgBillingAlertConfigRequestConfig return $this->config; } } + diff --git a/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php b/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php index 56f7d27bd..219c9f3e5 100644 --- a/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php +++ b/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php @@ -13,12 +13,15 @@ */ final class UpdateOrgBillingAlertConfigRequestConfig implements Model, JsonSerializable { + + public function __construct( private readonly ?int $threshold = null, private readonly ?string $mode = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getMode(): ?string return $this->mode; } } + diff --git a/src/Model/UpdateOrgMemberRequest.php b/src/Model/UpdateOrgMemberRequest.php index d4e8351ac..955cccb19 100644 --- a/src/Model/UpdateOrgMemberRequest.php +++ b/src/Model/UpdateOrgMemberRequest.php @@ -13,6 +13,7 @@ */ final class UpdateOrgMemberRequest implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_MEMBERS = 'members'; @@ -25,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -47,3 +49,4 @@ public function getPermissions(): ?array return $this->permissions; } } + diff --git a/src/Model/UpdateOrgProfileRequest.php b/src/Model/UpdateOrgProfileRequest.php index 4970142b3..59f0dd74b 100644 --- a/src/Model/UpdateOrgProfileRequest.php +++ b/src/Model/UpdateOrgProfileRequest.php @@ -13,6 +13,7 @@ */ final class UpdateOrgProfileRequest implements Model, JsonSerializable { + public const CUSTOMER_TYPE_INDVIDUAL = 'indvidual'; public const CUSTOMER_TYPE_COMPANY = 'company'; public const CUSTOMER_TYPE_GOVERNMENT = 'government'; @@ -28,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -86,3 +88,4 @@ public function getBillingContact(): ?string return $this->billingContact; } } + diff --git a/src/Model/UpdateOrgProjectRequest.php b/src/Model/UpdateOrgProjectRequest.php index efcd8f1a7..2c52b7457 100644 --- a/src/Model/UpdateOrgProjectRequest.php +++ b/src/Model/UpdateOrgProjectRequest.php @@ -13,6 +13,8 @@ */ final class UpdateOrgProjectRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?string $title = null, private readonly ?string $plan = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -39,27 +42,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): ?string { return $this->title; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Timezone of the project. - */ + /** + * Timezone of the project. + */ public function getTimezone(): ?string { return $this->timezone; } } + diff --git a/src/Model/UpdateOrgRequest.php b/src/Model/UpdateOrgRequest.php index 27a6d6e12..59602621f 100644 --- a/src/Model/UpdateOrgRequest.php +++ b/src/Model/UpdateOrgRequest.php @@ -13,6 +13,8 @@ */ final class UpdateOrgRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?string $name = null, private readonly ?string $label = null, @@ -22,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -68,3 +71,4 @@ public function getSecurityContact(): ?string return $this->securityContact; } } + diff --git a/src/Model/UpdateOrgSubscriptionRequest.php b/src/Model/UpdateOrgSubscriptionRequest.php index 4142c6537..ebd5dbaef 100644 --- a/src/Model/UpdateOrgSubscriptionRequest.php +++ b/src/Model/UpdateOrgSubscriptionRequest.php @@ -13,6 +13,8 @@ */ final class UpdateOrgSubscriptionRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?string $projectTitle = null, private readonly ?string $plan = null, @@ -29,6 +31,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -57,25 +60,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Timezone of the project. - */ + /** + * Timezone of the project. + */ public function getTimezone(): ?string { return $this->timezone; @@ -126,3 +129,4 @@ public function getProjectSupportLevel(): ?string return $this->projectSupportLevel; } } + diff --git a/src/Model/UpdateProfileRequest.php b/src/Model/UpdateProfileRequest.php index 8ee749486..a452cd4e3 100644 --- a/src/Model/UpdateProfileRequest.php +++ b/src/Model/UpdateProfileRequest.php @@ -13,6 +13,8 @@ */ final class UpdateProfileRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?string $displayName = null, private readonly ?string $username = null, @@ -30,6 +32,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -124,3 +127,4 @@ public function getPicture(): ?string return $this->picture; } } + diff --git a/src/Model/UpdateProjectUserAccessRequest.php b/src/Model/UpdateProjectUserAccessRequest.php index 007328e7c..05a60c464 100644 --- a/src/Model/UpdateProjectUserAccessRequest.php +++ b/src/Model/UpdateProjectUserAccessRequest.php @@ -13,6 +13,7 @@ */ final class UpdateProjectUserAccessRequest implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -30,6 +31,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,3 +54,4 @@ public function getPermissions(): array return $this->permissions; } } + diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php index dc7d20870..ba4620800 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php @@ -13,6 +13,8 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?array $webapps = [], private readonly ?array $services = [], @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -38,27 +41,28 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue[]|null - */ + /** + * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue[]|null + */ public function getWebapps(): ?array { return $this->webapps; } - /** - * @return UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue[]|null - */ + /** + * @return UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue[]|null + */ public function getServices(): ?array { return $this->services; } - /** - * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue[]|null - */ + /** + * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue[]|null + */ public function getWorkers(): ?array { return $this->workers; } } + diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php index d350bcbeb..1209e4b00 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php @@ -13,6 +13,8 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue implements Model, JsonSerializable { + + public function __construct( private readonly ?int $instanceCount = null, private readonly ?int $disk = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getDisk(): ?int return $this->disk; } } + diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php index 67cbb65c2..818a9aaf1 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php @@ -13,6 +13,8 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue implements Model, JsonSerializable { + + public function __construct( private readonly ?int $instanceCount = null, private readonly ?int $disk = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getDisk(): ?int return $this->disk; } } + diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php index 450721b7a..bd7b943ea 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php @@ -13,6 +13,8 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue implements Model, JsonSerializable { + + public function __construct( private readonly ?int $instanceCount = null, private readonly ?int $disk = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getDisk(): ?int return $this->disk; } } + diff --git a/src/Model/UpdateSubscriptionUsageAlertsRequest.php b/src/Model/UpdateSubscriptionUsageAlertsRequest.php index cbea19074..d93236b18 100644 --- a/src/Model/UpdateSubscriptionUsageAlertsRequest.php +++ b/src/Model/UpdateSubscriptionUsageAlertsRequest.php @@ -13,11 +13,14 @@ */ final class UpdateSubscriptionUsageAlertsRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?array $alerts = [], ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UpdateSubscriptionUsageAlertsRequestAlertsInner[]|null - */ + /** + * @return UpdateSubscriptionUsageAlertsRequestAlertsInner[]|null + */ public function getAlerts(): ?array { return $this->alerts; } } + diff --git a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php index 91a467938..6d18c6baf 100644 --- a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php +++ b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php @@ -13,6 +13,8 @@ */ final class UpdateSubscriptionUsageAlertsRequestAlertsInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?bool $active = null, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getConfig(): ?UpdateSubscriptionUsageAlertsRequestAlertsInnerCon return $this->config; } } + diff --git a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php index ae0eed34e..b713857e8 100644 --- a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php +++ b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php @@ -13,11 +13,14 @@ */ final class UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig implements Model, JsonSerializable { + + public function __construct( private readonly ?int $threshold = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getThreshold(): ?int return $this->threshold; } } + diff --git a/src/Model/UpdateTeamRequest.php b/src/Model/UpdateTeamRequest.php index 68afbea85..62af545cd 100644 --- a/src/Model/UpdateTeamRequest.php +++ b/src/Model/UpdateTeamRequest.php @@ -13,12 +13,15 @@ */ final class UpdateTeamRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?string $label = null, private readonly ?array $projectPermissions = [], ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getProjectPermissions(): ?array return $this->projectPermissions; } } + diff --git a/src/Model/UpdateTicketRequest.php b/src/Model/UpdateTicketRequest.php index 506267043..c2d0a6003 100644 --- a/src/Model/UpdateTicketRequest.php +++ b/src/Model/UpdateTicketRequest.php @@ -13,6 +13,7 @@ */ final class UpdateTicketRequest implements Model, JsonSerializable { + public const STATUS_OPEN = 'open'; public const STATUS_SOLVED = 'solved'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -57,3 +59,4 @@ public function getCollaboratorsReplace(): ?bool return $this->collaboratorsReplace; } } + diff --git a/src/Model/UpdateUsageAlertsRequest.php b/src/Model/UpdateUsageAlertsRequest.php index 0c21554e9..4a822605f 100644 --- a/src/Model/UpdateUsageAlertsRequest.php +++ b/src/Model/UpdateUsageAlertsRequest.php @@ -13,11 +13,14 @@ */ final class UpdateUsageAlertsRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?array $alerts = [], ) { } + public function getModelName(): string { return self::class; @@ -34,11 +37,12 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Alert[]|null - */ + /** + * @return Alert[]|null + */ public function getAlerts(): ?array { return $this->alerts; } } + diff --git a/src/Model/UpdateUserRequest.php b/src/Model/UpdateUserRequest.php index a4183e7dc..c60b7f685 100644 --- a/src/Model/UpdateUserRequest.php +++ b/src/Model/UpdateUserRequest.php @@ -13,6 +13,8 @@ */ final class UpdateUserRequest implements Model, JsonSerializable { + + public function __construct( private readonly ?string $username = null, private readonly ?string $firstName = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -82,3 +85,4 @@ public function getCountry(): ?string return $this->country; } } + diff --git a/src/Model/UpstreamConfiguration.php b/src/Model/UpstreamConfiguration.php index 9f0537ea0..ee2ff1c4b 100644 --- a/src/Model/UpstreamConfiguration.php +++ b/src/Model/UpstreamConfiguration.php @@ -13,6 +13,7 @@ */ final class UpstreamConfiguration implements Model, JsonSerializable { + public const SOCKET_FAMILY_TCP = 'tcp'; public const SOCKET_FAMILY_UNIX = 'unix'; public const PROTOCOL_FASTCGI = 'fastcgi'; @@ -24,6 +25,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,3 +54,4 @@ public function getProtocol(): ?string return $this->protocol; } } + diff --git a/src/Model/UpstreamRoute.php b/src/Model/UpstreamRoute.php index 81f5d8ceb..aa0fc1747 100644 --- a/src/Model/UpstreamRoute.php +++ b/src/Model/UpstreamRoute.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\Route; /** * Low level UpstreamRoute (auto-generated) @@ -13,6 +14,7 @@ */ final class UpstreamRoute implements Model, JsonSerializable, Route { + public const TYPE_PROXY = 'proxy'; public const TYPE_REDIRECT = 'redirect'; public const TYPE_UPSTREAM = 'upstream'; @@ -33,6 +35,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -66,91 +69,92 @@ public function getAttributes(): array return $this->attributes; } - /** - * Route type - */ + /** + * Route type + */ public function getType(): string { return $this->type; } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getTls(): TLSSettings { return $this->tls; } - /** - * The identifier of UpstreamRoute - */ + /** + * The identifier of UpstreamRoute + */ public function getId(): ?string { return $this->id; } - /** - * This route is the primary route of the environment - */ + /** + * This route is the primary route of the environment + */ public function getPrimary(): ?bool { return $this->primary; } - /** - * How this URL route would look on production environment - */ + /** + * How this URL route would look on production environment + */ public function getProductionUrl(): ?string { return $this->productionUrl; } - /** - * Cache configuration - */ + /** + * Cache configuration + */ public function getCache(): ?CacheConfiguration { return $this->cache; } - /** - * Server-Side Include configuration - */ + /** + * Server-Side Include configuration + */ public function getSsi(): ?SSIConfiguration { return $this->ssi; } - /** - * The upstream to use for this route - */ + /** + * The upstream to use for this route + */ public function getUpstream(): ?string { return $this->upstream; } - /** - * The configuration of the redirects - */ + /** + * The configuration of the redirects + */ public function getRedirects(): ?RedirectConfiguration { return $this->redirects; } - /** - * Sticky routing configuration - */ + /** + * Sticky routing configuration + */ public function getSticky(): ?StickyConfiguration { return $this->sticky; } - /** - * The destination of the proxy - */ + /** + * The destination of the proxy + */ public function getTo(): ?string { return $this->to; } } + diff --git a/src/Model/Usage.php b/src/Model/Usage.php index 43dc4b7fa..eed490fc6 100644 --- a/src/Model/Usage.php +++ b/src/Model/Usage.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -15,15 +14,18 @@ */ final class Usage implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $subscriptionId = null, private readonly ?string $usageGroup = null, private readonly ?float $quantity = null, - private readonly ?DateTime $start = null, + private readonly ?\DateTime $start = null, ) { } + public function getModelName(): string { return self::class; @@ -45,43 +47,44 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The unique ID of the usage record. - */ + /** + * The unique ID of the usage record. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the subscription. - */ + /** + * The ID of the subscription. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * The type of usage that this record represents. - */ + /** + * The type of usage that this record represents. + */ public function getUsageGroup(): ?string { return $this->usageGroup; } - /** - * The quantity used. - */ + /** + * The quantity used. + */ public function getQuantity(): ?float { return $this->quantity; } - /** - * The start timestamp of this usage record (ISO 8601). - */ - public function getStart(): ?DateTime + /** + * The start timestamp of this usage record (ISO 8601). + */ + public function getStart(): ?\DateTime { return $this->start; } } + diff --git a/src/Model/UsageAlert.php b/src/Model/UsageAlert.php index 93276c8ce..ebc8b0a21 100644 --- a/src/Model/UsageAlert.php +++ b/src/Model/UsageAlert.php @@ -14,6 +14,8 @@ */ final class UsageAlert implements Model, JsonSerializable { + + public function __construct( private readonly ?string $lastAlertAt = null, private readonly ?string $updatedAt = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -46,51 +49,52 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Tidentifier of the alert. - */ + /** + * Tidentifier of the alert. + */ public function getId(): ?string { return $this->id; } - /** - * Whether the usage alert is activated. - */ + /** + * Whether the usage alert is activated. + */ public function getActive(): ?bool { return $this->active; } - /** - * Number of alerts sent. - */ + /** + * Number of alerts sent. + */ public function getAlertsSent(): ?float { return $this->alertsSent; } - /** - * The datetime the alert was last sent. - */ + /** + * The datetime the alert was last sent. + */ public function getLastAlertAt(): ?string { return $this->lastAlertAt; } - /** - * The datetime the alert was last updated. - */ + /** + * The datetime the alert was last updated. + */ public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * Configuration for the usage alert. - */ + /** + * Configuration for the usage alert. + */ public function getConfig(): ?UsageAlertConfig { return $this->config; } } + diff --git a/src/Model/UsageAlertConfig.php b/src/Model/UsageAlertConfig.php index ce4fc52d3..b11e49409 100644 --- a/src/Model/UsageAlertConfig.php +++ b/src/Model/UsageAlertConfig.php @@ -14,11 +14,14 @@ */ final class UsageAlertConfig implements Model, JsonSerializable { + + public function __construct( private readonly ?UsageAlertConfigThreshold $threshold = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Data regarding threshold spend. - */ + /** + * Data regarding threshold spend. + */ public function getThreshold(): ?UsageAlertConfigThreshold { return $this->threshold; } } + diff --git a/src/Model/UsageAlertConfigThreshold.php b/src/Model/UsageAlertConfigThreshold.php index c38acb37f..84cf1bfe2 100644 --- a/src/Model/UsageAlertConfigThreshold.php +++ b/src/Model/UsageAlertConfigThreshold.php @@ -14,6 +14,8 @@ */ final class UsageAlertConfigThreshold implements Model, JsonSerializable { + + public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -40,27 +43,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted threshold value. - */ + /** + * Formatted threshold value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Threshold value. - */ + /** + * Threshold value. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Threshold unit. - */ + /** + * Threshold unit. + */ public function getUnit(): ?string { return $this->unit; } } + diff --git a/src/Model/UsageGroupCurrentUsageProperties.php b/src/Model/UsageGroupCurrentUsageProperties.php index 42e318eac..1544d4fe8 100644 --- a/src/Model/UsageGroupCurrentUsageProperties.php +++ b/src/Model/UsageGroupCurrentUsageProperties.php @@ -14,6 +14,8 @@ */ final class UsageGroupCurrentUsageProperties implements Model, JsonSerializable { + + public function __construct( private readonly ?string $title = null, private readonly ?bool $type = null, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,75 +55,76 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The title of the usage group. - */ + /** + * The title of the usage group. + */ public function getTitle(): ?string { return $this->title; } - /** - * The usage group type. - */ + /** + * The usage group type. + */ public function getType(): ?bool { return $this->type; } - /** - * The value of current usage for the group. - */ + /** + * The value of current usage for the group. + */ public function getCurrentUsage(): ?float { return $this->currentUsage; } - /** - * The formatted value of current usage for the group. - */ + /** + * The formatted value of current usage for the group. + */ public function getCurrentUsageFormatted(): ?string { return $this->currentUsageFormatted; } - /** - * Whether the group is not charged for the subscription. - */ + /** + * Whether the group is not charged for the subscription. + */ public function getNotCharged(): ?bool { return $this->notCharged; } - /** - * The amount of free usage for the group. - */ + /** + * The amount of free usage for the group. + */ public function getFreeQuantity(): ?float { return $this->freeQuantity; } - /** - * The formatted amount of free usage for the group. - */ + /** + * The formatted amount of free usage for the group. + */ public function getFreeQuantityFormatted(): ?string { return $this->freeQuantityFormatted; } - /** - * The daily average usage calculated for the group. - */ + /** + * The daily average usage calculated for the group. + */ public function getDailyAverage(): ?float { return $this->dailyAverage; } - /** - * The formatted daily average usage calculated for the group. - */ + /** + * The formatted daily average usage calculated for the group. + */ public function getDailyAverageFormatted(): ?string { return $this->dailyAverageFormatted; } } + diff --git a/src/Model/User.php b/src/Model/User.php index 0ef7ff429..cad5f53bc 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class User implements Model, JsonSerializable { + public const CONSENT_METHOD_OPT_IN = 'opt-in'; public const CONSENT_METHOD_TEXT_REF = 'text-ref'; @@ -30,13 +30,14 @@ public function __construct( private readonly string $company, private readonly string $website, private readonly string $country, - private readonly DateTime $createdAt, - private readonly DateTime $updatedAt, - private readonly ?DateTime $consentedAt = null, + private readonly \DateTime $createdAt, + private readonly \DateTime $updatedAt, + private readonly ?\DateTime $consentedAt = null, private readonly ?string $consentMethod = null, ) { } + public function getModelName(): string { return self::class; @@ -69,131 +70,132 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): string { return $this->id; } - /** - * Whether the user has been deactivated. - */ + /** + * Whether the user has been deactivated. + */ public function getDeactivated(): bool { return $this->deactivated; } - /** - * The namespace in which the user's username is unique. - */ + /** + * The namespace in which the user's username is unique. + */ public function getNamespace(): string { return $this->namespace; } - /** - * The user's username. - */ + /** + * The user's username. + */ public function getUsername(): string { return $this->username; } - /** - * The user's email address. - */ + /** + * The user's email address. + */ public function getEmail(): string { return $this->email; } - /** - * Whether the user's email address has been verified. - */ + /** + * Whether the user's email address has been verified. + */ public function getEmailVerified(): bool { return $this->emailVerified; } - /** - * The user's first name. - */ + /** + * The user's first name. + */ public function getFirstName(): string { return $this->firstName; } - /** - * The user's last name. - */ + /** + * The user's last name. + */ public function getLastName(): string { return $this->lastName; } - /** - * The user's picture. - */ + /** + * The user's picture. + */ public function getPicture(): string { return $this->picture; } - /** - * The user's company. - */ + /** + * The user's company. + */ public function getCompany(): string { return $this->company; } - /** - * The user's website. - */ + /** + * The user's website. + */ public function getWebsite(): string { return $this->website; } - /** - * The user's ISO 3166-1 alpha-2 country code. - */ + /** + * The user's ISO 3166-1 alpha-2 country code. + */ public function getCountry(): string { return $this->country; } - /** - * The date and time when the user was created. - */ - public function getCreatedAt(): DateTime + /** + * The date and time when the user was created. + */ + public function getCreatedAt(): \DateTime { return $this->createdAt; } - /** - * The date and time when the user was last updated. - */ - public function getUpdatedAt(): DateTime + /** + * The date and time when the user was last updated. + */ + public function getUpdatedAt(): \DateTime { return $this->updatedAt; } - /** - * The date and time when the user consented to the Terms of Service. - */ - public function getConsentedAt(): ?DateTime + /** + * The date and time when the user consented to the Terms of Service. + */ + public function getConsentedAt(): ?\DateTime { return $this->consentedAt; } - /** - * The method by which the user consented to the Terms of Service. - */ + /** + * The method by which the user consented to the Terms of Service. + */ public function getConsentMethod(): ?string { return $this->consentMethod; } } + diff --git a/src/Model/UserProjectAccess.php b/src/Model/UserProjectAccess.php index a8ab651c6..825907a98 100644 --- a/src/Model/UserProjectAccess.php +++ b/src/Model/UserProjectAccess.php @@ -2,7 +2,6 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; /** @@ -14,6 +13,7 @@ */ final class UserProjectAccess implements Model, JsonSerializable { + public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -32,12 +32,13 @@ public function __construct( private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, private readonly ?array $permissions = [], - private readonly ?DateTime $grantedAt = null, - private readonly ?DateTime $updatedAt = null, + private readonly ?\DateTime $grantedAt = null, + private readonly ?\DateTime $updatedAt = null, private readonly ?TeamProjectAccessLinks $links = null, ) { } + public function getModelName(): string { return self::class; @@ -62,33 +63,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getUserId(): ?string { return $this->userId; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; @@ -99,18 +100,18 @@ public function getPermissions(): ?array return $this->permissions; } - /** - * The date and time when the access was granted. - */ - public function getGrantedAt(): ?DateTime + /** + * The date and time when the access was granted. + */ + public function getGrantedAt(): ?\DateTime { return $this->grantedAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): ?DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } @@ -120,3 +121,4 @@ public function getLinks(): ?TeamProjectAccessLinks return $this->links; } } + diff --git a/src/Model/UserReference.php b/src/Model/UserReference.php index 66eb5773c..c3ba1d592 100644 --- a/src/Model/UserReference.php +++ b/src/Model/UserReference.php @@ -14,6 +14,8 @@ */ final class UserReference implements Model, JsonSerializable { + + public function __construct( private readonly ?string $id = null, private readonly ?string $username = null, @@ -26,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -50,68 +53,69 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): ?string { return $this->id; } - /** - * The user's username. - */ + /** + * The user's username. + */ public function getUsername(): ?string { return $this->username; } - /** - * The user's email address. - */ + /** + * The user's email address. + */ public function getEmail(): ?string { return $this->email; } - /** - * The user's first name. - */ + /** + * The user's first name. + */ public function getFirstName(): ?string { return $this->firstName; } - /** - * The user's last name. - */ + /** + * The user's last name. + */ public function getLastName(): ?string { return $this->lastName; } - /** - * The user's picture. - */ + /** + * The user's picture. + */ public function getPicture(): ?string { return $this->picture; } - /** - * Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a - * mandatory SSO provider that itself supports MFA (see "sso_enabled\"). - */ + /** + * Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a + * mandatory SSO provider that itself supports MFA (see "sso_enabled\"). + */ public function getMfaEnabled(): ?bool { return $this->mfaEnabled; } - /** - * Whether the user is linked to a mandatory SSO provider. - */ + /** + * Whether the user is linked to a mandatory SSO provider. + */ public function getSsoEnabled(): ?bool { return $this->ssoEnabled; } } + diff --git a/src/Model/VPNConfiguration.php b/src/Model/VPNConfiguration.php index 676a1b63a..545602d76 100644 --- a/src/Model/VPNConfiguration.php +++ b/src/Model/VPNConfiguration.php @@ -14,6 +14,7 @@ */ final class VPNConfiguration implements Model, JsonSerializable { + public const VERSION_NUMBER_1 = 1; public const VERSION_NUMBER_2 = 2; public const AGGRESSIVE_NO = 'no'; @@ -39,6 +40,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -69,33 +71,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The IKE version to use (1 or 2) - */ + /** + * The IKE version to use (1 or 2) + */ public function getVersion(): int { return $this->version; } - /** - * Whether to use IKEv1 Aggressive or Main Mode - */ + /** + * Whether to use IKEv1 Aggressive or Main Mode + */ public function getAggressive(): string { return $this->aggressive; } - /** - * Defines which mode is used to assign a virtual IP (must be the same on both sides) - */ + /** + * Defines which mode is used to assign a virtual IP (must be the same on both sides) + */ public function getModeconfig(): string { return $this->modeconfig; } - /** - * The authentication scheme - */ + /** + * The authentication scheme + */ public function getAuthentication(): string { return $this->authentication; @@ -106,25 +108,25 @@ public function getGatewayIp(): string return $this->gatewayIp; } - /** - * The identity of the ipsec participant - */ + /** + * The identity of the ipsec participant + */ public function getIdentity(): ?string { return $this->identity; } - /** - * The second identity of the ipsec participant - */ + /** + * The second identity of the ipsec participant + */ public function getSecondIdentity(): ?string { return $this->secondIdentity; } - /** - * The identity of the remote ipsec participant - */ + /** + * The identity of the remote ipsec participant + */ public function getRemoteIdentity(): ?string { return $this->remoteIdentity; @@ -135,43 +137,44 @@ public function getRemoteSubnets(): array return $this->remoteSubnets; } - /** - * The IKE algorithms to negotiate for this VPN connection. - */ + /** + * The IKE algorithms to negotiate for this VPN connection. + */ public function getIke(): string { return $this->ike; } - /** - * The ESP algorithms to negotiate for this VPN connection. - */ + /** + * The ESP algorithms to negotiate for this VPN connection. + */ public function getEsp(): string { return $this->esp; } - /** - * The lifetime of the IKE exchange. - */ + /** + * The lifetime of the IKE exchange. + */ public function getIkelifetime(): string { return $this->ikelifetime; } - /** - * The lifetime of the ESP exchange. - */ + /** + * The lifetime of the ESP exchange. + */ public function getLifetime(): string { return $this->lifetime; } - /** - * The margin time for re-keying. - */ + /** + * The margin time for re-keying. + */ public function getMargintime(): string { return $this->margintime; } } + diff --git a/src/Model/VerifyPhoneNumber200Response.php b/src/Model/VerifyPhoneNumber200Response.php index 2ed759b17..bd5ee581a 100644 --- a/src/Model/VerifyPhoneNumber200Response.php +++ b/src/Model/VerifyPhoneNumber200Response.php @@ -13,11 +13,14 @@ */ final class VerifyPhoneNumber200Response implements Model, JsonSerializable { + + public function __construct( private readonly ?string $sid = null, ) { } + public function getModelName(): string { return self::class; @@ -40,3 +43,4 @@ public function getSid(): ?string return $this->sid; } } + diff --git a/src/Model/VerifyPhoneNumberRequest.php b/src/Model/VerifyPhoneNumberRequest.php index f016f86fc..db366c3f1 100644 --- a/src/Model/VerifyPhoneNumberRequest.php +++ b/src/Model/VerifyPhoneNumberRequest.php @@ -13,6 +13,7 @@ */ final class VerifyPhoneNumberRequest implements Model, JsonSerializable { + public const CHANNEL_SMS = 'sms'; public const CHANNEL_WHATSAPP = 'whatsapp'; public const CHANNEL_CALL = 'call'; @@ -23,6 +24,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -51,3 +53,4 @@ public function getPhoneNumber(): string return $this->phoneNumber; } } + diff --git a/src/Model/Vouchers.php b/src/Model/Vouchers.php index 31bc94ab1..78b7f8582 100644 --- a/src/Model/Vouchers.php +++ b/src/Model/Vouchers.php @@ -13,6 +13,8 @@ */ final class Vouchers implements Model, JsonSerializable { + + public function __construct( private readonly ?string $uuid = null, private readonly ?string $vouchersTotal = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -47,50 +50,50 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The uuid of the user. - */ + /** + * The uuid of the user. + */ public function getUuid(): ?string { return $this->uuid; } - /** - * The total voucher credit given to the user. - */ + /** + * The total voucher credit given to the user. + */ public function getVouchersTotal(): ?string { return $this->vouchersTotal; } - /** - * The part of total voucher credit applied to orders. - */ + /** + * The part of total voucher credit applied to orders. + */ public function getVouchersApplied(): ?string { return $this->vouchersApplied; } - /** - * The remaining voucher credit, available for future orders. - */ + /** + * The remaining voucher credit, available for future orders. + */ public function getVouchersRemainingBalance(): ?string { return $this->vouchersRemainingBalance; } - /** - * The currency of the vouchers. - */ + /** + * The currency of the vouchers. + */ public function getCurrency(): ?string { return $this->currency; } - /** - * Array of vouchers. - * @return VouchersVouchersInner[]|null - */ + /** + * Array of vouchers. + * @return VouchersVouchersInner[]|null + */ public function getVouchers(): ?array { return $this->vouchers; @@ -101,3 +104,4 @@ public function getLinks(): ?VouchersLinks return $this->links; } } + diff --git a/src/Model/VouchersLinks.php b/src/Model/VouchersLinks.php index e54f53984..7db3bc143 100644 --- a/src/Model/VouchersLinks.php +++ b/src/Model/VouchersLinks.php @@ -13,11 +13,14 @@ */ final class VouchersLinks implements Model, JsonSerializable { + + public function __construct( private readonly ?VouchersLinksSelf $self = null, ) { } + public function getModelName(): string { return self::class; @@ -35,11 +38,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current resource. - */ + /** + * Link to the current resource. + */ public function getSelf(): ?VouchersLinksSelf { return $this->self; } } + diff --git a/src/Model/VouchersLinksSelf.php b/src/Model/VouchersLinksSelf.php index f7c5a8daa..9c7b9e8e6 100644 --- a/src/Model/VouchersLinksSelf.php +++ b/src/Model/VouchersLinksSelf.php @@ -14,11 +14,14 @@ */ final class VouchersLinksSelf implements Model, JsonSerializable { + + public function __construct( private readonly ?string $href = null, ) { } + public function getModelName(): string { return self::class; @@ -36,11 +39,12 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } + diff --git a/src/Model/VouchersVouchersInner.php b/src/Model/VouchersVouchersInner.php index e00168f08..4a2187694 100644 --- a/src/Model/VouchersVouchersInner.php +++ b/src/Model/VouchersVouchersInner.php @@ -13,6 +13,8 @@ */ final class VouchersVouchersInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $code = null, private readonly ?string $amount = null, @@ -21,6 +23,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -56,11 +59,12 @@ public function getCurrency(): ?string return $this->currency; } - /** - * @return VouchersVouchersInnerOrdersInner[]|null - */ + /** + * @return VouchersVouchersInnerOrdersInner[]|null + */ public function getOrders(): ?array { return $this->orders; } } + diff --git a/src/Model/VouchersVouchersInnerOrdersInner.php b/src/Model/VouchersVouchersInnerOrdersInner.php index 21e7295e2..364efd72a 100644 --- a/src/Model/VouchersVouchersInnerOrdersInner.php +++ b/src/Model/VouchersVouchersInnerOrdersInner.php @@ -13,6 +13,8 @@ */ final class VouchersVouchersInnerOrdersInner implements Model, JsonSerializable { + + public function __construct( private readonly ?string $orderId = null, private readonly ?string $status = null, @@ -24,6 +26,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -82,3 +85,4 @@ public function getCurrency(): ?string return $this->currency; } } + diff --git a/src/Model/WebApplicationsValue.php b/src/Model/WebApplicationsValue.php index 5ee65bce2..19b277553 100644 --- a/src/Model/WebApplicationsValue.php +++ b/src/Model/WebApplicationsValue.php @@ -13,6 +13,7 @@ */ final class WebApplicationsValue implements Model, JsonSerializable { + public const SIZE__2_XL = '2XL'; public const SIZE__4_XL = '4XL'; public const SIZE_AUTO = 'AUTO'; @@ -62,6 +63,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -131,17 +133,17 @@ public function getAccess(): array return $this->access; } - /** - * @return AuthorizationsInner[] - */ + /** + * @return AuthorizationsInner[] + */ public function getAuthorizations(): array { return $this->authorizations; } - /** - * @return ServiceRelationshipsValue[] - */ + /** + * @return ServiceRelationshipsValue[] + */ public function getRelationships(): array { return $this->relationships; @@ -152,9 +154,9 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * @return MountsValue[] - */ + /** + * @return MountsValue[] + */ public function getMounts(): array { return $this->mounts; @@ -180,9 +182,9 @@ public function getContainerProfile(): ?string return $this->containerProfile; } - /** - * @return OperationsValue[] - */ + /** + * @return OperationsValue[] + */ public function getOperations(): array { return $this->operations; @@ -233,9 +235,9 @@ public function getHooks(): Hooks return $this->hooks; } - /** - * @return CronsValue[] - */ + /** + * @return CronsValue[] + */ public function getCrons(): array { return $this->crons; @@ -291,3 +293,4 @@ public function getSupportsHorizontalScaling(): bool return $this->supportsHorizontalScaling; } } + diff --git a/src/Model/WebApplicationsValue1.php b/src/Model/WebApplicationsValue1.php index 50fcc5028..b8c123e77 100644 --- a/src/Model/WebApplicationsValue1.php +++ b/src/Model/WebApplicationsValue1.php @@ -13,6 +13,8 @@ */ final class WebApplicationsValue1 implements Model, JsonSerializable { + + public function __construct( private readonly ?Resources3 $resources, private readonly ?int $instanceCount, @@ -20,6 +22,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -54,3 +57,4 @@ public function getDisk(): ?int return $this->disk; } } + diff --git a/src/Model/WebConfiguration.php b/src/Model/WebConfiguration.php index f65b602e5..3ac09e2ec 100644 --- a/src/Model/WebConfiguration.php +++ b/src/Model/WebConfiguration.php @@ -13,6 +13,8 @@ */ final class WebConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly array $locations, private readonly bool $moveToRoot, @@ -27,6 +29,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -52,9 +55,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return WebLocationsValue[] - */ + /** + * @return WebLocationsValue[] + */ public function getLocations(): array { return $this->locations; @@ -105,3 +108,4 @@ public function getExpires(): ?string return $this->expires; } } + diff --git a/src/Model/WebHookIntegration.php b/src/Model/WebHookIntegration.php index 354847343..0b775e47f 100644 --- a/src/Model/WebHookIntegration.php +++ b/src/Model/WebHookIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; -use DateTime; use JsonSerializable; +use Upsun\Model\Integration; /** * Low level WebHookIntegration (auto-generated) @@ -14,6 +14,7 @@ */ final class WebHookIntegration implements Model, JsonSerializable, Integration { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -27,13 +28,14 @@ public function __construct( private readonly array $states, private readonly string $result, private readonly string $url, - private readonly ?DateTime $createdAt, - private readonly ?DateTime $updatedAt, + private readonly ?\DateTime $createdAt, + private readonly ?\DateTime $updatedAt, private readonly ?string $sharedKey, private readonly ?string $id = null, ) { } + public function getModelName(): string { return self::class; @@ -62,33 +64,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?\DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?\DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -114,35 +116,36 @@ public function getStates(): array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): string { return $this->result; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The identifier of WebHookIntegration - */ + /** + * The identifier of WebHookIntegration + */ public function getId(): ?string { return $this->id; } } + diff --git a/src/Model/WebHookIntegrationCreateInput.php b/src/Model/WebHookIntegrationCreateInput.php index 470e8e158..513bdb1de 100644 --- a/src/Model/WebHookIntegrationCreateInput.php +++ b/src/Model/WebHookIntegrationCreateInput.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationCreateCreateInput; /** * Low level WebHookIntegrationCreateInput (auto-generated) @@ -13,6 +14,7 @@ */ final class WebHookIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -29,6 +31,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -53,17 +56,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; @@ -89,19 +92,20 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } + diff --git a/src/Model/WebHookIntegrationPatch.php b/src/Model/WebHookIntegrationPatch.php index 563a0d14b..0551b5869 100644 --- a/src/Model/WebHookIntegrationPatch.php +++ b/src/Model/WebHookIntegrationPatch.php @@ -3,6 +3,7 @@ namespace Upsun\Model; use JsonSerializable; +use Upsun\Model\IntegrationPatch; /** * Low level WebHookIntegrationPatch (auto-generated) @@ -13,6 +14,7 @@ */ final class WebHookIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { + public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -29,6 +31,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -53,17 +56,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; @@ -89,19 +92,20 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } + diff --git a/src/Model/WebLocationsValue.php b/src/Model/WebLocationsValue.php index a2d1adce8..951bf1c17 100644 --- a/src/Model/WebLocationsValue.php +++ b/src/Model/WebLocationsValue.php @@ -13,6 +13,8 @@ */ final class WebLocationsValue implements Model, JsonSerializable { + + public function __construct( private readonly string $expires, private readonly string $passthru, @@ -26,6 +28,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -81,9 +84,9 @@ public function getHeaders(): array return $this->headers; } - /** - * @return SpecificOverridesValue[] - */ + /** + * @return SpecificOverridesValue[] + */ public function getRules(): array { return $this->rules; @@ -99,3 +102,4 @@ public function getRequestBuffering(): ?RequestBuffering return $this->requestBuffering; } } + diff --git a/src/Model/Webhook.php b/src/Model/Webhook.php index 476fc5f8a..6c5495839 100644 --- a/src/Model/Webhook.php +++ b/src/Model/Webhook.php @@ -14,12 +14,15 @@ */ final class Webhook implements Model, JsonSerializable { + + public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } + public function getModelName(): string { return self::class; @@ -38,19 +41,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } + diff --git a/src/Model/WorkerConfiguration.php b/src/Model/WorkerConfiguration.php index 8d7246190..f3b07b469 100644 --- a/src/Model/WorkerConfiguration.php +++ b/src/Model/WorkerConfiguration.php @@ -13,12 +13,15 @@ */ final class WorkerConfiguration implements Model, JsonSerializable { + + public function __construct( private readonly Commands2 $commands, private readonly ?int $disk = null, ) { } + public function getModelName(): string { return self::class; @@ -47,3 +50,4 @@ public function getDisk(): ?int return $this->disk; } } + diff --git a/src/Model/WorkersValue.php b/src/Model/WorkersValue.php index 8e869b9fb..9beae4f23 100644 --- a/src/Model/WorkersValue.php +++ b/src/Model/WorkersValue.php @@ -13,6 +13,7 @@ */ final class WorkersValue implements Model, JsonSerializable { + public const SIZE__2_XL = '2XL'; public const SIZE__4_XL = '4XL'; public const SIZE_AUTO = 'AUTO'; @@ -56,6 +57,7 @@ public function __construct( ) { } + public function getModelName(): string { return self::class; @@ -119,17 +121,17 @@ public function getAccess(): array return $this->access; } - /** - * @return AuthorizationsInner[] - */ + /** + * @return AuthorizationsInner[] + */ public function getAuthorizations(): array { return $this->authorizations; } - /** - * @return ServiceRelationshipsValue[] - */ + /** + * @return ServiceRelationshipsValue[] + */ public function getRelationships(): array { return $this->relationships; @@ -140,9 +142,9 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * @return MountsValue[] - */ + /** + * @return MountsValue[] + */ public function getMounts(): array { return $this->mounts; @@ -168,9 +170,9 @@ public function getContainerProfile(): ?string return $this->containerProfile; } - /** - * @return OperationsValue[] - */ + /** + * @return OperationsValue[] + */ public function getOperations(): array { return $this->operations; @@ -246,3 +248,4 @@ public function getSupportsHorizontalScaling(): bool return $this->supportsHorizontalScaling; } } + From 725c36ca0ec6ccfc892b212b77f94c702e90a24c Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 11:52:59 +0200 Subject: [PATCH 04/13] =?UTF-8?q?chore(regen):=20full=20SDK=20regeneration?= =?UTF-8?q?=20=E2=80=94=20Api,=20Model,=20Serializer=20classes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Api/AbstractApi.php | 14 +- src/Api/AddOnsApi.php | 21 +- src/Api/AlertsApi.php | 21 +- src/Api/ApiTokensApi.php | 25 +- src/Api/AutoscalingApi.php | 32 +- src/Api/BlackfireMonitoringApi.php | 204 ---------- src/Api/BlackfireProfilingApi.php | 140 ++----- src/Api/CertManagementApi.php | 65 ++-- src/Api/ConnectionsApi.php | 12 +- src/Api/ContinuousProfilingApi.php | 118 ------ src/Api/DefaultApi.php | 97 ++--- src/Api/DeploymentApi.php | 24 +- src/Api/DeploymentTargetApi.php | 43 +-- src/Api/DiffApi.php | 3 - src/Api/DiscountsApi.php | 30 +- src/Api/DomainClaimApi.php | 29 +- src/Api/DomainManagementApi.php | 81 ++-- src/Api/EntrypointApi.php | 8 - src/Api/EnvironmentActivityApi.php | 17 +- src/Api/EnvironmentApi.php | 138 +++---- src/Api/EnvironmentBackupsApi.php | 43 +-- src/Api/EnvironmentTypeApi.php | 10 +- src/Api/EnvironmentVariablesApi.php | 43 +-- src/Api/GrantsApi.php | 34 +- src/Api/HttpTrafficApi.php | 126 ------- src/Api/InvoicesApi.php | 22 +- src/Api/MfaApi.php | 50 +-- src/Api/OrdersApi.php | 36 +- src/Api/OrganizationInvitationsApi.php | 37 +- src/Api/OrganizationManagementApi.php | 42 +-- src/Api/OrganizationMembersApi.php | 61 ++- src/Api/OrganizationProjectsApi.php | 121 +++--- src/Api/OrganizationsApi.php | 195 ++++------ src/Api/PhoneNumberApi.php | 24 +- src/Api/ProfilesApi.php | 40 +- src/Api/ProjectActivityApi.php | 17 +- src/Api/ProjectApi.php | 28 +- src/Api/ProjectInvitationsApi.php | 37 +- src/Api/ProjectSettingsApi.php | 22 +- src/Api/ProjectVariablesApi.php | 43 +-- src/Api/ProjectsApi.php | 3 - src/Api/RecordsApi.php | 112 +++--- src/Api/ReferencesApi.php | 35 -- src/Api/RegionsApi.php | 46 +-- src/Api/RegistryCredentialApi.php | 43 +-- src/Api/RepositoryApi.php | 31 +- src/Api/ResourcesApi.php | 48 --- src/Api/RoutingApi.php | 10 +- src/Api/RuntimeOperationsApi.php | 15 +- src/Api/SbomApi.php | 10 +- .../Serializer/ApiObjectAttributesMapper.php | 7 - src/Api/Serializer/ApiObjectFormatsMapper.php | 8 - src/Api/Serializer/ApiObjectTypesMapper.php | 2 - src/Api/Serializer/ObjectSerializer.php | 100 ++--- src/Api/SourceOperationsApi.php | 17 +- src/Api/SshKeysApi.php | 25 +- src/Api/SubscriptionsApi.php | 193 +++------- src/Api/SupportApi.php | 45 +-- src/Api/SystemInformationApi.php | 15 +- src/Api/TaskApi.php | 24 +- src/Api/TeamAccessApi.php | 45 +-- src/Api/TeamsApi.php | 148 +++----- src/Api/ThirdPartyIntegrationsApi.php | 43 +-- src/Api/UserAccessApi.php | 64 +--- src/Api/UserProfilesApi.php | 69 ++-- src/Api/UsersApi.php | 103 ++--- src/Api/VouchersApi.php | 17 +- src/Core/OAuthProvider.php | 5 +- src/Model/AcceptedResponse.php | 16 +- src/Model/AccessControlInner.php | 3 - src/Model/Activity.php | 150 ++++---- src/Model/AddonCredential.php | 16 +- src/Model/AddonCredential1.php | 22 +- src/Model/Address.php | 64 ++-- src/Model/AddressGrantsInner.php | 3 - src/Model/AddressMetadata.php | 10 +- src/Model/AddressMetadataMetadata.php | 16 +- src/Model/AggregatedFeatures.php | 10 +- src/Model/Alert.php | 49 ++- src/Model/ApiToken.php | 65 ++-- src/Model/ApplyOrgVoucherRequest.php | 4 - src/Model/ArrayFilter.php | 28 +- src/Model/Author.php | 27 +- src/Model/AuthorizationsInner.php | 3 - src/Model/AutoscalerCPUPressureTrigger.php | 22 +- src/Model/AutoscalerCPUResources.php | 16 +- src/Model/AutoscalerCPUTrigger.php | 22 +- src/Model/AutoscalerCondition.php | 16 +- src/Model/AutoscalerDuration.php | 1 - src/Model/AutoscalerInstances.php | 16 +- src/Model/AutoscalerMemoryPressureTrigger.php | 22 +- src/Model/AutoscalerMemoryResources.php | 16 +- src/Model/AutoscalerMemoryTrigger.php | 22 +- src/Model/AutoscalerResources.php | 20 +- src/Model/AutoscalerScalingCooldown.php | 16 +- src/Model/AutoscalerScalingFactor.php | 16 +- src/Model/AutoscalerServiceSettings.php | 34 +- src/Model/AutoscalerSettings.php | 4 - src/Model/AutoscalerTriggers.php | 36 +- src/Model/Autoscaling.php | 10 +- src/Model/Backup.php | 100 +++-- src/Model/BasicAuth.php | 16 +- src/Model/Bitbucket.php | 16 +- src/Model/BitbucketIntegration.php | 103 +++-- src/Model/BitbucketIntegrationCreateInput.php | 70 ++-- src/Model/BitbucketIntegrationPatch.php | 70 ++-- src/Model/BitbucketServer.php | 16 +- src/Model/BitbucketServerIntegration.php | 97 +++-- .../BitbucketServerIntegrationCreateInput.php | 70 ++-- src/Model/BitbucketServerIntegrationPatch.php | 70 ++-- src/Model/Blackfire.php | 16 +- src/Model/BlackfireIntegration.php | 58 ++- src/Model/BlackfireIntegrationCreateInput.php | 11 +- src/Model/BlackfireIntegrationPatch.php | 11 +- .../BlackfirePhpServerCaches200Response.php | 9 +- ...irePhpServerCaches200ResponseDataInner.php | 4 - .../BlackfirePhpServerCaches400Response.php | 4 - .../BlackfirePhpServerCaches499Response.php | 4 - .../BlackfireProfileGraph200Response.php | 3 - .../BlackfireProfileProfile200Response.php | 4 - ...BlackfireProfileSubprofiles200Response.php | 4 - .../BlackfireProfileTimeline200Response.php | 3 - .../BlackfireProfilesList200Response.php | 10 +- ...reProfilesList200ResponseProfilesInner.php | 13 +- ...filesList200ResponseProfilesInnerAgent.php | 4 - ...lesList200ResponseProfilesInnerContext.php | 3 - ...ofilesList200ResponseProfilesInnerData.php | 4 - ...st200ResponseProfilesInnerDataEnvelope.php | 4 - ...ponseProfilesInnerDataImportantMetrics.php | 4 - ...sInnerDataImportantMetricsHttpRequests.php | 4 - ...lesInnerDataImportantMetricsSqlQueries.php | 4 - ...filesList200ResponseProfilesInnerLinks.php | 4 - ...t200ResponseProfilesInnerLinksGraphUrl.php | 3 - ...filesList200ResponseProfilesInnerOwner.php | 4 - ...fireProfilesRecommendations200Response.php | 10 +- ...dations200ResponseRecommendationsInner.php | 4 - ...ns200ResponseRecommendationsInnerLinks.php | 4 - ...ponseRecommendationsInnerLinksApiGraph.php | 3 - ...nseRecommendationsInnerLinksApiProfile.php | 3 - ...ecommendationsInnerLinksApiSubprofiles.php | 3 - ...seRecommendationsInnerLinksApiTimeline.php | 3 - .../BlackfireServerGlobal200Response.php | 9 +- ...Global200ResponseAlertEvaluationsInner.php | 3 - .../BlackfireServerGlobal200ResponseQuota.php | 13 +- ...BlackfireServerGlobal200ResponseServer.php | 10 +- ...ServerGlobal200ResponseServerDataInner.php | 4 - .../BlackfireServerTopSpans200Response.php | 3 - ...rverTopSpans200ResponseAdvancedFilters.php | 10 +- ...s200ResponseAdvancedFiltersFieldsValue.php | 10 +- ...eAdvancedFiltersFieldsValueValuesInner.php | 4 - ...kfireServerTopSpans200ResponseTopSpans.php | 10 +- ...erTopSpans200ResponseTopSpansDataInner.php | 4 - ...ServerTransactionsBreakdown200Response.php | 3 - ...nsBreakdown200ResponseBreakdownTopHits.php | 4 - ...onsBreakdown200ResponseTopHitsTimeline.php | 10 +- ...own200ResponseTopHitsTimelineDataInner.php | 10 +- ...HitsTimelineDataInnerTransactionsValue.php | 4 - ...ctionsBreakdown200ResponseTransactions.php | 10 +- ...akdown200ResponseTransactionsDataInner.php | 4 - ...n200ResponseTransactionsDataInnerLinks.php | 4 - ...onseTransactionsDataInnerLinksProfiles.php | 4 - ...nsactionsDataInnerLinksRecommendations.php | 4 - ...onseTransactionsDataInnerLinksTopSpans.php | 4 - src/Model/Blob.php | 33 +- src/Model/BuildCachesValue.php | 4 - src/Model/BuildConfiguration.php | 10 +- src/Model/BuildResources.php | 10 +- src/Model/BuildResources1.php | 4 - src/Model/BuildResources2.php | 4 - src/Model/CacheConfiguration.php | 16 +- src/Model/CanAffordSubscriptionRequest.php | 4 - ...CanCreateNewOrgSubscription200Response.php | 4 - ...gSubscription200ResponseRequiredAction.php | 4 - .../CanUpdateSubscription200Response.php | 4 - src/Model/Certificate.php | 73 ++-- src/Model/CertificateCreateInput.php | 22 +- src/Model/CertificatePatch.php | 10 +- src/Model/CertificateProvisioner.php | 34 +- src/Model/CertificateProvisionerPatch.php | 28 +- src/Model/Commands.php | 4 - src/Model/Commands1.php | 4 - src/Model/Commands2.php | 4 - src/Model/CommandsInner.php | 4 - src/Model/Commit.php | 40 +- src/Model/Committer.php | 27 +- src/Model/CommunityPackagesInner.php | 8 +- src/Model/Components.php | 10 +- src/Model/ComposableImages.php | 10 +- src/Model/Config.php | 112 +++--- src/Model/ConfirmPhoneNumberRequest.php | 4 - .../ConfirmTotpEnrollment200Response.php | 4 - src/Model/ConfirmTotpEnrollmentRequest.php | 4 - src/Model/Connection.php | 55 ++- src/Model/ContainerProfilesValueValue.php | 3 - .../ContinuousProfilingConfiguration.php | 4 - src/Model/CreateApiTokenRequest.php | 4 - ...ateAuthorizationCredentials200Response.php | 4 - ...ionCredentials200ResponseRedirectToUrl.php | 4 - src/Model/CreateOrgInviteRequest.php | 3 - src/Model/CreateOrgMemberRequest.php | 3 - src/Model/CreateOrgProjectRequest.php | 40 +- src/Model/CreateOrgRequest.php | 3 - src/Model/CreateOrgSubscriptionRequest.php | 10 +- src/Model/CreateProfilePicture200Response.php | 4 - src/Model/CreateProjectInviteRequest.php | 15 +- ...eProjectInviteRequestEnvironmentsInner.php | 3 - ...teProjectInviteRequestPermissionsInner.php | 3 - src/Model/CreateSshKeyRequest.php | 4 - src/Model/CreateTeamMemberRequest.php | 4 - src/Model/CreateTeamRequest.php | 4 - src/Model/CreateTicketRequest.php | 9 +- .../CreateTicketRequestAttachmentsInner.php | 4 - src/Model/CronsDeploymentState.php | 15 +- src/Model/CronsValue.php | 4 - src/Model/CurrencyAmount.php | 28 +- src/Model/CurrencyAmountNullable.php | 28 +- src/Model/CurrentUser.php | 78 ++-- src/Model/CurrentUserProjectsInner.php | 15 +- src/Model/CustomDomains.php | 16 +- src/Model/DataRetention.php | 10 +- src/Model/DataRetentionConfigurationValue.php | 4 - .../DataRetentionConfigurationValue1.php | 4 - src/Model/DateTimeFilter.php | 46 ++- src/Model/DedicatedDeploymentTarget.php | 84 ++--- .../DedicatedDeploymentTargetCreateInput.php | 22 +- src/Model/DedicatedDeploymentTargetPatch.php | 22 +- src/Model/DefaultConfig.php | 10 +- src/Model/DefaultConfig1.php | 10 +- src/Model/DefaultResources.php | 3 - src/Model/Deployment.php | 145 ++++--- src/Model/DeploymentHostsInner.php | 3 - src/Model/DeploymentState.php | 76 ++-- src/Model/DeploymentTarget.php | 3 - src/Model/DeploymentTargetCreateInput.php | 3 - src/Model/DeploymentTargetPatch.php | 3 - src/Model/DevelopmentResources.php | 28 +- src/Model/Diff.php | 34 +- src/Model/Discount.php | 78 ++-- src/Model/DiscountCommitment.php | 22 +- src/Model/DiscountCommitmentAmount.php | 22 +- src/Model/DiscountCommitmentNet.php | 22 +- src/Model/DiscountDiscount.php | 22 +- src/Model/DiskResources.php | 4 - src/Model/DiskResources1.php | 4 - src/Model/DiskResources2.php | 4 - src/Model/DocrootsValue.php | 4 - src/Model/Domain.php | 3 - src/Model/DomainClaim.php | 43 +-- src/Model/DomainCreateInput.php | 3 - src/Model/DomainPatch.php | 3 - src/Model/EmailIntegration.php | 50 ++- src/Model/EmailIntegrationCreateInput.php | 17 +- src/Model/EmailIntegrationPatch.php | 17 +- src/Model/EnterpriseDeploymentTarget.php | 54 ++- .../EnterpriseDeploymentTargetCreateInput.php | 28 +- src/Model/EnterpriseDeploymentTargetPatch.php | 28 +- src/Model/Environment.php | 238 ++++++------ src/Model/EnvironmentActivateInput.php | 4 - src/Model/EnvironmentBackupInput.php | 10 +- src/Model/EnvironmentBranchInput.php | 15 +- src/Model/EnvironmentDeployInput.php | 9 +- src/Model/EnvironmentInfo.php | 52 ++- src/Model/EnvironmentInitializeInput.php | 30 +- src/Model/EnvironmentMergeInput.php | 4 - src/Model/EnvironmentOperationInput.php | 16 +- src/Model/EnvironmentPatch.php | 51 ++- src/Model/EnvironmentRestoreInput.php | 16 +- src/Model/EnvironmentSourceOperation.php | 28 +- src/Model/EnvironmentSourceOperationInput.php | 10 +- src/Model/EnvironmentSynchronizeInput.php | 28 +- src/Model/EnvironmentType.php | 10 +- src/Model/EnvironmentVariable.php | 97 +++-- src/Model/EnvironmentVariableCreateInput.php | 52 ++- src/Model/EnvironmentVariablePatch.php | 52 ++- src/Model/EnvironmentVariablesInner.php | 4 - src/Model/EnvironmentsCredentialsValue.php | 4 - src/Model/Error.php | 10 +- src/Model/EstimationObject.php | 40 +- src/Model/FastlyCDN.php | 16 +- src/Model/FastlyIntegration.php | 61 ++- src/Model/FastlyIntegrationCreateInput.php | 34 +- src/Model/FastlyIntegrationPatch.php | 34 +- src/Model/FilesInner.php | 4 - src/Model/FilterSelect.php | 4 - src/Model/FilterSelectValues.php | 3 - src/Model/Firewall.php | 10 +- src/Model/FoundationDeploymentTarget.php | 46 ++- .../FoundationDeploymentTargetCreateInput.php | 34 +- src/Model/FoundationDeploymentTargetPatch.php | 34 +- src/Model/GetAddress200Response.php | 70 ++-- src/Model/GetApplicationFilter200Response.php | 10 +- ...pplicationFilter200ResponseFieldsValue.php | 10 +- ...ilter200ResponseFieldsValueValuesInner.php | 4 - src/Model/GetApplicationMerge200Response.php | 18 +- ...ApplicationMerge200ResponseFlamebearer.php | 4 - ...ApplicationMerge200ResponseGroupsValue.php | 4 - .../GetApplicationMerge200ResponseHeatmap.php | 4 - ...GetApplicationMerge200ResponseMetadata.php | 4 - ...GetApplicationMerge200ResponseTimeline.php | 4 - src/Model/GetApplicationMerge400Response.php | 4 - .../GetApplicationTimeline200Response.php | 9 +- ...licationTimeline200ResponsePointsInner.php | 4 - .../GetApplicationTimeline400Response.php | 4 - ...rrentUserVerificationStatus200Response.php | 4 - ...tUserVerificationStatusFull200Response.php | 4 - src/Model/GetOrgPrepaymentInfo200Response.php | 10 +- .../GetOrgPrepaymentInfo200ResponseLinks.php | 4 - ...tOrgPrepaymentInfo200ResponseLinksSelf.php | 4 - ...aymentInfo200ResponseLinksTransactions.php | 4 - .../GetSubscriptionUsageAlerts200Response.php | 16 +- src/Model/GetTotpEnrollment200Response.php | 4 - src/Model/GetTypeAllowance200Response.php | 4 - .../GetTypeAllowance200ResponseCurrencies.php | 4 - ...tTypeAllowance200ResponseCurrenciesAUD.php | 4 - ...tTypeAllowance200ResponseCurrenciesCAD.php | 4 - ...tTypeAllowance200ResponseCurrenciesEUR.php | 4 - ...tTypeAllowance200ResponseCurrenciesGBP.php | 4 - ...tTypeAllowance200ResponseCurrenciesUSD.php | 4 - src/Model/GetUsageAlerts200Response.php | 16 +- src/Model/GitHub.php | 16 +- src/Model/GitLab.php | 16 +- src/Model/GitLabIntegration.php | 113 +++--- src/Model/GitLabIntegrationCreateInput.php | 76 ++-- src/Model/GitLabIntegrationPatch.php | 76 ++-- src/Model/GitServerConfiguration.php | 10 +- src/Model/GithubIntegration.php | 103 +++-- src/Model/GithubIntegrationCreateInput.php | 70 ++-- src/Model/GithubIntegrationPatch.php | 70 ++-- .../GrantProjectTeamAccessRequestInner.php | 4 - .../GrantProjectUserAccessRequestInner.php | 3 - .../GrantTeamProjectAccessRequestInner.php | 4 - .../GrantUserProjectAccessRequestInner.php | 3 - src/Model/GuaranteedResources.php | 16 +- src/Model/HTTPLogForwarding.php | 16 +- src/Model/HalLinks.php | 22 +- src/Model/HalLinksNext.php | 16 +- src/Model/HalLinksPrevious.php | 16 +- src/Model/HalLinksSelf.php | 16 +- src/Model/HealthEmail.php | 16 +- src/Model/HealthPagerDuty.php | 16 +- src/Model/HealthSlack.php | 16 +- src/Model/HealthWebHook.php | 16 +- src/Model/HealthWebHookIntegration.php | 50 ++- .../HealthWebHookIntegrationCreateInput.php | 23 +- src/Model/HealthWebHookIntegrationPatch.php | 23 +- src/Model/History.php | 63 ++-- src/Model/Hooks.php | 4 - src/Model/Hooks1.php | 16 +- src/Model/HostsInner.php | 3 - src/Model/HttpAccessPermissions.php | 16 +- src/Model/HttpAccessPermissions1.php | 16 +- src/Model/HttpAccessPermissions2.php | 16 +- src/Model/HttpLogIntegration.php | 56 ++- src/Model/HttpLogIntegrationCreateInput.php | 23 +- src/Model/HttpLogIntegrationPatch.php | 29 +- .../HttpMetricsTimelineIps200Response.php | 3 - ...MetricsTimelineIps200ResponseBreakdown.php | 9 +- ...melineIps200ResponseBreakdownDataInner.php | 4 - ...sTimelineIps200ResponseTopHitsTimeline.php | 10 +- ...Ips200ResponseTopHitsTimelineDataInner.php | 10 +- ...ponseTopHitsTimelineDataInnerDataValue.php | 4 - .../HttpMetricsTimelineUrls200Response.php | 3 - ...etricsTimelineUrls200ResponseBreakdown.php | 9 +- ...elineUrls200ResponseBreakdownDataInner.php | 3 - ...pMetricsTimelineUrls200ResponseFilters.php | 10 +- ...elineUrls200ResponseFiltersFieldsValue.php | 10 +- ...0ResponseFiltersFieldsValueValuesInner.php | 4 - ...TimelineUrls200ResponseTopHitsTimeline.php | 10 +- ...rls200ResponseTopHitsTimelineDataInner.php | 10 +- ...0ResponseTopHitsTimelineDataInnerCodes.php | 4 - ...ponseTopHitsTimelineDataInnerUrlsValue.php | 4 - ...tpMetricsTimelineUserAgents200Response.php | 3 - ...TimelineUserAgents200ResponseBreakdown.php | 9 +- ...serAgents200ResponseBreakdownDataInner.php | 4 - ...neUserAgents200ResponseTopHitsTimeline.php | 10 +- ...nts200ResponseTopHitsTimelineDataInner.php | 10 +- ...ponseTopHitsTimelineDataInnerDataValue.php | 4 - src/Model/ImageTypeRestrictions.php | 4 - src/Model/ImagesValueValue.php | 4 - src/Model/Integration.php | 3 - src/Model/IntegrationCreateCreateInput.php | 3 - src/Model/IntegrationPatch.php | 3 - src/Model/Integrations.php | 10 +- src/Model/Invoice.php | 116 +++--- src/Model/InvoicePDF.php | 19 +- src/Model/IssuerInner.php | 4 - .../KubernetesDeploymentTargetStorage.php | 40 +- ...etesDeploymentTargetStorageCreateInput.php | 16 +- ...KubernetesDeploymentTargetStoragePatch.php | 16 +- src/Model/LastDeploymentCommandsInner.php | 4 - src/Model/LineItem.php | 59 ++- src/Model/LineItemComponent.php | 28 +- src/Model/Link.php | 10 +- src/Model/ListApplications200Response.php | 10 +- ...plications200ResponseApplicationsValue.php | 10 +- ...onseApplicationsValueProfileTypesValue.php | 3 - src/Model/ListApplications400Response.php | 4 - src/Model/ListApplications499Response.php | 4 - src/Model/ListLinks.php | 22 +- src/Model/ListOrgDiscounts200Response.php | 10 +- src/Model/ListOrgInvoices200Response.php | 10 +- src/Model/ListOrgMembers200Response.php | 10 +- src/Model/ListOrgOrders200Response.php | 10 +- src/Model/ListOrgPlanRecords200Response.php | 10 +- ...stOrgPrepaymentTransactions200Response.php | 10 +- ...PrepaymentTransactions200ResponseLinks.php | 4 - ...aymentTransactions200ResponseLinksNext.php | 4 - ...Transactions200ResponseLinksPrepayment.php | 4 - ...ntTransactions200ResponseLinksPrevious.php | 4 - ...aymentTransactions200ResponseLinksSelf.php | 4 - .../ListOrgProjectHistory200Response.php | 10 +- src/Model/ListOrgProjects200Response.php | 16 +- src/Model/ListOrgSubscriptions200Response.php | 10 +- src/Model/ListOrgUsageRecords200Response.php | 10 +- src/Model/ListOrgs200Response.php | 10 +- src/Model/ListProfiles200Response.php | 16 +- .../ListProjectTeamAccess200Response.php | 10 +- .../ListProjectUserAccess200Response.php | 10 +- src/Model/ListRegions200Response.php | 10 +- src/Model/ListTeamMembers200Response.php | 10 +- src/Model/ListTeams200Response.php | 10 +- .../ListTicketCategories200ResponseInner.php | 4 - .../ListTicketPriorities200ResponseInner.php | 4 - src/Model/ListTickets200Response.php | 16 +- .../ListUserExtendedAccess200Response.php | 10 +- ...serExtendedAccess200ResponseItemsInner.php | 12 +- src/Model/ListUserOrgs200Response.php | 10 +- src/Model/LogsForwarding.php | 10 +- src/Model/Maintenance.php | 15 +- src/Model/MaintenanceWindowConfiguration.php | 10 +- src/Model/MergeInfo.php | 22 +- src/Model/Metrics.php | 10 +- src/Model/MetricsMetadata.php | 28 +- src/Model/MetricsValue.php | 16 +- src/Model/MinimumResources.php | 3 - src/Model/Mode.php | 1 - src/Model/MountsValue.php | 3 - src/Model/NewRelic.php | 16 +- src/Model/NewRelicIntegration.php | 56 ++- src/Model/NewRelicIntegrationCreateInput.php | 29 +- src/Model/NewRelicIntegrationPatch.php | 29 +- src/Model/OAuth2Consumer.php | 10 +- src/Model/OAuth2Consumer1.php | 16 +- src/Model/OCIImage.php | 4 - src/Model/Object.php | 10 +- src/Model/ObjectStorage.php | 56 ++- .../ObservabilityEntrypoint200Response.php | 3 - ...lityEntrypoint200ResponseDataRetention.php | 4 - ...sponseDataRetentionContinuousProfiling.php | 4 - ...int200ResponseDataRetentionHttpTraffic.php | 4 - ...Entrypoint200ResponseDataRetentionLogs.php | 4 - ...point200ResponseDataRetentionResources.php | 4 - ...0ResponseDataRetentionServerMonitoring.php | 4 - ...bservabilityEntrypoint200ResponseLinks.php | 10 +- ...0ResponseLinksBlackfirePhpServerCaches.php | 4 - ...t200ResponseLinksBlackfireServerGlobal.php | 4 - ...ksBlackfireServerTransactionsBreakdown.php | 4 - ...ResponseLinksConprofApplicationFilters.php | 4 - ...int200ResponseLinksConprofApplications.php | 4 - ...point200ResponseLinksConprofFlamegraph.php | 4 - ...rypoint200ResponseLinksConprofTimeline.php | 4 - ...nt200ResponseLinksConsoleSandboxAccess.php | 4 - ...200ResponseLinksHttpMetricsTimelineIps.php | 4 - ...00ResponseLinksHttpMetricsTimelineUrls.php | 4 - ...onseLinksHttpMetricsTimelineUserAgents.php | 4 - ...Entrypoint200ResponseLinksLogsOverview.php | 4 - ...ityEntrypoint200ResponseLinksLogsQuery.php | 4 - ...00ResponseLinksResourcesByServiceValue.php | 4 - ...point200ResponseLinksResourcesOverview.php | 4 - ...ypoint200ResponseLinksResourcesSummary.php | 4 - ...vabilityEntrypoint200ResponseLinksSelf.php | 4 - ...vabilityEntrypoint200ResponseRetention.php | 4 - src/Model/OpenTelemetry.php | 16 +- src/Model/OperationsValue.php | 3 - src/Model/Order.php | 142 ++++--- src/Model/OrderBillingPeriodLabel.php | 28 +- src/Model/OrderLinks.php | 10 +- src/Model/OrderLinksInvoices.php | 10 +- src/Model/Organization.php | 102 +++-- src/Model/OrganizationAddonsObject.php | 22 +- .../OrganizationAddonsObjectAvailable.php | 4 - src/Model/OrganizationAddonsObjectCurrent.php | 4 - ...anizationAddonsObjectUpgradesAvailable.php | 4 - src/Model/OrganizationAiAgentSettings.php | 22 +- src/Model/OrganizationAlertConfig.php | 40 +- src/Model/OrganizationAlertConfigConfig.php | 16 +- ...OrganizationAlertConfigConfigThreshold.php | 28 +- src/Model/OrganizationCarbon.php | 22 +- src/Model/OrganizationEstimationObject.php | 46 ++- ...anizationEstimationObjectSubscriptions.php | 18 +- ...EstimationObjectSubscriptionsListInner.php | 4 - ...ationObjectSubscriptionsListInnerUsage.php | 4 - ...ganizationEstimationObjectUserLicenses.php | 4 - ...zationEstimationObjectUserLicensesBase.php | 16 +- ...onEstimationObjectUserLicensesBaseList.php | 16 +- ...ionObjectUserLicensesBaseListAdminUser.php | 16 +- ...onObjectUserLicensesBaseListViewerUser.php | 16 +- ...mationObjectUserLicensesUserManagement.php | 16 +- ...onObjectUserLicensesUserManagementList.php | 16 +- ...erManagementListAdvancedManagementUser.php | 16 +- ...erManagementListStandardManagementUser.php | 16 +- src/Model/OrganizationInvitation.php | 64 ++-- src/Model/OrganizationInvitationOwner.php | 16 +- src/Model/OrganizationLinks.php | 124 +++--- src/Model/OrganizationLinksAccount.php | 10 +- src/Model/OrganizationLinksAddress.php | 10 +- src/Model/OrganizationLinksApplyVoucher.php | 16 +- src/Model/OrganizationLinksBillingProfile.php | 10 +- src/Model/OrganizationLinksCreateMember.php | 16 +- .../OrganizationLinksCreateSubscription.php | 16 +- src/Model/OrganizationLinksDelete.php | 16 +- src/Model/OrganizationLinksDiscounts.php | 10 +- .../OrganizationLinksEstimateSubscription.php | 10 +- src/Model/OrganizationLinksMembers.php | 10 +- src/Model/OrganizationLinksMfaEnforcement.php | 10 +- src/Model/OrganizationLinksOrders.php | 10 +- src/Model/OrganizationLinksPaymentSource.php | 10 +- src/Model/OrganizationLinksPrepayment.php | 10 +- src/Model/OrganizationLinksProfile.php | 10 +- src/Model/OrganizationLinksSelf.php | 10 +- src/Model/OrganizationLinksSso.php | 10 +- src/Model/OrganizationLinksSubscriptions.php | 10 +- src/Model/OrganizationLinksUpdate.php | 16 +- src/Model/OrganizationLinksVouchers.php | 10 +- src/Model/OrganizationMember.php | 54 ++- src/Model/OrganizationMemberLinks.php | 22 +- src/Model/OrganizationMemberLinksDelete.php | 16 +- src/Model/OrganizationMemberLinksSelf.php | 10 +- src/Model/OrganizationMemberLinksUpdate.php | 16 +- src/Model/OrganizationMfaEnforcement.php | 10 +- src/Model/OrganizationProject.php | 117 +++--- src/Model/OrganizationProjectCarbon.php | 22 +- src/Model/OrganizationProjectLinks.php | 64 ++-- .../OrganizationProjectLinksActivities.php | 10 +- src/Model/OrganizationProjectLinksAddons.php | 10 +- src/Model/OrganizationProjectLinksApi.php | 10 +- src/Model/OrganizationProjectLinksDelete.php | 16 +- src/Model/OrganizationProjectLinksPlanUri.php | 10 +- src/Model/OrganizationProjectLinksSelf.php | 10 +- .../OrganizationProjectLinksSubscription.php | 10 +- src/Model/OrganizationProjectLinksUpdate.php | 16 +- ...anizationProjectLinksUpdateUsageAlerts.php | 16 +- ...rganizationProjectLinksViewUsageAlerts.php | 10 +- src/Model/OrganizationReference.php | 61 ++- src/Model/OtlpLogIntegration.php | 56 ++- .../OtlpLogIntegrationCreateCreateInput.php | 23 +- src/Model/OtlpLogIntegrationPatch.php | 23 +- src/Model/OutboundFirewall.php | 10 +- .../OutboundFirewallRestrictionsInner.php | 3 - src/Model/OwnerInfo.php | 22 +- src/Model/PagerDutyIntegration.php | 50 ++- src/Model/PagerDutyIntegrationCreateInput.php | 17 +- src/Model/PagerDutyIntegrationPatch.php | 17 +- src/Model/PathValue.php | 3 - src/Model/PlanRecords.php | 61 ++- .../PreServiceResourcesOverridesValue.php | 4 - src/Model/PreflightChecks.php | 4 - src/Model/PrepaymentObject.php | 10 +- src/Model/PrepaymentObjectPrepayment.php | 34 +- .../PrepaymentObjectPrepaymentBalance.php | 28 +- src/Model/PrepaymentTransactionObject.php | 46 ++- .../PrepaymentTransactionObjectAmount.php | 28 +- src/Model/ProdDomainStorage.php | 62 ++- src/Model/ProdDomainStorageCreateInput.php | 17 +- src/Model/ProdDomainStoragePatch.php | 11 +- src/Model/ProductionResources.php | 28 +- src/Model/Profile.php | 150 ++++---- src/Model/Project.php | 109 +++--- src/Model/ProjectCapabilities.php | 10 +- src/Model/ProjectCarbon.php | 28 +- src/Model/ProjectFacets.php | 4 - src/Model/ProjectInfo.php | 4 - src/Model/ProjectInvitation.php | 76 ++-- .../ProjectInvitationEnvironmentsInner.php | 3 - src/Model/ProjectOptions.php | 22 +- src/Model/ProjectOptionsAggregated.php | 10 +- src/Model/ProjectOptionsDefaults.php | 28 +- src/Model/ProjectOptionsEnforced.php | 16 +- src/Model/ProjectReference.php | 79 ++-- src/Model/ProjectSettings.php | 355 +++++++++--------- src/Model/ProjectSettingsPatch.php | 18 +- src/Model/ProjectStatus.php | 1 - src/Model/ProjectType.php | 1 - src/Model/ProjectVariable.php | 67 ++-- src/Model/ProjectVariableCreateInput.php | 40 +- src/Model/ProjectVariablePatch.php | 40 +- src/Model/ProvisionEvent.php | 52 ++- src/Model/ProvisionStep.php | 16 +- src/Model/ProxyRoute.php | 70 ++-- src/Model/Recurrence.php | 22 +- src/Model/RedirectConfiguration.php | 18 +- src/Model/RedirectRoute.php | 70 ++-- src/Model/Ref.php | 32 +- src/Model/Region.php | 78 ++-- src/Model/RegionCompliance.php | 10 +- src/Model/RegionDatacenter.php | 4 - src/Model/RegionEnvImpact.php | 28 +- src/Model/RegionEnvironmentalImpact.php | 4 - src/Model/RegionProvider.php | 4 - src/Model/RegionReference.php | 111 +++--- src/Model/RegistryCredential.php | 57 ++- src/Model/RegistryCredentialCreateInput.php | 30 +- src/Model/RegistryCredentialPatch.php | 30 +- src/Model/ReplacementDomainStorage.php | 62 ++- .../ReplacementDomainStorageCreateInput.php | 17 +- src/Model/ReplacementDomainStoragePatch.php | 11 +- src/Model/RepositoryInformation.php | 16 +- src/Model/RequestBuffering.php | 4 - src/Model/ResetEmailAddressRequest.php | 4 - src/Model/ResourceConfig.php | 10 +- src/Model/Resources.php | 4 - src/Model/Resources1.php | 4 - src/Model/Resources2.php | 4 - src/Model/Resources3.php | 4 - src/Model/Resources4.php | 9 +- src/Model/Resources5.php | 9 +- src/Model/Resources6.php | 9 +- src/Model/Resources7.php | 9 +- src/Model/Resources8.php | 9 +- src/Model/Resources9.php | 16 +- src/Model/ResourcesByService200Response.php | 9 +- ...ResourcesByService200ResponseDataInner.php | 10 +- ...vice200ResponseDataInnerInstancesValue.php | 10 +- ...esponseDataInnerInstancesValueCpuLimit.php | 4 - ...onseDataInnerInstancesValueCpuPressure.php | 4 - ...ResponseDataInnerInstancesValueCpuUsed.php | 4 - ...ponseDataInnerInstancesValueIoPressure.php | 4 - ...onseDataInnerInstancesValueIrqPressure.php | 4 - ...onseDataInnerInstancesValueMemoryLimit.php | 4 - ...eDataInnerInstancesValueMemoryPressure.php | 4 - ...ponseDataInnerInstancesValueMemoryUsed.php | 4 - ...ataInnerInstancesValueMountpointsValue.php | 4 - ...nstancesValueMountpointsValueDiskLimit.php | 4 - ...InstancesValueMountpointsValueDiskUsed.php | 4 - ...tancesValueMountpointsValueInodesLimit.php | 4 - ...stancesValueMountpointsValueInodesUsed.php | 4 - ...esponseDataInnerInstancesValueSwapUsed.php | 4 - src/Model/ResourcesLimits.php | 22 +- src/Model/ResourcesOverridesValue.php | 19 +- src/Model/ResourcesOverview200Response.php | 10 +- .../ResourcesOverview200ResponseDataInner.php | 10 +- ...rview200ResponseDataInnerServicesValue.php | 10 +- ...ResponseDataInnerServicesValueCpuLimit.php | 4 - ...ponseDataInnerServicesValueCpuPressure.php | 4 - ...0ResponseDataInnerServicesValueCpuUsed.php | 4 - ...sponseDataInnerServicesValueIoPressure.php | 4 - ...ponseDataInnerServicesValueIrqPressure.php | 4 - ...ponseDataInnerServicesValueMemoryLimit.php | 4 - ...seDataInnerServicesValueMemoryPressure.php | 4 - ...sponseDataInnerServicesValueMemoryUsed.php | 4 - ...DataInnerServicesValueMountpointsValue.php | 4 - ...ServicesValueMountpointsValueDiskLimit.php | 4 - ...rServicesValueMountpointsValueDiskUsed.php | 4 - ...rvicesValueMountpointsValueInodesLimit.php | 4 - ...ervicesValueMountpointsValueInodesUsed.php | 4 - ...esponseDataInnerServicesValueSwapLimit.php | 4 - ...ResponseDataInnerServicesValueSwapUsed.php | 4 - src/Model/ResourcesSummary200Response.php | 4 - src/Model/ResourcesSummary200ResponseData.php | 4 - ...mmary200ResponseDataServicesValueValue.php | 10 +- ...ponseDataServicesValueValueCpuPressure.php | 4 - ...0ResponseDataServicesValueValueCpuUsed.php | 4 - ...sponseDataServicesValueValueIoPressure.php | 4 - ...ponseDataServicesValueValueIrqPressure.php | 4 - ...seDataServicesValueValueMemoryPressure.php | 4 - ...sponseDataServicesValueValueMemoryUsed.php | 4 - ...DataServicesValueValueMountpointsValue.php | 4 - ...icesValueValueMountpointsValueDiskUsed.php | 4 - ...esValueValueMountpointsValueInodesUsed.php | 4 - ...ResponseDataServicesValueValueSwapUsed.php | 4 - src/Model/ResourcesSummary400Response.php | 4 - src/Model/Route.php | 3 - src/Model/RouterResources.php | 28 +- src/Model/RoutesValue.php | 3 - src/Model/RunConfiguration.php | 16 +- src/Model/RuntimeOperations.php | 10 +- src/Model/SSIConfiguration.php | 10 +- src/Model/ScheduleInner.php | 4 - src/Model/Script.php | 16 +- src/Model/ScriptIntegration.php | 55 ++- src/Model/ScriptIntegrationCreateInput.php | 22 +- src/Model/ScriptIntegrationPatch.php | 22 +- .../SendOrgMfaReminders200ResponseValue.php | 4 - src/Model/SendOrgMfaRemindersRequest.php | 4 - src/Model/ServiceRelationshipsValue.php | 4 - src/Model/ServicesValue.php | 3 - src/Model/ServicesValue1.php | 4 - src/Model/Sizing.php | 28 +- src/Model/SlackIntegration.php | 50 ++- src/Model/SlackIntegrationCreateInput.php | 23 +- src/Model/SlackIntegrationPatch.php | 23 +- src/Model/SourceCodeConfiguration.php | 10 +- src/Model/SourceCodeConfiguration1.php | 10 +- src/Model/SourceOperations.php | 10 +- src/Model/SourceOperationsValue.php | 4 - src/Model/SpecificOverridesValue.php | 4 - src/Model/Splunk.php | 16 +- src/Model/SplunkIntegration.php | 68 ++-- src/Model/SplunkIntegrationCreateInput.php | 41 +- src/Model/SplunkIntegrationPatch.php | 41 +- src/Model/SshKey.php | 40 +- src/Model/Status.php | 4 - src/Model/StickyConfiguration.php | 10 +- src/Model/StrictTransportSecurityOptions.php | 22 +- src/Model/StringFilter.php | 52 ++- src/Model/Subscription.php | 156 ++++---- src/Model/Subscription1.php | 69 ++-- src/Model/SubscriptionAddonsObject.php | 22 +- .../SubscriptionAddonsObjectAvailable.php | 4 - src/Model/SubscriptionAddonsObjectCurrent.php | 4 - ...scriptionAddonsObjectUpgradesAvailable.php | 4 - src/Model/SubscriptionCurrentUsageObject.php | 82 ++-- src/Model/SubscriptionInformation.php | 69 ++-- src/Model/SumoLogic.php | 16 +- src/Model/SumologicIntegration.php | 62 ++- src/Model/SumologicIntegrationCreateInput.php | 29 +- src/Model/SumologicIntegrationPatch.php | 29 +- src/Model/Syslog.php | 16 +- src/Model/SyslogIntegration.php | 79 ++-- src/Model/SyslogIntegrationCreateInput.php | 46 ++- src/Model/SyslogIntegrationPatch.php | 46 ++- src/Model/SystemInformation.php | 21 +- src/Model/TLSSettings.php | 15 +- src/Model/Task.php | 88 +++-- src/Model/TaskTriggerInput.php | 4 - src/Model/Tasks.php | 10 +- src/Model/TasksValue.php | 4 - src/Model/Team.php | 42 +-- src/Model/TeamCounts.php | 16 +- src/Model/TeamMember.php | 37 +- src/Model/TeamProjectAccess.php | 49 ++- src/Model/TeamProjectAccessLinks.php | 22 +- src/Model/TeamProjectAccessLinksDelete.php | 16 +- src/Model/TeamProjectAccessLinksSelf.php | 10 +- src/Model/TeamProjectAccessLinksUpdate.php | 16 +- src/Model/TeamReference.php | 42 +-- src/Model/Ticket.php | 224 ++++++----- src/Model/TicketJiraInner.php | 4 - src/Model/Tree.php | 24 +- src/Model/TreeItemsInner.php | 3 - src/Model/UpdateOrgAddonsRequest.php | 3 - .../UpdateOrgBillingAlertConfigRequest.php | 4 - ...dateOrgBillingAlertConfigRequestConfig.php | 4 - src/Model/UpdateOrgMemberRequest.php | 3 - src/Model/UpdateOrgProfileRequest.php | 3 - src/Model/UpdateOrgProjectRequest.php | 22 +- src/Model/UpdateOrgRequest.php | 4 - src/Model/UpdateOrgSubscriptionRequest.php | 22 +- src/Model/UpdateProfileRequest.php | 4 - src/Model/UpdateProjectUserAccessRequest.php | 3 - ...ectsEnvironmentsDeploymentsNextRequest.php | 22 +- ...ntsDeploymentsNextRequestServicesValue.php | 4 - ...entsDeploymentsNextRequestWebappsValue.php | 4 - ...entsDeploymentsNextRequestWorkersValue.php | 4 - .../UpdateSubscriptionUsageAlertsRequest.php | 10 +- ...scriptionUsageAlertsRequestAlertsInner.php | 4 - ...ionUsageAlertsRequestAlertsInnerConfig.php | 4 - src/Model/UpdateTeamRequest.php | 4 - src/Model/UpdateTicketRequest.php | 3 - src/Model/UpdateUsageAlertsRequest.php | 10 +- src/Model/UpdateUserRequest.php | 4 - src/Model/UpstreamConfiguration.php | 3 - src/Model/UpstreamRoute.php | 70 ++-- src/Model/Usage.php | 39 +- src/Model/UsageAlert.php | 40 +- src/Model/UsageAlertConfig.php | 10 +- src/Model/UsageAlertConfigThreshold.php | 22 +- .../UsageGroupCurrentUsageProperties.php | 58 ++- src/Model/User.php | 112 +++--- src/Model/UserProjectAccess.php | 48 ++- src/Model/UserReference.php | 54 ++- src/Model/VPNConfiguration.php | 75 ++-- src/Model/VerifyPhoneNumber200Response.php | 4 - src/Model/VerifyPhoneNumberRequest.php | 3 - src/Model/Vouchers.php | 42 +-- src/Model/VouchersLinks.php | 10 +- src/Model/VouchersLinksSelf.php | 10 +- src/Model/VouchersVouchersInner.php | 10 +- .../VouchersVouchersInnerOrdersInner.php | 4 - src/Model/WebApplicationsValue.php | 33 +- src/Model/WebApplicationsValue1.php | 4 - src/Model/WebConfiguration.php | 10 +- src/Model/WebHookIntegration.php | 61 ++- src/Model/WebHookIntegrationCreateInput.php | 28 +- src/Model/WebHookIntegrationPatch.php | 28 +- src/Model/WebLocationsValue.php | 10 +- src/Model/Webhook.php | 16 +- src/Model/WorkerConfiguration.php | 4 - src/Model/WorkersValue.php | 27 +- 789 files changed, 6943 insertions(+), 11066 deletions(-) diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index 6ab1c9fe0..cf901cf51 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -3,22 +3,22 @@ namespace Upsun\Api; use Exception; -use InvalidArgumentException; -use JsonException; use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClientFactory; use Http\Discovery\Psr17FactoryDiscovery; +use InvalidArgumentException; +use JsonException; use Psr\Http\Client\ClientExceptionInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Upsun\Core\OAuthProvider; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamFactoryInterface; +use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UriFactoryInterface; -use Upsun\Api\Serializer\ObjectSerializer; use Psr\Http\Message\UriInterface; -use Psr\Http\Message\StreamInterface; +use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\OAuthProvider; use function sprintf; @@ -229,10 +229,10 @@ protected function createUri( /** * @template T * @param class-string|string $dataType Fully-qualified class name, or scalar type like "string", "array" - * @return T * * @throws ApiException * @throws Exception + * @return T */ protected function handleResponseWithDataType( string $dataType, diff --git a/src/Api/AddOnsApi.php b/src/Api/AddOnsApi.php index d019b1798..9c7349651 100644 --- a/src/Api/AddOnsApi.php +++ b/src/Api/AddOnsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\OrganizationAddonsObject; +use Upsun\Model\UpdateOrgAddonsRequest; /** * Low level AddOnsApi (auto-generated) @@ -63,7 +64,7 @@ public function __construct( */ public function getOrgAddons( string $organizationId - ): \Upsun\Model\OrganizationAddonsObject { + ): OrganizationAddonsObject { return $this->getOrgAddonsWithHttpInfo( $organizationId ); @@ -81,7 +82,7 @@ public function getOrgAddons( */ private function getOrgAddonsWithHttpInfo( string $organizationId - ): \Upsun\Model\OrganizationAddonsObject { + ): OrganizationAddonsObject { $request = $this->getOrgAddonsRequest( $organizationId ); @@ -125,7 +126,6 @@ private function getOrgAddonsWithHttpInfo( private function getOrgAddonsRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -151,7 +151,6 @@ private function getOrgAddonsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -223,8 +222,8 @@ private function getOrgAddonsRequest( */ public function updateOrgAddons( string $organizationId, - \Upsun\Model\UpdateOrgAddonsRequest $updateOrgAddonsRequest - ): \Upsun\Model\OrganizationAddonsObject { + UpdateOrgAddonsRequest $updateOrgAddonsRequest + ): OrganizationAddonsObject { return $this->updateOrgAddonsWithHttpInfo( $organizationId, $updateOrgAddonsRequest @@ -243,8 +242,8 @@ public function updateOrgAddons( */ private function updateOrgAddonsWithHttpInfo( string $organizationId, - \Upsun\Model\UpdateOrgAddonsRequest $updateOrgAddonsRequest - ): \Upsun\Model\OrganizationAddonsObject { + UpdateOrgAddonsRequest $updateOrgAddonsRequest + ): OrganizationAddonsObject { $request = $this->updateOrgAddonsRequest( $organizationId, $updateOrgAddonsRequest @@ -288,9 +287,8 @@ private function updateOrgAddonsWithHttpInfo( */ private function updateOrgAddonsRequest( string $organizationId, - \Upsun\Model\UpdateOrgAddonsRequest $updateOrgAddonsRequest + UpdateOrgAddonsRequest $updateOrgAddonsRequest ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -323,7 +321,6 @@ private function updateOrgAddonsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/AlertsApi.php b/src/Api/AlertsApi.php index 57d188bcf..a477fca4c 100644 --- a/src/Api/AlertsApi.php +++ b/src/Api/AlertsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\GetUsageAlerts200Response; +use Upsun\Model\UpdateUsageAlertsRequest; /** * Low level AlertsApi (auto-generated) @@ -61,7 +62,7 @@ public function __construct( */ public function getUsageAlerts( string $subscriptionId - ): \Upsun\Model\GetUsageAlerts200Response { + ): GetUsageAlerts200Response { return $this->getUsageAlertsWithHttpInfo( $subscriptionId ); @@ -78,7 +79,7 @@ public function getUsageAlerts( */ private function getUsageAlertsWithHttpInfo( string $subscriptionId - ): \Upsun\Model\GetUsageAlerts200Response { + ): GetUsageAlerts200Response { $request = $this->getUsageAlertsRequest( $subscriptionId ); @@ -121,7 +122,6 @@ private function getUsageAlertsWithHttpInfo( private function getUsageAlertsRequest( string $subscriptionId ): RequestInterface { - // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -147,7 +147,6 @@ private function getUsageAlertsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -217,8 +216,8 @@ private function getUsageAlertsRequest( */ public function updateUsageAlerts( string $subscriptionId, - ?\Upsun\Model\UpdateUsageAlertsRequest $updateUsageAlertsRequest = null - ): \Upsun\Model\GetUsageAlerts200Response { + ?UpdateUsageAlertsRequest $updateUsageAlertsRequest = null + ): GetUsageAlerts200Response { return $this->updateUsageAlertsWithHttpInfo( $subscriptionId, $updateUsageAlertsRequest @@ -236,8 +235,8 @@ public function updateUsageAlerts( */ private function updateUsageAlertsWithHttpInfo( string $subscriptionId, - ?\Upsun\Model\UpdateUsageAlertsRequest $updateUsageAlertsRequest = null - ): \Upsun\Model\GetUsageAlerts200Response { + ?UpdateUsageAlertsRequest $updateUsageAlertsRequest = null + ): GetUsageAlerts200Response { $request = $this->updateUsageAlertsRequest( $subscriptionId, $updateUsageAlertsRequest @@ -280,9 +279,8 @@ private function updateUsageAlertsWithHttpInfo( */ private function updateUsageAlertsRequest( string $subscriptionId, - ?\Upsun\Model\UpdateUsageAlertsRequest $updateUsageAlertsRequest = null + ?UpdateUsageAlertsRequest $updateUsageAlertsRequest = null ): RequestInterface { - // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -308,7 +306,6 @@ private function updateUsageAlertsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ApiTokensApi.php b/src/Api/ApiTokensApi.php index 900134d63..5a7442a67 100644 --- a/src/Api/ApiTokensApi.php +++ b/src/Api/ApiTokensApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ApiToken; +use Upsun\Model\CreateApiTokenRequest; /** * Low level ApiTokensApi (auto-generated) @@ -62,8 +63,8 @@ public function __construct( */ public function createApiToken( string $userId, - ?\Upsun\Model\CreateApiTokenRequest $createApiTokenRequest = null - ): \Upsun\Model\ApiToken { + ?CreateApiTokenRequest $createApiTokenRequest = null + ): ApiToken { return $this->createApiTokenWithHttpInfo( $userId, $createApiTokenRequest @@ -81,8 +82,8 @@ public function createApiToken( */ private function createApiTokenWithHttpInfo( string $userId, - ?\Upsun\Model\CreateApiTokenRequest $createApiTokenRequest = null - ): \Upsun\Model\ApiToken { + ?CreateApiTokenRequest $createApiTokenRequest = null + ): ApiToken { $request = $this->createApiTokenRequest( $userId, $createApiTokenRequest @@ -125,9 +126,8 @@ private function createApiTokenWithHttpInfo( */ private function createApiTokenRequest( string $userId, - ?\Upsun\Model\CreateApiTokenRequest $createApiTokenRequest = null + ?CreateApiTokenRequest $createApiTokenRequest = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -153,7 +153,6 @@ private function createApiTokenRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -294,7 +293,6 @@ private function deleteApiTokenRequest( string $userId, string $tokenId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -336,7 +334,6 @@ private function deleteApiTokenRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -409,7 +406,7 @@ private function deleteApiTokenRequest( public function getApiToken( string $userId, string $tokenId - ): \Upsun\Model\ApiToken { + ): ApiToken { return $this->getApiTokenWithHttpInfo( $userId, $tokenId @@ -429,7 +426,7 @@ public function getApiToken( private function getApiTokenWithHttpInfo( string $userId, string $tokenId - ): \Upsun\Model\ApiToken { + ): ApiToken { $request = $this->getApiTokenRequest( $userId, $tokenId @@ -475,7 +472,6 @@ private function getApiTokenRequest( string $userId, string $tokenId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -517,7 +513,6 @@ private function getApiTokenRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -652,7 +647,6 @@ private function listApiTokensWithHttpInfo( private function listApiTokensRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -678,7 +672,6 @@ private function listApiTokensRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/AutoscalingApi.php b/src/Api/AutoscalingApi.php index e000e773c..02b58f8bb 100644 --- a/src/Api/AutoscalingApi.php +++ b/src/Api/AutoscalingApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AutoscalerSettings; /** * Low level AutoscalingApi (auto-generated) @@ -63,7 +63,7 @@ public function __construct( public function getAutoscalerSettings( string $projectId, string $environmentId - ): \Upsun\Model\AutoscalerSettings { + ): AutoscalerSettings { return $this->getAutoscalerSettingsWithHttpInfo( $projectId, $environmentId @@ -82,7 +82,7 @@ public function getAutoscalerSettings( private function getAutoscalerSettingsWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\AutoscalerSettings { + ): AutoscalerSettings { $request = $this->getAutoscalerSettingsRequest( $projectId, $environmentId @@ -127,7 +127,6 @@ private function getAutoscalerSettingsRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -169,7 +168,6 @@ private function getAutoscalerSettingsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -242,8 +240,8 @@ private function getAutoscalerSettingsRequest( public function patchAutoscalerSettings( string $projectId, string $environmentId, - ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null - ): \Upsun\Model\AutoscalerSettings { + ?AutoscalerSettings $autoscalerSettings = null + ): AutoscalerSettings { return $this->patchAutoscalerSettingsWithHttpInfo( $projectId, $environmentId, @@ -264,8 +262,8 @@ public function patchAutoscalerSettings( private function patchAutoscalerSettingsWithHttpInfo( string $projectId, string $environmentId, - ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null - ): \Upsun\Model\AutoscalerSettings { + ?AutoscalerSettings $autoscalerSettings = null + ): AutoscalerSettings { $request = $this->patchAutoscalerSettingsRequest( $projectId, $environmentId, @@ -311,9 +309,8 @@ private function patchAutoscalerSettingsWithHttpInfo( private function patchAutoscalerSettingsRequest( string $projectId, string $environmentId, - ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null + ?AutoscalerSettings $autoscalerSettings = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -355,7 +352,6 @@ private function patchAutoscalerSettingsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -436,8 +432,8 @@ private function patchAutoscalerSettingsRequest( public function postAutoscalerSettings( string $projectId, string $environmentId, - ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null - ): \Upsun\Model\AutoscalerSettings { + ?AutoscalerSettings $autoscalerSettings = null + ): AutoscalerSettings { return $this->postAutoscalerSettingsWithHttpInfo( $projectId, $environmentId, @@ -458,8 +454,8 @@ public function postAutoscalerSettings( private function postAutoscalerSettingsWithHttpInfo( string $projectId, string $environmentId, - ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null - ): \Upsun\Model\AutoscalerSettings { + ?AutoscalerSettings $autoscalerSettings = null + ): AutoscalerSettings { $request = $this->postAutoscalerSettingsRequest( $projectId, $environmentId, @@ -505,9 +501,8 @@ private function postAutoscalerSettingsWithHttpInfo( private function postAutoscalerSettingsRequest( string $projectId, string $environmentId, - ?\Upsun\Model\AutoscalerSettings $autoscalerSettings = null + ?AutoscalerSettings $autoscalerSettings = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -549,7 +544,6 @@ private function postAutoscalerSettingsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/BlackfireMonitoringApi.php b/src/Api/BlackfireMonitoringApi.php index a35fbc5b9..f0bbe5ac7 100644 --- a/src/Api/BlackfireMonitoringApi.php +++ b/src/Api/BlackfireMonitoringApi.php @@ -210,7 +210,6 @@ private function blackfirePhpServerCachesRequest( ?string $instancesMode = null, ?string $distributionCost = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -219,8 +218,6 @@ private function blackfirePhpServerCachesRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfirePhpServerCaches, @@ -236,8 +233,6 @@ private function blackfirePhpServerCachesRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfirePhpServerCaches, @@ -280,8 +275,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -295,8 +288,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -310,8 +301,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -325,8 +314,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -340,8 +327,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -355,8 +340,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -370,8 +353,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -385,8 +366,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -400,8 +379,6 @@ private function blackfirePhpServerCachesRequest( } } - - // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -415,8 +392,6 @@ private function blackfirePhpServerCachesRequest( } } - - // path params if ($projectId !== null) { @@ -436,7 +411,6 @@ private function blackfirePhpServerCachesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -662,7 +636,6 @@ private function blackfireServerGlobalRequest( ?string $instancesMode = null, ?string $distributionCost = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -671,8 +644,6 @@ private function blackfireServerGlobalRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerGlobal, @@ -688,8 +659,6 @@ private function blackfireServerGlobalRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerGlobal, @@ -739,8 +708,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -754,8 +721,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($keys !== null) { if ('form' === 'form' && is_array($keys)) { @@ -769,8 +734,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -784,8 +747,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -799,8 +760,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -814,8 +773,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -829,8 +786,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -844,8 +799,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -859,8 +812,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -874,8 +825,6 @@ private function blackfireServerGlobalRequest( } } - - // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -889,8 +838,6 @@ private function blackfireServerGlobalRequest( } } - - // path params if ($projectId !== null) { @@ -910,7 +857,6 @@ private function blackfireServerGlobalRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1312,7 +1258,6 @@ private function blackfireServerTopSpansRequest( ?string $ossMode = null, ?string $distributionCost = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1321,8 +1266,6 @@ private function blackfireServerTopSpansRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerTopSpans, @@ -1338,8 +1281,6 @@ private function blackfireServerTopSpansRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerTopSpans, @@ -1382,8 +1323,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1397,8 +1336,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -1412,8 +1349,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1427,8 +1362,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -1442,8 +1375,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -1457,8 +1388,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -1472,8 +1401,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -1487,8 +1414,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -1502,8 +1427,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -1517,8 +1440,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($transactions !== null) { if ('form' === 'form' && is_array($transactions)) { @@ -1532,8 +1453,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($transactionsMode !== null) { if ('form' === 'form' && is_array($transactionsMode)) { @@ -1547,8 +1466,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($wtSlots !== null) { if ('form' === 'form' && is_array($wtSlots)) { @@ -1562,8 +1479,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($wtSlotsMode !== null) { if ('form' === 'form' && is_array($wtSlotsMode)) { @@ -1577,8 +1492,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($pmuSlots !== null) { if ('form' === 'form' && is_array($pmuSlots)) { @@ -1592,8 +1505,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($pmuSlotsMode !== null) { if ('form' === 'form' && is_array($pmuSlotsMode)) { @@ -1607,8 +1518,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($httpStatusCodes !== null) { if ('form' === 'form' && is_array($httpStatusCodes)) { @@ -1622,8 +1531,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($httpStatusCodesMode !== null) { if ('form' === 'form' && is_array($httpStatusCodesMode)) { @@ -1637,8 +1544,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($httpHosts !== null) { if ('form' === 'form' && is_array($httpHosts)) { @@ -1652,8 +1557,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($httpHostsMode !== null) { if ('form' === 'form' && is_array($httpHostsMode)) { @@ -1667,8 +1570,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($hosts !== null) { if ('form' === 'form' && is_array($hosts)) { @@ -1682,8 +1583,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($hostsMode !== null) { if ('form' === 'form' && is_array($hostsMode)) { @@ -1697,8 +1596,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($frameworks !== null) { if ('form' === 'form' && is_array($frameworks)) { @@ -1712,8 +1609,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($frameworksMode !== null) { if ('form' === 'form' && is_array($frameworksMode)) { @@ -1727,8 +1622,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($languages !== null) { if ('form' === 'form' && is_array($languages)) { @@ -1742,8 +1635,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($languagesMode !== null) { if ('form' === 'form' && is_array($languagesMode)) { @@ -1757,8 +1648,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -1772,8 +1661,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -1787,8 +1674,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($runtimes !== null) { if ('form' === 'form' && is_array($runtimes)) { @@ -1802,8 +1687,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($runtimesMode !== null) { if ('form' === 'form' && is_array($runtimesMode)) { @@ -1817,8 +1700,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($oss !== null) { if ('form' === 'form' && is_array($oss)) { @@ -1832,8 +1713,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($ossMode !== null) { if ('form' === 'form' && is_array($ossMode)) { @@ -1847,8 +1726,6 @@ private function blackfireServerTopSpansRequest( } } - - // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -1862,8 +1739,6 @@ private function blackfireServerTopSpansRequest( } } - - // path params if ($projectId !== null) { @@ -1883,7 +1758,6 @@ private function blackfireServerTopSpansRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2302,7 +2176,6 @@ private function blackfireServerTransactionsBreakdownRequest( ?string $ossMode = null, ?string $distributionCost = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2311,8 +2184,6 @@ private function blackfireServerTransactionsBreakdownRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, @@ -2328,8 +2199,6 @@ private function blackfireServerTransactionsBreakdownRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireMonitoringApi.blackfireServerTransactionsBreakdown, @@ -2366,8 +2235,6 @@ private function blackfireServerTransactionsBreakdownRequest( ); } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down'; $formParams = []; $queryParams = []; @@ -2388,8 +2255,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -2403,8 +2268,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($grain !== null) { if ('form' === 'form' && is_array($grain)) { @@ -2418,8 +2281,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($breakdownDimension !== null) { if ('form' === 'form' && is_array($breakdownDimension)) { @@ -2433,8 +2294,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -2448,8 +2307,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($breakdownLimit !== null) { if ('form' === 'form' && is_array($breakdownLimit)) { @@ -2463,8 +2320,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($contexts !== null) { if ('form' === 'form' && is_array($contexts)) { @@ -2478,8 +2333,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($contextsMode !== null) { if ('form' === 'form' && is_array($contextsMode)) { @@ -2493,8 +2346,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -2508,8 +2359,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -2523,8 +2372,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($instances !== null) { if ('form' === 'form' && is_array($instances)) { @@ -2538,8 +2385,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($instancesMode !== null) { if ('form' === 'form' && is_array($instancesMode)) { @@ -2553,8 +2398,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($transactions !== null) { if ('form' === 'form' && is_array($transactions)) { @@ -2568,8 +2411,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($transactionsMode !== null) { if ('form' === 'form' && is_array($transactionsMode)) { @@ -2583,8 +2424,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($wtSlots !== null) { if ('form' === 'form' && is_array($wtSlots)) { @@ -2598,8 +2437,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($wtSlotsMode !== null) { if ('form' === 'form' && is_array($wtSlotsMode)) { @@ -2613,8 +2450,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($pmuSlots !== null) { if ('form' === 'form' && is_array($pmuSlots)) { @@ -2628,8 +2463,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($pmuSlotsMode !== null) { if ('form' === 'form' && is_array($pmuSlotsMode)) { @@ -2643,8 +2476,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($httpStatusCodes !== null) { if ('form' === 'form' && is_array($httpStatusCodes)) { @@ -2658,8 +2489,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($httpStatusCodesMode !== null) { if ('form' === 'form' && is_array($httpStatusCodesMode)) { @@ -2673,8 +2502,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($httpHosts !== null) { if ('form' === 'form' && is_array($httpHosts)) { @@ -2688,8 +2515,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($httpHostsMode !== null) { if ('form' === 'form' && is_array($httpHostsMode)) { @@ -2703,8 +2528,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($hosts !== null) { if ('form' === 'form' && is_array($hosts)) { @@ -2718,8 +2541,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($hostsMode !== null) { if ('form' === 'form' && is_array($hostsMode)) { @@ -2733,8 +2554,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($frameworks !== null) { if ('form' === 'form' && is_array($frameworks)) { @@ -2748,8 +2567,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($frameworksMode !== null) { if ('form' === 'form' && is_array($frameworksMode)) { @@ -2763,8 +2580,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($languages !== null) { if ('form' === 'form' && is_array($languages)) { @@ -2778,8 +2593,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($languagesMode !== null) { if ('form' === 'form' && is_array($languagesMode)) { @@ -2793,8 +2606,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -2808,8 +2619,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -2823,8 +2632,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($runtimes !== null) { if ('form' === 'form' && is_array($runtimes)) { @@ -2838,8 +2645,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($runtimesMode !== null) { if ('form' === 'form' && is_array($runtimesMode)) { @@ -2853,8 +2658,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($oss !== null) { if ('form' === 'form' && is_array($oss)) { @@ -2868,8 +2671,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($ossMode !== null) { if ('form' === 'form' && is_array($ossMode)) { @@ -2883,8 +2684,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // query params if ($distributionCost !== null) { if ('form' === 'form' && is_array($distributionCost)) { @@ -2898,8 +2697,6 @@ private function blackfireServerTransactionsBreakdownRequest( } } - - // path params if ($projectId !== null) { @@ -2919,7 +2716,6 @@ private function blackfireServerTransactionsBreakdownRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/BlackfireProfilingApi.php b/src/Api/BlackfireProfilingApi.php index d74ae7240..2c6a75b09 100644 --- a/src/Api/BlackfireProfilingApi.php +++ b/src/Api/BlackfireProfilingApi.php @@ -13,6 +13,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\FilterSelect; /** * Low level BlackfireProfilingApi (auto-generated) @@ -135,7 +136,6 @@ private function blackfireProfileGraphRequest( string $environmentId, string $uuid ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -144,8 +144,6 @@ private function blackfireProfileGraphRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileGraph, @@ -161,8 +159,6 @@ private function blackfireProfileGraphRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileGraph, @@ -178,8 +174,6 @@ private function blackfireProfileGraphRequest( ); } - - if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileGraph, @@ -187,7 +181,6 @@ private function blackfireProfileGraphRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/graph'; $formParams = []; $queryParams = []; @@ -223,7 +216,6 @@ private function blackfireProfileGraphRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -367,7 +359,6 @@ private function blackfireProfileProfileRequest( string $environmentId, string $uuid ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -376,8 +367,6 @@ private function blackfireProfileProfileRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileProfile, @@ -393,8 +382,6 @@ private function blackfireProfileProfileRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileProfile, @@ -410,8 +397,6 @@ private function blackfireProfileProfileRequest( ); } - - if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileProfile, @@ -419,7 +404,6 @@ private function blackfireProfileProfileRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/profile'; $formParams = []; $queryParams = []; @@ -455,7 +439,6 @@ private function blackfireProfileProfileRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -599,7 +582,6 @@ private function blackfireProfileSubprofilesRequest( string $environmentId, string $uuid ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -608,8 +590,6 @@ private function blackfireProfileSubprofilesRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, @@ -625,8 +605,6 @@ private function blackfireProfileSubprofilesRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, @@ -642,8 +620,6 @@ private function blackfireProfileSubprofilesRequest( ); } - - if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileSubprofiles, @@ -651,7 +627,6 @@ private function blackfireProfileSubprofilesRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/subprofiles'; $formParams = []; $queryParams = []; @@ -687,7 +662,6 @@ private function blackfireProfileSubprofilesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -831,7 +805,6 @@ private function blackfireProfileTimelineRequest( string $environmentId, string $uuid ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -840,8 +813,6 @@ private function blackfireProfileTimelineRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfileTimeline, @@ -857,8 +828,6 @@ private function blackfireProfileTimelineRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfileTimeline, @@ -874,8 +843,6 @@ private function blackfireProfileTimelineRequest( ); } - - if (!preg_match("/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/", $uuid)) { throw new InvalidArgumentException( "invalid value for \"uuid\" when calling BlackfireProfilingApi.blackfireProfileTimeline, @@ -883,7 +850,6 @@ private function blackfireProfileTimelineRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/timeline'; $formParams = []; $queryParams = []; @@ -919,7 +885,6 @@ private function blackfireProfileTimelineRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -992,8 +957,8 @@ private function blackfireProfileTimelineRequest( * @param string|null $isPublic (optional) * @param string|null $sortBy (optional) * @param string|null $sortOrder (optional) - * @param \DateTime|null $startDate (optional) - * @param \DateTime|null $endDate (optional) + * @param DateTime|null $startDate (optional) + * @param DateTime|null $endDate (optional) * @param int|null $statusCode (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1011,12 +976,12 @@ public function blackfireProfilesList( ?string $isPublic = null, ?string $sortBy = null, ?string $sortOrder = null, - ?\DateTime $startDate = null, - ?\DateTime $endDate = null, + ?DateTime $startDate = null, + ?DateTime $endDate = null, ?int $statusCode = null, - ?\Upsun\Model\FilterSelect $owner = null, - ?\Upsun\Model\FilterSelect $languages = null, - ?\Upsun\Model\FilterSelect $frameworks = null, + ?FilterSelect $owner = null, + ?FilterSelect $languages = null, + ?FilterSelect $frameworks = null, ?int $itemsPerPage = null ): mixed { return $this->blackfireProfilesListWithHttpInfo( @@ -1053,8 +1018,8 @@ public function blackfireProfilesList( * @param string|null $isPublic (optional) * @param string|null $sortBy (optional) * @param string|null $sortOrder (optional) - * @param \DateTime|null $startDate (optional) - * @param \DateTime|null $endDate (optional) + * @param DateTime|null $startDate (optional) + * @param DateTime|null $endDate (optional) * @param int|null $statusCode (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format @@ -1071,12 +1036,12 @@ private function blackfireProfilesListWithHttpInfo( ?string $isPublic = null, ?string $sortBy = null, ?string $sortOrder = null, - ?\DateTime $startDate = null, - ?\DateTime $endDate = null, + ?DateTime $startDate = null, + ?DateTime $endDate = null, ?int $statusCode = null, - ?\Upsun\Model\FilterSelect $owner = null, - ?\Upsun\Model\FilterSelect $languages = null, - ?\Upsun\Model\FilterSelect $frameworks = null, + ?FilterSelect $owner = null, + ?FilterSelect $languages = null, + ?FilterSelect $frameworks = null, ?int $itemsPerPage = null ): mixed { $request = $this->blackfireProfilesListRequest( @@ -1139,8 +1104,8 @@ private function blackfireProfilesListWithHttpInfo( * @param string|null $isPublic (optional) * @param string|null $sortBy (optional) * @param string|null $sortOrder (optional) - * @param \DateTime|null $startDate (optional) - * @param \DateTime|null $endDate (optional) + * @param DateTime|null $startDate (optional) + * @param DateTime|null $endDate (optional) * @param int|null $statusCode (optional) * * @throws InvalidArgumentException @@ -1156,15 +1121,14 @@ private function blackfireProfilesListRequest( ?string $isPublic = null, ?string $sortBy = null, ?string $sortOrder = null, - ?\DateTime $startDate = null, - ?\DateTime $endDate = null, + ?DateTime $startDate = null, + ?DateTime $endDate = null, ?int $statusCode = null, - ?\Upsun\Model\FilterSelect $owner = null, - ?\Upsun\Model\FilterSelect $languages = null, - ?\Upsun\Model\FilterSelect $frameworks = null, + ?FilterSelect $owner = null, + ?FilterSelect $languages = null, + ?FilterSelect $frameworks = null, ?int $itemsPerPage = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1173,8 +1137,6 @@ private function blackfireProfilesListRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1190,8 +1152,6 @@ private function blackfireProfilesListRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1199,8 +1159,6 @@ private function blackfireProfilesListRequest( ); } - - if ($page !== null && $page < 1) { throw new InvalidArgumentException( 'invalid value for "$page" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1208,8 +1166,6 @@ private function blackfireProfilesListRequest( ); } - - if ($limit !== null && $limit > 100) { throw new InvalidArgumentException( 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1224,8 +1180,6 @@ private function blackfireProfilesListRequest( ); } - - if ($itemsPerPage !== null && $itemsPerPage > 100) { throw new InvalidArgumentException( 'invalid value for "$itemsPerPage" when calling BlackfireProfilingApi.blackfireProfilesList, @@ -1240,8 +1194,6 @@ private function blackfireProfilesListRequest( ); } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles'; $formParams = []; $queryParams = []; @@ -1262,8 +1214,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -1277,8 +1227,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -1292,8 +1240,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($url !== null) { if ('form' === 'form' && is_array($url)) { @@ -1307,8 +1253,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($isAuto !== null) { if ('form' === 'form' && is_array($isAuto)) { @@ -1322,8 +1266,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($isPublic !== null) { if ('form' === 'form' && is_array($isPublic)) { @@ -1337,8 +1279,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($sortBy !== null) { if ('form' === 'form' && is_array($sortBy)) { @@ -1352,8 +1292,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($sortOrder !== null) { if ('form' === 'form' && is_array($sortOrder)) { @@ -1367,8 +1305,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($startDate !== null) { if ('form' === 'form' && is_array($startDate)) { @@ -1382,8 +1318,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($endDate !== null) { if ('form' === 'form' && is_array($endDate)) { @@ -1397,8 +1331,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($statusCode !== null) { if ('form' === 'form' && is_array($statusCode)) { @@ -1412,8 +1344,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($owner !== null) { if ('form' === 'form' && is_array($owner)) { @@ -1427,8 +1357,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($languages !== null) { if ('form' === 'form' && is_array($languages)) { @@ -1442,8 +1370,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($frameworks !== null) { if ('form' === 'form' && is_array($frameworks)) { @@ -1457,8 +1383,6 @@ private function blackfireProfilesListRequest( } } - - // query params if ($itemsPerPage !== null) { if ('form' === 'form' && is_array($itemsPerPage)) { @@ -1472,8 +1396,6 @@ private function blackfireProfilesListRequest( } } - - // path params if ($projectId !== null) { @@ -1493,7 +1415,6 @@ private function blackfireProfilesListRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1663,7 +1584,6 @@ private function blackfireProfilesRecommendationsRequest( ?string $transaction = null, ?int $limit = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1672,8 +1592,6 @@ private function blackfireProfilesRecommendationsRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, @@ -1689,8 +1607,6 @@ private function blackfireProfilesRecommendationsRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, @@ -1698,7 +1614,6 @@ private function blackfireProfilesRecommendationsRequest( ); } - if ($limit !== null && $limit > 200) { throw new InvalidArgumentException( 'invalid value for "$limit" when calling BlackfireProfilingApi.blackfireProfilesRecommendations, @@ -1713,8 +1628,6 @@ private function blackfireProfilesRecommendationsRequest( ); } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/profiles/recommendations'; $formParams = []; $queryParams = []; @@ -1735,8 +1648,6 @@ private function blackfireProfilesRecommendationsRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1750,8 +1661,6 @@ private function blackfireProfilesRecommendationsRequest( } } - - // query params if ($transaction !== null) { if ('form' === 'form' && is_array($transaction)) { @@ -1765,8 +1674,6 @@ private function blackfireProfilesRecommendationsRequest( } } - - // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -1780,8 +1687,6 @@ private function blackfireProfilesRecommendationsRequest( } } - - // path params if ($projectId !== null) { @@ -1801,7 +1706,6 @@ private function blackfireProfilesRecommendationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/CertManagementApi.php b/src/Api/CertManagementApi.php index b348a8526..39f97514f 100644 --- a/src/Api/CertManagementApi.php +++ b/src/Api/CertManagementApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,12 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Certificate; +use Upsun\Model\CertificateCreateInput; +use Upsun\Model\CertificatePatch; +use Upsun\Model\CertificateProvisioner; +use Upsun\Model\CertificateProvisionerPatch; /** * Low level CertManagementApi (auto-generated) @@ -61,8 +66,8 @@ public function __construct( */ public function createProjectsCertificates( string $projectId, - \Upsun\Model\CertificateCreateInput $certificateCreateInput - ): \Upsun\Model\AcceptedResponse { + CertificateCreateInput $certificateCreateInput + ): AcceptedResponse { return $this->createProjectsCertificatesWithHttpInfo( $projectId, $certificateCreateInput @@ -79,8 +84,8 @@ public function createProjectsCertificates( */ private function createProjectsCertificatesWithHttpInfo( string $projectId, - \Upsun\Model\CertificateCreateInput $certificateCreateInput - ): \Upsun\Model\AcceptedResponse { + CertificateCreateInput $certificateCreateInput + ): AcceptedResponse { $request = $this->createProjectsCertificatesRequest( $projectId, $certificateCreateInput @@ -122,9 +127,8 @@ private function createProjectsCertificatesWithHttpInfo( */ private function createProjectsCertificatesRequest( string $projectId, - \Upsun\Model\CertificateCreateInput $certificateCreateInput + CertificateCreateInput $certificateCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -157,7 +161,6 @@ private function createProjectsCertificatesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -235,7 +238,7 @@ private function createProjectsCertificatesRequest( public function deleteProjectsCertificates( string $projectId, string $certificateId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsCertificatesWithHttpInfo( $projectId, $certificateId @@ -252,7 +255,7 @@ public function deleteProjectsCertificates( private function deleteProjectsCertificatesWithHttpInfo( string $projectId, string $certificateId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsCertificatesRequest( $projectId, $certificateId @@ -295,7 +298,6 @@ private function deleteProjectsCertificatesRequest( string $projectId, string $certificateId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -337,7 +339,6 @@ private function deleteProjectsCertificatesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -407,7 +408,7 @@ private function deleteProjectsCertificatesRequest( public function getProjectsCertificates( string $projectId, string $certificateId - ): \Upsun\Model\Certificate { + ): Certificate { return $this->getProjectsCertificatesWithHttpInfo( $projectId, $certificateId @@ -424,7 +425,7 @@ public function getProjectsCertificates( private function getProjectsCertificatesWithHttpInfo( string $projectId, string $certificateId - ): \Upsun\Model\Certificate { + ): Certificate { $request = $this->getProjectsCertificatesRequest( $projectId, $certificateId @@ -467,7 +468,6 @@ private function getProjectsCertificatesRequest( string $projectId, string $certificateId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -509,7 +509,6 @@ private function getProjectsCertificatesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -576,7 +575,7 @@ private function getProjectsCertificatesRequest( public function getProjectsProvisioners( string $projectId, string $certificateProvisionerDocumentId - ): \Upsun\Model\CertificateProvisioner { + ): CertificateProvisioner { return $this->getProjectsProvisionersWithHttpInfo( $projectId, $certificateProvisionerDocumentId @@ -592,7 +591,7 @@ public function getProjectsProvisioners( private function getProjectsProvisionersWithHttpInfo( string $projectId, string $certificateProvisionerDocumentId - ): \Upsun\Model\CertificateProvisioner { + ): CertificateProvisioner { $request = $this->getProjectsProvisionersRequest( $projectId, $certificateProvisionerDocumentId @@ -635,7 +634,6 @@ private function getProjectsProvisionersRequest( string $projectId, string $certificateProvisionerDocumentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -677,7 +675,6 @@ private function getProjectsProvisionersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -806,7 +803,6 @@ private function listProjectsCertificatesWithHttpInfo( private function listProjectsCertificatesRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -832,7 +828,6 @@ private function listProjectsCertificatesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -957,7 +952,6 @@ private function listProjectsProvisionersWithHttpInfo( private function listProjectsProvisionersRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -983,7 +977,6 @@ private function listProjectsProvisionersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1054,8 +1047,8 @@ private function listProjectsProvisionersRequest( public function updateProjectsCertificates( string $projectId, string $certificateId, - \Upsun\Model\CertificatePatch $certificatePatch - ): \Upsun\Model\AcceptedResponse { + CertificatePatch $certificatePatch + ): AcceptedResponse { return $this->updateProjectsCertificatesWithHttpInfo( $projectId, $certificateId, @@ -1074,8 +1067,8 @@ public function updateProjectsCertificates( private function updateProjectsCertificatesWithHttpInfo( string $projectId, string $certificateId, - \Upsun\Model\CertificatePatch $certificatePatch - ): \Upsun\Model\AcceptedResponse { + CertificatePatch $certificatePatch + ): AcceptedResponse { $request = $this->updateProjectsCertificatesRequest( $projectId, $certificateId, @@ -1119,9 +1112,8 @@ private function updateProjectsCertificatesWithHttpInfo( private function updateProjectsCertificatesRequest( string $projectId, string $certificateId, - \Upsun\Model\CertificatePatch $certificatePatch + CertificatePatch $certificatePatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1170,7 +1162,6 @@ private function updateProjectsCertificatesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1246,8 +1237,8 @@ private function updateProjectsCertificatesRequest( public function updateProjectsProvisioners( string $projectId, string $certificateProvisionerDocumentId, - \Upsun\Model\CertificateProvisionerPatch $certificateProvisionerPatch - ): \Upsun\Model\AcceptedResponse { + CertificateProvisionerPatch $certificateProvisionerPatch + ): AcceptedResponse { return $this->updateProjectsProvisionersWithHttpInfo( $projectId, $certificateProvisionerDocumentId, @@ -1265,8 +1256,8 @@ public function updateProjectsProvisioners( private function updateProjectsProvisionersWithHttpInfo( string $projectId, string $certificateProvisionerDocumentId, - \Upsun\Model\CertificateProvisionerPatch $certificateProvisionerPatch - ): \Upsun\Model\AcceptedResponse { + CertificateProvisionerPatch $certificateProvisionerPatch + ): AcceptedResponse { $request = $this->updateProjectsProvisionersRequest( $projectId, $certificateProvisionerDocumentId, @@ -1310,9 +1301,8 @@ private function updateProjectsProvisionersWithHttpInfo( private function updateProjectsProvisionersRequest( string $projectId, string $certificateProvisionerDocumentId, - \Upsun\Model\CertificateProvisionerPatch $certificateProvisionerPatch + CertificateProvisionerPatch $certificateProvisionerPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1361,7 +1351,6 @@ private function updateProjectsProvisionersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ConnectionsApi.php b/src/Api/ConnectionsApi.php index 2dc71d970..27abdf011 100644 --- a/src/Api/ConnectionsApi.php +++ b/src/Api/ConnectionsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Connection; /** * Low level ConnectionsApi (auto-generated) @@ -124,7 +124,6 @@ private function deleteLoginConnectionRequest( string $provider, string $userId ): RequestInterface { - // verify the required parameter 'provider' is set if (empty($provider)) { throw new InvalidArgumentException( @@ -166,7 +165,6 @@ private function deleteLoginConnectionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -239,7 +237,7 @@ private function deleteLoginConnectionRequest( public function getLoginConnection( string $provider, string $userId - ): \Upsun\Model\Connection { + ): Connection { return $this->getLoginConnectionWithHttpInfo( $provider, $userId @@ -259,7 +257,7 @@ public function getLoginConnection( private function getLoginConnectionWithHttpInfo( string $provider, string $userId - ): \Upsun\Model\Connection { + ): Connection { $request = $this->getLoginConnectionRequest( $provider, $userId @@ -305,7 +303,6 @@ private function getLoginConnectionRequest( string $provider, string $userId ): RequestInterface { - // verify the required parameter 'provider' is set if (empty($provider)) { throw new InvalidArgumentException( @@ -347,7 +344,6 @@ private function getLoginConnectionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -482,7 +478,6 @@ private function listLoginConnectionsWithHttpInfo( private function listLoginConnectionsRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -508,7 +503,6 @@ private function listLoginConnectionsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ContinuousProfilingApi.php b/src/Api/ContinuousProfilingApi.php index 1bcc22c3c..e1c2926f5 100644 --- a/src/Api/ContinuousProfilingApi.php +++ b/src/Api/ContinuousProfilingApi.php @@ -342,7 +342,6 @@ private function getApplicationFilterRequest( ?int $probeVersionMode = null, ?array $probeVersion = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -351,8 +350,6 @@ private function getApplicationFilterRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.getApplicationFilter, @@ -368,8 +365,6 @@ private function getApplicationFilterRequest( ); } - - if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.getApplicationFilter, @@ -385,8 +380,6 @@ private function getApplicationFilterRequest( ); } - - if (!preg_match("/.+/", $app)) { throw new InvalidArgumentException( "invalid value for \"app\" when calling ContinuousProfilingApi.getApplicationFilter, @@ -394,7 +387,6 @@ private function getApplicationFilterRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter'; $formParams = []; $queryParams = []; @@ -415,8 +407,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -430,8 +420,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($profileType !== null) { if ('form' === 'form' && is_array($profileType)) { @@ -445,8 +433,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtimeMode !== null) { if ('form' === 'form' && is_array($runtimeMode)) { @@ -460,8 +446,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtime !== null) { if ('form' === 'form' && is_array($runtime)) { @@ -475,8 +459,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtimeVersionMode !== null) { if ('form' === 'form' && is_array($runtimeVersionMode)) { @@ -490,8 +472,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtimeVersion !== null) { if ('form' === 'form' && is_array($runtimeVersion)) { @@ -505,8 +485,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtimeArchMode !== null) { if ('form' === 'form' && is_array($runtimeArchMode)) { @@ -520,8 +498,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtimeArch !== null) { if ('form' === 'form' && is_array($runtimeArch)) { @@ -535,8 +511,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtimeOsMode !== null) { if ('form' === 'form' && is_array($runtimeOsMode)) { @@ -550,8 +524,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($runtimeOs !== null) { if ('form' === 'form' && is_array($runtimeOs)) { @@ -565,8 +537,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($probeVersionMode !== null) { if ('form' === 'form' && is_array($probeVersionMode)) { @@ -580,8 +550,6 @@ private function getApplicationFilterRequest( } } - - // query params if ($probeVersion !== null) { if ('form' === 'form' && is_array($probeVersion)) { @@ -595,8 +563,6 @@ private function getApplicationFilterRequest( } } - - // path params if ($projectId !== null) { @@ -625,7 +591,6 @@ private function getApplicationFilterRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -985,7 +950,6 @@ private function getApplicationMergeRequest( ?int $probeVersionMode = null, ?array $probeVersion = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -994,8 +958,6 @@ private function getApplicationMergeRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.getApplicationMerge, @@ -1011,8 +973,6 @@ private function getApplicationMergeRequest( ); } - - if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.getApplicationMerge, @@ -1028,8 +988,6 @@ private function getApplicationMergeRequest( ); } - - if (!preg_match("/.+/", $app)) { throw new InvalidArgumentException( "invalid value for \"app\" when calling ContinuousProfilingApi.getApplicationMerge, @@ -1037,7 +995,6 @@ private function getApplicationMergeRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/merge'; $formParams = []; $queryParams = []; @@ -1058,8 +1015,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1073,8 +1028,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($profileType !== null) { if ('form' === 'form' && is_array($profileType)) { @@ -1088,8 +1041,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($out !== null) { if ('form' === 'form' && is_array($out)) { @@ -1103,8 +1054,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtimeMode !== null) { if ('form' === 'form' && is_array($runtimeMode)) { @@ -1118,8 +1067,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtime !== null) { if ('form' === 'form' && is_array($runtime)) { @@ -1133,8 +1080,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtimeVersionMode !== null) { if ('form' === 'form' && is_array($runtimeVersionMode)) { @@ -1148,8 +1093,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtimeVersion !== null) { if ('form' === 'form' && is_array($runtimeVersion)) { @@ -1163,8 +1106,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtimeArchMode !== null) { if ('form' === 'form' && is_array($runtimeArchMode)) { @@ -1178,8 +1119,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtimeArch !== null) { if ('form' === 'form' && is_array($runtimeArch)) { @@ -1193,8 +1132,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtimeOsMode !== null) { if ('form' === 'form' && is_array($runtimeOsMode)) { @@ -1208,8 +1145,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($runtimeOs !== null) { if ('form' === 'form' && is_array($runtimeOs)) { @@ -1223,8 +1158,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($probeVersionMode !== null) { if ('form' === 'form' && is_array($probeVersionMode)) { @@ -1238,8 +1171,6 @@ private function getApplicationMergeRequest( } } - - // query params if ($probeVersion !== null) { if ('form' === 'form' && is_array($probeVersion)) { @@ -1253,8 +1184,6 @@ private function getApplicationMergeRequest( } } - - // path params if ($projectId !== null) { @@ -1283,7 +1212,6 @@ private function getApplicationMergeRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/octet-stream', 'text/vnd.graphviz', 'application/json'], '', @@ -1635,7 +1563,6 @@ private function getApplicationTimelineRequest( ?int $probeVersionMode = null, ?array $probeVersion = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1644,8 +1571,6 @@ private function getApplicationTimelineRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.getApplicationTimeline, @@ -1661,8 +1586,6 @@ private function getApplicationTimelineRequest( ); } - - if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.getApplicationTimeline, @@ -1678,8 +1601,6 @@ private function getApplicationTimelineRequest( ); } - - if (!preg_match("/.+/", $app)) { throw new InvalidArgumentException( "invalid value for \"app\" when calling ContinuousProfilingApi.getApplicationTimeline, @@ -1687,7 +1608,6 @@ private function getApplicationTimelineRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}'; $formParams = []; $queryParams = []; @@ -1708,8 +1628,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1723,8 +1641,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($profileType !== null) { if ('form' === 'form' && is_array($profileType)) { @@ -1738,8 +1654,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtimeMode !== null) { if ('form' === 'form' && is_array($runtimeMode)) { @@ -1753,8 +1667,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtime !== null) { if ('form' === 'form' && is_array($runtime)) { @@ -1768,8 +1680,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtimeVersionMode !== null) { if ('form' === 'form' && is_array($runtimeVersionMode)) { @@ -1783,8 +1693,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtimeVersion !== null) { if ('form' === 'form' && is_array($runtimeVersion)) { @@ -1798,8 +1706,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtimeArchMode !== null) { if ('form' === 'form' && is_array($runtimeArchMode)) { @@ -1813,8 +1719,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtimeArch !== null) { if ('form' === 'form' && is_array($runtimeArch)) { @@ -1828,8 +1732,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtimeOsMode !== null) { if ('form' === 'form' && is_array($runtimeOsMode)) { @@ -1843,8 +1745,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($runtimeOs !== null) { if ('form' === 'form' && is_array($runtimeOs)) { @@ -1858,8 +1758,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($probeVersionMode !== null) { if ('form' === 'form' && is_array($probeVersionMode)) { @@ -1873,8 +1771,6 @@ private function getApplicationTimelineRequest( } } - - // query params if ($probeVersion !== null) { if ('form' === 'form' && is_array($probeVersion)) { @@ -1888,8 +1784,6 @@ private function getApplicationTimelineRequest( } } - - // path params if ($projectId !== null) { @@ -1918,7 +1812,6 @@ private function getApplicationTimelineRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2072,7 +1965,6 @@ private function listApplicationsRequest( ?int $from = null, ?int $to = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2081,8 +1973,6 @@ private function listApplicationsRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ContinuousProfilingApi.listApplications, @@ -2098,8 +1988,6 @@ private function listApplicationsRequest( ); } - - if (!preg_match("/.+/", $envId)) { throw new InvalidArgumentException( "invalid value for \"envId\" when calling ContinuousProfilingApi.listApplications, @@ -2107,7 +1995,6 @@ private function listApplicationsRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{envId}/continuous-profiling'; $formParams = []; $queryParams = []; @@ -2128,8 +2015,6 @@ private function listApplicationsRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -2143,8 +2028,6 @@ private function listApplicationsRequest( } } - - // path params if ($projectId !== null) { @@ -2164,7 +2047,6 @@ private function listApplicationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/DefaultApi.php b/src/Api/DefaultApi.php index 12d22e85c..e544f9343 100644 --- a/src/Api/DefaultApi.php +++ b/src/Api/DefaultApi.php @@ -13,6 +13,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\DateTimeFilter; +use Upsun\Model\ListTickets200Response; +use Upsun\Model\OrganizationCarbon; /** * Low level DefaultApi (auto-generated) @@ -54,9 +57,9 @@ public function __construct( * * @param int|null $filterTicketId * The ID of the ticket. (optional) - * @param \DateTime|null $filterCreated + * @param DateTime|null $filterCreated * ISO dateformat expected. The time when the support ticket was created. (optional) - * @param \DateTime|null $filterUpdated + * @param DateTime|null $filterUpdated * ISO dateformat expected. The time when the support ticket was updated. (optional) * @param string|null $filterType * The type of the support ticket. (optional) @@ -72,7 +75,7 @@ public function __construct( * UUID of the ticket assignee. Converted from the ZID value. (optional) * @param bool|null $filterHasIncidents * Whether or not this ticket has incidents. (optional) - * @param \DateTime|null $filterDue + * @param DateTime|null $filterDue * ISO dateformat expected. A time that the ticket is due at. (optional) * @param string|null $search (optional) * @param int|null $page @@ -84,8 +87,8 @@ public function __construct( */ public function listTickets( ?int $filterTicketId = null, - ?\DateTime $filterCreated = null, - ?\DateTime $filterUpdated = null, + ?DateTime $filterCreated = null, + ?DateTime $filterUpdated = null, ?string $filterType = null, ?string $filterPriority = null, ?string $filterStatus = null, @@ -93,10 +96,10 @@ public function listTickets( ?string $filterSubmitterId = null, ?string $filterAssigneeId = null, ?bool $filterHasIncidents = null, - ?\DateTime $filterDue = null, + ?DateTime $filterDue = null, ?string $search = null, ?int $page = null - ): \Upsun\Model\ListTickets200Response { + ): ListTickets200Response { return $this->listTicketsWithHttpInfo( $filterTicketId, $filterCreated, @@ -119,9 +122,9 @@ public function listTickets( * * @param int|null $filterTicketId * The ID of the ticket. (optional) - * @param \DateTime|null $filterCreated + * @param DateTime|null $filterCreated * ISO dateformat expected. The time when the support ticket was created. (optional) - * @param \DateTime|null $filterUpdated + * @param DateTime|null $filterUpdated * ISO dateformat expected. The time when the support ticket was updated. (optional) * @param string|null $filterType * The type of the support ticket. (optional) @@ -137,7 +140,7 @@ public function listTickets( * UUID of the ticket assignee. Converted from the ZID value. (optional) * @param bool|null $filterHasIncidents * Whether or not this ticket has incidents. (optional) - * @param \DateTime|null $filterDue + * @param DateTime|null $filterDue * ISO dateformat expected. A time that the ticket is due at. (optional) * @param string|null $search (optional) * @param int|null $page @@ -148,8 +151,8 @@ public function listTickets( */ private function listTicketsWithHttpInfo( ?int $filterTicketId = null, - ?\DateTime $filterCreated = null, - ?\DateTime $filterUpdated = null, + ?DateTime $filterCreated = null, + ?DateTime $filterUpdated = null, ?string $filterType = null, ?string $filterPriority = null, ?string $filterStatus = null, @@ -157,10 +160,10 @@ private function listTicketsWithHttpInfo( ?string $filterSubmitterId = null, ?string $filterAssigneeId = null, ?bool $filterHasIncidents = null, - ?\DateTime $filterDue = null, + ?DateTime $filterDue = null, ?string $search = null, ?int $page = null - ): \Upsun\Model\ListTickets200Response { + ): ListTickets200Response { $request = $this->listTicketsRequest( $filterTicketId, $filterCreated, @@ -209,9 +212,9 @@ private function listTicketsWithHttpInfo( * * @param int|null $filterTicketId * The ID of the ticket. (optional) - * @param \DateTime|null $filterCreated + * @param DateTime|null $filterCreated * ISO dateformat expected. The time when the support ticket was created. (optional) - * @param \DateTime|null $filterUpdated + * @param DateTime|null $filterUpdated * ISO dateformat expected. The time when the support ticket was updated. (optional) * @param string|null $filterType * The type of the support ticket. (optional) @@ -227,7 +230,7 @@ private function listTicketsWithHttpInfo( * UUID of the ticket assignee. Converted from the ZID value. (optional) * @param bool|null $filterHasIncidents * Whether or not this ticket has incidents. (optional) - * @param \DateTime|null $filterDue + * @param DateTime|null $filterDue * ISO dateformat expected. A time that the ticket is due at. (optional) * @param string|null $search (optional) * @param int|null $page @@ -237,8 +240,8 @@ private function listTicketsWithHttpInfo( */ private function listTicketsRequest( ?int $filterTicketId = null, - ?\DateTime $filterCreated = null, - ?\DateTime $filterUpdated = null, + ?DateTime $filterCreated = null, + ?DateTime $filterUpdated = null, ?string $filterType = null, ?string $filterPriority = null, ?string $filterStatus = null, @@ -246,12 +249,10 @@ private function listTicketsRequest( ?string $filterSubmitterId = null, ?string $filterAssigneeId = null, ?bool $filterHasIncidents = null, - ?\DateTime $filterDue = null, + ?DateTime $filterDue = null, ?string $search = null, ?int $page = null ): RequestInterface { - - $resourcePath = '/tickets'; $formParams = []; $queryParams = []; @@ -272,8 +273,6 @@ private function listTicketsRequest( } } - - // query params if ($filterCreated !== null) { if ('form' === 'form' && is_array($filterCreated)) { @@ -287,8 +286,6 @@ private function listTicketsRequest( } } - - // query params if ($filterUpdated !== null) { if ('form' === 'form' && is_array($filterUpdated)) { @@ -302,8 +299,6 @@ private function listTicketsRequest( } } - - // query params if ($filterType !== null) { if ('form' === 'form' && is_array($filterType)) { @@ -317,8 +312,6 @@ private function listTicketsRequest( } } - - // query params if ($filterPriority !== null) { if ('form' === 'form' && is_array($filterPriority)) { @@ -332,8 +325,6 @@ private function listTicketsRequest( } } - - // query params if ($filterStatus !== null) { if ('form' === 'form' && is_array($filterStatus)) { @@ -347,8 +338,6 @@ private function listTicketsRequest( } } - - // query params if ($filterRequesterId !== null) { if ('form' === 'form' && is_array($filterRequesterId)) { @@ -362,8 +351,6 @@ private function listTicketsRequest( } } - - // query params if ($filterSubmitterId !== null) { if ('form' === 'form' && is_array($filterSubmitterId)) { @@ -377,8 +364,6 @@ private function listTicketsRequest( } } - - // query params if ($filterAssigneeId !== null) { if ('form' === 'form' && is_array($filterAssigneeId)) { @@ -392,8 +377,6 @@ private function listTicketsRequest( } } - - // query params if ($filterHasIncidents !== null) { if ('form' === 'form' && is_array($filterHasIncidents)) { @@ -407,8 +390,6 @@ private function listTicketsRequest( } } - - // query params if ($filterDue !== null) { if ('form' === 'form' && is_array($filterDue)) { @@ -422,8 +403,6 @@ private function listTicketsRequest( } } - - // query params if ($search !== null) { if ('form' === 'form' && is_array($search)) { @@ -437,8 +416,6 @@ private function listTicketsRequest( } } - - // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -452,10 +429,6 @@ private function listTicketsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -533,10 +506,10 @@ private function listTicketsRequest( */ public function queryOrganiationCarbon( string $organizationId, - ?\Upsun\Model\DateTimeFilter $from = null, - ?\Upsun\Model\DateTimeFilter $to = null, + ?DateTimeFilter $from = null, + ?DateTimeFilter $to = null, ?string $interval = null - ): \Upsun\Model\OrganizationCarbon { + ): OrganizationCarbon { return $this->queryOrganiationCarbonWithHttpInfo( $organizationId, $from, @@ -563,10 +536,10 @@ public function queryOrganiationCarbon( */ private function queryOrganiationCarbonWithHttpInfo( string $organizationId, - ?\Upsun\Model\DateTimeFilter $from = null, - ?\Upsun\Model\DateTimeFilter $to = null, + ?DateTimeFilter $from = null, + ?DateTimeFilter $to = null, ?string $interval = null - ): \Upsun\Model\OrganizationCarbon { + ): OrganizationCarbon { $request = $this->queryOrganiationCarbonRequest( $organizationId, $from, @@ -618,11 +591,10 @@ private function queryOrganiationCarbonWithHttpInfo( */ private function queryOrganiationCarbonRequest( string $organizationId, - ?\Upsun\Model\DateTimeFilter $from = null, - ?\Upsun\Model\DateTimeFilter $to = null, + ?DateTimeFilter $from = null, + ?DateTimeFilter $to = null, ?string $interval = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -651,8 +623,6 @@ private function queryOrganiationCarbonRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -666,8 +636,6 @@ private function queryOrganiationCarbonRequest( } } - - // query params if ($interval !== null) { if ('form' === 'form' && is_array($interval)) { @@ -681,8 +649,6 @@ private function queryOrganiationCarbonRequest( } } - - // path params if ($organizationId !== null) { @@ -693,7 +659,6 @@ private function queryOrganiationCarbonRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/DeploymentApi.php b/src/Api/DeploymentApi.php index 28d8f6b4a..4077f6990 100644 --- a/src/Api/DeploymentApi.php +++ b/src/Api/DeploymentApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Deployment; +use Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest; /** * Low level DeploymentApi (auto-generated) @@ -63,7 +65,7 @@ public function getProjectsEnvironmentsDeployments( string $projectId, string $environmentId, string $deploymentId - ): \Upsun\Model\Deployment { + ): Deployment { return $this->getProjectsEnvironmentsDeploymentsWithHttpInfo( $projectId, $environmentId, @@ -82,7 +84,7 @@ private function getProjectsEnvironmentsDeploymentsWithHttpInfo( string $projectId, string $environmentId, string $deploymentId - ): \Upsun\Model\Deployment { + ): Deployment { $request = $this->getProjectsEnvironmentsDeploymentsRequest( $projectId, $environmentId, @@ -127,7 +129,6 @@ private function getProjectsEnvironmentsDeploymentsRequest( string $environmentId, string $deploymentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -185,7 +186,6 @@ private function getProjectsEnvironmentsDeploymentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -324,7 +324,6 @@ private function listProjectsEnvironmentsDeploymentsRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -366,7 +365,6 @@ private function listProjectsEnvironmentsDeploymentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -436,8 +434,8 @@ private function listProjectsEnvironmentsDeploymentsRequest( public function updateProjectsEnvironmentsDeploymentsNext( string $projectId, string $environmentId, - \Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest - ): \Upsun\Model\AcceptedResponse { + UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest + ): AcceptedResponse { return $this->updateProjectsEnvironmentsDeploymentsNextWithHttpInfo( $projectId, $environmentId, @@ -455,8 +453,8 @@ public function updateProjectsEnvironmentsDeploymentsNext( private function updateProjectsEnvironmentsDeploymentsNextWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest - ): \Upsun\Model\AcceptedResponse { + UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest + ): AcceptedResponse { $request = $this->updateProjectsEnvironmentsDeploymentsNextRequest( $projectId, $environmentId, @@ -499,9 +497,8 @@ private function updateProjectsEnvironmentsDeploymentsNextWithHttpInfo( private function updateProjectsEnvironmentsDeploymentsNextRequest( string $projectId, string $environmentId, - \Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest + UpdateProjectsEnvironmentsDeploymentsNextRequest $updateProjectsEnvironmentsDeploymentsNextRequest ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -550,7 +547,6 @@ private function updateProjectsEnvironmentsDeploymentsNextRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/DeploymentTargetApi.php b/src/Api/DeploymentTargetApi.php index cda22a7e4..96b7617be 100644 --- a/src/Api/DeploymentTargetApi.php +++ b/src/Api/DeploymentTargetApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\DeploymentTarget; +use Upsun\Model\DeploymentTargetCreateInput; +use Upsun\Model\DeploymentTargetPatch; /** * Low level DeploymentTargetApi (auto-generated) @@ -61,8 +64,8 @@ public function __construct( */ public function createProjectsDeployments( string $projectId, - \Upsun\Model\DeploymentTargetCreateInput $deploymentTargetCreateInput - ): \Upsun\Model\AcceptedResponse { + DeploymentTargetCreateInput $deploymentTargetCreateInput + ): AcceptedResponse { return $this->createProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetCreateInput @@ -79,8 +82,8 @@ public function createProjectsDeployments( */ private function createProjectsDeploymentsWithHttpInfo( string $projectId, - \Upsun\Model\DeploymentTargetCreateInput $deploymentTargetCreateInput - ): \Upsun\Model\AcceptedResponse { + DeploymentTargetCreateInput $deploymentTargetCreateInput + ): AcceptedResponse { $request = $this->createProjectsDeploymentsRequest( $projectId, $deploymentTargetCreateInput @@ -122,9 +125,8 @@ private function createProjectsDeploymentsWithHttpInfo( */ private function createProjectsDeploymentsRequest( string $projectId, - \Upsun\Model\DeploymentTargetCreateInput $deploymentTargetCreateInput + DeploymentTargetCreateInput $deploymentTargetCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -157,7 +159,6 @@ private function createProjectsDeploymentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -235,7 +236,7 @@ private function createProjectsDeploymentsRequest( public function deleteProjectsDeployments( string $projectId, string $deploymentTargetConfigurationId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetConfigurationId @@ -252,7 +253,7 @@ public function deleteProjectsDeployments( private function deleteProjectsDeploymentsWithHttpInfo( string $projectId, string $deploymentTargetConfigurationId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsDeploymentsRequest( $projectId, $deploymentTargetConfigurationId @@ -295,7 +296,6 @@ private function deleteProjectsDeploymentsRequest( string $projectId, string $deploymentTargetConfigurationId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -337,7 +337,6 @@ private function deleteProjectsDeploymentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -407,7 +406,7 @@ private function deleteProjectsDeploymentsRequest( public function getProjectsDeployments( string $projectId, string $deploymentTargetConfigurationId - ): \Upsun\Model\DeploymentTarget { + ): DeploymentTarget { return $this->getProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetConfigurationId @@ -424,7 +423,7 @@ public function getProjectsDeployments( private function getProjectsDeploymentsWithHttpInfo( string $projectId, string $deploymentTargetConfigurationId - ): \Upsun\Model\DeploymentTarget { + ): DeploymentTarget { $request = $this->getProjectsDeploymentsRequest( $projectId, $deploymentTargetConfigurationId @@ -467,7 +466,6 @@ private function getProjectsDeploymentsRequest( string $projectId, string $deploymentTargetConfigurationId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -509,7 +507,6 @@ private function getProjectsDeploymentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -638,7 +635,6 @@ private function listProjectsDeploymentsWithHttpInfo( private function listProjectsDeploymentsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -664,7 +660,6 @@ private function listProjectsDeploymentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -734,8 +729,8 @@ private function listProjectsDeploymentsRequest( public function updateProjectsDeployments( string $projectId, string $deploymentTargetConfigurationId, - \Upsun\Model\DeploymentTargetPatch $deploymentTargetPatch - ): \Upsun\Model\AcceptedResponse { + DeploymentTargetPatch $deploymentTargetPatch + ): AcceptedResponse { return $this->updateProjectsDeploymentsWithHttpInfo( $projectId, $deploymentTargetConfigurationId, @@ -754,8 +749,8 @@ public function updateProjectsDeployments( private function updateProjectsDeploymentsWithHttpInfo( string $projectId, string $deploymentTargetConfigurationId, - \Upsun\Model\DeploymentTargetPatch $deploymentTargetPatch - ): \Upsun\Model\AcceptedResponse { + DeploymentTargetPatch $deploymentTargetPatch + ): AcceptedResponse { $request = $this->updateProjectsDeploymentsRequest( $projectId, $deploymentTargetConfigurationId, @@ -799,9 +794,8 @@ private function updateProjectsDeploymentsWithHttpInfo( private function updateProjectsDeploymentsRequest( string $projectId, string $deploymentTargetConfigurationId, - \Upsun\Model\DeploymentTargetPatch $deploymentTargetPatch + DeploymentTargetPatch $deploymentTargetPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -850,7 +844,6 @@ private function updateProjectsDeploymentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/DiffApi.php b/src/Api/DiffApi.php index 3e35a73ce..fb2adaba0 100644 --- a/src/Api/DiffApi.php +++ b/src/Api/DiffApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -126,7 +125,6 @@ private function listProjectsGitDiffsRequest( string $diffBaseId, string $diffTargetId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -184,7 +182,6 @@ private function listProjectsGitDiffsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/DiscountsApi.php b/src/Api/DiscountsApi.php index c48c6b123..ca90a4114 100644 --- a/src/Api/DiscountsApi.php +++ b/src/Api/DiscountsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Discount; +use Upsun\Model\GetTypeAllowance200Response; +use Upsun\Model\ListOrgDiscounts200Response; /** * Low level DiscountsApi (auto-generated) @@ -61,7 +63,7 @@ public function __construct( */ public function getDiscount( string $id - ): \Upsun\Model\Discount { + ): Discount { return $this->getDiscountWithHttpInfo( $id ); @@ -78,7 +80,7 @@ public function getDiscount( */ private function getDiscountWithHttpInfo( string $id - ): \Upsun\Model\Discount { + ): Discount { $request = $this->getDiscountRequest( $id ); @@ -121,7 +123,6 @@ private function getDiscountWithHttpInfo( private function getDiscountRequest( string $id ): RequestInterface { - // verify the required parameter 'id' is set if (empty($id)) { throw new InvalidArgumentException( @@ -147,7 +148,6 @@ private function getDiscountRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -212,8 +212,7 @@ private function getDiscountRequest( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Discounts/operation/get-type-allowance */ - public function getTypeAllowance( - ): \Upsun\Model\GetTypeAllowance200Response + public function getTypeAllowance(): GetTypeAllowance200Response { return $this->getTypeAllowanceWithHttpInfo( ); @@ -225,8 +224,7 @@ public function getTypeAllowance( * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getTypeAllowanceWithHttpInfo( - ): \Upsun\Model\GetTypeAllowance200Response + private function getTypeAllowanceWithHttpInfo(): GetTypeAllowance200Response { $request = $this->getTypeAllowanceRequest( ); @@ -263,10 +261,8 @@ private function getTypeAllowanceWithHttpInfo( * * @throws InvalidArgumentException */ - private function getTypeAllowanceRequest( - ): RequestInterface { - - + private function getTypeAllowanceRequest(): RequestInterface + { $resourcePath = '/discounts/types/allowance'; $formParams = []; $queryParams = []; @@ -274,8 +270,6 @@ private function getTypeAllowanceRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -347,7 +341,7 @@ private function getTypeAllowanceRequest( */ public function listOrgDiscounts( string $organizationId - ): \Upsun\Model\ListOrgDiscounts200Response { + ): ListOrgDiscounts200Response { return $this->listOrgDiscountsWithHttpInfo( $organizationId ); @@ -365,7 +359,7 @@ public function listOrgDiscounts( */ private function listOrgDiscountsWithHttpInfo( string $organizationId - ): \Upsun\Model\ListOrgDiscounts200Response { + ): ListOrgDiscounts200Response { $request = $this->listOrgDiscountsRequest( $organizationId ); @@ -409,7 +403,6 @@ private function listOrgDiscountsWithHttpInfo( private function listOrgDiscountsRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -435,7 +428,6 @@ private function listOrgDiscountsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/DomainClaimApi.php b/src/Api/DomainClaimApi.php index 01cc1db61..0d6b3d8ac 100644 --- a/src/Api/DomainClaimApi.php +++ b/src/Api/DomainClaimApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\DomainClaim; /** * Low level DomainClaimApi (auto-generated) @@ -59,7 +60,7 @@ public function __construct( public function createProjectsDomainClaims( string $projectId, object $body - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->createProjectsDomainClaimsWithHttpInfo( $projectId, $body @@ -76,7 +77,7 @@ public function createProjectsDomainClaims( private function createProjectsDomainClaimsWithHttpInfo( string $projectId, object $body - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->createProjectsDomainClaimsRequest( $projectId, $body @@ -120,7 +121,6 @@ private function createProjectsDomainClaimsRequest( string $projectId, object $body ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -153,7 +153,6 @@ private function createProjectsDomainClaimsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -228,7 +227,7 @@ private function createProjectsDomainClaimsRequest( public function deleteProjectsDomainClaims( string $projectId, string $domainClaimId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsDomainClaimsWithHttpInfo( $projectId, $domainClaimId @@ -244,7 +243,7 @@ public function deleteProjectsDomainClaims( private function deleteProjectsDomainClaimsWithHttpInfo( string $projectId, string $domainClaimId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsDomainClaimsRequest( $projectId, $domainClaimId @@ -287,7 +286,6 @@ private function deleteProjectsDomainClaimsRequest( string $projectId, string $domainClaimId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -329,7 +327,6 @@ private function deleteProjectsDomainClaimsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -396,7 +393,7 @@ private function deleteProjectsDomainClaimsRequest( public function getProjectsDomainClaims( string $projectId, string $domainClaimId - ): \Upsun\Model\DomainClaim { + ): DomainClaim { return $this->getProjectsDomainClaimsWithHttpInfo( $projectId, $domainClaimId @@ -412,7 +409,7 @@ public function getProjectsDomainClaims( private function getProjectsDomainClaimsWithHttpInfo( string $projectId, string $domainClaimId - ): \Upsun\Model\DomainClaim { + ): DomainClaim { $request = $this->getProjectsDomainClaimsRequest( $projectId, $domainClaimId @@ -455,7 +452,6 @@ private function getProjectsDomainClaimsRequest( string $projectId, string $domainClaimId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -497,7 +493,6 @@ private function getProjectsDomainClaimsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -622,7 +617,6 @@ private function listProjectsDomainClaimsWithHttpInfo( private function listProjectsDomainClaimsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -648,7 +642,6 @@ private function listProjectsDomainClaimsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -717,7 +710,7 @@ public function updateProjectsDomainClaims( string $projectId, string $domainClaimId, object $body - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->updateProjectsDomainClaimsWithHttpInfo( $projectId, $domainClaimId, @@ -736,7 +729,7 @@ private function updateProjectsDomainClaimsWithHttpInfo( string $projectId, string $domainClaimId, object $body - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->updateProjectsDomainClaimsRequest( $projectId, $domainClaimId, @@ -782,7 +775,6 @@ private function updateProjectsDomainClaimsRequest( string $domainClaimId, object $body ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -831,7 +823,6 @@ private function updateProjectsDomainClaimsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/DomainManagementApi.php b/src/Api/DomainManagementApi.php index 5b533bcfb..2976608d4 100644 --- a/src/Api/DomainManagementApi.php +++ b/src/Api/DomainManagementApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Domain; +use Upsun\Model\DomainCreateInput; +use Upsun\Model\DomainPatch; /** * Low level DomainManagementApi (auto-generated) @@ -63,8 +66,8 @@ public function __construct( */ public function createProjectsDomains( string $projectId, - \Upsun\Model\DomainCreateInput $domainCreateInput - ): \Upsun\Model\AcceptedResponse { + DomainCreateInput $domainCreateInput + ): AcceptedResponse { return $this->createProjectsDomainsWithHttpInfo( $projectId, $domainCreateInput @@ -81,8 +84,8 @@ public function createProjectsDomains( */ private function createProjectsDomainsWithHttpInfo( string $projectId, - \Upsun\Model\DomainCreateInput $domainCreateInput - ): \Upsun\Model\AcceptedResponse { + DomainCreateInput $domainCreateInput + ): AcceptedResponse { $request = $this->createProjectsDomainsRequest( $projectId, $domainCreateInput @@ -124,9 +127,8 @@ private function createProjectsDomainsWithHttpInfo( */ private function createProjectsDomainsRequest( string $projectId, - \Upsun\Model\DomainCreateInput $domainCreateInput + DomainCreateInput $domainCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -159,7 +161,6 @@ private function createProjectsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -241,8 +242,8 @@ private function createProjectsDomainsRequest( public function createProjectsEnvironmentsDomains( string $projectId, string $environmentId, - \Upsun\Model\DomainCreateInput $domainCreateInput - ): \Upsun\Model\AcceptedResponse { + DomainCreateInput $domainCreateInput + ): AcceptedResponse { return $this->createProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -261,8 +262,8 @@ public function createProjectsEnvironmentsDomains( private function createProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\DomainCreateInput $domainCreateInput - ): \Upsun\Model\AcceptedResponse { + DomainCreateInput $domainCreateInput + ): AcceptedResponse { $request = $this->createProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -306,9 +307,8 @@ private function createProjectsEnvironmentsDomainsWithHttpInfo( private function createProjectsEnvironmentsDomainsRequest( string $projectId, string $environmentId, - \Upsun\Model\DomainCreateInput $domainCreateInput + DomainCreateInput $domainCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -357,7 +357,6 @@ private function createProjectsEnvironmentsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -435,7 +434,7 @@ private function createProjectsEnvironmentsDomainsRequest( public function deleteProjectsDomains( string $projectId, string $domainId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsDomainsWithHttpInfo( $projectId, $domainId @@ -452,7 +451,7 @@ public function deleteProjectsDomains( private function deleteProjectsDomainsWithHttpInfo( string $projectId, string $domainId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsDomainsRequest( $projectId, $domainId @@ -495,7 +494,6 @@ private function deleteProjectsDomainsRequest( string $projectId, string $domainId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -537,7 +535,6 @@ private function deleteProjectsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -608,7 +605,7 @@ public function deleteProjectsEnvironmentsDomains( string $projectId, string $environmentId, string $domainId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -627,7 +624,7 @@ private function deleteProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, string $domainId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -672,7 +669,6 @@ private function deleteProjectsEnvironmentsDomainsRequest( string $environmentId, string $domainId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -730,7 +726,6 @@ private function deleteProjectsEnvironmentsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -800,7 +795,7 @@ private function deleteProjectsEnvironmentsDomainsRequest( public function getProjectsDomains( string $projectId, string $domainId - ): \Upsun\Model\Domain { + ): Domain { return $this->getProjectsDomainsWithHttpInfo( $projectId, $domainId @@ -817,7 +812,7 @@ public function getProjectsDomains( private function getProjectsDomainsWithHttpInfo( string $projectId, string $domainId - ): \Upsun\Model\Domain { + ): Domain { $request = $this->getProjectsDomainsRequest( $projectId, $domainId @@ -860,7 +855,6 @@ private function getProjectsDomainsRequest( string $projectId, string $domainId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -902,7 +896,6 @@ private function getProjectsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -973,7 +966,7 @@ public function getProjectsEnvironmentsDomains( string $projectId, string $environmentId, string $domainId - ): \Upsun\Model\Domain { + ): Domain { return $this->getProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -992,7 +985,7 @@ private function getProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, string $domainId - ): \Upsun\Model\Domain { + ): Domain { $request = $this->getProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -1037,7 +1030,6 @@ private function getProjectsEnvironmentsDomainsRequest( string $environmentId, string $domainId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1095,7 +1087,6 @@ private function getProjectsEnvironmentsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1226,7 +1217,6 @@ private function listProjectsDomainsWithHttpInfo( private function listProjectsDomainsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1252,7 +1242,6 @@ private function listProjectsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1387,7 +1376,6 @@ private function listProjectsEnvironmentsDomainsRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1429,7 +1417,6 @@ private function listProjectsEnvironmentsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1500,8 +1487,8 @@ private function listProjectsEnvironmentsDomainsRequest( public function updateProjectsDomains( string $projectId, string $domainId, - \Upsun\Model\DomainPatch $domainPatch - ): \Upsun\Model\AcceptedResponse { + DomainPatch $domainPatch + ): AcceptedResponse { return $this->updateProjectsDomainsWithHttpInfo( $projectId, $domainId, @@ -1520,8 +1507,8 @@ public function updateProjectsDomains( private function updateProjectsDomainsWithHttpInfo( string $projectId, string $domainId, - \Upsun\Model\DomainPatch $domainPatch - ): \Upsun\Model\AcceptedResponse { + DomainPatch $domainPatch + ): AcceptedResponse { $request = $this->updateProjectsDomainsRequest( $projectId, $domainId, @@ -1565,9 +1552,8 @@ private function updateProjectsDomainsWithHttpInfo( private function updateProjectsDomainsRequest( string $projectId, string $domainId, - \Upsun\Model\DomainPatch $domainPatch + DomainPatch $domainPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1616,7 +1602,6 @@ private function updateProjectsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1696,8 +1681,8 @@ public function updateProjectsEnvironmentsDomains( string $projectId, string $environmentId, string $domainId, - \Upsun\Model\DomainPatch $domainPatch - ): \Upsun\Model\AcceptedResponse { + DomainPatch $domainPatch + ): AcceptedResponse { return $this->updateProjectsEnvironmentsDomainsWithHttpInfo( $projectId, $environmentId, @@ -1718,8 +1703,8 @@ private function updateProjectsEnvironmentsDomainsWithHttpInfo( string $projectId, string $environmentId, string $domainId, - \Upsun\Model\DomainPatch $domainPatch - ): \Upsun\Model\AcceptedResponse { + DomainPatch $domainPatch + ): AcceptedResponse { $request = $this->updateProjectsEnvironmentsDomainsRequest( $projectId, $environmentId, @@ -1765,9 +1750,8 @@ private function updateProjectsEnvironmentsDomainsRequest( string $projectId, string $environmentId, string $domainId, - \Upsun\Model\DomainPatch $domainPatch + DomainPatch $domainPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1832,7 +1816,6 @@ private function updateProjectsEnvironmentsDomainsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/EntrypointApi.php b/src/Api/EntrypointApi.php index 9787d46b2..ac47af1cd 100644 --- a/src/Api/EntrypointApi.php +++ b/src/Api/EntrypointApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -130,7 +129,6 @@ private function observabilityEntrypointRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -139,8 +137,6 @@ private function observabilityEntrypointRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling EntrypointApi.observabilityEntrypoint, @@ -156,8 +152,6 @@ private function observabilityEntrypointRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling EntrypointApi.observabilityEntrypoint, @@ -165,7 +159,6 @@ private function observabilityEntrypointRequest( ); } - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability'; $formParams = []; $queryParams = []; @@ -192,7 +185,6 @@ private function observabilityEntrypointRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/EnvironmentActivityApi.php b/src/Api/EnvironmentActivityApi.php index fcc320abe..6034f23f5 100644 --- a/src/Api/EnvironmentActivityApi.php +++ b/src/Api/EnvironmentActivityApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Activity; /** * Low level EnvironmentActivityApi (auto-generated) @@ -64,7 +65,7 @@ public function actionProjectsEnvironmentsActivitiesCancel( string $projectId, string $environmentId, string $activityId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->actionProjectsEnvironmentsActivitiesCancelWithHttpInfo( $projectId, $environmentId, @@ -83,7 +84,7 @@ private function actionProjectsEnvironmentsActivitiesCancelWithHttpInfo( string $projectId, string $environmentId, string $activityId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->actionProjectsEnvironmentsActivitiesCancelRequest( $projectId, $environmentId, @@ -128,7 +129,6 @@ private function actionProjectsEnvironmentsActivitiesCancelRequest( string $environmentId, string $activityId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -186,7 +186,6 @@ private function actionProjectsEnvironmentsActivitiesCancelRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -260,7 +259,7 @@ public function getProjectsEnvironmentsActivities( string $projectId, string $environmentId, string $activityId - ): \Upsun\Model\Activity { + ): Activity { return $this->getProjectsEnvironmentsActivitiesWithHttpInfo( $projectId, $environmentId, @@ -279,7 +278,7 @@ private function getProjectsEnvironmentsActivitiesWithHttpInfo( string $projectId, string $environmentId, string $activityId - ): \Upsun\Model\Activity { + ): Activity { $request = $this->getProjectsEnvironmentsActivitiesRequest( $projectId, $environmentId, @@ -324,7 +323,6 @@ private function getProjectsEnvironmentsActivitiesRequest( string $environmentId, string $activityId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -382,7 +380,6 @@ private function getProjectsEnvironmentsActivitiesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -524,7 +521,6 @@ private function listProjectsEnvironmentsActivitiesRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -566,7 +562,6 @@ private function listProjectsEnvironmentsActivitiesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/EnvironmentApi.php b/src/Api/EnvironmentApi.php index 430f96f41..653a5ad18 100644 --- a/src/Api/EnvironmentApi.php +++ b/src/Api/EnvironmentApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,15 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Environment; +use Upsun\Model\EnvironmentActivateInput; +use Upsun\Model\EnvironmentBranchInput; +use Upsun\Model\EnvironmentDeployInput; +use Upsun\Model\EnvironmentInitializeInput; +use Upsun\Model\EnvironmentMergeInput; +use Upsun\Model\EnvironmentPatch; +use Upsun\Model\EnvironmentSynchronizeInput; /** * Low level EnvironmentApi (auto-generated) @@ -62,8 +70,8 @@ public function __construct( public function activateEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentActivateInput $environmentActivateInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentActivateInput $environmentActivateInput + ): AcceptedResponse { return $this->activateEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -82,8 +90,8 @@ public function activateEnvironment( private function activateEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentActivateInput $environmentActivateInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentActivateInput $environmentActivateInput + ): AcceptedResponse { $request = $this->activateEnvironmentRequest( $projectId, $environmentId, @@ -127,9 +135,8 @@ private function activateEnvironmentWithHttpInfo( private function activateEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentActivateInput $environmentActivateInput + EnvironmentActivateInput $environmentActivateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -178,7 +185,6 @@ private function activateEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -257,8 +263,8 @@ private function activateEnvironmentRequest( public function branchEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentBranchInput $environmentBranchInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentBranchInput $environmentBranchInput + ): AcceptedResponse { return $this->branchEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -277,8 +283,8 @@ public function branchEnvironment( private function branchEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentBranchInput $environmentBranchInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentBranchInput $environmentBranchInput + ): AcceptedResponse { $request = $this->branchEnvironmentRequest( $projectId, $environmentId, @@ -322,9 +328,8 @@ private function branchEnvironmentWithHttpInfo( private function branchEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentBranchInput $environmentBranchInput + EnvironmentBranchInput $environmentBranchInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -373,7 +378,6 @@ private function branchEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -453,7 +457,7 @@ private function branchEnvironmentRequest( public function deactivateEnvironment( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deactivateEnvironmentWithHttpInfo( $projectId, $environmentId @@ -470,7 +474,7 @@ public function deactivateEnvironment( private function deactivateEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deactivateEnvironmentRequest( $projectId, $environmentId @@ -513,7 +517,6 @@ private function deactivateEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -555,7 +558,6 @@ private function deactivateEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -625,7 +627,7 @@ private function deactivateEnvironmentRequest( public function deleteEnvironment( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteEnvironmentWithHttpInfo( $projectId, $environmentId @@ -642,7 +644,7 @@ public function deleteEnvironment( private function deleteEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteEnvironmentRequest( $projectId, $environmentId @@ -685,7 +687,6 @@ private function deleteEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -727,7 +728,6 @@ private function deleteEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -800,8 +800,8 @@ private function deleteEnvironmentRequest( public function deployEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentDeployInput $environmentDeployInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentDeployInput $environmentDeployInput + ): AcceptedResponse { return $this->deployEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -820,8 +820,8 @@ public function deployEnvironment( private function deployEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentDeployInput $environmentDeployInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentDeployInput $environmentDeployInput + ): AcceptedResponse { $request = $this->deployEnvironmentRequest( $projectId, $environmentId, @@ -865,9 +865,8 @@ private function deployEnvironmentWithHttpInfo( private function deployEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentDeployInput $environmentDeployInput + EnvironmentDeployInput $environmentDeployInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -916,7 +915,6 @@ private function deployEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -994,7 +992,7 @@ private function deployEnvironmentRequest( public function getEnvironment( string $projectId, string $environmentId - ): \Upsun\Model\Environment { + ): Environment { return $this->getEnvironmentWithHttpInfo( $projectId, $environmentId @@ -1011,7 +1009,7 @@ public function getEnvironment( private function getEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\Environment { + ): Environment { $request = $this->getEnvironmentRequest( $projectId, $environmentId @@ -1054,7 +1052,6 @@ private function getEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1096,7 +1093,6 @@ private function getEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1173,8 +1169,8 @@ private function getEnvironmentRequest( public function initializeEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentInitializeInput $environmentInitializeInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentInitializeInput $environmentInitializeInput + ): AcceptedResponse { return $this->initializeEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -1193,8 +1189,8 @@ public function initializeEnvironment( private function initializeEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentInitializeInput $environmentInitializeInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentInitializeInput $environmentInitializeInput + ): AcceptedResponse { $request = $this->initializeEnvironmentRequest( $projectId, $environmentId, @@ -1238,9 +1234,8 @@ private function initializeEnvironmentWithHttpInfo( private function initializeEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentInitializeInput $environmentInitializeInput + EnvironmentInitializeInput $environmentInitializeInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1289,7 +1284,6 @@ private function initializeEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1426,7 +1420,6 @@ private function listProjectsEnvironmentsWithHttpInfo( private function listProjectsEnvironmentsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1452,7 +1445,6 @@ private function listProjectsEnvironmentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1519,7 +1511,7 @@ private function listProjectsEnvironmentsRequest( public function maintenanceRedeployEnvironment( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->maintenanceRedeployEnvironmentWithHttpInfo( $projectId, $environmentId @@ -1535,7 +1527,7 @@ public function maintenanceRedeployEnvironment( private function maintenanceRedeployEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->maintenanceRedeployEnvironmentRequest( $projectId, $environmentId @@ -1578,7 +1570,6 @@ private function maintenanceRedeployEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1620,7 +1611,6 @@ private function maintenanceRedeployEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1693,8 +1683,8 @@ private function maintenanceRedeployEnvironmentRequest( public function mergeEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentMergeInput $environmentMergeInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentMergeInput $environmentMergeInput + ): AcceptedResponse { return $this->mergeEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -1713,8 +1703,8 @@ public function mergeEnvironment( private function mergeEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentMergeInput $environmentMergeInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentMergeInput $environmentMergeInput + ): AcceptedResponse { $request = $this->mergeEnvironmentRequest( $projectId, $environmentId, @@ -1758,9 +1748,8 @@ private function mergeEnvironmentWithHttpInfo( private function mergeEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentMergeInput $environmentMergeInput + EnvironmentMergeInput $environmentMergeInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1809,7 +1798,6 @@ private function mergeEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1891,7 +1879,7 @@ private function mergeEnvironmentRequest( public function pauseEnvironment( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->pauseEnvironmentWithHttpInfo( $projectId, $environmentId @@ -1908,7 +1896,7 @@ public function pauseEnvironment( private function pauseEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->pauseEnvironmentRequest( $projectId, $environmentId @@ -1951,7 +1939,6 @@ private function pauseEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1993,7 +1980,6 @@ private function pauseEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2063,7 +2049,7 @@ private function pauseEnvironmentRequest( public function redeployEnvironment( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->redeployEnvironmentWithHttpInfo( $projectId, $environmentId @@ -2080,7 +2066,7 @@ public function redeployEnvironment( private function redeployEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->redeployEnvironmentRequest( $projectId, $environmentId @@ -2123,7 +2109,6 @@ private function redeployEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2165,7 +2150,6 @@ private function redeployEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2238,7 +2222,7 @@ private function redeployEnvironmentRequest( public function resumeEnvironment( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->resumeEnvironmentWithHttpInfo( $projectId, $environmentId @@ -2255,7 +2239,7 @@ public function resumeEnvironment( private function resumeEnvironmentWithHttpInfo( string $projectId, string $environmentId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->resumeEnvironmentRequest( $projectId, $environmentId @@ -2298,7 +2282,6 @@ private function resumeEnvironmentRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2340,7 +2323,6 @@ private function resumeEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -2413,8 +2395,8 @@ private function resumeEnvironmentRequest( public function synchronizeEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentSynchronizeInput $environmentSynchronizeInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentSynchronizeInput $environmentSynchronizeInput + ): AcceptedResponse { return $this->synchronizeEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -2433,8 +2415,8 @@ public function synchronizeEnvironment( private function synchronizeEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentSynchronizeInput $environmentSynchronizeInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentSynchronizeInput $environmentSynchronizeInput + ): AcceptedResponse { $request = $this->synchronizeEnvironmentRequest( $projectId, $environmentId, @@ -2478,9 +2460,8 @@ private function synchronizeEnvironmentWithHttpInfo( private function synchronizeEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentSynchronizeInput $environmentSynchronizeInput + EnvironmentSynchronizeInput $environmentSynchronizeInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2529,7 +2510,6 @@ private function synchronizeEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -2608,8 +2588,8 @@ private function synchronizeEnvironmentRequest( public function updateEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentPatch $environmentPatch - ): \Upsun\Model\AcceptedResponse { + EnvironmentPatch $environmentPatch + ): AcceptedResponse { return $this->updateEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -2628,8 +2608,8 @@ public function updateEnvironment( private function updateEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentPatch $environmentPatch - ): \Upsun\Model\AcceptedResponse { + EnvironmentPatch $environmentPatch + ): AcceptedResponse { $request = $this->updateEnvironmentRequest( $projectId, $environmentId, @@ -2673,9 +2653,8 @@ private function updateEnvironmentWithHttpInfo( private function updateEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentPatch $environmentPatch + EnvironmentPatch $environmentPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -2724,7 +2703,6 @@ private function updateEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/EnvironmentBackupsApi.php b/src/Api/EnvironmentBackupsApi.php index fe3bddd5b..0109f64ff 100644 --- a/src/Api/EnvironmentBackupsApi.php +++ b/src/Api/EnvironmentBackupsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Backup; +use Upsun\Model\EnvironmentBackupInput; +use Upsun\Model\EnvironmentRestoreInput; /** * Low level EnvironmentBackupsApi (auto-generated) @@ -63,8 +66,8 @@ public function __construct( public function backupEnvironment( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentBackupInput $environmentBackupInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentBackupInput $environmentBackupInput + ): AcceptedResponse { return $this->backupEnvironmentWithHttpInfo( $projectId, $environmentId, @@ -83,8 +86,8 @@ public function backupEnvironment( private function backupEnvironmentWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentBackupInput $environmentBackupInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentBackupInput $environmentBackupInput + ): AcceptedResponse { $request = $this->backupEnvironmentRequest( $projectId, $environmentId, @@ -128,9 +131,8 @@ private function backupEnvironmentWithHttpInfo( private function backupEnvironmentRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentBackupInput $environmentBackupInput + EnvironmentBackupInput $environmentBackupInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -179,7 +181,6 @@ private function backupEnvironmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -260,7 +261,7 @@ public function deleteProjectsEnvironmentsBackups( string $projectId, string $environmentId, string $backupId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsEnvironmentsBackupsWithHttpInfo( $projectId, $environmentId, @@ -279,7 +280,7 @@ private function deleteProjectsEnvironmentsBackupsWithHttpInfo( string $projectId, string $environmentId, string $backupId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsEnvironmentsBackupsRequest( $projectId, $environmentId, @@ -324,7 +325,6 @@ private function deleteProjectsEnvironmentsBackupsRequest( string $environmentId, string $backupId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -382,7 +382,6 @@ private function deleteProjectsEnvironmentsBackupsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -456,7 +455,7 @@ public function getProjectsEnvironmentsBackups( string $projectId, string $environmentId, string $backupId - ): \Upsun\Model\Backup { + ): Backup { return $this->getProjectsEnvironmentsBackupsWithHttpInfo( $projectId, $environmentId, @@ -475,7 +474,7 @@ private function getProjectsEnvironmentsBackupsWithHttpInfo( string $projectId, string $environmentId, string $backupId - ): \Upsun\Model\Backup { + ): Backup { $request = $this->getProjectsEnvironmentsBackupsRequest( $projectId, $environmentId, @@ -520,7 +519,6 @@ private function getProjectsEnvironmentsBackupsRequest( string $environmentId, string $backupId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -578,7 +576,6 @@ private function getProjectsEnvironmentsBackupsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -712,7 +709,6 @@ private function listProjectsEnvironmentsBackupsRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -754,7 +750,6 @@ private function listProjectsEnvironmentsBackupsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -828,8 +823,8 @@ public function restoreBackup( string $projectId, string $environmentId, string $backupId, - \Upsun\Model\EnvironmentRestoreInput $environmentRestoreInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentRestoreInput $environmentRestoreInput + ): AcceptedResponse { return $this->restoreBackupWithHttpInfo( $projectId, $environmentId, @@ -850,8 +845,8 @@ private function restoreBackupWithHttpInfo( string $projectId, string $environmentId, string $backupId, - \Upsun\Model\EnvironmentRestoreInput $environmentRestoreInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentRestoreInput $environmentRestoreInput + ): AcceptedResponse { $request = $this->restoreBackupRequest( $projectId, $environmentId, @@ -897,9 +892,8 @@ private function restoreBackupRequest( string $projectId, string $environmentId, string $backupId, - \Upsun\Model\EnvironmentRestoreInput $environmentRestoreInput + EnvironmentRestoreInput $environmentRestoreInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -964,7 +958,6 @@ private function restoreBackupRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/EnvironmentTypeApi.php b/src/Api/EnvironmentTypeApi.php index 3e58bdb18..b84590fd3 100644 --- a/src/Api/EnvironmentTypeApi.php +++ b/src/Api/EnvironmentTypeApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\EnvironmentType; /** * Low level EnvironmentTypeApi (auto-generated) @@ -61,7 +61,7 @@ public function __construct( public function getEnvironmentType( string $projectId, string $environmentTypeId - ): \Upsun\Model\EnvironmentType { + ): EnvironmentType { return $this->getEnvironmentTypeWithHttpInfo( $projectId, $environmentTypeId @@ -78,7 +78,7 @@ public function getEnvironmentType( private function getEnvironmentTypeWithHttpInfo( string $projectId, string $environmentTypeId - ): \Upsun\Model\EnvironmentType { + ): EnvironmentType { $request = $this->getEnvironmentTypeRequest( $projectId, $environmentTypeId @@ -121,7 +121,6 @@ private function getEnvironmentTypeRequest( string $projectId, string $environmentTypeId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -163,7 +162,6 @@ private function getEnvironmentTypeRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -292,7 +290,6 @@ private function listProjectsEnvironmentTypesWithHttpInfo( private function listProjectsEnvironmentTypesRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -318,7 +315,6 @@ private function listProjectsEnvironmentTypesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/EnvironmentVariablesApi.php b/src/Api/EnvironmentVariablesApi.php index 871962139..7febd614a 100644 --- a/src/Api/EnvironmentVariablesApi.php +++ b/src/Api/EnvironmentVariablesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\EnvironmentVariable; +use Upsun\Model\EnvironmentVariableCreateInput; +use Upsun\Model\EnvironmentVariablePatch; /** * Low level EnvironmentVariablesApi (auto-generated) @@ -66,8 +69,8 @@ public function __construct( public function createProjectsEnvironmentsVariables( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentVariableCreateInput $environmentVariableCreateInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentVariableCreateInput $environmentVariableCreateInput + ): AcceptedResponse { return $this->createProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -86,8 +89,8 @@ public function createProjectsEnvironmentsVariables( private function createProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentVariableCreateInput $environmentVariableCreateInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentVariableCreateInput $environmentVariableCreateInput + ): AcceptedResponse { $request = $this->createProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -131,9 +134,8 @@ private function createProjectsEnvironmentsVariablesWithHttpInfo( private function createProjectsEnvironmentsVariablesRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentVariableCreateInput $environmentVariableCreateInput + EnvironmentVariableCreateInput $environmentVariableCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -182,7 +184,6 @@ private function createProjectsEnvironmentsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -261,7 +262,7 @@ public function deleteProjectsEnvironmentsVariables( string $projectId, string $environmentId, string $variableId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -280,7 +281,7 @@ private function deleteProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, string $variableId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -325,7 +326,6 @@ private function deleteProjectsEnvironmentsVariablesRequest( string $environmentId, string $variableId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -383,7 +383,6 @@ private function deleteProjectsEnvironmentsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -454,7 +453,7 @@ public function getProjectsEnvironmentsVariables( string $projectId, string $environmentId, string $variableId - ): \Upsun\Model\EnvironmentVariable { + ): EnvironmentVariable { return $this->getProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -473,7 +472,7 @@ private function getProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, string $variableId - ): \Upsun\Model\EnvironmentVariable { + ): EnvironmentVariable { $request = $this->getProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -518,7 +517,6 @@ private function getProjectsEnvironmentsVariablesRequest( string $environmentId, string $variableId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -576,7 +574,6 @@ private function getProjectsEnvironmentsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -710,7 +707,6 @@ private function listProjectsEnvironmentsVariablesRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -752,7 +748,6 @@ private function listProjectsEnvironmentsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -827,8 +822,8 @@ public function updateProjectsEnvironmentsVariables( string $projectId, string $environmentId, string $variableId, - \Upsun\Model\EnvironmentVariablePatch $environmentVariablePatch - ): \Upsun\Model\AcceptedResponse { + EnvironmentVariablePatch $environmentVariablePatch + ): AcceptedResponse { return $this->updateProjectsEnvironmentsVariablesWithHttpInfo( $projectId, $environmentId, @@ -849,8 +844,8 @@ private function updateProjectsEnvironmentsVariablesWithHttpInfo( string $projectId, string $environmentId, string $variableId, - \Upsun\Model\EnvironmentVariablePatch $environmentVariablePatch - ): \Upsun\Model\AcceptedResponse { + EnvironmentVariablePatch $environmentVariablePatch + ): AcceptedResponse { $request = $this->updateProjectsEnvironmentsVariablesRequest( $projectId, $environmentId, @@ -896,9 +891,8 @@ private function updateProjectsEnvironmentsVariablesRequest( string $projectId, string $environmentId, string $variableId, - \Upsun\Model\EnvironmentVariablePatch $environmentVariablePatch + EnvironmentVariablePatch $environmentVariablePatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -963,7 +957,6 @@ private function updateProjectsEnvironmentsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/GrantsApi.php b/src/Api/GrantsApi.php index b0e287db5..1a15a12d0 100644 --- a/src/Api/GrantsApi.php +++ b/src/Api/GrantsApi.php @@ -13,6 +13,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ListUserExtendedAccess200Response; +use Upsun\Model\StringFilter; /** * Low level GrantsApi (auto-generated) @@ -119,7 +121,6 @@ private function getAccessDocumentWithHttpInfo( private function getAccessDocumentRequest( string $accessId ): RequestInterface { - // verify the required parameter 'accessId' is set if (empty($accessId)) { throw new InvalidArgumentException( @@ -145,7 +146,6 @@ private function getAccessDocumentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -220,10 +220,10 @@ private function getAccessDocumentRequest( */ public function listUserExtendedAccess( string $userId, - ?\Upsun\Model\StringFilter $filterResourceType = null, - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\StringFilter $filterPermissions = null - ): \Upsun\Model\ListUserExtendedAccess200Response { + ?StringFilter $filterResourceType = null, + ?StringFilter $filterOrganizationId = null, + ?StringFilter $filterPermissions = null + ): ListUserExtendedAccess200Response { return $this->listUserExtendedAccessWithHttpInfo( $userId, $filterResourceType, @@ -246,10 +246,10 @@ public function listUserExtendedAccess( */ private function listUserExtendedAccessWithHttpInfo( string $userId, - ?\Upsun\Model\StringFilter $filterResourceType = null, - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\StringFilter $filterPermissions = null - ): \Upsun\Model\ListUserExtendedAccess200Response { + ?StringFilter $filterResourceType = null, + ?StringFilter $filterOrganizationId = null, + ?StringFilter $filterPermissions = null + ): ListUserExtendedAccess200Response { $request = $this->listUserExtendedAccessRequest( $userId, $filterResourceType, @@ -297,11 +297,10 @@ private function listUserExtendedAccessWithHttpInfo( */ private function listUserExtendedAccessRequest( string $userId, - ?\Upsun\Model\StringFilter $filterResourceType = null, - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\StringFilter $filterPermissions = null + ?StringFilter $filterResourceType = null, + ?StringFilter $filterOrganizationId = null, + ?StringFilter $filterPermissions = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -330,8 +329,6 @@ private function listUserExtendedAccessRequest( } } - - // query params if ($filterOrganizationId !== null) { if ('form' === 'deepObject' && is_array($filterOrganizationId)) { @@ -345,8 +342,6 @@ private function listUserExtendedAccessRequest( } } - - // query params if ($filterPermissions !== null) { if ('form' === 'deepObject' && is_array($filterPermissions)) { @@ -360,8 +355,6 @@ private function listUserExtendedAccessRequest( } } - - // path params if ($userId !== null) { @@ -372,7 +365,6 @@ private function listUserExtendedAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/HttpTrafficApi.php b/src/Api/HttpTrafficApi.php index 5a2136788..19298534f 100644 --- a/src/Api/HttpTrafficApi.php +++ b/src/Api/HttpTrafficApi.php @@ -259,7 +259,6 @@ private function httpMetricsTimelineIpsRequest( ?array $requestDurationSlots = null, ?string $requestDurationSlotsMode = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -268,8 +267,6 @@ private function httpMetricsTimelineIpsRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineIps, @@ -285,8 +282,6 @@ private function httpMetricsTimelineIpsRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineIps, @@ -323,8 +318,6 @@ private function httpMetricsTimelineIpsRequest( ); } - - if ($topHitsCount !== null && $topHitsCount > 15) { throw new InvalidArgumentException( 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineIps, @@ -339,8 +332,6 @@ private function httpMetricsTimelineIpsRequest( ); } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/ips'; $formParams = []; $queryParams = []; @@ -361,8 +352,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -376,8 +365,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -391,8 +378,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($topHitsCount !== null) { if ('form' === 'form' && is_array($topHitsCount)) { @@ -406,8 +391,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -421,8 +404,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -436,8 +417,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -451,8 +430,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -466,8 +443,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($domains !== null) { if ('form' === 'form' && is_array($domains)) { @@ -481,8 +456,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($domainsMode !== null) { if ('form' === 'form' && is_array($domainsMode)) { @@ -496,8 +469,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($codeSlots !== null) { if ('form' === 'form' && is_array($codeSlots)) { @@ -511,8 +482,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($codeSlotsMode !== null) { if ('form' === 'form' && is_array($codeSlotsMode)) { @@ -526,8 +495,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($codes !== null) { if ('form' === 'form' && is_array($codes)) { @@ -541,8 +508,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($codesMode !== null) { if ('form' === 'form' && is_array($codesMode)) { @@ -556,8 +521,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($requestDurationSlots !== null) { if ('form' === 'form' && is_array($requestDurationSlots)) { @@ -571,8 +534,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // query params if ($requestDurationSlotsMode !== null) { if ('form' === 'form' && is_array($requestDurationSlotsMode)) { @@ -586,8 +547,6 @@ private function httpMetricsTimelineIpsRequest( } } - - // path params if ($projectId !== null) { @@ -607,7 +566,6 @@ private function httpMetricsTimelineIpsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -876,7 +834,6 @@ private function httpMetricsTimelineUrlsRequest( ?array $requestDurationSlots = null, ?string $requestDurationSlotsMode = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -885,8 +842,6 @@ private function httpMetricsTimelineUrlsRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineUrls, @@ -902,8 +857,6 @@ private function httpMetricsTimelineUrlsRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineUrls, @@ -940,8 +893,6 @@ private function httpMetricsTimelineUrlsRequest( ); } - - if ($topHitsCount !== null && $topHitsCount > 15) { throw new InvalidArgumentException( 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUrls, @@ -956,8 +907,6 @@ private function httpMetricsTimelineUrlsRequest( ); } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls'; $formParams = []; $queryParams = []; @@ -978,8 +927,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -993,8 +940,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -1008,8 +953,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($topHitsCount !== null) { if ('form' === 'form' && is_array($topHitsCount)) { @@ -1023,8 +966,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -1038,8 +979,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -1053,8 +992,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -1068,8 +1005,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -1083,8 +1018,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($domains !== null) { if ('form' === 'form' && is_array($domains)) { @@ -1098,8 +1031,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($domainsMode !== null) { if ('form' === 'form' && is_array($domainsMode)) { @@ -1113,8 +1044,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($codeSlots !== null) { if ('form' === 'form' && is_array($codeSlots)) { @@ -1128,8 +1057,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($codeSlotsMode !== null) { if ('form' === 'form' && is_array($codeSlotsMode)) { @@ -1143,8 +1070,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($codes !== null) { if ('form' === 'form' && is_array($codes)) { @@ -1158,8 +1083,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($codesMode !== null) { if ('form' === 'form' && is_array($codesMode)) { @@ -1173,8 +1096,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($requestDurationSlots !== null) { if ('form' === 'form' && is_array($requestDurationSlots)) { @@ -1188,8 +1109,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // query params if ($requestDurationSlotsMode !== null) { if ('form' === 'form' && is_array($requestDurationSlotsMode)) { @@ -1203,8 +1122,6 @@ private function httpMetricsTimelineUrlsRequest( } } - - // path params if ($projectId !== null) { @@ -1224,7 +1141,6 @@ private function httpMetricsTimelineUrlsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1492,7 +1408,6 @@ private function httpMetricsTimelineUserAgentsRequest( ?array $requestDurationSlots = null, ?string $requestDurationSlotsMode = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1501,8 +1416,6 @@ private function httpMetricsTimelineUserAgentsRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, @@ -1518,8 +1431,6 @@ private function httpMetricsTimelineUserAgentsRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, @@ -1556,8 +1467,6 @@ private function httpMetricsTimelineUserAgentsRequest( ); } - - if ($topHitsCount !== null && $topHitsCount > 15) { throw new InvalidArgumentException( 'invalid value for "$topHitsCount" when calling HttpTrafficApi.httpMetricsTimelineUserAgents, @@ -1572,8 +1481,6 @@ private function httpMetricsTimelineUserAgentsRequest( ); } - - $resourcePath = '/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/user-agents'; $formParams = []; $queryParams = []; @@ -1594,8 +1501,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1609,8 +1514,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($limit !== null) { if ('form' === 'form' && is_array($limit)) { @@ -1624,8 +1527,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($topHitsCount !== null) { if ('form' === 'form' && is_array($topHitsCount)) { @@ -1639,8 +1540,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($applications !== null) { if ('form' === 'form' && is_array($applications)) { @@ -1654,8 +1553,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($applicationsMode !== null) { if ('form' === 'form' && is_array($applicationsMode)) { @@ -1669,8 +1566,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($methods !== null) { if ('form' === 'form' && is_array($methods)) { @@ -1684,8 +1579,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($methodsMode !== null) { if ('form' === 'form' && is_array($methodsMode)) { @@ -1699,8 +1592,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($domains !== null) { if ('form' === 'form' && is_array($domains)) { @@ -1714,8 +1605,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($domainsMode !== null) { if ('form' === 'form' && is_array($domainsMode)) { @@ -1729,8 +1618,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($codeSlots !== null) { if ('form' === 'form' && is_array($codeSlots)) { @@ -1744,8 +1631,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($codeSlotsMode !== null) { if ('form' === 'form' && is_array($codeSlotsMode)) { @@ -1759,8 +1644,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($codes !== null) { if ('form' === 'form' && is_array($codes)) { @@ -1774,8 +1657,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($codesMode !== null) { if ('form' === 'form' && is_array($codesMode)) { @@ -1789,8 +1670,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($requestDurationSlots !== null) { if ('form' === 'form' && is_array($requestDurationSlots)) { @@ -1804,8 +1683,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // query params if ($requestDurationSlotsMode !== null) { if ('form' === 'form' && is_array($requestDurationSlotsMode)) { @@ -1819,8 +1696,6 @@ private function httpMetricsTimelineUserAgentsRequest( } } - - // path params if ($projectId !== null) { @@ -1840,7 +1715,6 @@ private function httpMetricsTimelineUserAgentsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/InvoicesApi.php b/src/Api/InvoicesApi.php index ee976def5..5076fd5a6 100644 --- a/src/Api/InvoicesApi.php +++ b/src/Api/InvoicesApi.php @@ -13,6 +13,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Invoice; +use Upsun\Model\ListOrgInvoices200Response; /** * Low level InvoicesApi (auto-generated) @@ -66,7 +68,7 @@ public function __construct( public function getOrgInvoice( string $invoiceId, string $organizationId - ): \Upsun\Model\Invoice { + ): Invoice { return $this->getOrgInvoiceWithHttpInfo( $invoiceId, $organizationId @@ -88,7 +90,7 @@ public function getOrgInvoice( private function getOrgInvoiceWithHttpInfo( string $invoiceId, string $organizationId - ): \Upsun\Model\Invoice { + ): Invoice { $request = $this->getOrgInvoiceRequest( $invoiceId, $organizationId @@ -136,7 +138,6 @@ private function getOrgInvoiceRequest( string $invoiceId, string $organizationId ): RequestInterface { - // verify the required parameter 'invoiceId' is set if (empty($invoiceId)) { throw new InvalidArgumentException( @@ -178,7 +179,6 @@ private function getOrgInvoiceRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -263,7 +263,7 @@ public function listOrgInvoices( ?string $filterType = null, ?string $filterOrderId = null, ?int $page = null - ): \Upsun\Model\ListOrgInvoices200Response { + ): ListOrgInvoices200Response { return $this->listOrgInvoicesWithHttpInfo( $organizationId, $filterStatus, @@ -298,7 +298,7 @@ private function listOrgInvoicesWithHttpInfo( ?string $filterType = null, ?string $filterOrderId = null, ?int $page = null - ): \Upsun\Model\ListOrgInvoices200Response { + ): ListOrgInvoices200Response { $request = $this->listOrgInvoicesRequest( $organizationId, $filterStatus, @@ -359,7 +359,6 @@ private function listOrgInvoicesRequest( ?string $filterOrderId = null, ?int $page = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -388,8 +387,6 @@ private function listOrgInvoicesRequest( } } - - // query params if ($filterType !== null) { if ('form' === 'form' && is_array($filterType)) { @@ -403,8 +400,6 @@ private function listOrgInvoicesRequest( } } - - // query params if ($filterOrderId !== null) { if ('form' === 'form' && is_array($filterOrderId)) { @@ -418,8 +413,6 @@ private function listOrgInvoicesRequest( } } - - // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -433,8 +426,6 @@ private function listOrgInvoicesRequest( } } - - // path params if ($organizationId !== null) { @@ -445,7 +436,6 @@ private function listOrgInvoicesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/MfaApi.php b/src/Api/MfaApi.php index cb8365516..cbca2b9e4 100644 --- a/src/Api/MfaApi.php +++ b/src/Api/MfaApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,11 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ConfirmTotpEnrollment200Response; +use Upsun\Model\ConfirmTotpEnrollmentRequest; +use Upsun\Model\GetTotpEnrollment200Response; +use Upsun\Model\OrganizationMfaEnforcement; +use Upsun\Model\SendOrgMfaRemindersRequest; /** * Low level MfaApi (auto-generated) @@ -63,8 +67,8 @@ public function __construct( */ public function confirmTotpEnrollment( string $userId, - ?\Upsun\Model\ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null - ): \Upsun\Model\ConfirmTotpEnrollment200Response { + ?ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null + ): ConfirmTotpEnrollment200Response { return $this->confirmTotpEnrollmentWithHttpInfo( $userId, $confirmTotpEnrollmentRequest @@ -83,8 +87,8 @@ public function confirmTotpEnrollment( */ private function confirmTotpEnrollmentWithHttpInfo( string $userId, - ?\Upsun\Model\ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null - ): \Upsun\Model\ConfirmTotpEnrollment200Response { + ?ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null + ): ConfirmTotpEnrollment200Response { $request = $this->confirmTotpEnrollmentRequest( $userId, $confirmTotpEnrollmentRequest @@ -128,9 +132,8 @@ private function confirmTotpEnrollmentWithHttpInfo( */ private function confirmTotpEnrollmentRequest( string $userId, - ?\Upsun\Model\ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null + ?ConfirmTotpEnrollmentRequest $confirmTotpEnrollmentRequest = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -156,7 +159,6 @@ private function confirmTotpEnrollmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -289,7 +291,6 @@ private function disableOrgMfaEnforcementWithHttpInfo( private function disableOrgMfaEnforcementRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -315,7 +316,6 @@ private function disableOrgMfaEnforcementRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -440,7 +440,6 @@ private function enableOrgMfaEnforcementWithHttpInfo( private function enableOrgMfaEnforcementRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -466,7 +465,6 @@ private function enableOrgMfaEnforcementRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -538,7 +536,7 @@ private function enableOrgMfaEnforcementRequest( */ public function getOrgMfaEnforcement( string $organizationId - ): \Upsun\Model\OrganizationMfaEnforcement { + ): OrganizationMfaEnforcement { return $this->getOrgMfaEnforcementWithHttpInfo( $organizationId ); @@ -556,7 +554,7 @@ public function getOrgMfaEnforcement( */ private function getOrgMfaEnforcementWithHttpInfo( string $organizationId - ): \Upsun\Model\OrganizationMfaEnforcement { + ): OrganizationMfaEnforcement { $request = $this->getOrgMfaEnforcementRequest( $organizationId ); @@ -600,7 +598,6 @@ private function getOrgMfaEnforcementWithHttpInfo( private function getOrgMfaEnforcementRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -626,7 +623,6 @@ private function getOrgMfaEnforcementRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -697,7 +693,7 @@ private function getOrgMfaEnforcementRequest( */ public function getTotpEnrollment( string $userId - ): \Upsun\Model\GetTotpEnrollment200Response { + ): GetTotpEnrollment200Response { return $this->getTotpEnrollmentWithHttpInfo( $userId ); @@ -714,7 +710,7 @@ public function getTotpEnrollment( */ private function getTotpEnrollmentWithHttpInfo( string $userId - ): \Upsun\Model\GetTotpEnrollment200Response { + ): GetTotpEnrollment200Response { $request = $this->getTotpEnrollmentRequest( $userId ); @@ -757,7 +753,6 @@ private function getTotpEnrollmentWithHttpInfo( private function getTotpEnrollmentRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -783,7 +778,6 @@ private function getTotpEnrollmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -854,7 +848,7 @@ private function getTotpEnrollmentRequest( */ public function recreateRecoveryCodes( string $userId - ): \Upsun\Model\ConfirmTotpEnrollment200Response { + ): ConfirmTotpEnrollment200Response { return $this->recreateRecoveryCodesWithHttpInfo( $userId ); @@ -871,7 +865,7 @@ public function recreateRecoveryCodes( */ private function recreateRecoveryCodesWithHttpInfo( string $userId - ): \Upsun\Model\ConfirmTotpEnrollment200Response { + ): ConfirmTotpEnrollment200Response { $request = $this->recreateRecoveryCodesRequest( $userId ); @@ -914,7 +908,6 @@ private function recreateRecoveryCodesWithHttpInfo( private function recreateRecoveryCodesRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -940,7 +933,6 @@ private function recreateRecoveryCodesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1011,7 +1003,7 @@ private function recreateRecoveryCodesRequest( */ public function sendOrgMfaReminders( string $organizationId, - ?\Upsun\Model\SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null + ?SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null ): array { return $this->sendOrgMfaRemindersWithHttpInfo( $organizationId, @@ -1030,7 +1022,7 @@ public function sendOrgMfaReminders( */ private function sendOrgMfaRemindersWithHttpInfo( string $organizationId, - ?\Upsun\Model\SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null + ?SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null ): array { $request = $this->sendOrgMfaRemindersRequest( $organizationId, @@ -1074,9 +1066,8 @@ private function sendOrgMfaRemindersWithHttpInfo( */ private function sendOrgMfaRemindersRequest( string $organizationId, - ?\Upsun\Model\SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null + ?SendOrgMfaRemindersRequest $sendOrgMfaRemindersRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1102,7 +1093,6 @@ private function sendOrgMfaRemindersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1235,7 +1225,6 @@ private function withdrawTotpEnrollmentWithHttpInfo( private function withdrawTotpEnrollmentRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1261,7 +1250,6 @@ private function withdrawTotpEnrollmentRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/OrdersApi.php b/src/Api/OrdersApi.php index 76f08f3f0..eec215916 100644 --- a/src/Api/OrdersApi.php +++ b/src/Api/OrdersApi.php @@ -13,6 +13,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CreateAuthorizationCredentials200Response; +use Upsun\Model\ListOrgOrders200Response; +use Upsun\Model\Order; /** * Low level OrdersApi (auto-generated) @@ -66,7 +69,7 @@ public function __construct( public function createAuthorizationCredentials( string $organizationId, string $orderId - ): \Upsun\Model\CreateAuthorizationCredentials200Response { + ): CreateAuthorizationCredentials200Response { return $this->createAuthorizationCredentialsWithHttpInfo( $organizationId, $orderId @@ -88,7 +91,7 @@ public function createAuthorizationCredentials( private function createAuthorizationCredentialsWithHttpInfo( string $organizationId, string $orderId - ): \Upsun\Model\CreateAuthorizationCredentials200Response { + ): CreateAuthorizationCredentials200Response { $request = $this->createAuthorizationCredentialsRequest( $organizationId, $orderId @@ -136,7 +139,6 @@ private function createAuthorizationCredentialsRequest( string $organizationId, string $orderId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -178,7 +180,6 @@ private function createAuthorizationCredentialsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -305,7 +306,6 @@ private function downloadInvoiceWithHttpInfo( private function downloadInvoiceRequest( string $token ): RequestInterface { - // verify the required parameter 'token' is set if (empty($token)) { throw new InvalidArgumentException( @@ -334,10 +334,6 @@ private function downloadInvoiceRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/pdf'], '', @@ -415,7 +411,7 @@ public function getOrgOrder( string $organizationId, string $orderId, ?string $mode = null - ): \Upsun\Model\Order { + ): Order { return $this->getOrgOrderWithHttpInfo( $organizationId, $orderId, @@ -441,7 +437,7 @@ private function getOrgOrderWithHttpInfo( string $organizationId, string $orderId, ?string $mode = null - ): \Upsun\Model\Order { + ): Order { $request = $this->getOrgOrderRequest( $organizationId, $orderId, @@ -493,7 +489,6 @@ private function getOrgOrderRequest( string $orderId, ?string $mode = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -529,8 +524,6 @@ private function getOrgOrderRequest( } } - - // path params if ($organizationId !== null) { @@ -550,7 +543,6 @@ private function getOrgOrderRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -634,7 +626,7 @@ public function listOrgOrders( ?int $filterTotal = null, ?int $page = null, ?string $mode = null - ): \Upsun\Model\ListOrgOrders200Response { + ): ListOrgOrders200Response { return $this->listOrgOrdersWithHttpInfo( $organizationId, $filterStatus, @@ -668,7 +660,7 @@ private function listOrgOrdersWithHttpInfo( ?int $filterTotal = null, ?int $page = null, ?string $mode = null - ): \Upsun\Model\ListOrgOrders200Response { + ): ListOrgOrders200Response { $request = $this->listOrgOrdersRequest( $organizationId, $filterStatus, @@ -728,7 +720,6 @@ private function listOrgOrdersRequest( ?int $page = null, ?string $mode = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -757,8 +748,6 @@ private function listOrgOrdersRequest( } } - - // query params if ($filterTotal !== null) { if ('form' === 'form' && is_array($filterTotal)) { @@ -772,8 +761,6 @@ private function listOrgOrdersRequest( } } - - // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -787,8 +774,6 @@ private function listOrgOrdersRequest( } } - - // query params if ($mode !== null) { if ('form' === 'form' && is_array($mode)) { @@ -802,8 +787,6 @@ private function listOrgOrdersRequest( } } - - // path params if ($organizationId !== null) { @@ -814,7 +797,6 @@ private function listOrgOrdersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/OrganizationInvitationsApi.php b/src/Api/OrganizationInvitationsApi.php index 89c7bdc9b..e631b5151 100644 --- a/src/Api/OrganizationInvitationsApi.php +++ b/src/Api/OrganizationInvitationsApi.php @@ -13,6 +13,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CreateOrgInviteRequest; +use Upsun\Model\OrganizationInvitation; +use Upsun\Model\StringFilter; /** * Low level OrganizationInvitationsApi (auto-generated) @@ -127,7 +130,6 @@ private function cancelOrgInviteRequest( string $organizationId, string $invitationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -169,7 +171,6 @@ private function cancelOrgInviteRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -240,8 +241,8 @@ private function cancelOrgInviteRequest( */ public function createOrgInvite( string $organizationId, - ?\Upsun\Model\CreateOrgInviteRequest $createOrgInviteRequest = null - ): \Upsun\Model\OrganizationInvitation { + ?CreateOrgInviteRequest $createOrgInviteRequest = null + ): OrganizationInvitation { return $this->createOrgInviteWithHttpInfo( $organizationId, $createOrgInviteRequest @@ -259,8 +260,8 @@ public function createOrgInvite( */ private function createOrgInviteWithHttpInfo( string $organizationId, - ?\Upsun\Model\CreateOrgInviteRequest $createOrgInviteRequest = null - ): \Upsun\Model\OrganizationInvitation { + ?CreateOrgInviteRequest $createOrgInviteRequest = null + ): OrganizationInvitation { $request = $this->createOrgInviteRequest( $organizationId, $createOrgInviteRequest @@ -303,9 +304,8 @@ private function createOrgInviteWithHttpInfo( */ private function createOrgInviteRequest( string $organizationId, - ?\Upsun\Model\CreateOrgInviteRequest $createOrgInviteRequest = null + ?CreateOrgInviteRequest $createOrgInviteRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -331,7 +331,6 @@ private function createOrgInviteRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -417,7 +416,7 @@ private function createOrgInviteRequest( */ public function listOrgInvites( string $organizationId, - ?\Upsun\Model\StringFilter $filterState = null, + ?StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -451,7 +450,7 @@ public function listOrgInvites( */ private function listOrgInvitesWithHttpInfo( string $organizationId, - ?\Upsun\Model\StringFilter $filterState = null, + ?StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -508,13 +507,12 @@ private function listOrgInvitesWithHttpInfo( */ private function listOrgInvitesRequest( string $organizationId, - ?\Upsun\Model\StringFilter $filterState = null, + ?StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -537,8 +535,6 @@ private function listOrgInvitesRequest( ); } - - $resourcePath = '/organizations/{organization_id}/invitations'; $formParams = []; $queryParams = []; @@ -559,8 +555,6 @@ private function listOrgInvitesRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -574,8 +568,6 @@ private function listOrgInvitesRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -589,8 +581,6 @@ private function listOrgInvitesRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -604,8 +594,6 @@ private function listOrgInvitesRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -619,8 +607,6 @@ private function listOrgInvitesRequest( } } - - // path params if ($organizationId !== null) { @@ -631,7 +617,6 @@ private function listOrgInvitesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/OrganizationManagementApi.php b/src/Api/OrganizationManagementApi.php index 87c0b80fa..5332c55a7 100644 --- a/src/Api/OrganizationManagementApi.php +++ b/src/Api/OrganizationManagementApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,11 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\GetOrgPrepaymentInfo200Response; +use Upsun\Model\ListOrgPrepaymentTransactions200Response; +use Upsun\Model\OrganizationAlertConfig; +use Upsun\Model\OrganizationEstimationObject; +use Upsun\Model\UpdateOrgBillingAlertConfigRequest; /** * Low level OrganizationManagementApi (auto-generated) @@ -63,7 +67,7 @@ public function __construct( */ public function estimateOrg( string $organizationId - ): \Upsun\Model\OrganizationEstimationObject { + ): OrganizationEstimationObject { return $this->estimateOrgWithHttpInfo( $organizationId ); @@ -81,7 +85,7 @@ public function estimateOrg( */ private function estimateOrgWithHttpInfo( string $organizationId - ): \Upsun\Model\OrganizationEstimationObject { + ): OrganizationEstimationObject { $request = $this->estimateOrgRequest( $organizationId ); @@ -125,7 +129,6 @@ private function estimateOrgWithHttpInfo( private function estimateOrgRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -151,7 +154,6 @@ private function estimateOrgRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -223,7 +225,7 @@ private function estimateOrgRequest( */ public function getOrgBillingAlertConfig( string $organizationId - ): \Upsun\Model\OrganizationAlertConfig { + ): OrganizationAlertConfig { return $this->getOrgBillingAlertConfigWithHttpInfo( $organizationId ); @@ -241,7 +243,7 @@ public function getOrgBillingAlertConfig( */ private function getOrgBillingAlertConfigWithHttpInfo( string $organizationId - ): \Upsun\Model\OrganizationAlertConfig { + ): OrganizationAlertConfig { $request = $this->getOrgBillingAlertConfigRequest( $organizationId ); @@ -285,7 +287,6 @@ private function getOrgBillingAlertConfigWithHttpInfo( private function getOrgBillingAlertConfigRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -311,7 +312,6 @@ private function getOrgBillingAlertConfigRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -382,7 +382,7 @@ private function getOrgBillingAlertConfigRequest( */ public function getOrgPrepaymentInfo( string $organizationId - ): \Upsun\Model\GetOrgPrepaymentInfo200Response { + ): GetOrgPrepaymentInfo200Response { return $this->getOrgPrepaymentInfoWithHttpInfo( $organizationId ); @@ -399,7 +399,7 @@ public function getOrgPrepaymentInfo( */ private function getOrgPrepaymentInfoWithHttpInfo( string $organizationId - ): \Upsun\Model\GetOrgPrepaymentInfo200Response { + ): GetOrgPrepaymentInfo200Response { $request = $this->getOrgPrepaymentInfoRequest( $organizationId ); @@ -442,7 +442,6 @@ private function getOrgPrepaymentInfoWithHttpInfo( private function getOrgPrepaymentInfoRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -468,7 +467,6 @@ private function getOrgPrepaymentInfoRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -539,7 +537,7 @@ private function getOrgPrepaymentInfoRequest( */ public function listOrgPrepaymentTransactions( string $organizationId - ): \Upsun\Model\ListOrgPrepaymentTransactions200Response { + ): ListOrgPrepaymentTransactions200Response { return $this->listOrgPrepaymentTransactionsWithHttpInfo( $organizationId ); @@ -556,7 +554,7 @@ public function listOrgPrepaymentTransactions( */ private function listOrgPrepaymentTransactionsWithHttpInfo( string $organizationId - ): \Upsun\Model\ListOrgPrepaymentTransactions200Response { + ): ListOrgPrepaymentTransactions200Response { $request = $this->listOrgPrepaymentTransactionsRequest( $organizationId ); @@ -599,7 +597,6 @@ private function listOrgPrepaymentTransactionsWithHttpInfo( private function listOrgPrepaymentTransactionsRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -625,7 +622,6 @@ private function listOrgPrepaymentTransactionsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -697,8 +693,8 @@ private function listOrgPrepaymentTransactionsRequest( */ public function updateOrgBillingAlertConfig( string $organizationId, - ?\Upsun\Model\UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null - ): \Upsun\Model\OrganizationAlertConfig { + ?UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null + ): OrganizationAlertConfig { return $this->updateOrgBillingAlertConfigWithHttpInfo( $organizationId, $updateOrgBillingAlertConfigRequest @@ -717,8 +713,8 @@ public function updateOrgBillingAlertConfig( */ private function updateOrgBillingAlertConfigWithHttpInfo( string $organizationId, - ?\Upsun\Model\UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null - ): \Upsun\Model\OrganizationAlertConfig { + ?UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null + ): OrganizationAlertConfig { $request = $this->updateOrgBillingAlertConfigRequest( $organizationId, $updateOrgBillingAlertConfigRequest @@ -762,9 +758,8 @@ private function updateOrgBillingAlertConfigWithHttpInfo( */ private function updateOrgBillingAlertConfigRequest( string $organizationId, - ?\Upsun\Model\UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null + ?UpdateOrgBillingAlertConfigRequest $updateOrgBillingAlertConfigRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -790,7 +785,6 @@ private function updateOrgBillingAlertConfigRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/OrganizationMembersApi.php b/src/Api/OrganizationMembersApi.php index 72965b24e..9239dd845 100644 --- a/src/Api/OrganizationMembersApi.php +++ b/src/Api/OrganizationMembersApi.php @@ -13,6 +13,11 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ArrayFilter; +use Upsun\Model\CreateOrgMemberRequest; +use Upsun\Model\ListOrgMembers200Response; +use Upsun\Model\OrganizationMember; +use Upsun\Model\UpdateOrgMemberRequest; /** * Low level OrganizationMembersApi (auto-generated) @@ -62,8 +67,8 @@ public function __construct( */ public function createOrgMember( string $organizationId, - \Upsun\Model\CreateOrgMemberRequest $createOrgMemberRequest - ): \Upsun\Model\OrganizationMember { + CreateOrgMemberRequest $createOrgMemberRequest + ): OrganizationMember { return $this->createOrgMemberWithHttpInfo( $organizationId, $createOrgMemberRequest @@ -81,8 +86,8 @@ public function createOrgMember( */ private function createOrgMemberWithHttpInfo( string $organizationId, - \Upsun\Model\CreateOrgMemberRequest $createOrgMemberRequest - ): \Upsun\Model\OrganizationMember { + CreateOrgMemberRequest $createOrgMemberRequest + ): OrganizationMember { $request = $this->createOrgMemberRequest( $organizationId, $createOrgMemberRequest @@ -125,9 +130,8 @@ private function createOrgMemberWithHttpInfo( */ private function createOrgMemberRequest( string $organizationId, - \Upsun\Model\CreateOrgMemberRequest $createOrgMemberRequest + CreateOrgMemberRequest $createOrgMemberRequest ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -160,7 +164,6 @@ private function createOrgMemberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -304,7 +307,6 @@ private function deleteOrgMemberRequest( string $organizationId, string $userId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -346,7 +348,6 @@ private function deleteOrgMemberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -421,7 +422,7 @@ private function deleteOrgMemberRequest( public function getOrgMember( string $organizationId, string $userId - ): \Upsun\Model\OrganizationMember { + ): OrganizationMember { return $this->getOrgMemberWithHttpInfo( $organizationId, $userId @@ -443,7 +444,7 @@ public function getOrgMember( private function getOrgMemberWithHttpInfo( string $organizationId, string $userId - ): \Upsun\Model\OrganizationMember { + ): OrganizationMember { $request = $this->getOrgMemberRequest( $organizationId, $userId @@ -491,7 +492,6 @@ private function getOrgMemberRequest( string $organizationId, string $userId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -533,7 +533,6 @@ private function getOrgMemberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -610,12 +609,12 @@ private function getOrgMemberRequest( */ public function listOrgMembers( string $organizationId, - ?\Upsun\Model\ArrayFilter $filterPermissions = null, + ?ArrayFilter $filterPermissions = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListOrgMembers200Response { + ): ListOrgMembers200Response { return $this->listOrgMembersWithHttpInfo( $organizationId, $filterPermissions, @@ -643,12 +642,12 @@ public function listOrgMembers( */ private function listOrgMembersWithHttpInfo( string $organizationId, - ?\Upsun\Model\ArrayFilter $filterPermissions = null, + ?ArrayFilter $filterPermissions = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListOrgMembers200Response { + ): ListOrgMembers200Response { $request = $this->listOrgMembersRequest( $organizationId, $filterPermissions, @@ -701,13 +700,12 @@ private function listOrgMembersWithHttpInfo( */ private function listOrgMembersRequest( string $organizationId, - ?\Upsun\Model\ArrayFilter $filterPermissions = null, + ?ArrayFilter $filterPermissions = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -730,8 +728,6 @@ private function listOrgMembersRequest( ); } - - $resourcePath = '/organizations/{organization_id}/members'; $formParams = []; $queryParams = []; @@ -752,8 +748,6 @@ private function listOrgMembersRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -767,8 +761,6 @@ private function listOrgMembersRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -782,8 +774,6 @@ private function listOrgMembersRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -797,8 +787,6 @@ private function listOrgMembersRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -812,8 +800,6 @@ private function listOrgMembersRequest( } } - - // path params if ($organizationId !== null) { @@ -824,7 +810,6 @@ private function listOrgMembersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -898,8 +883,8 @@ private function listOrgMembersRequest( public function updateOrgMember( string $organizationId, string $userId, - ?\Upsun\Model\UpdateOrgMemberRequest $updateOrgMemberRequest = null - ): \Upsun\Model\OrganizationMember { + ?UpdateOrgMemberRequest $updateOrgMemberRequest = null + ): OrganizationMember { return $this->updateOrgMemberWithHttpInfo( $organizationId, $userId, @@ -921,8 +906,8 @@ public function updateOrgMember( private function updateOrgMemberWithHttpInfo( string $organizationId, string $userId, - ?\Upsun\Model\UpdateOrgMemberRequest $updateOrgMemberRequest = null - ): \Upsun\Model\OrganizationMember { + ?UpdateOrgMemberRequest $updateOrgMemberRequest = null + ): OrganizationMember { $request = $this->updateOrgMemberRequest( $organizationId, $userId, @@ -969,9 +954,8 @@ private function updateOrgMemberWithHttpInfo( private function updateOrgMemberRequest( string $organizationId, string $userId, - ?\Upsun\Model\UpdateOrgMemberRequest $updateOrgMemberRequest = null + ?UpdateOrgMemberRequest $updateOrgMemberRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1013,7 +997,6 @@ private function updateOrgMemberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/OrganizationProjectsApi.php b/src/Api/OrganizationProjectsApi.php index d86982290..1deb18ffb 100644 --- a/src/Api/OrganizationProjectsApi.php +++ b/src/Api/OrganizationProjectsApi.php @@ -4,6 +4,7 @@ use DateTime; use Exception; +use Generator; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; use Psr\Http\Client\ClientExceptionInterface; @@ -13,6 +14,12 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CreateOrgProjectRequest; +use Upsun\Model\DateTimeFilter; +use Upsun\Model\OrganizationProject; +use Upsun\Model\ProjectCarbon; +use Upsun\Model\StringFilter; +use Upsun\Model\UpdateOrgProjectRequest; /** * Low level OrganizationProjectsApi (auto-generated) @@ -62,8 +69,8 @@ public function __construct( */ public function createOrgProject( string $organizationId, - \Upsun\Model\CreateOrgProjectRequest $createOrgProjectRequest - ): \Upsun\Model\OrganizationProject { + CreateOrgProjectRequest $createOrgProjectRequest + ): OrganizationProject { return $this->createOrgProjectWithHttpInfo( $organizationId, $createOrgProjectRequest @@ -81,8 +88,8 @@ public function createOrgProject( */ private function createOrgProjectWithHttpInfo( string $organizationId, - \Upsun\Model\CreateOrgProjectRequest $createOrgProjectRequest - ): \Upsun\Model\OrganizationProject { + CreateOrgProjectRequest $createOrgProjectRequest + ): OrganizationProject { $request = $this->createOrgProjectRequest( $organizationId, $createOrgProjectRequest @@ -125,9 +132,8 @@ private function createOrgProjectWithHttpInfo( */ private function createOrgProjectRequest( string $organizationId, - \Upsun\Model\CreateOrgProjectRequest $createOrgProjectRequest + CreateOrgProjectRequest $createOrgProjectRequest ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -160,7 +166,6 @@ private function createOrgProjectRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -304,7 +309,6 @@ private function deleteOrgProjectRequest( string $organizationId, string $projectId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -346,7 +350,6 @@ private function deleteOrgProjectRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -420,7 +423,7 @@ private function deleteOrgProjectRequest( public function getOrgProject( string $organizationId, string $projectId - ): \Upsun\Model\OrganizationProject { + ): OrganizationProject { return $this->getOrgProjectWithHttpInfo( $organizationId, $projectId @@ -441,7 +444,7 @@ public function getOrgProject( private function getOrgProjectWithHttpInfo( string $organizationId, string $projectId - ): \Upsun\Model\OrganizationProject { + ): OrganizationProject { $request = $this->getOrgProjectRequest( $organizationId, $projectId @@ -488,7 +491,6 @@ private function getOrgProjectRequest( string $organizationId, string $projectId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -530,7 +532,6 @@ private function getOrgProjectRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -619,11 +620,11 @@ private function getOrgProjectRequest( */ public function listOrgProjects( string $organizationId, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterTitle = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, - ?\Upsun\Model\DateTimeFilter $filterCreatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterTitle = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?DateTimeFilter $filterCreatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -672,11 +673,11 @@ public function listOrgProjects( */ private function listOrgProjectsWithHttpInfo( string $organizationId, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterTitle = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, - ?\Upsun\Model\DateTimeFilter $filterCreatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterTitle = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?DateTimeFilter $filterCreatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -750,17 +751,16 @@ private function listOrgProjectsWithHttpInfo( */ private function listOrgProjectsRequest( string $organizationId, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterTitle = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, - ?\Upsun\Model\DateTimeFilter $filterCreatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterTitle = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, + ?DateTimeFilter $filterCreatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -783,8 +783,6 @@ private function listOrgProjectsRequest( ); } - - $resourcePath = '/organizations/{organization_id}/projects'; $formParams = []; $queryParams = []; @@ -805,8 +803,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($filterTitle !== null) { if ('form' === 'deepObject' && is_array($filterTitle)) { @@ -820,8 +816,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($filterStatus !== null) { if ('form' === 'deepObject' && is_array($filterStatus)) { @@ -835,8 +829,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -850,8 +842,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($filterCreatedAt !== null) { if ('form' === 'deepObject' && is_array($filterCreatedAt)) { @@ -865,8 +855,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -880,8 +868,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -895,8 +881,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -910,8 +894,6 @@ private function listOrgProjectsRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -925,8 +907,6 @@ private function listOrgProjectsRequest( } } - - // path params if ($organizationId !== null) { @@ -937,7 +917,6 @@ private function listOrgProjectsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1018,10 +997,10 @@ private function listOrgProjectsRequest( public function queryProjectCarbon( string $organizationId, string $projectId, - ?\Upsun\Model\DateTimeFilter $from = null, - ?\Upsun\Model\DateTimeFilter $to = null, + ?DateTimeFilter $from = null, + ?DateTimeFilter $to = null, ?string $interval = null - ): \Upsun\Model\ProjectCarbon { + ): ProjectCarbon { return $this->queryProjectCarbonWithHttpInfo( $organizationId, $projectId, @@ -1052,10 +1031,10 @@ public function queryProjectCarbon( private function queryProjectCarbonWithHttpInfo( string $organizationId, string $projectId, - ?\Upsun\Model\DateTimeFilter $from = null, - ?\Upsun\Model\DateTimeFilter $to = null, + ?DateTimeFilter $from = null, + ?DateTimeFilter $to = null, ?string $interval = null - ): \Upsun\Model\ProjectCarbon { + ): ProjectCarbon { $request = $this->queryProjectCarbonRequest( $organizationId, $projectId, @@ -1111,11 +1090,10 @@ private function queryProjectCarbonWithHttpInfo( private function queryProjectCarbonRequest( string $organizationId, string $projectId, - ?\Upsun\Model\DateTimeFilter $from = null, - ?\Upsun\Model\DateTimeFilter $to = null, + ?DateTimeFilter $from = null, + ?DateTimeFilter $to = null, ?string $interval = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1151,8 +1129,6 @@ private function queryProjectCarbonRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -1166,8 +1142,6 @@ private function queryProjectCarbonRequest( } } - - // query params if ($interval !== null) { if ('form' === 'form' && is_array($interval)) { @@ -1181,8 +1155,6 @@ private function queryProjectCarbonRequest( } } - - // path params if ($organizationId !== null) { @@ -1202,7 +1174,6 @@ private function queryProjectCarbonRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1281,7 +1252,7 @@ private function queryProjectCarbonRequest( */ public function streamOrgProjectProvisioning( string $organizationId - ): \Generator { + ): Generator { return $this->streamOrgProjectProvisioningWithHttpInfo( $organizationId ); @@ -1300,7 +1271,7 @@ public function streamOrgProjectProvisioning( */ private function streamOrgProjectProvisioningWithHttpInfo( string $organizationId - ): \Generator { + ): Generator { $request = $this->streamOrgProjectProvisioningRequest( $organizationId ); @@ -1343,7 +1314,6 @@ private function streamOrgProjectProvisioningWithHttpInfo( private function streamOrgProjectProvisioningRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1369,7 +1339,6 @@ private function streamOrgProjectProvisioningRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/x-ndjson', 'application/problem+json'], '', @@ -1443,8 +1412,8 @@ private function streamOrgProjectProvisioningRequest( public function updateOrgProject( string $organizationId, string $projectId, - ?\Upsun\Model\UpdateOrgProjectRequest $updateOrgProjectRequest = null - ): \Upsun\Model\OrganizationProject { + ?UpdateOrgProjectRequest $updateOrgProjectRequest = null + ): OrganizationProject { return $this->updateOrgProjectWithHttpInfo( $organizationId, $projectId, @@ -1466,8 +1435,8 @@ public function updateOrgProject( private function updateOrgProjectWithHttpInfo( string $organizationId, string $projectId, - ?\Upsun\Model\UpdateOrgProjectRequest $updateOrgProjectRequest = null - ): \Upsun\Model\OrganizationProject { + ?UpdateOrgProjectRequest $updateOrgProjectRequest = null + ): OrganizationProject { $request = $this->updateOrgProjectRequest( $organizationId, $projectId, @@ -1514,9 +1483,8 @@ private function updateOrgProjectWithHttpInfo( private function updateOrgProjectRequest( string $organizationId, string $projectId, - ?\Upsun\Model\UpdateOrgProjectRequest $updateOrgProjectRequest = null + ?UpdateOrgProjectRequest $updateOrgProjectRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1558,7 +1526,6 @@ private function updateOrgProjectRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index 08fc3b32d..d44d6568a 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -13,6 +13,14 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ArrayFilter; +use Upsun\Model\CreateOrgRequest; +use Upsun\Model\DateTimeFilter; +use Upsun\Model\ListOrgs200Response; +use Upsun\Model\ListUserOrgs200Response; +use Upsun\Model\Organization; +use Upsun\Model\StringFilter; +use Upsun\Model\UpdateOrgRequest; /** * Low level OrganizationsApi (auto-generated) @@ -59,8 +67,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Organizations/operation/create-org */ public function createOrg( - \Upsun\Model\CreateOrgRequest $createOrgRequest - ): \Upsun\Model\Organization { + CreateOrgRequest $createOrgRequest + ): Organization { return $this->createOrgWithHttpInfo( $createOrgRequest ); @@ -74,8 +82,8 @@ public function createOrg( * @throws ClientExceptionInterface */ private function createOrgWithHttpInfo( - \Upsun\Model\CreateOrgRequest $createOrgRequest - ): \Upsun\Model\Organization { + CreateOrgRequest $createOrgRequest + ): Organization { $request = $this->createOrgRequest( $createOrgRequest ); @@ -114,9 +122,8 @@ private function createOrgWithHttpInfo( * @throws InvalidArgumentException */ private function createOrgRequest( - \Upsun\Model\CreateOrgRequest $createOrgRequest + CreateOrgRequest $createOrgRequest ): RequestInterface { - // verify the required parameter 'createOrgRequest' is set if (empty($createOrgRequest)) { throw new InvalidArgumentException( @@ -132,8 +139,6 @@ private function createOrgRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -266,7 +271,6 @@ private function deleteOrgWithHttpInfo( private function deleteOrgRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -292,7 +296,6 @@ private function deleteOrgRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -364,7 +367,7 @@ private function deleteOrgRequest( */ public function getOrg( string $organizationId - ): \Upsun\Model\Organization { + ): Organization { return $this->getOrgWithHttpInfo( $organizationId ); @@ -382,7 +385,7 @@ public function getOrg( */ private function getOrgWithHttpInfo( string $organizationId - ): \Upsun\Model\Organization { + ): Organization { $request = $this->getOrgRequest( $organizationId ); @@ -426,7 +429,6 @@ private function getOrgWithHttpInfo( private function getOrgRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -452,7 +454,6 @@ private function getOrgRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -534,21 +535,21 @@ private function getOrgRequest( * @see https://docs.upsun.com/api/#tag/Organizations/operation/list-orgs */ public function listOrgs( - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterType = null, - ?\Upsun\Model\StringFilter $filterOwnerId = null, - ?\Upsun\Model\StringFilter $filterName = null, - ?\Upsun\Model\StringFilter $filterLabel = null, - ?\Upsun\Model\StringFilter $filterBillingProfileId = null, - ?\Upsun\Model\StringFilter $filterVendor = null, - ?\Upsun\Model\ArrayFilter $filterCapabilities = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterType = null, + ?StringFilter $filterOwnerId = null, + ?StringFilter $filterName = null, + ?StringFilter $filterLabel = null, + ?StringFilter $filterBillingProfileId = null, + ?StringFilter $filterVendor = null, + ?ArrayFilter $filterCapabilities = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListOrgs200Response { + ): ListOrgs200Response { return $this->listOrgsWithHttpInfo( $filterId, $filterType, @@ -589,21 +590,21 @@ public function listOrgs( * @throws ClientExceptionInterface */ private function listOrgsWithHttpInfo( - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterType = null, - ?\Upsun\Model\StringFilter $filterOwnerId = null, - ?\Upsun\Model\StringFilter $filterName = null, - ?\Upsun\Model\StringFilter $filterLabel = null, - ?\Upsun\Model\StringFilter $filterBillingProfileId = null, - ?\Upsun\Model\StringFilter $filterVendor = null, - ?\Upsun\Model\ArrayFilter $filterCapabilities = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterType = null, + ?StringFilter $filterOwnerId = null, + ?StringFilter $filterName = null, + ?StringFilter $filterLabel = null, + ?StringFilter $filterBillingProfileId = null, + ?StringFilter $filterVendor = null, + ?ArrayFilter $filterCapabilities = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListOrgs200Response { + ): ListOrgs200Response { $request = $this->listOrgsRequest( $filterId, $filterType, @@ -669,23 +670,21 @@ private function listOrgsWithHttpInfo( * @throws InvalidArgumentException */ private function listOrgsRequest( - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterType = null, - ?\Upsun\Model\StringFilter $filterOwnerId = null, - ?\Upsun\Model\StringFilter $filterName = null, - ?\Upsun\Model\StringFilter $filterLabel = null, - ?\Upsun\Model\StringFilter $filterBillingProfileId = null, - ?\Upsun\Model\StringFilter $filterVendor = null, - ?\Upsun\Model\ArrayFilter $filterCapabilities = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterType = null, + ?StringFilter $filterOwnerId = null, + ?StringFilter $filterName = null, + ?StringFilter $filterLabel = null, + ?StringFilter $filterBillingProfileId = null, + ?StringFilter $filterVendor = null, + ?ArrayFilter $filterCapabilities = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - - if ($pageSize !== null && $pageSize > 100) { throw new InvalidArgumentException( 'invalid value for "$pageSize" when calling OrganizationsApi.listOrgs, @@ -700,8 +699,6 @@ private function listOrgsRequest( ); } - - $resourcePath = '/organizations'; $formParams = []; $queryParams = []; @@ -722,8 +719,6 @@ private function listOrgsRequest( } } - - // query params if ($filterType !== null) { if ('form' === 'deepObject' && is_array($filterType)) { @@ -737,8 +732,6 @@ private function listOrgsRequest( } } - - // query params if ($filterOwnerId !== null) { if ('form' === 'deepObject' && is_array($filterOwnerId)) { @@ -752,8 +745,6 @@ private function listOrgsRequest( } } - - // query params if ($filterName !== null) { if ('form' === 'deepObject' && is_array($filterName)) { @@ -767,8 +758,6 @@ private function listOrgsRequest( } } - - // query params if ($filterLabel !== null) { if ('form' === 'deepObject' && is_array($filterLabel)) { @@ -782,8 +771,6 @@ private function listOrgsRequest( } } - - // query params if ($filterBillingProfileId !== null) { if ('form' === 'deepObject' && is_array($filterBillingProfileId)) { @@ -797,8 +784,6 @@ private function listOrgsRequest( } } - - // query params if ($filterVendor !== null) { if ('form' === 'deepObject' && is_array($filterVendor)) { @@ -812,8 +797,6 @@ private function listOrgsRequest( } } - - // query params if ($filterCapabilities !== null) { if ('form' === 'deepObject' && is_array($filterCapabilities)) { @@ -827,8 +810,6 @@ private function listOrgsRequest( } } - - // query params if ($filterStatus !== null) { if ('form' === 'deepObject' && is_array($filterStatus)) { @@ -842,8 +823,6 @@ private function listOrgsRequest( } } - - // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -857,8 +836,6 @@ private function listOrgsRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -872,8 +849,6 @@ private function listOrgsRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -887,8 +862,6 @@ private function listOrgsRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -902,8 +875,6 @@ private function listOrgsRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -917,10 +888,6 @@ private function listOrgsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1000,16 +967,16 @@ private function listOrgsRequest( */ public function listUserOrgs( string $userId, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterType = null, - ?\Upsun\Model\StringFilter $filterVendor = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterType = null, + ?StringFilter $filterVendor = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListUserOrgs200Response { + ): ListUserOrgs200Response { return $this->listUserOrgsWithHttpInfo( $userId, $filterId, @@ -1044,16 +1011,16 @@ public function listUserOrgs( */ private function listUserOrgsWithHttpInfo( string $userId, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterType = null, - ?\Upsun\Model\StringFilter $filterVendor = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterType = null, + ?StringFilter $filterVendor = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListUserOrgs200Response { + ): ListUserOrgs200Response { $request = $this->listUserOrgsRequest( $userId, $filterId, @@ -1113,17 +1080,16 @@ private function listUserOrgsWithHttpInfo( */ private function listUserOrgsRequest( string $userId, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterType = null, - ?\Upsun\Model\StringFilter $filterVendor = null, - ?\Upsun\Model\StringFilter $filterStatus = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterType = null, + ?StringFilter $filterVendor = null, + ?StringFilter $filterStatus = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1146,8 +1112,6 @@ private function listUserOrgsRequest( ); } - - $resourcePath = '/users/{user_id}/organizations'; $formParams = []; $queryParams = []; @@ -1168,8 +1132,6 @@ private function listUserOrgsRequest( } } - - // query params if ($filterType !== null) { if ('form' === 'deepObject' && is_array($filterType)) { @@ -1183,8 +1145,6 @@ private function listUserOrgsRequest( } } - - // query params if ($filterVendor !== null) { if ('form' === 'deepObject' && is_array($filterVendor)) { @@ -1198,8 +1158,6 @@ private function listUserOrgsRequest( } } - - // query params if ($filterStatus !== null) { if ('form' === 'deepObject' && is_array($filterStatus)) { @@ -1213,8 +1171,6 @@ private function listUserOrgsRequest( } } - - // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -1228,8 +1184,6 @@ private function listUserOrgsRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1243,8 +1197,6 @@ private function listUserOrgsRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1258,8 +1210,6 @@ private function listUserOrgsRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1273,8 +1223,6 @@ private function listUserOrgsRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1288,8 +1236,6 @@ private function listUserOrgsRequest( } } - - // path params if ($userId !== null) { @@ -1300,7 +1246,6 @@ private function listUserOrgsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1371,8 +1316,8 @@ private function listUserOrgsRequest( */ public function updateOrg( string $organizationId, - ?\Upsun\Model\UpdateOrgRequest $updateOrgRequest = null - ): \Upsun\Model\Organization { + ?UpdateOrgRequest $updateOrgRequest = null + ): Organization { return $this->updateOrgWithHttpInfo( $organizationId, $updateOrgRequest @@ -1390,8 +1335,8 @@ public function updateOrg( */ private function updateOrgWithHttpInfo( string $organizationId, - ?\Upsun\Model\UpdateOrgRequest $updateOrgRequest = null - ): \Upsun\Model\Organization { + ?UpdateOrgRequest $updateOrgRequest = null + ): Organization { $request = $this->updateOrgRequest( $organizationId, $updateOrgRequest @@ -1434,9 +1379,8 @@ private function updateOrgWithHttpInfo( */ private function updateOrgRequest( string $organizationId, - ?\Upsun\Model\UpdateOrgRequest $updateOrgRequest = null + ?UpdateOrgRequest $updateOrgRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1462,7 +1406,6 @@ private function updateOrgRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/PhoneNumberApi.php b/src/Api/PhoneNumberApi.php index 5addd60f1..342021451 100644 --- a/src/Api/PhoneNumberApi.php +++ b/src/Api/PhoneNumberApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ConfirmPhoneNumberRequest; +use Upsun\Model\VerifyPhoneNumber200Response; +use Upsun\Model\VerifyPhoneNumberRequest; /** * Low level PhoneNumberApi (auto-generated) @@ -64,7 +66,7 @@ public function __construct( public function confirmPhoneNumber( string $sid, string $userId, - ?\Upsun\Model\ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null + ?ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null ): void { $this->confirmPhoneNumberWithHttpInfo( $sid, @@ -86,7 +88,7 @@ public function confirmPhoneNumber( private function confirmPhoneNumberWithHttpInfo( string $sid, string $userId, - ?\Upsun\Model\ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null + ?ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null ): void { $request = $this->confirmPhoneNumberRequest( $sid, @@ -127,9 +129,8 @@ private function confirmPhoneNumberWithHttpInfo( private function confirmPhoneNumberRequest( string $sid, string $userId, - ?\Upsun\Model\ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null + ?ConfirmPhoneNumberRequest $confirmPhoneNumberRequest = null ): RequestInterface { - // verify the required parameter 'sid' is set if (empty($sid)) { throw new InvalidArgumentException( @@ -171,7 +172,6 @@ private function confirmPhoneNumberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -250,8 +250,8 @@ private function confirmPhoneNumberRequest( */ public function verifyPhoneNumber( string $userId, - ?\Upsun\Model\VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null - ): \Upsun\Model\VerifyPhoneNumber200Response { + ?VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null + ): VerifyPhoneNumber200Response { return $this->verifyPhoneNumberWithHttpInfo( $userId, $verifyPhoneNumberRequest @@ -269,8 +269,8 @@ public function verifyPhoneNumber( */ private function verifyPhoneNumberWithHttpInfo( string $userId, - ?\Upsun\Model\VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null - ): \Upsun\Model\VerifyPhoneNumber200Response { + ?VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null + ): VerifyPhoneNumber200Response { $request = $this->verifyPhoneNumberRequest( $userId, $verifyPhoneNumberRequest @@ -313,9 +313,8 @@ private function verifyPhoneNumberWithHttpInfo( */ private function verifyPhoneNumberRequest( string $userId, - ?\Upsun\Model\VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null + ?VerifyPhoneNumberRequest $verifyPhoneNumberRequest = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -341,7 +340,6 @@ private function verifyPhoneNumberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ProfilesApi.php b/src/Api/ProfilesApi.php index 88c025c79..81d653434 100644 --- a/src/Api/ProfilesApi.php +++ b/src/Api/ProfilesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Address; +use Upsun\Model\Profile; +use Upsun\Model\UpdateOrgProfileRequest; /** * Low level ProfilesApi (auto-generated) @@ -63,7 +65,7 @@ public function __construct( */ public function getOrgAddress( string $organizationId - ): \Upsun\Model\Address { + ): Address { return $this->getOrgAddressWithHttpInfo( $organizationId ); @@ -81,7 +83,7 @@ public function getOrgAddress( */ private function getOrgAddressWithHttpInfo( string $organizationId - ): \Upsun\Model\Address { + ): Address { $request = $this->getOrgAddressRequest( $organizationId ); @@ -125,7 +127,6 @@ private function getOrgAddressWithHttpInfo( private function getOrgAddressRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -151,7 +152,6 @@ private function getOrgAddressRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -223,7 +223,7 @@ private function getOrgAddressRequest( */ public function getOrgProfile( string $organizationId - ): \Upsun\Model\Profile { + ): Profile { return $this->getOrgProfileWithHttpInfo( $organizationId ); @@ -241,7 +241,7 @@ public function getOrgProfile( */ private function getOrgProfileWithHttpInfo( string $organizationId - ): \Upsun\Model\Profile { + ): Profile { $request = $this->getOrgProfileRequest( $organizationId ); @@ -285,7 +285,6 @@ private function getOrgProfileWithHttpInfo( private function getOrgProfileRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -311,7 +310,6 @@ private function getOrgProfileRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -382,8 +380,8 @@ private function getOrgProfileRequest( */ public function updateOrgAddress( string $organizationId, - ?\Upsun\Model\Address $address = null - ): \Upsun\Model\Address { + ?Address $address = null + ): Address { return $this->updateOrgAddressWithHttpInfo( $organizationId, $address @@ -401,8 +399,8 @@ public function updateOrgAddress( */ private function updateOrgAddressWithHttpInfo( string $organizationId, - ?\Upsun\Model\Address $address = null - ): \Upsun\Model\Address { + ?Address $address = null + ): Address { $request = $this->updateOrgAddressRequest( $organizationId, $address @@ -445,9 +443,8 @@ private function updateOrgAddressWithHttpInfo( */ private function updateOrgAddressRequest( string $organizationId, - ?\Upsun\Model\Address $address = null + ?Address $address = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -473,7 +470,6 @@ private function updateOrgAddressRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -552,8 +548,8 @@ private function updateOrgAddressRequest( */ public function updateOrgProfile( string $organizationId, - ?\Upsun\Model\UpdateOrgProfileRequest $updateOrgProfileRequest = null - ): \Upsun\Model\Profile { + ?UpdateOrgProfileRequest $updateOrgProfileRequest = null + ): Profile { return $this->updateOrgProfileWithHttpInfo( $organizationId, $updateOrgProfileRequest @@ -571,8 +567,8 @@ public function updateOrgProfile( */ private function updateOrgProfileWithHttpInfo( string $organizationId, - ?\Upsun\Model\UpdateOrgProfileRequest $updateOrgProfileRequest = null - ): \Upsun\Model\Profile { + ?UpdateOrgProfileRequest $updateOrgProfileRequest = null + ): Profile { $request = $this->updateOrgProfileRequest( $organizationId, $updateOrgProfileRequest @@ -615,9 +611,8 @@ private function updateOrgProfileWithHttpInfo( */ private function updateOrgProfileRequest( string $organizationId, - ?\Upsun\Model\UpdateOrgProfileRequest $updateOrgProfileRequest = null + ?UpdateOrgProfileRequest $updateOrgProfileRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -643,7 +638,6 @@ private function updateOrgProfileRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/ProjectActivityApi.php b/src/Api/ProjectActivityApi.php index 857e5b55c..6c9d7b75c 100644 --- a/src/Api/ProjectActivityApi.php +++ b/src/Api/ProjectActivityApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Activity; /** * Low level ProjectActivityApi (auto-generated) @@ -63,7 +64,7 @@ public function __construct( public function actionProjectsActivitiesCancel( string $projectId, string $activityId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->actionProjectsActivitiesCancelWithHttpInfo( $projectId, $activityId @@ -80,7 +81,7 @@ public function actionProjectsActivitiesCancel( private function actionProjectsActivitiesCancelWithHttpInfo( string $projectId, string $activityId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->actionProjectsActivitiesCancelRequest( $projectId, $activityId @@ -123,7 +124,6 @@ private function actionProjectsActivitiesCancelRequest( string $projectId, string $activityId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -165,7 +165,6 @@ private function actionProjectsActivitiesCancelRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -237,7 +236,7 @@ private function actionProjectsActivitiesCancelRequest( public function getProjectsActivities( string $projectId, string $activityId - ): \Upsun\Model\Activity { + ): Activity { return $this->getProjectsActivitiesWithHttpInfo( $projectId, $activityId @@ -254,7 +253,7 @@ public function getProjectsActivities( private function getProjectsActivitiesWithHttpInfo( string $projectId, string $activityId - ): \Upsun\Model\Activity { + ): Activity { $request = $this->getProjectsActivitiesRequest( $projectId, $activityId @@ -297,7 +296,6 @@ private function getProjectsActivitiesRequest( string $projectId, string $activityId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -339,7 +337,6 @@ private function getProjectsActivitiesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -479,7 +476,6 @@ private function listProjectsActivitiesWithHttpInfo( private function listProjectsActivitiesRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -505,7 +501,6 @@ private function listProjectsActivitiesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ProjectApi.php b/src/Api/ProjectApi.php index 988ae16ab..2b580f85d 100644 --- a/src/Api/ProjectApi.php +++ b/src/Api/ProjectApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Project; +use Upsun\Model\ProjectCapabilities; /** * Low level ProjectApi (auto-generated) @@ -62,7 +64,7 @@ public function __construct( */ public function actionProjectsClearBuildCache( string $projectId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->actionProjectsClearBuildCacheWithHttpInfo( $projectId ); @@ -77,7 +79,7 @@ public function actionProjectsClearBuildCache( */ private function actionProjectsClearBuildCacheWithHttpInfo( string $projectId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->actionProjectsClearBuildCacheRequest( $projectId ); @@ -118,7 +120,6 @@ private function actionProjectsClearBuildCacheWithHttpInfo( private function actionProjectsClearBuildCacheRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -144,7 +145,6 @@ private function actionProjectsClearBuildCacheRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -213,7 +213,7 @@ private function actionProjectsClearBuildCacheRequest( */ public function getProjects( string $projectId - ): \Upsun\Model\Project { + ): Project { return $this->getProjectsWithHttpInfo( $projectId ); @@ -228,7 +228,7 @@ public function getProjects( */ private function getProjectsWithHttpInfo( string $projectId - ): \Upsun\Model\Project { + ): Project { $request = $this->getProjectsRequest( $projectId ); @@ -269,7 +269,6 @@ private function getProjectsWithHttpInfo( private function getProjectsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -295,7 +294,6 @@ private function getProjectsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -365,7 +363,7 @@ private function getProjectsRequest( */ public function getProjectsCapabilities( string $projectId - ): \Upsun\Model\ProjectCapabilities { + ): ProjectCapabilities { return $this->getProjectsCapabilitiesWithHttpInfo( $projectId ); @@ -380,7 +378,7 @@ public function getProjectsCapabilities( */ private function getProjectsCapabilitiesWithHttpInfo( string $projectId - ): \Upsun\Model\ProjectCapabilities { + ): ProjectCapabilities { $request = $this->getProjectsCapabilitiesRequest( $projectId ); @@ -421,7 +419,6 @@ private function getProjectsCapabilitiesWithHttpInfo( private function getProjectsCapabilitiesRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -447,7 +444,6 @@ private function getProjectsCapabilitiesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -513,7 +509,7 @@ private function getProjectsCapabilitiesRequest( */ public function maintenanceRedeployProject( string $projectId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->maintenanceRedeployProjectWithHttpInfo( $projectId ); @@ -527,7 +523,7 @@ public function maintenanceRedeployProject( */ private function maintenanceRedeployProjectWithHttpInfo( string $projectId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->maintenanceRedeployProjectRequest( $projectId ); @@ -568,7 +564,6 @@ private function maintenanceRedeployProjectWithHttpInfo( private function maintenanceRedeployProjectRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -594,7 +589,6 @@ private function maintenanceRedeployProjectRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ProjectInvitationsApi.php b/src/Api/ProjectInvitationsApi.php index 6fd49aec5..b21d0c44d 100644 --- a/src/Api/ProjectInvitationsApi.php +++ b/src/Api/ProjectInvitationsApi.php @@ -13,6 +13,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CreateProjectInviteRequest; +use Upsun\Model\ProjectInvitation; +use Upsun\Model\StringFilter; /** * Low level ProjectInvitationsApi (auto-generated) @@ -127,7 +130,6 @@ private function cancelProjectInviteRequest( string $projectId, string $invitationId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -169,7 +171,6 @@ private function cancelProjectInviteRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -240,8 +241,8 @@ private function cancelProjectInviteRequest( */ public function createProjectInvite( string $projectId, - ?\Upsun\Model\CreateProjectInviteRequest $createProjectInviteRequest = null - ): \Upsun\Model\ProjectInvitation { + ?CreateProjectInviteRequest $createProjectInviteRequest = null + ): ProjectInvitation { return $this->createProjectInviteWithHttpInfo( $projectId, $createProjectInviteRequest @@ -259,8 +260,8 @@ public function createProjectInvite( */ private function createProjectInviteWithHttpInfo( string $projectId, - ?\Upsun\Model\CreateProjectInviteRequest $createProjectInviteRequest = null - ): \Upsun\Model\ProjectInvitation { + ?CreateProjectInviteRequest $createProjectInviteRequest = null + ): ProjectInvitation { $request = $this->createProjectInviteRequest( $projectId, $createProjectInviteRequest @@ -303,9 +304,8 @@ private function createProjectInviteWithHttpInfo( */ private function createProjectInviteRequest( string $projectId, - ?\Upsun\Model\CreateProjectInviteRequest $createProjectInviteRequest = null + ?CreateProjectInviteRequest $createProjectInviteRequest = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -331,7 +331,6 @@ private function createProjectInviteRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -417,7 +416,7 @@ private function createProjectInviteRequest( */ public function listProjectInvites( string $projectId, - ?\Upsun\Model\StringFilter $filterState = null, + ?StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -451,7 +450,7 @@ public function listProjectInvites( */ private function listProjectInvitesWithHttpInfo( string $projectId, - ?\Upsun\Model\StringFilter $filterState = null, + ?StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -508,13 +507,12 @@ private function listProjectInvitesWithHttpInfo( */ private function listProjectInvitesRequest( string $projectId, - ?\Upsun\Model\StringFilter $filterState = null, + ?StringFilter $filterState = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -537,8 +535,6 @@ private function listProjectInvitesRequest( ); } - - $resourcePath = '/projects/{project_id}/invitations'; $formParams = []; $queryParams = []; @@ -559,8 +555,6 @@ private function listProjectInvitesRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -574,8 +568,6 @@ private function listProjectInvitesRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -589,8 +581,6 @@ private function listProjectInvitesRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -604,8 +594,6 @@ private function listProjectInvitesRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -619,8 +607,6 @@ private function listProjectInvitesRequest( } } - - // path params if ($projectId !== null) { @@ -631,7 +617,6 @@ private function listProjectInvitesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ProjectSettingsApi.php b/src/Api/ProjectSettingsApi.php index f86245677..e5e62e2fc 100644 --- a/src/Api/ProjectSettingsApi.php +++ b/src/Api/ProjectSettingsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\ProjectSettings; +use Upsun\Model\ProjectSettingsPatch; /** * Low level ProjectSettingsApi (auto-generated) @@ -60,7 +62,7 @@ public function __construct( */ public function getProjectsSettings( string $projectId - ): \Upsun\Model\ProjectSettings { + ): ProjectSettings { return $this->getProjectsSettingsWithHttpInfo( $projectId ); @@ -75,7 +77,7 @@ public function getProjectsSettings( */ private function getProjectsSettingsWithHttpInfo( string $projectId - ): \Upsun\Model\ProjectSettings { + ): ProjectSettings { $request = $this->getProjectsSettingsRequest( $projectId ); @@ -116,7 +118,6 @@ private function getProjectsSettingsWithHttpInfo( private function getProjectsSettingsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -142,7 +143,6 @@ private function getProjectsSettingsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -212,8 +212,8 @@ private function getProjectsSettingsRequest( */ public function updateProjectsSettings( string $projectId, - \Upsun\Model\ProjectSettingsPatch $projectSettingsPatch - ): \Upsun\Model\AcceptedResponse { + ProjectSettingsPatch $projectSettingsPatch + ): AcceptedResponse { return $this->updateProjectsSettingsWithHttpInfo( $projectId, $projectSettingsPatch @@ -230,8 +230,8 @@ public function updateProjectsSettings( */ private function updateProjectsSettingsWithHttpInfo( string $projectId, - \Upsun\Model\ProjectSettingsPatch $projectSettingsPatch - ): \Upsun\Model\AcceptedResponse { + ProjectSettingsPatch $projectSettingsPatch + ): AcceptedResponse { $request = $this->updateProjectsSettingsRequest( $projectId, $projectSettingsPatch @@ -273,9 +273,8 @@ private function updateProjectsSettingsWithHttpInfo( */ private function updateProjectsSettingsRequest( string $projectId, - \Upsun\Model\ProjectSettingsPatch $projectSettingsPatch + ProjectSettingsPatch $projectSettingsPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -308,7 +307,6 @@ private function updateProjectsSettingsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ProjectVariablesApi.php b/src/Api/ProjectVariablesApi.php index 49495fa93..4ead8266e 100644 --- a/src/Api/ProjectVariablesApi.php +++ b/src/Api/ProjectVariablesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\ProjectVariable; +use Upsun\Model\ProjectVariableCreateInput; +use Upsun\Model\ProjectVariablePatch; /** * Low level ProjectVariablesApi (auto-generated) @@ -63,8 +66,8 @@ public function __construct( */ public function createProjectsVariables( string $projectId, - \Upsun\Model\ProjectVariableCreateInput $projectVariableCreateInput - ): \Upsun\Model\AcceptedResponse { + ProjectVariableCreateInput $projectVariableCreateInput + ): AcceptedResponse { return $this->createProjectsVariablesWithHttpInfo( $projectId, $projectVariableCreateInput @@ -81,8 +84,8 @@ public function createProjectsVariables( */ private function createProjectsVariablesWithHttpInfo( string $projectId, - \Upsun\Model\ProjectVariableCreateInput $projectVariableCreateInput - ): \Upsun\Model\AcceptedResponse { + ProjectVariableCreateInput $projectVariableCreateInput + ): AcceptedResponse { $request = $this->createProjectsVariablesRequest( $projectId, $projectVariableCreateInput @@ -124,9 +127,8 @@ private function createProjectsVariablesWithHttpInfo( */ private function createProjectsVariablesRequest( string $projectId, - \Upsun\Model\ProjectVariableCreateInput $projectVariableCreateInput + ProjectVariableCreateInput $projectVariableCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -159,7 +161,6 @@ private function createProjectsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -237,7 +238,7 @@ private function createProjectsVariablesRequest( public function deleteProjectsVariables( string $projectId, string $projectVariableId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsVariablesWithHttpInfo( $projectId, $projectVariableId @@ -254,7 +255,7 @@ public function deleteProjectsVariables( private function deleteProjectsVariablesWithHttpInfo( string $projectId, string $projectVariableId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsVariablesRequest( $projectId, $projectVariableId @@ -297,7 +298,6 @@ private function deleteProjectsVariablesRequest( string $projectId, string $projectVariableId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -339,7 +339,6 @@ private function deleteProjectsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -409,7 +408,7 @@ private function deleteProjectsVariablesRequest( public function getProjectsVariables( string $projectId, string $projectVariableId - ): \Upsun\Model\ProjectVariable { + ): ProjectVariable { return $this->getProjectsVariablesWithHttpInfo( $projectId, $projectVariableId @@ -426,7 +425,7 @@ public function getProjectsVariables( private function getProjectsVariablesWithHttpInfo( string $projectId, string $projectVariableId - ): \Upsun\Model\ProjectVariable { + ): ProjectVariable { $request = $this->getProjectsVariablesRequest( $projectId, $projectVariableId @@ -469,7 +468,6 @@ private function getProjectsVariablesRequest( string $projectId, string $projectVariableId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -511,7 +509,6 @@ private function getProjectsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -640,7 +637,6 @@ private function listProjectsVariablesWithHttpInfo( private function listProjectsVariablesRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -666,7 +662,6 @@ private function listProjectsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -740,8 +735,8 @@ private function listProjectsVariablesRequest( public function updateProjectsVariables( string $projectId, string $projectVariableId, - \Upsun\Model\ProjectVariablePatch $projectVariablePatch - ): \Upsun\Model\AcceptedResponse { + ProjectVariablePatch $projectVariablePatch + ): AcceptedResponse { return $this->updateProjectsVariablesWithHttpInfo( $projectId, $projectVariableId, @@ -760,8 +755,8 @@ public function updateProjectsVariables( private function updateProjectsVariablesWithHttpInfo( string $projectId, string $projectVariableId, - \Upsun\Model\ProjectVariablePatch $projectVariablePatch - ): \Upsun\Model\AcceptedResponse { + ProjectVariablePatch $projectVariablePatch + ): AcceptedResponse { $request = $this->updateProjectsVariablesRequest( $projectId, $projectVariableId, @@ -805,9 +800,8 @@ private function updateProjectsVariablesWithHttpInfo( private function updateProjectsVariablesRequest( string $projectId, string $projectVariableId, - \Upsun\Model\ProjectVariablePatch $projectVariablePatch + ProjectVariablePatch $projectVariablePatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -856,7 +850,6 @@ private function updateProjectsVariablesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index 265cb5a5c..625ebbc13 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -133,7 +132,6 @@ private function listOrgProjectHistoryRequest( string $organizationId, string $projectId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -175,7 +173,6 @@ private function listOrgProjectHistoryRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/RecordsApi.php b/src/Api/RecordsApi.php index e0d5bd2c8..e81431c94 100644 --- a/src/Api/RecordsApi.php +++ b/src/Api/RecordsApi.php @@ -13,6 +13,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ListOrgPlanRecords200Response; +use Upsun\Model\ListOrgUsageRecords200Response; /** * Low level RecordsApi (auto-generated) @@ -62,19 +64,19 @@ public function __construct( * The plan type of the subscription. (optional) * @param string|null $filterStatus * The status of the plan record. (optional) - * @param \DateTime|null $filterStart + * @param DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param \DateTime|null $filterEnd + * @param DateTime|null $filterEnd * The end of the observation period for the record. E.g. filter[end]=2018-01-01 * will display all records that were active on (i.e. they started before) * 2018-01-01 (optional) - * @param \DateTime|null $filterStartedAt + * @param DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) - * @param \DateTime|null $filterEndedAt + * @param DateTime|null $filterEndedAt * The record's end timestamp. You can use this filter to list records ended after, * or before a certain time. E.g. * filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=> (optional) @@ -90,12 +92,12 @@ public function listOrgPlanRecords( ?string $filterSubscriptionId = null, ?string $filterPlan = null, ?string $filterStatus = null, - ?\DateTime $filterStart = null, - ?\DateTime $filterEnd = null, - ?\DateTime $filterStartedAt = null, - ?\DateTime $filterEndedAt = null, + ?DateTime $filterStart = null, + ?DateTime $filterEnd = null, + ?DateTime $filterStartedAt = null, + ?DateTime $filterEndedAt = null, ?int $page = null - ): \Upsun\Model\ListOrgPlanRecords200Response { + ): ListOrgPlanRecords200Response { return $this->listOrgPlanRecordsWithHttpInfo( $organizationId, $filterSubscriptionId, @@ -121,19 +123,19 @@ public function listOrgPlanRecords( * The plan type of the subscription. (optional) * @param string|null $filterStatus * The status of the plan record. (optional) - * @param \DateTime|null $filterStart + * @param DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param \DateTime|null $filterEnd + * @param DateTime|null $filterEnd * The end of the observation period for the record. E.g. filter[end]=2018-01-01 * will display all records that were active on (i.e. they started before) * 2018-01-01 (optional) - * @param \DateTime|null $filterStartedAt + * @param DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) - * @param \DateTime|null $filterEndedAt + * @param DateTime|null $filterEndedAt * The record's end timestamp. You can use this filter to list records ended after, * or before a certain time. E.g. * filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=> (optional) @@ -148,12 +150,12 @@ private function listOrgPlanRecordsWithHttpInfo( ?string $filterSubscriptionId = null, ?string $filterPlan = null, ?string $filterStatus = null, - ?\DateTime $filterStart = null, - ?\DateTime $filterEnd = null, - ?\DateTime $filterStartedAt = null, - ?\DateTime $filterEndedAt = null, + ?DateTime $filterStart = null, + ?DateTime $filterEnd = null, + ?DateTime $filterStartedAt = null, + ?DateTime $filterEndedAt = null, ?int $page = null - ): \Upsun\Model\ListOrgPlanRecords200Response { + ): ListOrgPlanRecords200Response { $request = $this->listOrgPlanRecordsRequest( $organizationId, $filterSubscriptionId, @@ -205,19 +207,19 @@ private function listOrgPlanRecordsWithHttpInfo( * The plan type of the subscription. (optional) * @param string|null $filterStatus * The status of the plan record. (optional) - * @param \DateTime|null $filterStart + * @param DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param \DateTime|null $filterEnd + * @param DateTime|null $filterEnd * The end of the observation period for the record. E.g. filter[end]=2018-01-01 * will display all records that were active on (i.e. they started before) * 2018-01-01 (optional) - * @param \DateTime|null $filterStartedAt + * @param DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) - * @param \DateTime|null $filterEndedAt + * @param DateTime|null $filterEndedAt * The record's end timestamp. You can use this filter to list records ended after, * or before a certain time. E.g. * filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=> (optional) @@ -231,13 +233,12 @@ private function listOrgPlanRecordsRequest( ?string $filterSubscriptionId = null, ?string $filterPlan = null, ?string $filterStatus = null, - ?\DateTime $filterStart = null, - ?\DateTime $filterEnd = null, - ?\DateTime $filterStartedAt = null, - ?\DateTime $filterEndedAt = null, + ?DateTime $filterStart = null, + ?DateTime $filterEnd = null, + ?DateTime $filterStartedAt = null, + ?DateTime $filterEndedAt = null, ?int $page = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -266,8 +267,6 @@ private function listOrgPlanRecordsRequest( } } - - // query params if ($filterPlan !== null) { if ('form' === 'form' && is_array($filterPlan)) { @@ -281,8 +280,6 @@ private function listOrgPlanRecordsRequest( } } - - // query params if ($filterStatus !== null) { if ('form' === 'form' && is_array($filterStatus)) { @@ -296,8 +293,6 @@ private function listOrgPlanRecordsRequest( } } - - // query params if ($filterStart !== null) { if ('form' === 'form' && is_array($filterStart)) { @@ -311,8 +306,6 @@ private function listOrgPlanRecordsRequest( } } - - // query params if ($filterEnd !== null) { if ('form' === 'form' && is_array($filterEnd)) { @@ -326,8 +319,6 @@ private function listOrgPlanRecordsRequest( } } - - // query params if ($filterStartedAt !== null) { if ('form' === 'form' && is_array($filterStartedAt)) { @@ -341,8 +332,6 @@ private function listOrgPlanRecordsRequest( } } - - // query params if ($filterEndedAt !== null) { if ('form' === 'form' && is_array($filterEndedAt)) { @@ -356,8 +345,6 @@ private function listOrgPlanRecordsRequest( } } - - // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -371,8 +358,6 @@ private function listOrgPlanRecordsRequest( } } - - // path params if ($organizationId !== null) { @@ -383,7 +368,6 @@ private function listOrgPlanRecordsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -452,11 +436,11 @@ private function listOrgPlanRecordsRequest( * The ID of the subscription (optional) * @param string|null $filterUsageGroup * Filter records by the type of usage. (optional) - * @param \DateTime|null $filterStart + * @param DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param \DateTime|null $filterStartedAt + * @param DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) @@ -471,10 +455,10 @@ public function listOrgUsageRecords( string $organizationId, ?string $filterSubscriptionId = null, ?string $filterUsageGroup = null, - ?\DateTime $filterStart = null, - ?\DateTime $filterStartedAt = null, + ?DateTime $filterStart = null, + ?DateTime $filterStartedAt = null, ?int $page = null - ): \Upsun\Model\ListOrgUsageRecords200Response { + ): ListOrgUsageRecords200Response { return $this->listOrgUsageRecordsWithHttpInfo( $organizationId, $filterSubscriptionId, @@ -495,11 +479,11 @@ public function listOrgUsageRecords( * The ID of the subscription (optional) * @param string|null $filterUsageGroup * Filter records by the type of usage. (optional) - * @param \DateTime|null $filterStart + * @param DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param \DateTime|null $filterStartedAt + * @param DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) @@ -513,10 +497,10 @@ private function listOrgUsageRecordsWithHttpInfo( string $organizationId, ?string $filterSubscriptionId = null, ?string $filterUsageGroup = null, - ?\DateTime $filterStart = null, - ?\DateTime $filterStartedAt = null, + ?DateTime $filterStart = null, + ?DateTime $filterStartedAt = null, ?int $page = null - ): \Upsun\Model\ListOrgUsageRecords200Response { + ): ListOrgUsageRecords200Response { $request = $this->listOrgUsageRecordsRequest( $organizationId, $filterSubscriptionId, @@ -563,11 +547,11 @@ private function listOrgUsageRecordsWithHttpInfo( * The ID of the subscription (optional) * @param string|null $filterUsageGroup * Filter records by the type of usage. (optional) - * @param \DateTime|null $filterStart + * @param DateTime|null $filterStart * The start of the observation period for the record. E.g. * filter[start]=2018-01-01 will display all records that were active (i.e. did not * end) on 2018-01-01 (optional) - * @param \DateTime|null $filterStartedAt + * @param DateTime|null $filterStartedAt * The record's start timestamp. You can use this filter to list records started * after, or before a certain time. E.g. * filter[started_at][value]=2020-01-01&filter[started_at][operator]=> (optional) @@ -580,11 +564,10 @@ private function listOrgUsageRecordsRequest( string $organizationId, ?string $filterSubscriptionId = null, ?string $filterUsageGroup = null, - ?\DateTime $filterStart = null, - ?\DateTime $filterStartedAt = null, + ?DateTime $filterStart = null, + ?DateTime $filterStartedAt = null, ?int $page = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -613,8 +596,6 @@ private function listOrgUsageRecordsRequest( } } - - // query params if ($filterUsageGroup !== null) { if ('form' === 'form' && is_array($filterUsageGroup)) { @@ -628,8 +609,6 @@ private function listOrgUsageRecordsRequest( } } - - // query params if ($filterStart !== null) { if ('form' === 'form' && is_array($filterStart)) { @@ -643,8 +622,6 @@ private function listOrgUsageRecordsRequest( } } - - // query params if ($filterStartedAt !== null) { if ('form' === 'form' && is_array($filterStartedAt)) { @@ -658,8 +635,6 @@ private function listOrgUsageRecordsRequest( } } - - // query params if ($page !== null) { if ('form' === 'form' && is_array($page)) { @@ -673,8 +648,6 @@ private function listOrgUsageRecordsRequest( } } - - // path params if ($organizationId !== null) { @@ -685,7 +658,6 @@ private function listOrgUsageRecordsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/ReferencesApi.php b/src/Api/ReferencesApi.php index 594f146a2..4eeeea702 100644 --- a/src/Api/ReferencesApi.php +++ b/src/Api/ReferencesApi.php @@ -133,7 +133,6 @@ private function listReferencedOrgsRequest( string $in, string $sig ): RequestInterface { - // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -169,8 +168,6 @@ private function listReferencedOrgsRequest( } } - - // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -184,10 +181,6 @@ private function listReferencedOrgsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -329,7 +322,6 @@ private function listReferencedProjectsRequest( string $in, string $sig ): RequestInterface { - // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -365,8 +357,6 @@ private function listReferencedProjectsRequest( } } - - // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -380,10 +370,6 @@ private function listReferencedProjectsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -525,7 +511,6 @@ private function listReferencedRegionsRequest( string $in, string $sig ): RequestInterface { - // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -561,8 +546,6 @@ private function listReferencedRegionsRequest( } } - - // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -576,10 +559,6 @@ private function listReferencedRegionsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -721,7 +700,6 @@ private function listReferencedTeamsRequest( string $in, string $sig ): RequestInterface { - // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -757,8 +735,6 @@ private function listReferencedTeamsRequest( } } - - // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -772,10 +748,6 @@ private function listReferencedTeamsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -917,7 +889,6 @@ private function listReferencedUsersRequest( string $in, string $sig ): RequestInterface { - // verify the required parameter 'in' is set if (empty($in)) { throw new InvalidArgumentException( @@ -953,8 +924,6 @@ private function listReferencedUsersRequest( } } - - // query params if ($sig !== null) { if ('form' === 'form' && is_array($sig)) { @@ -968,10 +937,6 @@ private function listReferencedUsersRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/RegionsApi.php b/src/Api/RegionsApi.php index bd522b955..ae31cde8e 100644 --- a/src/Api/RegionsApi.php +++ b/src/Api/RegionsApi.php @@ -13,6 +13,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Region; +use Upsun\Model\StringFilter; /** * Low level RegionsApi (auto-generated) @@ -62,7 +64,7 @@ public function __construct( */ public function getRegion( string $regionId - ): \Upsun\Model\Region { + ): Region { return $this->getRegionWithHttpInfo( $regionId ); @@ -79,7 +81,7 @@ public function getRegion( */ private function getRegionWithHttpInfo( string $regionId - ): \Upsun\Model\Region { + ): Region { $request = $this->getRegionRequest( $regionId ); @@ -122,7 +124,6 @@ private function getRegionWithHttpInfo( private function getRegionRequest( string $regionId ): RequestInterface { - // verify the required parameter 'regionId' is set if (empty($regionId)) { throw new InvalidArgumentException( @@ -148,7 +149,6 @@ private function getRegionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -228,9 +228,9 @@ private function getRegionRequest( * @see https://docs.upsun.com/api/#tag/Regions/operation/list-regions */ public function listRegions( - ?\Upsun\Model\StringFilter $filterAvailable = null, - ?\Upsun\Model\StringFilter $filterPrivate = null, - ?\Upsun\Model\StringFilter $filterZone = null, + ?StringFilter $filterAvailable = null, + ?StringFilter $filterPrivate = null, + ?StringFilter $filterZone = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -267,9 +267,9 @@ public function listRegions( * @throws ClientExceptionInterface */ private function listRegionsWithHttpInfo( - ?\Upsun\Model\StringFilter $filterAvailable = null, - ?\Upsun\Model\StringFilter $filterPrivate = null, - ?\Upsun\Model\StringFilter $filterZone = null, + ?StringFilter $filterAvailable = null, + ?StringFilter $filterPrivate = null, + ?StringFilter $filterZone = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -331,16 +331,14 @@ private function listRegionsWithHttpInfo( * @throws InvalidArgumentException */ private function listRegionsRequest( - ?\Upsun\Model\StringFilter $filterAvailable = null, - ?\Upsun\Model\StringFilter $filterPrivate = null, - ?\Upsun\Model\StringFilter $filterZone = null, + ?StringFilter $filterAvailable = null, + ?StringFilter $filterPrivate = null, + ?StringFilter $filterZone = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - - if ($pageSize !== null && $pageSize > 100) { throw new InvalidArgumentException( 'invalid value for "$pageSize" when calling RegionsApi.listRegions, @@ -355,8 +353,6 @@ private function listRegionsRequest( ); } - - $resourcePath = '/regions'; $formParams = []; $queryParams = []; @@ -377,8 +373,6 @@ private function listRegionsRequest( } } - - // query params if ($filterPrivate !== null) { if ('form' === 'deepObject' && is_array($filterPrivate)) { @@ -392,8 +386,6 @@ private function listRegionsRequest( } } - - // query params if ($filterZone !== null) { if ('form' === 'deepObject' && is_array($filterZone)) { @@ -407,8 +399,6 @@ private function listRegionsRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -422,8 +412,6 @@ private function listRegionsRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -437,8 +425,6 @@ private function listRegionsRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -452,8 +438,6 @@ private function listRegionsRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -467,10 +451,6 @@ private function listRegionsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Api/RegistryCredentialApi.php b/src/Api/RegistryCredentialApi.php index 388ba7baf..81c6a8674 100644 --- a/src/Api/RegistryCredentialApi.php +++ b/src/Api/RegistryCredentialApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\RegistryCredential; +use Upsun\Model\RegistryCredentialCreateInput; +use Upsun\Model\RegistryCredentialPatch; /** * Low level RegistryCredentialApi (auto-generated) @@ -58,8 +61,8 @@ public function __construct( */ public function createProjectsOciRegistries( string $projectId, - \Upsun\Model\RegistryCredentialCreateInput $registryCredentialCreateInput - ): \Upsun\Model\AcceptedResponse { + RegistryCredentialCreateInput $registryCredentialCreateInput + ): AcceptedResponse { return $this->createProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialCreateInput @@ -75,8 +78,8 @@ public function createProjectsOciRegistries( */ private function createProjectsOciRegistriesWithHttpInfo( string $projectId, - \Upsun\Model\RegistryCredentialCreateInput $registryCredentialCreateInput - ): \Upsun\Model\AcceptedResponse { + RegistryCredentialCreateInput $registryCredentialCreateInput + ): AcceptedResponse { $request = $this->createProjectsOciRegistriesRequest( $projectId, $registryCredentialCreateInput @@ -118,9 +121,8 @@ private function createProjectsOciRegistriesWithHttpInfo( */ private function createProjectsOciRegistriesRequest( string $projectId, - \Upsun\Model\RegistryCredentialCreateInput $registryCredentialCreateInput + RegistryCredentialCreateInput $registryCredentialCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -153,7 +155,6 @@ private function createProjectsOciRegistriesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -228,7 +229,7 @@ private function createProjectsOciRegistriesRequest( public function deleteProjectsOciRegistries( string $projectId, string $registryCredentialId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialId @@ -244,7 +245,7 @@ public function deleteProjectsOciRegistries( private function deleteProjectsOciRegistriesWithHttpInfo( string $projectId, string $registryCredentialId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsOciRegistriesRequest( $projectId, $registryCredentialId @@ -287,7 +288,6 @@ private function deleteProjectsOciRegistriesRequest( string $projectId, string $registryCredentialId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -329,7 +329,6 @@ private function deleteProjectsOciRegistriesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -396,7 +395,7 @@ private function deleteProjectsOciRegistriesRequest( public function getProjectsOciRegistries( string $projectId, string $registryCredentialId - ): \Upsun\Model\RegistryCredential { + ): RegistryCredential { return $this->getProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialId @@ -412,7 +411,7 @@ public function getProjectsOciRegistries( private function getProjectsOciRegistriesWithHttpInfo( string $projectId, string $registryCredentialId - ): \Upsun\Model\RegistryCredential { + ): RegistryCredential { $request = $this->getProjectsOciRegistriesRequest( $projectId, $registryCredentialId @@ -455,7 +454,6 @@ private function getProjectsOciRegistriesRequest( string $projectId, string $registryCredentialId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -497,7 +495,6 @@ private function getProjectsOciRegistriesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -622,7 +619,6 @@ private function listProjectsOciRegistriesWithHttpInfo( private function listProjectsOciRegistriesRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -648,7 +644,6 @@ private function listProjectsOciRegistriesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -716,8 +711,8 @@ private function listProjectsOciRegistriesRequest( public function updateProjectsOciRegistries( string $projectId, string $registryCredentialId, - \Upsun\Model\RegistryCredentialPatch $registryCredentialPatch - ): \Upsun\Model\AcceptedResponse { + RegistryCredentialPatch $registryCredentialPatch + ): AcceptedResponse { return $this->updateProjectsOciRegistriesWithHttpInfo( $projectId, $registryCredentialId, @@ -735,8 +730,8 @@ public function updateProjectsOciRegistries( private function updateProjectsOciRegistriesWithHttpInfo( string $projectId, string $registryCredentialId, - \Upsun\Model\RegistryCredentialPatch $registryCredentialPatch - ): \Upsun\Model\AcceptedResponse { + RegistryCredentialPatch $registryCredentialPatch + ): AcceptedResponse { $request = $this->updateProjectsOciRegistriesRequest( $projectId, $registryCredentialId, @@ -780,9 +775,8 @@ private function updateProjectsOciRegistriesWithHttpInfo( private function updateProjectsOciRegistriesRequest( string $projectId, string $registryCredentialId, - \Upsun\Model\RegistryCredentialPatch $registryCredentialPatch + RegistryCredentialPatch $registryCredentialPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -831,7 +825,6 @@ private function updateProjectsOciRegistriesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/RepositoryApi.php b/src/Api/RepositoryApi.php index eb7c1757c..12572ce58 100644 --- a/src/Api/RepositoryApi.php +++ b/src/Api/RepositoryApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Blob; +use Upsun\Model\Commit; +use Upsun\Model\Ref; +use Upsun\Model\Tree; /** * Low level RepositoryApi (auto-generated) @@ -63,7 +66,7 @@ public function __construct( public function getProjectsGitBlobs( string $projectId, string $repositoryBlobId - ): \Upsun\Model\Blob { + ): Blob { return $this->getProjectsGitBlobsWithHttpInfo( $projectId, $repositoryBlobId @@ -80,7 +83,7 @@ public function getProjectsGitBlobs( private function getProjectsGitBlobsWithHttpInfo( string $projectId, string $repositoryBlobId - ): \Upsun\Model\Blob { + ): Blob { $request = $this->getProjectsGitBlobsRequest( $projectId, $repositoryBlobId @@ -123,7 +126,6 @@ private function getProjectsGitBlobsRequest( string $projectId, string $repositoryBlobId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -165,7 +167,6 @@ private function getProjectsGitBlobsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -239,7 +240,7 @@ private function getProjectsGitBlobsRequest( public function getProjectsGitCommits( string $projectId, string $repositoryCommitId - ): \Upsun\Model\Commit { + ): Commit { return $this->getProjectsGitCommitsWithHttpInfo( $projectId, $repositoryCommitId @@ -256,7 +257,7 @@ public function getProjectsGitCommits( private function getProjectsGitCommitsWithHttpInfo( string $projectId, string $repositoryCommitId - ): \Upsun\Model\Commit { + ): Commit { $request = $this->getProjectsGitCommitsRequest( $projectId, $repositoryCommitId @@ -299,7 +300,6 @@ private function getProjectsGitCommitsRequest( string $projectId, string $repositoryCommitId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -341,7 +341,6 @@ private function getProjectsGitCommitsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -414,7 +413,7 @@ private function getProjectsGitCommitsRequest( public function getProjectsGitRefs( string $projectId, string $repositoryRefId - ): \Upsun\Model\Ref { + ): Ref { return $this->getProjectsGitRefsWithHttpInfo( $projectId, $repositoryRefId @@ -431,7 +430,7 @@ public function getProjectsGitRefs( private function getProjectsGitRefsWithHttpInfo( string $projectId, string $repositoryRefId - ): \Upsun\Model\Ref { + ): Ref { $request = $this->getProjectsGitRefsRequest( $projectId, $repositoryRefId @@ -474,7 +473,6 @@ private function getProjectsGitRefsRequest( string $projectId, string $repositoryRefId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -516,7 +514,6 @@ private function getProjectsGitRefsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -589,7 +586,7 @@ private function getProjectsGitRefsRequest( public function getProjectsGitTrees( string $projectId, string $repositoryTreeId - ): \Upsun\Model\Tree { + ): Tree { return $this->getProjectsGitTreesWithHttpInfo( $projectId, $repositoryTreeId @@ -606,7 +603,7 @@ public function getProjectsGitTrees( private function getProjectsGitTreesWithHttpInfo( string $projectId, string $repositoryTreeId - ): \Upsun\Model\Tree { + ): Tree { $request = $this->getProjectsGitTreesRequest( $projectId, $repositoryTreeId @@ -649,7 +646,6 @@ private function getProjectsGitTreesRequest( string $projectId, string $repositoryTreeId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -691,7 +687,6 @@ private function getProjectsGitTreesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -824,7 +819,6 @@ private function listProjectsGitRefsWithHttpInfo( private function listProjectsGitRefsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -850,7 +844,6 @@ private function listProjectsGitRefsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/ResourcesApi.php b/src/Api/ResourcesApi.php index 33e6a4c43..0d7a0e521 100644 --- a/src/Api/ResourcesApi.php +++ b/src/Api/ResourcesApi.php @@ -170,7 +170,6 @@ private function resourcesByServiceRequest( ?array $aggs = null, ?array $types = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -179,8 +178,6 @@ private function resourcesByServiceRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ResourcesApi.resourcesByService, @@ -196,8 +193,6 @@ private function resourcesByServiceRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling ResourcesApi.resourcesByService, @@ -247,8 +242,6 @@ private function resourcesByServiceRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -262,8 +255,6 @@ private function resourcesByServiceRequest( } } - - // query params if ($aggs !== null) { if ('form' === 'form' && is_array($aggs)) { @@ -277,8 +268,6 @@ private function resourcesByServiceRequest( } } - - // query params if ($types !== null) { if ('form' === 'form' && is_array($types)) { @@ -292,8 +281,6 @@ private function resourcesByServiceRequest( } } - - // path params if ($projectId !== null) { @@ -322,7 +309,6 @@ private function resourcesByServiceRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -501,7 +487,6 @@ private function resourcesOverviewRequest( ?array $services = null, ?string $servicesMode = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -510,8 +495,6 @@ private function resourcesOverviewRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ResourcesApi.resourcesOverview, @@ -527,8 +510,6 @@ private function resourcesOverviewRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling ResourcesApi.resourcesOverview, @@ -571,8 +552,6 @@ private function resourcesOverviewRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -586,8 +565,6 @@ private function resourcesOverviewRequest( } } - - // query params if ($service !== null) { if ('form' === 'form' && is_array($service)) { @@ -601,8 +578,6 @@ private function resourcesOverviewRequest( } } - - // query params if ($services !== null) { if ('form' === 'form' && is_array($services)) { @@ -616,8 +591,6 @@ private function resourcesOverviewRequest( } } - - // query params if ($servicesMode !== null) { if ('form' === 'form' && is_array($servicesMode)) { @@ -631,8 +604,6 @@ private function resourcesOverviewRequest( } } - - // path params if ($projectId !== null) { @@ -652,7 +623,6 @@ private function resourcesOverviewRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -839,7 +809,6 @@ private function resourcesSummaryRequest( ?array $services = null, ?string $servicesMode = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -848,8 +817,6 @@ private function resourcesSummaryRequest( ); } - - if (!preg_match("/[a-z0-9]+/", $projectId)) { throw new InvalidArgumentException( "invalid value for \"projectId\" when calling ResourcesApi.resourcesSummary, @@ -865,8 +832,6 @@ private function resourcesSummaryRequest( ); } - - if (!preg_match("/.+/", $environmentId)) { throw new InvalidArgumentException( "invalid value for \"environmentId\" when calling ResourcesApi.resourcesSummary, @@ -909,8 +874,6 @@ private function resourcesSummaryRequest( } } - - // query params if ($to !== null) { if ('form' === 'form' && is_array($to)) { @@ -924,8 +887,6 @@ private function resourcesSummaryRequest( } } - - // query params if ($aggs !== null) { if ('form' === 'form' && is_array($aggs)) { @@ -939,8 +900,6 @@ private function resourcesSummaryRequest( } } - - // query params if ($types !== null) { if ('form' === 'form' && is_array($types)) { @@ -954,8 +913,6 @@ private function resourcesSummaryRequest( } } - - // query params if ($services !== null) { if ('form' === 'form' && is_array($services)) { @@ -969,8 +926,6 @@ private function resourcesSummaryRequest( } } - - // query params if ($servicesMode !== null) { if ('form' === 'form' && is_array($servicesMode)) { @@ -984,8 +939,6 @@ private function resourcesSummaryRequest( } } - - // path params if ($projectId !== null) { @@ -1005,7 +958,6 @@ private function resourcesSummaryRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/RoutingApi.php b/src/Api/RoutingApi.php index b2988cf95..1ffe87faa 100644 --- a/src/Api/RoutingApi.php +++ b/src/Api/RoutingApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Route; /** * Low level RoutingApi (auto-generated) @@ -65,7 +65,7 @@ public function getProjectsEnvironmentsRoutes( string $projectId, string $environmentId, string $routeId - ): \Upsun\Model\Route { + ): Route { return $this->getProjectsEnvironmentsRoutesWithHttpInfo( $projectId, $environmentId, @@ -84,7 +84,7 @@ private function getProjectsEnvironmentsRoutesWithHttpInfo( string $projectId, string $environmentId, string $routeId - ): \Upsun\Model\Route { + ): Route { $request = $this->getProjectsEnvironmentsRoutesRequest( $projectId, $environmentId, @@ -129,7 +129,6 @@ private function getProjectsEnvironmentsRoutesRequest( string $environmentId, string $routeId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -187,7 +186,6 @@ private function getProjectsEnvironmentsRoutesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -322,7 +320,6 @@ private function listProjectsEnvironmentsRoutesRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -364,7 +361,6 @@ private function listProjectsEnvironmentsRoutesRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/RuntimeOperationsApi.php b/src/Api/RuntimeOperationsApi.php index 4760330fd..adbb70cae 100644 --- a/src/Api/RuntimeOperationsApi.php +++ b/src/Api/RuntimeOperationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\EnvironmentOperationInput; /** * Low level RuntimeOperationsApi (auto-generated) @@ -66,8 +67,8 @@ public function runOperation( string $projectId, string $environmentId, string $deploymentId, - \Upsun\Model\EnvironmentOperationInput $environmentOperationInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentOperationInput $environmentOperationInput + ): AcceptedResponse { return $this->runOperationWithHttpInfo( $projectId, $environmentId, @@ -88,8 +89,8 @@ private function runOperationWithHttpInfo( string $projectId, string $environmentId, string $deploymentId, - \Upsun\Model\EnvironmentOperationInput $environmentOperationInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentOperationInput $environmentOperationInput + ): AcceptedResponse { $request = $this->runOperationRequest( $projectId, $environmentId, @@ -135,9 +136,8 @@ private function runOperationRequest( string $projectId, string $environmentId, string $deploymentId, - \Upsun\Model\EnvironmentOperationInput $environmentOperationInput + EnvironmentOperationInput $environmentOperationInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -202,7 +202,6 @@ private function runOperationRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/SbomApi.php b/src/Api/SbomApi.php index aa9f21fd2..aadd71a03 100644 --- a/src/Api/SbomApi.php +++ b/src/Api/SbomApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Sbom; /** * Low level SbomApi (auto-generated) @@ -60,7 +60,7 @@ public function getProjectsEnvironmentsDeploymentsSboms( string $environmentId, string $deploymentId, string $sbomServiceId - ): \Upsun\Model\Sbom { + ): Sbom { return $this->getProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( $projectId, $environmentId, @@ -80,7 +80,7 @@ private function getProjectsEnvironmentsDeploymentsSbomsWithHttpInfo( string $environmentId, string $deploymentId, string $sbomServiceId - ): \Upsun\Model\Sbom { + ): Sbom { $request = $this->getProjectsEnvironmentsDeploymentsSbomsRequest( $projectId, $environmentId, @@ -127,7 +127,6 @@ private function getProjectsEnvironmentsDeploymentsSbomsRequest( string $deploymentId, string $sbomServiceId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -201,7 +200,6 @@ private function getProjectsEnvironmentsDeploymentsSbomsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -336,7 +334,6 @@ private function listProjectsEnvironmentsDeploymentsSbomsRequest( string $environmentId, string $deploymentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -394,7 +391,6 @@ private function listProjectsEnvironmentsDeploymentsSbomsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/Serializer/ApiObjectAttributesMapper.php b/src/Api/Serializer/ApiObjectAttributesMapper.php index 46a4018dc..b6871f472 100644 --- a/src/Api/Serializer/ApiObjectAttributesMapper.php +++ b/src/Api/Serializer/ApiObjectAttributesMapper.php @@ -24,7 +24,6 @@ public static function attributeMap(string $classname): array } private static array $attributeMap = [ - 'Upsun\Model\AcceptedResponse' => [ 'status' => 'status', 'code' => 'code' @@ -149,7 +148,6 @@ public static function attributeMap(string $classname): array 'enabled' => 'enabled' ], 'Upsun\Model\AutoscalerDuration' => [ - ], 'Upsun\Model\AutoscalerInstances' => [ 'min' => 'min', @@ -877,7 +875,6 @@ public static function attributeMap(string $classname): array 'email' => 'email' ], 'Upsun\Model\CommunityPackagesInner' => [ - ], 'Upsun\Model\Components' => [ 'voucherVatBaseprice' => 'voucher/vat/baseprice' @@ -1607,7 +1604,6 @@ public static function attributeMap(string $classname): array 'values' => 'values' ], 'Upsun\Model\FilterSelectValues' => [ - ], 'Upsun\Model\Firewall' => [ 'outbound' => 'outbound' @@ -2661,7 +2657,6 @@ public static function attributeMap(string $classname): array 'profileSize' => 'profile_size' ], 'Upsun\Model\Mode' => [ - ], 'Upsun\Model\MountsValue' => [ 'source' => 'source', @@ -3601,10 +3596,8 @@ public static function attributeMap(string $classname): array 'maintenanceWindow' => 'maintenance_window' ], 'Upsun\Model\ProjectStatus' => [ - ], 'Upsun\Model\ProjectType' => [ - ], 'Upsun\Model\ProjectVariable' => [ 'id' => 'id', diff --git a/src/Api/Serializer/ApiObjectFormatsMapper.php b/src/Api/Serializer/ApiObjectFormatsMapper.php index c9c05ad05..8bf102b15 100644 --- a/src/Api/Serializer/ApiObjectFormatsMapper.php +++ b/src/Api/Serializer/ApiObjectFormatsMapper.php @@ -26,7 +26,6 @@ public static function openApiFormats(string $classname) } protected static $openApiFormats = [ - 'Upsun\Model\AcceptedResponse' => [ 'status' => null, 'code' => null @@ -171,7 +170,6 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\AutoscalerDuration' => [ - ], 'Upsun\Model\AutoscalerInstances' => [ @@ -996,7 +994,6 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\CommunityPackagesInner' => [ - ], 'Upsun\Model\Components' => [ @@ -1825,7 +1822,6 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\FilterSelectValues' => [ - ], 'Upsun\Model\Firewall' => [ @@ -3030,7 +3026,6 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\Mode' => [ - ], 'Upsun\Model\MountsValue' => [ @@ -4116,11 +4111,9 @@ public static function openApiFormats(string $classname) ], 'Upsun\Model\ProjectStatus' => [ - ], 'Upsun\Model\ProjectType' => [ - ], 'Upsun\Model\ProjectVariable' => [ @@ -5964,6 +5957,5 @@ public static function openApiFormats(string $classname) 'slugId' => null, 'supportsHorizontalScaling' => null ], - ]; } diff --git a/src/Api/Serializer/ApiObjectTypesMapper.php b/src/Api/Serializer/ApiObjectTypesMapper.php index 9d81c3cbd..465d76059 100644 --- a/src/Api/Serializer/ApiObjectTypesMapper.php +++ b/src/Api/Serializer/ApiObjectTypesMapper.php @@ -24,7 +24,6 @@ public static function openApiTypes(string $classname): array } private static array $openApiTypes = [ - 'Upsun\Model\AcceptedResponse' => [ 'status' => 'string', 'code' => 'int', @@ -5956,6 +5955,5 @@ public static function openApiTypes(string $classname): array 'slug_id' => 'string', 'supports_horizontal_scaling' => 'bool', ], - ]; } diff --git a/src/Api/Serializer/ObjectSerializer.php b/src/Api/Serializer/ObjectSerializer.php index 2c58b487d..6c0e5fbe6 100644 --- a/src/Api/Serializer/ObjectSerializer.php +++ b/src/Api/Serializer/ObjectSerializer.php @@ -2,17 +2,23 @@ namespace Upsun\Api\Serializer; -use ReflectionClass; -use stdClass; -use SplFileObject; use DateTime; use DateTimeInterface; use Exception; +use GuzzleHttp\Psr7\Utils; use InvalidArgumentException; use Psr\Http\Message\StreamInterface; -use GuzzleHttp\Psr7\Utils; -use Upsun\Model\Model; +use ReflectionClass; +use SplFileObject; +use stdClass; use Upsun\Api\ApiConfiguration; +use Upsun\Model\Model; + +use function count; +use function is_array; +use function is_callable; +use function is_object; +use function is_scalar; /** * ObjectSerializer Class Doc Comment @@ -34,7 +40,7 @@ public static function sanitizeForSerialization( ?string $type = null, ?string $format = null ): float|object|array|bool|int|string|null { - if (\is_scalar($data) || null === $data) { + if (is_scalar($data) || null === $data) { return $data; } @@ -42,14 +48,14 @@ public static function sanitizeForSerialization( return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat); } - if (\is_array($data)) { + if (is_array($data)) { foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } return $data; } - if (\is_object($data)) { + if (is_object($data)) { $values = []; if ($data instanceof Model) { $formats = ApiObjectFormatsMapper::openApiFormats($data->getModelName()); @@ -67,7 +73,7 @@ public static function sanitizeForSerialization( if ($value !== null && !in_array($openApiType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openApiType, 'getAllowableEnumValues']; - if (\is_callable($callable)) { + if (is_callable($callable)) { /** array $callable */ $allowedEnumTypes = $callable(); if (!\in_array($value, $allowedEnumTypes, true)) { @@ -164,11 +170,11 @@ private static function deserializeSimplifiedModel($data, string $class) if (str_ends_with($class, '[]')) { $subClass = substr($class, 0, -2); - if (!\is_array($data)) { + if (!is_array($data)) { throw new InvalidArgumentException('Data must be an array to deserialize into ' . $class); } - return array_map(fn($item) => self::deserializeSimplifiedModel($item, $subClass), $data); + return array_map(fn ($item) => self::deserializeSimplifiedModel($item, $subClass), $data); } $fullClass = ltrim($class, '\\'); @@ -189,9 +195,9 @@ private static function deserializeSimplifiedModel($data, string $class) $jsonKey = $attributeMap[$paramName] ?? $paramName; $value = null; - if (\is_object($data)) { + if (is_object($data)) { $value = $data->{$jsonKey} ?? $data->{$paramName} ?? null; - } elseif (\is_array($data)) { + } elseif (is_array($data)) { $value = $data[$jsonKey] ?? $data[$paramName] ?? null; } @@ -215,7 +221,7 @@ private static function deserializeSimplifiedModel($data, string $class) if ($paramType) { $typeName = $paramType->getName(); - if ($paramType->getName() === 'array' && \is_array($value)) { + if ($paramType->getName() === 'array' && is_array($value)) { $types = ApiObjectTypesMapper::openApiTypes($fullClass); if (isset($types[$paramName]) && str_ends_with($types[$paramName], '[]')) { @@ -236,7 +242,7 @@ private static function deserializeSimplifiedModel($data, string $class) if (str_ends_with($typeName, '[]')) { $subClass = substr($typeName, 0, -2); $args[] = $value !== null - ? array_map(fn($item) => self::deserializeSimplifiedModel($item, $subClass), (array)$value) + ? array_map(fn ($item) => self::deserializeSimplifiedModel($item, $subClass), (array)$value) : []; continue; } @@ -246,7 +252,7 @@ private static function deserializeSimplifiedModel($data, string $class) case 'string': if ($value === null) { $args[] = null; - } elseif (\is_scalar($value)) { + } elseif (is_scalar($value)) { $args[] = (string) $value; } else { $args[] = json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: ''; @@ -273,7 +279,7 @@ private static function deserializeSimplifiedModel($data, string $class) } elseif ($typeName === 'DateTime') { $args[] = $value !== null ? new DateTime($value) : null; } elseif (class_exists($typeName)) { - if (\is_string($value) && in_array('getAllowableEnumValues', get_class_methods($typeName))) { + if (\is_string($value) && in_array('getAllowableEnumValues', get_class_methods($typeName), true)) { // Generated Enum $args[] = new $typeName($value); } else { @@ -286,7 +292,7 @@ private static function deserializeSimplifiedModel($data, string $class) $args[] = $value; } - if ($args[\count($args) - 1] === null && !$allowsNull) { + if ($args[count($args) - 1] === null && !$allowsNull) { $types = ApiObjectTypesMapper::openApiTypes($fullClass); if (isset($types[$jsonKey]) && str_contains($types[$jsonKey], 'null')) { continue; @@ -301,7 +307,6 @@ private static function deserializeSimplifiedModel($data, string $class) return new $class(...$args); } - /** * @throws Exception */ @@ -313,7 +318,7 @@ public static function deserialize($data, string $class, $httpHeaders = null) // Handle any class with array properties if (class_exists($class) && is_subclass_of($class, Model::class)) { - if (\is_array($data)) { + if (is_array($data)) { $data = self::preprocessArrayProperties($data, $class); } @@ -325,7 +330,7 @@ public static function deserialize($data, string $class, $httpHeaders = null) $subClass = substr($class, 0, -2); // remove [] $values = []; - if (!\is_array($data)) { + if (!is_array($data)) { throw new InvalidArgumentException('Data must be an array to deserialize into ' . $class); } @@ -349,12 +354,11 @@ public static function deserialize($data, string $class, $httpHeaders = null) return (float)$data; case 'string': case 'byte': - if (\is_scalar($data)) { + if (is_scalar($data)) { return (string) $data; } return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: ''; - case 'mixed': return $data; case 'array': @@ -369,7 +373,7 @@ public static function deserialize($data, string $class, $httpHeaders = null) // determine file name if ( - \is_array($httpHeaders) + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match( '/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', @@ -417,7 +421,7 @@ private static function preprocessArrayProperties(array $data, string $class): a $subClass = ltrim(substr($propertyType, 0, -2), '?'); // remove [] et ? // If the data contains this property and it's an array - if (isset($data[$propertyName]) && \is_array($data[$propertyName])) { + if (isset($data[$propertyName]) && is_array($data[$propertyName])) { // If it's a model class, deserialize each element if (\class_exists($subClass)) { $values = []; @@ -461,18 +465,18 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): $castBool = ApiConfiguration::BOOLEAN_FORMAT_INT - == ApiConfiguration::getDefaultConfiguration()->getBooleanFormatForQueryString() + === ApiConfiguration::getDefaultConfiguration()->getBooleanFormatForQueryString() ? function ($v) { return (int)$v; } - : function ($v) { - return $v ? 'true' : 'false'; - }; + : function ($v) { + return $v ? 'true' : 'false'; + }; $qs = ''; foreach ($params as $k => $v) { $k = $encoder((string)$k); - if (!\is_array($v)) { + if (!is_array($v)) { $qs .= $k; $v = \is_bool($v) ? $castBool($v) : $v; if ($v !== null) { @@ -501,16 +505,16 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): * * @param string $interface The interface class name * @param mixed $data The data containing the discriminator - * @return string The concrete class name * @throws InvalidArgumentException if unable to resolve + * @return string The concrete class name */ private static function resolvePolymorphicClass(string $interface, $data): string { // Extract discriminator value (typically 'type') $discriminatorValue = null; - if (\is_object($data) && isset($data->type)) { + if (is_object($data) && isset($data->type)) { $discriminatorValue = $data->type; - } elseif (\is_array($data) && isset($data['type'])) { + } elseif (is_array($data) && isset($data['type'])) { $discriminatorValue = $data['type']; } @@ -522,16 +526,16 @@ private static function resolvePolymorphicClass(string $interface, $data): strin // Cache for discovered polymorphic implementations static $polymorphicCache = []; - + $normalizedInterface = ltrim($interface, '\\'); - + // If not cached, discover implementations if (!isset($polymorphicCache[$normalizedInterface])) { $polymorphicCache[$normalizedInterface] = self::discoverPolymorphicImplementations($normalizedInterface); } - + $classMap = $polymorphicCache[$normalizedInterface]; - + if (!isset($classMap[$discriminatorValue])) { $available = implode(', ', array_keys($classMap)); throw new InvalidArgumentException( @@ -556,12 +560,12 @@ private static function resolvePolymorphicClass(string $interface, $data): strin private static function discoverPolymorphicImplementations(string $interface): array { $mapping = []; - + // Determine the namespace to scan (typically the Model namespace) $namespaceParts = explode('\\', $interface); $className = array_pop($namespaceParts); $namespace = implode('\\', $namespaceParts); - + // Try to force-load potential implementations by naming convention // e.g., for Route interface, try ProxyRoute, RedirectRoute, UpstreamRoute, etc. $potentialPrefixes = ['Proxy', 'Redirect', 'Upstream', 'Primary', 'Secondary', 'Custom', 'Default']; @@ -571,24 +575,24 @@ private static function discoverPolymorphicImplementations(string $interface): a // Class exists and was autoloaded } } - + // Get all declared classes (now including the ones we just loaded) $declaredClasses = get_declared_classes(); - + foreach ($declaredClasses as $class) { // Only check classes in the same namespace if (strpos($class, $namespace . '\\') !== 0) { continue; } - + // Skip the interface itself if ($class === $interface) { continue; } - + // Check if class implements the interface $reflectionClass = new ReflectionClass($class); - + // For interfaces if (interface_exists($interface)) { if (!$reflectionClass->implementsInterface($interface)) { @@ -602,7 +606,7 @@ private static function discoverPolymorphicImplementations(string $interface): a continue; } } - + // Look for TYPE_* constants that indicate discriminator values $foundForThisClass = false; $constants = $reflectionClass->getConstants(); @@ -612,7 +616,7 @@ private static function discoverPolymorphicImplementations(string $interface): a $foundForThisClass = true; } } - + // Fallback: use class name pattern (ProxyRoute -> "proxy") if (!$foundForThisClass) { $shortName = $reflectionClass->getShortName(); @@ -624,13 +628,13 @@ private static function discoverPolymorphicImplementations(string $interface): a } } } - + if (empty($mapping)) { throw new InvalidArgumentException( sprintf('No polymorphic implementations found for interface %s', $interface) ); } - + return $mapping; } } diff --git a/src/Api/SourceOperationsApi.php b/src/Api/SourceOperationsApi.php index 2a9670335..1a8f5521c 100644 --- a/src/Api/SourceOperationsApi.php +++ b/src/Api/SourceOperationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\EnvironmentSourceOperationInput; /** * Low level SourceOperationsApi (auto-generated) @@ -127,7 +128,6 @@ private function listProjectsEnvironmentsSourceOperationsRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -169,7 +169,6 @@ private function listProjectsEnvironmentsSourceOperationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -242,8 +241,8 @@ private function listProjectsEnvironmentsSourceOperationsRequest( public function runSourceOperation( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentSourceOperationInput $environmentSourceOperationInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentSourceOperationInput $environmentSourceOperationInput + ): AcceptedResponse { return $this->runSourceOperationWithHttpInfo( $projectId, $environmentId, @@ -262,8 +261,8 @@ public function runSourceOperation( private function runSourceOperationWithHttpInfo( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentSourceOperationInput $environmentSourceOperationInput - ): \Upsun\Model\AcceptedResponse { + EnvironmentSourceOperationInput $environmentSourceOperationInput + ): AcceptedResponse { $request = $this->runSourceOperationRequest( $projectId, $environmentId, @@ -307,9 +306,8 @@ private function runSourceOperationWithHttpInfo( private function runSourceOperationRequest( string $projectId, string $environmentId, - \Upsun\Model\EnvironmentSourceOperationInput $environmentSourceOperationInput + EnvironmentSourceOperationInput $environmentSourceOperationInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -358,7 +356,6 @@ private function runSourceOperationRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/SshKeysApi.php b/src/Api/SshKeysApi.php index 845350140..31e4a918c 100644 --- a/src/Api/SshKeysApi.php +++ b/src/Api/SshKeysApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CreateSshKeyRequest; +use Upsun\Model\SshKey; /** * Low level SshKeysApi (auto-generated) @@ -58,8 +59,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Ssh-Keys/operation/create-ssh-key */ public function createSshKey( - ?\Upsun\Model\CreateSshKeyRequest $createSshKeyRequest = null - ): \Upsun\Model\SshKey { + ?CreateSshKeyRequest $createSshKeyRequest = null + ): SshKey { return $this->createSshKeyWithHttpInfo( $createSshKeyRequest ); @@ -73,8 +74,8 @@ public function createSshKey( * @throws ClientExceptionInterface */ private function createSshKeyWithHttpInfo( - ?\Upsun\Model\CreateSshKeyRequest $createSshKeyRequest = null - ): \Upsun\Model\SshKey { + ?CreateSshKeyRequest $createSshKeyRequest = null + ): SshKey { $request = $this->createSshKeyRequest( $createSshKeyRequest ); @@ -113,10 +114,8 @@ private function createSshKeyWithHttpInfo( * @throws InvalidArgumentException */ private function createSshKeyRequest( - ?\Upsun\Model\CreateSshKeyRequest $createSshKeyRequest = null + ?CreateSshKeyRequest $createSshKeyRequest = null ): RequestInterface { - - $resourcePath = '/ssh_keys'; $formParams = []; $queryParams = []; @@ -124,8 +123,6 @@ private function createSshKeyRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -254,7 +251,6 @@ private function deleteSshKeyWithHttpInfo( private function deleteSshKeyRequest( int $keyId ): RequestInterface { - // verify the required parameter 'keyId' is set if (empty($keyId)) { throw new InvalidArgumentException( @@ -280,7 +276,6 @@ private function deleteSshKeyRequest( ); } - $headers = $this->headerSelector->selectHeaders( [], '', @@ -349,7 +344,7 @@ private function deleteSshKeyRequest( */ public function getSshKey( int $keyId - ): \Upsun\Model\SshKey { + ): SshKey { return $this->getSshKeyWithHttpInfo( $keyId ); @@ -365,7 +360,7 @@ public function getSshKey( */ private function getSshKeyWithHttpInfo( int $keyId - ): \Upsun\Model\SshKey { + ): SshKey { $request = $this->getSshKeyRequest( $keyId ); @@ -407,7 +402,6 @@ private function getSshKeyWithHttpInfo( private function getSshKeyRequest( int $keyId ): RequestInterface { - // verify the required parameter 'keyId' is set if (empty($keyId)) { throw new InvalidArgumentException( @@ -433,7 +427,6 @@ private function getSshKeyRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/SubscriptionsApi.php b/src/Api/SubscriptionsApi.php index 24ab21438..7f5d494bc 100644 --- a/src/Api/SubscriptionsApi.php +++ b/src/Api/SubscriptionsApi.php @@ -13,6 +13,19 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CanAffordSubscriptionRequest; +use Upsun\Model\CanCreateNewOrgSubscription200Response; +use Upsun\Model\CanUpdateSubscription200Response; +use Upsun\Model\CreateOrgSubscriptionRequest; +use Upsun\Model\DateTimeFilter; +use Upsun\Model\EstimationObject; +use Upsun\Model\GetSubscriptionUsageAlerts200Response; +use Upsun\Model\StringFilter; +use Upsun\Model\Subscription; +use Upsun\Model\SubscriptionAddonsObject; +use Upsun\Model\SubscriptionCurrentUsageObject; +use Upsun\Model\UpdateOrgSubscriptionRequest; +use Upsun\Model\UpdateSubscriptionUsageAlertsRequest; /** * Low level SubscriptionsApi (auto-generated) @@ -61,7 +74,7 @@ public function __construct( */ public function canAffordSubscription( string $subscriptionId, - ?\Upsun\Model\CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null + ?CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null ): void { $this->canAffordSubscriptionWithHttpInfo( $subscriptionId, @@ -80,7 +93,7 @@ public function canAffordSubscription( */ private function canAffordSubscriptionWithHttpInfo( string $subscriptionId, - ?\Upsun\Model\CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null + ?CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null ): void { $request = $this->canAffordSubscriptionRequest( $subscriptionId, @@ -118,9 +131,8 @@ private function canAffordSubscriptionWithHttpInfo( */ private function canAffordSubscriptionRequest( string $subscriptionId, - ?\Upsun\Model\CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null + ?CanAffordSubscriptionRequest $canAffordSubscriptionRequest = null ): RequestInterface { - // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -146,7 +158,6 @@ private function canAffordSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( [], 'application/json', @@ -224,7 +235,7 @@ private function canAffordSubscriptionRequest( */ public function canCreateNewOrgSubscription( string $organizationId - ): \Upsun\Model\CanCreateNewOrgSubscription200Response { + ): CanCreateNewOrgSubscription200Response { return $this->canCreateNewOrgSubscriptionWithHttpInfo( $organizationId ); @@ -241,7 +252,7 @@ public function canCreateNewOrgSubscription( */ private function canCreateNewOrgSubscriptionWithHttpInfo( string $organizationId - ): \Upsun\Model\CanCreateNewOrgSubscription200Response { + ): CanCreateNewOrgSubscription200Response { $request = $this->canCreateNewOrgSubscriptionRequest( $organizationId ); @@ -284,7 +295,6 @@ private function canCreateNewOrgSubscriptionWithHttpInfo( private function canCreateNewOrgSubscriptionRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -310,7 +320,6 @@ private function canCreateNewOrgSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -393,7 +402,7 @@ public function canUpdateSubscription( ?int $environments = null, ?int $storage = null, ?int $userLicenses = null - ): \Upsun\Model\CanUpdateSubscription200Response { + ): CanUpdateSubscription200Response { return $this->canUpdateSubscriptionWithHttpInfo( $subscriptionId, $plan, @@ -427,7 +436,7 @@ private function canUpdateSubscriptionWithHttpInfo( ?int $environments = null, ?int $storage = null, ?int $userLicenses = null - ): \Upsun\Model\CanUpdateSubscription200Response { + ): CanUpdateSubscription200Response { $request = $this->canUpdateSubscriptionRequest( $subscriptionId, $plan, @@ -487,7 +496,6 @@ private function canUpdateSubscriptionRequest( ?int $storage = null, ?int $userLicenses = null ): RequestInterface { - // verify the required parameter 'subscriptionId' is set if (empty($subscriptionId)) { throw new InvalidArgumentException( @@ -516,8 +524,6 @@ private function canUpdateSubscriptionRequest( } } - - // query params if ($environments !== null) { if ('form' === 'form' && is_array($environments)) { @@ -531,8 +537,6 @@ private function canUpdateSubscriptionRequest( } } - - // query params if ($storage !== null) { if ('form' === 'form' && is_array($storage)) { @@ -546,8 +550,6 @@ private function canUpdateSubscriptionRequest( } } - - // query params if ($userLicenses !== null) { if ('form' === 'form' && is_array($userLicenses)) { @@ -561,8 +563,6 @@ private function canUpdateSubscriptionRequest( } } - - // path params if ($subscriptionId !== null) { @@ -573,7 +573,6 @@ private function canUpdateSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -644,8 +643,8 @@ private function canUpdateSubscriptionRequest( */ public function createOrgSubscription( string $organizationId, - \Upsun\Model\CreateOrgSubscriptionRequest $createOrgSubscriptionRequest - ): \Upsun\Model\Subscription { + CreateOrgSubscriptionRequest $createOrgSubscriptionRequest + ): Subscription { return $this->createOrgSubscriptionWithHttpInfo( $organizationId, $createOrgSubscriptionRequest @@ -663,8 +662,8 @@ public function createOrgSubscription( */ private function createOrgSubscriptionWithHttpInfo( string $organizationId, - \Upsun\Model\CreateOrgSubscriptionRequest $createOrgSubscriptionRequest - ): \Upsun\Model\Subscription { + CreateOrgSubscriptionRequest $createOrgSubscriptionRequest + ): Subscription { $request = $this->createOrgSubscriptionRequest( $organizationId, $createOrgSubscriptionRequest @@ -707,9 +706,8 @@ private function createOrgSubscriptionWithHttpInfo( */ private function createOrgSubscriptionRequest( string $organizationId, - \Upsun\Model\CreateOrgSubscriptionRequest $createOrgSubscriptionRequest + CreateOrgSubscriptionRequest $createOrgSubscriptionRequest ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -742,7 +740,6 @@ private function createOrgSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -886,7 +883,6 @@ private function deleteOrgSubscriptionRequest( string $organizationId, string $subscriptionId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -928,7 +924,6 @@ private function deleteOrgSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1008,7 +1003,7 @@ public function estimateNewOrgSubscription( int $storage, int $userLicenses, ?string $format = null - ): \Upsun\Model\EstimationObject { + ): EstimationObject { return $this->estimateNewOrgSubscriptionWithHttpInfo( $organizationId, $plan, @@ -1040,7 +1035,7 @@ private function estimateNewOrgSubscriptionWithHttpInfo( int $storage, int $userLicenses, ?string $format = null - ): \Upsun\Model\EstimationObject { + ): EstimationObject { $request = $this->estimateNewOrgSubscriptionRequest( $organizationId, $plan, @@ -1098,7 +1093,6 @@ private function estimateNewOrgSubscriptionRequest( int $userLicenses, ?string $format = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1155,8 +1149,6 @@ private function estimateNewOrgSubscriptionRequest( } } - - // query params if ($environments !== null) { if ('form' === 'form' && is_array($environments)) { @@ -1170,8 +1162,6 @@ private function estimateNewOrgSubscriptionRequest( } } - - // query params if ($storage !== null) { if ('form' === 'form' && is_array($storage)) { @@ -1185,8 +1175,6 @@ private function estimateNewOrgSubscriptionRequest( } } - - // query params if ($userLicenses !== null) { if ('form' === 'form' && is_array($userLicenses)) { @@ -1200,8 +1188,6 @@ private function estimateNewOrgSubscriptionRequest( } } - - // query params if ($format !== null) { if ('form' === 'form' && is_array($format)) { @@ -1215,8 +1201,6 @@ private function estimateNewOrgSubscriptionRequest( } } - - // path params if ($organizationId !== null) { @@ -1227,7 +1211,6 @@ private function estimateNewOrgSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1310,7 +1293,7 @@ public function estimateOrgSubscription( ?int $storage = null, ?int $userLicenses = null, ?string $format = null - ): \Upsun\Model\EstimationObject { + ): EstimationObject { return $this->estimateOrgSubscriptionWithHttpInfo( $organizationId, $subscriptionId, @@ -1346,7 +1329,7 @@ private function estimateOrgSubscriptionWithHttpInfo( ?int $storage = null, ?int $userLicenses = null, ?string $format = null - ): \Upsun\Model\EstimationObject { + ): EstimationObject { $request = $this->estimateOrgSubscriptionRequest( $organizationId, $subscriptionId, @@ -1408,7 +1391,6 @@ private function estimateOrgSubscriptionRequest( ?int $userLicenses = null, ?string $format = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1451,8 +1433,6 @@ private function estimateOrgSubscriptionRequest( } } - - // query params if ($environments !== null) { if ('form' === 'form' && is_array($environments)) { @@ -1466,8 +1446,6 @@ private function estimateOrgSubscriptionRequest( } } - - // query params if ($storage !== null) { if ('form' === 'form' && is_array($storage)) { @@ -1481,8 +1459,6 @@ private function estimateOrgSubscriptionRequest( } } - - // query params if ($userLicenses !== null) { if ('form' === 'form' && is_array($userLicenses)) { @@ -1496,8 +1472,6 @@ private function estimateOrgSubscriptionRequest( } } - - // query params if ($format !== null) { if ('form' === 'form' && is_array($format)) { @@ -1511,8 +1485,6 @@ private function estimateOrgSubscriptionRequest( } } - - // path params if ($organizationId !== null) { @@ -1532,7 +1504,6 @@ private function estimateOrgSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1606,7 +1577,7 @@ private function estimateOrgSubscriptionRequest( public function getOrgSubscription( string $organizationId, string $subscriptionId - ): \Upsun\Model\Subscription { + ): Subscription { return $this->getOrgSubscriptionWithHttpInfo( $organizationId, $subscriptionId @@ -1627,7 +1598,7 @@ public function getOrgSubscription( private function getOrgSubscriptionWithHttpInfo( string $organizationId, string $subscriptionId - ): \Upsun\Model\Subscription { + ): Subscription { $request = $this->getOrgSubscriptionRequest( $organizationId, $subscriptionId @@ -1674,7 +1645,6 @@ private function getOrgSubscriptionRequest( string $organizationId, string $subscriptionId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1716,7 +1686,6 @@ private function getOrgSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1793,7 +1762,7 @@ public function getOrgSubscriptionCurrentUsage( string $subscriptionId, ?string $usageGroups = null, ?bool $includeNotCharged = null - ): \Upsun\Model\SubscriptionCurrentUsageObject { + ): SubscriptionCurrentUsageObject { return $this->getOrgSubscriptionCurrentUsageWithHttpInfo( $organizationId, $subscriptionId, @@ -1820,7 +1789,7 @@ private function getOrgSubscriptionCurrentUsageWithHttpInfo( string $subscriptionId, ?string $usageGroups = null, ?bool $includeNotCharged = null - ): \Upsun\Model\SubscriptionCurrentUsageObject { + ): SubscriptionCurrentUsageObject { $request = $this->getOrgSubscriptionCurrentUsageRequest( $organizationId, $subscriptionId, @@ -1873,7 +1842,6 @@ private function getOrgSubscriptionCurrentUsageRequest( ?string $usageGroups = null, ?bool $includeNotCharged = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -1909,8 +1877,6 @@ private function getOrgSubscriptionCurrentUsageRequest( } } - - // query params if ($includeNotCharged !== null) { if ('form' === 'form' && is_array($includeNotCharged)) { @@ -1924,8 +1890,6 @@ private function getOrgSubscriptionCurrentUsageRequest( } } - - // path params if ($organizationId !== null) { @@ -1945,7 +1909,6 @@ private function getOrgSubscriptionCurrentUsageRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -2020,7 +1983,7 @@ private function getOrgSubscriptionCurrentUsageRequest( public function getSubscriptionUsageAlerts( string $organizationId, string $subscriptionId - ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { + ): GetSubscriptionUsageAlerts200Response { return $this->getSubscriptionUsageAlertsWithHttpInfo( $organizationId, $subscriptionId @@ -2042,7 +2005,7 @@ public function getSubscriptionUsageAlerts( private function getSubscriptionUsageAlertsWithHttpInfo( string $organizationId, string $subscriptionId - ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { + ): GetSubscriptionUsageAlerts200Response { $request = $this->getSubscriptionUsageAlertsRequest( $organizationId, $subscriptionId @@ -2090,7 +2053,6 @@ private function getSubscriptionUsageAlertsRequest( string $organizationId, string $subscriptionId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2132,7 +2094,6 @@ private function getSubscriptionUsageAlertsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -2222,11 +2183,11 @@ private function getSubscriptionUsageAlertsRequest( public function listOrgSubscriptions( string $organizationId, ?string $filterStatus = null, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterProjectId = null, - ?\Upsun\Model\StringFilter $filterProjectTitle = null, - ?\Upsun\Model\StringFilter $filterRegion = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterProjectId = null, + ?StringFilter $filterProjectTitle = null, + ?StringFilter $filterRegion = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -2277,11 +2238,11 @@ public function listOrgSubscriptions( private function listOrgSubscriptionsWithHttpInfo( string $organizationId, ?string $filterStatus = null, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterProjectId = null, - ?\Upsun\Model\StringFilter $filterProjectTitle = null, - ?\Upsun\Model\StringFilter $filterRegion = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterProjectId = null, + ?StringFilter $filterProjectTitle = null, + ?StringFilter $filterRegion = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, @@ -2357,17 +2318,16 @@ private function listOrgSubscriptionsWithHttpInfo( private function listOrgSubscriptionsRequest( string $organizationId, ?string $filterStatus = null, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\StringFilter $filterProjectId = null, - ?\Upsun\Model\StringFilter $filterProjectTitle = null, - ?\Upsun\Model\StringFilter $filterRegion = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterId = null, + ?StringFilter $filterProjectId = null, + ?StringFilter $filterProjectTitle = null, + ?StringFilter $filterRegion = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2390,8 +2350,6 @@ private function listOrgSubscriptionsRequest( ); } - - $resourcePath = '/organizations/{organization_id}/subscriptions'; $formParams = []; $queryParams = []; @@ -2412,8 +2370,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($filterId !== null) { if ('form' === 'deepObject' && is_array($filterId)) { @@ -2427,8 +2383,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($filterProjectId !== null) { if ('form' === 'deepObject' && is_array($filterProjectId)) { @@ -2442,8 +2396,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($filterProjectTitle !== null) { if ('form' === 'deepObject' && is_array($filterProjectTitle)) { @@ -2457,8 +2409,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($filterRegion !== null) { if ('form' === 'deepObject' && is_array($filterRegion)) { @@ -2472,8 +2422,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -2487,8 +2435,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -2502,8 +2448,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -2517,8 +2461,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -2532,8 +2474,6 @@ private function listOrgSubscriptionsRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -2547,8 +2487,6 @@ private function listOrgSubscriptionsRequest( } } - - // path params if ($organizationId !== null) { @@ -2559,7 +2497,6 @@ private function listOrgSubscriptionsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -2632,7 +2569,7 @@ private function listOrgSubscriptionsRequest( public function listSubscriptionAddons( string $organizationId, string $subscriptionId - ): \Upsun\Model\SubscriptionAddonsObject { + ): SubscriptionAddonsObject { return $this->listSubscriptionAddonsWithHttpInfo( $organizationId, $subscriptionId @@ -2653,7 +2590,7 @@ public function listSubscriptionAddons( private function listSubscriptionAddonsWithHttpInfo( string $organizationId, string $subscriptionId - ): \Upsun\Model\SubscriptionAddonsObject { + ): SubscriptionAddonsObject { $request = $this->listSubscriptionAddonsRequest( $organizationId, $subscriptionId @@ -2700,7 +2637,6 @@ private function listSubscriptionAddonsRequest( string $organizationId, string $subscriptionId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2742,7 +2678,6 @@ private function listSubscriptionAddonsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -2816,8 +2751,8 @@ private function listSubscriptionAddonsRequest( public function updateOrgSubscription( string $organizationId, string $subscriptionId, - ?\Upsun\Model\UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null - ): \Upsun\Model\Subscription { + ?UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null + ): Subscription { return $this->updateOrgSubscriptionWithHttpInfo( $organizationId, $subscriptionId, @@ -2839,8 +2774,8 @@ public function updateOrgSubscription( private function updateOrgSubscriptionWithHttpInfo( string $organizationId, string $subscriptionId, - ?\Upsun\Model\UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null - ): \Upsun\Model\Subscription { + ?UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null + ): Subscription { $request = $this->updateOrgSubscriptionRequest( $organizationId, $subscriptionId, @@ -2887,9 +2822,8 @@ private function updateOrgSubscriptionWithHttpInfo( private function updateOrgSubscriptionRequest( string $organizationId, string $subscriptionId, - ?\Upsun\Model\UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null + ?UpdateOrgSubscriptionRequest $updateOrgSubscriptionRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -2931,7 +2865,6 @@ private function updateOrgSubscriptionRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', @@ -3014,8 +2947,8 @@ private function updateOrgSubscriptionRequest( public function updateSubscriptionUsageAlerts( string $organizationId, string $subscriptionId, - ?\Upsun\Model\UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null - ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { + ?UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null + ): GetSubscriptionUsageAlerts200Response { return $this->updateSubscriptionUsageAlertsWithHttpInfo( $organizationId, $subscriptionId, @@ -3038,8 +2971,8 @@ public function updateSubscriptionUsageAlerts( private function updateSubscriptionUsageAlertsWithHttpInfo( string $organizationId, string $subscriptionId, - ?\Upsun\Model\UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null - ): \Upsun\Model\GetSubscriptionUsageAlerts200Response { + ?UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null + ): GetSubscriptionUsageAlerts200Response { $request = $this->updateSubscriptionUsageAlertsRequest( $organizationId, $subscriptionId, @@ -3087,9 +3020,8 @@ private function updateSubscriptionUsageAlertsWithHttpInfo( private function updateSubscriptionUsageAlertsRequest( string $organizationId, string $subscriptionId, - ?\Upsun\Model\UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null + ?UpdateSubscriptionUsageAlertsRequest $updateSubscriptionUsageAlertsRequest = null ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -3131,7 +3063,6 @@ private function updateSubscriptionUsageAlertsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], 'application/json', diff --git a/src/Api/SupportApi.php b/src/Api/SupportApi.php index cc98ef725..a67553109 100644 --- a/src/Api/SupportApi.php +++ b/src/Api/SupportApi.php @@ -13,6 +13,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CreateTicketRequest; +use Upsun\Model\Ticket; +use Upsun\Model\UpdateTicketRequest; /** * Low level SupportApi (auto-generated) @@ -58,8 +61,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Support/operation/create-ticket */ public function createTicket( - ?\Upsun\Model\CreateTicketRequest $createTicketRequest = null - ): \Upsun\Model\Ticket { + ?CreateTicketRequest $createTicketRequest = null + ): Ticket { return $this->createTicketWithHttpInfo( $createTicketRequest ); @@ -73,8 +76,8 @@ public function createTicket( * @throws ClientExceptionInterface */ private function createTicketWithHttpInfo( - ?\Upsun\Model\CreateTicketRequest $createTicketRequest = null - ): \Upsun\Model\Ticket { + ?CreateTicketRequest $createTicketRequest = null + ): Ticket { $request = $this->createTicketRequest( $createTicketRequest ); @@ -113,10 +116,8 @@ private function createTicketWithHttpInfo( * @throws InvalidArgumentException */ private function createTicketRequest( - ?\Upsun\Model\CreateTicketRequest $createTicketRequest = null + ?CreateTicketRequest $createTicketRequest = null ): RequestInterface { - - $resourcePath = '/tickets'; $formParams = []; $queryParams = []; @@ -124,8 +125,6 @@ private function createTicketRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -272,8 +271,6 @@ private function listTicketCategoriesRequest( ?string $subscriptionId = null, ?string $organizationId = null ): RequestInterface { - - $resourcePath = '/tickets/category'; $formParams = []; $queryParams = []; @@ -294,8 +291,6 @@ private function listTicketCategoriesRequest( } } - - // query params if ($organizationId !== null) { if ('form' === 'form' && is_array($organizationId)) { @@ -309,10 +304,6 @@ private function listTicketCategoriesRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -451,8 +442,6 @@ private function listTicketPrioritiesRequest( ?string $subscriptionId = null, ?string $category = null ): RequestInterface { - - $resourcePath = '/tickets/priority'; $formParams = []; $queryParams = []; @@ -473,8 +462,6 @@ private function listTicketPrioritiesRequest( } } - - // query params if ($category !== null) { if ('form' === 'form' && is_array($category)) { @@ -488,10 +475,6 @@ private function listTicketPrioritiesRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -560,8 +543,8 @@ private function listTicketPrioritiesRequest( */ public function updateTicket( string $ticketId, - ?\Upsun\Model\UpdateTicketRequest $updateTicketRequest = null - ): \Upsun\Model\Ticket { + ?UpdateTicketRequest $updateTicketRequest = null + ): Ticket { return $this->updateTicketWithHttpInfo( $ticketId, $updateTicketRequest @@ -578,8 +561,8 @@ public function updateTicket( */ private function updateTicketWithHttpInfo( string $ticketId, - ?\Upsun\Model\UpdateTicketRequest $updateTicketRequest = null - ): \Upsun\Model\Ticket { + ?UpdateTicketRequest $updateTicketRequest = null + ): Ticket { $request = $this->updateTicketRequest( $ticketId, $updateTicketRequest @@ -621,9 +604,8 @@ private function updateTicketWithHttpInfo( */ private function updateTicketRequest( string $ticketId, - ?\Upsun\Model\UpdateTicketRequest $updateTicketRequest = null + ?UpdateTicketRequest $updateTicketRequest = null ): RequestInterface { - // verify the required parameter 'ticketId' is set if (empty($ticketId)) { throw new InvalidArgumentException( @@ -649,7 +631,6 @@ private function updateTicketRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/SystemInformationApi.php b/src/Api/SystemInformationApi.php index 76d8d7035..99b292519 100644 --- a/src/Api/SystemInformationApi.php +++ b/src/Api/SystemInformationApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\SystemInformation; /** * Low level SystemInformationApi (auto-generated) @@ -60,7 +61,7 @@ public function __construct( */ public function actionProjectsSystemRestart( string $projectId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->actionProjectsSystemRestartWithHttpInfo( $projectId ); @@ -75,7 +76,7 @@ public function actionProjectsSystemRestart( */ private function actionProjectsSystemRestartWithHttpInfo( string $projectId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->actionProjectsSystemRestartRequest( $projectId ); @@ -116,7 +117,6 @@ private function actionProjectsSystemRestartWithHttpInfo( private function actionProjectsSystemRestartRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -142,7 +142,6 @@ private function actionProjectsSystemRestartRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -211,7 +210,7 @@ private function actionProjectsSystemRestartRequest( */ public function getProjectsSystem( string $projectId - ): \Upsun\Model\SystemInformation { + ): SystemInformation { return $this->getProjectsSystemWithHttpInfo( $projectId ); @@ -226,7 +225,7 @@ public function getProjectsSystem( */ private function getProjectsSystemWithHttpInfo( string $projectId - ): \Upsun\Model\SystemInformation { + ): SystemInformation { $request = $this->getProjectsSystemRequest( $projectId ); @@ -267,7 +266,6 @@ private function getProjectsSystemWithHttpInfo( private function getProjectsSystemRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -293,7 +291,6 @@ private function getProjectsSystemRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', diff --git a/src/Api/TaskApi.php b/src/Api/TaskApi.php index 21c26339a..52ee72067 100644 --- a/src/Api/TaskApi.php +++ b/src/Api/TaskApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,9 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Task; +use Upsun\Model\TaskTriggerInput; /** * Low level TaskApi (auto-generated) @@ -59,7 +61,7 @@ public function getProjectsEnvironmentsTasks( string $projectId, string $environmentId, string $taskId - ): \Upsun\Model\Task { + ): Task { return $this->getProjectsEnvironmentsTasksWithHttpInfo( $projectId, $environmentId, @@ -77,7 +79,7 @@ private function getProjectsEnvironmentsTasksWithHttpInfo( string $projectId, string $environmentId, string $taskId - ): \Upsun\Model\Task { + ): Task { $request = $this->getProjectsEnvironmentsTasksRequest( $projectId, $environmentId, @@ -122,7 +124,6 @@ private function getProjectsEnvironmentsTasksRequest( string $environmentId, string $taskId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -180,7 +181,6 @@ private function getProjectsEnvironmentsTasksRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -310,7 +310,6 @@ private function listProjectsEnvironmentsTasksRequest( string $projectId, string $environmentId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -352,7 +351,6 @@ private function listProjectsEnvironmentsTasksRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -421,8 +419,8 @@ public function runTask( string $projectId, string $environmentId, string $taskId, - \Upsun\Model\TaskTriggerInput $taskTriggerInput - ): \Upsun\Model\AcceptedResponse { + TaskTriggerInput $taskTriggerInput + ): AcceptedResponse { return $this->runTaskWithHttpInfo( $projectId, $environmentId, @@ -442,8 +440,8 @@ private function runTaskWithHttpInfo( string $projectId, string $environmentId, string $taskId, - \Upsun\Model\TaskTriggerInput $taskTriggerInput - ): \Upsun\Model\AcceptedResponse { + TaskTriggerInput $taskTriggerInput + ): AcceptedResponse { $request = $this->runTaskRequest( $projectId, $environmentId, @@ -489,9 +487,8 @@ private function runTaskRequest( string $projectId, string $environmentId, string $taskId, - \Upsun\Model\TaskTriggerInput $taskTriggerInput + TaskTriggerInput $taskTriggerInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -556,7 +553,6 @@ private function runTaskRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/TeamAccessApi.php b/src/Api/TeamAccessApi.php index c68fec398..c9e9772e9 100644 --- a/src/Api/TeamAccessApi.php +++ b/src/Api/TeamAccessApi.php @@ -13,6 +13,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\TeamProjectAccess; /** * Low level TeamAccessApi (auto-generated) @@ -65,7 +66,7 @@ public function __construct( public function getProjectTeamAccess( string $projectId, string $teamId - ): \Upsun\Model\TeamProjectAccess { + ): TeamProjectAccess { return $this->getProjectTeamAccessWithHttpInfo( $projectId, $teamId @@ -86,7 +87,7 @@ public function getProjectTeamAccess( private function getProjectTeamAccessWithHttpInfo( string $projectId, string $teamId - ): \Upsun\Model\TeamProjectAccess { + ): TeamProjectAccess { $request = $this->getProjectTeamAccessRequest( $projectId, $teamId @@ -133,7 +134,6 @@ private function getProjectTeamAccessRequest( string $projectId, string $teamId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -175,7 +175,6 @@ private function getProjectTeamAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -249,7 +248,7 @@ private function getProjectTeamAccessRequest( public function getTeamProjectAccess( string $teamId, string $projectId - ): \Upsun\Model\TeamProjectAccess { + ): TeamProjectAccess { return $this->getTeamProjectAccessWithHttpInfo( $teamId, $projectId @@ -270,7 +269,7 @@ public function getTeamProjectAccess( private function getTeamProjectAccessWithHttpInfo( string $teamId, string $projectId - ): \Upsun\Model\TeamProjectAccess { + ): TeamProjectAccess { $request = $this->getTeamProjectAccessRequest( $teamId, $projectId @@ -317,7 +316,6 @@ private function getTeamProjectAccessRequest( string $teamId, string $projectId ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -359,7 +357,6 @@ private function getTeamProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -489,7 +486,6 @@ private function grantProjectTeamAccessRequest( string $projectId, array $grantProjectTeamAccessRequestInner ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -522,7 +518,6 @@ private function grantProjectTeamAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -660,7 +655,6 @@ private function grantTeamProjectAccessRequest( string $teamId, array $grantTeamProjectAccessRequestInner ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -693,7 +687,6 @@ private function grantTeamProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -879,7 +872,6 @@ private function listProjectTeamAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -902,8 +894,6 @@ private function listProjectTeamAccessRequest( ); } - - $resourcePath = '/projects/{project_id}/team-access'; $formParams = []; $queryParams = []; @@ -924,8 +914,6 @@ private function listProjectTeamAccessRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -939,8 +927,6 @@ private function listProjectTeamAccessRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -954,8 +940,6 @@ private function listProjectTeamAccessRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -969,8 +953,6 @@ private function listProjectTeamAccessRequest( } } - - // path params if ($projectId !== null) { @@ -981,7 +963,6 @@ private function listProjectTeamAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1159,7 +1140,6 @@ private function listTeamProjectAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1182,8 +1162,6 @@ private function listTeamProjectAccessRequest( ); } - - $resourcePath = '/teams/{team_id}/project-access'; $formParams = []; $queryParams = []; @@ -1204,8 +1182,6 @@ private function listTeamProjectAccessRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1219,8 +1195,6 @@ private function listTeamProjectAccessRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1234,8 +1208,6 @@ private function listTeamProjectAccessRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1249,8 +1221,6 @@ private function listTeamProjectAccessRequest( } } - - // path params if ($teamId !== null) { @@ -1261,7 +1231,6 @@ private function listTeamProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1397,7 +1366,6 @@ private function removeProjectTeamAccessRequest( string $projectId, string $teamId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1439,7 +1407,6 @@ private function removeProjectTeamAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1575,7 +1542,6 @@ private function removeTeamProjectAccessRequest( string $teamId, string $projectId ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1617,7 +1583,6 @@ private function removeTeamProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', diff --git a/src/Api/TeamsApi.php b/src/Api/TeamsApi.php index 857c493be..98b8489c3 100644 --- a/src/Api/TeamsApi.php +++ b/src/Api/TeamsApi.php @@ -13,6 +13,15 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CreateTeamMemberRequest; +use Upsun\Model\CreateTeamRequest; +use Upsun\Model\DateTimeFilter; +use Upsun\Model\ListTeamMembers200Response; +use Upsun\Model\ListTeams200Response; +use Upsun\Model\StringFilter; +use Upsun\Model\Team; +use Upsun\Model\TeamMember; +use Upsun\Model\UpdateTeamRequest; /** * Low level TeamsApi (auto-generated) @@ -59,8 +68,8 @@ public function __construct( * @see https://docs.upsun.com/api/#tag/Teams/operation/create-team */ public function createTeam( - \Upsun\Model\CreateTeamRequest $createTeamRequest - ): \Upsun\Model\Team { + CreateTeamRequest $createTeamRequest + ): Team { return $this->createTeamWithHttpInfo( $createTeamRequest ); @@ -74,8 +83,8 @@ public function createTeam( * @throws ClientExceptionInterface */ private function createTeamWithHttpInfo( - \Upsun\Model\CreateTeamRequest $createTeamRequest - ): \Upsun\Model\Team { + CreateTeamRequest $createTeamRequest + ): Team { $request = $this->createTeamRequest( $createTeamRequest ); @@ -114,9 +123,8 @@ private function createTeamWithHttpInfo( * @throws InvalidArgumentException */ private function createTeamRequest( - \Upsun\Model\CreateTeamRequest $createTeamRequest + CreateTeamRequest $createTeamRequest ): RequestInterface { - // verify the required parameter 'createTeamRequest' is set if (empty($createTeamRequest)) { throw new InvalidArgumentException( @@ -132,8 +140,6 @@ private function createTeamRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -212,8 +218,8 @@ private function createTeamRequest( */ public function createTeamMember( string $teamId, - \Upsun\Model\CreateTeamMemberRequest $createTeamMemberRequest - ): \Upsun\Model\TeamMember { + CreateTeamMemberRequest $createTeamMemberRequest + ): TeamMember { return $this->createTeamMemberWithHttpInfo( $teamId, $createTeamMemberRequest @@ -231,8 +237,8 @@ public function createTeamMember( */ private function createTeamMemberWithHttpInfo( string $teamId, - \Upsun\Model\CreateTeamMemberRequest $createTeamMemberRequest - ): \Upsun\Model\TeamMember { + CreateTeamMemberRequest $createTeamMemberRequest + ): TeamMember { $request = $this->createTeamMemberRequest( $teamId, $createTeamMemberRequest @@ -275,9 +281,8 @@ private function createTeamMemberWithHttpInfo( */ private function createTeamMemberRequest( string $teamId, - \Upsun\Model\CreateTeamMemberRequest $createTeamMemberRequest + CreateTeamMemberRequest $createTeamMemberRequest ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -310,7 +315,6 @@ private function createTeamMemberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -443,7 +447,6 @@ private function deleteTeamWithHttpInfo( private function deleteTeamRequest( string $teamId ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -469,7 +472,6 @@ private function deleteTeamRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -605,7 +607,6 @@ private function deleteTeamMemberRequest( string $teamId, string $userId ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -647,7 +648,6 @@ private function deleteTeamMemberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -718,7 +718,7 @@ private function deleteTeamMemberRequest( */ public function getTeam( string $teamId - ): \Upsun\Model\Team { + ): Team { return $this->getTeamWithHttpInfo( $teamId ); @@ -735,7 +735,7 @@ public function getTeam( */ private function getTeamWithHttpInfo( string $teamId - ): \Upsun\Model\Team { + ): Team { $request = $this->getTeamRequest( $teamId ); @@ -778,7 +778,6 @@ private function getTeamWithHttpInfo( private function getTeamRequest( string $teamId ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -804,7 +803,6 @@ private function getTeamRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -878,7 +876,7 @@ private function getTeamRequest( public function getTeamMember( string $teamId, string $userId - ): \Upsun\Model\TeamMember { + ): TeamMember { return $this->getTeamMemberWithHttpInfo( $teamId, $userId @@ -899,7 +897,7 @@ public function getTeamMember( private function getTeamMemberWithHttpInfo( string $teamId, string $userId - ): \Upsun\Model\TeamMember { + ): TeamMember { $request = $this->getTeamMemberRequest( $teamId, $userId @@ -946,7 +944,6 @@ private function getTeamMemberRequest( string $teamId, string $userId ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -988,7 +985,6 @@ private function getTeamMemberRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1065,7 +1061,7 @@ public function listTeamMembers( ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListTeamMembers200Response { + ): ListTeamMembers200Response { return $this->listTeamMembersWithHttpInfo( $teamId, $pageBefore, @@ -1091,7 +1087,7 @@ private function listTeamMembersWithHttpInfo( ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListTeamMembers200Response { + ): ListTeamMembers200Response { $request = $this->listTeamMembersRequest( $teamId, $pageBefore, @@ -1143,7 +1139,6 @@ private function listTeamMembersRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1172,8 +1167,6 @@ private function listTeamMembersRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1187,8 +1180,6 @@ private function listTeamMembersRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1202,8 +1193,6 @@ private function listTeamMembersRequest( } } - - // path params if ($teamId !== null) { @@ -1214,7 +1203,6 @@ private function listTeamMembersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1289,14 +1277,14 @@ private function listTeamMembersRequest( * @see https://docs.upsun.com/api/#tag/Teams/operation/list-teams */ public function listTeams( - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterOrganizationId = null, + ?StringFilter $filterId = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListTeams200Response { + ): ListTeams200Response { return $this->listTeamsWithHttpInfo( $filterOrganizationId, $filterId, @@ -1323,14 +1311,14 @@ public function listTeams( * @throws ClientExceptionInterface */ private function listTeamsWithHttpInfo( - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterOrganizationId = null, + ?StringFilter $filterId = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListTeams200Response { + ): ListTeams200Response { $request = $this->listTeamsRequest( $filterOrganizationId, $filterId, @@ -1382,16 +1370,14 @@ private function listTeamsWithHttpInfo( * @throws InvalidArgumentException */ private function listTeamsRequest( - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\StringFilter $filterId = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterOrganizationId = null, + ?StringFilter $filterId = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - - if ($pageSize !== null && $pageSize > 100) { throw new InvalidArgumentException( 'invalid value for "$pageSize" when calling TeamsApi.listTeams, @@ -1406,8 +1392,6 @@ private function listTeamsRequest( ); } - - $resourcePath = '/teams'; $formParams = []; $queryParams = []; @@ -1428,8 +1412,6 @@ private function listTeamsRequest( } } - - // query params if ($filterId !== null) { if ('form' === 'deepObject' && is_array($filterId)) { @@ -1443,8 +1425,6 @@ private function listTeamsRequest( } } - - // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -1458,8 +1438,6 @@ private function listTeamsRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1473,8 +1451,6 @@ private function listTeamsRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1488,8 +1464,6 @@ private function listTeamsRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1503,8 +1477,6 @@ private function listTeamsRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1518,10 +1490,6 @@ private function listTeamsRequest( } } - - - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1598,13 +1566,13 @@ private function listTeamsRequest( */ public function listUserTeams( string $userId, - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterOrganizationId = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListTeams200Response { + ): ListTeams200Response { return $this->listUserTeamsWithHttpInfo( $userId, $filterOrganizationId, @@ -1633,13 +1601,13 @@ public function listUserTeams( */ private function listUserTeamsWithHttpInfo( string $userId, - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterOrganizationId = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null - ): \Upsun\Model\ListTeams200Response { + ): ListTeams200Response { $request = $this->listUserTeamsRequest( $userId, $filterOrganizationId, @@ -1693,14 +1661,13 @@ private function listUserTeamsWithHttpInfo( */ private function listUserTeamsRequest( string $userId, - ?\Upsun\Model\StringFilter $filterOrganizationId = null, - ?\Upsun\Model\DateTimeFilter $filterUpdatedAt = null, + ?StringFilter $filterOrganizationId = null, + ?DateTimeFilter $filterUpdatedAt = null, ?int $pageSize = null, ?string $pageBefore = null, ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1723,8 +1690,6 @@ private function listUserTeamsRequest( ); } - - $resourcePath = '/users/{user_id}/teams'; $formParams = []; $queryParams = []; @@ -1745,8 +1710,6 @@ private function listUserTeamsRequest( } } - - // query params if ($filterUpdatedAt !== null) { if ('form' === 'deepObject' && is_array($filterUpdatedAt)) { @@ -1760,8 +1723,6 @@ private function listUserTeamsRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1775,8 +1736,6 @@ private function listUserTeamsRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1790,8 +1749,6 @@ private function listUserTeamsRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1805,8 +1762,6 @@ private function listUserTeamsRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1820,8 +1775,6 @@ private function listUserTeamsRequest( } } - - // path params if ($userId !== null) { @@ -1832,7 +1785,6 @@ private function listUserTeamsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1903,8 +1855,8 @@ private function listUserTeamsRequest( */ public function updateTeam( string $teamId, - ?\Upsun\Model\UpdateTeamRequest $updateTeamRequest = null - ): \Upsun\Model\Team { + ?UpdateTeamRequest $updateTeamRequest = null + ): Team { return $this->updateTeamWithHttpInfo( $teamId, $updateTeamRequest @@ -1922,8 +1874,8 @@ public function updateTeam( */ private function updateTeamWithHttpInfo( string $teamId, - ?\Upsun\Model\UpdateTeamRequest $updateTeamRequest = null - ): \Upsun\Model\Team { + ?UpdateTeamRequest $updateTeamRequest = null + ): Team { $request = $this->updateTeamRequest( $teamId, $updateTeamRequest @@ -1966,9 +1918,8 @@ private function updateTeamWithHttpInfo( */ private function updateTeamRequest( string $teamId, - ?\Upsun\Model\UpdateTeamRequest $updateTeamRequest = null + ?UpdateTeamRequest $updateTeamRequest = null ): RequestInterface { - // verify the required parameter 'teamId' is set if (empty($teamId)) { throw new InvalidArgumentException( @@ -1994,7 +1945,6 @@ private function updateTeamRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/ThirdPartyIntegrationsApi.php b/src/Api/ThirdPartyIntegrationsApi.php index 167d395e3..8119bce6a 100644 --- a/src/Api/ThirdPartyIntegrationsApi.php +++ b/src/Api/ThirdPartyIntegrationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,10 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\AcceptedResponse; +use Upsun\Model\Integration; +use Upsun\Model\IntegrationCreateCreateInput; +use Upsun\Model\IntegrationPatch; /** * Low level ThirdPartyIntegrationsApi (auto-generated) @@ -60,8 +63,8 @@ public function __construct( */ public function createProjectsIntegrations( string $projectId, - \Upsun\Model\IntegrationCreateCreateInput $integrationCreateCreateInput - ): \Upsun\Model\AcceptedResponse { + IntegrationCreateCreateInput $integrationCreateCreateInput + ): AcceptedResponse { return $this->createProjectsIntegrationsWithHttpInfo( $projectId, $integrationCreateCreateInput @@ -78,8 +81,8 @@ public function createProjectsIntegrations( */ private function createProjectsIntegrationsWithHttpInfo( string $projectId, - \Upsun\Model\IntegrationCreateCreateInput $integrationCreateCreateInput - ): \Upsun\Model\AcceptedResponse { + IntegrationCreateCreateInput $integrationCreateCreateInput + ): AcceptedResponse { $request = $this->createProjectsIntegrationsRequest( $projectId, $integrationCreateCreateInput @@ -121,9 +124,8 @@ private function createProjectsIntegrationsWithHttpInfo( */ private function createProjectsIntegrationsRequest( string $projectId, - \Upsun\Model\IntegrationCreateCreateInput $integrationCreateCreateInput + IntegrationCreateCreateInput $integrationCreateCreateInput ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -156,7 +158,6 @@ private function createProjectsIntegrationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -233,7 +234,7 @@ private function createProjectsIntegrationsRequest( public function deleteProjectsIntegrations( string $projectId, string $integrationId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { return $this->deleteProjectsIntegrationsWithHttpInfo( $projectId, $integrationId @@ -250,7 +251,7 @@ public function deleteProjectsIntegrations( private function deleteProjectsIntegrationsWithHttpInfo( string $projectId, string $integrationId - ): \Upsun\Model\AcceptedResponse { + ): AcceptedResponse { $request = $this->deleteProjectsIntegrationsRequest( $projectId, $integrationId @@ -293,7 +294,6 @@ private function deleteProjectsIntegrationsRequest( string $projectId, string $integrationId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -335,7 +335,6 @@ private function deleteProjectsIntegrationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -404,7 +403,7 @@ private function deleteProjectsIntegrationsRequest( public function getProjectsIntegrations( string $projectId, string $integrationId - ): \Upsun\Model\Integration { + ): Integration { return $this->getProjectsIntegrationsWithHttpInfo( $projectId, $integrationId @@ -421,7 +420,7 @@ public function getProjectsIntegrations( private function getProjectsIntegrationsWithHttpInfo( string $projectId, string $integrationId - ): \Upsun\Model\Integration { + ): Integration { $request = $this->getProjectsIntegrationsRequest( $projectId, $integrationId @@ -464,7 +463,6 @@ private function getProjectsIntegrationsRequest( string $projectId, string $integrationId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -506,7 +504,6 @@ private function getProjectsIntegrationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -634,7 +631,6 @@ private function listProjectsIntegrationsWithHttpInfo( private function listProjectsIntegrationsRequest( string $projectId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -660,7 +656,6 @@ private function listProjectsIntegrationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -730,8 +725,8 @@ private function listProjectsIntegrationsRequest( public function updateProjectsIntegrations( string $projectId, string $integrationId, - \Upsun\Model\IntegrationPatch $integrationPatch - ): \Upsun\Model\AcceptedResponse { + IntegrationPatch $integrationPatch + ): AcceptedResponse { return $this->updateProjectsIntegrationsWithHttpInfo( $projectId, $integrationId, @@ -750,8 +745,8 @@ public function updateProjectsIntegrations( private function updateProjectsIntegrationsWithHttpInfo( string $projectId, string $integrationId, - \Upsun\Model\IntegrationPatch $integrationPatch - ): \Upsun\Model\AcceptedResponse { + IntegrationPatch $integrationPatch + ): AcceptedResponse { $request = $this->updateProjectsIntegrationsRequest( $projectId, $integrationId, @@ -795,9 +790,8 @@ private function updateProjectsIntegrationsWithHttpInfo( private function updateProjectsIntegrationsRequest( string $projectId, string $integrationId, - \Upsun\Model\IntegrationPatch $integrationPatch + IntegrationPatch $integrationPatch ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -846,7 +840,6 @@ private function updateProjectsIntegrationsRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/UserAccessApi.php b/src/Api/UserAccessApi.php index cba3d62ae..dbd7e92dd 100644 --- a/src/Api/UserAccessApi.php +++ b/src/Api/UserAccessApi.php @@ -13,6 +13,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\UpdateProjectUserAccessRequest; +use Upsun\Model\UserProjectAccess; /** * Low level UserAccessApi (auto-generated) @@ -65,7 +67,7 @@ public function __construct( public function getProjectUserAccess( string $projectId, string $userId - ): \Upsun\Model\UserProjectAccess { + ): UserProjectAccess { return $this->getProjectUserAccessWithHttpInfo( $projectId, $userId @@ -86,7 +88,7 @@ public function getProjectUserAccess( private function getProjectUserAccessWithHttpInfo( string $projectId, string $userId - ): \Upsun\Model\UserProjectAccess { + ): UserProjectAccess { $request = $this->getProjectUserAccessRequest( $projectId, $userId @@ -133,7 +135,6 @@ private function getProjectUserAccessRequest( string $projectId, string $userId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -175,7 +176,6 @@ private function getProjectUserAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -249,7 +249,7 @@ private function getProjectUserAccessRequest( public function getUserProjectAccess( string $userId, string $projectId - ): \Upsun\Model\UserProjectAccess { + ): UserProjectAccess { return $this->getUserProjectAccessWithHttpInfo( $userId, $projectId @@ -270,7 +270,7 @@ public function getUserProjectAccess( private function getUserProjectAccessWithHttpInfo( string $userId, string $projectId - ): \Upsun\Model\UserProjectAccess { + ): UserProjectAccess { $request = $this->getUserProjectAccessRequest( $userId, $projectId @@ -317,7 +317,6 @@ private function getUserProjectAccessRequest( string $userId, string $projectId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -359,7 +358,6 @@ private function getUserProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -489,7 +487,6 @@ private function grantProjectUserAccessRequest( string $projectId, array $grantProjectUserAccessRequestInner ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -522,7 +519,6 @@ private function grantProjectUserAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -660,7 +656,6 @@ private function grantUserProjectAccessRequest( string $userId, array $grantUserProjectAccessRequestInner ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -693,7 +688,6 @@ private function grantUserProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -879,7 +873,6 @@ private function listProjectUserAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -902,8 +895,6 @@ private function listProjectUserAccessRequest( ); } - - $resourcePath = '/projects/{project_id}/user-access'; $formParams = []; $queryParams = []; @@ -924,8 +915,6 @@ private function listProjectUserAccessRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -939,8 +928,6 @@ private function listProjectUserAccessRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -954,8 +941,6 @@ private function listProjectUserAccessRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -969,8 +954,6 @@ private function listProjectUserAccessRequest( } } - - // path params if ($projectId !== null) { @@ -981,7 +964,6 @@ private function listProjectUserAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1167,7 +1149,6 @@ private function listUserProjectAccessRequest( ?string $pageAfter = null, ?string $sort = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1190,8 +1171,6 @@ private function listUserProjectAccessRequest( ); } - - $resourcePath = '/users/{user_id}/project-access'; $formParams = []; $queryParams = []; @@ -1212,8 +1191,6 @@ private function listUserProjectAccessRequest( } } - - // query params if ($pageSize !== null) { if ('form' === 'form' && is_array($pageSize)) { @@ -1227,8 +1204,6 @@ private function listUserProjectAccessRequest( } } - - // query params if ($pageBefore !== null) { if ('form' === 'form' && is_array($pageBefore)) { @@ -1242,8 +1217,6 @@ private function listUserProjectAccessRequest( } } - - // query params if ($pageAfter !== null) { if ('form' === 'form' && is_array($pageAfter)) { @@ -1257,8 +1230,6 @@ private function listUserProjectAccessRequest( } } - - // query params if ($sort !== null) { if ('form' === 'form' && is_array($sort)) { @@ -1272,8 +1243,6 @@ private function listUserProjectAccessRequest( } } - - // path params if ($userId !== null) { @@ -1284,7 +1253,6 @@ private function listUserProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', @@ -1420,7 +1388,6 @@ private function removeProjectUserAccessRequest( string $projectId, string $userId ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1462,7 +1429,6 @@ private function removeProjectUserAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1598,7 +1564,6 @@ private function removeUserProjectAccessRequest( string $userId, string $projectId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1640,7 +1605,6 @@ private function removeUserProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], '', @@ -1714,7 +1678,7 @@ private function removeUserProjectAccessRequest( public function updateProjectUserAccess( string $projectId, string $userId, - ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $this->updateProjectUserAccessWithHttpInfo( $projectId, @@ -1737,7 +1701,7 @@ public function updateProjectUserAccess( private function updateProjectUserAccessWithHttpInfo( string $projectId, string $userId, - ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $request = $this->updateProjectUserAccessRequest( $projectId, @@ -1779,9 +1743,8 @@ private function updateProjectUserAccessWithHttpInfo( private function updateProjectUserAccessRequest( string $projectId, string $userId, - ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): RequestInterface { - // verify the required parameter 'projectId' is set if (empty($projectId)) { throw new InvalidArgumentException( @@ -1823,7 +1786,6 @@ private function updateProjectUserAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -1905,7 +1867,7 @@ private function updateProjectUserAccessRequest( public function updateUserProjectAccess( string $userId, string $projectId, - ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $this->updateUserProjectAccessWithHttpInfo( $userId, @@ -1928,7 +1890,7 @@ public function updateUserProjectAccess( private function updateUserProjectAccessWithHttpInfo( string $userId, string $projectId, - ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): void { $request = $this->updateUserProjectAccessRequest( $userId, @@ -1970,9 +1932,8 @@ private function updateUserProjectAccessWithHttpInfo( private function updateUserProjectAccessRequest( string $userId, string $projectId, - ?\Upsun\Model\UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null + ?UpdateProjectUserAccessRequest $updateProjectUserAccessRequest = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -2014,7 +1975,6 @@ private function updateUserProjectAccessRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', diff --git a/src/Api/UserProfilesApi.php b/src/Api/UserProfilesApi.php index 29770031d..ee0fb558d 100644 --- a/src/Api/UserProfilesApi.php +++ b/src/Api/UserProfilesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -11,8 +10,14 @@ use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; +use SplFileObject; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\Address; +use Upsun\Model\CreateProfilePicture200Response; +use Upsun\Model\ListProfiles200Response; +use Upsun\Model\Profile; +use Upsun\Model\UpdateProfileRequest; /** * Low level UserProfilesApi (auto-generated) @@ -53,7 +58,7 @@ public function __construct( * * * @param string $uuid (required) - * @param \SplFileObject|null $file (optional) + * @param SplFileObject|null $file (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface @@ -61,8 +66,8 @@ public function __construct( */ public function createProfilePicture( string $uuid, - ?\SplFileObject $file = null - ): \Upsun\Model\CreateProfilePicture200Response { + ?SplFileObject $file = null + ): CreateProfilePicture200Response { return $this->createProfilePictureWithHttpInfo( $uuid, $file @@ -73,15 +78,15 @@ public function createProfilePicture( * Create a user profile picture with HTTP Info * * @param string $uuid (required) - * @param \SplFileObject|null $file (optional) + * @param SplFileObject|null $file (optional) * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ private function createProfilePictureWithHttpInfo( string $uuid, - ?\SplFileObject $file = null - ): \Upsun\Model\CreateProfilePicture200Response { + ?SplFileObject $file = null + ): CreateProfilePicture200Response { $request = $this->createProfilePictureRequest( $uuid, $file @@ -118,15 +123,14 @@ private function createProfilePictureWithHttpInfo( * Create request for operation 'createProfilePicture' * * @param string $uuid (required) - * @param \SplFileObject|null $file (optional) + * @param SplFileObject|null $file (optional) * * @throws InvalidArgumentException */ private function createProfilePictureRequest( string $uuid, - ?\SplFileObject $file = null + ?SplFileObject $file = null ): RequestInterface { - // verify the required parameter 'uuid' is set if (empty($uuid)) { throw new InvalidArgumentException( @@ -161,7 +165,6 @@ private function createProfilePictureRequest( $formParams = $formDataProcessor->flatten($formData); $multipart = $formDataProcessor->has_file; - $headers = $this->headerSelector->selectHeaders( ['application/json'], @@ -283,7 +286,6 @@ private function deleteProfilePictureWithHttpInfo( private function deleteProfilePictureRequest( string $uuid ): RequestInterface { - // verify the required parameter 'uuid' is set if (empty($uuid)) { throw new InvalidArgumentException( @@ -309,7 +311,6 @@ private function deleteProfilePictureRequest( ); } - $headers = $this->headerSelector->selectHeaders( [], '', @@ -439,7 +440,6 @@ private function getAddressWithHttpInfo( private function getAddressRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -465,7 +465,6 @@ private function getAddressRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -535,7 +534,7 @@ private function getAddressRequest( */ public function getProfile( string $userId - ): \Upsun\Model\Profile { + ): Profile { return $this->getProfileWithHttpInfo( $userId ); @@ -552,7 +551,7 @@ public function getProfile( */ private function getProfileWithHttpInfo( string $userId - ): \Upsun\Model\Profile { + ): Profile { $request = $this->getProfileRequest( $userId ); @@ -595,7 +594,6 @@ private function getProfileWithHttpInfo( private function getProfileRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -621,7 +619,6 @@ private function getProfileRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -686,8 +683,7 @@ private function getProfileRequest( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/User-Profiles/operation/list-profiles */ - public function listProfiles( - ): \Upsun\Model\ListProfiles200Response + public function listProfiles(): ListProfiles200Response { return $this->listProfilesWithHttpInfo( ); @@ -699,8 +695,7 @@ public function listProfiles( * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function listProfilesWithHttpInfo( - ): \Upsun\Model\ListProfiles200Response + private function listProfilesWithHttpInfo(): ListProfiles200Response { $request = $this->listProfilesRequest( ); @@ -737,10 +732,8 @@ private function listProfilesWithHttpInfo( * * @throws InvalidArgumentException */ - private function listProfilesRequest( - ): RequestInterface { - - + private function listProfilesRequest(): RequestInterface + { $resourcePath = '/profiles'; $formParams = []; $queryParams = []; @@ -748,8 +741,6 @@ private function listProfilesRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -820,7 +811,7 @@ private function listProfilesRequest( */ public function updateAddress( string $userId, - ?\Upsun\Model\Address $address = null + ?Address $address = null ): mixed { return $this->updateAddressWithHttpInfo( $userId, @@ -839,7 +830,7 @@ public function updateAddress( */ private function updateAddressWithHttpInfo( string $userId, - ?\Upsun\Model\Address $address = null + ?Address $address = null ): mixed { $request = $this->updateAddressRequest( $userId, @@ -883,9 +874,8 @@ private function updateAddressWithHttpInfo( */ private function updateAddressRequest( string $userId, - ?\Upsun\Model\Address $address = null + ?Address $address = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -911,7 +901,6 @@ private function updateAddressRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -990,8 +979,8 @@ private function updateAddressRequest( */ public function updateProfile( string $userId, - ?\Upsun\Model\UpdateProfileRequest $updateProfileRequest = null - ): \Upsun\Model\Profile { + ?UpdateProfileRequest $updateProfileRequest = null + ): Profile { return $this->updateProfileWithHttpInfo( $userId, $updateProfileRequest @@ -1009,8 +998,8 @@ public function updateProfile( */ private function updateProfileWithHttpInfo( string $userId, - ?\Upsun\Model\UpdateProfileRequest $updateProfileRequest = null - ): \Upsun\Model\Profile { + ?UpdateProfileRequest $updateProfileRequest = null + ): Profile { $request = $this->updateProfileRequest( $userId, $updateProfileRequest @@ -1053,9 +1042,8 @@ private function updateProfileWithHttpInfo( */ private function updateProfileRequest( string $userId, - ?\Upsun\Model\UpdateProfileRequest $updateProfileRequest = null + ?UpdateProfileRequest $updateProfileRequest = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1081,7 +1069,6 @@ private function updateProfileRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/UsersApi.php b/src/Api/UsersApi.php index 1c30fd9b4..2297d1f18 100644 --- a/src/Api/UsersApi.php +++ b/src/Api/UsersApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,12 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\CurrentUser; +use Upsun\Model\GetCurrentUserVerificationStatus200Response; +use Upsun\Model\GetCurrentUserVerificationStatusFull200Response; +use Upsun\Model\ResetEmailAddressRequest; +use Upsun\Model\UpdateUserRequest; +use Upsun\Model\User; /** * Low level UsersApi (auto-generated) @@ -57,8 +62,7 @@ public function __construct( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Users/operation/get-current-user */ - public function getCurrentUser( - ): \Upsun\Model\User + public function getCurrentUser(): User { return $this->getCurrentUserWithHttpInfo( ); @@ -70,8 +74,7 @@ public function getCurrentUser( * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserWithHttpInfo( - ): \Upsun\Model\User + private function getCurrentUserWithHttpInfo(): User { $request = $this->getCurrentUserRequest( ); @@ -108,10 +111,8 @@ private function getCurrentUserWithHttpInfo( * * @throws InvalidArgumentException */ - private function getCurrentUserRequest( - ): RequestInterface { - - + private function getCurrentUserRequest(): RequestInterface + { $resourcePath = '/users/me'; $formParams = []; $queryParams = []; @@ -119,8 +120,6 @@ private function getCurrentUserRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -188,8 +187,7 @@ private function getCurrentUserRequest( * * @deprecated */ - public function getCurrentUserDeprecated( - ): \Upsun\Model\CurrentUser + public function getCurrentUserDeprecated(): CurrentUser { return $this->getCurrentUserDeprecatedWithHttpInfo( ); @@ -203,8 +201,7 @@ public function getCurrentUserDeprecated( * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserDeprecatedWithHttpInfo( - ): \Upsun\Model\CurrentUser + private function getCurrentUserDeprecatedWithHttpInfo(): CurrentUser { $request = $this->getCurrentUserDeprecatedRequest( ); @@ -243,10 +240,8 @@ private function getCurrentUserDeprecatedWithHttpInfo( * * @deprecated */ - private function getCurrentUserDeprecatedRequest( - ): RequestInterface { - - + private function getCurrentUserDeprecatedRequest(): RequestInterface + { $resourcePath = '/me'; $formParams = []; $queryParams = []; @@ -254,8 +249,6 @@ private function getCurrentUserDeprecatedRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -321,8 +314,7 @@ private function getCurrentUserDeprecatedRequest( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Users/operation/get-current-user-verification-status */ - public function getCurrentUserVerificationStatus( - ): \Upsun\Model\GetCurrentUserVerificationStatus200Response + public function getCurrentUserVerificationStatus(): GetCurrentUserVerificationStatus200Response { return $this->getCurrentUserVerificationStatusWithHttpInfo( ); @@ -334,8 +326,7 @@ public function getCurrentUserVerificationStatus( * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserVerificationStatusWithHttpInfo( - ): \Upsun\Model\GetCurrentUserVerificationStatus200Response + private function getCurrentUserVerificationStatusWithHttpInfo(): GetCurrentUserVerificationStatus200Response { $request = $this->getCurrentUserVerificationStatusRequest( ); @@ -372,10 +363,8 @@ private function getCurrentUserVerificationStatusWithHttpInfo( * * @throws InvalidArgumentException */ - private function getCurrentUserVerificationStatusRequest( - ): RequestInterface { - - + private function getCurrentUserVerificationStatusRequest(): RequestInterface + { $resourcePath = '/me/phone'; $formParams = []; $queryParams = []; @@ -383,8 +372,6 @@ private function getCurrentUserVerificationStatusRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -450,8 +437,7 @@ private function getCurrentUserVerificationStatusRequest( * @throws ClientExceptionInterface * @see https://docs.upsun.com/api/#tag/Users/operation/get-current-user-verification-status-full */ - public function getCurrentUserVerificationStatusFull( - ): \Upsun\Model\GetCurrentUserVerificationStatusFull200Response + public function getCurrentUserVerificationStatusFull(): GetCurrentUserVerificationStatusFull200Response { return $this->getCurrentUserVerificationStatusFullWithHttpInfo( ); @@ -463,8 +449,7 @@ public function getCurrentUserVerificationStatusFull( * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws ClientExceptionInterface */ - private function getCurrentUserVerificationStatusFullWithHttpInfo( - ): \Upsun\Model\GetCurrentUserVerificationStatusFull200Response + private function getCurrentUserVerificationStatusFullWithHttpInfo(): GetCurrentUserVerificationStatusFull200Response { $request = $this->getCurrentUserVerificationStatusFullRequest( ); @@ -501,10 +486,8 @@ private function getCurrentUserVerificationStatusFullWithHttpInfo( * * @throws InvalidArgumentException */ - private function getCurrentUserVerificationStatusFullRequest( - ): RequestInterface { - - + private function getCurrentUserVerificationStatusFullRequest(): RequestInterface + { $resourcePath = '/me/verification'; $formParams = []; $queryParams = []; @@ -512,8 +495,6 @@ private function getCurrentUserVerificationStatusFullRequest( $httpBody = null; $multipart = false; - - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -584,7 +565,7 @@ private function getCurrentUserVerificationStatusFullRequest( */ public function getUser( string $userId - ): \Upsun\Model\User { + ): User { return $this->getUserWithHttpInfo( $userId ); @@ -601,7 +582,7 @@ public function getUser( */ private function getUserWithHttpInfo( string $userId - ): \Upsun\Model\User { + ): User { $request = $this->getUserRequest( $userId ); @@ -644,7 +625,6 @@ private function getUserWithHttpInfo( private function getUserRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -670,7 +650,6 @@ private function getUserRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -740,7 +719,7 @@ private function getUserRequest( */ public function getUserByEmailAddress( string $email - ): \Upsun\Model\User { + ): User { return $this->getUserByEmailAddressWithHttpInfo( $email ); @@ -756,7 +735,7 @@ public function getUserByEmailAddress( */ private function getUserByEmailAddressWithHttpInfo( string $email - ): \Upsun\Model\User { + ): User { $request = $this->getUserByEmailAddressRequest( $email ); @@ -798,7 +777,6 @@ private function getUserByEmailAddressWithHttpInfo( private function getUserByEmailAddressRequest( string $email ): RequestInterface { - // verify the required parameter 'email' is set if (empty($email)) { throw new InvalidArgumentException( @@ -824,7 +802,6 @@ private function getUserByEmailAddressRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -894,7 +871,7 @@ private function getUserByEmailAddressRequest( */ public function getUserByUsername( string $username - ): \Upsun\Model\User { + ): User { return $this->getUserByUsernameWithHttpInfo( $username ); @@ -910,7 +887,7 @@ public function getUserByUsername( */ private function getUserByUsernameWithHttpInfo( string $username - ): \Upsun\Model\User { + ): User { $request = $this->getUserByUsernameRequest( $username ); @@ -952,7 +929,6 @@ private function getUserByUsernameWithHttpInfo( private function getUserByUsernameRequest( string $username ): RequestInterface { - // verify the required parameter 'username' is set if (empty($username)) { throw new InvalidArgumentException( @@ -978,7 +954,6 @@ private function getUserByUsernameRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1051,7 +1026,7 @@ private function getUserByUsernameRequest( */ public function resetEmailAddress( string $userId, - ?\Upsun\Model\ResetEmailAddressRequest $resetEmailAddressRequest = null + ?ResetEmailAddressRequest $resetEmailAddressRequest = null ): void { $this->resetEmailAddressWithHttpInfo( $userId, @@ -1071,7 +1046,7 @@ public function resetEmailAddress( */ private function resetEmailAddressWithHttpInfo( string $userId, - ?\Upsun\Model\ResetEmailAddressRequest $resetEmailAddressRequest = null + ?ResetEmailAddressRequest $resetEmailAddressRequest = null ): void { $request = $this->resetEmailAddressRequest( $userId, @@ -1110,9 +1085,8 @@ private function resetEmailAddressWithHttpInfo( */ private function resetEmailAddressRequest( string $userId, - ?\Upsun\Model\ResetEmailAddressRequest $resetEmailAddressRequest = null + ?ResetEmailAddressRequest $resetEmailAddressRequest = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1138,7 +1112,6 @@ private function resetEmailAddressRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', @@ -1272,7 +1245,6 @@ private function resetPasswordWithHttpInfo( private function resetPasswordRequest( string $userId ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1298,7 +1270,6 @@ private function resetPasswordRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], '', @@ -1369,8 +1340,8 @@ private function resetPasswordRequest( */ public function updateUser( string $userId, - ?\Upsun\Model\UpdateUserRequest $updateUserRequest = null - ): \Upsun\Model\User { + ?UpdateUserRequest $updateUserRequest = null + ): User { return $this->updateUserWithHttpInfo( $userId, $updateUserRequest @@ -1388,8 +1359,8 @@ public function updateUser( */ private function updateUserWithHttpInfo( string $userId, - ?\Upsun\Model\UpdateUserRequest $updateUserRequest = null - ): \Upsun\Model\User { + ?UpdateUserRequest $updateUserRequest = null + ): User { $request = $this->updateUserRequest( $userId, $updateUserRequest @@ -1432,9 +1403,8 @@ private function updateUserWithHttpInfo( */ private function updateUserRequest( string $userId, - ?\Upsun\Model\UpdateUserRequest $updateUserRequest = null + ?UpdateUserRequest $updateUserRequest = null ): RequestInterface { - // verify the required parameter 'userId' is set if (empty($userId)) { throw new InvalidArgumentException( @@ -1460,7 +1430,6 @@ private function updateUserRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json'], 'application/json', diff --git a/src/Api/VouchersApi.php b/src/Api/VouchersApi.php index a3efe76af..28bf7e196 100644 --- a/src/Api/VouchersApi.php +++ b/src/Api/VouchersApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,8 @@ use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; use Upsun\Core\OAuthProvider; +use Upsun\Model\ApplyOrgVoucherRequest; +use Upsun\Model\Vouchers; /** * Low level VouchersApi (auto-generated) @@ -62,7 +63,7 @@ public function __construct( */ public function applyOrgVoucher( string $organizationId, - \Upsun\Model\ApplyOrgVoucherRequest $applyOrgVoucherRequest + ApplyOrgVoucherRequest $applyOrgVoucherRequest ): void { $this->applyOrgVoucherWithHttpInfo( $organizationId, @@ -81,7 +82,7 @@ public function applyOrgVoucher( */ private function applyOrgVoucherWithHttpInfo( string $organizationId, - \Upsun\Model\ApplyOrgVoucherRequest $applyOrgVoucherRequest + ApplyOrgVoucherRequest $applyOrgVoucherRequest ): void { $request = $this->applyOrgVoucherRequest( $organizationId, @@ -119,9 +120,8 @@ private function applyOrgVoucherWithHttpInfo( */ private function applyOrgVoucherRequest( string $organizationId, - \Upsun\Model\ApplyOrgVoucherRequest $applyOrgVoucherRequest + ApplyOrgVoucherRequest $applyOrgVoucherRequest ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -154,7 +154,6 @@ private function applyOrgVoucherRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/problem+json'], 'application/json', @@ -234,7 +233,7 @@ private function applyOrgVoucherRequest( */ public function listOrgVouchers( string $organizationId - ): \Upsun\Model\Vouchers { + ): Vouchers { return $this->listOrgVouchersWithHttpInfo( $organizationId ); @@ -252,7 +251,7 @@ public function listOrgVouchers( */ private function listOrgVouchersWithHttpInfo( string $organizationId - ): \Upsun\Model\Vouchers { + ): Vouchers { $request = $this->listOrgVouchersRequest( $organizationId ); @@ -296,7 +295,6 @@ private function listOrgVouchersWithHttpInfo( private function listOrgVouchersRequest( string $organizationId ): RequestInterface { - // verify the required parameter 'organizationId' is set if (empty($organizationId)) { throw new InvalidArgumentException( @@ -322,7 +320,6 @@ private function listOrgVouchersRequest( ); } - $headers = $this->headerSelector->selectHeaders( ['application/json', 'application/problem+json'], '', diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index 8d40a0282..4434f861b 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -3,10 +3,10 @@ namespace Upsun\Core; use Exception; +use Nyholm\Psr7\Stream; +use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; -use Psr\Http\Client\ClientExceptionInterface; -use Nyholm\Psr7\Stream; /** * class (auto-generated) @@ -65,7 +65,6 @@ public function exchangeCodeForToken(): bool ->withHeader('Content-Type', 'application/x-www-form-urlencoded') ->withBody(Stream::create($body)); - $response = $this->httpClient->sendRequest($request); if ($response->getStatusCode() !== 200) { diff --git a/src/Model/AcceptedResponse.php b/src/Model/AcceptedResponse.php index 91585f819..cef1e923d 100644 --- a/src/Model/AcceptedResponse.php +++ b/src/Model/AcceptedResponse.php @@ -13,15 +13,12 @@ */ final class AcceptedResponse implements Model, JsonSerializable { - - public function __construct( private readonly string $status, private readonly int $code, ) { } - public function getModelName(): string { return self::class; @@ -40,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The status text of the response - */ + /** + * The status text of the response + */ public function getStatus(): string { return $this->status; } - /** - * The status code of the response - */ + /** + * The status code of the response + */ public function getCode(): int { return $this->code; } } - diff --git a/src/Model/AccessControlInner.php b/src/Model/AccessControlInner.php index e593e5eeb..2bbcc85c9 100644 --- a/src/Model/AccessControlInner.php +++ b/src/Model/AccessControlInner.php @@ -13,7 +13,6 @@ */ final class AccessControlInner implements Model, JsonSerializable { - public const ROLE_ADMIN = 'admin'; public const ROLE_CONTRIBUTOR = 'contributor'; public const ROLE_VIEWER = 'viewer'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,4 +51,3 @@ public function getRole(): string return $this->role; } } - diff --git a/src/Model/Activity.php b/src/Model/Activity.php index f8798ac16..a9c31b2c5 100644 --- a/src/Model/Activity.php +++ b/src/Model/Activity.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class Activity implements Model, JsonSerializable { - public const STATE_CANCELLED = 'cancelled'; public const STATE_COMPLETE = 'complete'; public const STATE_IN_PROGRESS = 'in_progress'; @@ -36,22 +36,21 @@ public function __construct( private readonly string $log, private readonly object $payload, private readonly array $commands, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $result, private readonly ?string $failureReason, - private readonly ?\DateTime $startedAt, - private readonly ?\DateTime $completedAt, - private readonly ?\DateTime $cancelledAt, + private readonly ?DateTime $startedAt, + private readonly ?DateTime $completedAt, + private readonly ?DateTime $cancelledAt, private readonly ?string $description, private readonly ?string $text, - private readonly ?\DateTime $expiresAt, + private readonly ?DateTime $expiresAt, private readonly ?string $integration = null, private readonly ?array $environments = [], ) { } - public function getModelName(): string { return self::class; @@ -90,106 +89,106 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Activity - */ + /** + * The identifier of Activity + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the activity - */ + /** + * The type of the activity + */ public function getType(): string { return $this->type; } - /** - * The parameters of the activity - */ + /** + * The parameters of the activity + */ public function getParameters(): object { return $this->parameters; } - /** - * The project the activity belongs to - */ + /** + * The project the activity belongs to + */ public function getProject(): string { return $this->project; } - /** - * The state of the activity - */ + /** + * The state of the activity + */ public function getState(): string { return $this->state; } - /** - * The result of the activity - */ + /** + * The result of the activity + */ public function getResult(): ?string { return $this->result; } - /** - * The reason for activity failure - */ + /** + * The reason for activity failure + */ public function getFailureReason(): ?string { return $this->failureReason; } - /** - * The start date of the activity - */ - public function getStartedAt(): ?\DateTime + /** + * The start date of the activity + */ + public function getStartedAt(): ?DateTime { return $this->startedAt; } - /** - * The completion date of the activity - */ - public function getCompletedAt(): ?\DateTime + /** + * The completion date of the activity + */ + public function getCompletedAt(): ?DateTime { return $this->completedAt; } - /** - * The completion percentage of the activity - */ + /** + * The completion percentage of the activity + */ public function getCompletionPercent(): int { return $this->completionPercent; } - /** - * The Cancellation date of the activity - */ - public function getCancelledAt(): ?\DateTime + /** + * The Cancellation date of the activity + */ + public function getCancelledAt(): ?DateTime { return $this->cancelledAt; } @@ -199,58 +198,58 @@ public function getTimings(): array return $this->timings; } - /** - * The log of the activity - */ + /** + * The log of the activity + */ public function getLog(): string { return $this->log; } - /** - * The payload of the activity - */ + /** + * The payload of the activity + */ public function getPayload(): object { return $this->payload; } - /** - * The description of the activity, formatted with HTML - */ + /** + * The description of the activity, formatted with HTML + */ public function getDescription(): ?string { return $this->description; } - /** - * The description of the activity, formatted as plain text - */ + /** + * The description of the activity, formatted as plain text + */ public function getText(): ?string { return $this->text; } - /** - * The date at which the activity will expire - */ - public function getExpiresAt(): ?\DateTime + /** + * The date at which the activity will expire + */ + public function getExpiresAt(): ?DateTime { return $this->expiresAt; } - /** - * The commands of the activity - * @return CommandsInner[] - */ + /** + * The commands of the activity + * @return CommandsInner[] + */ public function getCommands(): array { return $this->commands; } - /** - * The integration the activity belongs to - */ + /** + * The integration the activity belongs to + */ public function getIntegration(): ?string { return $this->integration; @@ -261,4 +260,3 @@ public function getEnvironments(): ?array return $this->environments; } } - diff --git a/src/Model/AddonCredential.php b/src/Model/AddonCredential.php index d08ed9508..11e155f35 100644 --- a/src/Model/AddonCredential.php +++ b/src/Model/AddonCredential.php @@ -14,15 +14,12 @@ */ final class AddonCredential implements Model, JsonSerializable { - - public function __construct( private readonly string $addonKey, private readonly string $clientKey, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The addon key (public identifier). - */ + /** + * The addon key (public identifier). + */ public function getAddonKey(): string { return $this->addonKey; } - /** - * The client key (public identifier). - */ + /** + * The client key (public identifier). + */ public function getClientKey(): string { return $this->clientKey; } } - diff --git a/src/Model/AddonCredential1.php b/src/Model/AddonCredential1.php index 437890104..1cfbbccae 100644 --- a/src/Model/AddonCredential1.php +++ b/src/Model/AddonCredential1.php @@ -14,8 +14,6 @@ */ final class AddonCredential1 implements Model, JsonSerializable { - - public function __construct( private readonly string $addonKey, private readonly string $clientKey, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The addon key (public identifier). - */ + /** + * The addon key (public identifier). + */ public function getAddonKey(): string { return $this->addonKey; } - /** - * The client key (public identifier). - */ + /** + * The client key (public identifier). + */ public function getClientKey(): string { return $this->clientKey; } - /** - * The secret of the client. - */ + /** + * The secret of the client. + */ public function getSharedSecret(): string { return $this->sharedSecret; } } - diff --git a/src/Model/Address.php b/src/Model/Address.php index 3f23e94cb..2c3624c7a 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -14,8 +14,6 @@ */ final class Address implements Model, JsonSerializable { - - public function __construct( private readonly ?string $country = null, private readonly ?string $nameLine = null, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,84 +54,83 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Two-letter country codes are used to represent countries and states - */ + /** + * Two-letter country codes are used to represent countries and states + */ public function getCountry(): ?string { return $this->country; } - /** - * The full name of the user - */ + /** + * The full name of the user + */ public function getNameLine(): ?string { return $this->nameLine; } - /** - * Premise (i.e. Apt, Suite, Bldg.) - */ + /** + * Premise (i.e. Apt, Suite, Bldg.) + */ public function getPremise(): ?string { return $this->premise; } - /** - * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. - */ + /** + * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. + */ public function getSubPremise(): ?string { return $this->subPremise; } - /** - * The address of the user - */ + /** + * The address of the user + */ public function getThoroughfare(): ?string { return $this->thoroughfare; } - /** - * The administrative area of the user address - */ + /** + * The administrative area of the user address + */ public function getAdministrativeArea(): ?string { return $this->administrativeArea; } - /** - * The sub-administrative area of the user address - */ + /** + * The sub-administrative area of the user address + */ public function getSubAdministrativeArea(): ?string { return $this->subAdministrativeArea; } - /** - * The locality of the user address - */ + /** + * The locality of the user address + */ public function getLocality(): ?string { return $this->locality; } - /** - * The dependant_locality area of the user address - */ + /** + * The dependant_locality area of the user address + */ public function getDependentLocality(): ?string { return $this->dependentLocality; } - /** - * The postal code area of the user address - */ + /** + * The postal code area of the user address + */ public function getPostalCode(): ?string { return $this->postalCode; } } - diff --git a/src/Model/AddressGrantsInner.php b/src/Model/AddressGrantsInner.php index 6c918bc4e..44045a5d5 100644 --- a/src/Model/AddressGrantsInner.php +++ b/src/Model/AddressGrantsInner.php @@ -13,7 +13,6 @@ */ final class AddressGrantsInner implements Model, JsonSerializable { - public const PERMISSION_ALLOW = 'allow'; public const PERMISSION_DENY = 'deny'; @@ -23,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -52,4 +50,3 @@ public function getAddress(): string return $this->address; } } - diff --git a/src/Model/AddressMetadata.php b/src/Model/AddressMetadata.php index bf6b7eea1..df3fec2fc 100644 --- a/src/Model/AddressMetadata.php +++ b/src/Model/AddressMetadata.php @@ -14,14 +14,11 @@ */ final class AddressMetadata implements Model, JsonSerializable { - - public function __construct( private readonly ?AddressMetadataMetadata $metadata = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Address field metadata. - */ + /** + * Address field metadata. + */ public function getMetadata(): ?AddressMetadataMetadata { return $this->metadata; } } - diff --git a/src/Model/AddressMetadataMetadata.php b/src/Model/AddressMetadataMetadata.php index a0a5137e6..da0794c2c 100644 --- a/src/Model/AddressMetadataMetadata.php +++ b/src/Model/AddressMetadataMetadata.php @@ -14,8 +14,6 @@ */ final class AddressMetadataMetadata implements Model, JsonSerializable { - - public function __construct( private readonly ?array $requiredFields = [], private readonly ?object $fieldLabels = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -48,20 +45,19 @@ public function getRequiredFields(): ?array return $this->requiredFields; } - /** - * Localized labels for address fields. - */ + /** + * Localized labels for address fields. + */ public function getFieldLabels(): ?object { return $this->fieldLabels; } - /** - * Whether this country supports a VAT number. - */ + /** + * Whether this country supports a VAT number. + */ public function getShowVat(): ?bool { return $this->showVat; } } - diff --git a/src/Model/AggregatedFeatures.php b/src/Model/AggregatedFeatures.php index 2448f5b2c..82b58862d 100644 --- a/src/Model/AggregatedFeatures.php +++ b/src/Model/AggregatedFeatures.php @@ -13,14 +13,11 @@ */ final class AggregatedFeatures implements Model, JsonSerializable { - - public function __construct( private readonly ?object $backups = null, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Backup features configuration. - */ + /** + * Backup features configuration. + */ public function getBackups(): ?object { return $this->backups; } } - diff --git a/src/Model/Alert.php b/src/Model/Alert.php index af304c0c4..6ae93bbf6 100644 --- a/src/Model/Alert.php +++ b/src/Model/Alert.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,19 +15,16 @@ */ final class Alert implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?bool $active = null, private readonly ?int $alertsSent = null, - private readonly ?\DateTime $lastAlertAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $lastAlertAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?object $config = null, ) { } - public function getModelName(): string { return self::class; @@ -49,52 +47,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identification of the alert type. - */ + /** + * The identification of the alert type. + */ public function getId(): ?string { return $this->id; } - /** - * Whether the alert is currently active. - */ + /** + * Whether the alert is currently active. + */ public function getActive(): ?bool { return $this->active; } - /** - * The amount of alerts of this type that have been sent so far. - */ + /** + * The amount of alerts of this type that have been sent so far. + */ public function getAlertsSent(): ?int { return $this->alertsSent; } - /** - * The time the last alert has been sent. - */ - public function getLastAlertAt(): ?\DateTime + /** + * The time the last alert has been sent. + */ + public function getLastAlertAt(): ?DateTime { return $this->lastAlertAt; } - /** - * The time the alert has last been updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The time the alert has last been updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The alert type specific configuration. - */ + /** + * The alert type specific configuration. + */ public function getConfig(): ?object { return $this->config; } } - diff --git a/src/Model/ApiToken.php b/src/Model/ApiToken.php index a78edc478..b3bade716 100644 --- a/src/Model/ApiToken.php +++ b/src/Model/ApiToken.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,20 +14,17 @@ */ final class ApiToken implements Model, JsonSerializable { - - public function __construct( - private readonly ?\DateTime $lastUsedAt = null, + private readonly ?DateTime $lastUsedAt = null, private readonly ?string $id = null, private readonly ?string $name = null, private readonly ?bool $mfaOnCreation = null, private readonly ?string $token = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, ) { } - public function getModelName(): string { return self::class; @@ -50,63 +48,62 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the token. - */ + /** + * The ID of the token. + */ public function getId(): ?string { return $this->id; } - /** - * The token name. - */ + /** + * The token name. + */ public function getName(): ?string { return $this->name; } - /** - * Whether the user had multi-factor authentication (MFA) enabled when they created the token. - */ + /** + * Whether the user had multi-factor authentication (MFA) enabled when they created the token. + */ public function getMfaOnCreation(): ?bool { return $this->mfaOnCreation; } - /** - * The token in plain text (available only when created). - */ + /** + * The token in plain text (available only when created). + */ public function getToken(): ?string { return $this->token; } - /** - * The date and time when the token was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the token was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the token was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the token was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The date and time when the token was last exchanged for an access token. This will be null for a - * token which has never been used, or not used since this API property was added. Note: After an - * API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH - * certificate(s) derived from the access token. - */ - public function getLastUsedAt(): ?\DateTime + /** + * The date and time when the token was last exchanged for an access token. This will be null for a + * token which has never been used, or not used since this API property was added. Note: After an + * API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH + * certificate(s) derived from the access token. + */ + public function getLastUsedAt(): ?DateTime { return $this->lastUsedAt; } } - diff --git a/src/Model/ApplyOrgVoucherRequest.php b/src/Model/ApplyOrgVoucherRequest.php index 2020ae89a..4e391ae7e 100644 --- a/src/Model/ApplyOrgVoucherRequest.php +++ b/src/Model/ApplyOrgVoucherRequest.php @@ -13,14 +13,11 @@ */ final class ApplyOrgVoucherRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $code, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getCode(): string return $this->code; } } - diff --git a/src/Model/ArrayFilter.php b/src/Model/ArrayFilter.php index 85928c569..8d3ae6d38 100644 --- a/src/Model/ArrayFilter.php +++ b/src/Model/ArrayFilter.php @@ -13,8 +13,6 @@ */ final class ArrayFilter implements Model, JsonSerializable { - - public function __construct( private readonly ?string $eq = null, private readonly ?string $ne = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,36 +41,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Equal - */ + /** + * Equal + */ public function getEq(): ?string { return $this->eq; } - /** - * Not equal - */ + /** + * Not equal + */ public function getNe(): ?string { return $this->ne; } - /** - * In (comma-separated list) - */ + /** + * In (comma-separated list) + */ public function getIn(): ?string { return $this->in; } - /** - * Not in (comma-separated list) - */ + /** + * Not in (comma-separated list) + */ public function getNin(): ?string { return $this->nin; } } - diff --git a/src/Model/Author.php b/src/Model/Author.php index e50873e1f..d553787c8 100644 --- a/src/Model/Author.php +++ b/src/Model/Author.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,16 +15,13 @@ */ final class Author implements Model, JsonSerializable { - - public function __construct( - private readonly \DateTime $date, + private readonly DateTime $date, private readonly string $name, private readonly string $email, ) { } - public function getModelName(): string { return self::class; @@ -43,28 +41,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The time of the author or committer - */ - public function getDate(): \DateTime + /** + * The time of the author or committer + */ + public function getDate(): DateTime { return $this->date; } - /** - * The name of the author or committer - */ + /** + * The name of the author or committer + */ public function getName(): string { return $this->name; } - /** - * The email of the author or committer - */ + /** + * The email of the author or committer + */ public function getEmail(): string { return $this->email; } } - diff --git a/src/Model/AuthorizationsInner.php b/src/Model/AuthorizationsInner.php index 094c3d1ae..cafab4491 100644 --- a/src/Model/AuthorizationsInner.php +++ b/src/Model/AuthorizationsInner.php @@ -13,7 +13,6 @@ */ final class AuthorizationsInner implements Model, JsonSerializable { - public const TYPE_ENV = 'env'; public const TYPE_TASK = 'task'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,4 +57,3 @@ public function getResource(): ?string return $this->resource; } } - diff --git a/src/Model/AutoscalerCPUPressureTrigger.php b/src/Model/AutoscalerCPUPressureTrigger.php index 6692bb8fa..e278af59a 100644 --- a/src/Model/AutoscalerCPUPressureTrigger.php +++ b/src/Model/AutoscalerCPUPressureTrigger.php @@ -15,8 +15,6 @@ */ final class AutoscalerCPUPressureTrigger implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,28 +41,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } - diff --git a/src/Model/AutoscalerCPUResources.php b/src/Model/AutoscalerCPUResources.php index 0398510ff..fe1633532 100644 --- a/src/Model/AutoscalerCPUResources.php +++ b/src/Model/AutoscalerCPUResources.php @@ -14,15 +14,12 @@ */ final class AutoscalerCPUResources implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Minimum CPUs when scaling down vertically - */ + /** + * Minimum CPUs when scaling down vertically + */ public function getMin(): ?float { return $this->min; } - /** - * Maximum CPUs when scaling up vertically - */ + /** + * Maximum CPUs when scaling up vertically + */ public function getMax(): ?float { return $this->max; } } - diff --git a/src/Model/AutoscalerCPUTrigger.php b/src/Model/AutoscalerCPUTrigger.php index 5e365110a..9291d3a44 100644 --- a/src/Model/AutoscalerCPUTrigger.php +++ b/src/Model/AutoscalerCPUTrigger.php @@ -15,8 +15,6 @@ */ final class AutoscalerCPUTrigger implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,28 +41,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } - diff --git a/src/Model/AutoscalerCondition.php b/src/Model/AutoscalerCondition.php index 5b486642e..0e3419e99 100644 --- a/src/Model/AutoscalerCondition.php +++ b/src/Model/AutoscalerCondition.php @@ -14,8 +14,6 @@ */ final class AutoscalerCondition implements Model, JsonSerializable { - - public function __construct( private readonly float $threshold, private readonly ?bool $enabled = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,9 +40,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Value at which the condition is satisfied - */ + /** + * Value at which the condition is satisfied + */ public function getThreshold(): float { return $this->threshold; @@ -56,12 +53,11 @@ public function getDuration(): ?AutoscalerDuration return $this->duration; } - /** - * Whether the condition should be used for generating alerts - */ + /** + * Whether the condition should be used for generating alerts + */ public function getEnabled(): ?bool { return $this->enabled; } } - diff --git a/src/Model/AutoscalerDuration.php b/src/Model/AutoscalerDuration.php index d0fb088f2..b60e9153f 100644 --- a/src/Model/AutoscalerDuration.php +++ b/src/Model/AutoscalerDuration.php @@ -78,4 +78,3 @@ public function __toString(): string return $this->value; } } - diff --git a/src/Model/AutoscalerInstances.php b/src/Model/AutoscalerInstances.php index b159ff0b4..c31deb040 100644 --- a/src/Model/AutoscalerInstances.php +++ b/src/Model/AutoscalerInstances.php @@ -14,15 +14,12 @@ */ final class AutoscalerInstances implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Minimum number of instances when scaling down horizontally - */ + /** + * Minimum number of instances when scaling down horizontally + */ public function getMin(): ?int { return $this->min; } - /** - * Maximum number of instances when scaling up horizontally - */ + /** + * Maximum number of instances when scaling up horizontally + */ public function getMax(): ?int { return $this->max; } } - diff --git a/src/Model/AutoscalerMemoryPressureTrigger.php b/src/Model/AutoscalerMemoryPressureTrigger.php index 6a1ce0c29..61e00e2cf 100644 --- a/src/Model/AutoscalerMemoryPressureTrigger.php +++ b/src/Model/AutoscalerMemoryPressureTrigger.php @@ -15,8 +15,6 @@ */ final class AutoscalerMemoryPressureTrigger implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,28 +41,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } - diff --git a/src/Model/AutoscalerMemoryResources.php b/src/Model/AutoscalerMemoryResources.php index 9eedd8da4..48b90c182 100644 --- a/src/Model/AutoscalerMemoryResources.php +++ b/src/Model/AutoscalerMemoryResources.php @@ -14,15 +14,12 @@ */ final class AutoscalerMemoryResources implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Minimum memory (bytes) when scaling down vertically - */ + /** + * Minimum memory (bytes) when scaling down vertically + */ public function getMin(): ?int { return $this->min; } - /** - * Maximum memory (bytes) when scaling up vertically - */ + /** + * Maximum memory (bytes) when scaling up vertically + */ public function getMax(): ?int { return $this->max; } } - diff --git a/src/Model/AutoscalerMemoryTrigger.php b/src/Model/AutoscalerMemoryTrigger.php index 76f6def98..52abe1d3c 100644 --- a/src/Model/AutoscalerMemoryTrigger.php +++ b/src/Model/AutoscalerMemoryTrigger.php @@ -15,8 +15,6 @@ */ final class AutoscalerMemoryTrigger implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?AutoscalerCondition $down = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,28 +41,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the trigger is enabled - */ + /** + * Whether the trigger is enabled + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getDown(): ?AutoscalerCondition { return $this->down; } - /** - * Trigger condition settings - */ + /** + * Trigger condition settings + */ public function getUp(): ?AutoscalerCondition { return $this->up; } } - diff --git a/src/Model/AutoscalerResources.php b/src/Model/AutoscalerResources.php index 7d09e2cb3..62e48a23f 100644 --- a/src/Model/AutoscalerResources.php +++ b/src/Model/AutoscalerResources.php @@ -14,15 +14,12 @@ */ final class AutoscalerResources implements Model, JsonSerializable { - - public function __construct( private readonly ?array $cpu = [], private readonly ?array $memory = [], ) { } - public function getModelName(): string { return self::class; @@ -40,22 +37,21 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Lower/Upper bounds on CPU allocation when scaling - * @return AutoscalerCPUResources[]|null - */ + /** + * Lower/Upper bounds on CPU allocation when scaling + * @return AutoscalerCPUResources[]|null + */ public function getCpu(): ?array { return $this->cpu; } - /** - * Lower/Upper bounds on Memory allocation when scaling - * @return AutoscalerMemoryResources[]|null - */ + /** + * Lower/Upper bounds on Memory allocation when scaling + * @return AutoscalerMemoryResources[]|null + */ public function getMemory(): ?array { return $this->memory; } } - diff --git a/src/Model/AutoscalerScalingCooldown.php b/src/Model/AutoscalerScalingCooldown.php index c3cedd9ba..28c7939cb 100644 --- a/src/Model/AutoscalerScalingCooldown.php +++ b/src/Model/AutoscalerScalingCooldown.php @@ -14,15 +14,12 @@ */ final class AutoscalerScalingCooldown implements Model, JsonSerializable { - - public function __construct( private readonly ?int $up = null, private readonly ?int $down = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Number of seconds to wait until scaling up can be done again (since last attempt) - */ + /** + * Number of seconds to wait until scaling up can be done again (since last attempt) + */ public function getUp(): ?int { return $this->up; } - /** - * Number of seconds to wait until scaling down can be done again (since last attempt) - */ + /** + * Number of seconds to wait until scaling down can be done again (since last attempt) + */ public function getDown(): ?int { return $this->down; } } - diff --git a/src/Model/AutoscalerScalingFactor.php b/src/Model/AutoscalerScalingFactor.php index be25b1464..6ea7821e0 100644 --- a/src/Model/AutoscalerScalingFactor.php +++ b/src/Model/AutoscalerScalingFactor.php @@ -14,15 +14,12 @@ */ final class AutoscalerScalingFactor implements Model, JsonSerializable { - - public function __construct( private readonly ?int $up = null, private readonly ?int $down = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Number of instances to add when scaling up horizontally - */ + /** + * Number of instances to add when scaling up horizontally + */ public function getUp(): ?int { return $this->up; } - /** - * Number of instances to remove when scaling down horizontally - */ + /** + * Number of instances to remove when scaling down horizontally + */ public function getDown(): ?int { return $this->down; } } - diff --git a/src/Model/AutoscalerServiceSettings.php b/src/Model/AutoscalerServiceSettings.php index 64dd11e03..604101c35 100644 --- a/src/Model/AutoscalerServiceSettings.php +++ b/src/Model/AutoscalerServiceSettings.php @@ -14,8 +14,6 @@ */ final class AutoscalerServiceSettings implements Model, JsonSerializable { - - public function __construct( private readonly ?AutoscalerTriggers $triggers = null, private readonly ?AutoscalerInstances $instances = null, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,44 +44,43 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Scaling triggers settings - */ + /** + * Scaling triggers settings + */ public function getTriggers(): ?AutoscalerTriggers { return $this->triggers; } - /** - * Horizontal scaling settings - */ + /** + * Horizontal scaling settings + */ public function getInstances(): ?AutoscalerInstances { return $this->instances; } - /** - * Vertical scaling settings - */ + /** + * Vertical scaling settings + */ public function getResources(): ?AutoscalerResources { return $this->resources; } - /** - * Scaling factor settings - */ + /** + * Scaling factor settings + */ public function getScaleFactor(): ?AutoscalerScalingFactor { return $this->scaleFactor; } - /** - * Scaling cooldown settings - */ + /** + * Scaling cooldown settings + */ public function getScaleCooldown(): ?AutoscalerScalingCooldown { return $this->scaleCooldown; } } - diff --git a/src/Model/AutoscalerSettings.php b/src/Model/AutoscalerSettings.php index 5d9edbc5e..aa4a4384c 100644 --- a/src/Model/AutoscalerSettings.php +++ b/src/Model/AutoscalerSettings.php @@ -15,14 +15,11 @@ */ final class AutoscalerSettings implements Model, JsonSerializable { - - public function __construct( private readonly ?array $services = [], ) { } - public function getModelName(): string { return self::class; @@ -45,4 +42,3 @@ public function getServices(): ?array return $this->services; } } - diff --git a/src/Model/AutoscalerTriggers.php b/src/Model/AutoscalerTriggers.php index 6b4461589..3fb8edbe8 100644 --- a/src/Model/AutoscalerTriggers.php +++ b/src/Model/AutoscalerTriggers.php @@ -14,8 +14,6 @@ */ final class AutoscalerTriggers implements Model, JsonSerializable { - - public function __construct( private readonly ?array $cpu = [], private readonly ?array $memory = [], @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,40 +41,39 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Settings for scaling based on CPU usage - * @return AutoscalerCPUTrigger[]|null - */ + /** + * Settings for scaling based on CPU usage + * @return AutoscalerCPUTrigger[]|null + */ public function getCpu(): ?array { return $this->cpu; } - /** - * Settings for scaling based on Memory usage - * @return AutoscalerMemoryTrigger[]|null - */ + /** + * Settings for scaling based on Memory usage + * @return AutoscalerMemoryTrigger[]|null + */ public function getMemory(): ?array { return $this->memory; } - /** - * Settings for scaling based on CPU pressure - * @return AutoscalerCPUPressureTrigger[]|null - */ + /** + * Settings for scaling based on CPU pressure + * @return AutoscalerCPUPressureTrigger[]|null + */ public function getCpuPressure(): ?array { return $this->cpuPressure; } - /** - * Settings for scaling based on Memory pressure - * @return AutoscalerMemoryPressureTrigger[]|null - */ + /** + * Settings for scaling based on Memory pressure + * @return AutoscalerMemoryPressureTrigger[]|null + */ public function getMemoryPressure(): ?array { return $this->memoryPressure; } } - diff --git a/src/Model/Autoscaling.php b/src/Model/Autoscaling.php index d7dc2eb34..c4e1b4884 100644 --- a/src/Model/Autoscaling.php +++ b/src/Model/Autoscaling.php @@ -13,14 +13,11 @@ */ final class Autoscaling implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, autoscaling can be configured. - */ + /** + * If true, autoscaling can be configured. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/Backup.php b/src/Model/Backup.php index 59b8bec4a..1cbae5df0 100644 --- a/src/Model/Backup.php +++ b/src/Model/Backup.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class Backup implements Model, JsonSerializable { - public const STATUS_CREATED = 'CREATED'; public const STATUS_DELETING = 'DELETING'; @@ -26,9 +26,9 @@ public function __construct( private readonly bool $safe, private readonly bool $restorable, private readonly bool $automated, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, - private readonly ?\DateTime $expiresAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, + private readonly ?DateTime $expiresAt, private readonly ?int $index, private readonly ?int $sizeOfVolumes, private readonly ?int $sizeUsed, @@ -36,7 +36,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -68,26 +67,26 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Backup - */ + /** + * The identifier of Backup + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } @@ -97,92 +96,91 @@ public function getAttributes(): array return $this->attributes; } - /** - * The status of the backup - */ + /** + * The status of the backup + */ public function getStatus(): string { return $this->status; } - /** - * Expiration date of the backup - */ - public function getExpiresAt(): ?\DateTime + /** + * Expiration date of the backup + */ + public function getExpiresAt(): ?DateTime { return $this->expiresAt; } - /** - * The index of this automated backup - */ + /** + * The index of this automated backup + */ public function getIndex(): ?int { return $this->index; } - /** - * The ID of the code commit attached to the backup - */ + /** + * The ID of the code commit attached to the backup + */ public function getCommitId(): string { return $this->commitId; } - /** - * The environment the backup belongs to - */ + /** + * The environment the backup belongs to + */ public function getEnvironment(): string { return $this->environment; } - /** - * Whether this backup was taken in a safe way - */ + /** + * Whether this backup was taken in a safe way + */ public function getSafe(): bool { return $this->safe; } - /** - * Total size of volumes backed up - */ + /** + * Total size of volumes backed up + */ public function getSizeOfVolumes(): ?int { return $this->sizeOfVolumes; } - /** - * Total size of space used on volumes backed up - */ + /** + * Total size of space used on volumes backed up + */ public function getSizeUsed(): ?int { return $this->sizeUsed; } - /** - * The current deployment at the time of backup - */ + /** + * The current deployment at the time of backup + */ public function getDeployment(): ?string { return $this->deployment; } - /** - * Whether the backup is restorable - */ + /** + * Whether the backup is restorable + */ public function getRestorable(): bool { return $this->restorable; } - /** - * Whether the backup is automated - */ + /** + * Whether the backup is automated + */ public function getAutomated(): bool { return $this->automated; } } - diff --git a/src/Model/BasicAuth.php b/src/Model/BasicAuth.php index 725e48e5c..7a6dfcc96 100644 --- a/src/Model/BasicAuth.php +++ b/src/Model/BasicAuth.php @@ -14,15 +14,12 @@ */ final class BasicAuth implements Model, JsonSerializable { - - public function __construct( private readonly string $username, private readonly string $password, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Username used to basic auth to container registry - */ + /** + * Username used to basic auth to container registry + */ public function getUsername(): string { return $this->username; } - /** - * Password used to basic auth to container registry - */ + /** + * Password used to basic auth to container registry + */ public function getPassword(): string { return $this->password; } } - diff --git a/src/Model/Bitbucket.php b/src/Model/Bitbucket.php index 409298958..6d2f70ed2 100644 --- a/src/Model/Bitbucket.php +++ b/src/Model/Bitbucket.php @@ -14,15 +14,12 @@ */ final class Bitbucket implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/BitbucketIntegration.php b/src/Model/BitbucketIntegration.php index 35d08510f..dfa3fabf5 100644 --- a/src/Model/BitbucketIntegration.php +++ b/src/Model/BitbucketIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level BitbucketIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class BitbucketIntegration implements Model, JsonSerializable, Integration { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -30,8 +29,8 @@ public function __construct( private readonly bool $buildPullRequests, private readonly bool $pullRequestsCloneParentData, private readonly bool $resyncPullRequests, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?int $pullRequestsMaxPages, private readonly ?OAuth2Consumer $appCredentials = null, private readonly ?AddonCredential $addonCredentials = null, @@ -39,7 +38,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,124 +69,123 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * The Bitbucket repository (in the form `user/repo`) - */ + /** + * The Bitbucket repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): bool { return $this->pullRequestsCloneParentData; } - /** - * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit - */ + /** + * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit + */ public function getPullRequestsMaxPages(): ?int { return $this->pullRequestsMaxPages; } - /** - * Whether or not pull request environment data should be re-synced on every build - */ + /** + * Whether or not pull request environment data should be re-synced on every build + */ public function getResyncPullRequests(): bool { return $this->resyncPullRequests; } - /** - * The identifier of BitbucketIntegration - */ + /** + * The identifier of BitbucketIntegration + */ public function getId(): ?string { return $this->id; } - /** - * The OAuth2 consumer information (optional) - */ + /** + * The OAuth2 consumer information (optional) + */ public function getAppCredentials(): ?OAuth2Consumer { return $this->appCredentials; } - /** - * The addon credential information (optional) - */ + /** + * The addon credential information (optional) + */ public function getAddonCredentials(): ?AddonCredential { return $this->addonCredentials; } } - diff --git a/src/Model/BitbucketIntegrationCreateInput.php b/src/Model/BitbucketIntegrationCreateInput.php index b4938c084..f40ce7e99 100644 --- a/src/Model/BitbucketIntegrationCreateInput.php +++ b/src/Model/BitbucketIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level BitbucketIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class BitbucketIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,92 +60,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Bitbucket repository (in the form `user/repo`) - */ + /** + * The Bitbucket repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The OAuth2 consumer information (optional) - */ + /** + * The OAuth2 consumer information (optional) + */ public function getAppCredentials(): ?OAuth2Consumer1 { return $this->appCredentials; } - /** - * The addon credential information (optional) - */ + /** + * The addon credential information (optional) + */ public function getAddonCredentials(): ?AddonCredential1 { return $this->addonCredentials; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } - /** - * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit - */ + /** + * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit + */ public function getPullRequestsMaxPages(): ?int { return $this->pullRequestsMaxPages; } - /** - * Whether or not pull request environment data should be re-synced on every build - */ + /** + * Whether or not pull request environment data should be re-synced on every build + */ public function getResyncPullRequests(): ?bool { return $this->resyncPullRequests; } } - diff --git a/src/Model/BitbucketIntegrationPatch.php b/src/Model/BitbucketIntegrationPatch.php index a8ea63daf..efa7aeea5 100644 --- a/src/Model/BitbucketIntegrationPatch.php +++ b/src/Model/BitbucketIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level BitbucketIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class BitbucketIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,92 +60,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Bitbucket repository (in the form `user/repo`) - */ + /** + * The Bitbucket repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The OAuth2 consumer information (optional) - */ + /** + * The OAuth2 consumer information (optional) + */ public function getAppCredentials(): ?OAuth2Consumer1 { return $this->appCredentials; } - /** - * The addon credential information (optional) - */ + /** + * The addon credential information (optional) + */ public function getAddonCredentials(): ?AddonCredential1 { return $this->addonCredentials; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } - /** - * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit - */ + /** + * Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit + */ public function getPullRequestsMaxPages(): ?int { return $this->pullRequestsMaxPages; } - /** - * Whether or not pull request environment data should be re-synced on every build - */ + /** + * Whether or not pull request environment data should be re-synced on every build + */ public function getResyncPullRequests(): ?bool { return $this->resyncPullRequests; } } - diff --git a/src/Model/BitbucketServer.php b/src/Model/BitbucketServer.php index 39134f731..cdd5c7d58 100644 --- a/src/Model/BitbucketServer.php +++ b/src/Model/BitbucketServer.php @@ -14,15 +14,12 @@ */ final class BitbucketServer implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/BitbucketServerIntegration.php b/src/Model/BitbucketServerIntegration.php index ed50105e7..4460dea28 100644 --- a/src/Model/BitbucketServerIntegration.php +++ b/src/Model/BitbucketServerIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level BitbucketServerIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class BitbucketServerIntegration implements Model, JsonSerializable, Integration { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -32,13 +31,12 @@ public function __construct( private readonly string $repository, private readonly bool $buildPullRequests, private readonly bool $pullRequestsCloneParentData, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -69,116 +67,115 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * The base URL of the Bitbucket Server installation - */ + /** + * The base URL of the Bitbucket Server installation + */ public function getUrl(): string { return $this->url; } - /** - * The Bitbucket Server user - */ + /** + * The Bitbucket Server user + */ public function getUsername(): string { return $this->username; } - /** - * The Bitbucket Server project - */ + /** + * The Bitbucket Server project + */ public function getProject(): string { return $this->project; } - /** - * The Bitbucket Server repository - */ + /** + * The Bitbucket Server repository + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): bool { return $this->pullRequestsCloneParentData; } - /** - * The identifier of BitbucketServerIntegration - */ + /** + * The identifier of BitbucketServerIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/BitbucketServerIntegrationCreateInput.php b/src/Model/BitbucketServerIntegrationCreateInput.php index 664228599..ded7eaafb 100644 --- a/src/Model/BitbucketServerIntegrationCreateInput.php +++ b/src/Model/BitbucketServerIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level BitbucketServerIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class BitbucketServerIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,92 +60,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The base URL of the Bitbucket Server installation - */ + /** + * The base URL of the Bitbucket Server installation + */ public function getUrl(): string { return $this->url; } - /** - * The Bitbucket Server user - */ + /** + * The Bitbucket Server user + */ public function getUsername(): string { return $this->username; } - /** - * The Bitbucket Server personal access token - */ + /** + * The Bitbucket Server personal access token + */ public function getToken(): string { return $this->token; } - /** - * The Bitbucket Server project - */ + /** + * The Bitbucket Server project + */ public function getProject(): string { return $this->project; } - /** - * The Bitbucket Server repository - */ + /** + * The Bitbucket Server repository + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } - diff --git a/src/Model/BitbucketServerIntegrationPatch.php b/src/Model/BitbucketServerIntegrationPatch.php index baf78a937..6d137c026 100644 --- a/src/Model/BitbucketServerIntegrationPatch.php +++ b/src/Model/BitbucketServerIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level BitbucketServerIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class BitbucketServerIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,92 +60,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The base URL of the Bitbucket Server installation - */ + /** + * The base URL of the Bitbucket Server installation + */ public function getUrl(): string { return $this->url; } - /** - * The Bitbucket Server user - */ + /** + * The Bitbucket Server user + */ public function getUsername(): string { return $this->username; } - /** - * The Bitbucket Server personal access token - */ + /** + * The Bitbucket Server personal access token + */ public function getToken(): string { return $this->token; } - /** - * The Bitbucket Server project - */ + /** + * The Bitbucket Server project + */ public function getProject(): string { return $this->project; } - /** - * The Bitbucket Server repository - */ + /** + * The Bitbucket Server repository + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } - diff --git a/src/Model/Blackfire.php b/src/Model/Blackfire.php index 9fed990e0..4fe5a6447 100644 --- a/src/Model/Blackfire.php +++ b/src/Model/Blackfire.php @@ -14,15 +14,12 @@ */ final class Blackfire implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/BlackfireIntegration.php b/src/Model/BlackfireIntegration.php index dbde69a35..0601ac6ad 100644 --- a/src/Model/BlackfireIntegration.php +++ b/src/Model/BlackfireIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level BlackfireIntegration (auto-generated) @@ -14,20 +14,17 @@ */ final class BlackfireIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, private readonly array $environmentsCredentials, private readonly bool $continuousProfiling, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -51,61 +48,60 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Blackfire environments credentials - * @return EnvironmentsCredentialsValue[] - */ + /** + * Blackfire environments credentials + * @return EnvironmentsCredentialsValue[] + */ public function getEnvironmentsCredentials(): array { return $this->environmentsCredentials; } - /** - * Whether continuous profiling is enabled for the project - */ + /** + * Whether continuous profiling is enabled for the project + */ public function getContinuousProfiling(): bool { return $this->continuousProfiling; } - /** - * The identifier of BlackfireIntegration - */ + /** + * The identifier of BlackfireIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/BlackfireIntegrationCreateInput.php b/src/Model/BlackfireIntegrationCreateInput.php index 35d18da69..970449300 100644 --- a/src/Model/BlackfireIntegrationCreateInput.php +++ b/src/Model/BlackfireIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level BlackfireIntegrationCreateInput (auto-generated) @@ -14,14 +13,11 @@ */ final class BlackfireIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } } - diff --git a/src/Model/BlackfireIntegrationPatch.php b/src/Model/BlackfireIntegrationPatch.php index c2a56ee6c..5f117fc14 100644 --- a/src/Model/BlackfireIntegrationPatch.php +++ b/src/Model/BlackfireIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level BlackfireIntegrationPatch (auto-generated) @@ -14,14 +13,11 @@ */ final class BlackfireIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } } - diff --git a/src/Model/BlackfirePhpServerCaches200Response.php b/src/Model/BlackfirePhpServerCaches200Response.php index a16bdd9bd..00970dae9 100644 --- a/src/Model/BlackfirePhpServerCaches200Response.php +++ b/src/Model/BlackfirePhpServerCaches200Response.php @@ -13,7 +13,6 @@ */ final class BlackfirePhpServerCaches200Response implements Model, JsonSerializable { - public const _DISTRIBUTION_COST_WT = 'wt'; public const _DISTRIBUTION_COST_PMU = 'pmu'; public const _CONTEXTS_MODE_ADDITIVE = 'additive'; @@ -42,7 +41,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -114,9 +112,9 @@ public function getDistributionCost(): string return $this->distributionCost; } - /** - * @return BlackfirePhpServerCaches200ResponseDataInner[] - */ + /** + * @return BlackfirePhpServerCaches200ResponseDataInner[] + */ public function getData(): array { return $this->data; @@ -152,4 +150,3 @@ public function getInstancesMode(): ?string return $this->instancesMode; } } - diff --git a/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php b/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php index 280afed64..12a1e6813 100644 --- a/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php +++ b/src/Model/BlackfirePhpServerCaches200ResponseDataInner.php @@ -13,8 +13,6 @@ */ final class BlackfirePhpServerCaches200ResponseDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?float $opcacheUsage = null, @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -92,4 +89,3 @@ public function getOpcacheHitrate(): ?float return $this->opcacheHitrate; } } - diff --git a/src/Model/BlackfirePhpServerCaches400Response.php b/src/Model/BlackfirePhpServerCaches400Response.php index 4665b2ed1..2df920b58 100644 --- a/src/Model/BlackfirePhpServerCaches400Response.php +++ b/src/Model/BlackfirePhpServerCaches400Response.php @@ -13,8 +13,6 @@ */ final class BlackfirePhpServerCaches400Response implements Model, JsonSerializable { - - public function __construct( private readonly string $type, private readonly string $title, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getViolations(): array return $this->violations; } } - diff --git a/src/Model/BlackfirePhpServerCaches499Response.php b/src/Model/BlackfirePhpServerCaches499Response.php index 9aaad451b..ca8ff2708 100644 --- a/src/Model/BlackfirePhpServerCaches499Response.php +++ b/src/Model/BlackfirePhpServerCaches499Response.php @@ -13,15 +13,12 @@ */ final class BlackfirePhpServerCaches499Response implements Model, JsonSerializable { - - public function __construct( private readonly string $error, private readonly string $message, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMessage(): string return $this->message; } } - diff --git a/src/Model/BlackfireProfileGraph200Response.php b/src/Model/BlackfireProfileGraph200Response.php index 9b35467a4..b76a003ef 100644 --- a/src/Model/BlackfireProfileGraph200Response.php +++ b/src/Model/BlackfireProfileGraph200Response.php @@ -13,7 +13,6 @@ */ final class BlackfireProfileGraph200Response implements Model, JsonSerializable { - public const LANGUAGE_PHP = 'php'; public const LANGUAGE_PYTHON = 'python'; @@ -39,7 +38,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -164,4 +162,3 @@ public function getHierarchy(): ?object return $this->hierarchy; } } - diff --git a/src/Model/BlackfireProfileProfile200Response.php b/src/Model/BlackfireProfileProfile200Response.php index 2c59b388e..c1478fd15 100644 --- a/src/Model/BlackfireProfileProfile200Response.php +++ b/src/Model/BlackfireProfileProfile200Response.php @@ -13,8 +13,6 @@ */ final class BlackfireProfileProfile200Response implements Model, JsonSerializable { - - public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function getProfile(): object return $this->profile; } } - diff --git a/src/Model/BlackfireProfileSubprofiles200Response.php b/src/Model/BlackfireProfileSubprofiles200Response.php index 98859c241..7df172132 100644 --- a/src/Model/BlackfireProfileSubprofiles200Response.php +++ b/src/Model/BlackfireProfileSubprofiles200Response.php @@ -13,8 +13,6 @@ */ final class BlackfireProfileSubprofiles200Response implements Model, JsonSerializable { - - public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function getSubprofiles(): object return $this->subprofiles; } } - diff --git a/src/Model/BlackfireProfileTimeline200Response.php b/src/Model/BlackfireProfileTimeline200Response.php index 03773b00c..39b8372f6 100644 --- a/src/Model/BlackfireProfileTimeline200Response.php +++ b/src/Model/BlackfireProfileTimeline200Response.php @@ -13,7 +13,6 @@ */ final class BlackfireProfileTimeline200Response implements Model, JsonSerializable { - public const LANGUAGE_PHP = 'php'; public const LANGUAGE_PYTHON = 'python'; @@ -30,7 +29,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -101,4 +99,3 @@ public function getLanguage(): string return $this->language; } } - diff --git a/src/Model/BlackfireProfilesList200Response.php b/src/Model/BlackfireProfilesList200Response.php index 2acc7783c..281cacdd2 100644 --- a/src/Model/BlackfireProfilesList200Response.php +++ b/src/Model/BlackfireProfilesList200Response.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesList200Response implements Model, JsonSerializable { - - public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -72,9 +69,9 @@ public function getAgent(): string return $this->agent; } - /** - * @return BlackfireProfilesList200ResponseProfilesInner[] - */ + /** + * @return BlackfireProfilesList200ResponseProfilesInner[] + */ public function getProfiles(): array { return $this->profiles; @@ -95,4 +92,3 @@ public function getTotal(): int return $this->total; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInner.php b/src/Model/BlackfireProfilesList200ResponseProfilesInner.php index fb3bc1c74..57ee21824 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInner.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInner.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,16 +14,14 @@ */ final class BlackfireProfilesList200ResponseProfilesInner implements Model, JsonSerializable { - - public function __construct( private readonly string $uuid, private readonly string $name, private readonly BlackfireProfilesList200ResponseProfilesInnerLinks $links, private readonly ?int $recommendations = null, private readonly ?object $report = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?object $metadata = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerData $data = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerContext $context = null, @@ -39,7 +38,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -91,12 +89,12 @@ public function getLinks(): BlackfireProfilesList200ResponseProfilesInnerLinks return $this->links; } - public function getCreatedAt(): ?\DateTime + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - public function getUpdatedAt(): ?\DateTime + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } @@ -176,4 +174,3 @@ public function getKeyPage(): ?object return $this->keyPage; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php index 9967cc733..cc71a82ae 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerAgent.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerAgent implements Model, JsonSerializable { - - public function __construct( private readonly ?string $uuid = null, private readonly ?string $name = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getIsEnv(): ?bool return $this->isEnv; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php index 57b0a75d8..7601294b5 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerContext.php @@ -13,7 +13,6 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerContext implements Model, JsonSerializable { - public const TYPE_HTTP_REQUEST = 'http-request'; public const TYPE_CLI = 'cli'; public const TYPE_NO_OP = 'no-op'; @@ -28,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -81,4 +79,3 @@ public function getArgs(): ?array return $this->args; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php index 5dafd3db0..9be47903c 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerData.php @@ -13,15 +13,12 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerData implements Model, JsonSerializable { - - public function __construct( private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataEnvelope $envelope = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics $importantMetrics = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getImportantMetrics(): ?BlackfireProfilesList200ResponseProfiles return $this->importantMetrics; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php index 3e1ae8d38..3c3120be4 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataEnvelope.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataEnvelope implements Model, JsonSerializable { - - public function __construct( private readonly ?float $wt = null, private readonly ?float $cpu = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -85,4 +82,3 @@ public function getCt(): ?float return $this->ct; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php index 27e7e855e..ca18dfe83 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics.php @@ -13,15 +13,12 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataImportantMetrics implements Model, JsonSerializable { - - public function __construct( private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries $sqlQueries = null, private readonly ?BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests $httpRequests = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getHttpRequests(): ?BlackfireProfilesList200ResponseProfilesInne return $this->httpRequests; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php index bff0d6e31..238e6d6f7 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests.php @@ -13,15 +13,12 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsHttpRequests implements Model, JsonSerializable { - - public function __construct( private readonly ?float $ct = null, private readonly ?float $wt = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getWt(): ?float return $this->wt; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php index 80d3af60f..c436ecf6c 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries.php @@ -13,15 +13,12 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerDataImportantMetricsSqlQueries implements Model, JsonSerializable { - - public function __construct( private readonly ?float $ct = null, private readonly ?float $wt = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getWt(): ?float return $this->wt; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php index c9f62f995..6b3246306 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinks.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerLinks implements Model, JsonSerializable { - - public function __construct( private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles $apiSubprofiles, private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile $apiProfile, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,4 +68,3 @@ public function getApiTimeline(): ?BlackfireProfilesRecommendations200ResponseRe return $this->apiTimeline; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php index 3a3d15dbc..7f630dcc7 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl.php @@ -13,7 +13,6 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerLinksGraphUrl implements Model, JsonSerializable { - public const TYPE_TEXT_HTML = 'text/html'; public function __construct( @@ -22,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,4 +49,3 @@ public function getType(): string return $this->type; } } - diff --git a/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php b/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php index 223077940..7fabc4b65 100644 --- a/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php +++ b/src/Model/BlackfireProfilesList200ResponseProfilesInnerOwner.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesList200ResponseProfilesInnerOwner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $uuid = null, private readonly ?string $name = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getAvatar(): ?string return $this->avatar; } } - diff --git a/src/Model/BlackfireProfilesRecommendations200Response.php b/src/Model/BlackfireProfilesRecommendations200Response.php index 2b19a41a7..e3c670baf 100644 --- a/src/Model/BlackfireProfilesRecommendations200Response.php +++ b/src/Model/BlackfireProfilesRecommendations200Response.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesRecommendations200Response implements Model, JsonSerializable { - - public function __construct( private readonly string $projectId, private readonly string $environmentId, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -88,9 +85,9 @@ public function getTo(): int return $this->to; } - /** - * @return BlackfireProfilesRecommendations200ResponseRecommendationsInner[] - */ + /** + * @return BlackfireProfilesRecommendations200ResponseRecommendationsInner[] + */ public function getRecommendations(): array { return $this->recommendations; @@ -116,4 +113,3 @@ public function getUntestedTopTransactions(): ?array return $this->untestedTopTransactions; } } - diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php index 0a594b269..5757ed9db 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInner.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInner implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly int $total, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getLinks(): ?BlackfireProfilesRecommendations200ResponseRecommen return $this->links; } } - diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php index 3b2957ac8..d26175854 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks.php @@ -13,8 +13,6 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinks implements Model, JsonSerializable { - - public function __construct( private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles $apiSubprofiles, private readonly BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile $apiProfile, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getApiTimeline(): ?BlackfireProfilesRecommendations200ResponseRe return $this->apiTimeline; } } - diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php index 04de024d9..878e696f3 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph.php @@ -13,7 +13,6 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiGraph implements Model, JsonSerializable { - public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -22,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,4 +49,3 @@ public function getType(): string return $this->type; } } - diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php index f68ac65c0..158fcfb62 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile.php @@ -13,7 +13,6 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiProfile implements Model, JsonSerializable { - public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -22,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,4 +49,3 @@ public function getType(): string return $this->type; } } - diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php index f140ac391..cef8ccfc7 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles.php @@ -13,7 +13,6 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiSubprofiles implements Model, JsonSerializable { - public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -22,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,4 +49,3 @@ public function getType(): string return $this->type; } } - diff --git a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php index 5c4046479..78a3e56f0 100644 --- a/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php +++ b/src/Model/BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline.php @@ -13,7 +13,6 @@ */ final class BlackfireProfilesRecommendations200ResponseRecommendationsInnerLinksApiTimeline implements Model, JsonSerializable { - public const TYPE_APPLICATION_JSON = 'application/json'; public function __construct( @@ -22,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,4 +49,3 @@ public function getType(): string return $this->type; } } - diff --git a/src/Model/BlackfireServerGlobal200Response.php b/src/Model/BlackfireServerGlobal200Response.php index ebd157d5d..acc8eb64b 100644 --- a/src/Model/BlackfireServerGlobal200Response.php +++ b/src/Model/BlackfireServerGlobal200Response.php @@ -13,7 +13,6 @@ */ final class BlackfireServerGlobal200Response implements Model, JsonSerializable { - public const _CONTEXTS_MODE_ADDITIVE = 'additive'; public const _CONTEXTS_MODE_SUBTRACTIVE = 'subtractive'; public const _APPLICATIONS_MODE_ADDITIVE = 'additive'; @@ -45,7 +44,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -135,9 +133,9 @@ public function getBranchMachineName(): string return $this->branchMachineName; } - /** - * @return BlackfireServerGlobal200ResponseAlertEvaluationsInner[] - */ + /** + * @return BlackfireServerGlobal200ResponseAlertEvaluationsInner[] + */ public function getAlertEvaluations(): array { return $this->alertEvaluations; @@ -173,4 +171,3 @@ public function getDistributionCost(): ?string return $this->distributionCost; } } - diff --git a/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php b/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php index 38cceb5c3..c5d6b79d9 100644 --- a/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php +++ b/src/Model/BlackfireServerGlobal200ResponseAlertEvaluationsInner.php @@ -13,7 +13,6 @@ */ final class BlackfireServerGlobal200ResponseAlertEvaluationsInner implements Model, JsonSerializable { - public const STATE_NORMAL = 'normal'; public const STATE_WARN = 'warn'; public const STATE_ALARM = 'alarm'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -67,4 +65,3 @@ public function getState(): string return $this->state; } } - diff --git a/src/Model/BlackfireServerGlobal200ResponseQuota.php b/src/Model/BlackfireServerGlobal200ResponseQuota.php index 7c43359c2..9edaad958 100644 --- a/src/Model/BlackfireServerGlobal200ResponseQuota.php +++ b/src/Model/BlackfireServerGlobal200ResponseQuota.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,18 +14,15 @@ */ final class BlackfireServerGlobal200ResponseQuota implements Model, JsonSerializable { - - public function __construct( private readonly int $allowed, private readonly int $used, private readonly bool $exceeded, - private readonly ?\DateTime $periodStartedAt, - private readonly ?\DateTime $periodEndsAt, + private readonly ?DateTime $periodStartedAt, + private readonly ?DateTime $periodEndsAt, ) { } - public function getModelName(): string { return self::class; @@ -61,14 +59,13 @@ public function getExceeded(): bool return $this->exceeded; } - public function getPeriodStartedAt(): ?\DateTime + public function getPeriodStartedAt(): ?DateTime { return $this->periodStartedAt; } - public function getPeriodEndsAt(): ?\DateTime + public function getPeriodEndsAt(): ?DateTime { return $this->periodEndsAt; } } - diff --git a/src/Model/BlackfireServerGlobal200ResponseServer.php b/src/Model/BlackfireServerGlobal200ResponseServer.php index 297584f63..5f5b57336 100644 --- a/src/Model/BlackfireServerGlobal200ResponseServer.php +++ b/src/Model/BlackfireServerGlobal200ResponseServer.php @@ -13,15 +13,12 @@ */ final class BlackfireServerGlobal200ResponseServer implements Model, JsonSerializable { - - public function __construct( private readonly float $total, private readonly array $data, ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getTotal(): float return $this->total; } - /** - * @return BlackfireServerGlobal200ResponseServerDataInner[] - */ + /** + * @return BlackfireServerGlobal200ResponseServerDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php b/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php index 32df63ad5..3d0052239 100644 --- a/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php +++ b/src/Model/BlackfireServerGlobal200ResponseServerDataInner.php @@ -13,8 +13,6 @@ */ final class BlackfireServerGlobal200ResponseServerDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?float $wt = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -85,4 +82,3 @@ public function getRpms(): ?float return $this->rpms; } } - diff --git a/src/Model/BlackfireServerTopSpans200Response.php b/src/Model/BlackfireServerTopSpans200Response.php index b2d4dcc26..de703f745 100644 --- a/src/Model/BlackfireServerTopSpans200Response.php +++ b/src/Model/BlackfireServerTopSpans200Response.php @@ -13,7 +13,6 @@ */ final class BlackfireServerTopSpans200Response implements Model, JsonSerializable { - public const _SORT_PERCENTAGE = 'percentage'; public const _SORT_P_96 = 'p_96'; public const _SORT_COUNT = 'count'; @@ -94,7 +93,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -345,4 +343,3 @@ public function getDistributionCost(): ?string return $this->distributionCost; } } - diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php index 9914cfbb5..7a569da17 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFilters.php @@ -13,15 +13,12 @@ */ final class BlackfireServerTopSpans200ResponseAdvancedFilters implements Model, JsonSerializable { - - public function __construct( private readonly array $fields, private readonly int $maxApplicableFilters, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue[] - */ + /** + * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue[] + */ public function getFields(): array { return $this->fields; @@ -52,4 +49,3 @@ public function getMaxApplicableFilters(): int return $this->maxApplicableFilters; } } - diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php index 72f6d762a..92ffa2b5d 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue.php @@ -13,8 +13,6 @@ */ final class BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValue implements Model, JsonSerializable { - - public function __construct( private readonly int $distinctValues, private readonly string $type, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -52,12 +49,11 @@ public function getType(): string return $this->type; } - /** - * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner[] - */ + /** + * @return BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner[] + */ public function getValues(): array { return $this->values; } } - diff --git a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php index d2c34a44b..a092ab66c 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php +++ b/src/Model/BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner.php @@ -13,15 +13,12 @@ */ final class BlackfireServerTopSpans200ResponseAdvancedFiltersFieldsValueValuesInner implements Model, JsonSerializable { - - public function __construct( private readonly string $value, private readonly int $count, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getCount(): int return $this->count; } } - diff --git a/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php b/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php index 17066e102..fac99f604 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php +++ b/src/Model/BlackfireServerTopSpans200ResponseTopSpans.php @@ -13,14 +13,11 @@ */ final class BlackfireServerTopSpans200ResponseTopSpans implements Model, JsonSerializable { - - public function __construct( private readonly array $data, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTopSpans200ResponseTopSpansDataInner[] - */ + /** + * @return BlackfireServerTopSpans200ResponseTopSpansDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php b/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php index 7bfa9ef4c..150d59281 100644 --- a/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php +++ b/src/Model/BlackfireServerTopSpans200ResponseTopSpansDataInner.php @@ -13,8 +13,6 @@ */ final class BlackfireServerTopSpans200ResponseTopSpansDataInner implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $label, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getImpact(): float return $this->impact; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200Response.php b/src/Model/BlackfireServerTransactionsBreakdown200Response.php index 8211fad87..3e73147dd 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200Response.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200Response.php @@ -13,7 +13,6 @@ */ final class BlackfireServerTransactionsBreakdown200Response implements Model, JsonSerializable { - public const _BREAKDOWN_DIMENSION_WT = 'wt'; public const _BREAKDOWN_DIMENSION_PMU = 'pmu'; public const _BREAKDOWN_DIMENSION_STDOUT = 'stdout'; @@ -101,7 +100,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -370,4 +368,3 @@ public function getDistributionCost(): ?string return $this->distributionCost; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php index 0ae6f000f..1888a5e8f 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits.php @@ -13,15 +13,12 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseBreakdownTopHits implements Model, JsonSerializable { - - public function __construct( private readonly int $maxQuantity, private readonly float $maxPercentage, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMaxPercentage(): float return $this->maxPercentage; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php index 2c5387505..cd629157e 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline.php @@ -13,14 +13,11 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTopHitsTimeline implements Model, JsonSerializable { - - public function __construct( private readonly array $data, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php index 13246963e..d8cfc5fac 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner.php @@ -13,8 +13,6 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,12 +56,11 @@ public function getTotalCount(): ?float return $this->totalCount; } - /** - * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue[]|null - */ + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue[]|null + */ public function getTransactionsFilter(): ?array { return $this->_transactionsFilter; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php index 2adcb359c..8cf480bc2 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue.php @@ -13,15 +13,12 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTopHitsTimelineDataInnerTransactionsValue implements Model, JsonSerializable { - - public function __construct( private readonly float $average, private readonly float $count, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getCount(): float return $this->count; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php index a967082ee..1293b4b13 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactions.php @@ -13,14 +13,11 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactions implements Model, JsonSerializable { - - public function __construct( private readonly array $data, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner[] - */ + /** + * @return BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php index d591b53fe..7df801fb9 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner.php @@ -13,8 +13,6 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInner implements Model, JsonSerializable { - - public function __construct( private readonly string $transaction, private readonly float $wt96thPercentile, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -113,4 +110,3 @@ public function getLinks(): BlackfireServerTransactionsBreakdown200ResponseTrans return $this->links; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php index 8ad7c97b8..10f37f2ac 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks.php @@ -13,8 +13,6 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinks implements Model, JsonSerializable { - - public function __construct( private readonly BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans $topSpans, private readonly BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations $recommendations, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getProfiles(): BlackfireServerTransactionsBreakdown200ResponseTr return $this->profiles; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php index b06895dbf..4d1e93c00 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles.php @@ -13,14 +13,11 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksProfiles implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php index 5ae5ce6fb..744c40643 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations.php @@ -13,14 +13,11 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksRecommendations implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php index 1955a776c..844903958 100644 --- a/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php +++ b/src/Model/BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans.php @@ -13,14 +13,11 @@ */ final class BlackfireServerTransactionsBreakdown200ResponseTransactionsDataInnerLinksTopSpans implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/Blob.php b/src/Model/Blob.php index 8f8293188..380ce29b5 100644 --- a/src/Model/Blob.php +++ b/src/Model/Blob.php @@ -13,7 +13,6 @@ */ final class Blob implements Model, JsonSerializable { - public const ENCODING_BASE64 = 'base64'; public const ENCODING_UTF_8 = 'utf-8'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -48,44 +46,43 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Blob - */ + /** + * The identifier of Blob + */ public function getId(): string { return $this->id; } - /** - * The identifier of the tag - */ + /** + * The identifier of the tag + */ public function getSha(): string { return $this->sha; } - /** - * The size of the blob - */ + /** + * The size of the blob + */ public function getSize(): int { return $this->size; } - /** - * The encoding of the contents - */ + /** + * The encoding of the contents + */ public function getEncoding(): string { return $this->encoding; } - /** - * The contents - */ + /** + * The contents + */ public function getContent(): string { return $this->content; } } - diff --git a/src/Model/BuildCachesValue.php b/src/Model/BuildCachesValue.php index 63cf8d252..5511311d0 100644 --- a/src/Model/BuildCachesValue.php +++ b/src/Model/BuildCachesValue.php @@ -13,8 +13,6 @@ */ final class BuildCachesValue implements Model, JsonSerializable { - - public function __construct( private readonly array $watch, private readonly bool $allowStale, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getShareBetweenApps(): bool return $this->shareBetweenApps; } } - diff --git a/src/Model/BuildConfiguration.php b/src/Model/BuildConfiguration.php index b4186b70d..6776c3953 100644 --- a/src/Model/BuildConfiguration.php +++ b/src/Model/BuildConfiguration.php @@ -13,15 +13,12 @@ */ final class BuildConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly array $caches, private readonly ?string $flavor, ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getFlavor(): ?string return $this->flavor; } - /** - * @return BuildCachesValue[] - */ + /** + * @return BuildCachesValue[] + */ public function getCaches(): array { return $this->caches; } } - diff --git a/src/Model/BuildResources.php b/src/Model/BuildResources.php index ccce47c14..3dd810088 100644 --- a/src/Model/BuildResources.php +++ b/src/Model/BuildResources.php @@ -13,8 +13,6 @@ */ final class BuildResources implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly float $maxCpu, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,9 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, build resources can be modified. - */ + /** + * If true, build resources can be modified. + */ public function getEnabled(): bool { return $this->enabled; @@ -60,4 +57,3 @@ public function getMaxMemory(): int return $this->maxMemory; } } - diff --git a/src/Model/BuildResources1.php b/src/Model/BuildResources1.php index f78fa2cc7..753976534 100644 --- a/src/Model/BuildResources1.php +++ b/src/Model/BuildResources1.php @@ -13,15 +13,12 @@ */ final class BuildResources1 implements Model, JsonSerializable { - - public function __construct( private readonly float $cpu, private readonly int $memory, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMemory(): int return $this->memory; } } - diff --git a/src/Model/BuildResources2.php b/src/Model/BuildResources2.php index 9eb230832..f69caeac8 100644 --- a/src/Model/BuildResources2.php +++ b/src/Model/BuildResources2.php @@ -13,15 +13,12 @@ */ final class BuildResources2 implements Model, JsonSerializable { - - public function __construct( private readonly ?float $cpu = null, private readonly ?int $memory = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMemory(): ?int return $this->memory; } } - diff --git a/src/Model/CacheConfiguration.php b/src/Model/CacheConfiguration.php index 728502dcf..accdc90dc 100644 --- a/src/Model/CacheConfiguration.php +++ b/src/Model/CacheConfiguration.php @@ -14,8 +14,6 @@ */ final class CacheConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly int $defaultTtl, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,17 +42,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the cache is enabled. - */ + /** + * Whether the cache is enabled. + */ public function getEnabled(): bool { return $this->enabled; } - /** - * The TTL to apply when the response doesn't specify one. Only applies to static files. - */ + /** + * The TTL to apply when the response doesn't specify one. Only applies to static files. + */ public function getDefaultTtl(): int { return $this->defaultTtl; @@ -71,4 +68,3 @@ public function getHeaders(): array return $this->headers; } } - diff --git a/src/Model/CanAffordSubscriptionRequest.php b/src/Model/CanAffordSubscriptionRequest.php index f1238ced6..ebe1b273c 100644 --- a/src/Model/CanAffordSubscriptionRequest.php +++ b/src/Model/CanAffordSubscriptionRequest.php @@ -13,14 +13,11 @@ */ final class CanAffordSubscriptionRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?array $resources = [], ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getResources(): ?array return $this->resources; } } - diff --git a/src/Model/CanCreateNewOrgSubscription200Response.php b/src/Model/CanCreateNewOrgSubscription200Response.php index b6e20f948..cdd61b9b9 100644 --- a/src/Model/CanCreateNewOrgSubscription200Response.php +++ b/src/Model/CanCreateNewOrgSubscription200Response.php @@ -13,8 +13,6 @@ */ final class CanCreateNewOrgSubscription200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?CanCreateNewOrgSubscription200ResponseRequiredAction $requiredAction = null, private readonly ?bool $canCreate = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getRequiredAction(): ?CanCreateNewOrgSubscription200ResponseRequ return $this->requiredAction; } } - diff --git a/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php b/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php index 45a9e52c5..4eb5f8eca 100644 --- a/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php +++ b/src/Model/CanCreateNewOrgSubscription200ResponseRequiredAction.php @@ -13,8 +13,6 @@ */ final class CanCreateNewOrgSubscription200ResponseRequiredAction implements Model, JsonSerializable { - - public function __construct( private readonly ?object $credentials = null, private readonly ?string $reference = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getReference(): ?string return $this->reference; } } - diff --git a/src/Model/CanUpdateSubscription200Response.php b/src/Model/CanUpdateSubscription200Response.php index 1643bf677..1311f9717 100644 --- a/src/Model/CanUpdateSubscription200Response.php +++ b/src/Model/CanUpdateSubscription200Response.php @@ -13,8 +13,6 @@ */ final class CanUpdateSubscription200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $canUpdate = null, private readonly ?string $message = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getRequiredAction(): ?object return $this->requiredAction; } } - diff --git a/src/Model/Certificate.php b/src/Model/Certificate.php index a309500be..0c1cb6b3a 100644 --- a/src/Model/Certificate.php +++ b/src/Model/Certificate.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class Certificate implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $certificate, @@ -25,13 +24,12 @@ public function __construct( private readonly array $domains, private readonly array $authType, private readonly array $issuer, - private readonly \DateTime $expiresAt, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly DateTime $expiresAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, ) { } - public function getModelName(): string { return self::class; @@ -60,33 +58,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Certificate - */ + /** + * The identifier of Certificate + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The PEM-encoded certificate - */ + /** + * The PEM-encoded certificate + */ public function getCertificate(): string { return $this->certificate; @@ -97,25 +95,25 @@ public function getChain(): array return $this->chain; } - /** - * Whether this certificate is automatically provisioned - */ + /** + * Whether this certificate is automatically provisioned + */ public function getIsProvisioned(): bool { return $this->isProvisioned; } - /** - * Whether this certificate should be skipped during provisioning - */ + /** + * Whether this certificate should be skipped during provisioning + */ public function getIsInvalid(): bool { return $this->isInvalid; } - /** - * Whether this certificate is root type - */ + /** + * Whether this certificate is root type + */ public function getIsRoot(): bool { return $this->isRoot; @@ -131,21 +129,20 @@ public function getAuthType(): array return $this->authType; } - /** - * The issuer of the certificate - * @return IssuerInner[] - */ + /** + * The issuer of the certificate + * @return IssuerInner[] + */ public function getIssuer(): array { return $this->issuer; } - /** - * Expiration date - */ - public function getExpiresAt(): \DateTime + /** + * Expiration date + */ + public function getExpiresAt(): DateTime { return $this->expiresAt; } } - diff --git a/src/Model/CertificateCreateInput.php b/src/Model/CertificateCreateInput.php index 82dde45da..f72517aee 100644 --- a/src/Model/CertificateCreateInput.php +++ b/src/Model/CertificateCreateInput.php @@ -13,8 +13,6 @@ */ final class CertificateCreateInput implements Model, JsonSerializable { - - public function __construct( private readonly string $certificate, private readonly string $key, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,17 +41,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The PEM-encoded certificate - */ + /** + * The PEM-encoded certificate + */ public function getCertificate(): string { return $this->certificate; } - /** - * The PEM-encoded private key - */ + /** + * The PEM-encoded private key + */ public function getKey(): string { return $this->key; @@ -65,12 +62,11 @@ public function getChain(): ?array return $this->chain; } - /** - * Whether this certificate should be skipped during provisioning - */ + /** + * Whether this certificate should be skipped during provisioning + */ public function getIsInvalid(): ?bool { return $this->isInvalid; } } - diff --git a/src/Model/CertificatePatch.php b/src/Model/CertificatePatch.php index 647486f01..c5e65f015 100644 --- a/src/Model/CertificatePatch.php +++ b/src/Model/CertificatePatch.php @@ -13,15 +13,12 @@ */ final class CertificatePatch implements Model, JsonSerializable { - - public function __construct( private readonly ?array $chain = [], private readonly ?bool $isInvalid = null, ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getChain(): ?array return $this->chain; } - /** - * Whether this certificate should be skipped during provisioning - */ + /** + * Whether this certificate should be skipped during provisioning + */ public function getIsInvalid(): ?bool { return $this->isInvalid; } } - diff --git a/src/Model/CertificateProvisioner.php b/src/Model/CertificateProvisioner.php index 0ae293293..bf7999d23 100644 --- a/src/Model/CertificateProvisioner.php +++ b/src/Model/CertificateProvisioner.php @@ -13,8 +13,6 @@ */ final class CertificateProvisioner implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $directoryUrl, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -46,44 +43,43 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of CertificateProvisioner - */ + /** + * The identifier of CertificateProvisioner + */ public function getId(): string { return $this->id; } - /** - * The URL to the ACME directory - */ + /** + * The URL to the ACME directory + */ public function getDirectoryUrl(): string { return $this->directoryUrl; } - /** - * The email address for contact information - */ + /** + * The email address for contact information + */ public function getEmail(): string { return $this->email; } - /** - * The key identifier for Entity Attestation Binding - */ + /** + * The key identifier for Entity Attestation Binding + */ public function getEabKid(): ?string { return $this->eabKid; } - /** - * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding - */ + /** + * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding + */ public function getEabHmacKey(): ?string { return $this->eabHmacKey; } } - diff --git a/src/Model/CertificateProvisionerPatch.php b/src/Model/CertificateProvisionerPatch.php index aec0d1679..e9544ea42 100644 --- a/src/Model/CertificateProvisionerPatch.php +++ b/src/Model/CertificateProvisionerPatch.php @@ -13,8 +13,6 @@ */ final class CertificateProvisionerPatch implements Model, JsonSerializable { - - public function __construct( private readonly ?string $eabKid = null, private readonly ?string $eabHmacKey = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,36 +41,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The URL to the ACME directory - */ + /** + * The URL to the ACME directory + */ public function getDirectoryUrl(): ?string { return $this->directoryUrl; } - /** - * The email address for contact information - */ + /** + * The email address for contact information + */ public function getEmail(): ?string { return $this->email; } - /** - * The key identifier for Entity Attestation Binding - */ + /** + * The key identifier for Entity Attestation Binding + */ public function getEabKid(): ?string { return $this->eabKid; } - /** - * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding - */ + /** + * The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding + */ public function getEabHmacKey(): ?string { return $this->eabHmacKey; } } - diff --git a/src/Model/Commands.php b/src/Model/Commands.php index 86b4e7453..d61cb86d9 100644 --- a/src/Model/Commands.php +++ b/src/Model/Commands.php @@ -13,15 +13,12 @@ */ final class Commands implements Model, JsonSerializable { - - public function __construct( private readonly string $start, private readonly ?string $stop = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getStop(): ?string return $this->stop; } } - diff --git a/src/Model/Commands1.php b/src/Model/Commands1.php index 84d9865e5..c8a54a448 100644 --- a/src/Model/Commands1.php +++ b/src/Model/Commands1.php @@ -13,8 +13,6 @@ */ final class Commands1 implements Model, JsonSerializable { - - public function __construct( private readonly ?string $preStart = null, private readonly ?string $start = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getPostStart(): ?string return $this->postStart; } } - diff --git a/src/Model/Commands2.php b/src/Model/Commands2.php index a73ad2bd8..47524071f 100644 --- a/src/Model/Commands2.php +++ b/src/Model/Commands2.php @@ -13,8 +13,6 @@ */ final class Commands2 implements Model, JsonSerializable { - - public function __construct( private readonly string $start, private readonly ?string $preStart = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getPostStart(): ?string return $this->postStart; } } - diff --git a/src/Model/CommandsInner.php b/src/Model/CommandsInner.php index 55bb20b4e..04012a38d 100644 --- a/src/Model/CommandsInner.php +++ b/src/Model/CommandsInner.php @@ -13,8 +13,6 @@ */ final class CommandsInner implements Model, JsonSerializable { - - public function __construct( private readonly string $app, private readonly string $type, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getExitCode(): int return $this->exitCode; } } - diff --git a/src/Model/Commit.php b/src/Model/Commit.php index 4e4ac2787..237b7e09c 100644 --- a/src/Model/Commit.php +++ b/src/Model/Commit.php @@ -13,8 +13,6 @@ */ final class Commit implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $sha, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -50,49 +47,49 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Commit - */ + /** + * The identifier of Commit + */ public function getId(): string { return $this->id; } - /** - * The identifier of the commit - */ + /** + * The identifier of the commit + */ public function getSha(): string { return $this->sha; } - /** - * The information about the author - */ + /** + * The information about the author + */ public function getAuthor(): Author { return $this->author; } - /** - * The information about the committer - */ + /** + * The information about the committer + */ public function getCommitter(): Committer { return $this->committer; } - /** - * The commit message - */ + /** + * The commit message + */ public function getMessage(): string { return $this->message; } - /** - * The identifier of the tree - */ + /** + * The identifier of the tree + */ public function getTree(): string { return $this->tree; @@ -103,4 +100,3 @@ public function getParents(): array return $this->parents; } } - diff --git a/src/Model/Committer.php b/src/Model/Committer.php index de80af692..b8f5c0165 100644 --- a/src/Model/Committer.php +++ b/src/Model/Committer.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,16 +15,13 @@ */ final class Committer implements Model, JsonSerializable { - - public function __construct( - private readonly \DateTime $date, + private readonly DateTime $date, private readonly string $name, private readonly string $email, ) { } - public function getModelName(): string { return self::class; @@ -43,28 +41,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The time of the author or committer - */ - public function getDate(): \DateTime + /** + * The time of the author or committer + */ + public function getDate(): DateTime { return $this->date; } - /** - * The name of the author or committer - */ + /** + * The name of the author or committer + */ public function getName(): string { return $this->name; } - /** - * The email of the author or committer - */ + /** + * The email of the author or committer + */ public function getEmail(): string { return $this->email; } } - diff --git a/src/Model/CommunityPackagesInner.php b/src/Model/CommunityPackagesInner.php index 918fad22b..83f442e83 100644 --- a/src/Model/CommunityPackagesInner.php +++ b/src/Model/CommunityPackagesInner.php @@ -13,13 +13,10 @@ */ final class CommunityPackagesInner implements Model, JsonSerializable { - - - public function __construct( - ) { + public function __construct() + { } - public function getModelName(): string { return self::class; @@ -36,4 +33,3 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } } - diff --git a/src/Model/Components.php b/src/Model/Components.php index c89bf7e39..c3a1cb076 100644 --- a/src/Model/Components.php +++ b/src/Model/Components.php @@ -14,14 +14,11 @@ */ final class Components implements Model, JsonSerializable { - - public function __construct( private readonly ?object $voucherVatBaseprice = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * stub - */ + /** + * stub + */ public function getVoucherVatBaseprice(): ?object { return $this->voucherVatBaseprice; } } - diff --git a/src/Model/ComposableImages.php b/src/Model/ComposableImages.php index 252c4c18b..c4f261f28 100644 --- a/src/Model/ComposableImages.php +++ b/src/Model/ComposableImages.php @@ -13,15 +13,12 @@ */ final class ComposableImages implements Model, JsonSerializable { - - public function __construct( private readonly array $runtimes, private readonly array $packages, ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getRuntimes(): array return $this->runtimes; } - /** - * @return CommunityPackagesInner[] - */ + /** + * @return CommunityPackagesInner[] + */ public function getPackages(): array { return $this->packages; } } - diff --git a/src/Model/Config.php b/src/Model/Config.php index efff50843..b4c5af1c8 100644 --- a/src/Model/Config.php +++ b/src/Model/Config.php @@ -13,8 +13,6 @@ */ final class Config implements Model, JsonSerializable { - - public function __construct( private readonly ?NewRelic $newrelic = null, private readonly ?SumoLogic $sumologic = null, @@ -37,7 +35,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -72,148 +69,147 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * New Relic log-forwarding integration configurations - */ + /** + * New Relic log-forwarding integration configurations + */ public function getNewrelic(): ?NewRelic { return $this->newrelic; } - /** - * Sumo Logic log-forwarding integration configurations - */ + /** + * Sumo Logic log-forwarding integration configurations + */ public function getSumologic(): ?SumoLogic { return $this->sumologic; } - /** - * Splunk log-forwarding integration configurations - */ + /** + * Splunk log-forwarding integration configurations + */ public function getSplunk(): ?Splunk { return $this->splunk; } - /** - * HTTP log-forwarding integration configurations - */ + /** + * HTTP log-forwarding integration configurations + */ public function getHttplog(): ?HTTPLogForwarding { return $this->httplog; } - /** - * Syslog log-forwarding integration configurations - */ + /** + * Syslog log-forwarding integration configurations + */ public function getSyslog(): ?Syslog { return $this->syslog; } - /** - * Webhook integration configurations - */ + /** + * Webhook integration configurations + */ public function getWebhook(): ?Webhook { return $this->webhook; } - /** - * Script integration configurations - */ + /** + * Script integration configurations + */ public function getScript(): ?Script { return $this->script; } - /** - * GitHub integration configurations - */ + /** + * GitHub integration configurations + */ public function getGithub(): ?GitHub { return $this->github; } - /** - * GitLab integration configurations - */ + /** + * GitLab integration configurations + */ public function getGitlab(): ?GitLab { return $this->gitlab; } - /** - * Bitbucket integration configurations - */ + /** + * Bitbucket integration configurations + */ public function getBitbucket(): ?Bitbucket { return $this->bitbucket; } - /** - * Bitbucket server integration configurations - */ + /** + * Bitbucket server integration configurations + */ public function getBitbucketServer(): ?BitbucketServer { return $this->bitbucketServer; } - /** - * Health Email notification integration configurations - */ + /** + * Health Email notification integration configurations + */ public function getHealthEmail(): ?HealthEmail { return $this->healthEmail; } - /** - * Health Webhook notification integration configurations - */ + /** + * Health Webhook notification integration configurations + */ public function getHealthWebhook(): ?HealthWebHook { return $this->healthWebhook; } - /** - * Health PagerDuty notification integration configurations - */ + /** + * Health PagerDuty notification integration configurations + */ public function getHealthPagerduty(): ?HealthPagerDuty { return $this->healthPagerduty; } - /** - * Health Slack notification integration configurations - */ + /** + * Health Slack notification integration configurations + */ public function getHealthSlack(): ?HealthSlack { return $this->healthSlack; } - /** - * Fastly CDN integration configurations - */ + /** + * Fastly CDN integration configurations + */ public function getCdnFastly(): ?FastlyCDN { return $this->cdnFastly; } - /** - * Blackfire integration configurations - */ + /** + * Blackfire integration configurations + */ public function getBlackfire(): ?Blackfire { return $this->blackfire; } - /** - * OpenTelemetry log-forwarding integration configurations - */ + /** + * OpenTelemetry log-forwarding integration configurations + */ public function getOtlplog(): ?OpenTelemetry { return $this->otlplog; } } - diff --git a/src/Model/ConfirmPhoneNumberRequest.php b/src/Model/ConfirmPhoneNumberRequest.php index 2af196aea..e8161e37a 100644 --- a/src/Model/ConfirmPhoneNumberRequest.php +++ b/src/Model/ConfirmPhoneNumberRequest.php @@ -13,14 +13,11 @@ */ final class ConfirmPhoneNumberRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $code, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getCode(): string return $this->code; } } - diff --git a/src/Model/ConfirmTotpEnrollment200Response.php b/src/Model/ConfirmTotpEnrollment200Response.php index 7e70b3518..78966ee75 100644 --- a/src/Model/ConfirmTotpEnrollment200Response.php +++ b/src/Model/ConfirmTotpEnrollment200Response.php @@ -13,14 +13,11 @@ */ final class ConfirmTotpEnrollment200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $recoveryCodes = [], ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getRecoveryCodes(): ?array return $this->recoveryCodes; } } - diff --git a/src/Model/ConfirmTotpEnrollmentRequest.php b/src/Model/ConfirmTotpEnrollmentRequest.php index c83293620..ac2a5f286 100644 --- a/src/Model/ConfirmTotpEnrollmentRequest.php +++ b/src/Model/ConfirmTotpEnrollmentRequest.php @@ -13,15 +13,12 @@ */ final class ConfirmTotpEnrollmentRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $secret, private readonly string $passcode, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getPasscode(): string return $this->passcode; } } - diff --git a/src/Model/Connection.php b/src/Model/Connection.php index e574f8ab9..a11059cef 100644 --- a/src/Model/Connection.php +++ b/src/Model/Connection.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,20 +14,17 @@ */ final class Connection implements Model, JsonSerializable { - - public function __construct( private readonly ?string $provider = null, private readonly ?string $providerType = null, private readonly ?bool $isMandatory = null, private readonly ?string $subject = null, private readonly ?string $emailAddress = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, ) { } - public function getModelName(): string { return self::class; @@ -50,60 +48,59 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the federation provider. - */ + /** + * The name of the federation provider. + */ public function getProvider(): ?string { return $this->provider; } - /** - * The type of the federation provider. - */ + /** + * The type of the federation provider. + */ public function getProviderType(): ?string { return $this->providerType; } - /** - * Whether the federated login connection is mandatory. - */ + /** + * Whether the federated login connection is mandatory. + */ public function getIsMandatory(): ?bool { return $this->isMandatory; } - /** - * The identity on the federation provider. - */ + /** + * The identity on the federation provider. + */ public function getSubject(): ?string { return $this->subject; } - /** - * The email address presented on the federated login connection. - */ + /** + * The email address presented on the federated login connection. + */ public function getEmailAddress(): ?string { return $this->emailAddress; } - /** - * The date and time when the connection was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the connection was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the connection was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the connection was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } } - diff --git a/src/Model/ContainerProfilesValueValue.php b/src/Model/ContainerProfilesValueValue.php index 3310c04cf..6b0d9257c 100644 --- a/src/Model/ContainerProfilesValueValue.php +++ b/src/Model/ContainerProfilesValueValue.php @@ -13,7 +13,6 @@ */ final class ContainerProfilesValueValue implements Model, JsonSerializable { - public const CPU_TYPE_GUARANTEED = 'guaranteed'; public const CPU_TYPE_SHARED = 'shared'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,4 +57,3 @@ public function getCpuType(): string return $this->cpuType; } } - diff --git a/src/Model/ContinuousProfilingConfiguration.php b/src/Model/ContinuousProfilingConfiguration.php index fb816605f..e923a94a5 100644 --- a/src/Model/ContinuousProfilingConfiguration.php +++ b/src/Model/ContinuousProfilingConfiguration.php @@ -14,14 +14,11 @@ */ final class ContinuousProfilingConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly array $supportedRuntimes, ) { } - public function getModelName(): string { return self::class; @@ -44,4 +41,3 @@ public function getSupportedRuntimes(): array return $this->supportedRuntimes; } } - diff --git a/src/Model/CreateApiTokenRequest.php b/src/Model/CreateApiTokenRequest.php index 5d4edd528..adf63945d 100644 --- a/src/Model/CreateApiTokenRequest.php +++ b/src/Model/CreateApiTokenRequest.php @@ -13,14 +13,11 @@ */ final class CreateApiTokenRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $name, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getName(): string return $this->name; } } - diff --git a/src/Model/CreateAuthorizationCredentials200Response.php b/src/Model/CreateAuthorizationCredentials200Response.php index 75a8c60cd..dac5a8630 100644 --- a/src/Model/CreateAuthorizationCredentials200Response.php +++ b/src/Model/CreateAuthorizationCredentials200Response.php @@ -13,15 +13,12 @@ */ final class CreateAuthorizationCredentials200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?CreateAuthorizationCredentials200ResponseRedirectToUrl $redirectToUrl = null, private readonly ?string $type = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getType(): ?string return $this->type; } } - diff --git a/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php b/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php index 47637554d..c60312acd 100644 --- a/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php +++ b/src/Model/CreateAuthorizationCredentials200ResponseRedirectToUrl.php @@ -13,15 +13,12 @@ */ final class CreateAuthorizationCredentials200ResponseRedirectToUrl implements Model, JsonSerializable { - - public function __construct( private readonly ?string $returnUrl = null, private readonly ?string $url = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getUrl(): ?string return $this->url; } } - diff --git a/src/Model/CreateOrgInviteRequest.php b/src/Model/CreateOrgInviteRequest.php index 7b9cd606d..efd87dc11 100644 --- a/src/Model/CreateOrgInviteRequest.php +++ b/src/Model/CreateOrgInviteRequest.php @@ -13,7 +13,6 @@ */ final class CreateOrgInviteRequest implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_PLANS = 'plans'; @@ -28,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,4 +61,3 @@ public function getForce(): ?bool return $this->force; } } - diff --git a/src/Model/CreateOrgMemberRequest.php b/src/Model/CreateOrgMemberRequest.php index 1aa12054b..f06422686 100644 --- a/src/Model/CreateOrgMemberRequest.php +++ b/src/Model/CreateOrgMemberRequest.php @@ -13,7 +13,6 @@ */ final class CreateOrgMemberRequest implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_MEMBERS = 'members'; @@ -27,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,4 +54,3 @@ public function getPermissions(): ?array return $this->permissions; } } - diff --git a/src/Model/CreateOrgProjectRequest.php b/src/Model/CreateOrgProjectRequest.php index 5bbda00ab..0c263a2b6 100644 --- a/src/Model/CreateOrgProjectRequest.php +++ b/src/Model/CreateOrgProjectRequest.php @@ -13,8 +13,6 @@ */ final class CreateOrgProjectRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $region, private readonly ?string $organizationId = null, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -48,52 +45,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getRegion(): string { return $this->region; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): ?string { return $this->title; } - /** - * The type of projects. - */ + /** + * The type of projects. + */ public function getType(): ?ProjectType { return $this->type; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Default branch. - */ + /** + * Default branch. + */ public function getDefaultBranch(): ?string { return $this->defaultBranch; } } - diff --git a/src/Model/CreateOrgRequest.php b/src/Model/CreateOrgRequest.php index 674e77733..38f03ac0a 100644 --- a/src/Model/CreateOrgRequest.php +++ b/src/Model/CreateOrgRequest.php @@ -13,7 +13,6 @@ */ final class CreateOrgRequest implements Model, JsonSerializable { - public const TYPE_FIXED = 'fixed'; public const TYPE_FLEXIBLE = 'flexible'; @@ -27,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -80,4 +78,3 @@ public function getSecurityContact(): ?string return $this->securityContact; } } - diff --git a/src/Model/CreateOrgSubscriptionRequest.php b/src/Model/CreateOrgSubscriptionRequest.php index 65cae6068..6c437eaa7 100644 --- a/src/Model/CreateOrgSubscriptionRequest.php +++ b/src/Model/CreateOrgSubscriptionRequest.php @@ -13,8 +13,6 @@ */ final class CreateOrgSubscriptionRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $projectRegion, private readonly ?string $plan = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -55,9 +52,9 @@ public function getProjectRegion(): string return $this->projectRegion; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; @@ -88,4 +85,3 @@ public function getStorage(): ?int return $this->storage; } } - diff --git a/src/Model/CreateProfilePicture200Response.php b/src/Model/CreateProfilePicture200Response.php index 585fedf95..dcc7a30d8 100644 --- a/src/Model/CreateProfilePicture200Response.php +++ b/src/Model/CreateProfilePicture200Response.php @@ -13,14 +13,11 @@ */ final class CreateProfilePicture200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?string $url = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getUrl(): ?string return $this->url; } } - diff --git a/src/Model/CreateProjectInviteRequest.php b/src/Model/CreateProjectInviteRequest.php index 921eeac90..ce23c8af2 100644 --- a/src/Model/CreateProjectInviteRequest.php +++ b/src/Model/CreateProjectInviteRequest.php @@ -13,7 +13,6 @@ */ final class CreateProjectInviteRequest implements Model, JsonSerializable { - public const ROLE_ADMIN = 'admin'; public const ROLE_VIEWER = 'viewer'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -58,17 +56,17 @@ public function getRole(): ?string return $this->role; } - /** - * @return CreateProjectInviteRequestPermissionsInner[]|null - */ + /** + * @return CreateProjectInviteRequestPermissionsInner[]|null + */ public function getPermissions(): ?array { return $this->permissions; } - /** - * @return CreateProjectInviteRequestEnvironmentsInner[]|null - */ + /** + * @return CreateProjectInviteRequestEnvironmentsInner[]|null + */ public function getEnvironments(): ?array { return $this->environments; @@ -79,4 +77,3 @@ public function getForce(): ?bool return $this->force; } } - diff --git a/src/Model/CreateProjectInviteRequestEnvironmentsInner.php b/src/Model/CreateProjectInviteRequestEnvironmentsInner.php index 92eac2e96..548a3e2c0 100644 --- a/src/Model/CreateProjectInviteRequestEnvironmentsInner.php +++ b/src/Model/CreateProjectInviteRequestEnvironmentsInner.php @@ -13,7 +13,6 @@ */ final class CreateProjectInviteRequestEnvironmentsInner implements Model, JsonSerializable { - public const ROLE_ADMIN = 'admin'; public const ROLE_VIEWER = 'viewer'; public const ROLE_CONTRIBUTOR = 'contributor'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,4 +51,3 @@ public function getRole(): ?string return $this->role; } } - diff --git a/src/Model/CreateProjectInviteRequestPermissionsInner.php b/src/Model/CreateProjectInviteRequestPermissionsInner.php index 765daeb30..6754e4de9 100644 --- a/src/Model/CreateProjectInviteRequestPermissionsInner.php +++ b/src/Model/CreateProjectInviteRequestPermissionsInner.php @@ -13,7 +13,6 @@ */ final class CreateProjectInviteRequestPermissionsInner implements Model, JsonSerializable { - public const TYPE_PRODUCTION = 'production'; public const TYPE_STAGING = 'staging'; public const TYPE_DEVELOPMENT = 'development'; @@ -27,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,4 +54,3 @@ public function getRole(): ?string return $this->role; } } - diff --git a/src/Model/CreateSshKeyRequest.php b/src/Model/CreateSshKeyRequest.php index 596e02877..d271a2066 100644 --- a/src/Model/CreateSshKeyRequest.php +++ b/src/Model/CreateSshKeyRequest.php @@ -13,8 +13,6 @@ */ final class CreateSshKeyRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $value, private readonly ?string $title = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getUuid(): ?string return $this->uuid; } } - diff --git a/src/Model/CreateTeamMemberRequest.php b/src/Model/CreateTeamMemberRequest.php index 64311f25a..9f981abac 100644 --- a/src/Model/CreateTeamMemberRequest.php +++ b/src/Model/CreateTeamMemberRequest.php @@ -13,14 +13,11 @@ */ final class CreateTeamMemberRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $userId, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getUserId(): string return $this->userId; } } - diff --git a/src/Model/CreateTeamRequest.php b/src/Model/CreateTeamRequest.php index 10e873ea0..efa2e1b6a 100644 --- a/src/Model/CreateTeamRequest.php +++ b/src/Model/CreateTeamRequest.php @@ -13,8 +13,6 @@ */ final class CreateTeamRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $organizationId, private readonly string $label, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getProjectPermissions(): ?array return $this->projectPermissions; } } - diff --git a/src/Model/CreateTicketRequest.php b/src/Model/CreateTicketRequest.php index aba2caf0e..43b9d54b0 100644 --- a/src/Model/CreateTicketRequest.php +++ b/src/Model/CreateTicketRequest.php @@ -13,7 +13,6 @@ */ final class CreateTicketRequest implements Model, JsonSerializable { - public const PRIORITY_LOW = 'low'; public const PRIORITY_NORMAL = 'normal'; public const PRIORITY_HIGH = 'high'; @@ -45,7 +44,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -118,9 +116,9 @@ public function getCategory(): ?string return $this->category; } - /** - * @return CreateTicketRequestAttachmentsInner[]|null - */ + /** + * @return CreateTicketRequestAttachmentsInner[]|null + */ public function getAttachments(): ?array { return $this->attachments; @@ -131,4 +129,3 @@ public function getCollaboratorIds(): ?array return $this->collaboratorIds; } } - diff --git a/src/Model/CreateTicketRequestAttachmentsInner.php b/src/Model/CreateTicketRequestAttachmentsInner.php index f0157c3fb..31ffda03b 100644 --- a/src/Model/CreateTicketRequestAttachmentsInner.php +++ b/src/Model/CreateTicketRequestAttachmentsInner.php @@ -13,15 +13,12 @@ */ final class CreateTicketRequestAttachmentsInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $filename = null, private readonly ?string $data = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getData(): ?string return $this->data; } } - diff --git a/src/Model/CronsDeploymentState.php b/src/Model/CronsDeploymentState.php index 646d07602..478eb3115 100644 --- a/src/Model/CronsDeploymentState.php +++ b/src/Model/CronsDeploymentState.php @@ -14,7 +14,6 @@ */ final class CronsDeploymentState implements Model, JsonSerializable { - public const STATUS_PAUSED = 'paused'; public const STATUS_RUNNING = 'running'; public const STATUS_SLEEPING = 'sleeping'; @@ -25,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,20 +42,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enabled or disabled - */ + /** + * Enabled or disabled + */ public function getEnabled(): bool { return $this->enabled; } - /** - * The status of the crons - */ + /** + * The status of the crons + */ public function getStatus(): string { return $this->status; } } - diff --git a/src/Model/CronsValue.php b/src/Model/CronsValue.php index 6fc713e8f..4a4f0dc9b 100644 --- a/src/Model/CronsValue.php +++ b/src/Model/CronsValue.php @@ -13,8 +13,6 @@ */ final class CronsValue implements Model, JsonSerializable { - - public function __construct( private readonly string $spec, private readonly Commands $commands, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,4 +68,3 @@ public function getCmd(): ?string return $this->cmd; } } - diff --git a/src/Model/CurrencyAmount.php b/src/Model/CurrencyAmount.php index f1d627d9a..c2e67cbab 100644 --- a/src/Model/CurrencyAmount.php +++ b/src/Model/CurrencyAmount.php @@ -14,8 +14,6 @@ */ final class CurrencyAmount implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted currency value. - */ + /** + * Formatted currency value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Plain amount. - */ + /** + * Plain amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Currency code. - */ + /** + * Currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * Currency symbol. - */ + /** + * Currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } - diff --git a/src/Model/CurrencyAmountNullable.php b/src/Model/CurrencyAmountNullable.php index 1cd30c82e..9679183f0 100644 --- a/src/Model/CurrencyAmountNullable.php +++ b/src/Model/CurrencyAmountNullable.php @@ -14,8 +14,6 @@ */ final class CurrencyAmountNullable implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted currency value. - */ + /** + * Formatted currency value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Plain amount. - */ + /** + * Plain amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Currency code. - */ + /** + * Currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * Currency symbol. - */ + /** + * Currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } - diff --git a/src/Model/CurrentUser.php b/src/Model/CurrentUser.php index b8aae3bf3..d672e11e0 100644 --- a/src/Model/CurrentUser.php +++ b/src/Model/CurrentUser.php @@ -14,8 +14,6 @@ */ final class CurrentUser implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $uuid = null, @@ -33,7 +31,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,82 +60,82 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getId(): ?string { return $this->id; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getUuid(): ?string { return $this->uuid; } - /** - * The username of the owner. - */ + /** + * The username of the owner. + */ public function getUsername(): ?string { return $this->username; } - /** - * The full name of the owner. - */ + /** + * The full name of the owner. + */ public function getDisplayName(): ?string { return $this->displayName; } - /** - * Status of the user. 0 = blocked; 1 = active. - */ + /** + * Status of the user. 0 = blocked; 1 = active. + */ public function getStatus(): ?int { return $this->status; } - /** - * The email address of the owner. - */ + /** + * The email address of the owner. + */ public function getMail(): ?string { return $this->mail; } - /** - * The list of user's public SSH keys. - * @return SshKey[]|null - */ + /** + * The list of user's public SSH keys. + * @return SshKey[]|null + */ public function getSshKeys(): ?array { return $this->sshKeys; } - /** - * The indicator whether the user has a public ssh key on file or not. - */ + /** + * The indicator whether the user has a public ssh key on file or not. + */ public function getHasKey(): ?bool { return $this->hasKey; } - /** - * @return CurrentUserProjectsInner[]|null - */ + /** + * @return CurrentUserProjectsInner[]|null + */ public function getProjects(): ?array { return $this->projects; } - /** - * The sequential ID of the user. - */ + /** + * The sequential ID of the user. + */ public function getSequence(): ?int { return $this->sequence; @@ -149,20 +146,19 @@ public function getRoles(): ?array return $this->roles; } - /** - * The URL of the user image. - */ + /** + * The URL of the user image. + */ public function getPicture(): ?string { return $this->picture; } - /** - * Number of support tickets by status. - */ + /** + * Number of support tickets by status. + */ public function getTickets(): ?object { return $this->tickets; } } - diff --git a/src/Model/CurrentUserProjectsInner.php b/src/Model/CurrentUserProjectsInner.php index b7b331b91..2ff0dd16b 100644 --- a/src/Model/CurrentUserProjectsInner.php +++ b/src/Model/CurrentUserProjectsInner.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class CurrentUserProjectsInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $name = null, @@ -35,11 +34,10 @@ public function __construct( private readonly ?string $vendorLabel = null, private readonly ?string $vendorWebsite = null, private readonly ?string $vendorResources = null, - private readonly ?\DateTime $createdAt = null, + private readonly ?DateTime $createdAt = null, ) { } - public function getModelName(): string { return self::class; @@ -131,9 +129,9 @@ public function getOwner(): ?string return $this->owner; } - /** - * Project owner information that can be exposed to collaborators. - */ + /** + * Project owner information that can be exposed to collaborators. + */ public function getOwnerInfo(): ?OwnerInfo { return $this->ownerInfo; @@ -174,9 +172,8 @@ public function getVendorResources(): ?string return $this->vendorResources; } - public function getCreatedAt(): ?\DateTime + public function getCreatedAt(): ?DateTime { return $this->createdAt; } } - diff --git a/src/Model/CustomDomains.php b/src/Model/CustomDomains.php index cc7068696..c147524c1 100644 --- a/src/Model/CustomDomains.php +++ b/src/Model/CustomDomains.php @@ -13,15 +13,12 @@ */ final class CustomDomains implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly int $environmentsWithDomainsLimit, ) { } - public function getModelName(): string { return self::class; @@ -40,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, custom domains can be added to the project. - */ + /** + * If true, custom domains can be added to the project. + */ public function getEnabled(): bool { return $this->enabled; } - /** - * Limit on the amount of non-production environments that can have domains set - */ + /** + * Limit on the amount of non-production environments that can have domains set + */ public function getEnvironmentsWithDomainsLimit(): int { return $this->environmentsWithDomainsLimit; } } - diff --git a/src/Model/DataRetention.php b/src/Model/DataRetention.php index 935485234..037b9974f 100644 --- a/src/Model/DataRetention.php +++ b/src/Model/DataRetention.php @@ -13,14 +13,11 @@ */ final class DataRetention implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, data retention configuration can be modified. - */ + /** + * If true, data retention configuration can be modified. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/DataRetentionConfigurationValue.php b/src/Model/DataRetentionConfigurationValue.php index b76ba8f82..04b2aadc5 100644 --- a/src/Model/DataRetentionConfigurationValue.php +++ b/src/Model/DataRetentionConfigurationValue.php @@ -13,15 +13,12 @@ */ final class DataRetentionConfigurationValue implements Model, JsonSerializable { - - public function __construct( private readonly int $maxBackups, private readonly DefaultConfig $defaultConfig, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getDefaultConfig(): DefaultConfig return $this->defaultConfig; } } - diff --git a/src/Model/DataRetentionConfigurationValue1.php b/src/Model/DataRetentionConfigurationValue1.php index c71c73985..038d668a2 100644 --- a/src/Model/DataRetentionConfigurationValue1.php +++ b/src/Model/DataRetentionConfigurationValue1.php @@ -13,15 +13,12 @@ */ final class DataRetentionConfigurationValue1 implements Model, JsonSerializable { - - public function __construct( private readonly DefaultConfig1 $defaultConfig, private readonly ?int $maxBackups = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMaxBackups(): ?int return $this->maxBackups; } } - diff --git a/src/Model/DateTimeFilter.php b/src/Model/DateTimeFilter.php index df5fad8c4..b1a0082b0 100644 --- a/src/Model/DateTimeFilter.php +++ b/src/Model/DateTimeFilter.php @@ -13,8 +13,6 @@ */ final class DateTimeFilter implements Model, JsonSerializable { - - public function __construct( private readonly ?string $eq = null, private readonly ?string $ne = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -50,60 +47,59 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Equal - */ + /** + * Equal + */ public function getEq(): ?string { return $this->eq; } - /** - * Not equal - */ + /** + * Not equal + */ public function getNe(): ?string { return $this->ne; } - /** - * Between (comma-separated list) - */ + /** + * Between (comma-separated list) + */ public function getBetween(): ?string { return $this->between; } - /** - * Greater than - */ + /** + * Greater than + */ public function getGt(): ?string { return $this->gt; } - /** - * Greater than or equal - */ + /** + * Greater than or equal + */ public function getGte(): ?string { return $this->gte; } - /** - * Less than - */ + /** + * Less than + */ public function getLt(): ?string { return $this->lt; } - /** - * Less than or equal - */ + /** + * Less than or equal + */ public function getLte(): ?string { return $this->lte; } } - diff --git a/src/Model/DedicatedDeploymentTarget.php b/src/Model/DedicatedDeploymentTarget.php index 53a774aa7..35f73af79 100644 --- a/src/Model/DedicatedDeploymentTarget.php +++ b/src/Model/DedicatedDeploymentTarget.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTarget; /** * Low level DedicatedDeploymentTarget (auto-generated) @@ -14,7 +13,6 @@ */ final class DedicatedDeploymentTarget implements Model, JsonSerializable, DeploymentTarget { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -38,7 +36,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -69,58 +66,58 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The host to deploy to - */ + /** + * The host to deploy to + */ public function getDeployHost(): ?string { return $this->deployHost; } - /** - * The port to deploy to - */ + /** + * The port to deploy to + */ public function getDeployPort(): ?int { return $this->deployPort; } - /** - * The host to use to SSH to app containers - */ + /** + * The host to use to SSH to app containers + */ public function getSshHost(): ?string { return $this->sshHost; } - /** - * The hosts of the deployment target - * @return HostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return HostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * Whether to take application mounts from the pushed data or the deployment target - */ + /** + * Whether to take application mounts from the pushed data or the deployment target + */ public function getAutoMounts(): bool { return $this->autoMounts; @@ -131,52 +128,51 @@ public function getExcludedMounts(): array return $this->excludedMounts; } - /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) - */ + /** + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) + */ public function getEnforcedMounts(): object { return $this->enforcedMounts; } - /** - * Whether to take application crons from the pushed data or the deployment target - */ + /** + * Whether to take application crons from the pushed data or the deployment target + */ public function getAutoCrons(): bool { return $this->autoCrons; } - /** - * Whether to take application crons from the pushed data or the deployment target - */ + /** + * Whether to take application crons from the pushed data or the deployment target + */ public function getAutoNginx(): bool { return $this->autoNginx; } - /** - * Whether to perform deployments or not - */ + /** + * Whether to perform deployments or not + */ public function getMaintenanceMode(): bool { return $this->maintenanceMode; } - /** - * which phase of guardrails are we in - */ + /** + * which phase of guardrails are we in + */ public function getGuardrailsPhase(): int { return $this->guardrailsPhase; } - /** - * The identifier of DedicatedDeploymentTarget - */ + /** + * The identifier of DedicatedDeploymentTarget + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/DedicatedDeploymentTargetCreateInput.php b/src/Model/DedicatedDeploymentTargetCreateInput.php index 05b0b0d9d..b77c76a2c 100644 --- a/src/Model/DedicatedDeploymentTargetCreateInput.php +++ b/src/Model/DedicatedDeploymentTargetCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetCreateInput; /** * Low level DedicatedDeploymentTargetCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class DedicatedDeploymentTargetCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,28 +44,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) - */ + /** + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) + */ public function getEnforcedMounts(): ?object { return $this->enforcedMounts; } } - diff --git a/src/Model/DedicatedDeploymentTargetPatch.php b/src/Model/DedicatedDeploymentTargetPatch.php index 962811d0b..e898b7355 100644 --- a/src/Model/DedicatedDeploymentTargetPatch.php +++ b/src/Model/DedicatedDeploymentTargetPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetPatch; /** * Low level DedicatedDeploymentTargetPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class DedicatedDeploymentTargetPatch implements Model, JsonSerializable, DeploymentTargetPatch { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,28 +44,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) - */ + /** + * Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount) + */ public function getEnforcedMounts(): ?object { return $this->enforcedMounts; } } - diff --git a/src/Model/DefaultConfig.php b/src/Model/DefaultConfig.php index 4a848228b..f5d8801a6 100644 --- a/src/Model/DefaultConfig.php +++ b/src/Model/DefaultConfig.php @@ -13,15 +13,12 @@ */ final class DefaultConfig implements Model, JsonSerializable { - - public function __construct( private readonly int $manualCount, private readonly array $schedule, ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getManualCount(): int return $this->manualCount; } - /** - * @return ScheduleInner[] - */ + /** + * @return ScheduleInner[] + */ public function getSchedule(): array { return $this->schedule; } } - diff --git a/src/Model/DefaultConfig1.php b/src/Model/DefaultConfig1.php index 887f64008..252e3a287 100644 --- a/src/Model/DefaultConfig1.php +++ b/src/Model/DefaultConfig1.php @@ -13,15 +13,12 @@ */ final class DefaultConfig1 implements Model, JsonSerializable { - - public function __construct( private readonly ?int $manualCount = null, private readonly ?array $schedule = [], ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getManualCount(): ?int return $this->manualCount; } - /** - * @return ScheduleInner[]|null - */ + /** + * @return ScheduleInner[]|null + */ public function getSchedule(): ?array { return $this->schedule; } } - diff --git a/src/Model/DefaultResources.php b/src/Model/DefaultResources.php index 454dc1f03..61160d2e7 100644 --- a/src/Model/DefaultResources.php +++ b/src/Model/DefaultResources.php @@ -13,7 +13,6 @@ */ final class DefaultResources implements Model, JsonSerializable { - public const CPU_TYPE_GUARANTEED = 'guaranteed'; public const CPU_TYPE_SHARED = 'shared'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -73,4 +71,3 @@ public function getProfileSize(): ?string return $this->profileSize; } } - diff --git a/src/Model/Deployment.php b/src/Model/Deployment.php index 76ed5c292..88f9e9406 100644 --- a/src/Model/Deployment.php +++ b/src/Model/Deployment.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class Deployment implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $clusterName, @@ -34,13 +33,12 @@ public function __construct( private readonly array $containerProfiles, private readonly string $tasks, private readonly ?VPNConfiguration $vpn, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?string $fingerprint = null, ) { } - public function getModelName(): string { return self::class; @@ -78,135 +76,135 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Deployment - */ + /** + * The identifier of Deployment + */ public function getId(): string { return $this->id; } - /** - * The name of the cluster - */ + /** + * The name of the cluster + */ public function getClusterName(): string { return $this->clusterName; } - /** - * The project information - */ + /** + * The project information + */ public function getProjectInfo(): ProjectInfo { return $this->projectInfo; } - /** - * The environment information - */ + /** + * The environment information + */ public function getEnvironmentInfo(): EnvironmentInfo { return $this->environmentInfo; } - /** - * The deployment target - */ + /** + * The deployment target + */ public function getDeploymentTarget(): string { return $this->deploymentTarget; } - /** - * The configuration of the VPN - */ + /** + * The configuration of the VPN + */ public function getVpn(): ?VPNConfiguration { return $this->vpn; } - /** - * The permissions of the HTTP access - */ + /** + * The permissions of the HTTP access + */ public function getHttpAccess(): HttpAccessPermissions { return $this->httpAccess; } - /** - * Whether to configure SMTP for this environment - */ + /** + * Whether to configure SMTP for this environment + */ public function getEnableSmtp(): bool { return $this->enableSmtp; } - /** - * Whether to restrict robots for this environment - */ + /** + * Whether to restrict robots for this environment + */ public function getRestrictRobots(): bool { return $this->restrictRobots; } - /** - * The variables applying to this environment - * @return EnvironmentVariablesInner[] - */ + /** + * The variables applying to this environment + * @return EnvironmentVariablesInner[] + */ public function getVariables(): array { return $this->variables; } - /** - * Access control definition for this enviroment - * @return AccessControlInner[] - */ + /** + * Access control definition for this enviroment + * @return AccessControlInner[] + */ public function getAccess(): array { return $this->access; } - /** - * Subscription - */ + /** + * Subscription + */ public function getSubscription(): Subscription1 { return $this->subscription; } - /** - * The services - * @return ServicesValue[] - */ + /** + * The services + * @return ServicesValue[] + */ public function getServices(): array { return $this->services; } - /** - * The routes - * @return RoutesValue[] - */ + /** + * The routes + * @return RoutesValue[] + */ public function getRoutes(): array { return $this->routes; } - /** - * The Web applications - * @return WebApplicationsValue[] - */ + /** + * The Web applications + * @return WebApplicationsValue[] + */ public function getWebapps(): array { return $this->webapps; } - /** - * The workers - * @return WorkersValue[] - */ + /** + * The workers + * @return WorkersValue[] + */ public function getWorkers(): array { return $this->workers; @@ -217,36 +215,35 @@ public function getContainerProfiles(): array return $this->containerProfiles; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getTasks(): string { return $this->tasks; } - /** - * The creation date of the deployment - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date of the deployment + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date of the deployment - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date of the deployment + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The fingerprint of the deployment - */ + /** + * The fingerprint of the deployment + */ public function getFingerprint(): ?string { return $this->fingerprint; } } - diff --git a/src/Model/DeploymentHostsInner.php b/src/Model/DeploymentHostsInner.php index 3b1da943e..57381ff4e 100644 --- a/src/Model/DeploymentHostsInner.php +++ b/src/Model/DeploymentHostsInner.php @@ -13,7 +13,6 @@ */ final class DeploymentHostsInner implements Model, JsonSerializable { - public const TYPE_CORE = 'core'; public const TYPE_SATELLITE = 'satellite'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,4 +57,3 @@ public function getServices(): ?array return $this->services; } } - diff --git a/src/Model/DeploymentState.php b/src/Model/DeploymentState.php index 8b1d4309f..7a2609f42 100644 --- a/src/Model/DeploymentState.php +++ b/src/Model/DeploymentState.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class DeploymentState implements Model, JsonSerializable { - public const LAST_DEPLOYMENT_FAILURE_REASON_ERROR = 'error'; public const LAST_DEPLOYMENT_FAILURE_REASON_SHELL = 'shell'; @@ -24,14 +24,13 @@ public function __construct( private readonly array $lastDeploymentCommands, private readonly CronsDeploymentState $crons, private readonly ?string $lastDeploymentFailureReason, - private readonly ?\DateTime $lastDeploymentAt, - private readonly ?\DateTime $lastAutoscaleUpAt, - private readonly ?\DateTime $lastAutoscaleDownAt, - private readonly ?\DateTime $lastMaintenanceAt, + private readonly ?DateTime $lastDeploymentAt, + private readonly ?DateTime $lastAutoscaleUpAt, + private readonly ?DateTime $lastAutoscaleDownAt, + private readonly ?DateTime $lastMaintenanceAt, ) { } - public function getModelName(): string { return self::class; @@ -57,77 +56,76 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the last deployment has correctly switched state (does not mean it was successful) - */ + /** + * Whether the last deployment has correctly switched state (does not mean it was successful) + */ public function getLastStateUpdateSuccessful(): bool { return $this->lastStateUpdateSuccessful; } - /** - * Whether the last deployment was successful - */ + /** + * Whether the last deployment was successful + */ public function getLastDeploymentSuccessful(): bool { return $this->lastDeploymentSuccessful; } - /** - * The reason for failure of the last deployment - */ + /** + * The reason for failure of the last deployment + */ public function getLastDeploymentFailureReason(): ?string { return $this->lastDeploymentFailureReason; } - /** - * The commands executed during the last deployment - * @return LastDeploymentCommandsInner[] - */ + /** + * The commands executed during the last deployment + * @return LastDeploymentCommandsInner[] + */ public function getLastDeploymentCommands(): array { return $this->lastDeploymentCommands; } - /** - * Datetime of the last deployment - */ - public function getLastDeploymentAt(): ?\DateTime + /** + * Datetime of the last deployment + */ + public function getLastDeploymentAt(): ?DateTime { return $this->lastDeploymentAt; } - /** - * Datetime of the last autoscale up deployment - */ - public function getLastAutoscaleUpAt(): ?\DateTime + /** + * Datetime of the last autoscale up deployment + */ + public function getLastAutoscaleUpAt(): ?DateTime { return $this->lastAutoscaleUpAt; } - /** - * Datetime of the last autoscale down deployment - */ - public function getLastAutoscaleDownAt(): ?\DateTime + /** + * Datetime of the last autoscale down deployment + */ + public function getLastAutoscaleDownAt(): ?DateTime { return $this->lastAutoscaleDownAt; } - /** - * Datetime of the last maintenance - */ - public function getLastMaintenanceAt(): ?\DateTime + /** + * Datetime of the last maintenance + */ + public function getLastMaintenanceAt(): ?DateTime { return $this->lastMaintenanceAt; } - /** - * The crons deployment state - */ + /** + * The crons deployment state + */ public function getCrons(): CronsDeploymentState { return $this->crons; } } - diff --git a/src/Model/DeploymentTarget.php b/src/Model/DeploymentTarget.php index b9dfbdf84..91ac3cc14 100644 --- a/src/Model/DeploymentTarget.php +++ b/src/Model/DeploymentTarget.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level DeploymentTarget (auto-generated) * @@ -23,4 +21,3 @@ public function getType(): mixed; public function getName(): mixed; } - diff --git a/src/Model/DeploymentTargetCreateInput.php b/src/Model/DeploymentTargetCreateInput.php index 9bb9a2f53..4678a5ca3 100644 --- a/src/Model/DeploymentTargetCreateInput.php +++ b/src/Model/DeploymentTargetCreateInput.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level DeploymentTargetCreateInput (auto-generated) * @@ -23,4 +21,3 @@ public function getType(): mixed; public function getName(): mixed; } - diff --git a/src/Model/DeploymentTargetPatch.php b/src/Model/DeploymentTargetPatch.php index 0f2621b98..6865c5d46 100644 --- a/src/Model/DeploymentTargetPatch.php +++ b/src/Model/DeploymentTargetPatch.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level DeploymentTargetPatch (auto-generated) * @@ -23,4 +21,3 @@ public function getType(): mixed; public function getName(): mixed; } - diff --git a/src/Model/DevelopmentResources.php b/src/Model/DevelopmentResources.php index 8ed992f34..286c490ee 100644 --- a/src/Model/DevelopmentResources.php +++ b/src/Model/DevelopmentResources.php @@ -14,8 +14,6 @@ */ final class DevelopmentResources implements Model, JsonSerializable { - - public function __construct( private readonly bool $legacyDevelopment, private readonly ?float $maxCpu, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enable legacy development sizing for this environment type - */ + /** + * Enable legacy development sizing for this environment type + */ public function getLegacyDevelopment(): bool { return $this->legacyDevelopment; } - /** - * Maximum number of allocated CPU units - */ + /** + * Maximum number of allocated CPU units + */ public function getMaxCpu(): ?float { return $this->maxCpu; } - /** - * Maximum amount of allocated RAM - */ + /** + * Maximum amount of allocated RAM + */ public function getMaxMemory(): ?int { return $this->maxMemory; } - /** - * Maximum number of environments - */ + /** + * Maximum number of environments + */ public function getMaxEnvironments(): ?int { return $this->maxEnvironments; } } - diff --git a/src/Model/Diff.php b/src/Model/Diff.php index 82795bd98..fa844e7df 100644 --- a/src/Model/Diff.php +++ b/src/Model/Diff.php @@ -13,8 +13,6 @@ */ final class Diff implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $diff, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -48,41 +45,41 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Diff - */ + /** + * The identifier of Diff + */ public function getId(): string { return $this->id; } - /** - * The unified diff between two trees - */ + /** + * The unified diff between two trees + */ public function getDiff(): string { return $this->diff; } - /** - * The new path of the file in the diff - */ + /** + * The new path of the file in the diff + */ public function getNewPath(): ?string { return $this->newPath; } - /** - * The new object ID of the file in the diff - */ + /** + * The new object ID of the file in the diff + */ public function getNewId(): ?string { return $this->newId; } - /** - * The old path of the file in the diff - */ + /** + * The old path of the file in the diff + */ public function getOldPath(): ?string { return $this->oldPath; @@ -93,4 +90,3 @@ public function getOldId(): array return $this->oldId; } } - diff --git a/src/Model/Discount.php b/src/Model/Discount.php index 4ad9ec839..a70c6f7e3 100644 --- a/src/Model/Discount.php +++ b/src/Model/Discount.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class Discount implements Model, JsonSerializable { - public const TYPE_ALLOWANCE = 'allowance'; public const TYPE_STARTUP = 'startup'; public const TYPE_ENTERPRISE = 'enterprise'; @@ -26,7 +26,7 @@ final class Discount implements Model, JsonSerializable public function __construct( private readonly ?DiscountCommitment $commitment = null, private readonly ?int $totalMonths = null, - private readonly ?\DateTime $endAt = null, + private readonly ?DateTime $endAt = null, private readonly ?int $id = null, private readonly ?string $organizationId = null, private readonly ?string $type = null, @@ -34,11 +34,10 @@ public function __construct( private readonly ?string $status = null, private readonly ?DiscountDiscount $discount = null, private readonly ?object $config = null, - private readonly ?\DateTime $startAt = null, + private readonly ?DateTime $startAt = null, ) { } - public function getModelName(): string { return self::class; @@ -66,92 +65,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization discount. - */ + /** + * The ID of the organization discount. + */ public function getId(): ?int { return $this->id; } - /** - * The ULID of the organization the discount applies to. - */ + /** + * The ULID of the organization the discount applies to. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The machine name of the discount type. - */ + /** + * The machine name of the discount type. + */ public function getType(): ?string { return $this->type; } - /** - * The label of the discount type. - */ + /** + * The label of the discount type. + */ public function getTypeLabel(): ?string { return $this->typeLabel; } - /** - * The status of the discount. - */ + /** + * The status of the discount. + */ public function getStatus(): ?string { return $this->status; } - /** - * The minimum commitment associated with the discount (if applicable). - */ + /** + * The minimum commitment associated with the discount (if applicable). + */ public function getCommitment(): ?DiscountCommitment { return $this->commitment; } - /** - * The contract length in months (if applicable). - */ + /** + * The contract length in months (if applicable). + */ public function getTotalMonths(): ?int { return $this->totalMonths; } - /** - * Discount value per relevant time periods. - */ + /** + * Discount value per relevant time periods. + */ public function getDiscount(): ?DiscountDiscount { return $this->discount; } - /** - * The discount type specific configuration. - */ + /** + * The discount type specific configuration. + */ public function getConfig(): ?object { return $this->config; } - /** - * The start time of the discount period. - */ - public function getStartAt(): ?\DateTime + /** + * The start time of the discount period. + */ + public function getStartAt(): ?DateTime { return $this->startAt; } - /** - * The end time of the discount period (if applicable). - */ - public function getEndAt(): ?\DateTime + /** + * The end time of the discount period (if applicable). + */ + public function getEndAt(): ?DateTime { return $this->endAt; } } - diff --git a/src/Model/DiscountCommitment.php b/src/Model/DiscountCommitment.php index 57e387816..9240e6b76 100644 --- a/src/Model/DiscountCommitment.php +++ b/src/Model/DiscountCommitment.php @@ -14,8 +14,6 @@ */ final class DiscountCommitment implements Model, JsonSerializable { - - public function __construct( private readonly ?int $months = null, private readonly ?DiscountCommitmentAmount $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Commitment period length in months. - */ + /** + * Commitment period length in months. + */ public function getMonths(): ?int { return $this->months; } - /** - * Commitment amounts. - */ + /** + * Commitment amounts. + */ public function getAmount(): ?DiscountCommitmentAmount { return $this->amount; } - /** - * Net commitment amounts (discount deducted). - */ + /** + * Net commitment amounts (discount deducted). + */ public function getNet(): ?DiscountCommitmentNet { return $this->net; } } - diff --git a/src/Model/DiscountCommitmentAmount.php b/src/Model/DiscountCommitmentAmount.php index 609b28b51..ad299c40f 100644 --- a/src/Model/DiscountCommitmentAmount.php +++ b/src/Model/DiscountCommitmentAmount.php @@ -14,8 +14,6 @@ */ final class DiscountCommitmentAmount implements Model, JsonSerializable { - - public function __construct( private readonly ?CurrencyAmount $monthly = null, private readonly ?CurrencyAmount $commitmentPeriod = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getMonthly(): ?CurrencyAmount { return $this->monthly; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getCommitmentPeriod(): ?CurrencyAmount { return $this->commitmentPeriod; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getContractTotal(): ?CurrencyAmount { return $this->contractTotal; } } - diff --git a/src/Model/DiscountCommitmentNet.php b/src/Model/DiscountCommitmentNet.php index 65dfe4288..b839acc76 100644 --- a/src/Model/DiscountCommitmentNet.php +++ b/src/Model/DiscountCommitmentNet.php @@ -14,8 +14,6 @@ */ final class DiscountCommitmentNet implements Model, JsonSerializable { - - public function __construct( private readonly ?CurrencyAmount $monthly = null, private readonly ?CurrencyAmount $commitmentPeriod = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getMonthly(): ?CurrencyAmount { return $this->monthly; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getCommitmentPeriod(): ?CurrencyAmount { return $this->commitmentPeriod; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getContractTotal(): ?CurrencyAmount { return $this->contractTotal; } } - diff --git a/src/Model/DiscountDiscount.php b/src/Model/DiscountDiscount.php index 64b7d9b3a..fa97a2803 100644 --- a/src/Model/DiscountDiscount.php +++ b/src/Model/DiscountDiscount.php @@ -14,8 +14,6 @@ */ final class DiscountDiscount implements Model, JsonSerializable { - - public function __construct( private readonly ?CurrencyAmountNullable $commitmentPeriod = null, private readonly ?CurrencyAmountNullable $contractTotal = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getMonthly(): ?CurrencyAmount { return $this->monthly; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getCommitmentPeriod(): ?CurrencyAmountNullable { return $this->commitmentPeriod; } - /** - * Currency amount with detailed components. - */ + /** + * Currency amount with detailed components. + */ public function getContractTotal(): ?CurrencyAmountNullable { return $this->contractTotal; } } - diff --git a/src/Model/DiskResources.php b/src/Model/DiskResources.php index 033867bd1..c9be73924 100644 --- a/src/Model/DiskResources.php +++ b/src/Model/DiskResources.php @@ -13,8 +13,6 @@ */ final class DiskResources implements Model, JsonSerializable { - - public function __construct( private readonly ?int $temporary, private readonly ?int $instance, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getStorage(): ?int return $this->storage; } } - diff --git a/src/Model/DiskResources1.php b/src/Model/DiskResources1.php index 392d434eb..7e0161ad2 100644 --- a/src/Model/DiskResources1.php +++ b/src/Model/DiskResources1.php @@ -13,8 +13,6 @@ */ final class DiskResources1 implements Model, JsonSerializable { - - public function __construct( private readonly ?int $temporary, private readonly ?int $instance, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getObject(): ?int return $this->object; } } - diff --git a/src/Model/DiskResources2.php b/src/Model/DiskResources2.php index 2ef8d7afb..cba2442be 100644 --- a/src/Model/DiskResources2.php +++ b/src/Model/DiskResources2.php @@ -13,14 +13,11 @@ */ final class DiskResources2 implements Model, JsonSerializable { - - public function __construct( private readonly ?int $object, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getObject(): ?int return $this->object; } } - diff --git a/src/Model/DocrootsValue.php b/src/Model/DocrootsValue.php index 63a2b765c..86f2543a4 100644 --- a/src/Model/DocrootsValue.php +++ b/src/Model/DocrootsValue.php @@ -13,15 +13,12 @@ */ final class DocrootsValue implements Model, JsonSerializable { - - public function __construct( private readonly ?string $activeDocroot, private readonly ?array $docrootVersions, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getDocrootVersions(): ?array return $this->docrootVersions; } } - diff --git a/src/Model/Domain.php b/src/Model/Domain.php index 993d1f594..96fcc3e05 100644 --- a/src/Model/Domain.php +++ b/src/Model/Domain.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level Domain (auto-generated) * @@ -25,4 +23,3 @@ public function getName(): mixed; public function getAttributes(): mixed; } - diff --git a/src/Model/DomainClaim.php b/src/Model/DomainClaim.php index 9c1d22114..de04bf83d 100644 --- a/src/Model/DomainClaim.php +++ b/src/Model/DomainClaim.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,18 +14,15 @@ */ final class DomainClaim implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $name, private readonly string $count, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, ) { } - public function getModelName(): string { return self::class; @@ -46,44 +44,43 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of DomainClaim - */ + /** + * The identifier of DomainClaim + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The claimed domain name - */ + /** + * The claimed domain name + */ public function getName(): string { return $this->name; } - /** - * The domain name - */ + /** + * The domain name + */ public function getCount(): string { return $this->count; } } - diff --git a/src/Model/DomainCreateInput.php b/src/Model/DomainCreateInput.php index 8c52b92f8..6a90a5510 100644 --- a/src/Model/DomainCreateInput.php +++ b/src/Model/DomainCreateInput.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level DomainCreateInput (auto-generated) * @@ -21,4 +19,3 @@ public function __toString(): string; public function getName(): mixed; } - diff --git a/src/Model/DomainPatch.php b/src/Model/DomainPatch.php index c4611569c..6b01b86c5 100644 --- a/src/Model/DomainPatch.php +++ b/src/Model/DomainPatch.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level DomainPatch (auto-generated) * @@ -19,4 +17,3 @@ public function jsonSerialize(): array; public function __toString(): string; } - diff --git a/src/Model/EmailIntegration.php b/src/Model/EmailIntegration.php index 91b77919b..160b17774 100644 --- a/src/Model/EmailIntegration.php +++ b/src/Model/EmailIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level EmailIntegration (auto-generated) @@ -14,20 +14,17 @@ */ final class EmailIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, private readonly array $recipients, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $fromAddress, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -51,41 +48,41 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The email address to use - */ + /** + * The email address to use + */ public function getFromAddress(): ?string { return $this->fromAddress; @@ -96,12 +93,11 @@ public function getRecipients(): array return $this->recipients; } - /** - * The identifier of EmailIntegration - */ + /** + * The identifier of EmailIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/EmailIntegrationCreateInput.php b/src/Model/EmailIntegrationCreateInput.php index 70c9006e9..a0b77ec4e 100644 --- a/src/Model/EmailIntegrationCreateInput.php +++ b/src/Model/EmailIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level EmailIntegrationCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class EmailIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly array $recipients, @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,9 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -56,12 +52,11 @@ public function getRecipients(): array return $this->recipients; } - /** - * The email address to use - */ + /** + * The email address to use + */ public function getFromAddress(): ?string { return $this->fromAddress; } } - diff --git a/src/Model/EmailIntegrationPatch.php b/src/Model/EmailIntegrationPatch.php index 503699775..335dd3372 100644 --- a/src/Model/EmailIntegrationPatch.php +++ b/src/Model/EmailIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level EmailIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class EmailIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly array $recipients, @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,9 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -56,12 +52,11 @@ public function getRecipients(): array return $this->recipients; } - /** - * The email address to use - */ + /** + * The email address to use + */ public function getFromAddress(): ?string { return $this->fromAddress; } } - diff --git a/src/Model/EnterpriseDeploymentTarget.php b/src/Model/EnterpriseDeploymentTarget.php index 42c631355..ad573d7a3 100644 --- a/src/Model/EnterpriseDeploymentTarget.php +++ b/src/Model/EnterpriseDeploymentTarget.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTarget; /** * Low level EnterpriseDeploymentTarget (auto-generated) @@ -14,7 +13,6 @@ */ final class EnterpriseDeploymentTarget implements Model, JsonSerializable, DeploymentTarget { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -33,7 +31,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,42 +56,42 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The host to deploy to - */ + /** + * The host to deploy to + */ public function getDeployHost(): ?string { return $this->deployHost; } - /** - * Mapping of clusters to Enterprise applications - * @return DocrootsValue[] - */ + /** + * Mapping of clusters to Enterprise applications + * @return DocrootsValue[] + */ public function getDocroots(): array { return $this->docroots; } - /** - * List of URLs of the site - */ + /** + * List of URLs of the site + */ public function getSiteUrls(): object { return $this->siteUrls; @@ -105,28 +102,27 @@ public function getSshHosts(): array return $this->sshHosts; } - /** - * Whether to perform deployments or not - */ + /** + * Whether to perform deployments or not + */ public function getMaintenanceMode(): bool { return $this->maintenanceMode; } - /** - * The identifier of EnterpriseDeploymentTarget - */ + /** + * The identifier of EnterpriseDeploymentTarget + */ public function getId(): ?string { return $this->id; } - /** - * Mapping of clusters to Enterprise applications - */ + /** + * Mapping of clusters to Enterprise applications + */ public function getEnterpriseEnvironmentsMapping(): ?object { return $this->enterpriseEnvironmentsMapping; } } - diff --git a/src/Model/EnterpriseDeploymentTargetCreateInput.php b/src/Model/EnterpriseDeploymentTargetCreateInput.php index 8ffe1ee7a..1a321b4c4 100644 --- a/src/Model/EnterpriseDeploymentTargetCreateInput.php +++ b/src/Model/EnterpriseDeploymentTargetCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetCreateInput; /** * Low level EnterpriseDeploymentTargetCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class EnterpriseDeploymentTargetCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,25 +48,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * List of URLs of the site - */ + /** + * List of URLs of the site + */ public function getSiteUrls(): ?object { return $this->siteUrls; @@ -80,12 +77,11 @@ public function getSshHosts(): ?array return $this->sshHosts; } - /** - * Mapping of clusters to Enterprise applications - */ + /** + * Mapping of clusters to Enterprise applications + */ public function getEnterpriseEnvironmentsMapping(): ?object { return $this->enterpriseEnvironmentsMapping; } } - diff --git a/src/Model/EnterpriseDeploymentTargetPatch.php b/src/Model/EnterpriseDeploymentTargetPatch.php index 432c34d07..c16d823e8 100644 --- a/src/Model/EnterpriseDeploymentTargetPatch.php +++ b/src/Model/EnterpriseDeploymentTargetPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetPatch; /** * Low level EnterpriseDeploymentTargetPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class EnterpriseDeploymentTargetPatch implements Model, JsonSerializable, DeploymentTargetPatch { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,25 +48,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * List of URLs of the site - */ + /** + * List of URLs of the site + */ public function getSiteUrls(): ?object { return $this->siteUrls; @@ -80,12 +77,11 @@ public function getSshHosts(): ?array return $this->sshHosts; } - /** - * Mapping of clusters to Enterprise applications - */ + /** + * Mapping of clusters to Enterprise applications + */ public function getEnterpriseEnvironmentsMapping(): ?object { return $this->enterpriseEnvironmentsMapping; } } - diff --git a/src/Model/Environment.php b/src/Model/Environment.php index 2ebb7183e..e4fd32d6f 100644 --- a/src/Model/Environment.php +++ b/src/Model/Environment.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class Environment implements Model, JsonSerializable { - public const TYPE_DEVELOPMENT = 'development'; public const TYPE_PRODUCTION = 'production'; public const TYPE_STAGING = 'staging'; @@ -50,21 +50,20 @@ public function __construct( private readonly MergeInfo $mergeInfo, private readonly bool $hasDeployment, private readonly bool $supportsRestrictRobots, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $parent, private readonly ?string $defaultDomain, private readonly ?string $deploymentTarget, private readonly ?DeploymentState $deploymentState, private readonly ?Sizing $sizing, private readonly ?int $maxInstanceCount, - private readonly ?\DateTime $lastActiveAt, - private readonly ?\DateTime $lastBackupAt, + private readonly ?DateTime $lastActiveAt, + private readonly ?DateTime $lastBackupAt, private readonly ?string $headCommit, ) { } - public function getModelName(): string { return self::class; @@ -118,49 +117,49 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Environment - */ + /** + * The identifier of Environment + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The name of the environment - */ + /** + * The name of the environment + */ public function getName(): string { return $this->name; } - /** - * The machine name for the environment - */ + /** + * The machine name for the environment + */ public function getMachineName(): string { return $this->machineName; } - /** - * The title of the environment - */ + /** + * The title of the environment + */ public function getTitle(): string { return $this->title; @@ -171,245 +170,244 @@ public function getAttributes(): array return $this->attributes; } - /** - * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated - */ + /** + * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated + */ public function getType(): string { return $this->type; } - /** - * The name of the parent environment - */ + /** + * The name of the parent environment + */ public function getParent(): ?string { return $this->parent; } - /** - * The default domain - */ + /** + * The default domain + */ public function getDefaultDomain(): ?string { return $this->defaultDomain; } - /** - * Whether the environment has domains - */ + /** + * Whether the environment has domains + */ public function getHasDomains(): bool { return $this->hasDomains; } - /** - * Clone data when creating that environment - */ + /** + * Clone data when creating that environment + */ public function getCloneParentOnCreate(): bool { return $this->cloneParentOnCreate; } - /** - * Deployment target of the environment - */ + /** + * Deployment target of the environment + */ public function getDeploymentTarget(): ?string { return $this->deploymentTarget; } - /** - * Is this environment a pull request / merge request - */ + /** + * Is this environment a pull request / merge request + */ public function getIsPr(): bool { return $this->isPr; } - /** - * Does this environment have a remote repository - */ + /** + * Does this environment have a remote repository + */ public function getHasRemote(): bool { return $this->hasRemote; } - /** - * The status of the environment - */ + /** + * The status of the environment + */ public function getStatus(): string { return $this->status; } - /** - * The Http access permissions for this environment - */ + /** + * The Http access permissions for this environment + */ public function getHttpAccess(): HttpAccessPermissions1 { return $this->httpAccess; } - /** - * Whether to configure SMTP for this environment - */ + /** + * Whether to configure SMTP for this environment + */ public function getEnableSmtp(): bool { return $this->enableSmtp; } - /** - * Whether to restrict robots for this environment - */ + /** + * Whether to restrict robots for this environment + */ public function getRestrictRobots(): bool { return $this->restrictRobots; } - /** - * The hostname to use as the CNAME - */ + /** + * The hostname to use as the CNAME + */ public function getEdgeHostname(): string { return $this->edgeHostname; } - /** - * The environment deployment state - */ + /** + * The environment deployment state + */ public function getDeploymentState(): ?DeploymentState { return $this->deploymentState; } - /** - * The environment sizing configuration - */ + /** + * The environment sizing configuration + */ public function getSizing(): ?Sizing { return $this->sizing; } - /** - * Resources overrides - * @return ResourcesOverridesValue[] - */ + /** + * Resources overrides + * @return ResourcesOverridesValue[] + */ public function getResourcesOverrides(): array { return $this->resourcesOverrides; } - /** - * Max number of instances for this environment - */ + /** + * Max number of instances for this environment + */ public function getMaxInstanceCount(): ?int { return $this->maxInstanceCount; } - /** - * Last activity date - */ - public function getLastActiveAt(): ?\DateTime + /** + * Last activity date + */ + public function getLastActiveAt(): ?DateTime { return $this->lastActiveAt; } - /** - * Last backup date - */ - public function getLastBackupAt(): ?\DateTime + /** + * Last backup date + */ + public function getLastBackupAt(): ?DateTime { return $this->lastBackupAt; } - /** - * The project the environment belongs to - */ + /** + * The project the environment belongs to + */ public function getProject(): string { return $this->project; } - /** - * Is this environment the main environment - */ + /** + * Is this environment the main environment + */ public function getIsMain(): bool { return $this->isMain; } - /** - * Is there any pending activity on this environment - */ + /** + * Is there any pending activity on this environment + */ public function getIsDirty(): bool { return $this->isDirty; } - /** - * Is there any staged activity on this environment - */ + /** + * Is there any staged activity on this environment + */ public function getHasStagedActivities(): bool { return $this->hasStagedActivities; } - /** - * If the environment has rolling deployments ready for use - */ + /** + * If the environment has rolling deployments ready for use + */ public function getCanRollingDeploy(): bool { return $this->canRollingDeploy; } - /** - * If the environment supports rolling deployments - */ + /** + * If the environment supports rolling deployments + */ public function getSupportsRollingDeployments(): bool { return $this->supportsRollingDeployments; } - /** - * Does this environment have code - */ + /** + * Does this environment have code + */ public function getHasCode(): bool { return $this->hasCode; } - /** - * The SHA of the head commit for this environment - */ + /** + * The SHA of the head commit for this environment + */ public function getHeadCommit(): ?string { return $this->headCommit; } - /** - * The commit distance info between parent and child environments - */ + /** + * The commit distance info between parent and child environments + */ public function getMergeInfo(): MergeInfo { return $this->mergeInfo; } - /** - * Whether this environment had a successful deployment - */ + /** + * Whether this environment had a successful deployment + */ public function getHasDeployment(): bool { return $this->hasDeployment; } - /** - * Does this environment support configuring restrict_robots - */ + /** + * Does this environment support configuring restrict_robots + */ public function getSupportsRestrictRobots(): bool { return $this->supportsRestrictRobots; } } - diff --git a/src/Model/EnvironmentActivateInput.php b/src/Model/EnvironmentActivateInput.php index 875dd4097..e28b3994b 100644 --- a/src/Model/EnvironmentActivateInput.php +++ b/src/Model/EnvironmentActivateInput.php @@ -13,14 +13,11 @@ */ final class EnvironmentActivateInput implements Model, JsonSerializable { - - public function __construct( private readonly ?Resources4 $resources = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getResources(): ?Resources4 return $this->resources; } } - diff --git a/src/Model/EnvironmentBackupInput.php b/src/Model/EnvironmentBackupInput.php index 3f265b443..34d8a00d4 100644 --- a/src/Model/EnvironmentBackupInput.php +++ b/src/Model/EnvironmentBackupInput.php @@ -13,14 +13,11 @@ */ final class EnvironmentBackupInput implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $safe = null, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Take a safe or a live backup - */ + /** + * Take a safe or a live backup + */ public function getSafe(): ?bool { return $this->safe; } } - diff --git a/src/Model/EnvironmentBranchInput.php b/src/Model/EnvironmentBranchInput.php index fad8af765..657dfa0cc 100644 --- a/src/Model/EnvironmentBranchInput.php +++ b/src/Model/EnvironmentBranchInput.php @@ -13,7 +13,6 @@ */ final class EnvironmentBranchInput implements Model, JsonSerializable { - public const TYPE_DEVELOPMENT = 'development'; public const TYPE_STAGING = 'staging'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -58,17 +56,17 @@ public function getName(): string return $this->name; } - /** - * Clone data from the parent environment - */ + /** + * Clone data from the parent environment + */ public function getCloneParent(): ?bool { return $this->cloneParent; } - /** - * The type of environment (`staging` or `development`) - */ + /** + * The type of environment (`staging` or `development`) + */ public function getType(): ?string { return $this->type; @@ -79,4 +77,3 @@ public function getResources(): ?Resources5 return $this->resources; } } - diff --git a/src/Model/EnvironmentDeployInput.php b/src/Model/EnvironmentDeployInput.php index 6beddedcb..29ccc5c13 100644 --- a/src/Model/EnvironmentDeployInput.php +++ b/src/Model/EnvironmentDeployInput.php @@ -13,7 +13,6 @@ */ final class EnvironmentDeployInput implements Model, JsonSerializable { - public const STRATEGY_ROLLING = 'rolling'; public const STRATEGY_STOPSTART = 'stopstart'; @@ -22,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -40,12 +38,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The deployment strategy (`rolling` or `stopstart`) - */ + /** + * The deployment strategy (`rolling` or `stopstart`) + */ public function getStrategy(): ?string { return $this->strategy; } } - diff --git a/src/Model/EnvironmentInfo.php b/src/Model/EnvironmentInfo.php index 9af354c73..70a7821af 100644 --- a/src/Model/EnvironmentInfo.php +++ b/src/Model/EnvironmentInfo.php @@ -14,8 +14,6 @@ */ final class EnvironmentInfo implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly string $status, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -55,65 +52,65 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The machine name of the environment - */ + /** + * The machine name of the environment + */ public function getName(): string { return $this->name; } - /** - * The enviroment status - */ + /** + * The enviroment status + */ public function getStatus(): string { return $this->status; } - /** - * Is this environment the main environment - */ + /** + * Is this environment the main environment + */ public function getIsMain(): bool { return $this->isMain; } - /** - * Is this environment a production environment - */ + /** + * Is this environment a production environment + */ public function getIsProduction(): bool { return $this->isProduction; } - /** - * Constraints of the environment's deployment - */ + /** + * Constraints of the environment's deployment + */ public function getConstraints(): object { return $this->constraints; } - /** - * The reference in Git for this environment - */ + /** + * The reference in Git for this environment + */ public function getReference(): string { return $this->reference; } - /** - * The machine name of the environment - */ + /** + * The machine name of the environment + */ public function getMachineName(): string { return $this->machineName; } - /** - * The type of environment (Production, Staging or Development) - */ + /** + * The type of environment (Production, Staging or Development) + */ public function getEnvironmentType(): string { return $this->environmentType; @@ -124,4 +121,3 @@ public function getLinks(): object return $this->links; } } - diff --git a/src/Model/EnvironmentInitializeInput.php b/src/Model/EnvironmentInitializeInput.php index 54fe1cb51..ab56721c7 100644 --- a/src/Model/EnvironmentInitializeInput.php +++ b/src/Model/EnvironmentInitializeInput.php @@ -13,8 +13,6 @@ */ final class EnvironmentInitializeInput implements Model, JsonSerializable { - - public function __construct( private readonly string $profile, private readonly string $repository, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -46,34 +43,34 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the profile to show in the UI - */ + /** + * Name of the profile to show in the UI + */ public function getProfile(): string { return $this->profile; } - /** - * Repository to clone from - */ + /** + * Repository to clone from + */ public function getRepository(): string { return $this->repository; } - /** - * Repository to clone the configuration files from - */ + /** + * Repository to clone the configuration files from + */ public function getConfig(): ?string { return $this->config; } - /** - * A list of files to add to the repository during initialization - * @return FilesInner[]|null - */ + /** + * A list of files to add to the repository during initialization + * @return FilesInner[]|null + */ public function getFiles(): ?array { return $this->files; @@ -84,4 +81,3 @@ public function getResources(): ?Resources6 return $this->resources; } } - diff --git a/src/Model/EnvironmentMergeInput.php b/src/Model/EnvironmentMergeInput.php index e28e196d0..e08e76815 100644 --- a/src/Model/EnvironmentMergeInput.php +++ b/src/Model/EnvironmentMergeInput.php @@ -13,14 +13,11 @@ */ final class EnvironmentMergeInput implements Model, JsonSerializable { - - public function __construct( private readonly ?Resources7 $resources = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getResources(): ?Resources7 return $this->resources; } } - diff --git a/src/Model/EnvironmentOperationInput.php b/src/Model/EnvironmentOperationInput.php index 3e0aefa00..2e857696b 100644 --- a/src/Model/EnvironmentOperationInput.php +++ b/src/Model/EnvironmentOperationInput.php @@ -13,8 +13,6 @@ */ final class EnvironmentOperationInput implements Model, JsonSerializable { - - public function __construct( private readonly string $service, private readonly string $operation, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,17 +39,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the application or worker to run the operation on - */ + /** + * The name of the application or worker to run the operation on + */ public function getService(): string { return $this->service; } - /** - * The name of the operation - */ + /** + * The name of the operation + */ public function getOperation(): string { return $this->operation; @@ -63,4 +60,3 @@ public function getParameters(): ?array return $this->parameters; } } - diff --git a/src/Model/EnvironmentPatch.php b/src/Model/EnvironmentPatch.php index de54ba0ca..248904180 100644 --- a/src/Model/EnvironmentPatch.php +++ b/src/Model/EnvironmentPatch.php @@ -13,7 +13,6 @@ */ final class EnvironmentPatch implements Model, JsonSerializable { - public const TYPE_DEVELOPMENT = 'development'; public const TYPE_PRODUCTION = 'production'; public const TYPE_STAGING = 'staging'; @@ -31,7 +30,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,17 +55,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the environment - */ + /** + * The name of the environment + */ public function getName(): ?string { return $this->name; } - /** - * The title of the environment - */ + /** + * The title of the environment + */ public function getTitle(): ?string { return $this->title; @@ -78,52 +76,51 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated - */ + /** + * The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated + */ public function getType(): ?string { return $this->type; } - /** - * The name of the parent environment - */ + /** + * The name of the parent environment + */ public function getParent(): ?string { return $this->parent; } - /** - * Clone data when creating that environment - */ + /** + * Clone data when creating that environment + */ public function getCloneParentOnCreate(): ?bool { return $this->cloneParentOnCreate; } - /** - * The Http access permissions for this environment - */ + /** + * The Http access permissions for this environment + */ public function getHttpAccess(): ?HttpAccessPermissions2 { return $this->httpAccess; } - /** - * Whether to configure SMTP for this environment - */ + /** + * Whether to configure SMTP for this environment + */ public function getEnableSmtp(): ?bool { return $this->enableSmtp; } - /** - * Whether to restrict robots for this environment - */ + /** + * Whether to restrict robots for this environment + */ public function getRestrictRobots(): ?bool { return $this->restrictRobots; } } - diff --git a/src/Model/EnvironmentRestoreInput.php b/src/Model/EnvironmentRestoreInput.php index a7ebef9b3..53f7c55ae 100644 --- a/src/Model/EnvironmentRestoreInput.php +++ b/src/Model/EnvironmentRestoreInput.php @@ -13,8 +13,6 @@ */ final class EnvironmentRestoreInput implements Model, JsonSerializable { - - public function __construct( private readonly ?string $environmentName = null, private readonly ?string $branchFrom = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,17 +53,17 @@ public function getBranchFrom(): ?string return $this->branchFrom; } - /** - * Whether we should restore the code or only the data - */ + /** + * Whether we should restore the code or only the data + */ public function getRestoreCode(): ?bool { return $this->restoreCode; } - /** - * Whether we should restore resources configuration from the backup - */ + /** + * Whether we should restore resources configuration from the backup + */ public function getRestoreResources(): ?bool { return $this->restoreResources; @@ -77,4 +74,3 @@ public function getResources(): ?Resources8 return $this->resources; } } - diff --git a/src/Model/EnvironmentSourceOperation.php b/src/Model/EnvironmentSourceOperation.php index 064a6a91e..9b6865afc 100644 --- a/src/Model/EnvironmentSourceOperation.php +++ b/src/Model/EnvironmentSourceOperation.php @@ -13,8 +13,6 @@ */ final class EnvironmentSourceOperation implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $app, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,36 +41,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of EnvironmentSourceOperation - */ + /** + * The identifier of EnvironmentSourceOperation + */ public function getId(): string { return $this->id; } - /** - * The name of the application - */ + /** + * The name of the application + */ public function getApp(): string { return $this->app; } - /** - * The name of the source operation - */ + /** + * The name of the source operation + */ public function getOperation(): string { return $this->operation; } - /** - * The command that will be triggered - */ + /** + * The command that will be triggered + */ public function getCommand(): string { return $this->command; } } - diff --git a/src/Model/EnvironmentSourceOperationInput.php b/src/Model/EnvironmentSourceOperationInput.php index 01a49cb0d..8a6030585 100644 --- a/src/Model/EnvironmentSourceOperationInput.php +++ b/src/Model/EnvironmentSourceOperationInput.php @@ -13,15 +13,12 @@ */ final class EnvironmentSourceOperationInput implements Model, JsonSerializable { - - public function __construct( private readonly string $operation, private readonly ?array $variables = [], ) { } - public function getModelName(): string { return self::class; @@ -40,9 +37,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The name of the operation to execute - */ + /** + * The name of the operation to execute + */ public function getOperation(): string { return $this->operation; @@ -53,4 +50,3 @@ public function getVariables(): ?array return $this->variables; } } - diff --git a/src/Model/EnvironmentSynchronizeInput.php b/src/Model/EnvironmentSynchronizeInput.php index a4562b8ff..f1f98c2ec 100644 --- a/src/Model/EnvironmentSynchronizeInput.php +++ b/src/Model/EnvironmentSynchronizeInput.php @@ -13,8 +13,6 @@ */ final class EnvironmentSynchronizeInput implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $synchronizeCode = null, private readonly ?bool $rebase = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,36 +41,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Synchronize code? - */ + /** + * Synchronize code? + */ public function getSynchronizeCode(): ?bool { return $this->synchronizeCode; } - /** - * Synchronize code by rebasing instead of merging - */ + /** + * Synchronize code by rebasing instead of merging + */ public function getRebase(): ?bool { return $this->rebase; } - /** - * Synchronize data? - */ + /** + * Synchronize data? + */ public function getSynchronizeData(): ?bool { return $this->synchronizeData; } - /** - * Synchronize resources? - */ + /** + * Synchronize resources? + */ public function getSynchronizeResources(): ?bool { return $this->synchronizeResources; } } - diff --git a/src/Model/EnvironmentType.php b/src/Model/EnvironmentType.php index 2dccd5fbc..7251a81bd 100644 --- a/src/Model/EnvironmentType.php +++ b/src/Model/EnvironmentType.php @@ -13,15 +13,12 @@ */ final class EnvironmentType implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly array $attributes, ) { } - public function getModelName(): string { return self::class; @@ -40,9 +37,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of EnvironmentType - */ + /** + * The identifier of EnvironmentType + */ public function getId(): string { return $this->id; @@ -53,4 +50,3 @@ public function getAttributes(): array return $this->attributes; } } - diff --git a/src/Model/EnvironmentVariable.php b/src/Model/EnvironmentVariable.php index 4b02bb489..9a70ebff2 100644 --- a/src/Model/EnvironmentVariable.php +++ b/src/Model/EnvironmentVariable.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class EnvironmentVariable implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $name, @@ -29,13 +28,12 @@ public function __construct( private readonly bool $inherited, private readonly bool $isEnabled, private readonly bool $isInheritable, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $value = null, ) { } - public function getModelName(): string { return self::class; @@ -68,33 +66,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of EnvironmentVariable - */ + /** + * The identifier of EnvironmentVariable + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; @@ -105,33 +103,33 @@ public function getAttributes(): array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): bool { return $this->visibleRuntime; @@ -142,52 +140,51 @@ public function getApplicationScope(): array return $this->applicationScope; } - /** - * The name of the project - */ + /** + * The name of the project + */ public function getProject(): string { return $this->project; } - /** - * The name of the environment - */ + /** + * The name of the environment + */ public function getEnvironment(): string { return $this->environment; } - /** - * The variable is inherited from a parent environment - */ + /** + * The variable is inherited from a parent environment + */ public function getInherited(): bool { return $this->inherited; } - /** - * The variable is enabled on this environment - */ + /** + * The variable is enabled on this environment + */ public function getIsEnabled(): bool { return $this->isEnabled; } - /** - * The variable is inheritable to child environments - */ + /** + * The variable is inheritable to child environments + */ public function getIsInheritable(): bool { return $this->isInheritable; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } } - diff --git a/src/Model/EnvironmentVariableCreateInput.php b/src/Model/EnvironmentVariableCreateInput.php index 412af52fd..4d4c712eb 100644 --- a/src/Model/EnvironmentVariableCreateInput.php +++ b/src/Model/EnvironmentVariableCreateInput.php @@ -13,8 +13,6 @@ */ final class EnvironmentVariableCreateInput implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly string $value, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,17 +53,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): string { return $this->value; @@ -77,33 +74,33 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -114,20 +111,19 @@ public function getApplicationScope(): ?array return $this->applicationScope; } - /** - * The variable is enabled on this environment - */ + /** + * The variable is enabled on this environment + */ public function getIsEnabled(): ?bool { return $this->isEnabled; } - /** - * The variable is inheritable to child environments - */ + /** + * The variable is inheritable to child environments + */ public function getIsInheritable(): ?bool { return $this->isInheritable; } } - diff --git a/src/Model/EnvironmentVariablePatch.php b/src/Model/EnvironmentVariablePatch.php index 8e9f4fe85..9e2a3a4f4 100644 --- a/src/Model/EnvironmentVariablePatch.php +++ b/src/Model/EnvironmentVariablePatch.php @@ -13,8 +13,6 @@ */ final class EnvironmentVariablePatch implements Model, JsonSerializable { - - public function __construct( private readonly ?string $name = null, private readonly ?array $attributes = [], @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,9 +53,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): ?string { return $this->name; @@ -69,41 +66,41 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -114,20 +111,19 @@ public function getApplicationScope(): ?array return $this->applicationScope; } - /** - * The variable is enabled on this environment - */ + /** + * The variable is enabled on this environment + */ public function getIsEnabled(): ?bool { return $this->isEnabled; } - /** - * The variable is inheritable to child environments - */ + /** + * The variable is inheritable to child environments + */ public function getIsInheritable(): ?bool { return $this->isInheritable; } } - diff --git a/src/Model/EnvironmentVariablesInner.php b/src/Model/EnvironmentVariablesInner.php index eba218706..21a6e4d0b 100644 --- a/src/Model/EnvironmentVariablesInner.php +++ b/src/Model/EnvironmentVariablesInner.php @@ -13,8 +13,6 @@ */ final class EnvironmentVariablesInner implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly bool $isSensitive, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function getValue(): ?string return $this->value; } } - diff --git a/src/Model/EnvironmentsCredentialsValue.php b/src/Model/EnvironmentsCredentialsValue.php index 9440035be..72ebfc2be 100644 --- a/src/Model/EnvironmentsCredentialsValue.php +++ b/src/Model/EnvironmentsCredentialsValue.php @@ -13,15 +13,12 @@ */ final class EnvironmentsCredentialsValue implements Model, JsonSerializable { - - public function __construct( private readonly string $serverUuid, private readonly string $serverToken, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getServerToken(): string return $this->serverToken; } } - diff --git a/src/Model/Error.php b/src/Model/Error.php index c2f6e3eef..c606a71f7 100644 --- a/src/Model/Error.php +++ b/src/Model/Error.php @@ -13,14 +13,11 @@ */ final class Error implements Model, JsonSerializable { - - public function __construct( private readonly string $error, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Error message - */ + /** + * Error message + */ public function getError(): string { return $this->error; } } - diff --git a/src/Model/EstimationObject.php b/src/Model/EstimationObject.php index 27154953f..5bdf976cb 100644 --- a/src/Model/EstimationObject.php +++ b/src/Model/EstimationObject.php @@ -14,8 +14,6 @@ */ final class EstimationObject implements Model, JsonSerializable { - - public function __construct( private readonly ?string $plan = null, private readonly ?string $userLicenses = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,52 +46,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The monthly price of the plan. - */ + /** + * The monthly price of the plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * The monthly price of the user licenses. - */ + /** + * The monthly price of the user licenses. + */ public function getUserLicenses(): ?string { return $this->userLicenses; } - /** - * The monthly price of the environments. - */ + /** + * The monthly price of the environments. + */ public function getEnvironments(): ?string { return $this->environments; } - /** - * The monthly price of the storage. - */ + /** + * The monthly price of the storage. + */ public function getStorage(): ?string { return $this->storage; } - /** - * The total monthly price. - */ + /** + * The total monthly price. + */ public function getTotal(): ?string { return $this->total; } - /** - * The unit prices of the options. - */ + /** + * The unit prices of the options. + */ public function getOptions(): ?object { return $this->options; } } - diff --git a/src/Model/FastlyCDN.php b/src/Model/FastlyCDN.php index 7d3dc291e..41856ef7c 100644 --- a/src/Model/FastlyCDN.php +++ b/src/Model/FastlyCDN.php @@ -14,15 +14,12 @@ */ final class FastlyCDN implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/FastlyIntegration.php b/src/Model/FastlyIntegration.php index 7571966fe..dcfc0d60d 100644 --- a/src/Model/FastlyIntegration.php +++ b/src/Model/FastlyIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level FastlyIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class FastlyIntegration implements Model, JsonSerializable, Integration { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -29,13 +28,12 @@ public function __construct( private readonly string $result, private readonly string $serviceId, private readonly bool $tlsCertificates, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -64,33 +62,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -116,36 +114,35 @@ public function getStates(): array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): string { return $this->result; } - /** - * The Fastly Service ID - */ + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; } - /** - * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions - */ + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ public function getTlsCertificates(): bool { return $this->tlsCertificates; } - /** - * The identifier of FastlyIntegration - */ + /** + * The identifier of FastlyIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/FastlyIntegrationCreateInput.php b/src/Model/FastlyIntegrationCreateInput.php index dcb82f805..7af22c2b7 100644 --- a/src/Model/FastlyIntegrationCreateInput.php +++ b/src/Model/FastlyIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level FastlyIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class FastlyIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -32,7 +30,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -58,25 +55,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * Fastly API Token - */ + /** + * Fastly API Token + */ public function getToken(): string { return $this->token; } - /** - * The Fastly Service ID - */ + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; @@ -102,20 +99,19 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions - */ + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ public function getTlsCertificates(): ?bool { return $this->tlsCertificates; } } - diff --git a/src/Model/FastlyIntegrationPatch.php b/src/Model/FastlyIntegrationPatch.php index 7323dd6f9..5a86b8411 100644 --- a/src/Model/FastlyIntegrationPatch.php +++ b/src/Model/FastlyIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level FastlyIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class FastlyIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -32,7 +30,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -58,25 +55,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * Fastly API Token - */ + /** + * Fastly API Token + */ public function getToken(): string { return $this->token; } - /** - * The Fastly Service ID - */ + /** + * The Fastly Service ID + */ public function getServiceId(): string { return $this->serviceId; @@ -102,20 +99,19 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions - */ + /** + * Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions + */ public function getTlsCertificates(): ?bool { return $this->tlsCertificates; } } - diff --git a/src/Model/FilesInner.php b/src/Model/FilesInner.php index 539a76d0e..fda068555 100644 --- a/src/Model/FilesInner.php +++ b/src/Model/FilesInner.php @@ -13,8 +13,6 @@ */ final class FilesInner implements Model, JsonSerializable { - - public function __construct( private readonly string $path, private readonly ?int $mode = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getContents(): ?string return $this->contents; } } - diff --git a/src/Model/FilterSelect.php b/src/Model/FilterSelect.php index 76ca30fc9..6527a2303 100644 --- a/src/Model/FilterSelect.php +++ b/src/Model/FilterSelect.php @@ -13,15 +13,12 @@ */ final class FilterSelect implements Model, JsonSerializable { - - public function __construct( private readonly ?Mode $mode = null, private readonly ?FilterSelectValues $values = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getValues(): ?FilterSelectValues return $this->values; } } - diff --git a/src/Model/FilterSelectValues.php b/src/Model/FilterSelectValues.php index 02561c68f..5bf82fe26 100644 --- a/src/Model/FilterSelectValues.php +++ b/src/Model/FilterSelectValues.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level FilterSelectValues (auto-generated) * @@ -19,4 +17,3 @@ public function jsonSerialize(): array; public function __toString(): string; } - diff --git a/src/Model/Firewall.php b/src/Model/Firewall.php index 384368483..4aaa6cf19 100644 --- a/src/Model/Firewall.php +++ b/src/Model/Firewall.php @@ -13,14 +13,11 @@ */ final class Firewall implements Model, JsonSerializable { - - public function __construct( private readonly ?array $outbound, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return OutboundFirewallRestrictionsInner[]|null - */ + /** + * @return OutboundFirewallRestrictionsInner[]|null + */ public function getOutbound(): ?array { return $this->outbound; } } - diff --git a/src/Model/FoundationDeploymentTarget.php b/src/Model/FoundationDeploymentTarget.php index be657e387..f78678d78 100644 --- a/src/Model/FoundationDeploymentTarget.php +++ b/src/Model/FoundationDeploymentTarget.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTarget; /** * Low level FoundationDeploymentTarget (auto-generated) @@ -14,7 +13,6 @@ */ final class FoundationDeploymentTarget implements Model, JsonSerializable, DeploymentTarget { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,55 +50,54 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The hosts of the deployment target - * @return HostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return HostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. - * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as - * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. - */ + /** + * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. + * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as + * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. + */ public function getUseDedicatedGrid(): bool { return $this->useDedicatedGrid; } - /** - * The storage type - */ + /** + * The storage type + */ public function getStorageType(): ?string { return $this->storageType; } - /** - * The identifier of FoundationDeploymentTarget - */ + /** + * The identifier of FoundationDeploymentTarget + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/FoundationDeploymentTargetCreateInput.php b/src/Model/FoundationDeploymentTargetCreateInput.php index b079af73f..08826e7e1 100644 --- a/src/Model/FoundationDeploymentTargetCreateInput.php +++ b/src/Model/FoundationDeploymentTargetCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetCreateInput; /** * Low level FoundationDeploymentTargetCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class FoundationDeploymentTargetCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -28,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,39 +46,38 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The hosts of the deployment target - * @return DeploymentHostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return DeploymentHostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. - * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as - * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. - */ + /** + * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. + * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as + * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. + */ public function getUseDedicatedGrid(): ?bool { return $this->useDedicatedGrid; } } - diff --git a/src/Model/FoundationDeploymentTargetPatch.php b/src/Model/FoundationDeploymentTargetPatch.php index 429c599ae..aeb735215 100644 --- a/src/Model/FoundationDeploymentTargetPatch.php +++ b/src/Model/FoundationDeploymentTargetPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetPatch; /** * Low level FoundationDeploymentTargetPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class FoundationDeploymentTargetPatch implements Model, JsonSerializable, DeploymentTargetPatch { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -28,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,39 +46,38 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * The hosts of the deployment target - * @return DeploymentHostsInner[]|null - */ + /** + * The hosts of the deployment target + * @return DeploymentHostsInner[]|null + */ public function getHosts(): ?array { return $this->hosts; } - /** - * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. - * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as - * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. - */ + /** + * When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target. + * Dedicated Grid hosts must be created prior to deploying the environment. The constraints that will be set are as + * follows: * `cluster_type` is set to `environment-custom`. * `cluster` is set to the environment's cluster name. + */ public function getUseDedicatedGrid(): ?bool { return $this->useDedicatedGrid; } } - diff --git a/src/Model/GetAddress200Response.php b/src/Model/GetAddress200Response.php index fad924af0..b0bf5fb5c 100644 --- a/src/Model/GetAddress200Response.php +++ b/src/Model/GetAddress200Response.php @@ -13,8 +13,6 @@ */ final class GetAddress200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?string $country = null, private readonly ?string $nameLine = null, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -58,92 +55,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Two-letter country codes are used to represent countries and states - */ + /** + * Two-letter country codes are used to represent countries and states + */ public function getCountry(): ?string { return $this->country; } - /** - * The full name of the user - */ + /** + * The full name of the user + */ public function getNameLine(): ?string { return $this->nameLine; } - /** - * Premise (i.e. Apt, Suite, Bldg.) - */ + /** + * Premise (i.e. Apt, Suite, Bldg.) + */ public function getPremise(): ?string { return $this->premise; } - /** - * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. - */ + /** + * Sub Premise (i.e. Suite, Apartment, Floor, Unknown. + */ public function getSubPremise(): ?string { return $this->subPremise; } - /** - * The address of the user - */ + /** + * The address of the user + */ public function getThoroughfare(): ?string { return $this->thoroughfare; } - /** - * The administrative area of the user address - */ + /** + * The administrative area of the user address + */ public function getAdministrativeArea(): ?string { return $this->administrativeArea; } - /** - * The sub-administrative area of the user address - */ + /** + * The sub-administrative area of the user address + */ public function getSubAdministrativeArea(): ?string { return $this->subAdministrativeArea; } - /** - * The locality of the user address - */ + /** + * The locality of the user address + */ public function getLocality(): ?string { return $this->locality; } - /** - * The dependant_locality area of the user address - */ + /** + * The dependant_locality area of the user address + */ public function getDependentLocality(): ?string { return $this->dependentLocality; } - /** - * The postal code area of the user address - */ + /** + * The postal code area of the user address + */ public function getPostalCode(): ?string { return $this->postalCode; } - /** - * Address field metadata. - */ + /** + * Address field metadata. + */ public function getMetadata(): ?AddressMetadataMetadata { return $this->metadata; } } - diff --git a/src/Model/GetApplicationFilter200Response.php b/src/Model/GetApplicationFilter200Response.php index 0ba6e95de..d53c64c7f 100644 --- a/src/Model/GetApplicationFilter200Response.php +++ b/src/Model/GetApplicationFilter200Response.php @@ -13,15 +13,12 @@ */ final class GetApplicationFilter200Response implements Model, JsonSerializable { - - public function __construct( private readonly array $fields, private readonly int $maxApplicableFilters, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return GetApplicationFilter200ResponseFieldsValue[] - */ + /** + * @return GetApplicationFilter200ResponseFieldsValue[] + */ public function getFields(): array { return $this->fields; @@ -52,4 +49,3 @@ public function getMaxApplicableFilters(): int return $this->maxApplicableFilters; } } - diff --git a/src/Model/GetApplicationFilter200ResponseFieldsValue.php b/src/Model/GetApplicationFilter200ResponseFieldsValue.php index 5dd3448d7..bacc9016d 100644 --- a/src/Model/GetApplicationFilter200ResponseFieldsValue.php +++ b/src/Model/GetApplicationFilter200ResponseFieldsValue.php @@ -13,15 +13,12 @@ */ final class GetApplicationFilter200ResponseFieldsValue implements Model, JsonSerializable { - - public function __construct( private readonly int $distinctValues, private readonly array $values, ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getDistinctValues(): int return $this->distinctValues; } - /** - * @return GetApplicationFilter200ResponseFieldsValueValuesInner[] - */ + /** + * @return GetApplicationFilter200ResponseFieldsValueValuesInner[] + */ public function getValues(): array { return $this->values; } } - diff --git a/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php b/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php index f4ee87fd3..1f191386b 100644 --- a/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php +++ b/src/Model/GetApplicationFilter200ResponseFieldsValueValuesInner.php @@ -13,15 +13,12 @@ */ final class GetApplicationFilter200ResponseFieldsValueValuesInner implements Model, JsonSerializable { - - public function __construct( private readonly string $value, private readonly int $count, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getCount(): int return $this->count; } } - diff --git a/src/Model/GetApplicationMerge200Response.php b/src/Model/GetApplicationMerge200Response.php index b916c5ba4..11be3c082 100644 --- a/src/Model/GetApplicationMerge200Response.php +++ b/src/Model/GetApplicationMerge200Response.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class GetApplicationMerge200Response implements Model, JsonSerializable { - public const _AGGREGATION_TYPE_AVG = 'avg'; public const _AGGREGATION_TYPE_SUM = 'sum'; @@ -28,13 +28,12 @@ public function __construct( private readonly ?array $groups = [], private readonly ?string $aggregationType = null, private readonly ?string $application = null, - private readonly ?\DateTime $from = null, - private readonly ?\DateTime $to = null, + private readonly ?DateTime $from = null, + private readonly ?DateTime $to = null, private readonly ?int $scaleFactor = null, ) { } - public function getModelName(): string { return self::class; @@ -94,9 +93,9 @@ public function getTimeline(): ?GetApplicationMerge200ResponseTimeline return $this->timeline; } - /** - * @return GetApplicationMerge200ResponseGroupsValue[]|null - */ + /** + * @return GetApplicationMerge200ResponseGroupsValue[]|null + */ public function getGroups(): ?array { return $this->groups; @@ -117,12 +116,12 @@ public function getApplication(): ?string return $this->application; } - public function getFrom(): ?\DateTime + public function getFrom(): ?DateTime { return $this->from; } - public function getTo(): ?\DateTime + public function getTo(): ?DateTime { return $this->to; } @@ -132,4 +131,3 @@ public function getScaleFactor(): ?int return $this->scaleFactor; } } - diff --git a/src/Model/GetApplicationMerge200ResponseFlamebearer.php b/src/Model/GetApplicationMerge200ResponseFlamebearer.php index 0a9896dac..5b1dce126 100644 --- a/src/Model/GetApplicationMerge200ResponseFlamebearer.php +++ b/src/Model/GetApplicationMerge200ResponseFlamebearer.php @@ -13,8 +13,6 @@ */ final class GetApplicationMerge200ResponseFlamebearer implements Model, JsonSerializable { - - public function __construct( private readonly array $names, private readonly array $levels, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getMaxSelf(): int return $this->maxSelf; } } - diff --git a/src/Model/GetApplicationMerge200ResponseGroupsValue.php b/src/Model/GetApplicationMerge200ResponseGroupsValue.php index 47e6d6fc5..e7f5005e0 100644 --- a/src/Model/GetApplicationMerge200ResponseGroupsValue.php +++ b/src/Model/GetApplicationMerge200ResponseGroupsValue.php @@ -13,8 +13,6 @@ */ final class GetApplicationMerge200ResponseGroupsValue implements Model, JsonSerializable { - - public function __construct( private readonly int $startTime, private readonly array $samples, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getWatermarks(): ?array return $this->watermarks; } } - diff --git a/src/Model/GetApplicationMerge200ResponseHeatmap.php b/src/Model/GetApplicationMerge200ResponseHeatmap.php index abe37614d..f70d59824 100644 --- a/src/Model/GetApplicationMerge200ResponseHeatmap.php +++ b/src/Model/GetApplicationMerge200ResponseHeatmap.php @@ -13,8 +13,6 @@ */ final class GetApplicationMerge200ResponseHeatmap implements Model, JsonSerializable { - - public function __construct( private readonly array $values, private readonly int $timeBuckets, @@ -28,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -99,4 +96,3 @@ public function getMaxDepth(): int return $this->maxDepth; } } - diff --git a/src/Model/GetApplicationMerge200ResponseMetadata.php b/src/Model/GetApplicationMerge200ResponseMetadata.php index fc5b2418f..dd3d9c2ae 100644 --- a/src/Model/GetApplicationMerge200ResponseMetadata.php +++ b/src/Model/GetApplicationMerge200ResponseMetadata.php @@ -13,8 +13,6 @@ */ final class GetApplicationMerge200ResponseMetadata implements Model, JsonSerializable { - - public function __construct( private readonly string $format, private readonly string $spyName, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,4 +68,3 @@ public function getName(): string return $this->name; } } - diff --git a/src/Model/GetApplicationMerge200ResponseTimeline.php b/src/Model/GetApplicationMerge200ResponseTimeline.php index 45c282fd8..89b6255a3 100644 --- a/src/Model/GetApplicationMerge200ResponseTimeline.php +++ b/src/Model/GetApplicationMerge200ResponseTimeline.php @@ -13,8 +13,6 @@ */ final class GetApplicationMerge200ResponseTimeline implements Model, JsonSerializable { - - public function __construct( private readonly int $startTime, private readonly array $samples, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getWatermarks(): ?array return $this->watermarks; } } - diff --git a/src/Model/GetApplicationMerge400Response.php b/src/Model/GetApplicationMerge400Response.php index 0694428e7..ad9bf16bf 100644 --- a/src/Model/GetApplicationMerge400Response.php +++ b/src/Model/GetApplicationMerge400Response.php @@ -13,15 +13,12 @@ */ final class GetApplicationMerge400Response implements Model, JsonSerializable { - - public function __construct( private readonly int $code, private readonly string $message, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMessage(): string return $this->message; } } - diff --git a/src/Model/GetApplicationTimeline200Response.php b/src/Model/GetApplicationTimeline200Response.php index 546c151c8..377c3e1ea 100644 --- a/src/Model/GetApplicationTimeline200Response.php +++ b/src/Model/GetApplicationTimeline200Response.php @@ -13,7 +13,6 @@ */ final class GetApplicationTimeline200Response implements Model, JsonSerializable { - public const AGGREGATION_TYPE_AVG = 'avg'; public const AGGREGATION_TYPE_SUM = 'sum'; @@ -28,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -82,12 +80,11 @@ public function getRetention(): int return $this->retention; } - /** - * @return GetApplicationTimeline200ResponsePointsInner[] - */ + /** + * @return GetApplicationTimeline200ResponsePointsInner[] + */ public function getPoints(): array { return $this->points; } } - diff --git a/src/Model/GetApplicationTimeline200ResponsePointsInner.php b/src/Model/GetApplicationTimeline200ResponsePointsInner.php index 71ad6e3f0..abe97f10a 100644 --- a/src/Model/GetApplicationTimeline200ResponsePointsInner.php +++ b/src/Model/GetApplicationTimeline200ResponsePointsInner.php @@ -13,15 +13,12 @@ */ final class GetApplicationTimeline200ResponsePointsInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?int $value = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getValue(): ?int return $this->value; } } - diff --git a/src/Model/GetApplicationTimeline400Response.php b/src/Model/GetApplicationTimeline400Response.php index 5c5f2799d..cf62ad783 100644 --- a/src/Model/GetApplicationTimeline400Response.php +++ b/src/Model/GetApplicationTimeline400Response.php @@ -13,15 +13,12 @@ */ final class GetApplicationTimeline400Response implements Model, JsonSerializable { - - public function __construct( private readonly int $code, private readonly string $message, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMessage(): string return $this->message; } } - diff --git a/src/Model/GetCurrentUserVerificationStatus200Response.php b/src/Model/GetCurrentUserVerificationStatus200Response.php index 9366e2df5..0115afe27 100644 --- a/src/Model/GetCurrentUserVerificationStatus200Response.php +++ b/src/Model/GetCurrentUserVerificationStatus200Response.php @@ -13,14 +13,11 @@ */ final class GetCurrentUserVerificationStatus200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $verifyPhone = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getVerifyPhone(): ?bool return $this->verifyPhone; } } - diff --git a/src/Model/GetCurrentUserVerificationStatusFull200Response.php b/src/Model/GetCurrentUserVerificationStatusFull200Response.php index 40590d941..d733f6442 100644 --- a/src/Model/GetCurrentUserVerificationStatusFull200Response.php +++ b/src/Model/GetCurrentUserVerificationStatusFull200Response.php @@ -13,15 +13,12 @@ */ final class GetCurrentUserVerificationStatusFull200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $state = null, private readonly ?string $type = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getType(): ?string return $this->type; } } - diff --git a/src/Model/GetOrgPrepaymentInfo200Response.php b/src/Model/GetOrgPrepaymentInfo200Response.php index b500ff7fc..d37c5208c 100644 --- a/src/Model/GetOrgPrepaymentInfo200Response.php +++ b/src/Model/GetOrgPrepaymentInfo200Response.php @@ -13,15 +13,12 @@ */ final class GetOrgPrepaymentInfo200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?PrepaymentObject $prepayment = null, private readonly ?GetOrgPrepaymentInfo200ResponseLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -40,9 +37,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Prepayment information for an organization. - */ + /** + * Prepayment information for an organization. + */ public function getPrepayment(): ?PrepaymentObject { return $this->prepayment; @@ -53,4 +50,3 @@ public function getLinks(): ?GetOrgPrepaymentInfo200ResponseLinks return $this->links; } } - diff --git a/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php b/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php index 684af9903..b65dfb923 100644 --- a/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php +++ b/src/Model/GetOrgPrepaymentInfo200ResponseLinks.php @@ -13,15 +13,12 @@ */ final class GetOrgPrepaymentInfo200ResponseLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?GetOrgPrepaymentInfo200ResponseLinksSelf $self = null, private readonly ?GetOrgPrepaymentInfo200ResponseLinksTransactions $transactions = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getTransactions(): ?GetOrgPrepaymentInfo200ResponseLinksTransact return $this->transactions; } } - diff --git a/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php b/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php index b12d6b18f..a8b123bdd 100644 --- a/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php +++ b/src/Model/GetOrgPrepaymentInfo200ResponseLinksSelf.php @@ -13,14 +13,11 @@ */ final class GetOrgPrepaymentInfo200ResponseLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): ?string return $this->href; } } - diff --git a/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php b/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php index af7f00e67..c75954ba7 100644 --- a/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php +++ b/src/Model/GetOrgPrepaymentInfo200ResponseLinksTransactions.php @@ -13,14 +13,11 @@ */ final class GetOrgPrepaymentInfo200ResponseLinksTransactions implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): ?string return $this->href; } } - diff --git a/src/Model/GetSubscriptionUsageAlerts200Response.php b/src/Model/GetSubscriptionUsageAlerts200Response.php index dd2dc8ac7..084d74c61 100644 --- a/src/Model/GetSubscriptionUsageAlerts200Response.php +++ b/src/Model/GetSubscriptionUsageAlerts200Response.php @@ -13,15 +13,12 @@ */ final class GetSubscriptionUsageAlerts200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $current = [], private readonly ?array $available = [], ) { } - public function getModelName(): string { return self::class; @@ -39,20 +36,19 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UsageAlert[]|null - */ + /** + * @return UsageAlert[]|null + */ public function getCurrent(): ?array { return $this->current; } - /** - * @return UsageAlert[]|null - */ + /** + * @return UsageAlert[]|null + */ public function getAvailable(): ?array { return $this->available; } } - diff --git a/src/Model/GetTotpEnrollment200Response.php b/src/Model/GetTotpEnrollment200Response.php index d8dacb276..9ff8ca3ab 100644 --- a/src/Model/GetTotpEnrollment200Response.php +++ b/src/Model/GetTotpEnrollment200Response.php @@ -13,8 +13,6 @@ */ final class GetTotpEnrollment200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?string $issuer = null, private readonly ?string $accountName = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getQrCode(): ?string return $this->qrCode; } } - diff --git a/src/Model/GetTypeAllowance200Response.php b/src/Model/GetTypeAllowance200Response.php index d65206db5..ce78571ed 100644 --- a/src/Model/GetTypeAllowance200Response.php +++ b/src/Model/GetTypeAllowance200Response.php @@ -13,14 +13,11 @@ */ final class GetTypeAllowance200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?GetTypeAllowance200ResponseCurrencies $currencies = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getCurrencies(): ?GetTypeAllowance200ResponseCurrencies return $this->currencies; } } - diff --git a/src/Model/GetTypeAllowance200ResponseCurrencies.php b/src/Model/GetTypeAllowance200ResponseCurrencies.php index 8bdd4f500..cefe90ba7 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrencies.php +++ b/src/Model/GetTypeAllowance200ResponseCurrencies.php @@ -13,8 +13,6 @@ */ final class GetTypeAllowance200ResponseCurrencies implements Model, JsonSerializable { - - public function __construct( private readonly ?GetTypeAllowance200ResponseCurrenciesEUR $eUR = null, private readonly ?GetTypeAllowance200ResponseCurrenciesUSD $uSD = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,4 +68,3 @@ public function getCAD(): ?GetTypeAllowance200ResponseCurrenciesCAD return $this->cAD; } } - diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php b/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php index e2c2fb1f4..3dd998dac 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesAUD.php @@ -13,8 +13,6 @@ */ final class GetTypeAllowance200ResponseCurrenciesAUD implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } - diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php b/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php index 2019d1eef..149d14d0a 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesCAD.php @@ -13,8 +13,6 @@ */ final class GetTypeAllowance200ResponseCurrenciesCAD implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } - diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php b/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php index e4ff684a6..51344d422 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesEUR.php @@ -13,8 +13,6 @@ */ final class GetTypeAllowance200ResponseCurrenciesEUR implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } - diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php b/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php index d59ce9200..3d9509156 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesGBP.php @@ -13,8 +13,6 @@ */ final class GetTypeAllowance200ResponseCurrenciesGBP implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } - diff --git a/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php b/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php index f840c0d04..c1a87ae4e 100644 --- a/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php +++ b/src/Model/GetTypeAllowance200ResponseCurrenciesUSD.php @@ -13,8 +13,6 @@ */ final class GetTypeAllowance200ResponseCurrenciesUSD implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getCurrencySymbol(): ?string return $this->currencySymbol; } } - diff --git a/src/Model/GetUsageAlerts200Response.php b/src/Model/GetUsageAlerts200Response.php index e54707896..e8b5b90ae 100644 --- a/src/Model/GetUsageAlerts200Response.php +++ b/src/Model/GetUsageAlerts200Response.php @@ -13,15 +13,12 @@ */ final class GetUsageAlerts200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $available = [], private readonly ?array $current = [], ) { } - public function getModelName(): string { return self::class; @@ -39,20 +36,19 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Alert[]|null - */ + /** + * @return Alert[]|null + */ public function getAvailable(): ?array { return $this->available; } - /** - * @return Alert[]|null - */ + /** + * @return Alert[]|null + */ public function getCurrent(): ?array { return $this->current; } } - diff --git a/src/Model/GitHub.php b/src/Model/GitHub.php index a2f3675ed..91c35522b 100644 --- a/src/Model/GitHub.php +++ b/src/Model/GitHub.php @@ -14,15 +14,12 @@ */ final class GitHub implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/GitLab.php b/src/Model/GitLab.php index adfbfadff..d64fc1545 100644 --- a/src/Model/GitLab.php +++ b/src/Model/GitLab.php @@ -14,15 +14,12 @@ */ final class GitLab implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/GitLabIntegration.php b/src/Model/GitLabIntegration.php index ebc67473c..4e0ddd445 100644 --- a/src/Model/GitLabIntegration.php +++ b/src/Model/GitLabIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level GitLabIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class GitLabIntegration implements Model, JsonSerializable, Integration { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -33,14 +32,13 @@ public function __construct( private readonly bool $buildMergeRequests, private readonly bool $buildWipMergeRequests, private readonly bool $mergeRequestsCloneParentData, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, - private readonly ?\DateTime $tokenExpiresAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, + private readonly ?DateTime $tokenExpiresAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -73,132 +71,131 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * 'expires_at' value of the current token - */ - public function getTokenExpiresAt(): ?\DateTime + /** + * 'expires_at' value of the current token + */ + public function getTokenExpiresAt(): ?DateTime { return $this->tokenExpiresAt; } - /** - * Whether or not to rotate token automatically using Gitlab API - */ + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): bool { return $this->rotateToken; } - /** - * Validity in weeks of a new token after rotation - */ + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): int { return $this->rotateTokenValidityInWeeks; } - /** - * The base URL of the GitLab installation - */ + /** + * The base URL of the GitLab installation + */ public function getBaseUrl(): string { return $this->baseUrl; } - /** - * The GitLab project (in the form `namespace/repo`) - */ + /** + * The GitLab project (in the form `namespace/repo`) + */ public function getProject(): string { return $this->project; } - /** - * Whether or not to build merge requests - */ + /** + * Whether or not to build merge requests + */ public function getBuildMergeRequests(): bool { return $this->buildMergeRequests; } - /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`) - */ + /** + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) + */ public function getBuildWipMergeRequests(): bool { return $this->buildWipMergeRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getMergeRequestsCloneParentData(): bool { return $this->mergeRequestsCloneParentData; } - /** - * The identifier of GitLabIntegration - */ + /** + * The identifier of GitLabIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/GitLabIntegrationCreateInput.php b/src/Model/GitLabIntegrationCreateInput.php index cd6d9c264..c9d9a16dd 100644 --- a/src/Model/GitLabIntegrationCreateInput.php +++ b/src/Model/GitLabIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level GitLabIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class GitLabIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -36,7 +34,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -65,100 +62,99 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitLab private token - */ + /** + * The GitLab private token + */ public function getToken(): string { return $this->token; } - /** - * The GitLab project (in the form `namespace/repo`) - */ + /** + * The GitLab project (in the form `namespace/repo`) + */ public function getProject(): string { return $this->project; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to rotate token automatically using Gitlab API - */ + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): ?bool { return $this->rotateToken; } - /** - * Validity in weeks of a new token after rotation - */ + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): ?int { return $this->rotateTokenValidityInWeeks; } - /** - * The base URL of the GitLab installation - */ + /** + * The base URL of the GitLab installation + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build merge requests - */ + /** + * Whether or not to build merge requests + */ public function getBuildMergeRequests(): ?bool { return $this->buildMergeRequests; } - /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`) - */ + /** + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) + */ public function getBuildWipMergeRequests(): ?bool { return $this->buildWipMergeRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getMergeRequestsCloneParentData(): ?bool { return $this->mergeRequestsCloneParentData; } } - diff --git a/src/Model/GitLabIntegrationPatch.php b/src/Model/GitLabIntegrationPatch.php index 80082a6dd..4fe8173e2 100644 --- a/src/Model/GitLabIntegrationPatch.php +++ b/src/Model/GitLabIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level GitLabIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class GitLabIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -36,7 +34,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -65,100 +62,99 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitLab private token - */ + /** + * The GitLab private token + */ public function getToken(): string { return $this->token; } - /** - * The GitLab project (in the form `namespace/repo`) - */ + /** + * The GitLab project (in the form `namespace/repo`) + */ public function getProject(): string { return $this->project; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * Whether or not to rotate token automatically using Gitlab API - */ + /** + * Whether or not to rotate token automatically using Gitlab API + */ public function getRotateToken(): ?bool { return $this->rotateToken; } - /** - * Validity in weeks of a new token after rotation - */ + /** + * Validity in weeks of a new token after rotation + */ public function getRotateTokenValidityInWeeks(): ?int { return $this->rotateTokenValidityInWeeks; } - /** - * The base URL of the GitLab installation - */ + /** + * The base URL of the GitLab installation + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build merge requests - */ + /** + * Whether or not to build merge requests + */ public function getBuildMergeRequests(): ?bool { return $this->buildMergeRequests; } - /** - * Whether or not to build work in progress merge requests (requires `build_merge_requests`) - */ + /** + * Whether or not to build work in progress merge requests (requires `build_merge_requests`) + */ public function getBuildWipMergeRequests(): ?bool { return $this->buildWipMergeRequests; } - /** - * Whether or not to clone parent data when building merge requests - */ + /** + * Whether or not to clone parent data when building merge requests + */ public function getMergeRequestsCloneParentData(): ?bool { return $this->mergeRequestsCloneParentData; } } - diff --git a/src/Model/GitServerConfiguration.php b/src/Model/GitServerConfiguration.php index 1c8a5d0b4..66ad7fe4f 100644 --- a/src/Model/GitServerConfiguration.php +++ b/src/Model/GitServerConfiguration.php @@ -13,14 +13,11 @@ */ final class GitServerConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly int $pushSizeHardLimit, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Push Size Reject Limit - */ + /** + * Push Size Reject Limit + */ public function getPushSizeHardLimit(): int { return $this->pushSizeHardLimit; } } - diff --git a/src/Model/GithubIntegration.php b/src/Model/GithubIntegration.php index 03cae8cad..e11efe8fc 100644 --- a/src/Model/GithubIntegration.php +++ b/src/Model/GithubIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level GithubIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class GithubIntegration implements Model, JsonSerializable, Integration { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -34,14 +33,13 @@ public function __construct( private readonly bool $buildPullRequestsPostMerge, private readonly bool $pullRequestsCloneParentData, private readonly string $tokenType, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $baseUrl, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -73,124 +71,123 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): string { return $this->environmentInitResources; } - /** - * The base URL of the Github API endpoint - */ + /** + * The base URL of the Github API endpoint + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * The GitHub repository (in the form `user/repo`) - */ + /** + * The GitHub repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): bool { return $this->buildPullRequests; } - /** - * Whether or not to build draft pull requests (requires `build_pull_requests`) - */ + /** + * Whether or not to build draft pull requests (requires `build_pull_requests`) + */ public function getBuildDraftPullRequests(): bool { return $this->buildDraftPullRequests; } - /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false) - */ + /** + * Whether to build pull requests post-merge (if true) or pre-merge (if false) + */ public function getBuildPullRequestsPostMerge(): bool { return $this->buildPullRequestsPostMerge; } - /** - * Whether or not to clone parent data when building pull requests - */ + /** + * Whether or not to clone parent data when building pull requests + */ public function getPullRequestsCloneParentData(): bool { return $this->pullRequestsCloneParentData; } - /** - * The type of the token of this GitHub integration - */ + /** + * The type of the token of this GitHub integration + */ public function getTokenType(): string { return $this->tokenType; } - /** - * The identifier of GithubIntegration - */ + /** + * The identifier of GithubIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/GithubIntegrationCreateInput.php b/src/Model/GithubIntegrationCreateInput.php index 3244db1ca..65f0df70b 100644 --- a/src/Model/GithubIntegrationCreateInput.php +++ b/src/Model/GithubIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level GithubIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class GithubIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,92 +60,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitHub token. - */ + /** + * The GitHub token. + */ public function getToken(): string { return $this->token; } - /** - * The GitHub repository (in the form `user/repo`) - */ + /** + * The GitHub repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The base URL of the Github API endpoint - */ + /** + * The base URL of the Github API endpoint + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to build draft pull requests (requires `build_pull_requests`) - */ + /** + * Whether or not to build draft pull requests (requires `build_pull_requests`) + */ public function getBuildDraftPullRequests(): ?bool { return $this->buildDraftPullRequests; } - /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false) - */ + /** + * Whether to build pull requests post-merge (if true) or pre-merge (if false) + */ public function getBuildPullRequestsPostMerge(): ?bool { return $this->buildPullRequestsPostMerge; } - /** - * Whether or not to clone parent data when building pull requests - */ + /** + * Whether or not to clone parent data when building pull requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } - diff --git a/src/Model/GithubIntegrationPatch.php b/src/Model/GithubIntegrationPatch.php index e0329d3b1..8d071c7f7 100644 --- a/src/Model/GithubIntegrationPatch.php +++ b/src/Model/GithubIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level GithubIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class GithubIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const ENVIRONMENT_INIT_RESOURCES__DEFAULT = 'default'; public const ENVIRONMENT_INIT_RESOURCES_MANUAL = 'manual'; public const ENVIRONMENT_INIT_RESOURCES_MINIMUM = 'minimum'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,92 +60,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The GitHub token. - */ + /** + * The GitHub token. + */ public function getToken(): string { return $this->token; } - /** - * The GitHub repository (in the form `user/repo`) - */ + /** + * The GitHub repository (in the form `user/repo`) + */ public function getRepository(): string { return $this->repository; } - /** - * Whether or not to fetch branches - */ + /** + * Whether or not to fetch branches + */ public function getFetchBranches(): ?bool { return $this->fetchBranches; } - /** - * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) - */ + /** + * Whether or not to remove branches that disappeared remotely (requires `fetch_branches`) + */ public function getPruneBranches(): ?bool { return $this->pruneBranches; } - /** - * The resources used when initializing a new service - */ + /** + * The resources used when initializing a new service + */ public function getEnvironmentInitResources(): ?string { return $this->environmentInitResources; } - /** - * The base URL of the Github API endpoint - */ + /** + * The base URL of the Github API endpoint + */ public function getBaseUrl(): ?string { return $this->baseUrl; } - /** - * Whether or not to build pull requests - */ + /** + * Whether or not to build pull requests + */ public function getBuildPullRequests(): ?bool { return $this->buildPullRequests; } - /** - * Whether or not to build draft pull requests (requires `build_pull_requests`) - */ + /** + * Whether or not to build draft pull requests (requires `build_pull_requests`) + */ public function getBuildDraftPullRequests(): ?bool { return $this->buildDraftPullRequests; } - /** - * Whether to build pull requests post-merge (if true) or pre-merge (if false) - */ + /** + * Whether to build pull requests post-merge (if true) or pre-merge (if false) + */ public function getBuildPullRequestsPostMerge(): ?bool { return $this->buildPullRequestsPostMerge; } - /** - * Whether or not to clone parent data when building pull requests - */ + /** + * Whether or not to clone parent data when building pull requests + */ public function getPullRequestsCloneParentData(): ?bool { return $this->pullRequestsCloneParentData; } } - diff --git a/src/Model/GrantProjectTeamAccessRequestInner.php b/src/Model/GrantProjectTeamAccessRequestInner.php index 06498cbae..a032f4e6f 100644 --- a/src/Model/GrantProjectTeamAccessRequestInner.php +++ b/src/Model/GrantProjectTeamAccessRequestInner.php @@ -13,14 +13,11 @@ */ final class GrantProjectTeamAccessRequestInner implements Model, JsonSerializable { - - public function __construct( private readonly string $teamId, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getTeamId(): string return $this->teamId; } } - diff --git a/src/Model/GrantProjectUserAccessRequestInner.php b/src/Model/GrantProjectUserAccessRequestInner.php index 322148a10..8c4e5b314 100644 --- a/src/Model/GrantProjectUserAccessRequestInner.php +++ b/src/Model/GrantProjectUserAccessRequestInner.php @@ -13,7 +13,6 @@ */ final class GrantProjectUserAccessRequestInner implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -33,7 +32,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -68,4 +66,3 @@ public function getAutoAddMember(): ?bool return $this->autoAddMember; } } - diff --git a/src/Model/GrantTeamProjectAccessRequestInner.php b/src/Model/GrantTeamProjectAccessRequestInner.php index caaf0b1e0..83f467941 100644 --- a/src/Model/GrantTeamProjectAccessRequestInner.php +++ b/src/Model/GrantTeamProjectAccessRequestInner.php @@ -13,14 +13,11 @@ */ final class GrantTeamProjectAccessRequestInner implements Model, JsonSerializable { - - public function __construct( private readonly string $projectId, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getProjectId(): string return $this->projectId; } } - diff --git a/src/Model/GrantUserProjectAccessRequestInner.php b/src/Model/GrantUserProjectAccessRequestInner.php index bbfbe7d9b..7492ea67c 100644 --- a/src/Model/GrantUserProjectAccessRequestInner.php +++ b/src/Model/GrantUserProjectAccessRequestInner.php @@ -13,7 +13,6 @@ */ final class GrantUserProjectAccessRequestInner implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -32,7 +31,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -61,4 +59,3 @@ public function getPermissions(): array return $this->permissions; } } - diff --git a/src/Model/GuaranteedResources.php b/src/Model/GuaranteedResources.php index d6f6f701c..68c89eee1 100644 --- a/src/Model/GuaranteedResources.php +++ b/src/Model/GuaranteedResources.php @@ -13,15 +13,12 @@ */ final class GuaranteedResources implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly int $instanceLimit, ) { } - public function getModelName(): string { return self::class; @@ -40,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, guaranteed resources can be used - */ + /** + * If true, guaranteed resources can be used + */ public function getEnabled(): bool { return $this->enabled; } - /** - * Instance limit for guaranteed resources - */ + /** + * Instance limit for guaranteed resources + */ public function getInstanceLimit(): int { return $this->instanceLimit; } } - diff --git a/src/Model/HTTPLogForwarding.php b/src/Model/HTTPLogForwarding.php index 808c0ebdf..b950c87c6 100644 --- a/src/Model/HTTPLogForwarding.php +++ b/src/Model/HTTPLogForwarding.php @@ -14,15 +14,12 @@ */ final class HTTPLogForwarding implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/HalLinks.php b/src/Model/HalLinks.php index df3de63e7..17aed0aa1 100644 --- a/src/Model/HalLinks.php +++ b/src/Model/HalLinks.php @@ -14,8 +14,6 @@ */ final class HalLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?HalLinksSelf $self = null, private readonly ?HalLinksPrevious $previous = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The cardinal link to the self resource. - */ + /** + * The cardinal link to the self resource. + */ public function getSelf(): ?HalLinksSelf { return $this->self; } - /** - * The link to the previous resource page, given that it exists. - */ + /** + * The link to the previous resource page, given that it exists. + */ public function getPrevious(): ?HalLinksPrevious { return $this->previous; } - /** - * The link to the next resource page, given that it exists. - */ + /** + * The link to the next resource page, given that it exists. + */ public function getNext(): ?HalLinksNext { return $this->next; } } - diff --git a/src/Model/HalLinksNext.php b/src/Model/HalLinksNext.php index dc852dbd4..e87c1f9d9 100644 --- a/src/Model/HalLinksNext.php +++ b/src/Model/HalLinksNext.php @@ -14,15 +14,12 @@ */ final class HalLinksNext implements Model, JsonSerializable { - - public function __construct( private readonly ?string $title = null, private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Title of the link - */ + /** + * Title of the link + */ public function getTitle(): ?string { return $this->title; } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/HalLinksPrevious.php b/src/Model/HalLinksPrevious.php index e7b923297..3a6ceb1bb 100644 --- a/src/Model/HalLinksPrevious.php +++ b/src/Model/HalLinksPrevious.php @@ -14,15 +14,12 @@ */ final class HalLinksPrevious implements Model, JsonSerializable { - - public function __construct( private readonly ?string $title = null, private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Title of the link - */ + /** + * Title of the link + */ public function getTitle(): ?string { return $this->title; } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/HalLinksSelf.php b/src/Model/HalLinksSelf.php index e8a1696a8..164454ee4 100644 --- a/src/Model/HalLinksSelf.php +++ b/src/Model/HalLinksSelf.php @@ -14,15 +14,12 @@ */ final class HalLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $title = null, private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Title of the link - */ + /** + * Title of the link + */ public function getTitle(): ?string { return $this->title; } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/HealthEmail.php b/src/Model/HealthEmail.php index 2a12c40d3..4c7820f33 100644 --- a/src/Model/HealthEmail.php +++ b/src/Model/HealthEmail.php @@ -14,15 +14,12 @@ */ final class HealthEmail implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/HealthPagerDuty.php b/src/Model/HealthPagerDuty.php index 424145317..a60270a42 100644 --- a/src/Model/HealthPagerDuty.php +++ b/src/Model/HealthPagerDuty.php @@ -14,15 +14,12 @@ */ final class HealthPagerDuty implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/HealthSlack.php b/src/Model/HealthSlack.php index 6fed9b151..54ddc5d2b 100644 --- a/src/Model/HealthSlack.php +++ b/src/Model/HealthSlack.php @@ -14,15 +14,12 @@ */ final class HealthSlack implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/HealthWebHook.php b/src/Model/HealthWebHook.php index 233270c14..416d49fd1 100644 --- a/src/Model/HealthWebHook.php +++ b/src/Model/HealthWebHook.php @@ -14,15 +14,12 @@ */ final class HealthWebHook implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/HealthWebHookIntegration.php b/src/Model/HealthWebHookIntegration.php index c1f72dba3..539e2bcb8 100644 --- a/src/Model/HealthWebHookIntegration.php +++ b/src/Model/HealthWebHookIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level HealthWebHookIntegration (auto-generated) @@ -14,19 +14,16 @@ */ final class HealthWebHookIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, private readonly string $url, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -49,52 +46,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The identifier of HealthWebHookIntegration - */ + /** + * The identifier of HealthWebHookIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/HealthWebHookIntegrationCreateInput.php b/src/Model/HealthWebHookIntegrationCreateInput.php index 2f58656b4..016a995c4 100644 --- a/src/Model/HealthWebHookIntegrationCreateInput.php +++ b/src/Model/HealthWebHookIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level HealthWebHookIntegrationCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class HealthWebHookIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $url, @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } - diff --git a/src/Model/HealthWebHookIntegrationPatch.php b/src/Model/HealthWebHookIntegrationPatch.php index 0f534fb05..8a6ce8255 100644 --- a/src/Model/HealthWebHookIntegrationPatch.php +++ b/src/Model/HealthWebHookIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level HealthWebHookIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class HealthWebHookIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $url, @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } - diff --git a/src/Model/History.php b/src/Model/History.php index 3e9365eda..19503575e 100644 --- a/src/Model/History.php +++ b/src/Model/History.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class History implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $projectId = null, @@ -23,12 +22,11 @@ public function __construct( private readonly ?string $resource = null, private readonly ?string $environment = null, private readonly ?string $quantity = null, - private readonly ?\DateTime $timestamp = null, + private readonly ?DateTime $timestamp = null, private readonly ?string $user = null, ) { } - public function getModelName(): string { return self::class; @@ -54,76 +52,75 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The unique identifier of the history record. - */ + /** + * The unique identifier of the history record. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The type of event that triggered the record. - */ + /** + * The type of event that triggered the record. + */ public function getEventType(): ?string { return $this->eventType; } - /** - * The ID of the event. - */ + /** + * The ID of the event. + */ public function getEventId(): ?string { return $this->eventId; } - /** - * The resource type (e.g., cpu_app, memory_services, storage). - */ + /** + * The resource type (e.g., cpu_app, memory_services, storage). + */ public function getResource(): ?string { return $this->resource; } - /** - * The environment name. - */ + /** + * The environment name. + */ public function getEnvironment(): ?string { return $this->environment; } - /** - * The quantity of the resource. - */ + /** + * The quantity of the resource. + */ public function getQuantity(): ?string { return $this->quantity; } - /** - * The timestamp when the record was created. - */ - public function getTimestamp(): ?\DateTime + /** + * The timestamp when the record was created. + */ + public function getTimestamp(): ?DateTime { return $this->timestamp; } - /** - * The ID of the user who triggered the event. - */ + /** + * The ID of the user who triggered the event. + */ public function getUser(): ?string { return $this->user; } } - diff --git a/src/Model/Hooks.php b/src/Model/Hooks.php index 194a59bf3..b7b5419b1 100644 --- a/src/Model/Hooks.php +++ b/src/Model/Hooks.php @@ -13,8 +13,6 @@ */ final class Hooks implements Model, JsonSerializable { - - public function __construct( private readonly ?string $build, private readonly ?string $deploy, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getPostDeploy(): ?string return $this->postDeploy; } } - diff --git a/src/Model/Hooks1.php b/src/Model/Hooks1.php index 53e9b6f84..aac922ad9 100644 --- a/src/Model/Hooks1.php +++ b/src/Model/Hooks1.php @@ -14,15 +14,12 @@ */ final class Hooks1 implements Model, JsonSerializable { - - public function __construct( private readonly ?string $build, private readonly ?string $deploy, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Hook executed after the build process - */ + /** + * Hook executed after the build process + */ public function getBuild(): ?string { return $this->build; } - /** - * Hook executed before the task's run command - */ + /** + * Hook executed before the task's run command + */ public function getDeploy(): ?string { return $this->deploy; } } - diff --git a/src/Model/HostsInner.php b/src/Model/HostsInner.php index ad53a31be..61eb1efe5 100644 --- a/src/Model/HostsInner.php +++ b/src/Model/HostsInner.php @@ -13,7 +13,6 @@ */ final class HostsInner implements Model, JsonSerializable { - public const TYPE_CORE = 'core'; public const TYPE_SATELLITE = 'satellite'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,4 +57,3 @@ public function getServices(): ?array return $this->services; } } - diff --git a/src/Model/HttpAccessPermissions.php b/src/Model/HttpAccessPermissions.php index 963846582..7c9f5a86d 100644 --- a/src/Model/HttpAccessPermissions.php +++ b/src/Model/HttpAccessPermissions.php @@ -14,8 +14,6 @@ */ final class HttpAccessPermissions implements Model, JsonSerializable { - - public function __construct( private readonly bool $isEnabled, private readonly array $addresses, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,17 +40,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether http_access control is enabled - */ + /** + * Whether http_access control is enabled + */ public function getIsEnabled(): bool { return $this->isEnabled; } - /** - * @return AddressGrantsInner[] - */ + /** + * @return AddressGrantsInner[] + */ public function getAddresses(): array { return $this->addresses; @@ -64,4 +61,3 @@ public function getBasicAuth(): array return $this->basicAuth; } } - diff --git a/src/Model/HttpAccessPermissions1.php b/src/Model/HttpAccessPermissions1.php index f18385d64..a6f95b7c0 100644 --- a/src/Model/HttpAccessPermissions1.php +++ b/src/Model/HttpAccessPermissions1.php @@ -14,8 +14,6 @@ */ final class HttpAccessPermissions1 implements Model, JsonSerializable { - - public function __construct( private readonly bool $isEnabled, private readonly array $addresses, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,17 +40,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether http_access control is enabled - */ + /** + * Whether http_access control is enabled + */ public function getIsEnabled(): bool { return $this->isEnabled; } - /** - * @return AddressGrantsInner[] - */ + /** + * @return AddressGrantsInner[] + */ public function getAddresses(): array { return $this->addresses; @@ -64,4 +61,3 @@ public function getBasicAuth(): array return $this->basicAuth; } } - diff --git a/src/Model/HttpAccessPermissions2.php b/src/Model/HttpAccessPermissions2.php index 50d02d59a..752e20bbd 100644 --- a/src/Model/HttpAccessPermissions2.php +++ b/src/Model/HttpAccessPermissions2.php @@ -14,8 +14,6 @@ */ final class HttpAccessPermissions2 implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $isEnabled = null, private readonly ?array $addresses = [], @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,17 +40,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether http_access control is enabled - */ + /** + * Whether http_access control is enabled + */ public function getIsEnabled(): ?bool { return $this->isEnabled; } - /** - * @return AddressGrantsInner[]|null - */ + /** + * @return AddressGrantsInner[]|null + */ public function getAddresses(): ?array { return $this->addresses; @@ -64,4 +61,3 @@ public function getBasicAuth(): ?array return $this->basicAuth; } } - diff --git a/src/Model/HttpLogIntegration.php b/src/Model/HttpLogIntegration.php index 12dbd91a1..5a5a85b92 100644 --- a/src/Model/HttpLogIntegration.php +++ b/src/Model/HttpLogIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level HttpLogIntegration (auto-generated) @@ -14,8 +14,6 @@ */ final class HttpLogIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, @@ -24,13 +22,12 @@ public function __construct( private readonly array $headers, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -57,33 +54,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -94,9 +91,9 @@ public function getExtra(): array return $this->extra; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -107,9 +104,9 @@ public function getHeaders(): array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -120,12 +117,11 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of HttpLogIntegration - */ + /** + * The identifier of HttpLogIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/HttpLogIntegrationCreateInput.php b/src/Model/HttpLogIntegrationCreateInput.php index 647c159fe..8b859ad2a 100644 --- a/src/Model/HttpLogIntegrationCreateInput.php +++ b/src/Model/HttpLogIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level HttpLogIntegrationCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class HttpLogIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,17 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -75,9 +71,9 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -88,4 +84,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/HttpLogIntegrationPatch.php b/src/Model/HttpLogIntegrationPatch.php index 1bd98d55c..d76b63564 100644 --- a/src/Model/HttpLogIntegrationPatch.php +++ b/src/Model/HttpLogIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level HttpLogIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class HttpLogIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,17 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -75,20 +71,19 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getExcludedServices(): ?string { return $this->excludedServices; } } - diff --git a/src/Model/HttpMetricsTimelineIps200Response.php b/src/Model/HttpMetricsTimelineIps200Response.php index fb2a325b5..822af4ab9 100644 --- a/src/Model/HttpMetricsTimelineIps200Response.php +++ b/src/Model/HttpMetricsTimelineIps200Response.php @@ -13,7 +13,6 @@ */ final class HttpMetricsTimelineIps200Response implements Model, JsonSerializable { - public const _ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const _ENVIRONMENT_TYPE_STAGING = 'staging'; public const _ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -57,7 +56,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -212,4 +210,3 @@ public function getRequestDurationSlotsMode(): ?string return $this->requestDurationSlotsMode; } } - diff --git a/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php index 20f5e9101..868244c97 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseBreakdown.php @@ -13,7 +13,6 @@ */ final class HttpMetricsTimelineIps200ResponseBreakdown implements Model, JsonSerializable { - public const KIND_IP = 'ip'; public function __construct( @@ -23,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,12 +51,11 @@ public function getTotal(): int return $this->total; } - /** - * @return HttpMetricsTimelineIps200ResponseBreakdownDataInner[] - */ + /** + * @return HttpMetricsTimelineIps200ResponseBreakdownDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php index 3d4349abe..47073e70a 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseBreakdownDataInner.php @@ -13,8 +13,6 @@ */ final class HttpMetricsTimelineIps200ResponseBreakdownDataInner implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly float $impact, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -85,4 +82,3 @@ public function getTopHit(): bool return $this->topHit; } } - diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php index 983598b0e..e43ff1197 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimeline.php @@ -13,14 +13,11 @@ */ final class HttpMetricsTimelineIps200ResponseTopHitsTimeline implements Model, JsonSerializable { - - public function __construct( private readonly array $data, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php index c012e2203..4e8e4e138 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner.php @@ -13,8 +13,6 @@ */ final class HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,12 +56,11 @@ public function getTotalCount(): ?int return $this->totalCount; } - /** - * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue[]|null - */ + /** + * @return HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue[]|null + */ public function getData(): ?array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php index a375a8add..6435f04e2 100644 --- a/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php +++ b/src/Model/HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue.php @@ -13,15 +13,12 @@ */ final class HttpMetricsTimelineIps200ResponseTopHitsTimelineDataInnerDataValue implements Model, JsonSerializable { - - public function __construct( private readonly int $count, private readonly ?float $impact, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getImpact(): ?float return $this->impact; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200Response.php b/src/Model/HttpMetricsTimelineUrls200Response.php index b7f34fce2..fcc65ed8f 100644 --- a/src/Model/HttpMetricsTimelineUrls200Response.php +++ b/src/Model/HttpMetricsTimelineUrls200Response.php @@ -13,7 +13,6 @@ */ final class HttpMetricsTimelineUrls200Response implements Model, JsonSerializable { - public const _ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const _ENVIRONMENT_TYPE_STAGING = 'staging'; public const _ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -58,7 +57,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -219,4 +217,3 @@ public function getRequestDurationSlotsMode(): ?string return $this->requestDurationSlotsMode; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php index a3df35cc5..d576a5bca 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdown.php @@ -13,7 +13,6 @@ */ final class HttpMetricsTimelineUrls200ResponseBreakdown implements Model, JsonSerializable { - public const KIND_URL = 'url'; public function __construct( @@ -23,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,12 +51,11 @@ public function getTotal(): int return $this->total; } - /** - * @return HttpMetricsTimelineUrls200ResponseBreakdownDataInner[] - */ + /** + * @return HttpMetricsTimelineUrls200ResponseBreakdownDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php index 840e98b5f..5b6264d00 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseBreakdownDataInner.php @@ -13,7 +13,6 @@ */ final class HttpMetricsTimelineUrls200ResponseBreakdownDataInner implements Model, JsonSerializable { - public const METHOD_GET = 'GET'; public const METHOD_POST = 'POST'; public const METHOD_PUT = 'PUT'; @@ -34,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -99,4 +97,3 @@ public function getTopHit(): bool return $this->topHit; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php b/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php index 0aa8f4eba..373b79079 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFilters.php @@ -13,15 +13,12 @@ */ final class HttpMetricsTimelineUrls200ResponseFilters implements Model, JsonSerializable { - - public function __construct( private readonly int $maxApplicableFilters, private readonly ?array $fields = [], ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getMaxApplicableFilters(): int return $this->maxApplicableFilters; } - /** - * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValue[]|null - */ + /** + * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValue[]|null + */ public function getFields(): ?array { return $this->fields; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php index f94522091..f53dab6d4 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValue.php @@ -13,8 +13,6 @@ */ final class HttpMetricsTimelineUrls200ResponseFiltersFieldsValue implements Model, JsonSerializable { - - public function __construct( private readonly int $distinctValues, private readonly string $type, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -52,12 +49,11 @@ public function getType(): string return $this->type; } - /** - * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner[] - */ + /** + * @return HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner[] + */ public function getValues(): array { return $this->values; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php index 52926a875..058a97faf 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner.php @@ -13,15 +13,12 @@ */ final class HttpMetricsTimelineUrls200ResponseFiltersFieldsValueValuesInner implements Model, JsonSerializable { - - public function __construct( private readonly string $value, private readonly int $count, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getCount(): int return $this->count; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php index 9fbab6817..0e7cfbc39 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimeline.php @@ -13,14 +13,11 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimeline implements Model, JsonSerializable { - - public function __construct( private readonly array $data, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php index 452fc4e95..fa9ee8918 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner.php @@ -13,8 +13,6 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -75,9 +72,9 @@ public function getResponseSize(): ?int return $this->responseSize; } - /** - * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue[]|null - */ + /** + * @return HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue[]|null + */ public function getUrls(): ?array { return $this->urls; @@ -88,4 +85,3 @@ public function getCodes(): ?HttpMetricsTimelineUrls200ResponseTopHitsTimelineDa return $this->codes; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php index 7fc12d44c..f71e25f94 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes.php @@ -13,8 +13,6 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerCodes implements Model, JsonSerializable { - - public function __construct( private readonly int $uNKNOWN, private readonly int $_1xX, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function get5xX(): int return $this->_5xX; } } - diff --git a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php index c3e6a148b..ce76ba016 100644 --- a/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php +++ b/src/Model/HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue.php @@ -13,15 +13,12 @@ */ final class HttpMetricsTimelineUrls200ResponseTopHitsTimelineDataInnerUrlsValue implements Model, JsonSerializable { - - public function __construct( private readonly int $count, private readonly ?float $impact, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getImpact(): ?float return $this->impact; } } - diff --git a/src/Model/HttpMetricsTimelineUserAgents200Response.php b/src/Model/HttpMetricsTimelineUserAgents200Response.php index 61cbc1290..4674ff5bc 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200Response.php +++ b/src/Model/HttpMetricsTimelineUserAgents200Response.php @@ -13,7 +13,6 @@ */ final class HttpMetricsTimelineUserAgents200Response implements Model, JsonSerializable { - public const _ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const _ENVIRONMENT_TYPE_STAGING = 'staging'; public const _ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -57,7 +56,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -212,4 +210,3 @@ public function getRequestDurationSlotsMode(): ?string return $this->requestDurationSlotsMode; } } - diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php index 95e9aecb2..7a06e5b93 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdown.php @@ -13,7 +13,6 @@ */ final class HttpMetricsTimelineUserAgents200ResponseBreakdown implements Model, JsonSerializable { - public const KIND_USER_AGENT = 'user_agent'; public function __construct( @@ -23,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,12 +51,11 @@ public function getTotal(): int return $this->total; } - /** - * @return HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner[] - */ + /** + * @return HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php index 9938c37c1..17759ca32 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner.php @@ -13,8 +13,6 @@ */ final class HttpMetricsTimelineUserAgents200ResponseBreakdownDataInner implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly float $impact, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -85,4 +82,3 @@ public function getTopHit(): bool return $this->topHit; } } - diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php index b3e5ce078..c37bf19c7 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline.php @@ -13,14 +13,11 @@ */ final class HttpMetricsTimelineUserAgents200ResponseTopHitsTimeline implements Model, JsonSerializable { - - public function __construct( private readonly array $data, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner[] - */ + /** + * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php index c37988cfc..464868af8 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner.php @@ -13,8 +13,6 @@ */ final class HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?float $totalConsumed = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,12 +56,11 @@ public function getTotalCount(): ?int return $this->totalCount; } - /** - * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue[]|null - */ + /** + * @return HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue[]|null + */ public function getData(): ?array { return $this->data; } } - diff --git a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php index 77e66d944..472e70c65 100644 --- a/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php +++ b/src/Model/HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue.php @@ -13,15 +13,12 @@ */ final class HttpMetricsTimelineUserAgents200ResponseTopHitsTimelineDataInnerDataValue implements Model, JsonSerializable { - - public function __construct( private readonly int $count, private readonly ?float $impact, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getImpact(): ?float return $this->impact; } } - diff --git a/src/Model/ImageTypeRestrictions.php b/src/Model/ImageTypeRestrictions.php index 1b85c6e52..eeabac03c 100644 --- a/src/Model/ImageTypeRestrictions.php +++ b/src/Model/ImageTypeRestrictions.php @@ -14,15 +14,12 @@ */ final class ImageTypeRestrictions implements Model, JsonSerializable { - - public function __construct( private readonly ?array $only = [], private readonly ?array $exclude = [], ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getExclude(): ?array return $this->exclude; } } - diff --git a/src/Model/ImagesValueValue.php b/src/Model/ImagesValueValue.php index c251b09ea..60299ad67 100644 --- a/src/Model/ImagesValueValue.php +++ b/src/Model/ImagesValueValue.php @@ -13,14 +13,11 @@ */ final class ImagesValueValue implements Model, JsonSerializable { - - public function __construct( private readonly bool $available, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getAvailable(): bool return $this->available; } } - diff --git a/src/Model/Integration.php b/src/Model/Integration.php index 64f0951cd..d3182684b 100644 --- a/src/Model/Integration.php +++ b/src/Model/Integration.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level Integration (auto-generated) * @@ -23,4 +21,3 @@ public function getType(): mixed; public function getRole(): mixed; } - diff --git a/src/Model/IntegrationCreateCreateInput.php b/src/Model/IntegrationCreateCreateInput.php index 70bf3cd74..9081fbfaf 100644 --- a/src/Model/IntegrationCreateCreateInput.php +++ b/src/Model/IntegrationCreateCreateInput.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level IntegrationCreateCreateInput (auto-generated) * @@ -21,4 +19,3 @@ public function __toString(): string; public function getType(): mixed; } - diff --git a/src/Model/IntegrationPatch.php b/src/Model/IntegrationPatch.php index d069f8d57..dc4cab74c 100644 --- a/src/Model/IntegrationPatch.php +++ b/src/Model/IntegrationPatch.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level IntegrationPatch (auto-generated) * @@ -21,4 +19,3 @@ public function __toString(): string; public function getType(): mixed; } - diff --git a/src/Model/Integrations.php b/src/Model/Integrations.php index 38ede9ec4..0ab94faae 100644 --- a/src/Model/Integrations.php +++ b/src/Model/Integrations.php @@ -13,8 +13,6 @@ */ final class Integrations implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly ?Config $config = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,9 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, integrations can be used - */ + /** + * If true, integrations can be used + */ public function getEnabled(): bool { return $this->enabled; @@ -60,4 +57,3 @@ public function getAllowedIntegrations(): ?array return $this->allowedIntegrations; } } - diff --git a/src/Model/Invoice.php b/src/Model/Invoice.php index df43614aa..4aad8cf51 100644 --- a/src/Model/Invoice.php +++ b/src/Model/Invoice.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class Invoice implements Model, JsonSerializable { - public const TYPE_INVOICE = 'invoice'; public const TYPE_CREDIT_MEMO = 'credit_memo'; public const STATUS_PAID = 'paid'; @@ -26,10 +26,10 @@ final class Invoice implements Model, JsonSerializable public function __construct( private readonly ?string $relatedInvoiceId = null, - private readonly ?\DateTime $invoiceDate = null, - private readonly ?\DateTime $invoiceDue = null, - private readonly ?\DateTime $created = null, - private readonly ?\DateTime $changed = null, + private readonly ?DateTime $invoiceDate = null, + private readonly ?DateTime $invoiceDue = null, + private readonly ?DateTime $created = null, + private readonly ?DateTime $changed = null, private readonly ?string $id = null, private readonly ?string $invoiceNumber = null, private readonly ?string $type = null, @@ -44,7 +44,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -77,132 +76,131 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The invoice id. - */ + /** + * The invoice id. + */ public function getId(): ?string { return $this->id; } - /** - * The invoice number. - */ + /** + * The invoice number. + */ public function getInvoiceNumber(): ?string { return $this->invoiceNumber; } - /** - * Invoice type. - */ + /** + * Invoice type. + */ public function getType(): ?string { return $this->type; } - /** - * The id of the related order. - */ + /** + * The id of the related order. + */ public function getOrderId(): ?string { return $this->orderId; } - /** - * If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice. - */ + /** + * If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice. + */ public function getRelatedInvoiceId(): ?string { return $this->relatedInvoiceId; } - /** - * The invoice status. - */ + /** + * The invoice status. + */ public function getStatus(): ?string { return $this->status; } - /** - * The ULID of the owner. - */ + /** + * The ULID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * The invoice date. - */ - public function getInvoiceDate(): ?\DateTime + /** + * The invoice date. + */ + public function getInvoiceDate(): ?DateTime { return $this->invoiceDate; } - /** - * The invoice due date. - */ - public function getInvoiceDue(): ?\DateTime + /** + * The invoice due date. + */ + public function getInvoiceDue(): ?DateTime { return $this->invoiceDue; } - /** - * The time when the invoice was created. - */ - public function getCreated(): ?\DateTime + /** + * The time when the invoice was created. + */ + public function getCreated(): ?DateTime { return $this->created; } - /** - * The time when the invoice was changed. - */ - public function getChanged(): ?\DateTime + /** + * The time when the invoice was changed. + */ + public function getChanged(): ?DateTime { return $this->changed; } - /** - * Company name (if any). - */ + /** + * Company name (if any). + */ public function getCompany(): ?string { return $this->company; } - /** - * The invoice total. - */ + /** + * The invoice total. + */ public function getTotal(): ?float { return $this->total; } - /** - * The address of the user. - */ + /** + * The address of the user. + */ public function getAddress(): ?Address { return $this->address; } - /** - * The invoice note. - */ + /** + * The invoice note. + */ public function getNotes(): ?string { return $this->notes; } - /** - * Invoice PDF document details. - */ + /** + * Invoice PDF document details. + */ public function getInvoicePdf(): ?InvoicePDF { return $this->invoicePdf; } } - diff --git a/src/Model/InvoicePDF.php b/src/Model/InvoicePDF.php index c37379087..3a0225345 100644 --- a/src/Model/InvoicePDF.php +++ b/src/Model/InvoicePDF.php @@ -14,7 +14,6 @@ */ final class InvoicePDF implements Model, JsonSerializable { - public const STATUS_READY = 'ready'; public const STATUS_PENDING = 'pending'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,22 +41,21 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * A link to the PDF invoice. - */ + /** + * A link to the PDF invoice. + */ public function getUrl(): ?string { return $this->url; } - /** - * The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not - * be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF - * is not created but queued up. If you get this status, try again later. - */ + /** + * The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not + * be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF + * is not created but queued up. If you get this status, try again later. + */ public function getStatus(): ?string { return $this->status; } } - diff --git a/src/Model/IssuerInner.php b/src/Model/IssuerInner.php index 4c60ce8f0..6cea49b52 100644 --- a/src/Model/IssuerInner.php +++ b/src/Model/IssuerInner.php @@ -13,8 +13,6 @@ */ final class IssuerInner implements Model, JsonSerializable { - - public function __construct( private readonly string $oid, private readonly string $value, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getValue(): string return $this->value; } } - diff --git a/src/Model/KubernetesDeploymentTargetStorage.php b/src/Model/KubernetesDeploymentTargetStorage.php index 2acb5b159..f8be8c69d 100644 --- a/src/Model/KubernetesDeploymentTargetStorage.php +++ b/src/Model/KubernetesDeploymentTargetStorage.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTarget; /** * Low level KubernetesDeploymentTargetStorage (auto-generated) @@ -14,7 +13,6 @@ */ final class KubernetesDeploymentTargetStorage implements Model, JsonSerializable, DeploymentTarget { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,52 +50,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } - /** - * K8S config - */ + /** + * K8S config + */ public function getK8sConfig(): ?string { return $this->k8sConfig; } - /** - * The bastion-nodes ssh user - */ + /** + * The bastion-nodes ssh user + */ public function getBastionNodesUser(): ?string { return $this->bastionNodesUser; } - /** - * The bastion node endpoint - */ + /** + * The bastion node endpoint + */ public function getBastionNodesHost(): ?string { return $this->bastionNodesHost; } - /** - * The identifier of KubernetesDeploymentTargetStorage - */ + /** + * The identifier of KubernetesDeploymentTargetStorage + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/KubernetesDeploymentTargetStorageCreateInput.php b/src/Model/KubernetesDeploymentTargetStorageCreateInput.php index 3210afbd2..5cf3654db 100644 --- a/src/Model/KubernetesDeploymentTargetStorageCreateInput.php +++ b/src/Model/KubernetesDeploymentTargetStorageCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetCreateInput; /** * Low level KubernetesDeploymentTargetStorageCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class KubernetesDeploymentTargetStorageCreateInput implements Model, JsonSerializable, DeploymentTargetCreateInput { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,20 +42,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } } - diff --git a/src/Model/KubernetesDeploymentTargetStoragePatch.php b/src/Model/KubernetesDeploymentTargetStoragePatch.php index 53d8adc8b..77b96caac 100644 --- a/src/Model/KubernetesDeploymentTargetStoragePatch.php +++ b/src/Model/KubernetesDeploymentTargetStoragePatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DeploymentTargetPatch; /** * Low level KubernetesDeploymentTargetStoragePatch (auto-generated) @@ -14,7 +13,6 @@ */ final class KubernetesDeploymentTargetStoragePatch implements Model, JsonSerializable, DeploymentTargetPatch { - public const TYPE_DEDICATED = 'dedicated'; public const TYPE_ENTERPRISE = 'enterprise'; public const TYPE_FOUNDATION = 'foundation'; @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,20 +42,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the deployment target - */ + /** + * The type of the deployment target + */ public function getType(): string { return $this->type; } - /** - * The name of the deployment target - */ + /** + * The name of the deployment target + */ public function getName(): string { return $this->name; } } - diff --git a/src/Model/LastDeploymentCommandsInner.php b/src/Model/LastDeploymentCommandsInner.php index f3dea5eaf..558861620 100644 --- a/src/Model/LastDeploymentCommandsInner.php +++ b/src/Model/LastDeploymentCommandsInner.php @@ -13,8 +13,6 @@ */ final class LastDeploymentCommandsInner implements Model, JsonSerializable { - - public function __construct( private readonly string $app, private readonly string $type, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getExitCode(): int return $this->exitCode; } } - diff --git a/src/Model/LineItem.php b/src/Model/LineItem.php index 80846ade1..6e4e96198 100644 --- a/src/Model/LineItem.php +++ b/src/Model/LineItem.php @@ -14,7 +14,6 @@ */ final class LineItem implements Model, JsonSerializable { - public const TYPE_PROJECT_PLAN = 'project_plan'; public const TYPE_PROJECT_FEATURE = 'project_feature'; public const TYPE_PROJECT_SUBTOTAL = 'project_subtotal'; @@ -35,7 +34,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -61,77 +59,76 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of line item. - */ + /** + * The type of line item. + */ public function getType(): ?string { return $this->type; } - /** - * The associated subscription identifier. - */ + /** + * The associated subscription identifier. + */ public function getLicenseId(): ?float { return $this->licenseId; } - /** - * The associated project identifier. - */ + /** + * The associated project identifier. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * Display name of the line item product. - */ + /** + * Display name of the line item product. + */ public function getProduct(): ?string { return $this->product; } - /** - * The line item product SKU. - */ + /** + * The line item product SKU. + */ public function getSku(): ?string { return $this->sku; } - /** - * Total price as a decimal. - */ + /** + * Total price as a decimal. + */ public function getTotal(): ?float { return $this->total; } - /** - * Total price, formatted with currency. - */ + /** + * Total price, formatted with currency. + */ public function getTotalFormatted(): ?string { return $this->totalFormatted; } - /** - * The price components for the line item, keyed by type. - * @return LineItemComponent[]|null - */ + /** + * The price components for the line item, keyed by type. + * @return LineItemComponent[]|null + */ public function getComponents(): ?array { return $this->components; } - /** - * Line item should not be considered billable. - */ + /** + * Line item should not be considered billable. + */ public function getExcludeFromInvoice(): ?bool { return $this->excludeFromInvoice; } } - diff --git a/src/Model/LineItemComponent.php b/src/Model/LineItemComponent.php index da18f78f0..f7b311e66 100644 --- a/src/Model/LineItemComponent.php +++ b/src/Model/LineItemComponent.php @@ -14,8 +14,6 @@ */ final class LineItemComponent implements Model, JsonSerializable { - - public function __construct( private readonly ?float $amount = null, private readonly ?string $amountFormatted = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The price as a decimal. - */ + /** + * The price as a decimal. + */ public function getAmount(): ?float { return $this->amount; } - /** - * The price formatted with currency. - */ + /** + * The price formatted with currency. + */ public function getAmountFormatted(): ?string { return $this->amountFormatted; } - /** - * The display title for the component. - */ + /** + * The display title for the component. + */ public function getDisplayTitle(): ?string { return $this->displayTitle; } - /** - * The currency code for the component. - */ + /** + * The currency code for the component. + */ public function getCurrency(): ?string { return $this->currency; } } - diff --git a/src/Model/Link.php b/src/Model/Link.php index dd847b822..bf69ced9b 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -14,14 +14,11 @@ */ final class Link implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/ListApplications200Response.php b/src/Model/ListApplications200Response.php index cc7669a4d..a5b100173 100644 --- a/src/Model/ListApplications200Response.php +++ b/src/Model/ListApplications200Response.php @@ -13,14 +13,11 @@ */ final class ListApplications200Response implements Model, JsonSerializable { - - public function __construct( private readonly array $applications, ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return ListApplications200ResponseApplicationsValue[] - */ + /** + * @return ListApplications200ResponseApplicationsValue[] + */ public function getApplications(): array { return $this->applications; } } - diff --git a/src/Model/ListApplications200ResponseApplicationsValue.php b/src/Model/ListApplications200ResponseApplicationsValue.php index 2d035c374..7f9936fe5 100644 --- a/src/Model/ListApplications200ResponseApplicationsValue.php +++ b/src/Model/ListApplications200ResponseApplicationsValue.php @@ -13,8 +13,6 @@ */ final class ListApplications200ResponseApplicationsValue implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly array $profileTypes, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,9 +44,9 @@ public function getName(): string return $this->name; } - /** - * @return ListApplications200ResponseApplicationsValueProfileTypesValue[] - */ + /** + * @return ListApplications200ResponseApplicationsValueProfileTypesValue[] + */ public function getProfileTypes(): array { return $this->profileTypes; @@ -60,4 +57,3 @@ public function getLanguages(): array return $this->languages; } } - diff --git a/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php b/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php index 9a77f8b24..3be4900ef 100644 --- a/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php +++ b/src/Model/ListApplications200ResponseApplicationsValueProfileTypesValue.php @@ -13,7 +13,6 @@ */ final class ListApplications200ResponseApplicationsValueProfileTypesValue implements Model, JsonSerializable { - public const AGGREGATION_AVG = 'avg'; public const AGGREGATION_SUM = 'sum'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -73,4 +71,3 @@ public function getAggregation(): string return $this->aggregation; } } - diff --git a/src/Model/ListApplications400Response.php b/src/Model/ListApplications400Response.php index 3e4ab4865..93799276a 100644 --- a/src/Model/ListApplications400Response.php +++ b/src/Model/ListApplications400Response.php @@ -13,15 +13,12 @@ */ final class ListApplications400Response implements Model, JsonSerializable { - - public function __construct( private readonly int $code, private readonly string $message, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMessage(): string return $this->message; } } - diff --git a/src/Model/ListApplications499Response.php b/src/Model/ListApplications499Response.php index dd92495e1..184b17a68 100644 --- a/src/Model/ListApplications499Response.php +++ b/src/Model/ListApplications499Response.php @@ -13,15 +13,12 @@ */ final class ListApplications499Response implements Model, JsonSerializable { - - public function __construct( private readonly int $code, private readonly string $message, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMessage(): string return $this->message; } } - diff --git a/src/Model/ListLinks.php b/src/Model/ListLinks.php index 2d4c24d95..b44579db4 100644 --- a/src/Model/ListLinks.php +++ b/src/Model/ListLinks.php @@ -13,8 +13,6 @@ */ final class ListLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?Link $self = null, private readonly ?Link $previous = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * A hypermedia link to the {current, next, previous} set of items. - */ + /** + * A hypermedia link to the {current, next, previous} set of items. + */ public function getSelf(): ?Link { return $this->self; } - /** - * A hypermedia link to the {current, next, previous} set of items. - */ + /** + * A hypermedia link to the {current, next, previous} set of items. + */ public function getPrevious(): ?Link { return $this->previous; } - /** - * A hypermedia link to the {current, next, previous} set of items. - */ + /** + * A hypermedia link to the {current, next, previous} set of items. + */ public function getNext(): ?Link { return $this->next; } } - diff --git a/src/Model/ListOrgDiscounts200Response.php b/src/Model/ListOrgDiscounts200Response.php index 6555024b5..370c83637 100644 --- a/src/Model/ListOrgDiscounts200Response.php +++ b/src/Model/ListOrgDiscounts200Response.php @@ -13,15 +13,12 @@ */ final class ListOrgDiscounts200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Discount[]|null - */ + /** + * @return Discount[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgInvoices200Response.php b/src/Model/ListOrgInvoices200Response.php index 6e5eec3f2..58ef2b7f0 100644 --- a/src/Model/ListOrgInvoices200Response.php +++ b/src/Model/ListOrgInvoices200Response.php @@ -13,14 +13,11 @@ */ final class ListOrgInvoices200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Invoice[]|null - */ + /** + * @return Invoice[]|null + */ public function getItems(): ?array { return $this->items; } } - diff --git a/src/Model/ListOrgMembers200Response.php b/src/Model/ListOrgMembers200Response.php index 824d2978a..9db75b0a0 100644 --- a/src/Model/ListOrgMembers200Response.php +++ b/src/Model/ListOrgMembers200Response.php @@ -13,8 +13,6 @@ */ final class ListOrgMembers200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,9 +44,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return OrganizationMember[]|null - */ + /** + * @return OrganizationMember[]|null + */ public function getItems(): ?array { return $this->items; @@ -60,4 +57,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgOrders200Response.php b/src/Model/ListOrgOrders200Response.php index 29b01e880..56f638daf 100644 --- a/src/Model/ListOrgOrders200Response.php +++ b/src/Model/ListOrgOrders200Response.php @@ -13,15 +13,12 @@ */ final class ListOrgOrders200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Order[]|null - */ + /** + * @return Order[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgPlanRecords200Response.php b/src/Model/ListOrgPlanRecords200Response.php index be4082ae2..ae57a2d17 100644 --- a/src/Model/ListOrgPlanRecords200Response.php +++ b/src/Model/ListOrgPlanRecords200Response.php @@ -13,15 +13,12 @@ */ final class ListOrgPlanRecords200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return PlanRecords[]|null - */ + /** + * @return PlanRecords[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgPrepaymentTransactions200Response.php b/src/Model/ListOrgPrepaymentTransactions200Response.php index 68c94203b..bf7a9df9e 100644 --- a/src/Model/ListOrgPrepaymentTransactions200Response.php +++ b/src/Model/ListOrgPrepaymentTransactions200Response.php @@ -13,8 +13,6 @@ */ final class ListOrgPrepaymentTransactions200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $transactions = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,9 +44,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return PrepaymentTransactionObject[]|null - */ + /** + * @return PrepaymentTransactionObject[]|null + */ public function getTransactions(): ?array { return $this->transactions; @@ -60,4 +57,3 @@ public function getLinks(): ?ListOrgPrepaymentTransactions200ResponseLinks return $this->links; } } - diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php index 23e67e4b4..23ba71e9b 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinks.php @@ -13,8 +13,6 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?ListOrgPrepaymentTransactions200ResponseLinksSelf $self = null, private readonly ?ListOrgPrepaymentTransactions200ResponseLinksPrevious $previous = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getPrepayment(): ?ListOrgPrepaymentTransactions200ResponseLinksP return $this->prepayment; } } - diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php index 790f29f5c..a5dfb8b53 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksNext.php @@ -13,14 +13,11 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksNext implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): ?string return $this->href; } } - diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php index 1b16dafbe..f7bc08216 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrepayment.php @@ -13,14 +13,11 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksPrepayment implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): ?string return $this->href; } } - diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php index c8d993d32..ec8ccd4bf 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksPrevious.php @@ -13,14 +13,11 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksPrevious implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): ?string return $this->href; } } - diff --git a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php index f69eb9300..d10eb51e6 100644 --- a/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php +++ b/src/Model/ListOrgPrepaymentTransactions200ResponseLinksSelf.php @@ -13,14 +13,11 @@ */ final class ListOrgPrepaymentTransactions200ResponseLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): ?string return $this->href; } } - diff --git a/src/Model/ListOrgProjectHistory200Response.php b/src/Model/ListOrgProjectHistory200Response.php index 82ddcbeeb..2b6e26967 100644 --- a/src/Model/ListOrgProjectHistory200Response.php +++ b/src/Model/ListOrgProjectHistory200Response.php @@ -13,8 +13,6 @@ */ final class ListOrgProjectHistory200Response implements Model, JsonSerializable { - - public function __construct( private readonly int $count, private readonly array $items, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,9 +44,9 @@ public function getCount(): int return $this->count; } - /** - * @return History[] - */ + /** + * @return History[] + */ public function getItems(): array { return $this->items; @@ -60,4 +57,3 @@ public function getLinks(): ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgProjects200Response.php b/src/Model/ListOrgProjects200Response.php index b1fe96770..de22e87be 100644 --- a/src/Model/ListOrgProjects200Response.php +++ b/src/Model/ListOrgProjects200Response.php @@ -13,8 +13,6 @@ */ final class ListOrgProjects200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,17 +46,17 @@ public function getCount(): ?int return $this->count; } - /** - * @return OrganizationProject[]|null - */ + /** + * @return OrganizationProject[]|null + */ public function getItems(): ?array { return $this->items; } - /** - * Facets for filtering options. - */ + /** + * Facets for filtering options. + */ public function getFacets(): ?ProjectFacets { return $this->facets; @@ -70,4 +67,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgSubscriptions200Response.php b/src/Model/ListOrgSubscriptions200Response.php index 80a690ea7..4970f97e5 100644 --- a/src/Model/ListOrgSubscriptions200Response.php +++ b/src/Model/ListOrgSubscriptions200Response.php @@ -13,8 +13,6 @@ */ final class ListOrgSubscriptions200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,9 +44,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return Subscription[]|null - */ + /** + * @return Subscription[]|null + */ public function getItems(): ?array { return $this->items; @@ -60,4 +57,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgUsageRecords200Response.php b/src/Model/ListOrgUsageRecords200Response.php index 9f3c4f6cd..0b7bf4bbc 100644 --- a/src/Model/ListOrgUsageRecords200Response.php +++ b/src/Model/ListOrgUsageRecords200Response.php @@ -13,15 +13,12 @@ */ final class ListOrgUsageRecords200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Usage[]|null - */ + /** + * @return Usage[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListOrgs200Response.php b/src/Model/ListOrgs200Response.php index 0e028ed67..5ec955b3d 100644 --- a/src/Model/ListOrgs200Response.php +++ b/src/Model/ListOrgs200Response.php @@ -13,8 +13,6 @@ */ final class ListOrgs200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $items = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,9 +44,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return Organization[]|null - */ + /** + * @return Organization[]|null + */ public function getItems(): ?array { return $this->items; @@ -60,4 +57,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListProfiles200Response.php b/src/Model/ListProfiles200Response.php index 97b59c120..3a7acba80 100644 --- a/src/Model/ListProfiles200Response.php +++ b/src/Model/ListProfiles200Response.php @@ -13,8 +13,6 @@ */ final class ListProfiles200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $profiles = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,20 +44,19 @@ public function getCount(): ?int return $this->count; } - /** - * @return Profile[]|null - */ + /** + * @return Profile[]|null + */ public function getProfiles(): ?array { return $this->profiles; } - /** - * Links to _self, and previous or next page, given that they exist. - */ + /** + * Links to _self, and previous or next page, given that they exist. + */ public function getLinks(): ?HalLinks { return $this->links; } } - diff --git a/src/Model/ListProjectTeamAccess200Response.php b/src/Model/ListProjectTeamAccess200Response.php index 0f7480fc0..d9b31624f 100644 --- a/src/Model/ListProjectTeamAccess200Response.php +++ b/src/Model/ListProjectTeamAccess200Response.php @@ -13,15 +13,12 @@ */ final class ListProjectTeamAccess200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return TeamProjectAccess[]|null - */ + /** + * @return TeamProjectAccess[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListProjectUserAccess200Response.php b/src/Model/ListProjectUserAccess200Response.php index 403ebfba2..536de02dc 100644 --- a/src/Model/ListProjectUserAccess200Response.php +++ b/src/Model/ListProjectUserAccess200Response.php @@ -13,15 +13,12 @@ */ final class ListProjectUserAccess200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UserProjectAccess[]|null - */ + /** + * @return UserProjectAccess[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListRegions200Response.php b/src/Model/ListRegions200Response.php index 21673716f..c4434aed8 100644 --- a/src/Model/ListRegions200Response.php +++ b/src/Model/ListRegions200Response.php @@ -13,8 +13,6 @@ */ final class ListRegions200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $regions = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,9 +44,9 @@ public function getCount(): ?int return $this->count; } - /** - * @return Region[]|null - */ + /** + * @return Region[]|null + */ public function getRegions(): ?array { return $this->regions; @@ -60,4 +57,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListTeamMembers200Response.php b/src/Model/ListTeamMembers200Response.php index 59097a602..44ececc52 100644 --- a/src/Model/ListTeamMembers200Response.php +++ b/src/Model/ListTeamMembers200Response.php @@ -13,15 +13,12 @@ */ final class ListTeamMembers200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return TeamMember[]|null - */ + /** + * @return TeamMember[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListTeams200Response.php b/src/Model/ListTeams200Response.php index 7cd5bf5c0..e030266f0 100644 --- a/src/Model/ListTeams200Response.php +++ b/src/Model/ListTeams200Response.php @@ -13,8 +13,6 @@ */ final class ListTeams200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?int $count = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -41,9 +38,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Team[]|null - */ + /** + * @return Team[]|null + */ public function getItems(): ?array { return $this->items; @@ -59,4 +56,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListTicketCategories200ResponseInner.php b/src/Model/ListTicketCategories200ResponseInner.php index 6f863f042..45412638f 100644 --- a/src/Model/ListTicketCategories200ResponseInner.php +++ b/src/Model/ListTicketCategories200ResponseInner.php @@ -13,15 +13,12 @@ */ final class ListTicketCategories200ResponseInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $label = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getLabel(): ?string return $this->label; } } - diff --git a/src/Model/ListTicketPriorities200ResponseInner.php b/src/Model/ListTicketPriorities200ResponseInner.php index 961088d87..dd1ee58f0 100644 --- a/src/Model/ListTicketPriorities200ResponseInner.php +++ b/src/Model/ListTicketPriorities200ResponseInner.php @@ -13,8 +13,6 @@ */ final class ListTicketPriorities200ResponseInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $label = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getDescription(): ?string return $this->description; } } - diff --git a/src/Model/ListTickets200Response.php b/src/Model/ListTickets200Response.php index 02420c26e..f6c5860d8 100644 --- a/src/Model/ListTickets200Response.php +++ b/src/Model/ListTickets200Response.php @@ -13,8 +13,6 @@ */ final class ListTickets200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?array $tickets = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,20 +44,19 @@ public function getCount(): ?int return $this->count; } - /** - * @return Ticket[]|null - */ + /** + * @return Ticket[]|null + */ public function getTickets(): ?array { return $this->tickets; } - /** - * Links to _self, and previous or next page, given that they exist. - */ + /** + * Links to _self, and previous or next page, given that they exist. + */ public function getLinks(): ?HalLinks { return $this->links; } } - diff --git a/src/Model/ListUserExtendedAccess200Response.php b/src/Model/ListUserExtendedAccess200Response.php index add729cc4..67d222c85 100644 --- a/src/Model/ListUserExtendedAccess200Response.php +++ b/src/Model/ListUserExtendedAccess200Response.php @@ -13,15 +13,12 @@ */ final class ListUserExtendedAccess200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return ListUserExtendedAccess200ResponseItemsInner[]|null - */ + /** + * @return ListUserExtendedAccess200ResponseItemsInner[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/ListUserExtendedAccess200ResponseItemsInner.php b/src/Model/ListUserExtendedAccess200ResponseItemsInner.php index e5ab0087b..68ddcfb8c 100644 --- a/src/Model/ListUserExtendedAccess200ResponseItemsInner.php +++ b/src/Model/ListUserExtendedAccess200ResponseItemsInner.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class ListUserExtendedAccess200ResponseItemsInner implements Model, JsonSerializable { - public const RESOURCE_TYPE_PROJECT = 'project'; public const RESOURCE_TYPE_ORGANIZATION = 'organization'; @@ -23,12 +23,11 @@ public function __construct( private readonly ?string $resourceType = null, private readonly ?string $organizationId = null, private readonly ?array $permissions = [], - private readonly ?\DateTime $grantedAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $grantedAt = null, + private readonly ?DateTime $updatedAt = null, ) { } - public function getModelName(): string { return self::class; @@ -77,14 +76,13 @@ public function getPermissions(): ?array return $this->permissions; } - public function getGrantedAt(): ?\DateTime + public function getGrantedAt(): ?DateTime { return $this->grantedAt; } - public function getUpdatedAt(): ?\DateTime + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } } - diff --git a/src/Model/ListUserOrgs200Response.php b/src/Model/ListUserOrgs200Response.php index 49618631f..3ab3a6cf8 100644 --- a/src/Model/ListUserOrgs200Response.php +++ b/src/Model/ListUserOrgs200Response.php @@ -13,15 +13,12 @@ */ final class ListUserOrgs200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?array $items = [], private readonly ?ListLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -39,9 +36,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Organization[]|null - */ + /** + * @return Organization[]|null + */ public function getItems(): ?array { return $this->items; @@ -52,4 +49,3 @@ public function getLinks(): ?ListLinks return $this->links; } } - diff --git a/src/Model/LogsForwarding.php b/src/Model/LogsForwarding.php index dff8b74d2..a2b6d49de 100644 --- a/src/Model/LogsForwarding.php +++ b/src/Model/LogsForwarding.php @@ -13,14 +13,11 @@ */ final class LogsForwarding implements Model, JsonSerializable { - - public function __construct( private readonly int $maxExtraPayloadSize, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Limit on the maximum size for the custom extra attributes added to the forwarded logs payload - */ + /** + * Limit on the maximum size for the custom extra attributes added to the forwarded logs payload + */ public function getMaxExtraPayloadSize(): int { return $this->maxExtraPayloadSize; } } - diff --git a/src/Model/Maintenance.php b/src/Model/Maintenance.php index 7fe118725..63c3e107c 100644 --- a/src/Model/Maintenance.php +++ b/src/Model/Maintenance.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,14 +15,11 @@ */ final class Maintenance implements Model, JsonSerializable { - - public function __construct( - private readonly \DateTime $nextMaintenance, + private readonly DateTime $nextMaintenance, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +37,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Estimated date and time of the next maintenance activity - */ - public function getNextMaintenance(): \DateTime + /** + * Estimated date and time of the next maintenance activity + */ + public function getNextMaintenance(): DateTime { return $this->nextMaintenance; } } - diff --git a/src/Model/MaintenanceWindowConfiguration.php b/src/Model/MaintenanceWindowConfiguration.php index 1d32772c3..da2a15db7 100644 --- a/src/Model/MaintenanceWindowConfiguration.php +++ b/src/Model/MaintenanceWindowConfiguration.php @@ -14,14 +14,11 @@ */ final class MaintenanceWindowConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly Recurrence $recurrence, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Defines the recurring schedule for the maintenance window - */ + /** + * Defines the recurring schedule for the maintenance window + */ public function getRecurrence(): Recurrence { return $this->recurrence; } } - diff --git a/src/Model/MergeInfo.php b/src/Model/MergeInfo.php index 2ce06cdc1..1880926ba 100644 --- a/src/Model/MergeInfo.php +++ b/src/Model/MergeInfo.php @@ -14,8 +14,6 @@ */ final class MergeInfo implements Model, JsonSerializable { - - public function __construct( private readonly ?int $commitsAhead, private readonly ?int $commitsBehind, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The amount of commits that are in the environment but not in the parent - */ + /** + * The amount of commits that are in the environment but not in the parent + */ public function getCommitsAhead(): ?int { return $this->commitsAhead; } - /** - * The amount of commits that are in the parent but not in the environment - */ + /** + * The amount of commits that are in the parent but not in the environment + */ public function getCommitsBehind(): ?int { return $this->commitsBehind; } - /** - * The reference in Git for the parent environment - */ + /** + * The reference in Git for the parent environment + */ public function getParentRef(): ?string { return $this->parentRef; } } - diff --git a/src/Model/Metrics.php b/src/Model/Metrics.php index 57561adf1..3aa1103bd 100644 --- a/src/Model/Metrics.php +++ b/src/Model/Metrics.php @@ -13,14 +13,11 @@ */ final class Metrics implements Model, JsonSerializable { - - public function __construct( private readonly string $maxRange, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Limit on the maximum time range allowed in metrics retrieval - */ + /** + * Limit on the maximum time range allowed in metrics retrieval + */ public function getMaxRange(): string { return $this->maxRange; } } - diff --git a/src/Model/MetricsMetadata.php b/src/Model/MetricsMetadata.php index bf1557e96..853eaa31d 100644 --- a/src/Model/MetricsMetadata.php +++ b/src/Model/MetricsMetadata.php @@ -13,8 +13,6 @@ */ final class MetricsMetadata implements Model, JsonSerializable { - - public function __construct( private readonly mixed $from = null, private readonly mixed $to = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,36 +41,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The value used to calculate the lower bound of the temporal query. Inclusive. - */ + /** + * The value used to calculate the lower bound of the temporal query. Inclusive. + */ public function getFrom(): mixed { return $this->from; } - /** - * The truncated value used to calculate the upper bound of the temporal query. Exclusive. - */ + /** + * The truncated value used to calculate the upper bound of the temporal query. Exclusive. + */ public function getTo(): mixed { return $this->to; } - /** - * The interval used to group the metric values. - */ + /** + * The interval used to group the metric values. + */ public function getInterval(): mixed { return $this->interval; } - /** - * The units associated with the provided values. - */ + /** + * The units associated with the provided values. + */ public function getUnits(): mixed { return $this->units; } } - diff --git a/src/Model/MetricsValue.php b/src/Model/MetricsValue.php index 7302fd1d8..578419b58 100644 --- a/src/Model/MetricsValue.php +++ b/src/Model/MetricsValue.php @@ -13,15 +13,12 @@ */ final class MetricsValue implements Model, JsonSerializable { - - public function __construct( private readonly mixed $value = null, private readonly mixed $startTime = null, ) { } - public function getModelName(): string { return self::class; @@ -40,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The measured value of the metric for the given time interval. - */ + /** + * The measured value of the metric for the given time interval. + */ public function getValue(): mixed { return $this->value; } - /** - * The timestamp at which the time interval began. - */ + /** + * The timestamp at which the time interval began. + */ public function getStartTime(): mixed { return $this->startTime; } } - diff --git a/src/Model/MinimumResources.php b/src/Model/MinimumResources.php index 2f5d1a661..3d1564486 100644 --- a/src/Model/MinimumResources.php +++ b/src/Model/MinimumResources.php @@ -13,7 +13,6 @@ */ final class MinimumResources implements Model, JsonSerializable { - public const CPU_TYPE_GUARANTEED = 'guaranteed'; public const CPU_TYPE_SHARED = 'shared'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -73,4 +71,3 @@ public function getProfileSize(): ?string return $this->profileSize; } } - diff --git a/src/Model/Mode.php b/src/Model/Mode.php index 7084ff000..8456bd8a7 100644 --- a/src/Model/Mode.php +++ b/src/Model/Mode.php @@ -66,4 +66,3 @@ public function __toString(): string return $this->value; } } - diff --git a/src/Model/MountsValue.php b/src/Model/MountsValue.php index 9f0d8f57d..9a047eb89 100644 --- a/src/Model/MountsValue.php +++ b/src/Model/MountsValue.php @@ -13,7 +13,6 @@ */ final class MountsValue implements Model, JsonSerializable { - public const SOURCE_INSTANCE = 'instance'; public const SOURCE_LOCAL = 'local'; public const SOURCE_SERVICE = 'service'; @@ -28,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,4 +61,3 @@ public function getService(): ?string return $this->service; } } - diff --git a/src/Model/NewRelic.php b/src/Model/NewRelic.php index c036794f2..041a7d45c 100644 --- a/src/Model/NewRelic.php +++ b/src/Model/NewRelic.php @@ -14,15 +14,12 @@ */ final class NewRelic implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/NewRelicIntegration.php b/src/Model/NewRelicIntegration.php index fa94f16a6..660c28dd5 100644 --- a/src/Model/NewRelicIntegration.php +++ b/src/Model/NewRelicIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level NewRelicIntegration (auto-generated) @@ -14,8 +14,6 @@ */ final class NewRelicIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, @@ -23,13 +21,12 @@ public function __construct( private readonly string $url, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -55,33 +52,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -92,17 +89,17 @@ public function getExtra(): array return $this->extra; } - /** - * The NewRelic Logs endpoint - */ + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -113,12 +110,11 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of NewRelicIntegration - */ + /** + * The identifier of NewRelicIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/NewRelicIntegrationCreateInput.php b/src/Model/NewRelicIntegrationCreateInput.php index ac23a6542..e075d433d 100644 --- a/src/Model/NewRelicIntegrationCreateInput.php +++ b/src/Model/NewRelicIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level NewRelicIntegrationCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class NewRelicIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,25 +45,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The NewRelic Logs endpoint - */ + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The NewRelic Logs License Key - */ + /** + * The NewRelic Logs License Key + */ public function getLicenseKey(): string { return $this->licenseKey; @@ -78,9 +74,9 @@ public function getExtra(): ?array return $this->extra; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -91,4 +87,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/NewRelicIntegrationPatch.php b/src/Model/NewRelicIntegrationPatch.php index 19a009262..d88406d8a 100644 --- a/src/Model/NewRelicIntegrationPatch.php +++ b/src/Model/NewRelicIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level NewRelicIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class NewRelicIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,25 +45,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The NewRelic Logs endpoint - */ + /** + * The NewRelic Logs endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The NewRelic Logs License Key - */ + /** + * The NewRelic Logs License Key + */ public function getLicenseKey(): string { return $this->licenseKey; @@ -78,9 +74,9 @@ public function getExtra(): ?array return $this->extra; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -91,4 +87,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/OAuth2Consumer.php b/src/Model/OAuth2Consumer.php index 0c87aeb29..abc40eb29 100644 --- a/src/Model/OAuth2Consumer.php +++ b/src/Model/OAuth2Consumer.php @@ -14,14 +14,11 @@ */ final class OAuth2Consumer implements Model, JsonSerializable { - - public function __construct( private readonly string $key, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The OAuth consumer key. - */ + /** + * The OAuth consumer key. + */ public function getKey(): string { return $this->key; } } - diff --git a/src/Model/OAuth2Consumer1.php b/src/Model/OAuth2Consumer1.php index e7b44e777..01d56685e 100644 --- a/src/Model/OAuth2Consumer1.php +++ b/src/Model/OAuth2Consumer1.php @@ -14,15 +14,12 @@ */ final class OAuth2Consumer1 implements Model, JsonSerializable { - - public function __construct( private readonly string $key, private readonly string $secret, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The OAuth consumer key. - */ + /** + * The OAuth consumer key. + */ public function getKey(): string { return $this->key; } - /** - * The OAuth consumer secret. - */ + /** + * The OAuth consumer secret. + */ public function getSecret(): string { return $this->secret; } } - diff --git a/src/Model/OCIImage.php b/src/Model/OCIImage.php index 88a927671..001724ff3 100644 --- a/src/Model/OCIImage.php +++ b/src/Model/OCIImage.php @@ -13,15 +13,12 @@ */ final class OCIImage implements Model, JsonSerializable { - - public function __construct( private readonly ?string $name = null, private readonly ?string $buildfile = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getBuildfile(): ?string return $this->buildfile; } } - diff --git a/src/Model/Object.php b/src/Model/Object.php index 95c8eeddb..5d5801dc0 100644 --- a/src/Model/Object.php +++ b/src/Model/Object.php @@ -14,15 +14,12 @@ */ final class Object implements Model, JsonSerializable { - - public function __construct( private readonly string $type, private readonly string $sha, ) { } - public function getModelName(): string { return self::class; @@ -41,9 +38,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of object pointed to - */ + /** + * The type of object pointed to + */ public function getType(): string { return $this->type; @@ -54,4 +51,3 @@ public function getSha(): string return $this->sha; } } - diff --git a/src/Model/ObjectStorage.php b/src/Model/ObjectStorage.php index e02727335..67178fd16 100644 --- a/src/Model/ObjectStorage.php +++ b/src/Model/ObjectStorage.php @@ -13,8 +13,6 @@ */ final class ObjectStorage implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly int $minStorage, @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -52,70 +49,69 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, implicit object-storage can be used. - */ + /** + * If true, implicit object-storage can be used. + */ public function getEnabled(): bool { return $this->enabled; } - /** - * Lower bound for the size of implicit object-storage on the project, in MiB. - */ + /** + * Lower bound for the size of implicit object-storage on the project, in MiB. + */ public function getMinStorage(): int { return $this->minStorage; } - /** - * Upper bound for the size of implicit object-storage on the project, in MiB. - */ + /** + * Upper bound for the size of implicit object-storage on the project, in MiB. + */ public function getMaxStorage(): int { return $this->maxStorage; } - /** - * Granularity of implicit object-storage allocations, in MiB. resources.disk.object, min_storage and max_storage - * must all be multiples of this value. - */ + /** + * Granularity of implicit object-storage allocations, in MiB. resources.disk.object, min_storage and max_storage + * must all be multiples of this value. + */ public function getStorageStep(): int { return $this->storageStep; } - /** - * CPU granted to the implicit object-storage service for each storage_step of allocated quota. - */ + /** + * CPU granted to the implicit object-storage service for each storage_step of allocated quota. + */ public function getCpuPerStep(): float { return $this->cpuPerStep; } - /** - * Memory granted to the implicit object-storage service for each storage_step of allocated quota, in MiB. - */ + /** + * Memory granted to the implicit object-storage service for each storage_step of allocated quota, in MiB. + */ public function getMemoryPerStep(): int { return $this->memoryPerStep; } - /** - * Upper bound on the CPU granted to the implicit object-storage service, regardless of the configured quota. - */ + /** + * Upper bound on the CPU granted to the implicit object-storage service, regardless of the configured quota. + */ public function getMaxCpu(): float { return $this->maxCpu; } - /** - * Upper bound on the memory granted to the implicit object-storage service, in MiB, regardless of the configured - * quota. - */ + /** + * Upper bound on the memory granted to the implicit object-storage service, in MiB, regardless of the configured + * quota. + */ public function getMaxMemory(): int { return $this->maxMemory; } } - diff --git a/src/Model/ObservabilityEntrypoint200Response.php b/src/Model/ObservabilityEntrypoint200Response.php index f44b5ffd8..97cc4d0ba 100644 --- a/src/Model/ObservabilityEntrypoint200Response.php +++ b/src/Model/ObservabilityEntrypoint200Response.php @@ -13,7 +13,6 @@ */ final class ObservabilityEntrypoint200Response implements Model, JsonSerializable { - public const ENVIRONMENT_TYPE_PRODUCTION = 'production'; public const ENVIRONMENT_TYPE_STAGING = 'staging'; public const ENVIRONMENT_TYPE_DEVELOPMENT = 'development'; @@ -34,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -111,4 +109,3 @@ public function getDataRetention(): ObservabilityEntrypoint200ResponseDataRetent return $this->dataRetention; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php index 0b0d8b85f..ace445942 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetention.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseDataRetention implements Model, JsonSerializable { - - public function __construct( private readonly string $unit, private readonly int $unitInSeconds, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -85,4 +82,3 @@ public function getContinuousProfiling(): ObservabilityEntrypoint200ResponseData return $this->continuousProfiling; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php index 1c198a90a..f7867bd49 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionContinuousProfiling implements Model, JsonSerializable { - - public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php index 05741353c..a59a789e1 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionHttpTraffic implements Model, JsonSerializable { - - public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php index b1b40e566..2e2cc9c0f 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionLogs.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionLogs implements Model, JsonSerializable { - - public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php index ccb47ef59..2ff486d00 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionResources.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionResources implements Model, JsonSerializable { - - public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php index d378704cb..032e8c653 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php +++ b/src/Model/ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseDataRetentionServerMonitoring implements Model, JsonSerializable { - - public function __construct( private readonly int $retentionPeriod, private readonly int $maxRange, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getRecommendedDefaultRange(): int return $this->recommendedDefaultRange; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinks.php b/src/Model/ObservabilityEntrypoint200ResponseLinks.php index b0a53ad30..bbf17c420 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinks.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinks.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseLinks implements Model, JsonSerializable { - - public function __construct( private readonly ObservabilityEntrypoint200ResponseLinksSelf $self, private readonly array $resourcesByService, @@ -36,7 +34,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -75,9 +72,9 @@ public function getSelf(): ObservabilityEntrypoint200ResponseLinksSelf return $this->self; } - /** - * @return ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue[] - */ + /** + * @return ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue[] + */ public function getResourcesByService(): array { return $this->resourcesByService; @@ -158,4 +155,3 @@ public function getConprofFlamegraph(): ObservabilityEntrypoint200ResponseLinksC return $this->conprofFlamegraph; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php index c1db4a7a1..3a93c1e93 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksBlackfirePhpServerCaches implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php index 8ea0a1542..4ea1d1295 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksBlackfireServerGlobal implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php index 9b728debf..097aed4d8 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksBlackfireServerTransactionsBreakdown implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php index 111eea87a..620659972 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofApplicationFilters implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php index 566ef0a46..291a60a2f 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofApplications.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofApplications implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php index d85c71dbd..10e8f0541 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofFlamegraph.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofFlamegraph implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php index f1d492c95..a0c51fa9a 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConprofTimeline.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksConprofTimeline implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php b/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php index 32c9f15eb..d571d07a2 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksConsoleSandboxAccess implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php index 2f941e738..6ddcabc03 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineIps implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php index 5ef78bab3..5a489e969 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUrls implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php index bacaa4aaf..c7428f57a 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksHttpMetricsTimelineUserAgents implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php index 7f3661911..aa4bf9c6d 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsOverview.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksLogsOverview implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php index 020abd0d4..2e31a60d5 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksLogsQuery.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksLogsQuery implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php index c38faaefd..8afb043b8 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue.php @@ -13,15 +13,12 @@ */ final class ObservabilityEntrypoint200ResponseLinksResourcesByServiceValue implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php index 569caca9c..a925f5db2 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesOverview.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksResourcesOverview implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php index 710662ccf..34d8ce3e7 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksResourcesSummary.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksResourcesSummary implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php b/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php index 6955286bf..a8f3ca1bf 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php +++ b/src/Model/ObservabilityEntrypoint200ResponseLinksSelf.php @@ -13,14 +13,11 @@ */ final class ObservabilityEntrypoint200ResponseLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly string $href, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getHref(): string return $this->href; } } - diff --git a/src/Model/ObservabilityEntrypoint200ResponseRetention.php b/src/Model/ObservabilityEntrypoint200ResponseRetention.php index 508df91c8..e8b93b5b8 100644 --- a/src/Model/ObservabilityEntrypoint200ResponseRetention.php +++ b/src/Model/ObservabilityEntrypoint200ResponseRetention.php @@ -13,8 +13,6 @@ */ final class ObservabilityEntrypoint200ResponseRetention implements Model, JsonSerializable { - - public function __construct( private readonly int $resources, private readonly int $logs, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getContinuousProfiling(): int return $this->continuousProfiling; } } - diff --git a/src/Model/OpenTelemetry.php b/src/Model/OpenTelemetry.php index dfe277f2e..fc911f32d 100644 --- a/src/Model/OpenTelemetry.php +++ b/src/Model/OpenTelemetry.php @@ -14,15 +14,12 @@ */ final class OpenTelemetry implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/OperationsValue.php b/src/Model/OperationsValue.php index 3bb968470..c4621282c 100644 --- a/src/Model/OperationsValue.php +++ b/src/Model/OperationsValue.php @@ -13,7 +13,6 @@ */ final class OperationsValue implements Model, JsonSerializable { - public const ROLE_ADMIN = 'admin'; public const ROLE_CONTRIBUTOR = 'contributor'; public const ROLE_VIEWER = 'viewer'; @@ -25,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -60,4 +58,3 @@ public function getRole(): string return $this->role; } } - diff --git a/src/Model/Order.php b/src/Model/Order.php index d94793de9..51a054192 100644 --- a/src/Model/Order.php +++ b/src/Model/Order.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class Order implements Model, JsonSerializable { - public const STATUS_COMPLETED = 'completed'; public const STATUS_PAST_DUE = 'past_due'; public const STATUS_PENDING = 'pending'; @@ -23,15 +23,15 @@ final class Order implements Model, JsonSerializable public const STATUS_PAYMENT_FAILED_HARD_DECLINE = 'payment_failed_hard_decline'; public function __construct( - private readonly ?\DateTime $paidOn = null, + private readonly ?DateTime $paidOn = null, private readonly ?string $id = null, private readonly ?string $status = null, private readonly ?string $owner = null, private readonly ?Address $address = null, private readonly ?string $company = null, private readonly ?string $vatNumber = null, - private readonly ?\DateTime $billingPeriodStart = null, - private readonly ?\DateTime $billingPeriodEnd = null, + private readonly ?DateTime $billingPeriodStart = null, + private readonly ?DateTime $billingPeriodEnd = null, private readonly ?OrderBillingPeriodLabel $billingPeriodLabel = null, private readonly ?int $billingPeriodDuration = null, private readonly ?int $total = null, @@ -39,14 +39,13 @@ public function __construct( private readonly ?Components $components = null, private readonly ?string $currency = null, private readonly ?string $invoiceUrl = null, - private readonly ?\DateTime $lastRefreshed = null, + private readonly ?DateTime $lastRefreshed = null, private readonly ?bool $invoiced = null, private readonly ?array $lineItems = [], private readonly ?OrderLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -83,165 +82,164 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the order. - */ + /** + * The ID of the order. + */ public function getId(): ?string { return $this->id; } - /** - * The status of the subscription. - */ + /** + * The status of the subscription. + */ public function getStatus(): ?string { return $this->status; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * The address of the user. - */ + /** + * The address of the user. + */ public function getAddress(): ?Address { return $this->address; } - /** - * The company name. - */ + /** + * The company name. + */ public function getCompany(): ?string { return $this->company; } - /** - * An identifier used in many countries for value added tax purposes. - */ + /** + * An identifier used in many countries for value added tax purposes. + */ public function getVatNumber(): ?string { return $this->vatNumber; } - /** - * The time when the billing period of the order started. - */ - public function getBillingPeriodStart(): ?\DateTime + /** + * The time when the billing period of the order started. + */ + public function getBillingPeriodStart(): ?DateTime { return $this->billingPeriodStart; } - /** - * The time when the billing period of the order ended. - */ - public function getBillingPeriodEnd(): ?\DateTime + /** + * The time when the billing period of the order ended. + */ + public function getBillingPeriodEnd(): ?DateTime { return $this->billingPeriodEnd; } - /** - * Descriptive information about the billing cycle. - */ + /** + * Descriptive information about the billing cycle. + */ public function getBillingPeriodLabel(): ?OrderBillingPeriodLabel { return $this->billingPeriodLabel; } - /** - * The duration of the billing period of the order in seconds. - */ + /** + * The duration of the billing period of the order in seconds. + */ public function getBillingPeriodDuration(): ?int { return $this->billingPeriodDuration; } - /** - * The time when the order was successfully charged. - */ - public function getPaidOn(): ?\DateTime + /** + * The time when the order was successfully charged. + */ + public function getPaidOn(): ?DateTime { return $this->paidOn; } - /** - * The total of the order. - */ + /** + * The total of the order. + */ public function getTotal(): ?int { return $this->total; } - /** - * The total of the order, formatted with currency. - */ + /** + * The total of the order, formatted with currency. + */ public function getTotalFormatted(): ?int { return $this->totalFormatted; } - /** - * The components of the project - */ + /** + * The components of the project + */ public function getComponents(): ?Components { return $this->components; } - /** - * The order currency code. - */ + /** + * The order currency code. + */ public function getCurrency(): ?string { return $this->currency; } - /** - * A link to the PDF invoice. - */ + /** + * A link to the PDF invoice. + */ public function getInvoiceUrl(): ?string { return $this->invoiceUrl; } - /** - * The time when the order was last refreshed. - */ - public function getLastRefreshed(): ?\DateTime + /** + * The time when the order was last refreshed. + */ + public function getLastRefreshed(): ?DateTime { return $this->lastRefreshed; } - /** - * The customer is invoiced. - */ + /** + * The customer is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } - /** - * The line items that comprise the order. - * @return LineItem[]|null - */ + /** + * The line items that comprise the order. + * @return LineItem[]|null + */ public function getLineItems(): ?array { return $this->lineItems; } - /** - * Links to related API endpoints. - */ + /** + * Links to related API endpoints. + */ public function getLinks(): ?OrderLinks { return $this->links; } } - diff --git a/src/Model/OrderBillingPeriodLabel.php b/src/Model/OrderBillingPeriodLabel.php index c372cf3a3..bd4ca23bb 100644 --- a/src/Model/OrderBillingPeriodLabel.php +++ b/src/Model/OrderBillingPeriodLabel.php @@ -14,8 +14,6 @@ */ final class OrderBillingPeriodLabel implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?string $month = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The renderable label for the billing cycle. - */ + /** + * The renderable label for the billing cycle. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * The month of the billing cycle. - */ + /** + * The month of the billing cycle. + */ public function getMonth(): ?string { return $this->month; } - /** - * The year of the billing cycle. - */ + /** + * The year of the billing cycle. + */ public function getYear(): ?string { return $this->year; } - /** - * The name of the next month following this billing cycle. - */ + /** + * The name of the next month following this billing cycle. + */ public function getNextMonth(): ?string { return $this->nextMonth; } } - diff --git a/src/Model/OrderLinks.php b/src/Model/OrderLinks.php index 6dbba5c72..e49730ba1 100644 --- a/src/Model/OrderLinks.php +++ b/src/Model/OrderLinks.php @@ -14,14 +14,11 @@ */ final class OrderLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?OrderLinksInvoices $invoices = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to related Invoices API. Use this to retrieve invoices related to this order. - */ + /** + * Link to related Invoices API. Use this to retrieve invoices related to this order. + */ public function getInvoices(): ?OrderLinksInvoices { return $this->invoices; } } - diff --git a/src/Model/OrderLinksInvoices.php b/src/Model/OrderLinksInvoices.php index 531f90794..bca436ba7 100644 --- a/src/Model/OrderLinksInvoices.php +++ b/src/Model/OrderLinksInvoices.php @@ -14,14 +14,11 @@ */ final class OrderLinksInvoices implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link - */ + /** + * URL of the link + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/Organization.php b/src/Model/Organization.php index 6bee63ed5..ee2d86a42 100644 --- a/src/Model/Organization.php +++ b/src/Model/Organization.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class Organization implements Model, JsonSerializable { - public const TYPE_FIXED = 'fixed'; public const TYPE_FLEXIBLE = 'flexible'; public const STATUS_ACTIVE = 'active'; @@ -36,13 +36,12 @@ public function __construct( private readonly ?string $securityContact = null, private readonly ?OrganizationAiAgentSettings $aiAgentSettings = null, private readonly ?string $status = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?OrganizationLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -76,57 +75,57 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getId(): ?string { return $this->id; } - /** - * The type of the organization. - */ + /** + * The type of the organization. + */ public function getType(): ?string { return $this->type; } - /** - * The ID of the owner. - */ + /** + * The ID of the owner. + */ public function getOwnerId(): ?string { return $this->ownerId; } - /** - * The namespace in which the organization name is unique. - */ + /** + * The namespace in which the organization name is unique. + */ public function getNamespace(): ?string { return $this->namespace; } - /** - * A unique machine name representing the organization. - */ + /** + * A unique machine name representing the organization. + */ public function getName(): ?string { return $this->name; } - /** - * The human-readable label of the organization. - */ + /** + * The human-readable label of the organization. + */ public function getLabel(): ?string { return $this->label; } - /** - * The organization country (2-letter country code). - */ + /** + * The organization country (2-letter country code). + */ public function getCountry(): ?string { return $this->country; @@ -137,66 +136,66 @@ public function getCapabilities(): ?array return $this->capabilities; } - /** - * The vendor. - */ + /** + * The vendor. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The Billing Profile ID. - */ + /** + * The Billing Profile ID. + */ public function getBillingProfileId(): ?string { return $this->billingProfileId; } - /** - * Whether the account is billed with the legacy system. - */ + /** + * Whether the account is billed with the legacy system. + */ public function getBillingLegacy(): ?bool { return $this->billingLegacy; } - /** - * The security contact email address for the organization. - */ + /** + * The security contact email address for the organization. + */ public function getSecurityContact(): ?string { return $this->securityContact; } - /** - * AI agent consent settings for the organization. - */ + /** + * AI agent consent settings for the organization. + */ public function getAiAgentSettings(): ?OrganizationAiAgentSettings { return $this->aiAgentSettings; } - /** - * The status of the organization. - */ + /** + * The status of the organization. + */ public function getStatus(): ?string { return $this->status; } - /** - * The date and time when the organization was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the organization was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the organization was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the organization was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } @@ -206,4 +205,3 @@ public function getLinks(): ?OrganizationLinks return $this->links; } } - diff --git a/src/Model/OrganizationAddonsObject.php b/src/Model/OrganizationAddonsObject.php index 284bdc832..1fe62a98a 100644 --- a/src/Model/OrganizationAddonsObject.php +++ b/src/Model/OrganizationAddonsObject.php @@ -14,8 +14,6 @@ */ final class OrganizationAddonsObject implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationAddonsObjectAvailable $available = null, private readonly ?OrganizationAddonsObjectCurrent $current = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The list of available add-ons and their possible values. - */ + /** + * The list of available add-ons and their possible values. + */ public function getAvailable(): ?OrganizationAddonsObjectAvailable { return $this->available; } - /** - * The list of existing add-ons and their current values. - */ + /** + * The list of existing add-ons and their current values. + */ public function getCurrent(): ?OrganizationAddonsObjectCurrent { return $this->current; } - /** - * The upgrades available for current add-ons. - */ + /** + * The upgrades available for current add-ons. + */ public function getUpgradesAvailable(): ?OrganizationAddonsObjectUpgradesAvailable { return $this->upgradesAvailable; } } - diff --git a/src/Model/OrganizationAddonsObjectAvailable.php b/src/Model/OrganizationAddonsObjectAvailable.php index 5e752c44b..f597aa18a 100644 --- a/src/Model/OrganizationAddonsObjectAvailable.php +++ b/src/Model/OrganizationAddonsObjectAvailable.php @@ -14,15 +14,12 @@ */ final class OrganizationAddonsObjectAvailable implements Model, JsonSerializable { - - public function __construct( private readonly ?array $userManagement = [], private readonly ?array $supportLevel = [], ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getSupportLevel(): ?array return $this->supportLevel; } } - diff --git a/src/Model/OrganizationAddonsObjectCurrent.php b/src/Model/OrganizationAddonsObjectCurrent.php index 48b846d48..a2d7ef298 100644 --- a/src/Model/OrganizationAddonsObjectCurrent.php +++ b/src/Model/OrganizationAddonsObjectCurrent.php @@ -14,15 +14,12 @@ */ final class OrganizationAddonsObjectCurrent implements Model, JsonSerializable { - - public function __construct( private readonly ?array $userManagement = [], private readonly ?array $supportLevel = [], ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getSupportLevel(): ?array return $this->supportLevel; } } - diff --git a/src/Model/OrganizationAddonsObjectUpgradesAvailable.php b/src/Model/OrganizationAddonsObjectUpgradesAvailable.php index 1e4387bd5..bb52f399d 100644 --- a/src/Model/OrganizationAddonsObjectUpgradesAvailable.php +++ b/src/Model/OrganizationAddonsObjectUpgradesAvailable.php @@ -14,15 +14,12 @@ */ final class OrganizationAddonsObjectUpgradesAvailable implements Model, JsonSerializable { - - public function __construct( private readonly ?array $userManagement = [], private readonly ?array $supportLevel = [], ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getSupportLevel(): ?array return $this->supportLevel; } } - diff --git a/src/Model/OrganizationAiAgentSettings.php b/src/Model/OrganizationAiAgentSettings.php index 9737ab7e7..95fc3a52d 100644 --- a/src/Model/OrganizationAiAgentSettings.php +++ b/src/Model/OrganizationAiAgentSettings.php @@ -14,8 +14,6 @@ */ final class OrganizationAiAgentSettings implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $canEnable = null, private readonly ?bool $performanceAgentEnabled = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Master switch for AI agent settings. Must be true to enable individual agents. - */ + /** + * Master switch for AI agent settings. Must be true to enable individual agents. + */ public function getCanEnable(): ?bool { return $this->canEnable; } - /** - * Whether the performance agent is enabled. - */ + /** + * Whether the performance agent is enabled. + */ public function getPerformanceAgentEnabled(): ?bool { return $this->performanceAgentEnabled; } - /** - * Whether the log analyzer agent is enabled. - */ + /** + * Whether the log analyzer agent is enabled. + */ public function getLogAnalyzerAgentEnabled(): ?bool { return $this->logAnalyzerAgentEnabled; } } - diff --git a/src/Model/OrganizationAlertConfig.php b/src/Model/OrganizationAlertConfig.php index 52d6a0bdc..4b4eca3b6 100644 --- a/src/Model/OrganizationAlertConfig.php +++ b/src/Model/OrganizationAlertConfig.php @@ -14,8 +14,6 @@ */ final class OrganizationAlertConfig implements Model, JsonSerializable { - - public function __construct( private readonly ?string $lastAlertAt = null, private readonly ?string $updatedAt = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,52 +46,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Type of alert (e.g. "billing") - */ + /** + * Type of alert (e.g. "billing") + */ public function getId(): ?string { return $this->id; } - /** - * Whether the billing alert should be active or not. - */ + /** + * Whether the billing alert should be active or not. + */ public function getActive(): ?bool { return $this->active; } - /** - * Number of alerts sent. - */ + /** + * Number of alerts sent. + */ public function getAlertsSent(): ?float { return $this->alertsSent; } - /** - * The datetime the alert was last sent. - */ + /** + * The datetime the alert was last sent. + */ public function getLastAlertAt(): ?string { return $this->lastAlertAt; } - /** - * The datetime the alert was last updated. - */ + /** + * The datetime the alert was last updated. + */ public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * Configuration for threshold and mode. - */ + /** + * Configuration for threshold and mode. + */ public function getConfig(): ?OrganizationAlertConfigConfig { return $this->config; } } - diff --git a/src/Model/OrganizationAlertConfigConfig.php b/src/Model/OrganizationAlertConfigConfig.php index e17736aec..e8d208683 100644 --- a/src/Model/OrganizationAlertConfigConfig.php +++ b/src/Model/OrganizationAlertConfigConfig.php @@ -14,15 +14,12 @@ */ final class OrganizationAlertConfigConfig implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationAlertConfigConfigThreshold $threshold = null, private readonly ?string $mode = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Data regarding threshold spend. - */ + /** + * Data regarding threshold spend. + */ public function getThreshold(): ?OrganizationAlertConfigConfigThreshold { return $this->threshold; } - /** - * The mode of alert. - */ + /** + * The mode of alert. + */ public function getMode(): ?string { return $this->mode; } } - diff --git a/src/Model/OrganizationAlertConfigConfigThreshold.php b/src/Model/OrganizationAlertConfigConfigThreshold.php index f0f3e26bc..50181cd0c 100644 --- a/src/Model/OrganizationAlertConfigConfigThreshold.php +++ b/src/Model/OrganizationAlertConfigConfigThreshold.php @@ -14,8 +14,6 @@ */ final class OrganizationAlertConfigConfigThreshold implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted threshold value. - */ + /** + * Formatted threshold value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Threshold value. - */ + /** + * Threshold value. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Threshold currency code. - */ + /** + * Threshold currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * Threshold currency symbol. - */ + /** + * Threshold currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } - diff --git a/src/Model/OrganizationCarbon.php b/src/Model/OrganizationCarbon.php index 43f39a295..55ba8e32e 100644 --- a/src/Model/OrganizationCarbon.php +++ b/src/Model/OrganizationCarbon.php @@ -13,8 +13,6 @@ */ final class OrganizationCarbon implements Model, JsonSerializable { - - public function __construct( private readonly ?string $organizationId = null, private readonly ?MetricsMetadata $meta = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,9 +41,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; @@ -57,20 +54,19 @@ public function getMeta(): ?MetricsMetadata return $this->meta; } - /** - * @return OrganizationProjectCarbon[]|null - */ + /** + * @return OrganizationProjectCarbon[]|null + */ public function getProjects(): ?array { return $this->projects; } - /** - * The calculated total of the metric for the given interval. - */ + /** + * The calculated total of the metric for the given interval. + */ public function getTotal(): ?float { return $this->total; } } - diff --git a/src/Model/OrganizationEstimationObject.php b/src/Model/OrganizationEstimationObject.php index 0fcb4ae65..bae391316 100644 --- a/src/Model/OrganizationEstimationObject.php +++ b/src/Model/OrganizationEstimationObject.php @@ -14,8 +14,6 @@ */ final class OrganizationEstimationObject implements Model, JsonSerializable { - - public function __construct( private readonly ?string $total = null, private readonly ?string $subTotal = null, @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,60 +48,59 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The total estimated price for the organization. - */ + /** + * The total estimated price for the organization. + */ public function getTotal(): ?string { return $this->total; } - /** - * The sub total for all projects and sellables. - */ + /** + * The sub total for all projects and sellables. + */ public function getSubTotal(): ?string { return $this->subTotal; } - /** - * The total amount of vouchers. - */ + /** + * The total amount of vouchers. + */ public function getVouchers(): ?string { return $this->vouchers; } - /** - * An estimation of user licenses cost. - */ + /** + * An estimation of user licenses cost. + */ public function getUserLicenses(): ?OrganizationEstimationObjectUserLicenses { return $this->userLicenses; } - /** - * An estimation of the advanced user management sellable cost. - */ + /** + * An estimation of the advanced user management sellable cost. + */ public function getUserManagement(): ?string { return $this->userManagement; } - /** - * The total monthly price for premium support. - */ + /** + * The total monthly price for premium support. + */ public function getSupportLevel(): ?string { return $this->supportLevel; } - /** - * An estimation of subscriptions cost. - */ + /** + * An estimation of subscriptions cost. + */ public function getSubscriptions(): ?OrganizationEstimationObjectSubscriptions { return $this->subscriptions; } } - diff --git a/src/Model/OrganizationEstimationObjectSubscriptions.php b/src/Model/OrganizationEstimationObjectSubscriptions.php index 8dd5f0f70..1ea87f566 100644 --- a/src/Model/OrganizationEstimationObjectSubscriptions.php +++ b/src/Model/OrganizationEstimationObjectSubscriptions.php @@ -14,15 +14,12 @@ */ final class OrganizationEstimationObjectSubscriptions implements Model, JsonSerializable { - - public function __construct( private readonly ?string $total = null, private readonly ?array $list = [], ) { } - public function getModelName(): string { return self::class; @@ -41,21 +38,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The total price for subscriptions. - */ + /** + * The total price for subscriptions. + */ public function getTotal(): ?string { return $this->total; } - /** - * The list of active subscriptions. - * @return OrganizationEstimationObjectSubscriptionsListInner[]|null - */ + /** + * The list of active subscriptions. + * @return OrganizationEstimationObjectSubscriptionsListInner[]|null + */ public function getList(): ?array { return $this->list; } } - diff --git a/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php b/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php index 943622a38..dea7e7e92 100644 --- a/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php +++ b/src/Model/OrganizationEstimationObjectSubscriptionsListInner.php @@ -13,8 +13,6 @@ */ final class OrganizationEstimationObjectSubscriptionsListInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $licenseId = null, private readonly ?string $projectTitle = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getUsage(): ?OrganizationEstimationObjectSubscriptionsListInnerU return $this->usage; } } - diff --git a/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php b/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php index 355e7e3ab..1a558573e 100644 --- a/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php +++ b/src/Model/OrganizationEstimationObjectSubscriptionsListInnerUsage.php @@ -13,8 +13,6 @@ */ final class OrganizationEstimationObjectSubscriptionsListInnerUsage implements Model, JsonSerializable { - - public function __construct( private readonly ?float $cpu = null, private readonly ?float $memory = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getEnvironments(): ?int return $this->environments; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicenses.php b/src/Model/OrganizationEstimationObjectUserLicenses.php index 5e203fb61..bab6621df 100644 --- a/src/Model/OrganizationEstimationObjectUserLicenses.php +++ b/src/Model/OrganizationEstimationObjectUserLicenses.php @@ -14,15 +14,12 @@ */ final class OrganizationEstimationObjectUserLicenses implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationEstimationObjectUserLicensesBase $base = null, private readonly ?OrganizationEstimationObjectUserLicensesUserManagement $userManagement = null, ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getUserManagement(): ?OrganizationEstimationObjectUserLicensesUs return $this->userManagement; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBase.php b/src/Model/OrganizationEstimationObjectUserLicensesBase.php index 0aba62ff8..03be98faf 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBase.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBase.php @@ -13,8 +13,6 @@ */ final class OrganizationEstimationObjectUserLicensesBase implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,17 +39,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of base user licenses. - */ + /** + * The number of base user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for base user licenses. - */ + /** + * The total price for base user licenses. + */ public function getTotal(): ?string { return $this->total; @@ -63,4 +60,3 @@ public function getList(): ?OrganizationEstimationObjectUserLicensesBaseList return $this->list; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php b/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php index e4663e18f..7bde937ca 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBaseList.php @@ -13,15 +13,12 @@ */ final class OrganizationEstimationObjectUserLicensesBaseList implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationEstimationObjectUserLicensesBaseListAdminUser $adminUser = null, private readonly ?OrganizationEstimationObjectUserLicensesBaseListViewerUser $viewerUser = null, ) { } - public function getModelName(): string { return self::class; @@ -40,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * An estimation of admin users cost. - */ + /** + * An estimation of admin users cost. + */ public function getAdminUser(): ?OrganizationEstimationObjectUserLicensesBaseListAdminUser { return $this->adminUser; } - /** - * An estimation of viewer users cost. - */ + /** + * An estimation of viewer users cost. + */ public function getViewerUser(): ?OrganizationEstimationObjectUserLicensesBaseListViewerUser { return $this->viewerUser; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php b/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php index 8b7771505..cfc8858c7 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBaseListAdminUser.php @@ -14,15 +14,12 @@ */ final class OrganizationEstimationObjectUserLicensesBaseListAdminUser implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of admin user licenses. - */ + /** + * The number of admin user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for admin user licenses. - */ + /** + * The total price for admin user licenses. + */ public function getTotal(): ?string { return $this->total; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php b/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php index 4fcf3f43a..36282d952 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesBaseListViewerUser.php @@ -14,15 +14,12 @@ */ final class OrganizationEstimationObjectUserLicensesBaseListViewerUser implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of viewer user licenses. - */ + /** + * The number of viewer user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for viewer user licenses. - */ + /** + * The total price for viewer user licenses. + */ public function getTotal(): ?string { return $this->total; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php index d4ed4970e..45dbd36ed 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagement.php @@ -13,8 +13,6 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagement implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,17 +39,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of user_management licenses. - */ + /** + * The number of user_management licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for user_management licenses. - */ + /** + * The total price for user_management licenses. + */ public function getTotal(): ?string { return $this->total; @@ -63,4 +60,3 @@ public function getList(): ?OrganizationEstimationObjectUserLicensesUserManageme return $this->list; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php index e6f7c7337..6c32b00d9 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementList.php @@ -13,15 +13,12 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagementList implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser $standardManagementUser = null, private readonly ?OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser $advancedManagementUser = null, ) { } - public function getModelName(): string { return self::class; @@ -40,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * An estimation of standard_management_user cost. - */ + /** + * An estimation of standard_management_user cost. + */ public function getStandardManagementUser(): ?OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser { return $this->standardManagementUser; } - /** - * An estimation of advanced_management_user cost. - */ + /** + * An estimation of advanced_management_user cost. + */ public function getAdvancedManagementUser(): ?OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser { return $this->advancedManagementUser; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php index 2a3bd5024..095ceb17b 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser.php @@ -14,15 +14,12 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagementListAdvancedManagementUser implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of advanced_management_user licenses. - */ + /** + * The number of advanced_management_user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for advanced_management_user licenses. - */ + /** + * The total price for advanced_management_user licenses. + */ public function getTotal(): ?string { return $this->total; } } - diff --git a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php index 99464f9e7..a996636de 100644 --- a/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php +++ b/src/Model/OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser.php @@ -14,15 +14,12 @@ */ final class OrganizationEstimationObjectUserLicensesUserManagementListStandardManagementUser implements Model, JsonSerializable { - - public function __construct( private readonly ?int $count = null, private readonly ?string $total = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The number of standard_management_user licenses. - */ + /** + * The number of standard_management_user licenses. + */ public function getCount(): ?int { return $this->count; } - /** - * The total price for standard_management_user licenses. - */ + /** + * The total price for standard_management_user licenses. + */ public function getTotal(): ?string { return $this->total; } } - diff --git a/src/Model/OrganizationInvitation.php b/src/Model/OrganizationInvitation.php index 51dea9b1d..8d3cf840e 100644 --- a/src/Model/OrganizationInvitation.php +++ b/src/Model/OrganizationInvitation.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class OrganizationInvitation implements Model, JsonSerializable { - public const STATE_PENDING = 'pending'; public const STATE_PROCESSING = 'processing'; public const STATE_ACCEPTED = 'accepted'; @@ -27,19 +27,18 @@ final class OrganizationInvitation implements Model, JsonSerializable public const PERMISSIONS_PROJECTS_LIST = 'projects:list'; public function __construct( - private readonly ?\DateTime $finishedAt = null, + private readonly ?DateTime $finishedAt = null, private readonly ?string $id = null, private readonly ?string $state = null, private readonly ?string $organizationId = null, private readonly ?string $email = null, private readonly ?OrganizationInvitationOwner $owner = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?array $permissions = [], ) { } - public function getModelName(): string { return self::class; @@ -65,66 +64,66 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the invitation. - */ + /** + * The ID of the invitation. + */ public function getId(): ?string { return $this->id; } - /** - * The invitation state. - */ + /** + * The invitation state. + */ public function getState(): ?string { return $this->state; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The email address of the invitee. - */ + /** + * The email address of the invitee. + */ public function getEmail(): ?string { return $this->email; } - /** - * The inviter. - */ + /** + * The inviter. + */ public function getOwner(): ?OrganizationInvitationOwner { return $this->owner; } - /** - * The date and time when the invitation was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the invitation was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the invitation was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the invitation was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The date and time when the invitation was finished. - */ - public function getFinishedAt(): ?\DateTime + /** + * The date and time when the invitation was finished. + */ + public function getFinishedAt(): ?DateTime { return $this->finishedAt; } @@ -134,4 +133,3 @@ public function getPermissions(): ?array return $this->permissions; } } - diff --git a/src/Model/OrganizationInvitationOwner.php b/src/Model/OrganizationInvitationOwner.php index 4e691d889..e6315cc17 100644 --- a/src/Model/OrganizationInvitationOwner.php +++ b/src/Model/OrganizationInvitationOwner.php @@ -14,15 +14,12 @@ */ final class OrganizationInvitationOwner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $displayName = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): ?string { return $this->id; } - /** - * The user's display name. - */ + /** + * The user's display name. + */ public function getDisplayName(): ?string { return $this->displayName; } } - diff --git a/src/Model/OrganizationLinks.php b/src/Model/OrganizationLinks.php index f46eecc28..f59e54e08 100644 --- a/src/Model/OrganizationLinks.php +++ b/src/Model/OrganizationLinks.php @@ -13,8 +13,6 @@ */ final class OrganizationLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationLinksSelf $self = null, private readonly ?OrganizationLinksUpdate $update = null, @@ -39,7 +37,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -76,164 +73,163 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current organization. - */ + /** + * Link to the current organization. + */ public function getSelf(): ?OrganizationLinksSelf { return $this->self; } - /** - * Link for updating the current organization. - */ + /** + * Link for updating the current organization. + */ public function getUpdate(): ?OrganizationLinksUpdate { return $this->update; } - /** - * Link for deleting the current organization. - */ + /** + * Link for deleting the current organization. + */ public function getDelete(): ?OrganizationLinksDelete { return $this->delete; } - /** - * Link to the current organization's members. - */ + /** + * Link to the current organization's members. + */ public function getMembers(): ?OrganizationLinksMembers { return $this->members; } - /** - * Link for creating a new organization member. - */ + /** + * Link for creating a new organization member. + */ public function getCreateMember(): ?OrganizationLinksCreateMember { return $this->createMember; } - /** - * Link to the current organization's address. This link may not be present for all organizations. - */ + /** + * Link to the current organization's address. This link may not be present for all organizations. + */ public function getAddress(): ?OrganizationLinksAddress { return $this->address; } - /** - * Link to the current organization's billing profile details. This link may not be present for all organizations. - */ + /** + * Link to the current organization's billing profile details. This link may not be present for all organizations. + */ public function getProfile(): ?OrganizationLinksProfile { return $this->profile; } - /** - * Link to the current organization's account. This link may not be present for all organizations. - */ + /** + * Link to the current organization's account. This link may not be present for all organizations. + */ public function getAccount(): ?OrganizationLinksAccount { return $this->account; } - /** - * Link to the current organization's payment source. This link may not be present for all organizations. - */ + /** + * Link to the current organization's payment source. This link may not be present for all organizations. + */ public function getPaymentSource(): ?OrganizationLinksPaymentSource { return $this->paymentSource; } - /** - * Link to the current organization's orders. This link may not be present for all organizations. - */ + /** + * Link to the current organization's orders. This link may not be present for all organizations. + */ public function getOrders(): ?OrganizationLinksOrders { return $this->orders; } - /** - * Link to the current organization's vouchers. This link may not be present for all organizations. - */ + /** + * Link to the current organization's vouchers. This link may not be present for all organizations. + */ public function getVouchers(): ?OrganizationLinksVouchers { return $this->vouchers; } - /** - * Link to the current organization's discounts. This link may not be present for all organizations. - */ + /** + * Link to the current organization's discounts. This link may not be present for all organizations. + */ public function getDiscounts(): ?OrganizationLinksDiscounts { return $this->discounts; } - /** - * Link for applying a voucher for the current organization. This link may not be present for all organizations. - */ + /** + * Link for applying a voucher for the current organization. This link may not be present for all organizations. + */ public function getApplyVoucher(): ?OrganizationLinksApplyVoucher { return $this->applyVoucher; } - /** - * Link to the current organization's subscriptions. This link may not be present for all organizations. - */ + /** + * Link to the current organization's subscriptions. This link may not be present for all organizations. + */ public function getSubscriptions(): ?OrganizationLinksSubscriptions { return $this->subscriptions; } - /** - * Link for creating a new organization subscription. - */ + /** + * Link for creating a new organization subscription. + */ public function getCreateSubscription(): ?OrganizationLinksCreateSubscription { return $this->createSubscription; } - /** - * Link for estimating the price of a new subscription. This link may not be present for all organizations. - */ + /** + * Link for estimating the price of a new subscription. This link may not be present for all organizations. + */ public function getEstimateSubscription(): ?OrganizationLinksEstimateSubscription { return $this->estimateSubscription; } - /** - * Link to the current organization's prepayment information. This link may not be present for all organizations. - */ + /** + * Link to the current organization's prepayment information. This link may not be present for all organizations. + */ public function getPrepayment(): ?OrganizationLinksPrepayment { return $this->prepayment; } - /** - * Link to the organization's billing profile. This link may not be present for all organizations. - */ + /** + * Link to the organization's billing profile. This link may not be present for all organizations. + */ public function getBillingProfile(): ?OrganizationLinksBillingProfile { return $this->billingProfile; } - /** - * Link to the current organization's MFA enforcement settings. This link may not be present for all organizations. - */ + /** + * Link to the current organization's MFA enforcement settings. This link may not be present for all organizations. + */ public function getMfaEnforcement(): ?OrganizationLinksMfaEnforcement { return $this->mfaEnforcement; } - /** - * Link to the current organization's SSO configuration. This link may not be present for all organizations. - */ + /** + * Link to the current organization's SSO configuration. This link may not be present for all organizations. + */ public function getSso(): ?OrganizationLinksSso { return $this->sso; } } - diff --git a/src/Model/OrganizationLinksAccount.php b/src/Model/OrganizationLinksAccount.php index 6f1bd5372..d9ae2f9c6 100644 --- a/src/Model/OrganizationLinksAccount.php +++ b/src/Model/OrganizationLinksAccount.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksAccount implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksAddress.php b/src/Model/OrganizationLinksAddress.php index c5c9f6a91..ee3368624 100644 --- a/src/Model/OrganizationLinksAddress.php +++ b/src/Model/OrganizationLinksAddress.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksAddress implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksApplyVoucher.php b/src/Model/OrganizationLinksApplyVoucher.php index d4043f3b0..fe10631e6 100644 --- a/src/Model/OrganizationLinksApplyVoucher.php +++ b/src/Model/OrganizationLinksApplyVoucher.php @@ -14,15 +14,12 @@ */ final class OrganizationLinksApplyVoucher implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationLinksBillingProfile.php b/src/Model/OrganizationLinksBillingProfile.php index 7f1423b37..868a5e241 100644 --- a/src/Model/OrganizationLinksBillingProfile.php +++ b/src/Model/OrganizationLinksBillingProfile.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksBillingProfile implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksCreateMember.php b/src/Model/OrganizationLinksCreateMember.php index 620b8c8a6..6ed39b111 100644 --- a/src/Model/OrganizationLinksCreateMember.php +++ b/src/Model/OrganizationLinksCreateMember.php @@ -14,15 +14,12 @@ */ final class OrganizationLinksCreateMember implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationLinksCreateSubscription.php b/src/Model/OrganizationLinksCreateSubscription.php index 91353fec3..536b35ca9 100644 --- a/src/Model/OrganizationLinksCreateSubscription.php +++ b/src/Model/OrganizationLinksCreateSubscription.php @@ -14,15 +14,12 @@ */ final class OrganizationLinksCreateSubscription implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationLinksDelete.php b/src/Model/OrganizationLinksDelete.php index 92853c4e2..086b51fba 100644 --- a/src/Model/OrganizationLinksDelete.php +++ b/src/Model/OrganizationLinksDelete.php @@ -14,15 +14,12 @@ */ final class OrganizationLinksDelete implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationLinksDiscounts.php b/src/Model/OrganizationLinksDiscounts.php index ba56e05d6..0a40f49df 100644 --- a/src/Model/OrganizationLinksDiscounts.php +++ b/src/Model/OrganizationLinksDiscounts.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksDiscounts implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksEstimateSubscription.php b/src/Model/OrganizationLinksEstimateSubscription.php index 0dbbf5482..82a40c91a 100644 --- a/src/Model/OrganizationLinksEstimateSubscription.php +++ b/src/Model/OrganizationLinksEstimateSubscription.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksEstimateSubscription implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksMembers.php b/src/Model/OrganizationLinksMembers.php index 1cc1ad858..81516481f 100644 --- a/src/Model/OrganizationLinksMembers.php +++ b/src/Model/OrganizationLinksMembers.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksMembers implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksMfaEnforcement.php b/src/Model/OrganizationLinksMfaEnforcement.php index 5eab563f9..10a6c11fb 100644 --- a/src/Model/OrganizationLinksMfaEnforcement.php +++ b/src/Model/OrganizationLinksMfaEnforcement.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksMfaEnforcement implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksOrders.php b/src/Model/OrganizationLinksOrders.php index bc4ccb72f..cfddd74d4 100644 --- a/src/Model/OrganizationLinksOrders.php +++ b/src/Model/OrganizationLinksOrders.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksOrders implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksPaymentSource.php b/src/Model/OrganizationLinksPaymentSource.php index 132ecdfa0..6585e65d6 100644 --- a/src/Model/OrganizationLinksPaymentSource.php +++ b/src/Model/OrganizationLinksPaymentSource.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksPaymentSource implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksPrepayment.php b/src/Model/OrganizationLinksPrepayment.php index 727bb81aa..9e96e2eeb 100644 --- a/src/Model/OrganizationLinksPrepayment.php +++ b/src/Model/OrganizationLinksPrepayment.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksPrepayment implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksProfile.php b/src/Model/OrganizationLinksProfile.php index 2db17d32e..849cd5d61 100644 --- a/src/Model/OrganizationLinksProfile.php +++ b/src/Model/OrganizationLinksProfile.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksProfile implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksSelf.php b/src/Model/OrganizationLinksSelf.php index 49d2b7748..ab8f35bab 100644 --- a/src/Model/OrganizationLinksSelf.php +++ b/src/Model/OrganizationLinksSelf.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksSso.php b/src/Model/OrganizationLinksSso.php index 9e4841fb9..4a93fc8d0 100644 --- a/src/Model/OrganizationLinksSso.php +++ b/src/Model/OrganizationLinksSso.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksSso implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksSubscriptions.php b/src/Model/OrganizationLinksSubscriptions.php index 859f9a75c..3e1a37ebb 100644 --- a/src/Model/OrganizationLinksSubscriptions.php +++ b/src/Model/OrganizationLinksSubscriptions.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksSubscriptions implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationLinksUpdate.php b/src/Model/OrganizationLinksUpdate.php index 446a8141f..164c88437 100644 --- a/src/Model/OrganizationLinksUpdate.php +++ b/src/Model/OrganizationLinksUpdate.php @@ -14,15 +14,12 @@ */ final class OrganizationLinksUpdate implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationLinksVouchers.php b/src/Model/OrganizationLinksVouchers.php index 33b24d5f6..2118b0566 100644 --- a/src/Model/OrganizationLinksVouchers.php +++ b/src/Model/OrganizationLinksVouchers.php @@ -14,14 +14,11 @@ */ final class OrganizationLinksVouchers implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationMember.php b/src/Model/OrganizationMember.php index 5af20ab22..eb2ec23a9 100644 --- a/src/Model/OrganizationMember.php +++ b/src/Model/OrganizationMember.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class OrganizationMember implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_MEMBERS = 'members'; @@ -30,13 +30,12 @@ public function __construct( private readonly ?array $permissions = [], private readonly ?string $level = null, private readonly ?bool $owner = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?OrganizationMemberLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -62,25 +61,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getUserId(): ?string { return $this->userId; @@ -91,34 +90,34 @@ public function getPermissions(): ?array return $this->permissions; } - /** - * Access level of the member. - */ + /** + * Access level of the member. + */ public function getLevel(): ?string { return $this->level; } - /** - * Whether the member is the organization owner. - */ + /** + * Whether the member is the organization owner. + */ public function getOwner(): ?bool { return $this->owner; } - /** - * The date and time when the member was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the member was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the member was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the member was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } @@ -128,4 +127,3 @@ public function getLinks(): ?OrganizationMemberLinks return $this->links; } } - diff --git a/src/Model/OrganizationMemberLinks.php b/src/Model/OrganizationMemberLinks.php index 8dfbb0ebf..4369ad866 100644 --- a/src/Model/OrganizationMemberLinks.php +++ b/src/Model/OrganizationMemberLinks.php @@ -13,8 +13,6 @@ */ final class OrganizationMemberLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationMemberLinksSelf $self = null, private readonly ?OrganizationMemberLinksUpdate $update = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current member. - */ + /** + * Link to the current member. + */ public function getSelf(): ?OrganizationMemberLinksSelf { return $this->self; } - /** - * Link for updating the current member. - */ + /** + * Link for updating the current member. + */ public function getUpdate(): ?OrganizationMemberLinksUpdate { return $this->update; } - /** - * Link for deleting the current member. - */ + /** + * Link for deleting the current member. + */ public function getDelete(): ?OrganizationMemberLinksDelete { return $this->delete; } } - diff --git a/src/Model/OrganizationMemberLinksDelete.php b/src/Model/OrganizationMemberLinksDelete.php index 86909c9a7..7d32fdb06 100644 --- a/src/Model/OrganizationMemberLinksDelete.php +++ b/src/Model/OrganizationMemberLinksDelete.php @@ -14,15 +14,12 @@ */ final class OrganizationMemberLinksDelete implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationMemberLinksSelf.php b/src/Model/OrganizationMemberLinksSelf.php index 99100d05d..a00b6ae60 100644 --- a/src/Model/OrganizationMemberLinksSelf.php +++ b/src/Model/OrganizationMemberLinksSelf.php @@ -14,14 +14,11 @@ */ final class OrganizationMemberLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationMemberLinksUpdate.php b/src/Model/OrganizationMemberLinksUpdate.php index 71f24812d..0d711ee60 100644 --- a/src/Model/OrganizationMemberLinksUpdate.php +++ b/src/Model/OrganizationMemberLinksUpdate.php @@ -14,15 +14,12 @@ */ final class OrganizationMemberLinksUpdate implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationMfaEnforcement.php b/src/Model/OrganizationMfaEnforcement.php index 4c48bf673..ebbf10255 100644 --- a/src/Model/OrganizationMfaEnforcement.php +++ b/src/Model/OrganizationMfaEnforcement.php @@ -14,14 +14,11 @@ */ final class OrganizationMfaEnforcement implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enforceMfa = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether the MFA enforcement is enabled. - */ + /** + * Whether the MFA enforcement is enabled. + */ public function getEnforceMfa(): ?bool { return $this->enforceMfa; } } - diff --git a/src/Model/OrganizationProject.php b/src/Model/OrganizationProject.php index 1ca7e7d72..8f4869dc6 100644 --- a/src/Model/OrganizationProject.php +++ b/src/Model/OrganizationProject.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class OrganizationProject implements Model, JsonSerializable { - - public function __construct( private readonly ?string $dedicatedTag = null, private readonly ?array $activities = [], @@ -33,13 +32,12 @@ public function __construct( private readonly ?ProjectStatus $status = null, private readonly ?bool $trialPlan = null, private readonly ?string $projectUi = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?OrganizationProjectLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -76,138 +74,138 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the subscription. - */ + /** + * The ID of the subscription. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * Vendor of the project. - */ + /** + * Vendor of the project. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getRegion(): ?string { return $this->region; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): ?string { return $this->title; } - /** - * The type of projects. - */ + /** + * The type of projects. + */ public function getType(): ?ProjectType { return $this->type; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Timezone of the project. - */ + /** + * Timezone of the project. + */ public function getTimezone(): ?string { return $this->timezone; } - /** - * Default branch. - */ + /** + * Default branch. + */ public function getDefaultBranch(): ?string { return $this->defaultBranch; } - /** - * The status of the project. - */ + /** + * The status of the project. + */ public function getStatus(): ?ProjectStatus { return $this->status; } - /** - * Whether the project is currently on a trial plan. - */ + /** + * Whether the project is currently on a trial plan. + */ public function getTrialPlan(): ?bool { return $this->trialPlan; } - /** - * The URL for the project's user interface. - */ + /** + * The URL for the project's user interface. + */ public function getProjectUi(): ?string { return $this->projectUi; } - /** - * Dedicated tag. - */ + /** + * Dedicated tag. + */ public function getDedicatedTag(): ?string { return $this->dedicatedTag; } - /** - * The date and time when the resource was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the resource was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * Activities information for the project. - * @return Activity[]|null - */ + /** + * Activities information for the project. + * @return Activity[]|null + */ public function getActivities(): ?array { return $this->activities; @@ -228,4 +226,3 @@ public function getLinks(): ?OrganizationProjectLinks return $this->links; } } - diff --git a/src/Model/OrganizationProjectCarbon.php b/src/Model/OrganizationProjectCarbon.php index 924a265f0..1c4a59dd9 100644 --- a/src/Model/OrganizationProjectCarbon.php +++ b/src/Model/OrganizationProjectCarbon.php @@ -13,8 +13,6 @@ */ final class OrganizationProjectCarbon implements Model, JsonSerializable { - - public function __construct( private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * @return MetricsValue[]|null - */ + /** + * @return MetricsValue[]|null + */ public function getValues(): ?array { return $this->values; } } - diff --git a/src/Model/OrganizationProjectLinks.php b/src/Model/OrganizationProjectLinks.php index 064e3f6dd..c1dd22b31 100644 --- a/src/Model/OrganizationProjectLinks.php +++ b/src/Model/OrganizationProjectLinks.php @@ -13,8 +13,6 @@ */ final class OrganizationProjectLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?OrganizationProjectLinksApi $api = null, private readonly ?OrganizationProjectLinksSubscription $subscription = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,84 +53,83 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current project. - */ + /** + * Link to the current project. + */ public function getSelf(): ?OrganizationProjectLinksSelf { return $this->self; } - /** - * Link to the regional API endpoint. Only present if user has project-level access. - */ + /** + * Link to the regional API endpoint. Only present if user has project-level access. + */ public function getApi(): ?OrganizationProjectLinksApi { return $this->api; } - /** - * Link to the subscription. Only present if project has a subscription. - */ + /** + * Link to the subscription. Only present if project has a subscription. + */ public function getSubscription(): ?OrganizationProjectLinksSubscription { return $this->subscription; } - /** - * Link to view usage alerts. Only present if user has view permission. - */ + /** + * Link to view usage alerts. Only present if user has view permission. + */ public function getViewUsageAlerts(): ?OrganizationProjectLinksViewUsageAlerts { return $this->viewUsageAlerts; } - /** - * Link for updating the current project. Only present if user has update permission. - */ + /** + * Link for updating the current project. Only present if user has update permission. + */ public function getUpdate(): ?OrganizationProjectLinksUpdate { return $this->update; } - /** - * Link to the billing plan page. Only present if user has manage permission. - */ + /** + * Link to the billing plan page. Only present if user has manage permission. + */ public function getPlanUri(): ?OrganizationProjectLinksPlanUri { return $this->planUri; } - /** - * Link for deleting the current project. Only present if user has delete permission. - */ + /** + * Link for deleting the current project. Only present if user has delete permission. + */ public function getDelete(): ?OrganizationProjectLinksDelete { return $this->delete; } - /** - * Link to update usage alerts. Only present if user has billing permission. - */ + /** + * Link to update usage alerts. Only present if user has billing permission. + */ public function getUpdateUsageAlerts(): ?OrganizationProjectLinksUpdateUsageAlerts { return $this->updateUsageAlerts; } - /** - * Link to the project's activities. Only present if user has view permission. - */ + /** + * Link to the project's activities. Only present if user has view permission. + */ public function getActivities(): ?OrganizationProjectLinksActivities { return $this->activities; } - /** - * Link to the project's add-ons. Only present if user has view permission. - */ + /** + * Link to the project's add-ons. Only present if user has view permission. + */ public function getAddons(): ?OrganizationProjectLinksAddons { return $this->addons; } } - diff --git a/src/Model/OrganizationProjectLinksActivities.php b/src/Model/OrganizationProjectLinksActivities.php index 2a9c095ac..602b52314 100644 --- a/src/Model/OrganizationProjectLinksActivities.php +++ b/src/Model/OrganizationProjectLinksActivities.php @@ -14,14 +14,11 @@ */ final class OrganizationProjectLinksActivities implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationProjectLinksAddons.php b/src/Model/OrganizationProjectLinksAddons.php index a8484e2f3..8fd87d244 100644 --- a/src/Model/OrganizationProjectLinksAddons.php +++ b/src/Model/OrganizationProjectLinksAddons.php @@ -14,14 +14,11 @@ */ final class OrganizationProjectLinksAddons implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationProjectLinksApi.php b/src/Model/OrganizationProjectLinksApi.php index 1a97b5e00..1280cc059 100644 --- a/src/Model/OrganizationProjectLinksApi.php +++ b/src/Model/OrganizationProjectLinksApi.php @@ -14,14 +14,11 @@ */ final class OrganizationProjectLinksApi implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationProjectLinksDelete.php b/src/Model/OrganizationProjectLinksDelete.php index d23af38e7..f130a2051 100644 --- a/src/Model/OrganizationProjectLinksDelete.php +++ b/src/Model/OrganizationProjectLinksDelete.php @@ -14,15 +14,12 @@ */ final class OrganizationProjectLinksDelete implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationProjectLinksPlanUri.php b/src/Model/OrganizationProjectLinksPlanUri.php index 85bac43db..c05933683 100644 --- a/src/Model/OrganizationProjectLinksPlanUri.php +++ b/src/Model/OrganizationProjectLinksPlanUri.php @@ -14,14 +14,11 @@ */ final class OrganizationProjectLinksPlanUri implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationProjectLinksSelf.php b/src/Model/OrganizationProjectLinksSelf.php index 8c8ba3be6..e65d63cd4 100644 --- a/src/Model/OrganizationProjectLinksSelf.php +++ b/src/Model/OrganizationProjectLinksSelf.php @@ -14,14 +14,11 @@ */ final class OrganizationProjectLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationProjectLinksSubscription.php b/src/Model/OrganizationProjectLinksSubscription.php index 88893df67..1e4328b76 100644 --- a/src/Model/OrganizationProjectLinksSubscription.php +++ b/src/Model/OrganizationProjectLinksSubscription.php @@ -14,14 +14,11 @@ */ final class OrganizationProjectLinksSubscription implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationProjectLinksUpdate.php b/src/Model/OrganizationProjectLinksUpdate.php index bd9611ae0..8e41d99fb 100644 --- a/src/Model/OrganizationProjectLinksUpdate.php +++ b/src/Model/OrganizationProjectLinksUpdate.php @@ -14,15 +14,12 @@ */ final class OrganizationProjectLinksUpdate implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php b/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php index fa7fe3b17..fdc0cffcb 100644 --- a/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php +++ b/src/Model/OrganizationProjectLinksUpdateUsageAlerts.php @@ -14,15 +14,12 @@ */ final class OrganizationProjectLinksUpdateUsageAlerts implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/OrganizationProjectLinksViewUsageAlerts.php b/src/Model/OrganizationProjectLinksViewUsageAlerts.php index d8959537c..74dd1f694 100644 --- a/src/Model/OrganizationProjectLinksViewUsageAlerts.php +++ b/src/Model/OrganizationProjectLinksViewUsageAlerts.php @@ -14,14 +14,11 @@ */ final class OrganizationProjectLinksViewUsageAlerts implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/OrganizationReference.php b/src/Model/OrganizationReference.php index 34a09e726..95dcdb80c 100644 --- a/src/Model/OrganizationReference.php +++ b/src/Model/OrganizationReference.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,8 +15,6 @@ */ final class OrganizationReference implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $type = null, @@ -23,12 +22,11 @@ public function __construct( private readonly ?string $name = null, private readonly ?string $label = null, private readonly ?string $vendor = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, ) { } - public function getModelName(): string { return self::class; @@ -53,68 +51,67 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getId(): ?string { return $this->id; } - /** - * The type of the organization. - */ + /** + * The type of the organization. + */ public function getType(): ?string { return $this->type; } - /** - * The ID of the owner. - */ + /** + * The ID of the owner. + */ public function getOwnerId(): ?string { return $this->ownerId; } - /** - * A unique machine name representing the organization. - */ + /** + * A unique machine name representing the organization. + */ public function getName(): ?string { return $this->name; } - /** - * The human-readable label of the organization. - */ + /** + * The human-readable label of the organization. + */ public function getLabel(): ?string { return $this->label; } - /** - * The vendor. - */ + /** + * The vendor. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The date and time when the organization was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the organization was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the organization was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the organization was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } } - diff --git a/src/Model/OtlpLogIntegration.php b/src/Model/OtlpLogIntegration.php index 72d80ebfd..21dd8c03f 100644 --- a/src/Model/OtlpLogIntegration.php +++ b/src/Model/OtlpLogIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level OtlpLogIntegration (auto-generated) @@ -14,8 +14,6 @@ */ final class OtlpLogIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, @@ -24,13 +22,12 @@ public function __construct( private readonly array $headers, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -57,33 +54,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -94,9 +91,9 @@ public function getExtra(): array return $this->extra; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -107,9 +104,9 @@ public function getHeaders(): array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -120,12 +117,11 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of OtlpLogIntegration - */ + /** + * The identifier of OtlpLogIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/OtlpLogIntegrationCreateCreateInput.php b/src/Model/OtlpLogIntegrationCreateCreateInput.php index ab47b7166..2cf2c1443 100644 --- a/src/Model/OtlpLogIntegrationCreateCreateInput.php +++ b/src/Model/OtlpLogIntegrationCreateCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level OtlpLogIntegrationCreateCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class OtlpLogIntegrationCreateCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,17 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -75,9 +71,9 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -88,4 +84,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/OtlpLogIntegrationPatch.php b/src/Model/OtlpLogIntegrationPatch.php index f66d7a3b0..421036df7 100644 --- a/src/Model/OtlpLogIntegrationPatch.php +++ b/src/Model/OtlpLogIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level OtlpLogIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class OtlpLogIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,17 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The HTTP endpoint - */ + /** + * The HTTP endpoint + */ public function getUrl(): string { return $this->url; @@ -75,9 +71,9 @@ public function getHeaders(): ?array return $this->headers; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -88,4 +84,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/OutboundFirewall.php b/src/Model/OutboundFirewall.php index bd2a35641..e32be5882 100644 --- a/src/Model/OutboundFirewall.php +++ b/src/Model/OutboundFirewall.php @@ -13,14 +13,11 @@ */ final class OutboundFirewall implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, outbound firewall can be used. - */ + /** + * If true, outbound firewall can be used. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/OutboundFirewallRestrictionsInner.php b/src/Model/OutboundFirewallRestrictionsInner.php index 8afe7670b..09898abaf 100644 --- a/src/Model/OutboundFirewallRestrictionsInner.php +++ b/src/Model/OutboundFirewallRestrictionsInner.php @@ -13,7 +13,6 @@ */ final class OutboundFirewallRestrictionsInner implements Model, JsonSerializable { - public const PROTOCOL_TCP = 'tcp'; public function __construct( @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -65,4 +63,3 @@ public function getPorts(): array return $this->ports; } } - diff --git a/src/Model/OwnerInfo.php b/src/Model/OwnerInfo.php index 5074fbe54..62f3174dd 100644 --- a/src/Model/OwnerInfo.php +++ b/src/Model/OwnerInfo.php @@ -14,8 +14,6 @@ */ final class OwnerInfo implements Model, JsonSerializable { - - public function __construct( private readonly ?string $type = null, private readonly ?string $username = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Type of the owner, usually 'user'. - */ + /** + * Type of the owner, usually 'user'. + */ public function getType(): ?string { return $this->type; } - /** - * The username of the owner. - */ + /** + * The username of the owner. + */ public function getUsername(): ?string { return $this->username; } - /** - * The full name of the owner. - */ + /** + * The full name of the owner. + */ public function getDisplayName(): ?string { return $this->displayName; } } - diff --git a/src/Model/PagerDutyIntegration.php b/src/Model/PagerDutyIntegration.php index 4185dd986..f7830d348 100644 --- a/src/Model/PagerDutyIntegration.php +++ b/src/Model/PagerDutyIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level PagerDutyIntegration (auto-generated) @@ -14,19 +14,16 @@ */ final class PagerDutyIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, private readonly string $routingKey, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -49,52 +46,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The PagerDuty routing key - */ + /** + * The PagerDuty routing key + */ public function getRoutingKey(): string { return $this->routingKey; } - /** - * The identifier of PagerDutyIntegration - */ + /** + * The identifier of PagerDutyIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/PagerDutyIntegrationCreateInput.php b/src/Model/PagerDutyIntegrationCreateInput.php index a5893cdd5..a6ce6ebf3 100644 --- a/src/Model/PagerDutyIntegrationCreateInput.php +++ b/src/Model/PagerDutyIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level PagerDutyIntegrationCreateInput (auto-generated) @@ -14,15 +13,12 @@ */ final class PagerDutyIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $routingKey, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The PagerDuty routing key - */ + /** + * The PagerDuty routing key + */ public function getRoutingKey(): string { return $this->routingKey; } } - diff --git a/src/Model/PagerDutyIntegrationPatch.php b/src/Model/PagerDutyIntegrationPatch.php index 3293c3e94..2fc8334d5 100644 --- a/src/Model/PagerDutyIntegrationPatch.php +++ b/src/Model/PagerDutyIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level PagerDutyIntegrationPatch (auto-generated) @@ -14,15 +13,12 @@ */ final class PagerDutyIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $routingKey, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The PagerDuty routing key - */ + /** + * The PagerDuty routing key + */ public function getRoutingKey(): string { return $this->routingKey; } } - diff --git a/src/Model/PathValue.php b/src/Model/PathValue.php index ac7a6263e..8b4495b64 100644 --- a/src/Model/PathValue.php +++ b/src/Model/PathValue.php @@ -13,7 +13,6 @@ */ final class PathValue implements Model, JsonSerializable { - public const CODE_NUMBER_301 = 301; public const CODE_NUMBER_302 = 302; public const CODE_NUMBER_307 = 307; @@ -29,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -82,4 +80,3 @@ public function getExpires(): ?string return $this->expires; } } - diff --git a/src/Model/PlanRecords.php b/src/Model/PlanRecords.php index 3a1406f8f..c1d1ab79a 100644 --- a/src/Model/PlanRecords.php +++ b/src/Model/PlanRecords.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,22 +15,19 @@ */ final class PlanRecords implements Model, JsonSerializable { - - public function __construct( - private readonly ?\DateTime $end = null, + private readonly ?DateTime $end = null, private readonly ?string $id = null, private readonly ?string $owner = null, private readonly ?string $subscriptionId = null, private readonly ?string $sku = null, private readonly ?string $plan = null, private readonly ?array $options = [], - private readonly ?\DateTime $start = null, + private readonly ?DateTime $start = null, private readonly ?string $status = null, ) { } - public function getModelName(): string { return self::class; @@ -55,41 +53,41 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The unique ID of the plan record. - */ + /** + * The unique ID of the plan record. + */ public function getId(): ?string { return $this->id; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * The ID of the subscription this record pertains to. - */ + /** + * The ID of the subscription this record pertains to. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * The product SKU of the plan that this record represents. - */ + /** + * The product SKU of the plan that this record represents. + */ public function getSku(): ?string { return $this->sku; } - /** - * The machine name of the plan that this record represents. - */ + /** + * The machine name of the plan that this record represents. + */ public function getPlan(): ?string { return $this->plan; @@ -100,28 +98,27 @@ public function getOptions(): ?array return $this->options; } - /** - * The start timestamp of this plan record (ISO 8601). - */ - public function getStart(): ?\DateTime + /** + * The start timestamp of this plan record (ISO 8601). + */ + public function getStart(): ?DateTime { return $this->start; } - /** - * The end timestamp of this plan record (ISO 8601). - */ - public function getEnd(): ?\DateTime + /** + * The end timestamp of this plan record (ISO 8601). + */ + public function getEnd(): ?DateTime { return $this->end; } - /** - * The status of the subscription during this record: active or suspended. - */ + /** + * The status of the subscription during this record: active or suspended. + */ public function getStatus(): ?string { return $this->status; } } - diff --git a/src/Model/PreServiceResourcesOverridesValue.php b/src/Model/PreServiceResourcesOverridesValue.php index 5a2f74bce..82ba0b5f1 100644 --- a/src/Model/PreServiceResourcesOverridesValue.php +++ b/src/Model/PreServiceResourcesOverridesValue.php @@ -13,8 +13,6 @@ */ final class PreServiceResourcesOverridesValue implements Model, JsonSerializable { - - public function __construct( private readonly ?float $cpu, private readonly ?int $memory, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getDisk(): ?int return $this->disk; } } - diff --git a/src/Model/PreflightChecks.php b/src/Model/PreflightChecks.php index 597e75911..f3c06f946 100644 --- a/src/Model/PreflightChecks.php +++ b/src/Model/PreflightChecks.php @@ -13,15 +13,12 @@ */ final class PreflightChecks implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly array $ignoredRules, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getIgnoredRules(): array return $this->ignoredRules; } } - diff --git a/src/Model/PrepaymentObject.php b/src/Model/PrepaymentObject.php index 623b9aaea..e0b224ffd 100644 --- a/src/Model/PrepaymentObject.php +++ b/src/Model/PrepaymentObject.php @@ -14,14 +14,11 @@ */ final class PrepaymentObject implements Model, JsonSerializable { - - public function __construct( private readonly ?PrepaymentObjectPrepayment $prepayment = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Prepayment information for an organization. - */ + /** + * Prepayment information for an organization. + */ public function getPrepayment(): ?PrepaymentObjectPrepayment { return $this->prepayment; } } - diff --git a/src/Model/PrepaymentObjectPrepayment.php b/src/Model/PrepaymentObjectPrepayment.php index b49445e8e..6cf0ce09d 100644 --- a/src/Model/PrepaymentObjectPrepayment.php +++ b/src/Model/PrepaymentObjectPrepayment.php @@ -14,8 +14,6 @@ */ final class PrepaymentObjectPrepayment implements Model, JsonSerializable { - - public function __construct( private readonly ?string $lastUpdatedAt = null, private readonly ?string $fallback = null, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,44 +44,43 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Organization ID - */ + /** + * Organization ID + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The prepayment balance in complex format. - */ + /** + * The prepayment balance in complex format. + */ public function getBalance(): ?PrepaymentObjectPrepaymentBalance { return $this->balance; } - /** - * The date the prepayment balance was last updated. - */ + /** + * The date the prepayment balance was last updated. + */ public function getLastUpdatedAt(): ?string { return $this->lastUpdatedAt; } - /** - * Whether the prepayment balance is enough to cover the upcoming order. - */ + /** + * Whether the prepayment balance is enough to cover the upcoming order. + */ public function getSufficient(): ?bool { return $this->sufficient; } - /** - * The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order. - */ + /** + * The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order. + */ public function getFallback(): ?string { return $this->fallback; } } - diff --git a/src/Model/PrepaymentObjectPrepaymentBalance.php b/src/Model/PrepaymentObjectPrepaymentBalance.php index d44f1b669..ea6b03a5a 100644 --- a/src/Model/PrepaymentObjectPrepaymentBalance.php +++ b/src/Model/PrepaymentObjectPrepaymentBalance.php @@ -14,8 +14,6 @@ */ final class PrepaymentObjectPrepaymentBalance implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted balance. - */ + /** + * Formatted balance. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * The balance amount. - */ + /** + * The balance amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * The balance currency code. - */ + /** + * The balance currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * The balance currency symbol. - */ + /** + * The balance currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } - diff --git a/src/Model/PrepaymentTransactionObject.php b/src/Model/PrepaymentTransactionObject.php index 3b82bd9a0..35be1e474 100644 --- a/src/Model/PrepaymentTransactionObject.php +++ b/src/Model/PrepaymentTransactionObject.php @@ -14,8 +14,6 @@ */ final class PrepaymentTransactionObject implements Model, JsonSerializable { - - public function __construct( private readonly ?string $updated = null, private readonly ?string $expireDate = null, @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -51,60 +48,59 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Order ID - */ + /** + * Order ID + */ public function getOrderId(): ?string { return $this->orderId; } - /** - * The message associated with transaction. - */ + /** + * The message associated with transaction. + */ public function getMessage(): ?string { return $this->message; } - /** - * Whether the transactions was successful or a failure. - */ + /** + * Whether the transactions was successful or a failure. + */ public function getStatus(): ?string { return $this->status; } - /** - * The prepayment balance in complex format. - */ + /** + * The prepayment balance in complex format. + */ public function getAmount(): ?PrepaymentTransactionObjectAmount { return $this->amount; } - /** - * Time the transaction was created. - */ + /** + * Time the transaction was created. + */ public function getCreated(): ?string { return $this->created; } - /** - * Time the transaction was last updated. - */ + /** + * Time the transaction was last updated. + */ public function getUpdated(): ?string { return $this->updated; } - /** - * The expiration date of the transaction (deposits only). - */ + /** + * The expiration date of the transaction (deposits only). + */ public function getExpireDate(): ?string { return $this->expireDate; } } - diff --git a/src/Model/PrepaymentTransactionObjectAmount.php b/src/Model/PrepaymentTransactionObjectAmount.php index 88378276d..231b909b0 100644 --- a/src/Model/PrepaymentTransactionObjectAmount.php +++ b/src/Model/PrepaymentTransactionObjectAmount.php @@ -14,8 +14,6 @@ */ final class PrepaymentTransactionObjectAmount implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted balance. - */ + /** + * Formatted balance. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * The balance amount. - */ + /** + * The balance amount. + */ public function getAmount(): ?float { return $this->amount; } - /** - * The balance currency code. - */ + /** + * The balance currency code. + */ public function getCurrencyCode(): ?string { return $this->currencyCode; } - /** - * The balance currency symbol. - */ + /** + * The balance currency symbol. + */ public function getCurrencySymbol(): ?string { return $this->currencySymbol; } } - diff --git a/src/Model/ProdDomainStorage.php b/src/Model/ProdDomainStorage.php index 80fd5282b..465261750 100644 --- a/src/Model/ProdDomainStorage.php +++ b/src/Model/ProdDomainStorage.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Domain; /** * Low level ProdDomainStorage (auto-generated) @@ -14,14 +14,12 @@ */ final class ProdDomainStorage implements Model, JsonSerializable, Domain { - - public function __construct( private readonly string $type, private readonly string $name, private readonly array $attributes, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, private readonly ?string $project = null, private readonly ?string $registeredName = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -55,33 +52,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of domain - */ + /** + * The type of domain + */ public function getType(): string { return $this->type; } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -92,36 +89,35 @@ public function getAttributes(): array return $this->attributes; } - /** - * The identifier of ProdDomainStorage - */ + /** + * The identifier of ProdDomainStorage + */ public function getId(): ?string { return $this->id; } - /** - * The name of the project - */ + /** + * The name of the project + */ public function getProject(): ?string { return $this->project; } - /** - * The claimed domain name - */ + /** + * The claimed domain name + */ public function getRegisteredName(): ?string { return $this->registeredName; } - /** - * Is this domain default - */ + /** + * Is this domain default + */ public function getIsDefault(): ?bool { return $this->isDefault; } } - diff --git a/src/Model/ProdDomainStorageCreateInput.php b/src/Model/ProdDomainStorageCreateInput.php index 7fbee809b..c3ec86f64 100644 --- a/src/Model/ProdDomainStorageCreateInput.php +++ b/src/Model/ProdDomainStorageCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DomainCreateInput; /** * Low level ProdDomainStorageCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class ProdDomainStorageCreateInput implements Model, JsonSerializable, DomainCreateInput { - - public function __construct( private readonly string $name, private readonly ?array $attributes = [], @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,9 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -56,12 +52,11 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Is this domain default - */ + /** + * Is this domain default + */ public function getIsDefault(): ?bool { return $this->isDefault; } } - diff --git a/src/Model/ProdDomainStoragePatch.php b/src/Model/ProdDomainStoragePatch.php index 837fac513..2c3c6ce8f 100644 --- a/src/Model/ProdDomainStoragePatch.php +++ b/src/Model/ProdDomainStoragePatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DomainPatch; /** * Low level ProdDomainStoragePatch (auto-generated) @@ -14,15 +13,12 @@ */ final class ProdDomainStoragePatch implements Model, JsonSerializable, DomainPatch { - - public function __construct( private readonly ?array $attributes = [], private readonly ?bool $isDefault = null, ) { } - public function getModelName(): string { return self::class; @@ -46,12 +42,11 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Is this domain default - */ + /** + * Is this domain default + */ public function getIsDefault(): ?bool { return $this->isDefault; } } - diff --git a/src/Model/ProductionResources.php b/src/Model/ProductionResources.php index b58fd3e38..e2a1fc00d 100644 --- a/src/Model/ProductionResources.php +++ b/src/Model/ProductionResources.php @@ -14,8 +14,6 @@ */ final class ProductionResources implements Model, JsonSerializable { - - public function __construct( private readonly bool $legacyDevelopment, private readonly ?float $maxCpu, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enable legacy development sizing for this environment type - */ + /** + * Enable legacy development sizing for this environment type + */ public function getLegacyDevelopment(): bool { return $this->legacyDevelopment; } - /** - * Maximum number of allocated CPU units - */ + /** + * Maximum number of allocated CPU units + */ public function getMaxCpu(): ?float { return $this->maxCpu; } - /** - * Maximum amount of allocated RAM - */ + /** + * Maximum amount of allocated RAM + */ public function getMaxMemory(): ?int { return $this->maxMemory; } - /** - * Maximum number of environments - */ + /** + * Maximum number of environments + */ public function getMaxEnvironments(): ?int { return $this->maxEnvironments; } } - diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 8b7e671ea..50091ed8b 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class Profile implements Model, JsonSerializable { - public const TYPE_USER = 'user'; public const TYPE_ORGANIZATION = 'organization'; public const CUSTOMER_TYPE_INDIVIDUAL = 'individual'; @@ -39,8 +39,8 @@ public function __construct( private readonly ?string $defaultCatalog = null, private readonly ?string $projectOptionsUrl = null, private readonly ?bool $marketing = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?string $billingContact = null, private readonly ?bool $invoiced = null, private readonly ?string $customerType = null, @@ -48,7 +48,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -88,188 +87,187 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The user's unique ID. - */ + /** + * The user's unique ID. + */ public function getId(): ?string { return $this->id; } - /** - * The user's display name. - */ + /** + * The user's display name. + */ public function getDisplayName(): ?string { return $this->displayName; } - /** - * The user's email address. - */ + /** + * The user's email address. + */ public function getEmail(): ?string { return $this->email; } - /** - * The user's username. - */ + /** + * The user's username. + */ public function getUsername(): ?string { return $this->username; } - /** - * The user's type (user/organization). - */ + /** + * The user's type (user/organization). + */ public function getType(): ?string { return $this->type; } - /** - * The URL of the user's picture. - */ + /** + * The URL of the user's picture. + */ public function getPicture(): ?string { return $this->picture; } - /** - * The company type. - */ + /** + * The company type. + */ public function getCompanyType(): ?string { return $this->companyType; } - /** - * The name of the company. - */ + /** + * The name of the company. + */ public function getCompanyName(): ?string { return $this->companyName; } - /** - * A 3-letter ISO 4217 currency code (assigned according to the billing address). - */ + /** + * A 3-letter ISO 4217 currency code (assigned according to the billing address). + */ public function getCurrency(): ?string { return $this->currency; } - /** - * The vat number of the user. - */ + /** + * The vat number of the user. + */ public function getVatNumber(): ?string { return $this->vatNumber; } - /** - * The role of the user in the company. - */ + /** + * The role of the user in the company. + */ public function getCompanyRole(): ?string { return $this->companyRole; } - /** - * The user or company website. - */ + /** + * The user or company website. + */ public function getWebsiteUrl(): ?string { return $this->websiteUrl; } - /** - * Whether the new UI features are enabled for this user. - */ + /** + * Whether the new UI features are enabled for this user. + */ public function getNewUi(): ?bool { return $this->newUi; } - /** - * The user's chosen color scheme for user interfaces. - */ + /** + * The user's chosen color scheme for user interfaces. + */ public function getUiColorscheme(): ?string { return $this->uiColorscheme; } - /** - * The URL of a catalog file which overrides the default. - */ + /** + * The URL of a catalog file which overrides the default. + */ public function getDefaultCatalog(): ?string { return $this->defaultCatalog; } - /** - * The URL of an account-wide project options file. - */ + /** + * The URL of an account-wide project options file. + */ public function getProjectOptionsUrl(): ?string { return $this->projectOptionsUrl; } - /** - * Flag if the user agreed to receive marketing communication. - */ + /** + * Flag if the user agreed to receive marketing communication. + */ public function getMarketing(): ?bool { return $this->marketing; } - /** - * The timestamp representing when the user account was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The timestamp representing when the user account was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The timestamp representing when the user account was last modified. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The timestamp representing when the user account was last modified. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The e-mail address of a contact to whom billing notices will be sent. - */ + /** + * The e-mail address of a contact to whom billing notices will be sent. + */ public function getBillingContact(): ?string { return $this->billingContact; } - /** - * The customer is invoiced. - */ + /** + * The customer is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } - /** - * The customer type. - */ + /** + * The customer type. + */ public function getCustomerType(): ?string { return $this->customerType; } - /** - * The legal entity name of the customer. - */ + /** + * The legal entity name of the customer. + */ public function getLegalEntityName(): ?string { return $this->legalEntityName; } } - diff --git a/src/Model/Project.php b/src/Model/Project.php index 8267431de..08a7a3edd 100644 --- a/src/Model/Project.php +++ b/src/Model/Project.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class Project implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly array $attributes, @@ -26,8 +25,8 @@ public function __construct( private readonly string $region, private readonly RepositoryInformation $repository, private readonly SubscriptionInformation $subscription, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $namespace, private readonly ?string $organization, private readonly ?string $defaultBranch, @@ -36,7 +35,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -70,26 +68,26 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Project - */ + /** + * The identifier of Project + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } @@ -99,108 +97,107 @@ public function getAttributes(): array return $this->attributes; } - /** - * The title of the project - */ + /** + * The title of the project + */ public function getTitle(): string { return $this->title; } - /** - * The description of the project - */ + /** + * The description of the project + */ public function getDescription(): string { return $this->description; } - /** - * The owner of the project - */ + /** + * The owner of the project + */ public function getOwner(): string { return $this->owner; } - /** - * The namespace the project belongs in - */ + /** + * The namespace the project belongs in + */ public function getNamespace(): ?string { return $this->namespace; } - /** - * The organization the project belongs in - */ + /** + * The organization the project belongs in + */ public function getOrganization(): ?string { return $this->organization; } - /** - * The default branch of the project - */ + /** + * The default branch of the project + */ public function getDefaultBranch(): ?string { return $this->defaultBranch; } - /** - * The status of the project - */ + /** + * The status of the project + */ public function getStatus(): Status { return $this->status; } - /** - * Timezone of the project - */ + /** + * Timezone of the project + */ public function getTimezone(): string { return $this->timezone; } - /** - * The region of the project - */ + /** + * The region of the project + */ public function getRegion(): string { return $this->region; } - /** - * The repository information of the project - */ + /** + * The repository information of the project + */ public function getRepository(): RepositoryInformation { return $this->repository; } - /** - * The default domain of the project - */ + /** + * The default domain of the project + */ public function getDefaultDomain(): ?string { return $this->defaultDomain; } - /** - * The subscription information of the project - */ + /** + * The subscription information of the project + */ public function getSubscription(): SubscriptionInformation { return $this->subscription; } - /** - * The maintenance information of the project - */ + /** + * The maintenance information of the project + */ public function getMaintenance(): ?Maintenance { return $this->maintenance; } } - diff --git a/src/Model/ProjectCapabilities.php b/src/Model/ProjectCapabilities.php index 855bdd487..bfd1ca06c 100644 --- a/src/Model/ProjectCapabilities.php +++ b/src/Model/ProjectCapabilities.php @@ -13,8 +13,6 @@ */ final class ProjectCapabilities implements Model, JsonSerializable { - - public function __construct( private readonly Tasks $tasks, private readonly Metrics $metrics, @@ -34,7 +32,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -91,9 +88,9 @@ public function getImages(): array return $this->images; } - /** - * Maximum number of instance per service - */ + /** + * Maximum number of instance per service + */ public function getInstanceLimit(): int { return $this->instanceLimit; @@ -144,4 +141,3 @@ public function getIntegrations(): ?Integrations return $this->integrations; } } - diff --git a/src/Model/ProjectCarbon.php b/src/Model/ProjectCarbon.php index 395e9a973..4fd3d3c6a 100644 --- a/src/Model/ProjectCarbon.php +++ b/src/Model/ProjectCarbon.php @@ -13,8 +13,6 @@ */ final class ProjectCarbon implements Model, JsonSerializable { - - public function __construct( private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -46,17 +43,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; @@ -67,20 +64,19 @@ public function getMeta(): ?MetricsMetadata return $this->meta; } - /** - * @return MetricsValue[]|null - */ + /** + * @return MetricsValue[]|null + */ public function getValues(): ?array { return $this->values; } - /** - * The calculated total of the metric for the given interval. - */ + /** + * The calculated total of the metric for the given interval. + */ public function getTotal(): ?float { return $this->total; } } - diff --git a/src/Model/ProjectFacets.php b/src/Model/ProjectFacets.php index 898f62de9..825e824af 100644 --- a/src/Model/ProjectFacets.php +++ b/src/Model/ProjectFacets.php @@ -14,14 +14,11 @@ */ final class ProjectFacets implements Model, JsonSerializable { - - public function __construct( private readonly ?array $plans = [], ) { } - public function getModelName(): string { return self::class; @@ -44,4 +41,3 @@ public function getPlans(): ?array return $this->plans; } } - diff --git a/src/Model/ProjectInfo.php b/src/Model/ProjectInfo.php index 9ebaa4aa6..22aae1da1 100644 --- a/src/Model/ProjectInfo.php +++ b/src/Model/ProjectInfo.php @@ -14,8 +14,6 @@ */ final class ProjectInfo implements Model, JsonSerializable { - - public function __construct( private readonly string $title, private readonly string $name, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -79,4 +76,3 @@ public function getSettings(): object return $this->settings; } } - diff --git a/src/Model/ProjectInvitation.php b/src/Model/ProjectInvitation.php index aaf512c86..164a0905f 100644 --- a/src/Model/ProjectInvitation.php +++ b/src/Model/ProjectInvitation.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class ProjectInvitation implements Model, JsonSerializable { - public const STATE_PENDING = 'pending'; public const STATE_PROCESSING = 'processing'; public const STATE_ACCEPTED = 'accepted'; @@ -23,20 +23,19 @@ final class ProjectInvitation implements Model, JsonSerializable public const ROLE_VIEWER = 'viewer'; public function __construct( - private readonly ?\DateTime $finishedAt = null, + private readonly ?DateTime $finishedAt = null, private readonly ?string $id = null, private readonly ?string $state = null, private readonly ?string $projectId = null, private readonly ?string $role = null, private readonly ?string $email = null, private readonly ?OrganizationInvitationOwner $owner = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?array $environments = [], ) { } - public function getModelName(): string { return self::class; @@ -63,84 +62,83 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the invitation. - */ + /** + * The ID of the invitation. + */ public function getId(): ?string { return $this->id; } - /** - * The invitation state. - */ + /** + * The invitation state. + */ public function getState(): ?string { return $this->state; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The project role. - */ + /** + * The project role. + */ public function getRole(): ?string { return $this->role; } - /** - * The email address of the invitee. - */ + /** + * The email address of the invitee. + */ public function getEmail(): ?string { return $this->email; } - /** - * The inviter. - */ + /** + * The inviter. + */ public function getOwner(): ?OrganizationInvitationOwner { return $this->owner; } - /** - * The date and time when the invitation was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the invitation was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the invitation was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the invitation was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The date and time when the invitation was finished. - */ - public function getFinishedAt(): ?\DateTime + /** + * The date and time when the invitation was finished. + */ + public function getFinishedAt(): ?DateTime { return $this->finishedAt; } - /** - * @return ProjectInvitationEnvironmentsInner[]|null - */ + /** + * @return ProjectInvitationEnvironmentsInner[]|null + */ public function getEnvironments(): ?array { return $this->environments; } } - diff --git a/src/Model/ProjectInvitationEnvironmentsInner.php b/src/Model/ProjectInvitationEnvironmentsInner.php index 4c578e844..32bf26421 100644 --- a/src/Model/ProjectInvitationEnvironmentsInner.php +++ b/src/Model/ProjectInvitationEnvironmentsInner.php @@ -13,7 +13,6 @@ */ final class ProjectInvitationEnvironmentsInner implements Model, JsonSerializable { - public const ROLE_ADMIN = 'admin'; public const ROLE_VIEWER = 'viewer'; public const ROLE_CONTRIBUTOR = 'contributor'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -67,4 +65,3 @@ public function getTitle(): ?string return $this->title; } } - diff --git a/src/Model/ProjectOptions.php b/src/Model/ProjectOptions.php index 5121de1bf..6fa63e1db 100644 --- a/src/Model/ProjectOptions.php +++ b/src/Model/ProjectOptions.php @@ -14,8 +14,6 @@ */ final class ProjectOptions implements Model, JsonSerializable { - - public function __construct( private readonly ?ProjectOptionsDefaults $defaults = null, private readonly ?ProjectOptionsEnforced $enforced = null, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -47,17 +44,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The initial values applied to the project. - */ + /** + * The initial values applied to the project. + */ public function getDefaults(): ?ProjectOptionsDefaults { return $this->defaults; } - /** - * The enforced values applied to the project. - */ + /** + * The enforced values applied to the project. + */ public function getEnforced(): ?ProjectOptionsEnforced { return $this->enforced; @@ -73,12 +70,11 @@ public function getPlans(): ?array return $this->plans; } - /** - * The billing settings. - */ + /** + * The billing settings. + */ public function getBilling(): ?object { return $this->billing; } } - diff --git a/src/Model/ProjectOptionsAggregated.php b/src/Model/ProjectOptionsAggregated.php index b30be67e1..db731fca8 100644 --- a/src/Model/ProjectOptionsAggregated.php +++ b/src/Model/ProjectOptionsAggregated.php @@ -13,8 +13,6 @@ */ final class ProjectOptionsAggregated implements Model, JsonSerializable { - - public function __construct( private readonly ?object $billing = null, private readonly ?object $defaults = null, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -108,12 +105,11 @@ public function getContainerSizes(): ?array return $this->containerSizes; } - /** - * Debug configuration. - */ + /** + * Debug configuration. + */ public function getDebug(): ?object { return $this->debug; } } - diff --git a/src/Model/ProjectOptionsDefaults.php b/src/Model/ProjectOptionsDefaults.php index 69cd67225..8dce6968e 100644 --- a/src/Model/ProjectOptionsDefaults.php +++ b/src/Model/ProjectOptionsDefaults.php @@ -14,8 +14,6 @@ */ final class ProjectOptionsDefaults implements Model, JsonSerializable { - - public function __construct( private readonly ?object $settings = null, private readonly ?object $variables = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The project settings. - */ + /** + * The project settings. + */ public function getSettings(): ?object { return $this->settings; } - /** - * The project variables. - */ + /** + * The project variables. + */ public function getVariables(): ?object { return $this->variables; } - /** - * The project access list. - */ + /** + * The project access list. + */ public function getAccess(): ?object { return $this->access; } - /** - * The project capabilities. - */ + /** + * The project capabilities. + */ public function getCapabilities(): ?object { return $this->capabilities; } } - diff --git a/src/Model/ProjectOptionsEnforced.php b/src/Model/ProjectOptionsEnforced.php index 013384cab..36e611bc1 100644 --- a/src/Model/ProjectOptionsEnforced.php +++ b/src/Model/ProjectOptionsEnforced.php @@ -14,15 +14,12 @@ */ final class ProjectOptionsEnforced implements Model, JsonSerializable { - - public function __construct( private readonly ?object $settings = null, private readonly ?object $capabilities = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The project settings. - */ + /** + * The project settings. + */ public function getSettings(): ?object { return $this->settings; } - /** - * The project capabilities. - */ + /** + * The project capabilities. + */ public function getCapabilities(): ?object { return $this->capabilities; } } - diff --git a/src/Model/ProjectReference.php b/src/Model/ProjectReference.php index 93797571c..a3839765c 100644 --- a/src/Model/ProjectReference.php +++ b/src/Model/ProjectReference.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,8 +15,6 @@ */ final class ProjectReference implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $organizationId, @@ -25,13 +24,12 @@ public function __construct( private readonly ProjectType $type, private readonly string $plan, private readonly ProjectStatus $status, - private readonly \DateTime $createdAt, - private readonly \DateTime $updatedAt, + private readonly DateTime $createdAt, + private readonly DateTime $updatedAt, private readonly ?bool $invoiced = null, ) { } - public function getModelName(): string { return self::class; @@ -59,92 +57,91 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getId(): string { return $this->id; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): string { return $this->organizationId; } - /** - * The ID of the subscription. - */ + /** + * The ID of the subscription. + */ public function getSubscriptionId(): string { return $this->subscriptionId; } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getRegion(): string { return $this->region; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): string { return $this->title; } - /** - * The type of projects. - */ + /** + * The type of projects. + */ public function getType(): ProjectType { return $this->type; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): string { return $this->plan; } - /** - * The status of the project. - */ + /** + * The status of the project. + */ public function getStatus(): ProjectStatus { return $this->status; } - /** - * The date and time when the resource was created. - */ - public function getCreatedAt(): \DateTime + /** + * The date and time when the resource was created. + */ + public function getCreatedAt(): DateTime { return $this->createdAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): \DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): DateTime { return $this->updatedAt; } - /** - * Whether the project is invoiced. - */ + /** + * Whether the project is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } } - diff --git a/src/Model/ProjectSettings.php b/src/Model/ProjectSettings.php index 56098317e..915773475 100644 --- a/src/Model/ProjectSettings.php +++ b/src/Model/ProjectSettings.php @@ -13,7 +13,6 @@ */ final class ProjectSettings implements Model, JsonSerializable { - public const DEVELOPMENT_SERVICE_SIZE__2_XL = '2XL'; public const DEVELOPMENT_SERVICE_SIZE__4_XL = '4XL'; public const DEVELOPMENT_SERVICE_SIZE_L = 'L'; @@ -114,7 +113,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -213,97 +211,97 @@ public function getInitialize(): object return $this->initialize; } - /** - * The name of the product. - */ + /** + * The name of the product. + */ public function getProductName(): string { return $this->productName; } - /** - * The lowercase ASCII code of the product. - */ + /** + * The lowercase ASCII code of the product. + */ public function getProductCode(): string { return $this->productCode; } - /** - * The template of the project UI uri - */ + /** + * The template of the project UI uri + */ public function getUiUriTemplate(): string { return $this->uiUriTemplate; } - /** - * The prefix of the generated environment variables. - */ + /** + * The prefix of the generated environment variables. + */ public function getVariablesPrefix(): string { return $this->variablesPrefix; } - /** - * The email of the bot. - */ + /** + * The email of the bot. + */ public function getBotEmail(): string { return $this->botEmail; } - /** - * The name of the application-specific configuration file. - */ + /** + * The name of the application-specific configuration file. + */ public function getApplicationConfigFile(): string { return $this->applicationConfigFile; } - /** - * The name of the project configuration directory. - */ + /** + * The name of the project configuration directory. + */ public function getProjectConfigDir(): string { return $this->projectConfigDir; } - /** - * Whether to use the default Drupal-centric configuration files when missing from the repository. - */ + /** + * Whether to use the default Drupal-centric configuration files when missing from the repository. + */ public function getUseDrupalDefaults(): bool { return $this->useDrupalDefaults; } - /** - * Whether to use legacy subdomain scheme, that replaces `.` by `---` in development subdomains. - */ + /** + * Whether to use legacy subdomain scheme, that replaces `.` by `---` in development subdomains. + */ public function getUseLegacySubdomains(): bool { return $this->useLegacySubdomains; } - /** - * The size of development services. - */ + /** + * The size of development services. + */ public function getDevelopmentServiceSize(): string { return $this->developmentServiceSize; } - /** - * The size of development applications. - */ + /** + * The size of development applications. + */ public function getDevelopmentApplicationSize(): string { return $this->developmentApplicationSize; } - /** - * Enable automatic certificate provisioning. - */ + /** + * Enable automatic certificate provisioning. + */ public function getEnableCertificateProvisioning(): bool { return $this->enableCertificateProvisioning; @@ -314,73 +312,73 @@ public function getCertificateStyle(): string return $this->certificateStyle; } - /** - * Create an activity for certificate renewal - */ + /** + * Create an activity for certificate renewal + */ public function getCertificateRenewalActivity(): bool { return $this->certificateRenewalActivity; } - /** - * The template of the development domain, can include {project} and {environment} placeholders. - */ + /** + * The template of the development domain, can include {project} and {environment} placeholders. + */ public function getDevelopmentDomainTemplate(): ?string { return $this->developmentDomainTemplate; } - /** - * Enable the State API-driven deployments on regions that support them. - */ + /** + * Enable the State API-driven deployments on regions that support them. + */ public function getEnableStateApiDeployments(): bool { return $this->enableStateApiDeployments; } - /** - * Set the size of the temporary disk (/tmp, in MB). - */ + /** + * Set the size of the temporary disk (/tmp, in MB). + */ public function getTemporaryDiskSize(): ?int { return $this->temporaryDiskSize; } - /** - * Set the size of the instance disk (in MB). - */ + /** + * Set the size of the instance disk (in MB). + */ public function getLocalDiskSize(): ?int { return $this->localDiskSize; } - /** - * Minimum interval between cron runs (in minutes) - */ + /** + * Minimum interval between cron runs (in minutes) + */ public function getCronMinimumInterval(): int { return $this->cronMinimumInterval; } - /** - * Maximum jitter inserted in cron runs (in minutes) - */ + /** + * Maximum jitter inserted in cron runs (in minutes) + */ public function getCronMaximumJitter(): int { return $this->cronMaximumJitter; } - /** - * The interval (in days) for which cron activity and logs are kept around - */ + /** + * The interval (in days) for which cron activity and logs are kept around + */ public function getCronProductionExpiryInterval(): int { return $this->cronProductionExpiryInterval; } - /** - * The interval (in days) for which cron activity and logs are kept around - */ + /** + * The interval (in days) for which cron activity and logs are kept around + */ public function getCronNonProductionExpiryInterval(): int { return $this->cronNonProductionExpiryInterval; @@ -391,17 +389,17 @@ public function getConcurrencyLimits(): array return $this->concurrencyLimits; } - /** - * Enable the flexible build cache implementation - */ + /** + * Enable the flexible build cache implementation + */ public function getFlexibleBuildCache(): bool { return $this->flexibleBuildCache; } - /** - * Strict configuration validation. - */ + /** + * Strict configuration validation. + */ public function getStrictConfiguration(): bool { return $this->strictConfiguration; @@ -417,66 +415,66 @@ public function getCronsInGit(): bool return $this->cronsInGit; } - /** - * Custom error template for the router. - */ + /** + * Custom error template for the router. + */ public function getCustomErrorTemplate(): ?string { return $this->customErrorTemplate; } - /** - * Custom error template for the application. - */ + /** + * Custom error template for the application. + */ public function getAppErrorPageTemplate(): ?string { return $this->appErrorPageTemplate; } - /** - * The strategy used to generate environment machine names - */ + /** + * The strategy used to generate environment machine names + */ public function getEnvironmentNameStrategy(): string { return $this->environmentNameStrategy; } - /** - * Data retention configuration - * @return DataRetentionConfigurationValue[]|null - */ + /** + * Data retention configuration + * @return DataRetentionConfigurationValue[]|null + */ public function getDataRetention(): ?array { return $this->dataRetention; } - /** - * Enable pushing commits to codesource integration. - */ + /** + * Enable pushing commits to codesource integration. + */ public function getEnableCodesourceIntegrationPush(): bool { return $this->enableCodesourceIntegrationPush; } - /** - * Enforce multi-factor authentication. - */ + /** + * Enforce multi-factor authentication. + */ public function getEnforceMfa(): bool { return $this->enforceMfa; } - /** - * Use systemd images. - */ + /** + * Use systemd images. + */ public function getSystemd(): bool { return $this->systemd; } - /** - * Use the router v2 image. - */ + /** + * Use the router v2 image. + */ public function getRouterGen2(): bool { return $this->routerGen2; @@ -487,17 +485,17 @@ public function getBuildResources(): BuildResources1 return $this->buildResources; } - /** - * The default policy for firewall outbound restrictions - */ + /** + * The default policy for firewall outbound restrictions + */ public function getOutboundRestrictionsDefaultPolicy(): string { return $this->outboundRestrictionsDefaultPolicy; } - /** - * Whether self-upgrades are enabled - */ + /** + * Whether self-upgrades are enabled + */ public function getSelfUpgrade(): bool { return $this->selfUpgrade; @@ -513,49 +511,49 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * Maximum number of routes allowed - */ + /** + * Maximum number of routes allowed + */ public function getMaxAllowedRoutes(): int { return $this->maxAllowedRoutes; } - /** - * Maximum number of redirect paths allowed - */ + /** + * Maximum number of redirect paths allowed + */ public function getMaxAllowedRedirectsPaths(): int { return $this->maxAllowedRedirectsPaths; } - /** - * Enable incremental backups on regions that support them. - */ + /** + * Enable incremental backups on regions that support them. + */ public function getEnableIncrementalBackups(): bool { return $this->enableIncrementalBackups; } - /** - * Enable sizing api. - */ + /** + * Enable sizing api. + */ public function getSizingApiEnabled(): bool { return $this->sizingApiEnabled; } - /** - * Enable cache grace period. - */ + /** + * Enable cache grace period. + */ public function getEnableCacheGracePeriod(): bool { return $this->enableCacheGracePeriod; } - /** - * Enable zero-downtime deployments for resource-only changes. - */ + /** + * Enable zero-downtime deployments for resource-only changes. + */ public function getEnableZeroDowntimeDeployments(): bool { return $this->enableZeroDowntimeDeployments; @@ -566,41 +564,41 @@ public function getEnableAdminAgent(): bool return $this->enableAdminAgent; } - /** - * The certifier url - */ + /** + * The certifier url + */ public function getCertifierUrl(): string { return $this->certifierUrl; } - /** - * Whether centralized permissions are enabled - */ + /** + * Whether centralized permissions are enabled + */ public function getCentralizedPermissions(): bool { return $this->centralizedPermissions; } - /** - * Maximum size of request to glue-server (in MB) - */ + /** + * Maximum size of request to glue-server (in MB) + */ public function getGlueServerMaxRequestSize(): int { return $this->glueServerMaxRequestSize; } - /** - * Enable SSH access update with persistent endpoint - */ + /** + * Enable SSH access update with persistent endpoint + */ public function getPersistentEndpointsSsh(): bool { return $this->persistentEndpointsSsh; } - /** - * Enable SSL certificate update with persistent endpoint - */ + /** + * Enable SSL certificate update with persistent endpoint + */ public function getPersistentEndpointsSslCertificates(): bool { return $this->persistentEndpointsSslCertificates; @@ -621,26 +619,26 @@ public function getEnableUnifiedConfiguration(): bool return $this->enableUnifiedConfiguration; } - /** - * When enabled, explicitly empty routes configuration (routes: or routes: {}) will result in no routes being - * generated instead of fallback routes. - */ + /** + * When enabled, explicitly empty routes configuration (routes: or routes: {}) will result in no routes being + * generated instead of fallback routes. + */ public function getEnableExplicitEmptyRoutes(): bool { return $this->enableExplicitEmptyRoutes; } - /** - * Enable tracing support in routes - */ + /** + * Enable tracing support in routes + */ public function getEnableRoutesTracing(): bool { return $this->enableRoutesTracing; } - /** - * Enable extended deployment validation by images - */ + /** + * Enable extended deployment validation by images + */ public function getImageDeploymentValidation(): bool { return $this->imageDeploymentValidation; @@ -651,17 +649,17 @@ public function getSupportGenericImages(): bool return $this->supportGenericImages; } - /** - * Enable fetching the GitHub App token from SIA. - */ + /** + * Enable fetching the GitHub App token from SIA. + */ public function getEnableGithubAppTokenExchange(): bool { return $this->enableGithubAppTokenExchange; } - /** - * The continuous profiling configuration - */ + /** + * The continuous profiling configuration + */ public function getContinuousProfiling(): ContinuousProfilingConfiguration { return $this->continuousProfiling; @@ -672,17 +670,17 @@ public function getDisableAgentErrorReporter(): bool return $this->disableAgentErrorReporter; } - /** - * Require ownership proof before domains are added to environments. - */ + /** + * Require ownership proof before domains are added to environments. + */ public function getRequiresDomainOwnership(): bool { return $this->requiresDomainOwnership; } - /** - * Enable guaranteed resources feature - */ + /** + * Enable guaranteed resources feature + */ public function getEnableGuaranteedResources(): bool { return $this->enableGuaranteedResources; @@ -693,41 +691,41 @@ public function getGitServer(): GitServerConfiguration return $this->gitServer; } - /** - * The maximum size of activity logs in bytes. This limit is applied on the pre-compressed log size. - */ + /** + * The maximum size of activity logs in bytes. This limit is applied on the pre-compressed log size. + */ public function getActivityLogsMaxSize(): int { return $this->activityLogsMaxSize; } - /** - * If deployments can be manual, i.e. explicitly triggered by user - */ + /** + * If deployments can be manual, i.e. explicitly triggered by user + */ public function getAllowManualDeployments(): bool { return $this->allowManualDeployments; } - /** - * If the project can use rolling deployments - */ + /** + * If the project can use rolling deployments + */ public function getAllowRollingDeployments(): bool { return $this->allowRollingDeployments; } - /** - * Configuration for the maintenance window schedule - */ + /** + * Configuration for the maintenance window schedule + */ public function getMaintenanceWindow(): ?MaintenanceWindowConfiguration { return $this->maintenanceWindow; } - /** - * Allow certain types of activities to be rescheduled - */ + /** + * Allow certain types of activities to be rescheduled + */ public function getAllowActivityReschedule(): bool { return $this->allowActivityReschedule; @@ -738,9 +736,9 @@ public function getAllowBurst(): bool return $this->allowBurst; } - /** - * Router resource settings for flex plan - */ + /** + * Router resource settings for flex plan + */ public function getRouterResources(): RouterResources { return $this->routerResources; @@ -751,9 +749,9 @@ public function getAllowScalingToZero(): bool return $this->allowScalingToZero; } - /** - * Save vendors.json files locally after builds for SBOM generation. - */ + /** + * Save vendors.json files locally after builds for SBOM generation. + */ public function getSaveApplicationsVendors(): bool { return $this->saveApplicationsVendors; @@ -769,4 +767,3 @@ public function getSupportOciImages(): bool return $this->supportOciImages; } } - diff --git a/src/Model/ProjectSettingsPatch.php b/src/Model/ProjectSettingsPatch.php index 928ec8240..c4336f81d 100644 --- a/src/Model/ProjectSettingsPatch.php +++ b/src/Model/ProjectSettingsPatch.php @@ -13,8 +13,6 @@ */ final class ProjectSettingsPatch implements Model, JsonSerializable { - - public function __construct( private readonly ?array $dataRetention = [], private readonly ?MaintenanceWindowConfiguration $maintenanceWindow = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,10 +46,10 @@ public function getInitialize(): ?object return $this->initialize; } - /** - * Data retention configuration - * @return DataRetentionConfigurationValue1[]|null - */ + /** + * Data retention configuration + * @return DataRetentionConfigurationValue1[]|null + */ public function getDataRetention(): ?array { return $this->dataRetention; @@ -63,12 +60,11 @@ public function getBuildResources(): ?BuildResources2 return $this->buildResources; } - /** - * Configuration for the maintenance window schedule - */ + /** + * Configuration for the maintenance window schedule + */ public function getMaintenanceWindow(): ?MaintenanceWindowConfiguration { return $this->maintenanceWindow; } } - diff --git a/src/Model/ProjectStatus.php b/src/Model/ProjectStatus.php index 3b3acd496..bfe674c4b 100644 --- a/src/Model/ProjectStatus.php +++ b/src/Model/ProjectStatus.php @@ -76,4 +76,3 @@ public function __toString(): string return $this->value; } } - diff --git a/src/Model/ProjectType.php b/src/Model/ProjectType.php index 5c1ef8b94..05a91a0c5 100644 --- a/src/Model/ProjectType.php +++ b/src/Model/ProjectType.php @@ -67,4 +67,3 @@ public function __toString(): string return $this->value; } } - diff --git a/src/Model/ProjectVariable.php b/src/Model/ProjectVariable.php index cc93e197b..b0a05250b 100644 --- a/src/Model/ProjectVariable.php +++ b/src/Model/ProjectVariable.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,8 +14,6 @@ */ final class ProjectVariable implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $name, @@ -24,13 +23,12 @@ public function __construct( private readonly bool $visibleBuild, private readonly bool $visibleRuntime, private readonly array $applicationScope, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $value = null, ) { } - public function getModelName(): string { return self::class; @@ -58,33 +56,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of ProjectVariable - */ + /** + * The identifier of ProjectVariable + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; @@ -95,33 +93,33 @@ public function getAttributes(): array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): bool { return $this->visibleRuntime; @@ -132,12 +130,11 @@ public function getApplicationScope(): array return $this->applicationScope; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } } - diff --git a/src/Model/ProjectVariableCreateInput.php b/src/Model/ProjectVariableCreateInput.php index 16421fb52..edb38de79 100644 --- a/src/Model/ProjectVariableCreateInput.php +++ b/src/Model/ProjectVariableCreateInput.php @@ -13,8 +13,6 @@ */ final class ProjectVariableCreateInput implements Model, JsonSerializable { - - public function __construct( private readonly string $name, private readonly string $value, @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -52,17 +49,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): string { return $this->name; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): string { return $this->value; @@ -73,33 +70,33 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -110,4 +107,3 @@ public function getApplicationScope(): ?array return $this->applicationScope; } } - diff --git a/src/Model/ProjectVariablePatch.php b/src/Model/ProjectVariablePatch.php index 0674f7a7e..5ae0a323e 100644 --- a/src/Model/ProjectVariablePatch.php +++ b/src/Model/ProjectVariablePatch.php @@ -13,8 +13,6 @@ */ final class ProjectVariablePatch implements Model, JsonSerializable { - - public function __construct( private readonly ?string $name = null, private readonly ?array $attributes = [], @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -52,9 +49,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Name of the variable - */ + /** + * Name of the variable + */ public function getName(): ?string { return $this->name; @@ -65,41 +62,41 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Value of the variable - */ + /** + * Value of the variable + */ public function getValue(): ?string { return $this->value; } - /** - * The variable is a JSON string - */ + /** + * The variable is a JSON string + */ public function getIsJson(): ?bool { return $this->isJson; } - /** - * The variable is sensitive - */ + /** + * The variable is sensitive + */ public function getIsSensitive(): ?bool { return $this->isSensitive; } - /** - * The variable is visible during build - */ + /** + * The variable is visible during build + */ public function getVisibleBuild(): ?bool { return $this->visibleBuild; } - /** - * The variable is visible at runtime - */ + /** + * The variable is visible at runtime + */ public function getVisibleRuntime(): ?bool { return $this->visibleRuntime; @@ -110,4 +107,3 @@ public function getApplicationScope(): ?array return $this->applicationScope; } } - diff --git a/src/Model/ProvisionEvent.php b/src/Model/ProvisionEvent.php index 1b14393e5..ddd5901e9 100644 --- a/src/Model/ProvisionEvent.php +++ b/src/Model/ProvisionEvent.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class ProvisionEvent implements Model, JsonSerializable { - public const TYPE_DATA = 'data'; public const TYPE_DONE = 'done'; public const TYPE_ERROR = 'error'; @@ -26,12 +26,11 @@ public function __construct( private readonly ?string $stage = null, private readonly ?string $label = null, private readonly ?string $reason = null, - private readonly ?\DateTime $timestamp = null, + private readonly ?DateTime $timestamp = null, private readonly ?array $steps = [], ) { } - public function getModelName(): string { return self::class; @@ -55,61 +54,60 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The event type. - */ + /** + * The event type. + */ public function getType(): string { return $this->type; } - /** - * The ID of the project being provisioned. - */ + /** + * The ID of the project being provisioned. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The current provisioning stage. - */ + /** + * The current provisioning stage. + */ public function getStage(): ?string { return $this->stage; } - /** - * A human-readable label for the current stage. - */ + /** + * A human-readable label for the current stage. + */ public function getLabel(): ?string { return $this->label; } - /** - * The reason for failure (only present on error events). - */ + /** + * The reason for failure (only present on error events). + */ public function getReason(): ?string { return $this->reason; } - /** - * The time the event was emitted. - */ - public function getTimestamp(): ?\DateTime + /** + * The time the event was emitted. + */ + public function getTimestamp(): ?DateTime { return $this->timestamp; } - /** - * Ordered list of provisioning steps. - * @return ProvisionStep[]|null - */ + /** + * Ordered list of provisioning steps. + * @return ProvisionStep[]|null + */ public function getSteps(): ?array { return $this->steps; } } - diff --git a/src/Model/ProvisionStep.php b/src/Model/ProvisionStep.php index a42960489..a0af83f2b 100644 --- a/src/Model/ProvisionStep.php +++ b/src/Model/ProvisionStep.php @@ -14,15 +14,12 @@ */ final class ProvisionStep implements Model, JsonSerializable { - - public function __construct( private readonly string $stage, private readonly string $label, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The step identifier. - */ + /** + * The step identifier. + */ public function getStage(): string { return $this->stage; } - /** - * A human-readable label for the step. - */ + /** + * A human-readable label for the step. + */ public function getLabel(): string { return $this->label; } } - diff --git a/src/Model/ProxyRoute.php b/src/Model/ProxyRoute.php index f7a410f81..5f3717b89 100644 --- a/src/Model/ProxyRoute.php +++ b/src/Model/ProxyRoute.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\Route; /** * Low level ProxyRoute (auto-generated) @@ -14,7 +13,6 @@ */ final class ProxyRoute implements Model, JsonSerializable, Route { - public const TYPE_PROXY = 'proxy'; public const TYPE_REDIRECT = 'redirect'; public const TYPE_UPSTREAM = 'upstream'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -69,92 +66,91 @@ public function getAttributes(): array return $this->attributes; } - /** - * Route type - */ + /** + * Route type + */ public function getType(): string { return $this->type; } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getTls(): TLSSettings { return $this->tls; } - /** - * The destination of the proxy - */ + /** + * The destination of the proxy + */ public function getTo(): string { return $this->to; } - /** - * The identifier of ProxyRoute - */ + /** + * The identifier of ProxyRoute + */ public function getId(): ?string { return $this->id; } - /** - * This route is the primary route of the environment - */ + /** + * This route is the primary route of the environment + */ public function getPrimary(): ?bool { return $this->primary; } - /** - * How this URL route would look on production environment - */ + /** + * How this URL route would look on production environment + */ public function getProductionUrl(): ?string { return $this->productionUrl; } - /** - * The configuration of the redirects - */ + /** + * The configuration of the redirects + */ public function getRedirects(): ?RedirectConfiguration { return $this->redirects; } - /** - * Cache configuration - */ + /** + * Cache configuration + */ public function getCache(): ?CacheConfiguration { return $this->cache; } - /** - * Server-Side Include configuration - */ + /** + * Server-Side Include configuration + */ public function getSsi(): ?SSIConfiguration { return $this->ssi; } - /** - * The upstream to use for this route - */ + /** + * The upstream to use for this route + */ public function getUpstream(): ?string { return $this->upstream; } - /** - * Sticky routing configuration - */ + /** + * Sticky routing configuration + */ public function getSticky(): ?StickyConfiguration { return $this->sticky; } } - diff --git a/src/Model/Recurrence.php b/src/Model/Recurrence.php index 39f626816..2b28059eb 100644 --- a/src/Model/Recurrence.php +++ b/src/Model/Recurrence.php @@ -14,8 +14,6 @@ */ final class Recurrence implements Model, JsonSerializable { - - public function __construct( private readonly string $interval, private readonly int $dayOfWeek, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Interval in weeks, either 2w or 4w - */ + /** + * Interval in weeks, either 2w or 4w + */ public function getInterval(): string { return $this->interval; } - /** - * Day of week, where Monday is 0 - */ + /** + * Day of week, where Monday is 0 + */ public function getDayOfWeek(): int { return $this->dayOfWeek; } - /** - * Exact time in HH:MM format - */ + /** + * Exact time in HH:MM format + */ public function getTime(): string { return $this->time; } } - diff --git a/src/Model/RedirectConfiguration.php b/src/Model/RedirectConfiguration.php index abe3a63ff..46fe591a1 100644 --- a/src/Model/RedirectConfiguration.php +++ b/src/Model/RedirectConfiguration.php @@ -14,15 +14,12 @@ */ final class RedirectConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly string $expires, private readonly array $paths, ) { } - public function getModelName(): string { return self::class; @@ -41,21 +38,20 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The amount of time, in seconds, to cache the redirects - */ + /** + * The amount of time, in seconds, to cache the redirects + */ public function getExpires(): string { return $this->expires; } - /** - * The paths to redirect - * @return PathValue[] - */ + /** + * The paths to redirect + * @return PathValue[] + */ public function getPaths(): array { return $this->paths; } } - diff --git a/src/Model/RedirectRoute.php b/src/Model/RedirectRoute.php index 2d1b39ffe..6bd51f878 100644 --- a/src/Model/RedirectRoute.php +++ b/src/Model/RedirectRoute.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\Route; /** * Low level RedirectRoute (auto-generated) @@ -14,7 +13,6 @@ */ final class RedirectRoute implements Model, JsonSerializable, Route { - public const TYPE_PROXY = 'proxy'; public const TYPE_REDIRECT = 'redirect'; public const TYPE_UPSTREAM = 'upstream'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -69,92 +66,91 @@ public function getAttributes(): array return $this->attributes; } - /** - * Route type - */ + /** + * Route type + */ public function getType(): string { return $this->type; } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getTls(): TLSSettings { return $this->tls; } - /** - * The destination of the proxy - */ + /** + * The destination of the proxy + */ public function getTo(): string { return $this->to; } - /** - * The identifier of RedirectRoute - */ + /** + * The identifier of RedirectRoute + */ public function getId(): ?string { return $this->id; } - /** - * This route is the primary route of the environment - */ + /** + * This route is the primary route of the environment + */ public function getPrimary(): ?bool { return $this->primary; } - /** - * How this URL route would look on production environment - */ + /** + * How this URL route would look on production environment + */ public function getProductionUrl(): ?string { return $this->productionUrl; } - /** - * The configuration of the redirects - */ + /** + * The configuration of the redirects + */ public function getRedirects(): ?RedirectConfiguration { return $this->redirects; } - /** - * Cache configuration - */ + /** + * Cache configuration + */ public function getCache(): ?CacheConfiguration { return $this->cache; } - /** - * Server-Side Include configuration - */ + /** + * Server-Side Include configuration + */ public function getSsi(): ?SSIConfiguration { return $this->ssi; } - /** - * The upstream to use for this route - */ + /** + * The upstream to use for this route + */ public function getUpstream(): ?string { return $this->upstream; } - /** - * Sticky routing configuration - */ + /** + * Sticky routing configuration + */ public function getSticky(): ?StickyConfiguration { return $this->sticky; } } - diff --git a/src/Model/Ref.php b/src/Model/Ref.php index 4d63c0781..524ef3fa0 100644 --- a/src/Model/Ref.php +++ b/src/Model/Ref.php @@ -13,17 +13,14 @@ */ final class Ref implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $ref, - private readonly Object $object, + private readonly object $object, private readonly string $sha, ) { } - public function getModelName(): string { return self::class; @@ -44,36 +41,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Ref - */ + /** + * The identifier of Ref + */ public function getId(): string { return $this->id; } - /** - * The name of the reference - */ + /** + * The name of the reference + */ public function getRef(): string { return $this->ref; } - /** - * The object the reference points to - */ - public function getObject(): Object + /** + * The object the reference points to + */ + public function getObject(): object { return $this->object; } - /** - * The commit sha of the ref - */ + /** + * The commit sha of the ref + */ public function getSha(): string { return $this->sha; } } - diff --git a/src/Model/Region.php b/src/Model/Region.php index bcfb4b0c4..0a442eb06 100644 --- a/src/Model/Region.php +++ b/src/Model/Region.php @@ -14,8 +14,6 @@ */ final class Region implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $label = null, @@ -32,7 +30,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -61,101 +58,100 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the region. - */ + /** + * The ID of the region. + */ public function getId(): ?string { return $this->id; } - /** - * The human-readable name of the region. - */ + /** + * The human-readable name of the region. + */ public function getLabel(): ?string { return $this->label; } - /** - * Geographical zone of the region - */ + /** + * Geographical zone of the region + */ public function getZone(): ?string { return $this->zone; } - /** - * The label to display when choosing between regions for new projects. - */ + /** + * The label to display when choosing between regions for new projects. + */ public function getSelectionLabel(): ?string { return $this->selectionLabel; } - /** - * The label to display on existing projects. - */ + /** + * The label to display on existing projects. + */ public function getProjectLabel(): ?string { return $this->projectLabel; } - /** - * Default timezone of the region - */ + /** + * Default timezone of the region + */ public function getTimezone(): ?string { return $this->timezone; } - /** - * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up - * during checkout. - */ + /** + * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up + * during checkout. + */ public function getAvailable(): ?bool { return $this->available; } - /** - * Indicator whether or not this platform is for private use only. - */ + /** + * Indicator whether or not this platform is for private use only. + */ public function getPrivate(): ?bool { return $this->private; } - /** - * Link to the region API endpoint. - */ + /** + * Link to the region API endpoint. + */ public function getEndpoint(): ?string { return $this->endpoint; } - /** - * Information about the region provider. - */ + /** + * Information about the region provider. + */ public function getProvider(): ?RegionProvider { return $this->provider; } - /** - * Information about the region provider data center. - */ + /** + * Information about the region provider data center. + */ public function getDatacenter(): ?RegionDatacenter { return $this->datacenter; } - /** - * Information about the region provider's environmental impact. - */ + /** + * Information about the region provider's environmental impact. + */ public function getEnvironmentalImpact(): ?RegionEnvironmentalImpact { return $this->environmentalImpact; } } - diff --git a/src/Model/RegionCompliance.php b/src/Model/RegionCompliance.php index a9cac5c56..6e89e9a24 100644 --- a/src/Model/RegionCompliance.php +++ b/src/Model/RegionCompliance.php @@ -14,14 +14,11 @@ */ final class RegionCompliance implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $hipaa = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Indicator whether or not this region is HIPAA compliant. - */ + /** + * Indicator whether or not this region is HIPAA compliant. + */ public function getHipaa(): ?bool { return $this->hipaa; } } - diff --git a/src/Model/RegionDatacenter.php b/src/Model/RegionDatacenter.php index 8e412a3a5..cfdf4460b 100644 --- a/src/Model/RegionDatacenter.php +++ b/src/Model/RegionDatacenter.php @@ -14,8 +14,6 @@ */ final class RegionDatacenter implements Model, JsonSerializable { - - public function __construct( private readonly ?string $name = null, private readonly ?string $label = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -58,4 +55,3 @@ public function getLocation(): ?string return $this->location; } } - diff --git a/src/Model/RegionEnvImpact.php b/src/Model/RegionEnvImpact.php index 8e2637835..c5658c2a2 100644 --- a/src/Model/RegionEnvImpact.php +++ b/src/Model/RegionEnvImpact.php @@ -14,8 +14,6 @@ */ final class RegionEnvImpact implements Model, JsonSerializable { - - public function __construct( private readonly ?string $zone = null, private readonly ?float $carbonIntensity = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The geographical zone code for carbon intensity. - */ + /** + * The geographical zone code for carbon intensity. + */ public function getZone(): ?string { return $this->zone; } - /** - * The carbon intensity value. - */ + /** + * The carbon intensity value. + */ public function getCarbonIntensity(): ?float { return $this->carbonIntensity; } - /** - * The source of the carbon intensity data. - */ + /** + * The source of the carbon intensity data. + */ public function getCarbonIntensitySource(): ?string { return $this->carbonIntensitySource; } - /** - * Indicator whether the data center uses green energy. - */ + /** + * Indicator whether the data center uses green energy. + */ public function getGreen(): ?bool { return $this->green; } } - diff --git a/src/Model/RegionEnvironmentalImpact.php b/src/Model/RegionEnvironmentalImpact.php index 08a5a32d7..45570bd23 100644 --- a/src/Model/RegionEnvironmentalImpact.php +++ b/src/Model/RegionEnvironmentalImpact.php @@ -14,8 +14,6 @@ */ final class RegionEnvironmentalImpact implements Model, JsonSerializable { - - public function __construct( private readonly ?string $zone = null, private readonly ?string $carbonIntensity = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -58,4 +55,3 @@ public function getGreen(): ?bool return $this->green; } } - diff --git a/src/Model/RegionProvider.php b/src/Model/RegionProvider.php index 53c61be1d..d5c981405 100644 --- a/src/Model/RegionProvider.php +++ b/src/Model/RegionProvider.php @@ -14,15 +14,12 @@ */ final class RegionProvider implements Model, JsonSerializable { - - public function __construct( private readonly ?string $name = null, private readonly ?string $logo = null, ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getLogo(): ?string return $this->logo; } } - diff --git a/src/Model/RegionReference.php b/src/Model/RegionReference.php index 92deb16e7..475645cae 100644 --- a/src/Model/RegionReference.php +++ b/src/Model/RegionReference.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,8 +15,6 @@ */ final class RegionReference implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $label, @@ -28,15 +27,14 @@ public function __construct( private readonly RegionProvider $provider, private readonly RegionDatacenter $datacenter, private readonly RegionCompliance $compliance, - private readonly \DateTime $createdAt, - private readonly \DateTime $updatedAt, + private readonly DateTime $createdAt, + private readonly DateTime $updatedAt, private readonly ?bool $private = null, private readonly ?RegionEnvImpact $envimpact = null, private readonly ?object $environmentalImpact = null, ) { } - public function getModelName(): string { return self::class; @@ -69,133 +67,132 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The machine name of the region where the project is located. - */ + /** + * The machine name of the region where the project is located. + */ public function getId(): string { return $this->id; } - /** - * The human-readable name of the region. - */ + /** + * The human-readable name of the region. + */ public function getLabel(): string { return $this->label; } - /** - * The geographical zone of the region. - */ + /** + * The geographical zone of the region. + */ public function getZone(): string { return $this->zone; } - /** - * The label to display when choosing between regions for new projects. - */ + /** + * The label to display when choosing between regions for new projects. + */ public function getSelectionLabel(): string { return $this->selectionLabel; } - /** - * The label to display on existing projects. - */ + /** + * The label to display on existing projects. + */ public function getProjectLabel(): string { return $this->projectLabel; } - /** - * Default timezone of the region. - */ + /** + * Default timezone of the region. + */ public function getTimezone(): string { return $this->timezone; } - /** - * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up - * during checkout. - */ + /** + * Indicator whether or not this region is selectable during the checkout. Not available regions will never show up + * during checkout. + */ public function getAvailable(): bool { return $this->available; } - /** - * Link to the region API endpoint. - */ + /** + * Link to the region API endpoint. + */ public function getEndpoint(): string { return $this->endpoint; } - /** - * Information about the region provider. - */ + /** + * Information about the region provider. + */ public function getProvider(): RegionProvider { return $this->provider; } - /** - * Information about the region provider data center. - */ + /** + * Information about the region provider data center. + */ public function getDatacenter(): RegionDatacenter { return $this->datacenter; } - /** - * Information about the region's compliance. - */ + /** + * Information about the region's compliance. + */ public function getCompliance(): RegionCompliance { return $this->compliance; } - /** - * The date and time when the resource was created. - */ - public function getCreatedAt(): \DateTime + /** + * The date and time when the resource was created. + */ + public function getCreatedAt(): DateTime { return $this->createdAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): \DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): DateTime { return $this->updatedAt; } - /** - * Indicator whether or not this platform is for private use only. - */ + /** + * Indicator whether or not this platform is for private use only. + */ public function getPrivate(): ?bool { return $this->private; } - /** - * Information about the region provider's environmental impact. - */ + /** + * Information about the region provider's environmental impact. + */ public function getEnvimpact(): ?RegionEnvImpact { return $this->envimpact; } - /** - * Environmental impact information for the region. - */ + /** + * Environmental impact information for the region. + */ public function getEnvironmentalImpact(): ?object { return $this->environmentalImpact; } } - diff --git a/src/Model/RegistryCredential.php b/src/Model/RegistryCredential.php index ae7f0b34c..3cdabe24a 100644 --- a/src/Model/RegistryCredential.php +++ b/src/Model/RegistryCredential.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,20 +14,17 @@ */ final class RegistryCredential implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $registry, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?BasicAuth $auth, private readonly ?string $identityToken, private readonly ?string $registryToken, ) { } - public function getModelName(): string { return self::class; @@ -50,61 +48,60 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of RegistryCredential - */ + /** + * The identifier of RegistryCredential + */ public function getId(): string { return $this->id; } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', - * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) - */ + /** + * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', + * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) + */ public function getRegistry(): string { return $this->registry; } - /** - * Basic Auth for the container registry - */ + /** + * Basic Auth for the container registry + */ public function getAuth(): ?BasicAuth { return $this->auth; } - /** - * Refresh token to exchange for bearer token with container registry auth - */ + /** + * Refresh token to exchange for bearer token with container registry auth + */ public function getIdentityToken(): ?string { return $this->identityToken; } - /** - * Bearer token used to auth with container registry auth - */ + /** + * Bearer token used to auth with container registry auth + */ public function getRegistryToken(): ?string { return $this->registryToken; } } - diff --git a/src/Model/RegistryCredentialCreateInput.php b/src/Model/RegistryCredentialCreateInput.php index ef8473a01..172fcba9f 100644 --- a/src/Model/RegistryCredentialCreateInput.php +++ b/src/Model/RegistryCredentialCreateInput.php @@ -13,8 +13,6 @@ */ final class RegistryCredentialCreateInput implements Model, JsonSerializable { - - public function __construct( private readonly string $registry, private readonly ?BasicAuth $auth = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,37 +41,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', - * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) - */ + /** + * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', + * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) + */ public function getRegistry(): string { return $this->registry; } - /** - * Basic Auth for the container registry - */ + /** + * Basic Auth for the container registry + */ public function getAuth(): ?BasicAuth { return $this->auth; } - /** - * Refresh token to exchange for bearer token with container registry auth - */ + /** + * Refresh token to exchange for bearer token with container registry auth + */ public function getIdentityToken(): ?string { return $this->identityToken; } - /** - * Bearer token used to auth with container registry auth - */ + /** + * Bearer token used to auth with container registry auth + */ public function getRegistryToken(): ?string { return $this->registryToken; } } - diff --git a/src/Model/RegistryCredentialPatch.php b/src/Model/RegistryCredentialPatch.php index ba04e4819..4536da8ed 100644 --- a/src/Model/RegistryCredentialPatch.php +++ b/src/Model/RegistryCredentialPatch.php @@ -13,8 +13,6 @@ */ final class RegistryCredentialPatch implements Model, JsonSerializable { - - public function __construct( private readonly ?BasicAuth $auth = null, private readonly ?string $identityToken = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,37 +41,36 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', - * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) - */ + /** + * Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', + * 'quay.io/myorg' (no scheme, no trailing slash, lowercase only) + */ public function getRegistry(): ?string { return $this->registry; } - /** - * Basic Auth for the container registry - */ + /** + * Basic Auth for the container registry + */ public function getAuth(): ?BasicAuth { return $this->auth; } - /** - * Refresh token to exchange for bearer token with container registry auth - */ + /** + * Refresh token to exchange for bearer token with container registry auth + */ public function getIdentityToken(): ?string { return $this->identityToken; } - /** - * Bearer token used to auth with container registry auth - */ + /** + * Bearer token used to auth with container registry auth + */ public function getRegistryToken(): ?string { return $this->registryToken; } } - diff --git a/src/Model/ReplacementDomainStorage.php b/src/Model/ReplacementDomainStorage.php index fcbf10343..4ed04686a 100644 --- a/src/Model/ReplacementDomainStorage.php +++ b/src/Model/ReplacementDomainStorage.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Domain; /** * Low level ReplacementDomainStorage (auto-generated) @@ -14,14 +14,12 @@ */ final class ReplacementDomainStorage implements Model, JsonSerializable, Domain { - - public function __construct( private readonly string $type, private readonly string $name, private readonly array $attributes, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, private readonly ?string $project = null, private readonly ?string $registeredName = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -55,33 +52,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * Domain type - */ + /** + * Domain type + */ public function getType(): string { return $this->type; } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -92,36 +89,35 @@ public function getAttributes(): array return $this->attributes; } - /** - * The identifier of ReplacementDomainStorage - */ + /** + * The identifier of ReplacementDomainStorage + */ public function getId(): ?string { return $this->id; } - /** - * The name of the project - */ + /** + * The name of the project + */ public function getProject(): ?string { return $this->project; } - /** - * The claimed domain name - */ + /** + * The claimed domain name + */ public function getRegisteredName(): ?string { return $this->registeredName; } - /** - * Prod domain which will be replaced by this domain - */ + /** + * Prod domain which will be replaced by this domain + */ public function getReplacementFor(): ?string { return $this->replacementFor; } } - diff --git a/src/Model/ReplacementDomainStorageCreateInput.php b/src/Model/ReplacementDomainStorageCreateInput.php index 6edf21a7e..4dc6fe72b 100644 --- a/src/Model/ReplacementDomainStorageCreateInput.php +++ b/src/Model/ReplacementDomainStorageCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DomainCreateInput; /** * Low level ReplacementDomainStorageCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class ReplacementDomainStorageCreateInput implements Model, JsonSerializable, DomainCreateInput { - - public function __construct( private readonly string $name, private readonly ?array $attributes = [], @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,9 +39,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The domain name - */ + /** + * The domain name + */ public function getName(): string { return $this->name; @@ -56,12 +52,11 @@ public function getAttributes(): ?array return $this->attributes; } - /** - * Prod domain which will be replaced by this domain - */ + /** + * Prod domain which will be replaced by this domain + */ public function getReplacementFor(): ?string { return $this->replacementFor; } } - diff --git a/src/Model/ReplacementDomainStoragePatch.php b/src/Model/ReplacementDomainStoragePatch.php index 94635e486..094a5a6b6 100644 --- a/src/Model/ReplacementDomainStoragePatch.php +++ b/src/Model/ReplacementDomainStoragePatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\DomainPatch; /** * Low level ReplacementDomainStoragePatch (auto-generated) @@ -14,14 +13,11 @@ */ final class ReplacementDomainStoragePatch implements Model, JsonSerializable, DomainPatch { - - public function __construct( private readonly ?TLSSettings $attributes = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getAttributes(): ?TLSSettings { return $this->attributes; } } - diff --git a/src/Model/RepositoryInformation.php b/src/Model/RepositoryInformation.php index 2850a4a8c..99d955916 100644 --- a/src/Model/RepositoryInformation.php +++ b/src/Model/RepositoryInformation.php @@ -14,15 +14,12 @@ */ final class RepositoryInformation implements Model, JsonSerializable { - - public function __construct( private readonly string $url, private readonly ?string $clientSshKey, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The Git URL - */ + /** + * The Git URL + */ public function getUrl(): string { return $this->url; } - /** - * SSH Key used to access external private repositories - */ + /** + * SSH Key used to access external private repositories + */ public function getClientSshKey(): ?string { return $this->clientSshKey; } } - diff --git a/src/Model/RequestBuffering.php b/src/Model/RequestBuffering.php index 4d47c10c9..ccd4e7579 100644 --- a/src/Model/RequestBuffering.php +++ b/src/Model/RequestBuffering.php @@ -13,15 +13,12 @@ */ final class RequestBuffering implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, private readonly ?string $maxRequestSize, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMaxRequestSize(): ?string return $this->maxRequestSize; } } - diff --git a/src/Model/ResetEmailAddressRequest.php b/src/Model/ResetEmailAddressRequest.php index 01bde6f20..2bf8b1524 100644 --- a/src/Model/ResetEmailAddressRequest.php +++ b/src/Model/ResetEmailAddressRequest.php @@ -13,14 +13,11 @@ */ final class ResetEmailAddressRequest implements Model, JsonSerializable { - - public function __construct( private readonly string $emailAddress, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getEmailAddress(): string return $this->emailAddress; } } - diff --git a/src/Model/ResourceConfig.php b/src/Model/ResourceConfig.php index ed2465c1e..75b166dad 100644 --- a/src/Model/ResourceConfig.php +++ b/src/Model/ResourceConfig.php @@ -13,14 +13,11 @@ */ final class ResourceConfig implements Model, JsonSerializable { - - public function __construct( private readonly ?string $profileSize = null, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Profile size (e.g. "0.5", "1", "2") - */ + /** + * Profile size (e.g. "0.5", "1", "2") + */ public function getProfileSize(): ?string { return $this->profileSize; } } - diff --git a/src/Model/Resources.php b/src/Model/Resources.php index 7207082df..7e4f18f14 100644 --- a/src/Model/Resources.php +++ b/src/Model/Resources.php @@ -13,8 +13,6 @@ */ final class Resources implements Model, JsonSerializable { - - public function __construct( private readonly ?int $baseMemory, private readonly ?int $memoryRatio, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function getDisk(): ?DiskResources return $this->disk; } } - diff --git a/src/Model/Resources1.php b/src/Model/Resources1.php index bc5edaa89..f05e9c7d5 100644 --- a/src/Model/Resources1.php +++ b/src/Model/Resources1.php @@ -13,8 +13,6 @@ */ final class Resources1 implements Model, JsonSerializable { - - public function __construct( private readonly ?int $baseMemory, private readonly ?int $memoryRatio, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function getDisk(): ?DiskResources1 return $this->disk; } } - diff --git a/src/Model/Resources2.php b/src/Model/Resources2.php index 6ab1187b4..c606ba5aa 100644 --- a/src/Model/Resources2.php +++ b/src/Model/Resources2.php @@ -13,14 +13,11 @@ */ final class Resources2 implements Model, JsonSerializable { - - public function __construct( private readonly ?string $profileSize, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getProfileSize(): ?string return $this->profileSize; } } - diff --git a/src/Model/Resources3.php b/src/Model/Resources3.php index 089925172..b0a9075bf 100644 --- a/src/Model/Resources3.php +++ b/src/Model/Resources3.php @@ -13,15 +13,12 @@ */ final class Resources3 implements Model, JsonSerializable { - - public function __construct( private readonly DiskResources2 $disk, private readonly ?string $profileSize, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getDisk(): DiskResources2 return $this->disk; } } - diff --git a/src/Model/Resources4.php b/src/Model/Resources4.php index d556e5639..7ebcbdbe0 100644 --- a/src/Model/Resources4.php +++ b/src/Model/Resources4.php @@ -13,7 +13,6 @@ */ final class Resources4 implements Model, JsonSerializable { - public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; public const INIT_PARENT = 'parent'; @@ -23,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -41,12 +39,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when activating an environment - */ + /** + * The resources used when activating an environment + */ public function getInit(): ?string { return $this->init; } } - diff --git a/src/Model/Resources5.php b/src/Model/Resources5.php index cf0a21f92..9d0f49894 100644 --- a/src/Model/Resources5.php +++ b/src/Model/Resources5.php @@ -13,7 +13,6 @@ */ final class Resources5 implements Model, JsonSerializable { - public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; public const INIT_PARENT = 'parent'; @@ -23,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -41,12 +39,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when initializing services of the new environment - */ + /** + * The resources used when initializing services of the new environment + */ public function getInit(): ?string { return $this->init; } } - diff --git a/src/Model/Resources6.php b/src/Model/Resources6.php index e28e23a39..2c49d57f7 100644 --- a/src/Model/Resources6.php +++ b/src/Model/Resources6.php @@ -13,7 +13,6 @@ */ final class Resources6 implements Model, JsonSerializable { - public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; @@ -22,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -40,12 +38,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when initializing the environment - */ + /** + * The resources used when initializing the environment + */ public function getInit(): ?string { return $this->init; } } - diff --git a/src/Model/Resources7.php b/src/Model/Resources7.php index d27ec7142..cef9398ab 100644 --- a/src/Model/Resources7.php +++ b/src/Model/Resources7.php @@ -13,7 +13,6 @@ */ final class Resources7 implements Model, JsonSerializable { - public const INIT_CHILD = 'child'; public const INIT__DEFAULT = 'default'; public const INIT_MANUAL = 'manual'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,12 +40,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when merging an environment - */ + /** + * The resources used when merging an environment + */ public function getInit(): ?string { return $this->init; } } - diff --git a/src/Model/Resources8.php b/src/Model/Resources8.php index 4a0e33c2f..321789816 100644 --- a/src/Model/Resources8.php +++ b/src/Model/Resources8.php @@ -13,7 +13,6 @@ */ final class Resources8 implements Model, JsonSerializable { - public const INIT_BACKUP = 'backup'; public const INIT__DEFAULT = 'default'; public const INIT_MINIMUM = 'minimum'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,12 +40,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The resources used when initializing services of the environment - */ + /** + * The resources used when initializing services of the environment + */ public function getInit(): ?string { return $this->init; } } - diff --git a/src/Model/Resources9.php b/src/Model/Resources9.php index 0ce58a26b..884dbe95c 100644 --- a/src/Model/Resources9.php +++ b/src/Model/Resources9.php @@ -14,15 +14,12 @@ */ final class Resources9 implements Model, JsonSerializable { - - public function __construct( private readonly int $baseMemory, private readonly int $memoryRatio, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The base memory for the container - */ + /** + * The base memory for the container + */ public function getBaseMemory(): int { return $this->baseMemory; } - /** - * The amount of memory to allocate per units of CPU - */ + /** + * The amount of memory to allocate per units of CPU + */ public function getMemoryRatio(): int { return $this->memoryRatio; } } - diff --git a/src/Model/ResourcesByService200Response.php b/src/Model/ResourcesByService200Response.php index 8b404b2f0..c330cc221 100644 --- a/src/Model/ResourcesByService200Response.php +++ b/src/Model/ResourcesByService200Response.php @@ -13,7 +13,6 @@ */ final class ResourcesByService200Response implements Model, JsonSerializable { - public const _DG2_HOST_TYPES_MAPPING_WEB = 'web'; public const _DG2_HOST_TYPES_MAPPING_UNIFIED = 'unified'; public const _DG2_HOST_TYPES_MAPPING_EMPTY = ''; @@ -31,7 +30,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -92,9 +90,9 @@ public function getService(): string return $this->service; } - /** - * @return ResourcesByService200ResponseDataInner[] - */ + /** + * @return ResourcesByService200ResponseDataInner[] + */ public function getData(): array { return $this->data; @@ -105,4 +103,3 @@ public function getDg2HostTypesMapping(): ?array return $this->dg2HostTypesMapping; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInner.php b/src/Model/ResourcesByService200ResponseDataInner.php index ac4b17058..41f861b19 100644 --- a/src/Model/ResourcesByService200ResponseDataInner.php +++ b/src/Model/ResourcesByService200ResponseDataInner.php @@ -13,15 +13,12 @@ */ final class ResourcesByService200ResponseDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?array $instances = [], ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getTimestamp(): int return $this->timestamp; } - /** - * @return ResourcesByService200ResponseDataInnerInstancesValue[]|null - */ + /** + * @return ResourcesByService200ResponseDataInnerInstancesValue[]|null + */ public function getInstances(): ?array { return $this->instances; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php index 6047e98f0..fb4ed45d7 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValue.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValue implements Model, JsonSerializable { - - public function __construct( private readonly ?ResourcesByService200ResponseDataInnerInstancesValueCpuUsed $cpuUsed = null, private readonly ?ResourcesByService200ResponseDataInnerInstancesValueCpuLimit $cpuLimit = null, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -108,12 +105,11 @@ public function getIrqPressure(): ?ResourcesByService200ResponseDataInnerInstanc return $this->irqPressure; } - /** - * @return ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue[]|null - */ + /** + * @return ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue[]|null + */ public function getMountpoints(): ?array { return $this->mountpoints; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php index 2411cfcd6..67ed75f3d 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueCpuLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?float $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?float return $this->max; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php index 91436a815..f03e58712 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueCpuPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php index af0fe3a32..7ffa0481c 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueCpuUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueCpuUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php index 5c667717e..ef1aff2c6 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIoPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueIoPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php index d413f52ca..ec2ebe2f6 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueIrqPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueIrqPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php index 491255fed..49f6ce9ab 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMemoryLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?int return $this->max; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php index b5cd9a138..6174281f3 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMemoryPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php index 08e15e6c0..0835616e6 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMemoryUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php index ddfaccd2c..dc1507a1b 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValue implements Model, JsonSerializable { - - public function __construct( private readonly ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed $diskUsed = null, private readonly ?ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit $diskLimit = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getInodesLimit(): ?ResourcesByService200ResponseDataInnerInstanc return $this->inodesLimit; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php index fbc1a9013..72e8bafe9 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?int return $this->max; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php index b1de54b9c..b3185830a 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueDiskUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php index 3b51c5d6e..26f920507 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?int return $this->max; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php index 0e10667cb..bf2e6e5af 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueMountpointsValueInodesUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php index f35c50bcd..85d8d5d79 100644 --- a/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php +++ b/src/Model/ResourcesByService200ResponseDataInnerInstancesValueSwapUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesByService200ResponseDataInnerInstancesValueSwapUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesLimits.php b/src/Model/ResourcesLimits.php index fbd9c3fb5..124c254c5 100644 --- a/src/Model/ResourcesLimits.php +++ b/src/Model/ResourcesLimits.php @@ -14,8 +14,6 @@ */ final class ResourcesLimits implements Model, JsonSerializable { - - public function __construct( private readonly bool $containerProfiles, private readonly ProductionResources $production, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Enable support for customizable container profiles - */ + /** + * Enable support for customizable container profiles + */ public function getContainerProfiles(): bool { return $this->containerProfiles; } - /** - * Resources for production environments - */ + /** + * Resources for production environments + */ public function getProduction(): ProductionResources { return $this->production; } - /** - * Resources for development environments - */ + /** + * Resources for development environments + */ public function getDevelopment(): DevelopmentResources { return $this->development; } } - diff --git a/src/Model/ResourcesOverridesValue.php b/src/Model/ResourcesOverridesValue.php index 7e4f7daf9..e70bae67d 100644 --- a/src/Model/ResourcesOverridesValue.php +++ b/src/Model/ResourcesOverridesValue.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,18 +14,15 @@ */ final class ResourcesOverridesValue implements Model, JsonSerializable { - - public function __construct( private readonly array $services, private readonly bool $redeployedStart, private readonly bool $redeployedEnd, - private readonly ?\DateTime $startsAt, - private readonly ?\DateTime $endsAt, + private readonly ?DateTime $startsAt, + private readonly ?DateTime $endsAt, ) { } - public function getModelName(): string { return self::class; @@ -45,20 +43,20 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return PreServiceResourcesOverridesValue[] - */ + /** + * @return PreServiceResourcesOverridesValue[] + */ public function getServices(): array { return $this->services; } - public function getStartsAt(): ?\DateTime + public function getStartsAt(): ?DateTime { return $this->startsAt; } - public function getEndsAt(): ?\DateTime + public function getEndsAt(): ?DateTime { return $this->endsAt; } @@ -73,4 +71,3 @@ public function getRedeployedEnd(): bool return $this->redeployedEnd; } } - diff --git a/src/Model/ResourcesOverview200Response.php b/src/Model/ResourcesOverview200Response.php index b65a44654..bb381a052 100644 --- a/src/Model/ResourcesOverview200Response.php +++ b/src/Model/ResourcesOverview200Response.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200Response implements Model, JsonSerializable { - - public function __construct( private readonly int $grain, private readonly int $from, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -80,12 +77,11 @@ public function getBranchMachineName(): string return $this->branchMachineName; } - /** - * @return ResourcesOverview200ResponseDataInner[] - */ + /** + * @return ResourcesOverview200ResponseDataInner[] + */ public function getData(): array { return $this->data; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInner.php b/src/Model/ResourcesOverview200ResponseDataInner.php index e0c97d4b6..4ea1c6768 100644 --- a/src/Model/ResourcesOverview200ResponseDataInner.php +++ b/src/Model/ResourcesOverview200ResponseDataInner.php @@ -13,15 +13,12 @@ */ final class ResourcesOverview200ResponseDataInner implements Model, JsonSerializable { - - public function __construct( private readonly int $timestamp, private readonly ?array $services = [], ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getTimestamp(): int return $this->timestamp; } - /** - * @return ResourcesOverview200ResponseDataInnerServicesValue[]|null - */ + /** + * @return ResourcesOverview200ResponseDataInnerServicesValue[]|null + */ public function getServices(): ?array { return $this->services; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php index 57d77a9e2..b85a7d788 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValue.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValue implements Model, JsonSerializable { - - public function __construct( private readonly ?ResourcesOverview200ResponseDataInnerServicesValueCpuUsed $cpuUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueCpuLimit $cpuLimit = null, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -108,12 +105,11 @@ public function getIrqPressure(): ?ResourcesOverview200ResponseDataInnerServices return $this->irqPressure; } - /** - * @return ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue[]|null - */ + /** + * @return ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue[]|null + */ public function getMountpoints(): ?array { return $this->mountpoints; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php index 9d3c8063a..8f0b90b1d 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueCpuLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?float $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?float return $this->max; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php index b66acc906..49ec15d30 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueCpuPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php index 76214ec56..11acea4f4 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueCpuUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueCpuUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php index dea115e23..ad12d047d 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIoPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueIoPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php index ba72fe44c..2a35fcf1b 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueIrqPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueIrqPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php index bd3718950..95dd8a938 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMemoryLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?int return $this->max; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php index e709ac977..b463fbd2c 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMemoryPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php index 2d8ef7ec1..1f126347e 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMemoryUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php index 740f5eca2..12ba59769 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValue implements Model, JsonSerializable { - - public function __construct( private readonly ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed $diskUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit $diskLimit = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getInodesLimit(): ?ResourcesOverview200ResponseDataInnerServices return $this->inodesLimit; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php index cd1c5ed5c..5838ad691 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?int return $this->max; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php index 06fd3e8d6..b315c021c 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php index 2f2542eac..034fc365a 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?int return $this->max; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php index aaceedfb1..4a47b0d79 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueInodesUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php index 668ea7050..f9cd3b765 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapLimit.php @@ -13,14 +13,11 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueSwapLimit implements Model, JsonSerializable { - - public function __construct( private readonly ?int $max = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getMax(): ?int return $this->max; } } - diff --git a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php index cceaad927..8af89e0e4 100644 --- a/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php +++ b/src/Model/ResourcesOverview200ResponseDataInnerServicesValueSwapUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesOverview200ResponseDataInnerServicesValueSwapUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200Response.php b/src/Model/ResourcesSummary200Response.php index 609f62e78..5bdad89ee 100644 --- a/src/Model/ResourcesSummary200Response.php +++ b/src/Model/ResourcesSummary200Response.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200Response implements Model, JsonSerializable { - - public function __construct( private readonly int $from, private readonly int $to, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function getData(): ResourcesSummary200ResponseData return $this->data; } } - diff --git a/src/Model/ResourcesSummary200ResponseData.php b/src/Model/ResourcesSummary200ResponseData.php index 49221ff1e..6996008fe 100644 --- a/src/Model/ResourcesSummary200ResponseData.php +++ b/src/Model/ResourcesSummary200ResponseData.php @@ -13,14 +13,11 @@ */ final class ResourcesSummary200ResponseData implements Model, JsonSerializable { - - public function __construct( private readonly array $services, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getServices(): array return $this->services; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php index af26a2d41..1f5693ae6 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValue.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValue implements Model, JsonSerializable { - - public function __construct( private readonly ?ResourcesSummary200ResponseDataServicesValueValueCpuUsed $cpuUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueCpuLimit $cpuLimit = null, @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -108,12 +105,11 @@ public function getIrqPressure(): ?ResourcesSummary200ResponseDataServicesValueV return $this->irqPressure; } - /** - * @return ResourcesSummary200ResponseDataServicesValueValueMountpointsValue[]|null - */ + /** + * @return ResourcesSummary200ResponseDataServicesValueValueMountpointsValue[]|null + */ public function getMountpoints(): ?array { return $this->mountpoints; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php index 92e8c38f1..d64ea4ffa 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueCpuPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php index 7e5584024..09d3809aa 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueCpuUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueCpuUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php index ff9f61fd6..7a0ef1f48 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIoPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueIoPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php index 15b7aeee0..39bb4df54 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueIrqPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueIrqPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php index e3eda5922..85c171bf6 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryPressure.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMemoryPressure implements Model, JsonSerializable { - - public function __construct( private readonly ?float $min = null, private readonly ?float $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php index 43e2edcd5..a312b175e 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMemoryUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMemoryUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php index e68272e44..c0d6f9632 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValue.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMountpointsValue implements Model, JsonSerializable { - - public function __construct( private readonly ?ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed $diskUsed = null, private readonly ?ResourcesOverview200ResponseDataInnerServicesValueMountpointsValueDiskLimit $diskLimit = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getInodesLimit(): ?ResourcesOverview200ResponseDataInnerServices return $this->inodesLimit; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php index dab7ae8dd..751cd31e9 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMountpointsValueDiskUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php index 706fdc24e..5ee14e8f1 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueMountpointsValueInodesUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php b/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php index 7922ec1b3..929fa0186 100644 --- a/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php +++ b/src/Model/ResourcesSummary200ResponseDataServicesValueValueSwapUsed.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary200ResponseDataServicesValueValueSwapUsed implements Model, JsonSerializable { - - public function __construct( private readonly ?int $min = null, private readonly ?int $max = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -106,4 +103,3 @@ public function getP99(): ?float return $this->p99; } } - diff --git a/src/Model/ResourcesSummary400Response.php b/src/Model/ResourcesSummary400Response.php index efc101195..347e22a08 100644 --- a/src/Model/ResourcesSummary400Response.php +++ b/src/Model/ResourcesSummary400Response.php @@ -13,8 +13,6 @@ */ final class ResourcesSummary400Response implements Model, JsonSerializable { - - public function __construct( private readonly string $type, private readonly string $title, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -64,4 +61,3 @@ public function getViolations(): array return $this->violations; } } - diff --git a/src/Model/Route.php b/src/Model/Route.php index d295708bd..3da512752 100644 --- a/src/Model/Route.php +++ b/src/Model/Route.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level Route (auto-generated) * @@ -25,4 +23,3 @@ public function getType(): mixed; public function getTls(): mixed; } - diff --git a/src/Model/RouterResources.php b/src/Model/RouterResources.php index aa3d184e1..2eb94b38e 100644 --- a/src/Model/RouterResources.php +++ b/src/Model/RouterResources.php @@ -14,8 +14,6 @@ */ final class RouterResources implements Model, JsonSerializable { - - public function __construct( private readonly float $baselineCpu, private readonly int $baselineMemory, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -45,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Router baseline CPU for flex plan - */ + /** + * Router baseline CPU for flex plan + */ public function getBaselineCpu(): float { return $this->baselineCpu; } - /** - * Router baseline memory (MB) for flex plan - */ + /** + * Router baseline memory (MB) for flex plan + */ public function getBaselineMemory(): int { return $this->baselineMemory; } - /** - * Router max CPU for flex plan - */ + /** + * Router max CPU for flex plan + */ public function getMaxCpu(): float { return $this->maxCpu; } - /** - * Router max memory (MB) for flex plan - */ + /** + * Router max memory (MB) for flex plan + */ public function getMaxMemory(): int { return $this->maxMemory; } } - diff --git a/src/Model/RoutesValue.php b/src/Model/RoutesValue.php index 865cb8e38..13db27eeb 100644 --- a/src/Model/RoutesValue.php +++ b/src/Model/RoutesValue.php @@ -2,8 +2,6 @@ namespace Upsun\Model; -use JsonSerializable; - /** * Low level RoutesValue (auto-generated) * @@ -19,4 +17,3 @@ public function jsonSerialize(): array; public function __toString(): string; } - diff --git a/src/Model/RunConfiguration.php b/src/Model/RunConfiguration.php index bfbb3bf33..c960445c7 100644 --- a/src/Model/RunConfiguration.php +++ b/src/Model/RunConfiguration.php @@ -14,15 +14,12 @@ */ final class RunConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly string $command, private readonly int $timeout, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The command to execute when running the task - */ + /** + * The command to execute when running the task + */ public function getCommand(): string { return $this->command; } - /** - * The maximum timeout in seconds after which the task will be forcefully killed - */ + /** + * The maximum timeout in seconds after which the task will be forcefully killed + */ public function getTimeout(): int { return $this->timeout; } } - diff --git a/src/Model/RuntimeOperations.php b/src/Model/RuntimeOperations.php index 96c8aab76..7e7f4f3e6 100644 --- a/src/Model/RuntimeOperations.php +++ b/src/Model/RuntimeOperations.php @@ -13,14 +13,11 @@ */ final class RuntimeOperations implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, runtime operations can be triggered. - */ + /** + * If true, runtime operations can be triggered. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/SSIConfiguration.php b/src/Model/SSIConfiguration.php index 5e4106b78..059b92c20 100644 --- a/src/Model/SSIConfiguration.php +++ b/src/Model/SSIConfiguration.php @@ -14,14 +14,11 @@ */ final class SSIConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether SSI include is enabled. - */ + /** + * Whether SSI include is enabled. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/ScheduleInner.php b/src/Model/ScheduleInner.php index 5895a090c..f765e9a54 100644 --- a/src/Model/ScheduleInner.php +++ b/src/Model/ScheduleInner.php @@ -13,15 +13,12 @@ */ final class ScheduleInner implements Model, JsonSerializable { - - public function __construct( private readonly string $interval, private readonly int $count, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getCount(): int return $this->count; } } - diff --git a/src/Model/Script.php b/src/Model/Script.php index 5cb24cc06..eff61d202 100644 --- a/src/Model/Script.php +++ b/src/Model/Script.php @@ -14,15 +14,12 @@ */ final class Script implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/ScriptIntegration.php b/src/Model/ScriptIntegration.php index 833276f1c..736e9b4d7 100644 --- a/src/Model/ScriptIntegration.php +++ b/src/Model/ScriptIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level ScriptIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class ScriptIntegration implements Model, JsonSerializable, Integration { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -28,13 +27,12 @@ public function __construct( private readonly array $states, private readonly string $result, private readonly string $script, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -62,33 +60,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -114,28 +112,27 @@ public function getStates(): array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): string { return $this->result; } - /** - * The script to run - */ + /** + * The script to run + */ public function getScript(): string { return $this->script; } - /** - * The identifier of ScriptIntegration - */ + /** + * The identifier of ScriptIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/ScriptIntegrationCreateInput.php b/src/Model/ScriptIntegrationCreateInput.php index 07600c51c..0b36eb795 100644 --- a/src/Model/ScriptIntegrationCreateInput.php +++ b/src/Model/ScriptIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level ScriptIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class ScriptIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -54,17 +51,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The script to run - */ + /** + * The script to run + */ public function getScript(): string { return $this->script; @@ -90,12 +87,11 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } } - diff --git a/src/Model/ScriptIntegrationPatch.php b/src/Model/ScriptIntegrationPatch.php index 7d6669df7..4bdee7814 100644 --- a/src/Model/ScriptIntegrationPatch.php +++ b/src/Model/ScriptIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level ScriptIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class ScriptIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -30,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -54,17 +51,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The script to run - */ + /** + * The script to run + */ public function getScript(): string { return $this->script; @@ -90,12 +87,11 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } } - diff --git a/src/Model/SendOrgMfaReminders200ResponseValue.php b/src/Model/SendOrgMfaReminders200ResponseValue.php index 6220a4a10..996f6208f 100644 --- a/src/Model/SendOrgMfaReminders200ResponseValue.php +++ b/src/Model/SendOrgMfaReminders200ResponseValue.php @@ -13,15 +13,12 @@ */ final class SendOrgMfaReminders200ResponseValue implements Model, JsonSerializable { - - public function __construct( private readonly ?int $code = null, private readonly ?string $message = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMessage(): ?string return $this->message; } } - diff --git a/src/Model/SendOrgMfaRemindersRequest.php b/src/Model/SendOrgMfaRemindersRequest.php index 982c0f58e..5d032c8e6 100644 --- a/src/Model/SendOrgMfaRemindersRequest.php +++ b/src/Model/SendOrgMfaRemindersRequest.php @@ -13,14 +13,11 @@ */ final class SendOrgMfaRemindersRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?array $userIds = [], ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getUserIds(): ?array return $this->userIds; } } - diff --git a/src/Model/ServiceRelationshipsValue.php b/src/Model/ServiceRelationshipsValue.php index f1f8d77c9..0aa9f066d 100644 --- a/src/Model/ServiceRelationshipsValue.php +++ b/src/Model/ServiceRelationshipsValue.php @@ -13,15 +13,12 @@ */ final class ServiceRelationshipsValue implements Model, JsonSerializable { - - public function __construct( private readonly ?string $service, private readonly ?string $endpoint, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getEndpoint(): ?string return $this->endpoint; } } - diff --git a/src/Model/ServicesValue.php b/src/Model/ServicesValue.php index 91b3806b1..b3fa0aef2 100644 --- a/src/Model/ServicesValue.php +++ b/src/Model/ServicesValue.php @@ -13,7 +13,6 @@ */ final class ServicesValue implements Model, JsonSerializable { - public const SIZE__2_XL = '2XL'; public const SIZE__4_XL = '4XL'; public const SIZE_AUTO = 'AUTO'; @@ -38,7 +37,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -127,4 +125,3 @@ public function getSupportsHorizontalScaling(): bool return $this->supportsHorizontalScaling; } } - diff --git a/src/Model/ServicesValue1.php b/src/Model/ServicesValue1.php index 7bc0dfd9d..40649a225 100644 --- a/src/Model/ServicesValue1.php +++ b/src/Model/ServicesValue1.php @@ -13,8 +13,6 @@ */ final class ServicesValue1 implements Model, JsonSerializable { - - public function __construct( private readonly ?Resources2 $resources, private readonly ?int $instanceCount, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getDisk(): ?int return $this->disk; } } - diff --git a/src/Model/Sizing.php b/src/Model/Sizing.php index f61f68e2b..b2d614e4d 100644 --- a/src/Model/Sizing.php +++ b/src/Model/Sizing.php @@ -14,8 +14,6 @@ */ final class Sizing implements Model, JsonSerializable { - - public function __construct( private readonly array $services, private readonly array $webapps, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -44,36 +41,35 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return ServicesValue1[] - */ + /** + * @return ServicesValue1[] + */ public function getServices(): array { return $this->services; } - /** - * @return WebApplicationsValue1[] - */ + /** + * @return WebApplicationsValue1[] + */ public function getWebapps(): array { return $this->webapps; } - /** - * @return ServicesValue1[] - */ + /** + * @return ServicesValue1[] + */ public function getWorkers(): array { return $this->workers; } - /** - * @return TasksValue[] - */ + /** + * @return TasksValue[] + */ public function getTasks(): array { return $this->tasks; } } - diff --git a/src/Model/SlackIntegration.php b/src/Model/SlackIntegration.php index 97dacb624..db0ce2f15 100644 --- a/src/Model/SlackIntegration.php +++ b/src/Model/SlackIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level SlackIntegration (auto-generated) @@ -14,19 +14,16 @@ */ final class SlackIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, private readonly string $channel, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -49,52 +46,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; } - /** - * The Slack channel to post messages to - */ + /** + * The Slack channel to post messages to + */ public function getChannel(): string { return $this->channel; } - /** - * The identifier of SlackIntegration - */ + /** + * The identifier of SlackIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/SlackIntegrationCreateInput.php b/src/Model/SlackIntegrationCreateInput.php index 78425084d..e30d03b6e 100644 --- a/src/Model/SlackIntegrationCreateInput.php +++ b/src/Model/SlackIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SlackIntegrationCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class SlackIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $token, @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Slack token to use - */ + /** + * The Slack token to use + */ public function getToken(): string { return $this->token; } - /** - * The Slack channel to post messages to - */ + /** + * The Slack channel to post messages to + */ public function getChannel(): string { return $this->channel; } } - diff --git a/src/Model/SlackIntegrationPatch.php b/src/Model/SlackIntegrationPatch.php index 0ffc31102..d7633838a 100644 --- a/src/Model/SlackIntegrationPatch.php +++ b/src/Model/SlackIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level SlackIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class SlackIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $token, @@ -23,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Slack token to use - */ + /** + * The Slack token to use + */ public function getToken(): string { return $this->token; } - /** - * The Slack channel to post messages to - */ + /** + * The Slack channel to post messages to + */ public function getChannel(): string { return $this->channel; } } - diff --git a/src/Model/SourceCodeConfiguration.php b/src/Model/SourceCodeConfiguration.php index d1ea897bd..9b96d10d3 100644 --- a/src/Model/SourceCodeConfiguration.php +++ b/src/Model/SourceCodeConfiguration.php @@ -13,15 +13,12 @@ */ final class SourceCodeConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly array $operations, private readonly ?string $root, ) { } - public function getModelName(): string { return self::class; @@ -45,12 +42,11 @@ public function getRoot(): ?string return $this->root; } - /** - * @return SourceOperationsValue[] - */ + /** + * @return SourceOperationsValue[] + */ public function getOperations(): array { return $this->operations; } } - diff --git a/src/Model/SourceCodeConfiguration1.php b/src/Model/SourceCodeConfiguration1.php index d52777801..508c2a087 100644 --- a/src/Model/SourceCodeConfiguration1.php +++ b/src/Model/SourceCodeConfiguration1.php @@ -14,14 +14,11 @@ */ final class SourceCodeConfiguration1 implements Model, JsonSerializable { - - public function __construct( private readonly string $root, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The root of the task relative to the repository root - */ + /** + * The root of the task relative to the repository root + */ public function getRoot(): string { return $this->root; } } - diff --git a/src/Model/SourceOperations.php b/src/Model/SourceOperations.php index 80159790c..e97b7c34a 100644 --- a/src/Model/SourceOperations.php +++ b/src/Model/SourceOperations.php @@ -13,14 +13,11 @@ */ final class SourceOperations implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, source operations can be triggered. - */ + /** + * If true, source operations can be triggered. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/SourceOperationsValue.php b/src/Model/SourceOperationsValue.php index 87ab0cbc7..ffd8fd044 100644 --- a/src/Model/SourceOperationsValue.php +++ b/src/Model/SourceOperationsValue.php @@ -13,14 +13,11 @@ */ final class SourceOperationsValue implements Model, JsonSerializable { - - public function __construct( private readonly ?string $command, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getCommand(): ?string return $this->command; } } - diff --git a/src/Model/SpecificOverridesValue.php b/src/Model/SpecificOverridesValue.php index 49aef14a6..7af7fe4d4 100644 --- a/src/Model/SpecificOverridesValue.php +++ b/src/Model/SpecificOverridesValue.php @@ -13,8 +13,6 @@ */ final class SpecificOverridesValue implements Model, JsonSerializable { - - public function __construct( private readonly ?string $expires = null, private readonly ?string $passthru = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,4 +68,3 @@ public function getHeaders(): ?array return $this->headers; } } - diff --git a/src/Model/Splunk.php b/src/Model/Splunk.php index 09c38d234..9706095ee 100644 --- a/src/Model/Splunk.php +++ b/src/Model/Splunk.php @@ -14,15 +14,12 @@ */ final class Splunk implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/SplunkIntegration.php b/src/Model/SplunkIntegration.php index c55a76686..d4ea9850f 100644 --- a/src/Model/SplunkIntegration.php +++ b/src/Model/SplunkIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level SplunkIntegration (auto-generated) @@ -14,8 +14,6 @@ */ final class SplunkIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, @@ -25,13 +23,12 @@ public function __construct( private readonly string $sourcetype, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -59,33 +56,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -96,33 +93,33 @@ public function getExtra(): array return $this->extra; } - /** - * The Splunk HTTP Event Connector REST API endpoint - */ + /** + * The Splunk HTTP Event Connector REST API endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Splunk Index - */ + /** + * The Splunk Index + */ public function getIndex(): string { return $this->index; } - /** - * The event 'sourcetype' - */ + /** + * The event 'sourcetype' + */ public function getSourcetype(): string { return $this->sourcetype; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -133,12 +130,11 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of SplunkIntegration - */ + /** + * The identifier of SplunkIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/SplunkIntegrationCreateInput.php b/src/Model/SplunkIntegrationCreateInput.php index 66cb3bf69..29ceac83b 100644 --- a/src/Model/SplunkIntegrationCreateInput.php +++ b/src/Model/SplunkIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SplunkIntegrationCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class SplunkIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $url, @@ -28,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,33 +49,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Splunk HTTP Event Connector REST API endpoint - */ + /** + * The Splunk HTTP Event Connector REST API endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Splunk Index - */ + /** + * The Splunk Index + */ public function getIndex(): string { return $this->index; } - /** - * The Splunk Authorization Token - */ + /** + * The Splunk Authorization Token + */ public function getToken(): string { return $this->token; @@ -90,17 +86,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The event 'sourcetype' - */ + /** + * The event 'sourcetype' + */ public function getSourcetype(): ?string { return $this->sourcetype; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -111,4 +107,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/SplunkIntegrationPatch.php b/src/Model/SplunkIntegrationPatch.php index 7058c3697..548daa0b7 100644 --- a/src/Model/SplunkIntegrationPatch.php +++ b/src/Model/SplunkIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level SplunkIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class SplunkIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $url, @@ -28,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,33 +49,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Splunk HTTP Event Connector REST API endpoint - */ + /** + * The Splunk HTTP Event Connector REST API endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Splunk Index - */ + /** + * The Splunk Index + */ public function getIndex(): string { return $this->index; } - /** - * The Splunk Authorization Token - */ + /** + * The Splunk Authorization Token + */ public function getToken(): string { return $this->token; @@ -90,17 +86,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The event 'sourcetype' - */ + /** + * The event 'sourcetype' + */ public function getSourcetype(): ?string { return $this->sourcetype; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -111,4 +107,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/SshKey.php b/src/Model/SshKey.php index 9cdad5aab..4089bf657 100644 --- a/src/Model/SshKey.php +++ b/src/Model/SshKey.php @@ -14,8 +14,6 @@ */ final class SshKey implements Model, JsonSerializable { - - public function __construct( private readonly ?int $keyId = null, private readonly ?int $uid = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,52 +46,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the public key. - */ + /** + * The ID of the public key. + */ public function getKeyId(): ?int { return $this->keyId; } - /** - * The internal user ID. - */ + /** + * The internal user ID. + */ public function getUid(): ?int { return $this->uid; } - /** - * The fingerprint of the public key. - */ + /** + * The fingerprint of the public key. + */ public function getFingerprint(): ?string { return $this->fingerprint; } - /** - * The title of the public key. - */ + /** + * The title of the public key. + */ public function getTitle(): ?string { return $this->title; } - /** - * The actual value of the public key. - */ + /** + * The actual value of the public key. + */ public function getValue(): ?string { return $this->value; } - /** - * The time of the last key modification (ISO 8601) - */ + /** + * The time of the last key modification (ISO 8601) + */ public function getChanged(): ?string { return $this->changed; } } - diff --git a/src/Model/Status.php b/src/Model/Status.php index 5b63ee3fd..f7ace902c 100644 --- a/src/Model/Status.php +++ b/src/Model/Status.php @@ -14,15 +14,12 @@ */ final class Status implements Model, JsonSerializable { - - public function __construct( private readonly string $code, private readonly string $message, ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getMessage(): string return $this->message; } } - diff --git a/src/Model/StickyConfiguration.php b/src/Model/StickyConfiguration.php index 076195ffa..d260f6629 100644 --- a/src/Model/StickyConfiguration.php +++ b/src/Model/StickyConfiguration.php @@ -14,14 +14,11 @@ */ final class StickyConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether sticky routing is enabled. - */ + /** + * Whether sticky routing is enabled. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/StrictTransportSecurityOptions.php b/src/Model/StrictTransportSecurityOptions.php index 9aaaebfd4..a3d2d5a5d 100644 --- a/src/Model/StrictTransportSecurityOptions.php +++ b/src/Model/StrictTransportSecurityOptions.php @@ -13,8 +13,6 @@ */ final class StrictTransportSecurityOptions implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled, private readonly ?bool $includeSubdomains, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Whether strict transport security is enabled or not - */ + /** + * Whether strict transport security is enabled or not + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Whether the strict transport security policy should include all subdomains - */ + /** + * Whether the strict transport security policy should include all subdomains + */ public function getIncludeSubdomains(): ?bool { return $this->includeSubdomains; } - /** - * Whether the strict transport security policy should be preloaded in browsers - */ + /** + * Whether the strict transport security policy should be preloaded in browsers + */ public function getPreload(): ?bool { return $this->preload; } } - diff --git a/src/Model/StringFilter.php b/src/Model/StringFilter.php index ac75b7641..42619716f 100644 --- a/src/Model/StringFilter.php +++ b/src/Model/StringFilter.php @@ -13,8 +13,6 @@ */ final class StringFilter implements Model, JsonSerializable { - - public function __construct( private readonly ?string $eq = null, private readonly ?string $ne = null, @@ -27,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -52,68 +49,67 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Equal - */ + /** + * Equal + */ public function getEq(): ?string { return $this->eq; } - /** - * Not equal - */ + /** + * Not equal + */ public function getNe(): ?string { return $this->ne; } - /** - * In (comma-separated list) - */ + /** + * In (comma-separated list) + */ public function getIn(): ?string { return $this->in; } - /** - * Not in (comma-separated list) - */ + /** + * Not in (comma-separated list) + */ public function getNin(): ?string { return $this->nin; } - /** - * Between (comma-separated list) - */ + /** + * Between (comma-separated list) + */ public function getBetween(): ?string { return $this->between; } - /** - * Contains - */ + /** + * Contains + */ public function getContains(): ?string { return $this->contains; } - /** - * Starts with - */ + /** + * Starts with + */ public function getStarts(): ?string { return $this->starts; } - /** - * Ends with - */ + /** + * Ends with + */ public function getEnds(): ?string { return $this->ends; } } - diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index 45dae543d..71bf9844c 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class Subscription implements Model, JsonSerializable { - public const STATUS_REQUESTED = 'requested'; public const STATUS_PROVISIONING_FAILURE = 'provisioning failure'; public const STATUS_PROVISIONING = 'provisioning'; @@ -25,8 +25,8 @@ final class Subscription implements Model, JsonSerializable public function __construct( private readonly ?string $id = null, private readonly ?string $status = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?string $owner = null, private readonly ?OwnerInfo $ownerInfo = null, private readonly ?string $vendor = null, @@ -50,7 +50,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -91,179 +90,179 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The internal ID of the subscription. - */ + /** + * The internal ID of the subscription. + */ public function getId(): ?string { return $this->id; } - /** - * The status of the subscription. - */ + /** + * The status of the subscription. + */ public function getStatus(): ?string { return $this->status; } - /** - * The date and time when the subscription was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the subscription was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the subscription was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the subscription was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The UUID of the owner. - */ + /** + * The UUID of the owner. + */ public function getOwner(): ?string { return $this->owner; } - /** - * Project owner information that can be exposed to collaborators. - */ + /** + * Project owner information that can be exposed to collaborators. + */ public function getOwnerInfo(): ?OwnerInfo { return $this->ownerInfo; } - /** - * The machine name of the vendor the subscription belongs to. - */ + /** + * The machine name of the vendor the subscription belongs to. + */ public function getVendor(): ?string { return $this->vendor; } - /** - * The plan type of the subscription. - */ + /** + * The plan type of the subscription. + */ public function getPlan(): ?string { return $this->plan; } - /** - * The number of environments which can be provisioned on the project. - */ + /** + * The number of environments which can be provisioned on the project. + */ public function getEnvironments(): ?int { return $this->environments; } - /** - * The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values. - */ + /** + * The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values. + */ public function getStorage(): ?int { return $this->storage; } - /** - * The number of chargeable users who currently have access to the project. Manage this value by adding and removing - * users through the Platform project API. Staff and billing/administrative contacts can be added to a project for - * no charge. Contact support for questions about user licenses. - */ + /** + * The number of chargeable users who currently have access to the project. Manage this value by adding and removing + * users through the Platform project API. Staff and billing/administrative contacts can be added to a project for + * no charge. Contact support for questions about user licenses. + */ public function getUserLicenses(): ?int { return $this->userLicenses; } - /** - * The unique ID string of the project. - */ + /** + * The unique ID string of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The project API endpoint for the project. - */ + /** + * The project API endpoint for the project. + */ public function getProjectEndpoint(): ?string { return $this->projectEndpoint; } - /** - * The name given to the project. Appears as the title in the UI. - */ + /** + * The name given to the project. Appears as the title in the UI. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * The machine name of the region where the project is located. Cannot be changed after project creation. - */ + /** + * The machine name of the region where the project is located. Cannot be changed after project creation. + */ public function getProjectRegion(): ?string { return $this->projectRegion; } - /** - * The human-readable name of the region where the project is located. - */ + /** + * The human-readable name of the region where the project is located. + */ public function getProjectRegionLabel(): ?string { return $this->projectRegionLabel; } - /** - * The URL for the project's user interface. - */ + /** + * The URL for the project's user interface. + */ public function getProjectUi(): ?string { return $this->projectUi; } - /** - * The project options object. - */ + /** + * The project options object. + */ public function getProjectOptions(): ?ProjectOptions { return $this->projectOptions; } - /** - * True if the project is an agency site. - */ + /** + * True if the project is an agency site. + */ public function getAgencySite(): ?bool { return $this->agencySite; } - /** - * Whether the subscription is invoiced. - */ + /** + * Whether the subscription is invoiced. + */ public function getInvoiced(): ?bool { return $this->invoiced; } - /** - * Whether the project is marked as HIPAA. - */ + /** + * Whether the project is marked as HIPAA. + */ public function getHipaa(): ?bool { return $this->hipaa; } - /** - * Whether the project is currently on a trial plan. - */ + /** + * Whether the project is currently on a trial plan. + */ public function getIsTrialPlan(): ?bool { return $this->isTrialPlan; @@ -274,13 +273,12 @@ public function getServices(): ?array return $this->services; } - /** - * Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing - * purposes. - */ + /** + * Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing + * purposes. + */ public function getGreen(): ?bool { return $this->green; } } - diff --git a/src/Model/Subscription1.php b/src/Model/Subscription1.php index fcb03fcab..070850d29 100644 --- a/src/Model/Subscription1.php +++ b/src/Model/Subscription1.php @@ -14,7 +14,6 @@ */ final class Subscription1 implements Model, JsonSerializable { - public const PLAN__2XLARGE = '2xlarge'; public const PLAN__2XLARGE_HIGH_MEMORY = '2xlarge-high-memory'; public const PLAN__4XLARGE = '4xlarge'; @@ -45,7 +44,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -74,57 +72,57 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URI of the subscription - */ + /** + * URI of the subscription + */ public function getLicenseUri(): string { return $this->licenseUri; } - /** - * Size of storage (in MB) - */ + /** + * Size of storage (in MB) + */ public function getStorage(): int { return $this->storage; } - /** - * Number of users - */ + /** + * Number of users + */ public function getIncludedUsers(): int { return $this->includedUsers; } - /** - * URI for managing the subscription - */ + /** + * URI for managing the subscription + */ public function getSubscriptionManagementUri(): string { return $this->subscriptionManagementUri; } - /** - * True if subscription attributes, like number of users, are frozen - */ + /** + * True if subscription attributes, like number of users, are frozen + */ public function getRestricted(): bool { return $this->restricted; } - /** - * Whether or not the subscription is suspended - */ + /** + * Whether or not the subscription is suspended + */ public function getSuspended(): bool { return $this->suspended; } - /** - * Current number of users - */ + /** + * Current number of users + */ public function getUserLicenses(): int { return $this->userLicenses; @@ -135,36 +133,35 @@ public function getPlan(): ?string return $this->plan; } - /** - * Number of environments - */ + /** + * Number of environments + */ public function getEnvironments(): ?int { return $this->environments; } - /** - * Resources limits - */ + /** + * Resources limits + */ public function getResources(): ?ResourcesLimits { return $this->resources; } - /** - * URL for resources validation - */ + /** + * URL for resources validation + */ public function getResourceValidationUrl(): ?string { return $this->resourceValidationUrl; } - /** - * Restricted and denied image types - */ + /** + * Restricted and denied image types + */ public function getImageTypes(): ?ImageTypeRestrictions { return $this->imageTypes; } } - diff --git a/src/Model/SubscriptionAddonsObject.php b/src/Model/SubscriptionAddonsObject.php index 26e65d6a4..285061ff3 100644 --- a/src/Model/SubscriptionAddonsObject.php +++ b/src/Model/SubscriptionAddonsObject.php @@ -14,8 +14,6 @@ */ final class SubscriptionAddonsObject implements Model, JsonSerializable { - - public function __construct( private readonly ?SubscriptionAddonsObjectAvailable $available = null, private readonly ?SubscriptionAddonsObjectCurrent $current = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The list of available addons. - */ + /** + * The list of available addons. + */ public function getAvailable(): ?SubscriptionAddonsObjectAvailable { return $this->available; } - /** - * The list of existing addons and their current values. - */ + /** + * The list of existing addons and their current values. + */ public function getCurrent(): ?SubscriptionAddonsObjectCurrent { return $this->current; } - /** - * The upgrades available for current addons. - */ + /** + * The upgrades available for current addons. + */ public function getUpgradesAvailable(): ?SubscriptionAddonsObjectUpgradesAvailable { return $this->upgradesAvailable; } } - diff --git a/src/Model/SubscriptionAddonsObjectAvailable.php b/src/Model/SubscriptionAddonsObjectAvailable.php index dad860e5a..3a05a1c1e 100644 --- a/src/Model/SubscriptionAddonsObjectAvailable.php +++ b/src/Model/SubscriptionAddonsObjectAvailable.php @@ -14,15 +14,12 @@ */ final class SubscriptionAddonsObjectAvailable implements Model, JsonSerializable { - - public function __construct( private readonly ?array $continuousProfiling = [], private readonly ?array $projectSupportLevel = [], ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getProjectSupportLevel(): ?array return $this->projectSupportLevel; } } - diff --git a/src/Model/SubscriptionAddonsObjectCurrent.php b/src/Model/SubscriptionAddonsObjectCurrent.php index 926b81861..5326c00c5 100644 --- a/src/Model/SubscriptionAddonsObjectCurrent.php +++ b/src/Model/SubscriptionAddonsObjectCurrent.php @@ -14,15 +14,12 @@ */ final class SubscriptionAddonsObjectCurrent implements Model, JsonSerializable { - - public function __construct( private readonly ?array $continuousProfiling = [], private readonly ?array $projectSupportLevel = [], ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getProjectSupportLevel(): ?array return $this->projectSupportLevel; } } - diff --git a/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php b/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php index d5a8e6e68..88bc24281 100644 --- a/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php +++ b/src/Model/SubscriptionAddonsObjectUpgradesAvailable.php @@ -14,15 +14,12 @@ */ final class SubscriptionAddonsObjectUpgradesAvailable implements Model, JsonSerializable { - - public function __construct( private readonly ?array $continuousProfiling = [], private readonly ?array $projectSupportLevel = [], ) { } - public function getModelName(): string { return self::class; @@ -51,4 +48,3 @@ public function getProjectSupportLevel(): ?array return $this->projectSupportLevel; } } - diff --git a/src/Model/SubscriptionCurrentUsageObject.php b/src/Model/SubscriptionCurrentUsageObject.php index 3bcdef6c0..4c486f33b 100644 --- a/src/Model/SubscriptionCurrentUsageObject.php +++ b/src/Model/SubscriptionCurrentUsageObject.php @@ -14,8 +14,6 @@ */ final class SubscriptionCurrentUsageObject implements Model, JsonSerializable { - - public function __construct( private readonly ?UsageGroupCurrentUsageProperties $cpuApp = null, private readonly ?UsageGroupCurrentUsageProperties $storageAppServices = null, @@ -33,7 +31,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -63,108 +60,107 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getCpuApp(): ?UsageGroupCurrentUsageProperties { return $this->cpuApp; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getStorageAppServices(): ?UsageGroupCurrentUsageProperties { return $this->storageAppServices; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getMemoryApp(): ?UsageGroupCurrentUsageProperties { return $this->memoryApp; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getCpuServices(): ?UsageGroupCurrentUsageProperties { return $this->cpuServices; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getMemoryServices(): ?UsageGroupCurrentUsageProperties { return $this->memoryServices; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getBackupStorage(): ?UsageGroupCurrentUsageProperties { return $this->backupStorage; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getBuildCpu(): ?UsageGroupCurrentUsageProperties { return $this->buildCpu; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getBuildMemory(): ?UsageGroupCurrentUsageProperties { return $this->buildMemory; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getEgressBandwidth(): ?UsageGroupCurrentUsageProperties { return $this->egressBandwidth; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getIngressRequests(): ?UsageGroupCurrentUsageProperties { return $this->ingressRequests; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getLogsFwdContentSize(): ?UsageGroupCurrentUsageProperties { return $this->logsFwdContentSize; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getFastlyBandwidth(): ?UsageGroupCurrentUsageProperties { return $this->fastlyBandwidth; } - /** - * Current usage info for a usage group. - */ + /** + * Current usage info for a usage group. + */ public function getFastlyRequests(): ?UsageGroupCurrentUsageProperties { return $this->fastlyRequests; } } - diff --git a/src/Model/SubscriptionInformation.php b/src/Model/SubscriptionInformation.php index c97bce696..df1188f87 100644 --- a/src/Model/SubscriptionInformation.php +++ b/src/Model/SubscriptionInformation.php @@ -14,7 +14,6 @@ */ final class SubscriptionInformation implements Model, JsonSerializable { - public const PLAN__2XLARGE = '2xlarge'; public const PLAN__2XLARGE_HIGH_MEMORY = '2xlarge-high-memory'; public const PLAN__4XLARGE = '4xlarge'; @@ -45,7 +44,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -74,57 +72,57 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URI of the subscription - */ + /** + * URI of the subscription + */ public function getLicenseUri(): string { return $this->licenseUri; } - /** - * Size of storage (in MB) - */ + /** + * Size of storage (in MB) + */ public function getStorage(): int { return $this->storage; } - /** - * Number of users - */ + /** + * Number of users + */ public function getIncludedUsers(): int { return $this->includedUsers; } - /** - * URI for managing the subscription - */ + /** + * URI for managing the subscription + */ public function getSubscriptionManagementUri(): string { return $this->subscriptionManagementUri; } - /** - * True if subscription attributes, like number of users, are frozen - */ + /** + * True if subscription attributes, like number of users, are frozen + */ public function getRestricted(): bool { return $this->restricted; } - /** - * Whether or not the subscription is suspended - */ + /** + * Whether or not the subscription is suspended + */ public function getSuspended(): bool { return $this->suspended; } - /** - * Current number of users - */ + /** + * Current number of users + */ public function getUserLicenses(): int { return $this->userLicenses; @@ -135,36 +133,35 @@ public function getPlan(): ?string return $this->plan; } - /** - * Number of environments - */ + /** + * Number of environments + */ public function getEnvironments(): ?int { return $this->environments; } - /** - * Resources limits - */ + /** + * Resources limits + */ public function getResources(): ?ResourcesLimits { return $this->resources; } - /** - * URL for resources validation - */ + /** + * URL for resources validation + */ public function getResourceValidationUrl(): ?string { return $this->resourceValidationUrl; } - /** - * Restricted and denied image types - */ + /** + * Restricted and denied image types + */ public function getImageTypes(): ?ImageTypeRestrictions { return $this->imageTypes; } } - diff --git a/src/Model/SumoLogic.php b/src/Model/SumoLogic.php index af17b3d0d..ae9ccadb7 100644 --- a/src/Model/SumoLogic.php +++ b/src/Model/SumoLogic.php @@ -14,15 +14,12 @@ */ final class SumoLogic implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/SumologicIntegration.php b/src/Model/SumologicIntegration.php index 458095363..5fda2ee19 100644 --- a/src/Model/SumologicIntegration.php +++ b/src/Model/SumologicIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level SumologicIntegration (auto-generated) @@ -14,8 +14,6 @@ */ final class SumologicIntegration implements Model, JsonSerializable, Integration { - - public function __construct( private readonly string $type, private readonly string $role, @@ -24,13 +22,12 @@ public function __construct( private readonly string $category, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -57,33 +54,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -94,25 +91,25 @@ public function getExtra(): array return $this->extra; } - /** - * The Sumologic HTTPS endpoint - */ + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; } - /** - * The Category used to easy filtering (sent as X-Sumo-Category header) - */ + /** + * The Category used to easy filtering (sent as X-Sumo-Category header) + */ public function getCategory(): string { return $this->category; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -123,12 +120,11 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of SumologicIntegration - */ + /** + * The identifier of SumologicIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/SumologicIntegrationCreateInput.php b/src/Model/SumologicIntegrationCreateInput.php index daeae78c2..6e122a9db 100644 --- a/src/Model/SumologicIntegrationCreateInput.php +++ b/src/Model/SumologicIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SumologicIntegrationCreateInput (auto-generated) @@ -14,8 +13,6 @@ */ final class SumologicIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,17 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Sumologic HTTPS endpoint - */ + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; @@ -70,17 +66,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The Category used to easy filtering (sent as X-Sumo-Category header) - */ + /** + * The Category used to easy filtering (sent as X-Sumo-Category header) + */ public function getCategory(): ?string { return $this->category; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -91,4 +87,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/SumologicIntegrationPatch.php b/src/Model/SumologicIntegrationPatch.php index c3704327a..2fca2383c 100644 --- a/src/Model/SumologicIntegrationPatch.php +++ b/src/Model/SumologicIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level SumologicIntegrationPatch (auto-generated) @@ -14,8 +13,6 @@ */ final class SumologicIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - - public function __construct( private readonly string $type, private readonly string $url, @@ -26,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,17 +45,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The Sumologic HTTPS endpoint - */ + /** + * The Sumologic HTTPS endpoint + */ public function getUrl(): string { return $this->url; @@ -70,17 +66,17 @@ public function getExtra(): ?array return $this->extra; } - /** - * The Category used to easy filtering (sent as X-Sumo-Category header) - */ + /** + * The Category used to easy filtering (sent as X-Sumo-Category header) + */ public function getCategory(): ?string { return $this->category; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -91,4 +87,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/Syslog.php b/src/Model/Syslog.php index ae0705a5d..9e8611a8f 100644 --- a/src/Model/Syslog.php +++ b/src/Model/Syslog.php @@ -14,15 +14,12 @@ */ final class Syslog implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/SyslogIntegration.php b/src/Model/SyslogIntegration.php index 87ca66471..2784ac8a0 100644 --- a/src/Model/SyslogIntegration.php +++ b/src/Model/SyslogIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level SyslogIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class SyslogIntegration implements Model, JsonSerializable, Integration { - public const PROTOCOL_TCP = 'tcp'; public const PROTOCOL_TLS = 'tls'; public const PROTOCOL_UDP = 'udp'; @@ -32,13 +31,12 @@ public function __construct( private readonly string $messageFormat, private readonly bool $tlsVerify, private readonly array $excludedServices, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -68,33 +66,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -105,49 +103,49 @@ public function getExtra(): array return $this->extra; } - /** - * Syslog relay/collector host - */ + /** + * Syslog relay/collector host + */ public function getHost(): string { return $this->host; } - /** - * Syslog relay/collector port - */ + /** + * Syslog relay/collector port + */ public function getPort(): int { return $this->port; } - /** - * Transport protocol - */ + /** + * Transport protocol + */ public function getProtocol(): string { return $this->protocol; } - /** - * Syslog facility - */ + /** + * Syslog facility + */ public function getFacility(): int { return $this->facility; } - /** - * Syslog message format - */ + /** + * Syslog message format + */ public function getMessageFormat(): string { return $this->messageFormat; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): bool { return $this->tlsVerify; @@ -158,12 +156,11 @@ public function getExcludedServices(): array return $this->excludedServices; } - /** - * The identifier of SyslogIntegration - */ + /** + * The identifier of SyslogIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/SyslogIntegrationCreateInput.php b/src/Model/SyslogIntegrationCreateInput.php index 17ae1e6d6..c74d8a3ef 100644 --- a/src/Model/SyslogIntegrationCreateInput.php +++ b/src/Model/SyslogIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level SyslogIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class SyslogIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const PROTOCOL_TCP = 'tcp'; public const PROTOCOL_TLS = 'tls'; public const PROTOCOL_UDP = 'udp'; @@ -38,7 +36,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -66,9 +63,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -79,41 +76,41 @@ public function getExtra(): ?array return $this->extra; } - /** - * Syslog relay/collector host - */ + /** + * Syslog relay/collector host + */ public function getHost(): ?string { return $this->host; } - /** - * Syslog relay/collector port - */ + /** + * Syslog relay/collector port + */ public function getPort(): ?int { return $this->port; } - /** - * Transport protocol - */ + /** + * Transport protocol + */ public function getProtocol(): ?string { return $this->protocol; } - /** - * Syslog facility - */ + /** + * Syslog facility + */ public function getFacility(): ?int { return $this->facility; } - /** - * Syslog message format - */ + /** + * Syslog message format + */ public function getMessageFormat(): ?string { return $this->messageFormat; @@ -129,9 +126,9 @@ public function getAuthMode(): ?string return $this->authMode; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -142,4 +139,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/SyslogIntegrationPatch.php b/src/Model/SyslogIntegrationPatch.php index 92fe55561..e635d7dd6 100644 --- a/src/Model/SyslogIntegrationPatch.php +++ b/src/Model/SyslogIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level SyslogIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class SyslogIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const PROTOCOL_TCP = 'tcp'; public const PROTOCOL_TLS = 'tls'; public const PROTOCOL_UDP = 'udp'; @@ -38,7 +36,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -66,9 +63,9 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; @@ -79,41 +76,41 @@ public function getExtra(): ?array return $this->extra; } - /** - * Syslog relay/collector host - */ + /** + * Syslog relay/collector host + */ public function getHost(): ?string { return $this->host; } - /** - * Syslog relay/collector port - */ + /** + * Syslog relay/collector port + */ public function getPort(): ?int { return $this->port; } - /** - * Transport protocol - */ + /** + * Transport protocol + */ public function getProtocol(): ?string { return $this->protocol; } - /** - * Syslog facility - */ + /** + * Syslog facility + */ public function getFacility(): ?int { return $this->facility; } - /** - * Syslog message format - */ + /** + * Syslog message format + */ public function getMessageFormat(): ?string { return $this->messageFormat; @@ -129,9 +126,9 @@ public function getAuthMode(): ?string return $this->authMode; } - /** - * Enable/Disable HTTPS certificate verification - */ + /** + * Enable/Disable HTTPS certificate verification + */ public function getTlsVerify(): ?bool { return $this->tlsVerify; @@ -142,4 +139,3 @@ public function getExcludedServices(): ?array return $this->excludedServices; } } - diff --git a/src/Model/SystemInformation.php b/src/Model/SystemInformation.php index e622ccd98..5beb57b5a 100644 --- a/src/Model/SystemInformation.php +++ b/src/Model/SystemInformation.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,16 +14,13 @@ */ final class SystemInformation implements Model, JsonSerializable { - - public function __construct( private readonly string $version, private readonly string $image, - private readonly \DateTime $startedAt, + private readonly DateTime $startedAt, ) { } - public function getModelName(): string { return self::class; @@ -42,25 +40,24 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The version of this project server - */ + /** + * The version of this project server + */ public function getVersion(): string { return $this->version; } - /** - * The image version of the project server - */ + /** + * The image version of the project server + */ public function getImage(): string { return $this->image; } - public function getStartedAt(): \DateTime + public function getStartedAt(): DateTime { return $this->startedAt; } } - diff --git a/src/Model/TLSSettings.php b/src/Model/TLSSettings.php index a28efca3f..ba4a9929b 100644 --- a/src/Model/TLSSettings.php +++ b/src/Model/TLSSettings.php @@ -14,7 +14,6 @@ */ final class TLSSettings implements Model, JsonSerializable { - public const MIN_VERSION_TLSV1_0 = 'TLSv1.0'; public const MIN_VERSION_TLSV1_1 = 'TLSv1.1'; public const MIN_VERSION_TLSV1_2 = 'TLSv1.2'; @@ -30,7 +29,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,17 +54,17 @@ public function getStrictTransportSecurity(): StrictTransportSecurityOptions return $this->strictTransportSecurity; } - /** - * The minimum TLS version to support. - */ + /** + * The minimum TLS version to support. + */ public function getMinVersion(): ?string { return $this->minVersion; } - /** - * The type of client authentication to request. - */ + /** + * The type of client authentication to request. + */ public function getClientAuthentication(): ?string { return $this->clientAuthentication; @@ -77,4 +75,3 @@ public function getClientCertificateAuthorities(): array return $this->clientCertificateAuthorities; } } - diff --git a/src/Model/Task.php b/src/Model/Task.php index 54ada3450..d985b3e1b 100644 --- a/src/Model/Task.php +++ b/src/Model/Task.php @@ -13,8 +13,6 @@ */ final class Task implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $type, @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -68,42 +65,42 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Task - */ + /** + * The identifier of Task + */ public function getId(): string { return $this->id; } - /** - * The runtime type and version for the task (e.g., python:3.8) - */ + /** + * The runtime type and version for the task (e.g., python:3.8) + */ public function getType(): string { return $this->type; } - /** - * Configuration related to the source code of the task - */ + /** + * Configuration related to the source code of the task + */ public function getSource(): SourceCodeConfiguration1 { return $this->source; } - /** - * Scripts executed at various points in the lifecycle of the task - */ + /** + * Scripts executed at various points in the lifecycle of the task + */ public function getHooks(): Hooks1 { return $this->hooks; } - /** - * The relationships of the task to defined services and applications - * @return ServiceRelationshipsValue[] - */ + /** + * The relationships of the task to defined services and applications + * @return ServiceRelationshipsValue[] + */ public function getRelationships(): array { return $this->relationships; @@ -114,18 +111,18 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * Filesystem mounts of this task - * @return MountsValue[] - */ + /** + * Filesystem mounts of this task + * @return MountsValue[] + */ public function getMounts(): array { return $this->mounts; } - /** - * The timezone of the task. Defaults to the project's timezone if not specified - */ + /** + * The timezone of the task. Defaults to the project's timezone if not specified + */ public function getTimezone(): ?string { return $this->timezone; @@ -141,53 +138,52 @@ public function getDependencies(): array return $this->dependencies; } - /** - * Runtime-specific configuration - */ + /** + * Runtime-specific configuration + */ public function getRuntime(): object { return $this->runtime; } - /** - * Authorizations available to this task - * @return AuthorizationsInner[] - */ + /** + * Authorizations available to this task + * @return AuthorizationsInner[] + */ public function getAuthorizations(): array { return $this->authorizations; } - /** - * Configuration for task execution - */ + /** + * Configuration for task execution + */ public function getRun(): RunConfiguration { return $this->run; } - /** - * Resources configuration (base memory and memory ratio) - */ + /** + * Resources configuration (base memory and memory ratio) + */ public function getResources(): ?Resources9 { return $this->resources; } - /** - * Selected container profile for the task - */ + /** + * Selected container profile for the task + */ public function getContainerProfile(): ?string { return $this->containerProfile; } - /** - * The unique name of the task - */ + /** + * The unique name of the task + */ public function getName(): string { return $this->name; } } - diff --git a/src/Model/TaskTriggerInput.php b/src/Model/TaskTriggerInput.php index 15ba826d5..cb1895c1b 100644 --- a/src/Model/TaskTriggerInput.php +++ b/src/Model/TaskTriggerInput.php @@ -13,14 +13,11 @@ */ final class TaskTriggerInput implements Model, JsonSerializable { - - public function __construct( private readonly ?array $variables = [], ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getVariables(): ?array return $this->variables; } } - diff --git a/src/Model/Tasks.php b/src/Model/Tasks.php index b6ecf7d82..bd768ee2c 100644 --- a/src/Model/Tasks.php +++ b/src/Model/Tasks.php @@ -13,14 +13,11 @@ */ final class Tasks implements Model, JsonSerializable { - - public function __construct( private readonly bool $enabled, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * If true, background tasks can be triggered. - */ + /** + * If true, background tasks can be triggered. + */ public function getEnabled(): bool { return $this->enabled; } } - diff --git a/src/Model/TasksValue.php b/src/Model/TasksValue.php index 77fe30715..328462015 100644 --- a/src/Model/TasksValue.php +++ b/src/Model/TasksValue.php @@ -13,14 +13,11 @@ */ final class TasksValue implements Model, JsonSerializable { - - public function __construct( private readonly ?Resources2 $resources, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getResources(): ?Resources2 return $this->resources; } } - diff --git a/src/Model/Team.php b/src/Model/Team.php index 898768c44..84f87839f 100644 --- a/src/Model/Team.php +++ b/src/Model/Team.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class Team implements Model, JsonSerializable { - public const PROJECT_PERMISSIONS_ADMIN = 'admin'; public const PROJECT_PERMISSIONS_VIEWER = 'viewer'; public const PROJECT_PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -32,12 +32,11 @@ public function __construct( private readonly ?string $label = null, private readonly ?array $projectPermissions = [], private readonly ?TeamCounts $counts = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, ) { } - public function getModelName(): string { return self::class; @@ -61,25 +60,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the parent organization. - */ + /** + * The ID of the parent organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The human-readable label of the team. - */ + /** + * The human-readable label of the team. + */ public function getLabel(): ?string { return $this->label; @@ -95,20 +94,19 @@ public function getCounts(): ?TeamCounts return $this->counts; } - /** - * The date and time when the team was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the team was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the team was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the team was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } } - diff --git a/src/Model/TeamCounts.php b/src/Model/TeamCounts.php index 5045489d9..5be7e60a9 100644 --- a/src/Model/TeamCounts.php +++ b/src/Model/TeamCounts.php @@ -13,15 +13,12 @@ */ final class TeamCounts implements Model, JsonSerializable { - - public function __construct( private readonly ?int $memberCount = null, private readonly ?int $projectCount = null, ) { } - public function getModelName(): string { return self::class; @@ -40,20 +37,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Total count of members of the team. - */ + /** + * Total count of members of the team. + */ public function getMemberCount(): ?int { return $this->memberCount; } - /** - * Total count of projects that the team has access to. - */ + /** + * Total count of projects that the team has access to. + */ public function getProjectCount(): ?int { return $this->projectCount; } } - diff --git a/src/Model/TeamMember.php b/src/Model/TeamMember.php index d10ea4f59..680532559 100644 --- a/src/Model/TeamMember.php +++ b/src/Model/TeamMember.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,17 +14,14 @@ */ final class TeamMember implements Model, JsonSerializable { - - public function __construct( private readonly ?string $teamId = null, private readonly ?string $userId = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, ) { } - public function getModelName(): string { return self::class; @@ -44,36 +42,35 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getTeamId(): ?string { return $this->teamId; } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getUserId(): ?string { return $this->userId; } - /** - * The date and time when the team member was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the team member was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the team member was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the team member was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } } - diff --git a/src/Model/TeamProjectAccess.php b/src/Model/TeamProjectAccess.php index d416b1a26..f283ba51a 100644 --- a/src/Model/TeamProjectAccess.php +++ b/src/Model/TeamProjectAccess.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,20 +14,17 @@ */ final class TeamProjectAccess implements Model, JsonSerializable { - - public function __construct( private readonly ?string $teamId = null, private readonly ?string $organizationId = null, private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, - private readonly ?\DateTime $grantedAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $grantedAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?TeamProjectAccessLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -50,50 +48,50 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getTeamId(): ?string { return $this->teamId; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * The date and time when the access was granted. - */ - public function getGrantedAt(): ?\DateTime + /** + * The date and time when the access was granted. + */ + public function getGrantedAt(): ?DateTime { return $this->grantedAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } @@ -103,4 +101,3 @@ public function getLinks(): ?TeamProjectAccessLinks return $this->links; } } - diff --git a/src/Model/TeamProjectAccessLinks.php b/src/Model/TeamProjectAccessLinks.php index 2366a3f0c..c00b34a31 100644 --- a/src/Model/TeamProjectAccessLinks.php +++ b/src/Model/TeamProjectAccessLinks.php @@ -13,8 +13,6 @@ */ final class TeamProjectAccessLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?TeamProjectAccessLinksUpdate $update = null, private readonly ?TeamProjectAccessLinksDelete $delete = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current access item. - */ + /** + * Link to the current access item. + */ public function getSelf(): ?TeamProjectAccessLinksSelf { return $this->self; } - /** - * Link for updating the current access item. Only present if user has update permission. - */ + /** + * Link for updating the current access item. Only present if user has update permission. + */ public function getUpdate(): ?TeamProjectAccessLinksUpdate { return $this->update; } - /** - * Link for deleting the current access item. Only present if user has delete permission. - */ + /** + * Link for deleting the current access item. Only present if user has delete permission. + */ public function getDelete(): ?TeamProjectAccessLinksDelete { return $this->delete; } } - diff --git a/src/Model/TeamProjectAccessLinksDelete.php b/src/Model/TeamProjectAccessLinksDelete.php index 3a73637af..162675fee 100644 --- a/src/Model/TeamProjectAccessLinksDelete.php +++ b/src/Model/TeamProjectAccessLinksDelete.php @@ -14,15 +14,12 @@ */ final class TeamProjectAccessLinksDelete implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/TeamProjectAccessLinksSelf.php b/src/Model/TeamProjectAccessLinksSelf.php index bb798ffb4..2d0915a7f 100644 --- a/src/Model/TeamProjectAccessLinksSelf.php +++ b/src/Model/TeamProjectAccessLinksSelf.php @@ -14,14 +14,11 @@ */ final class TeamProjectAccessLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/TeamProjectAccessLinksUpdate.php b/src/Model/TeamProjectAccessLinksUpdate.php index 92764f6c9..ea79031b8 100644 --- a/src/Model/TeamProjectAccessLinksUpdate.php +++ b/src/Model/TeamProjectAccessLinksUpdate.php @@ -14,15 +14,12 @@ */ final class TeamProjectAccessLinksUpdate implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, private readonly ?string $method = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } - /** - * The HTTP method to use. - */ + /** + * The HTTP method to use. + */ public function getMethod(): ?string { return $this->method; } } - diff --git a/src/Model/TeamReference.php b/src/Model/TeamReference.php index f4195435d..25bbe8eb5 100644 --- a/src/Model/TeamReference.php +++ b/src/Model/TeamReference.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class TeamReference implements Model, JsonSerializable { - public const PROJECT_PERMISSIONS_ADMIN = 'admin'; public const PROJECT_PERMISSIONS_VIEWER = 'viewer'; public const PROJECT_PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -33,12 +33,11 @@ public function __construct( private readonly ?string $label = null, private readonly ?array $projectPermissions = [], private readonly ?TeamCounts $counts = null, - private readonly ?\DateTime $createdAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $createdAt = null, + private readonly ?DateTime $updatedAt = null, ) { } - public function getModelName(): string { return self::class; @@ -62,25 +61,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the team. - */ + /** + * The ID of the team. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the parent organization. - */ + /** + * The ID of the parent organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The human-readable label of the team. - */ + /** + * The human-readable label of the team. + */ public function getLabel(): ?string { return $this->label; @@ -96,20 +95,19 @@ public function getCounts(): ?TeamCounts return $this->counts; } - /** - * The date and time when the team was created. - */ - public function getCreatedAt(): ?\DateTime + /** + * The date and time when the team was created. + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The date and time when the team was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the team was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } } - diff --git a/src/Model/Ticket.php b/src/Model/Ticket.php index 430b8a5ef..2ec41705f 100644 --- a/src/Model/Ticket.php +++ b/src/Model/Ticket.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,7 +15,6 @@ */ final class Ticket implements Model, JsonSerializable { - public const TYPE_PROBLEM = 'problem'; public const TYPE_TASK = 'task'; public const TYPE_INCIDENT = 'incident'; @@ -52,8 +52,8 @@ final class Ticket implements Model, JsonSerializable public function __construct( private readonly ?int $ticketId = null, - private readonly ?\DateTime $created = null, - private readonly ?\DateTime $updated = null, + private readonly ?DateTime $created = null, + private readonly ?DateTime $updated = null, private readonly ?string $type = null, private readonly ?string $subject = null, private readonly ?string $description = null, @@ -67,7 +67,7 @@ public function __construct( private readonly ?string $organizationId = null, private readonly ?array $collaboratorIds = [], private readonly ?bool $hasIncidents = null, - private readonly ?\DateTime $due = null, + private readonly ?DateTime $due = null, private readonly ?array $tags = [], private readonly ?string $subscriptionId = null, private readonly ?string $ticketGroup = null, @@ -75,8 +75,8 @@ public function __construct( private readonly ?string $affectedUrl = null, private readonly ?string $queue = null, private readonly ?string $issueType = null, - private readonly ?\DateTime $resolutionTime = null, - private readonly ?\DateTime $responseTime = null, + private readonly ?DateTime $resolutionTime = null, + private readonly ?DateTime $responseTime = null, private readonly ?string $projectUrl = null, private readonly ?string $region = null, private readonly ?string $category = null, @@ -89,7 +89,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -141,113 +140,113 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the ticket. - */ + /** + * The ID of the ticket. + */ public function getTicketId(): ?int { return $this->ticketId; } - /** - * The time when the support ticket was created. - */ - public function getCreated(): ?\DateTime + /** + * The time when the support ticket was created. + */ + public function getCreated(): ?DateTime { return $this->created; } - /** - * The time when the support ticket was updated. - */ - public function getUpdated(): ?\DateTime + /** + * The time when the support ticket was updated. + */ + public function getUpdated(): ?DateTime { return $this->updated; } - /** - * A type of the ticket. - */ + /** + * A type of the ticket. + */ public function getType(): ?string { return $this->type; } - /** - * A title of the ticket. - */ + /** + * A title of the ticket. + */ public function getSubject(): ?string { return $this->subject; } - /** - * The description body of the support ticket. - */ + /** + * The description body of the support ticket. + */ public function getDescription(): ?string { return $this->description; } - /** - * A priority of the ticket. - */ + /** + * A priority of the ticket. + */ public function getPriority(): ?string { return $this->priority; } - /** - * Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to. - */ + /** + * Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to. + */ public function getFollowupTid(): ?string { return $this->followupTid; } - /** - * The status of the support ticket. - */ + /** + * The status of the support ticket. + */ public function getStatus(): ?string { return $this->status; } - /** - * Email address of the ticket recipient, defaults to support@upsun.com. - */ + /** + * Email address of the ticket recipient, defaults to support@upsun.com. + */ public function getRecipient(): ?string { return $this->recipient; } - /** - * UUID of the ticket requester. - */ + /** + * UUID of the ticket requester. + */ public function getRequesterId(): ?string { return $this->requesterId; } - /** - * UUID of the ticket submitter. - */ + /** + * UUID of the ticket submitter. + */ public function getSubmitterId(): ?string { return $this->submitterId; } - /** - * UUID of the ticket assignee. - */ + /** + * UUID of the ticket assignee. + */ public function getAssigneeId(): ?string { return $this->assigneeId; } - /** - * A reference id that is usable to find the commerce license. - */ + /** + * A reference id that is usable to find the commerce license. + */ public function getOrganizationId(): ?string { return $this->organizationId; @@ -258,18 +257,18 @@ public function getCollaboratorIds(): ?array return $this->collaboratorIds; } - /** - * Whether or not this ticket has incidents. - */ + /** + * Whether or not this ticket has incidents. + */ public function getHasIncidents(): ?bool { return $this->hasIncidents; } - /** - * A time that the ticket is due at. - */ - public function getDue(): ?\DateTime + /** + * A time that the ticket is due at. + */ + public function getDue(): ?DateTime { return $this->due; } @@ -279,141 +278,140 @@ public function getTags(): ?array return $this->tags; } - /** - * The internal ID of the subscription. - */ + /** + * The internal ID of the subscription. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * Maps to zendesk field 'Request group'. - */ + /** + * Maps to zendesk field 'Request group'. + */ public function getTicketGroup(): ?string { return $this->ticketGroup; } - /** - * Maps to zendesk field 'The support plan associated with this ticket. - */ + /** + * Maps to zendesk field 'The support plan associated with this ticket. + */ public function getSupportPlan(): ?string { return $this->supportPlan; } - /** - * The affected URL associated with the support ticket. - */ + /** + * The affected URL associated with the support ticket. + */ public function getAffectedUrl(): ?string { return $this->affectedUrl; } - /** - * The queue the support ticket is in. - */ + /** + * The queue the support ticket is in. + */ public function getQueue(): ?string { return $this->queue; } - /** - * The issue type of the support ticket. - */ + /** + * The issue type of the support ticket. + */ public function getIssueType(): ?string { return $this->issueType; } - /** - * Maps to zendesk field 'Resolution Time'. - */ - public function getResolutionTime(): ?\DateTime + /** + * Maps to zendesk field 'Resolution Time'. + */ + public function getResolutionTime(): ?DateTime { return $this->resolutionTime; } - /** - * Maps to zendesk field 'Response Time (time from request to reply). - */ - public function getResponseTime(): ?\DateTime + /** + * Maps to zendesk field 'Response Time (time from request to reply). + */ + public function getResponseTime(): ?DateTime { return $this->responseTime; } - /** - * Maps to zendesk field 'Project URL'. - */ + /** + * Maps to zendesk field 'Project URL'. + */ public function getProjectUrl(): ?string { return $this->projectUrl; } - /** - * Maps to zendesk field 'Region'. - */ + /** + * Maps to zendesk field 'Region'. + */ public function getRegion(): ?string { return $this->region; } - /** - * Maps to zendesk field 'Category'. - */ + /** + * Maps to zendesk field 'Category'. + */ public function getCategory(): ?string { return $this->category; } - /** - * Maps to zendesk field 'Environment'. - */ + /** + * Maps to zendesk field 'Environment'. + */ public function getEnvironment(): ?string { return $this->environment; } - /** - * Maps to zendesk field 'Ticket Sharing Status'. - */ + /** + * Maps to zendesk field 'Ticket Sharing Status'. + */ public function getTicketSharingStatus(): ?string { return $this->ticketSharingStatus; } - /** - * Maps to zendesk field 'Application Ticket URL'. - */ + /** + * Maps to zendesk field 'Application Ticket URL'. + */ public function getApplicationTicketUrl(): ?string { return $this->applicationTicketUrl; } - /** - * Maps to zendesk field 'Infrastructure Ticket URL'. - */ + /** + * Maps to zendesk field 'Infrastructure Ticket URL'. + */ public function getInfrastructureTicketUrl(): ?string { return $this->infrastructureTicketUrl; } - /** - * A list of JIRA issues related to the support ticket. - * @return TicketJiraInner[]|null - */ + /** + * A list of JIRA issues related to the support ticket. + * @return TicketJiraInner[]|null + */ public function getJira(): ?array { return $this->jira; } - /** - * URL to the customer-facing ticket in Zendesk. - */ + /** + * URL to the customer-facing ticket in Zendesk. + */ public function getZdTicketUrl(): ?string { return $this->zdTicketUrl; } } - diff --git a/src/Model/TicketJiraInner.php b/src/Model/TicketJiraInner.php index 7f1c47f17..fe6186957 100644 --- a/src/Model/TicketJiraInner.php +++ b/src/Model/TicketJiraInner.php @@ -13,8 +13,6 @@ */ final class TicketJiraInner implements Model, JsonSerializable { - - public function __construct( private readonly ?int $id = null, private readonly ?int $ticketId = null, @@ -25,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -78,4 +75,3 @@ public function getUpdatedAt(): ?float return $this->updatedAt; } } - diff --git a/src/Model/Tree.php b/src/Model/Tree.php index be940d99d..87b67a95d 100644 --- a/src/Model/Tree.php +++ b/src/Model/Tree.php @@ -13,8 +13,6 @@ */ final class Tree implements Model, JsonSerializable { - - public function __construct( private readonly string $id, private readonly string $sha, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,29 +39,28 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The identifier of Tree - */ + /** + * The identifier of Tree + */ public function getId(): string { return $this->id; } - /** - * The identifier of the tree - */ + /** + * The identifier of the tree + */ public function getSha(): string { return $this->sha; } - /** - * The tree items - * @return TreeItemsInner[] - */ + /** + * The tree items + * @return TreeItemsInner[] + */ public function getTree(): array { return $this->tree; } } - diff --git a/src/Model/TreeItemsInner.php b/src/Model/TreeItemsInner.php index 015afa398..a3875445d 100644 --- a/src/Model/TreeItemsInner.php +++ b/src/Model/TreeItemsInner.php @@ -13,7 +13,6 @@ */ final class TreeItemsInner implements Model, JsonSerializable { - public const MODE__040000 = '040000'; public const MODE__100644 = '100644'; public const MODE__100755 = '100755'; @@ -28,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -69,4 +67,3 @@ public function getSha(): ?string return $this->sha; } } - diff --git a/src/Model/UpdateOrgAddonsRequest.php b/src/Model/UpdateOrgAddonsRequest.php index ac82252ff..91a1d87f0 100644 --- a/src/Model/UpdateOrgAddonsRequest.php +++ b/src/Model/UpdateOrgAddonsRequest.php @@ -13,7 +13,6 @@ */ final class UpdateOrgAddonsRequest implements Model, JsonSerializable { - public const USER_MANAGEMENT_STANDARD = 'standard'; public const USER_MANAGEMENT_ENHANCED = 'enhanced'; public const SUPPORT_LEVEL_BASIC = 'basic'; @@ -25,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -54,4 +52,3 @@ public function getSupportLevel(): ?string return $this->supportLevel; } } - diff --git a/src/Model/UpdateOrgBillingAlertConfigRequest.php b/src/Model/UpdateOrgBillingAlertConfigRequest.php index 84b6df023..007c20cac 100644 --- a/src/Model/UpdateOrgBillingAlertConfigRequest.php +++ b/src/Model/UpdateOrgBillingAlertConfigRequest.php @@ -13,15 +13,12 @@ */ final class UpdateOrgBillingAlertConfigRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $active = null, private readonly ?UpdateOrgBillingAlertConfigRequestConfig $config = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getConfig(): ?UpdateOrgBillingAlertConfigRequestConfig return $this->config; } } - diff --git a/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php b/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php index 219c9f3e5..56f7d27bd 100644 --- a/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php +++ b/src/Model/UpdateOrgBillingAlertConfigRequestConfig.php @@ -13,15 +13,12 @@ */ final class UpdateOrgBillingAlertConfigRequestConfig implements Model, JsonSerializable { - - public function __construct( private readonly ?int $threshold = null, private readonly ?string $mode = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getMode(): ?string return $this->mode; } } - diff --git a/src/Model/UpdateOrgMemberRequest.php b/src/Model/UpdateOrgMemberRequest.php index 955cccb19..d4e8351ac 100644 --- a/src/Model/UpdateOrgMemberRequest.php +++ b/src/Model/UpdateOrgMemberRequest.php @@ -13,7 +13,6 @@ */ final class UpdateOrgMemberRequest implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_BILLING = 'billing'; public const PERMISSIONS_MEMBERS = 'members'; @@ -26,7 +25,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,4 +47,3 @@ public function getPermissions(): ?array return $this->permissions; } } - diff --git a/src/Model/UpdateOrgProfileRequest.php b/src/Model/UpdateOrgProfileRequest.php index 59f0dd74b..4970142b3 100644 --- a/src/Model/UpdateOrgProfileRequest.php +++ b/src/Model/UpdateOrgProfileRequest.php @@ -13,7 +13,6 @@ */ final class UpdateOrgProfileRequest implements Model, JsonSerializable { - public const CUSTOMER_TYPE_INDVIDUAL = 'indvidual'; public const CUSTOMER_TYPE_COMPANY = 'company'; public const CUSTOMER_TYPE_GOVERNMENT = 'government'; @@ -29,7 +28,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -88,4 +86,3 @@ public function getBillingContact(): ?string return $this->billingContact; } } - diff --git a/src/Model/UpdateOrgProjectRequest.php b/src/Model/UpdateOrgProjectRequest.php index 2c52b7457..efcd8f1a7 100644 --- a/src/Model/UpdateOrgProjectRequest.php +++ b/src/Model/UpdateOrgProjectRequest.php @@ -13,8 +13,6 @@ */ final class UpdateOrgProjectRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?string $title = null, private readonly ?string $plan = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -42,28 +39,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getTitle(): ?string { return $this->title; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Timezone of the project. - */ + /** + * Timezone of the project. + */ public function getTimezone(): ?string { return $this->timezone; } } - diff --git a/src/Model/UpdateOrgRequest.php b/src/Model/UpdateOrgRequest.php index 59602621f..27a6d6e12 100644 --- a/src/Model/UpdateOrgRequest.php +++ b/src/Model/UpdateOrgRequest.php @@ -13,8 +13,6 @@ */ final class UpdateOrgRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?string $name = null, private readonly ?string $label = null, @@ -24,7 +22,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,4 +68,3 @@ public function getSecurityContact(): ?string return $this->securityContact; } } - diff --git a/src/Model/UpdateOrgSubscriptionRequest.php b/src/Model/UpdateOrgSubscriptionRequest.php index ebd5dbaef..4142c6537 100644 --- a/src/Model/UpdateOrgSubscriptionRequest.php +++ b/src/Model/UpdateOrgSubscriptionRequest.php @@ -13,8 +13,6 @@ */ final class UpdateOrgSubscriptionRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?string $projectTitle = null, private readonly ?string $plan = null, @@ -31,7 +29,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -60,25 +57,25 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; } - /** - * The project plan. - */ + /** + * The project plan. + */ public function getPlan(): ?string { return $this->plan; } - /** - * Timezone of the project. - */ + /** + * Timezone of the project. + */ public function getTimezone(): ?string { return $this->timezone; @@ -129,4 +126,3 @@ public function getProjectSupportLevel(): ?string return $this->projectSupportLevel; } } - diff --git a/src/Model/UpdateProfileRequest.php b/src/Model/UpdateProfileRequest.php index a452cd4e3..8ee749486 100644 --- a/src/Model/UpdateProfileRequest.php +++ b/src/Model/UpdateProfileRequest.php @@ -13,8 +13,6 @@ */ final class UpdateProfileRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?string $displayName = null, private readonly ?string $username = null, @@ -32,7 +30,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -127,4 +124,3 @@ public function getPicture(): ?string return $this->picture; } } - diff --git a/src/Model/UpdateProjectUserAccessRequest.php b/src/Model/UpdateProjectUserAccessRequest.php index 05a60c464..007328e7c 100644 --- a/src/Model/UpdateProjectUserAccessRequest.php +++ b/src/Model/UpdateProjectUserAccessRequest.php @@ -13,7 +13,6 @@ */ final class UpdateProjectUserAccessRequest implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -31,7 +30,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -54,4 +52,3 @@ public function getPermissions(): array return $this->permissions; } } - diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php index ba4620800..dc7d20870 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequest.php @@ -13,8 +13,6 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?array $webapps = [], private readonly ?array $services = [], @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -41,28 +38,27 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue[]|null - */ + /** + * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue[]|null + */ public function getWebapps(): ?array { return $this->webapps; } - /** - * @return UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue[]|null - */ + /** + * @return UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue[]|null + */ public function getServices(): ?array { return $this->services; } - /** - * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue[]|null - */ + /** + * @return UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue[]|null + */ public function getWorkers(): ?array { return $this->workers; } } - diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php index 1209e4b00..d350bcbeb 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue.php @@ -13,8 +13,6 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequestServicesValue implements Model, JsonSerializable { - - public function __construct( private readonly ?int $instanceCount = null, private readonly ?int $disk = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getDisk(): ?int return $this->disk; } } - diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php index 818a9aaf1..67cbb65c2 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue.php @@ -13,8 +13,6 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequestWebappsValue implements Model, JsonSerializable { - - public function __construct( private readonly ?int $instanceCount = null, private readonly ?int $disk = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getDisk(): ?int return $this->disk; } } - diff --git a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php index bd7b943ea..450721b7a 100644 --- a/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php +++ b/src/Model/UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue.php @@ -13,8 +13,6 @@ */ final class UpdateProjectsEnvironmentsDeploymentsNextRequestWorkersValue implements Model, JsonSerializable { - - public function __construct( private readonly ?int $instanceCount = null, private readonly ?int $disk = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getDisk(): ?int return $this->disk; } } - diff --git a/src/Model/UpdateSubscriptionUsageAlertsRequest.php b/src/Model/UpdateSubscriptionUsageAlertsRequest.php index d93236b18..cbea19074 100644 --- a/src/Model/UpdateSubscriptionUsageAlertsRequest.php +++ b/src/Model/UpdateSubscriptionUsageAlertsRequest.php @@ -13,14 +13,11 @@ */ final class UpdateSubscriptionUsageAlertsRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?array $alerts = [], ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return UpdateSubscriptionUsageAlertsRequestAlertsInner[]|null - */ + /** + * @return UpdateSubscriptionUsageAlertsRequestAlertsInner[]|null + */ public function getAlerts(): ?array { return $this->alerts; } } - diff --git a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php index 6d18c6baf..91a467938 100644 --- a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php +++ b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInner.php @@ -13,8 +13,6 @@ */ final class UpdateSubscriptionUsageAlertsRequestAlertsInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?bool $active = null, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getConfig(): ?UpdateSubscriptionUsageAlertsRequestAlertsInnerCon return $this->config; } } - diff --git a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php index b713857e8..ae0eed34e 100644 --- a/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php +++ b/src/Model/UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig.php @@ -13,14 +13,11 @@ */ final class UpdateSubscriptionUsageAlertsRequestAlertsInnerConfig implements Model, JsonSerializable { - - public function __construct( private readonly ?int $threshold = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getThreshold(): ?int return $this->threshold; } } - diff --git a/src/Model/UpdateTeamRequest.php b/src/Model/UpdateTeamRequest.php index 62af545cd..68afbea85 100644 --- a/src/Model/UpdateTeamRequest.php +++ b/src/Model/UpdateTeamRequest.php @@ -13,15 +13,12 @@ */ final class UpdateTeamRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?string $label = null, private readonly ?array $projectPermissions = [], ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getProjectPermissions(): ?array return $this->projectPermissions; } } - diff --git a/src/Model/UpdateTicketRequest.php b/src/Model/UpdateTicketRequest.php index c2d0a6003..506267043 100644 --- a/src/Model/UpdateTicketRequest.php +++ b/src/Model/UpdateTicketRequest.php @@ -13,7 +13,6 @@ */ final class UpdateTicketRequest implements Model, JsonSerializable { - public const STATUS_OPEN = 'open'; public const STATUS_SOLVED = 'solved'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,4 +57,3 @@ public function getCollaboratorsReplace(): ?bool return $this->collaboratorsReplace; } } - diff --git a/src/Model/UpdateUsageAlertsRequest.php b/src/Model/UpdateUsageAlertsRequest.php index 4a822605f..0c21554e9 100644 --- a/src/Model/UpdateUsageAlertsRequest.php +++ b/src/Model/UpdateUsageAlertsRequest.php @@ -13,14 +13,11 @@ */ final class UpdateUsageAlertsRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?array $alerts = [], ) { } - public function getModelName(): string { return self::class; @@ -37,12 +34,11 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return Alert[]|null - */ + /** + * @return Alert[]|null + */ public function getAlerts(): ?array { return $this->alerts; } } - diff --git a/src/Model/UpdateUserRequest.php b/src/Model/UpdateUserRequest.php index c60b7f685..a4183e7dc 100644 --- a/src/Model/UpdateUserRequest.php +++ b/src/Model/UpdateUserRequest.php @@ -13,8 +13,6 @@ */ final class UpdateUserRequest implements Model, JsonSerializable { - - public function __construct( private readonly ?string $username = null, private readonly ?string $firstName = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -85,4 +82,3 @@ public function getCountry(): ?string return $this->country; } } - diff --git a/src/Model/UpstreamConfiguration.php b/src/Model/UpstreamConfiguration.php index ee2ff1c4b..9f0537ea0 100644 --- a/src/Model/UpstreamConfiguration.php +++ b/src/Model/UpstreamConfiguration.php @@ -13,7 +13,6 @@ */ final class UpstreamConfiguration implements Model, JsonSerializable { - public const SOCKET_FAMILY_TCP = 'tcp'; public const SOCKET_FAMILY_UNIX = 'unix'; public const PROTOCOL_FASTCGI = 'fastcgi'; @@ -25,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -54,4 +52,3 @@ public function getProtocol(): ?string return $this->protocol; } } - diff --git a/src/Model/UpstreamRoute.php b/src/Model/UpstreamRoute.php index aa0fc1747..81f5d8ceb 100644 --- a/src/Model/UpstreamRoute.php +++ b/src/Model/UpstreamRoute.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\Route; /** * Low level UpstreamRoute (auto-generated) @@ -14,7 +13,6 @@ */ final class UpstreamRoute implements Model, JsonSerializable, Route { - public const TYPE_PROXY = 'proxy'; public const TYPE_REDIRECT = 'redirect'; public const TYPE_UPSTREAM = 'upstream'; @@ -35,7 +33,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -69,92 +66,91 @@ public function getAttributes(): array return $this->attributes; } - /** - * Route type - */ + /** + * Route type + */ public function getType(): string { return $this->type; } - /** - * TLS settings for the route - */ + /** + * TLS settings for the route + */ public function getTls(): TLSSettings { return $this->tls; } - /** - * The identifier of UpstreamRoute - */ + /** + * The identifier of UpstreamRoute + */ public function getId(): ?string { return $this->id; } - /** - * This route is the primary route of the environment - */ + /** + * This route is the primary route of the environment + */ public function getPrimary(): ?bool { return $this->primary; } - /** - * How this URL route would look on production environment - */ + /** + * How this URL route would look on production environment + */ public function getProductionUrl(): ?string { return $this->productionUrl; } - /** - * Cache configuration - */ + /** + * Cache configuration + */ public function getCache(): ?CacheConfiguration { return $this->cache; } - /** - * Server-Side Include configuration - */ + /** + * Server-Side Include configuration + */ public function getSsi(): ?SSIConfiguration { return $this->ssi; } - /** - * The upstream to use for this route - */ + /** + * The upstream to use for this route + */ public function getUpstream(): ?string { return $this->upstream; } - /** - * The configuration of the redirects - */ + /** + * The configuration of the redirects + */ public function getRedirects(): ?RedirectConfiguration { return $this->redirects; } - /** - * Sticky routing configuration - */ + /** + * Sticky routing configuration + */ public function getSticky(): ?StickyConfiguration { return $this->sticky; } - /** - * The destination of the proxy - */ + /** + * The destination of the proxy + */ public function getTo(): ?string { return $this->to; } } - diff --git a/src/Model/Usage.php b/src/Model/Usage.php index eed490fc6..43dc4b7fa 100644 --- a/src/Model/Usage.php +++ b/src/Model/Usage.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -14,18 +15,15 @@ */ final class Usage implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $subscriptionId = null, private readonly ?string $usageGroup = null, private readonly ?float $quantity = null, - private readonly ?\DateTime $start = null, + private readonly ?DateTime $start = null, ) { } - public function getModelName(): string { return self::class; @@ -47,44 +45,43 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The unique ID of the usage record. - */ + /** + * The unique ID of the usage record. + */ public function getId(): ?string { return $this->id; } - /** - * The ID of the subscription. - */ + /** + * The ID of the subscription. + */ public function getSubscriptionId(): ?string { return $this->subscriptionId; } - /** - * The type of usage that this record represents. - */ + /** + * The type of usage that this record represents. + */ public function getUsageGroup(): ?string { return $this->usageGroup; } - /** - * The quantity used. - */ + /** + * The quantity used. + */ public function getQuantity(): ?float { return $this->quantity; } - /** - * The start timestamp of this usage record (ISO 8601). - */ - public function getStart(): ?\DateTime + /** + * The start timestamp of this usage record (ISO 8601). + */ + public function getStart(): ?DateTime { return $this->start; } } - diff --git a/src/Model/UsageAlert.php b/src/Model/UsageAlert.php index ebc8b0a21..93276c8ce 100644 --- a/src/Model/UsageAlert.php +++ b/src/Model/UsageAlert.php @@ -14,8 +14,6 @@ */ final class UsageAlert implements Model, JsonSerializable { - - public function __construct( private readonly ?string $lastAlertAt = null, private readonly ?string $updatedAt = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -49,52 +46,51 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Tidentifier of the alert. - */ + /** + * Tidentifier of the alert. + */ public function getId(): ?string { return $this->id; } - /** - * Whether the usage alert is activated. - */ + /** + * Whether the usage alert is activated. + */ public function getActive(): ?bool { return $this->active; } - /** - * Number of alerts sent. - */ + /** + * Number of alerts sent. + */ public function getAlertsSent(): ?float { return $this->alertsSent; } - /** - * The datetime the alert was last sent. - */ + /** + * The datetime the alert was last sent. + */ public function getLastAlertAt(): ?string { return $this->lastAlertAt; } - /** - * The datetime the alert was last updated. - */ + /** + * The datetime the alert was last updated. + */ public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * Configuration for the usage alert. - */ + /** + * Configuration for the usage alert. + */ public function getConfig(): ?UsageAlertConfig { return $this->config; } } - diff --git a/src/Model/UsageAlertConfig.php b/src/Model/UsageAlertConfig.php index b11e49409..ce4fc52d3 100644 --- a/src/Model/UsageAlertConfig.php +++ b/src/Model/UsageAlertConfig.php @@ -14,14 +14,11 @@ */ final class UsageAlertConfig implements Model, JsonSerializable { - - public function __construct( private readonly ?UsageAlertConfigThreshold $threshold = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Data regarding threshold spend. - */ + /** + * Data regarding threshold spend. + */ public function getThreshold(): ?UsageAlertConfigThreshold { return $this->threshold; } } - diff --git a/src/Model/UsageAlertConfigThreshold.php b/src/Model/UsageAlertConfigThreshold.php index 84cf1bfe2..c38acb37f 100644 --- a/src/Model/UsageAlertConfigThreshold.php +++ b/src/Model/UsageAlertConfigThreshold.php @@ -14,8 +14,6 @@ */ final class UsageAlertConfigThreshold implements Model, JsonSerializable { - - public function __construct( private readonly ?string $formatted = null, private readonly ?float $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -43,28 +40,27 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Formatted threshold value. - */ + /** + * Formatted threshold value. + */ public function getFormatted(): ?string { return $this->formatted; } - /** - * Threshold value. - */ + /** + * Threshold value. + */ public function getAmount(): ?float { return $this->amount; } - /** - * Threshold unit. - */ + /** + * Threshold unit. + */ public function getUnit(): ?string { return $this->unit; } } - diff --git a/src/Model/UsageGroupCurrentUsageProperties.php b/src/Model/UsageGroupCurrentUsageProperties.php index 1544d4fe8..42e318eac 100644 --- a/src/Model/UsageGroupCurrentUsageProperties.php +++ b/src/Model/UsageGroupCurrentUsageProperties.php @@ -14,8 +14,6 @@ */ final class UsageGroupCurrentUsageProperties implements Model, JsonSerializable { - - public function __construct( private readonly ?string $title = null, private readonly ?bool $type = null, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -55,76 +52,75 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The title of the usage group. - */ + /** + * The title of the usage group. + */ public function getTitle(): ?string { return $this->title; } - /** - * The usage group type. - */ + /** + * The usage group type. + */ public function getType(): ?bool { return $this->type; } - /** - * The value of current usage for the group. - */ + /** + * The value of current usage for the group. + */ public function getCurrentUsage(): ?float { return $this->currentUsage; } - /** - * The formatted value of current usage for the group. - */ + /** + * The formatted value of current usage for the group. + */ public function getCurrentUsageFormatted(): ?string { return $this->currentUsageFormatted; } - /** - * Whether the group is not charged for the subscription. - */ + /** + * Whether the group is not charged for the subscription. + */ public function getNotCharged(): ?bool { return $this->notCharged; } - /** - * The amount of free usage for the group. - */ + /** + * The amount of free usage for the group. + */ public function getFreeQuantity(): ?float { return $this->freeQuantity; } - /** - * The formatted amount of free usage for the group. - */ + /** + * The formatted amount of free usage for the group. + */ public function getFreeQuantityFormatted(): ?string { return $this->freeQuantityFormatted; } - /** - * The daily average usage calculated for the group. - */ + /** + * The daily average usage calculated for the group. + */ public function getDailyAverage(): ?float { return $this->dailyAverage; } - /** - * The formatted daily average usage calculated for the group. - */ + /** + * The formatted daily average usage calculated for the group. + */ public function getDailyAverageFormatted(): ?string { return $this->dailyAverageFormatted; } } - diff --git a/src/Model/User.php b/src/Model/User.php index cad5f53bc..0ef7ff429 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class User implements Model, JsonSerializable { - public const CONSENT_METHOD_OPT_IN = 'opt-in'; public const CONSENT_METHOD_TEXT_REF = 'text-ref'; @@ -30,14 +30,13 @@ public function __construct( private readonly string $company, private readonly string $website, private readonly string $country, - private readonly \DateTime $createdAt, - private readonly \DateTime $updatedAt, - private readonly ?\DateTime $consentedAt = null, + private readonly DateTime $createdAt, + private readonly DateTime $updatedAt, + private readonly ?DateTime $consentedAt = null, private readonly ?string $consentMethod = null, ) { } - public function getModelName(): string { return self::class; @@ -70,132 +69,131 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): string { return $this->id; } - /** - * Whether the user has been deactivated. - */ + /** + * Whether the user has been deactivated. + */ public function getDeactivated(): bool { return $this->deactivated; } - /** - * The namespace in which the user's username is unique. - */ + /** + * The namespace in which the user's username is unique. + */ public function getNamespace(): string { return $this->namespace; } - /** - * The user's username. - */ + /** + * The user's username. + */ public function getUsername(): string { return $this->username; } - /** - * The user's email address. - */ + /** + * The user's email address. + */ public function getEmail(): string { return $this->email; } - /** - * Whether the user's email address has been verified. - */ + /** + * Whether the user's email address has been verified. + */ public function getEmailVerified(): bool { return $this->emailVerified; } - /** - * The user's first name. - */ + /** + * The user's first name. + */ public function getFirstName(): string { return $this->firstName; } - /** - * The user's last name. - */ + /** + * The user's last name. + */ public function getLastName(): string { return $this->lastName; } - /** - * The user's picture. - */ + /** + * The user's picture. + */ public function getPicture(): string { return $this->picture; } - /** - * The user's company. - */ + /** + * The user's company. + */ public function getCompany(): string { return $this->company; } - /** - * The user's website. - */ + /** + * The user's website. + */ public function getWebsite(): string { return $this->website; } - /** - * The user's ISO 3166-1 alpha-2 country code. - */ + /** + * The user's ISO 3166-1 alpha-2 country code. + */ public function getCountry(): string { return $this->country; } - /** - * The date and time when the user was created. - */ - public function getCreatedAt(): \DateTime + /** + * The date and time when the user was created. + */ + public function getCreatedAt(): DateTime { return $this->createdAt; } - /** - * The date and time when the user was last updated. - */ - public function getUpdatedAt(): \DateTime + /** + * The date and time when the user was last updated. + */ + public function getUpdatedAt(): DateTime { return $this->updatedAt; } - /** - * The date and time when the user consented to the Terms of Service. - */ - public function getConsentedAt(): ?\DateTime + /** + * The date and time when the user consented to the Terms of Service. + */ + public function getConsentedAt(): ?DateTime { return $this->consentedAt; } - /** - * The method by which the user consented to the Terms of Service. - */ + /** + * The method by which the user consented to the Terms of Service. + */ public function getConsentMethod(): ?string { return $this->consentMethod; } } - diff --git a/src/Model/UserProjectAccess.php b/src/Model/UserProjectAccess.php index 825907a98..a8ab651c6 100644 --- a/src/Model/UserProjectAccess.php +++ b/src/Model/UserProjectAccess.php @@ -2,6 +2,7 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; /** @@ -13,7 +14,6 @@ */ final class UserProjectAccess implements Model, JsonSerializable { - public const PERMISSIONS_ADMIN = 'admin'; public const PERMISSIONS_VIEWER = 'viewer'; public const PERMISSIONS_DEVELOPMENT_ADMIN = 'development:admin'; @@ -32,13 +32,12 @@ public function __construct( private readonly ?string $projectId = null, private readonly ?string $projectTitle = null, private readonly ?array $permissions = [], - private readonly ?\DateTime $grantedAt = null, - private readonly ?\DateTime $updatedAt = null, + private readonly ?DateTime $grantedAt = null, + private readonly ?DateTime $updatedAt = null, private readonly ?TeamProjectAccessLinks $links = null, ) { } - public function getModelName(): string { return self::class; @@ -63,33 +62,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getUserId(): ?string { return $this->userId; } - /** - * The ID of the organization. - */ + /** + * The ID of the organization. + */ public function getOrganizationId(): ?string { return $this->organizationId; } - /** - * The ID of the project. - */ + /** + * The ID of the project. + */ public function getProjectId(): ?string { return $this->projectId; } - /** - * The title of the project. - */ + /** + * The title of the project. + */ public function getProjectTitle(): ?string { return $this->projectTitle; @@ -100,18 +99,18 @@ public function getPermissions(): ?array return $this->permissions; } - /** - * The date and time when the access was granted. - */ - public function getGrantedAt(): ?\DateTime + /** + * The date and time when the access was granted. + */ + public function getGrantedAt(): ?DateTime { return $this->grantedAt; } - /** - * The date and time when the resource was last updated. - */ - public function getUpdatedAt(): ?\DateTime + /** + * The date and time when the resource was last updated. + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } @@ -121,4 +120,3 @@ public function getLinks(): ?TeamProjectAccessLinks return $this->links; } } - diff --git a/src/Model/UserReference.php b/src/Model/UserReference.php index c3ba1d592..66eb5773c 100644 --- a/src/Model/UserReference.php +++ b/src/Model/UserReference.php @@ -14,8 +14,6 @@ */ final class UserReference implements Model, JsonSerializable { - - public function __construct( private readonly ?string $id = null, private readonly ?string $username = null, @@ -28,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,69 +50,68 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The ID of the user. - */ + /** + * The ID of the user. + */ public function getId(): ?string { return $this->id; } - /** - * The user's username. - */ + /** + * The user's username. + */ public function getUsername(): ?string { return $this->username; } - /** - * The user's email address. - */ + /** + * The user's email address. + */ public function getEmail(): ?string { return $this->email; } - /** - * The user's first name. - */ + /** + * The user's first name. + */ public function getFirstName(): ?string { return $this->firstName; } - /** - * The user's last name. - */ + /** + * The user's last name. + */ public function getLastName(): ?string { return $this->lastName; } - /** - * The user's picture. - */ + /** + * The user's picture. + */ public function getPicture(): ?string { return $this->picture; } - /** - * Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a - * mandatory SSO provider that itself supports MFA (see "sso_enabled\"). - */ + /** + * Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a + * mandatory SSO provider that itself supports MFA (see "sso_enabled\"). + */ public function getMfaEnabled(): ?bool { return $this->mfaEnabled; } - /** - * Whether the user is linked to a mandatory SSO provider. - */ + /** + * Whether the user is linked to a mandatory SSO provider. + */ public function getSsoEnabled(): ?bool { return $this->ssoEnabled; } } - diff --git a/src/Model/VPNConfiguration.php b/src/Model/VPNConfiguration.php index 545602d76..676a1b63a 100644 --- a/src/Model/VPNConfiguration.php +++ b/src/Model/VPNConfiguration.php @@ -14,7 +14,6 @@ */ final class VPNConfiguration implements Model, JsonSerializable { - public const VERSION_NUMBER_1 = 1; public const VERSION_NUMBER_2 = 2; public const AGGRESSIVE_NO = 'no'; @@ -40,7 +39,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -71,33 +69,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The IKE version to use (1 or 2) - */ + /** + * The IKE version to use (1 or 2) + */ public function getVersion(): int { return $this->version; } - /** - * Whether to use IKEv1 Aggressive or Main Mode - */ + /** + * Whether to use IKEv1 Aggressive or Main Mode + */ public function getAggressive(): string { return $this->aggressive; } - /** - * Defines which mode is used to assign a virtual IP (must be the same on both sides) - */ + /** + * Defines which mode is used to assign a virtual IP (must be the same on both sides) + */ public function getModeconfig(): string { return $this->modeconfig; } - /** - * The authentication scheme - */ + /** + * The authentication scheme + */ public function getAuthentication(): string { return $this->authentication; @@ -108,25 +106,25 @@ public function getGatewayIp(): string return $this->gatewayIp; } - /** - * The identity of the ipsec participant - */ + /** + * The identity of the ipsec participant + */ public function getIdentity(): ?string { return $this->identity; } - /** - * The second identity of the ipsec participant - */ + /** + * The second identity of the ipsec participant + */ public function getSecondIdentity(): ?string { return $this->secondIdentity; } - /** - * The identity of the remote ipsec participant - */ + /** + * The identity of the remote ipsec participant + */ public function getRemoteIdentity(): ?string { return $this->remoteIdentity; @@ -137,44 +135,43 @@ public function getRemoteSubnets(): array return $this->remoteSubnets; } - /** - * The IKE algorithms to negotiate for this VPN connection. - */ + /** + * The IKE algorithms to negotiate for this VPN connection. + */ public function getIke(): string { return $this->ike; } - /** - * The ESP algorithms to negotiate for this VPN connection. - */ + /** + * The ESP algorithms to negotiate for this VPN connection. + */ public function getEsp(): string { return $this->esp; } - /** - * The lifetime of the IKE exchange. - */ + /** + * The lifetime of the IKE exchange. + */ public function getIkelifetime(): string { return $this->ikelifetime; } - /** - * The lifetime of the ESP exchange. - */ + /** + * The lifetime of the ESP exchange. + */ public function getLifetime(): string { return $this->lifetime; } - /** - * The margin time for re-keying. - */ + /** + * The margin time for re-keying. + */ public function getMargintime(): string { return $this->margintime; } } - diff --git a/src/Model/VerifyPhoneNumber200Response.php b/src/Model/VerifyPhoneNumber200Response.php index bd5ee581a..2ed759b17 100644 --- a/src/Model/VerifyPhoneNumber200Response.php +++ b/src/Model/VerifyPhoneNumber200Response.php @@ -13,14 +13,11 @@ */ final class VerifyPhoneNumber200Response implements Model, JsonSerializable { - - public function __construct( private readonly ?string $sid = null, ) { } - public function getModelName(): string { return self::class; @@ -43,4 +40,3 @@ public function getSid(): ?string return $this->sid; } } - diff --git a/src/Model/VerifyPhoneNumberRequest.php b/src/Model/VerifyPhoneNumberRequest.php index db366c3f1..f016f86fc 100644 --- a/src/Model/VerifyPhoneNumberRequest.php +++ b/src/Model/VerifyPhoneNumberRequest.php @@ -13,7 +13,6 @@ */ final class VerifyPhoneNumberRequest implements Model, JsonSerializable { - public const CHANNEL_SMS = 'sms'; public const CHANNEL_WHATSAPP = 'whatsapp'; public const CHANNEL_CALL = 'call'; @@ -24,7 +23,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -53,4 +51,3 @@ public function getPhoneNumber(): string return $this->phoneNumber; } } - diff --git a/src/Model/Vouchers.php b/src/Model/Vouchers.php index 78b7f8582..31bc94ab1 100644 --- a/src/Model/Vouchers.php +++ b/src/Model/Vouchers.php @@ -13,8 +13,6 @@ */ final class Vouchers implements Model, JsonSerializable { - - public function __construct( private readonly ?string $uuid = null, private readonly ?string $vouchersTotal = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -50,50 +47,50 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The uuid of the user. - */ + /** + * The uuid of the user. + */ public function getUuid(): ?string { return $this->uuid; } - /** - * The total voucher credit given to the user. - */ + /** + * The total voucher credit given to the user. + */ public function getVouchersTotal(): ?string { return $this->vouchersTotal; } - /** - * The part of total voucher credit applied to orders. - */ + /** + * The part of total voucher credit applied to orders. + */ public function getVouchersApplied(): ?string { return $this->vouchersApplied; } - /** - * The remaining voucher credit, available for future orders. - */ + /** + * The remaining voucher credit, available for future orders. + */ public function getVouchersRemainingBalance(): ?string { return $this->vouchersRemainingBalance; } - /** - * The currency of the vouchers. - */ + /** + * The currency of the vouchers. + */ public function getCurrency(): ?string { return $this->currency; } - /** - * Array of vouchers. - * @return VouchersVouchersInner[]|null - */ + /** + * Array of vouchers. + * @return VouchersVouchersInner[]|null + */ public function getVouchers(): ?array { return $this->vouchers; @@ -104,4 +101,3 @@ public function getLinks(): ?VouchersLinks return $this->links; } } - diff --git a/src/Model/VouchersLinks.php b/src/Model/VouchersLinks.php index 7db3bc143..e54f53984 100644 --- a/src/Model/VouchersLinks.php +++ b/src/Model/VouchersLinks.php @@ -13,14 +13,11 @@ */ final class VouchersLinks implements Model, JsonSerializable { - - public function __construct( private readonly ?VouchersLinksSelf $self = null, ) { } - public function getModelName(): string { return self::class; @@ -38,12 +35,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * Link to the current resource. - */ + /** + * Link to the current resource. + */ public function getSelf(): ?VouchersLinksSelf { return $this->self; } } - diff --git a/src/Model/VouchersLinksSelf.php b/src/Model/VouchersLinksSelf.php index 9c7b9e8e6..f7c5a8daa 100644 --- a/src/Model/VouchersLinksSelf.php +++ b/src/Model/VouchersLinksSelf.php @@ -14,14 +14,11 @@ */ final class VouchersLinksSelf implements Model, JsonSerializable { - - public function __construct( private readonly ?string $href = null, ) { } - public function getModelName(): string { return self::class; @@ -39,12 +36,11 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * URL of the link. - */ + /** + * URL of the link. + */ public function getHref(): ?string { return $this->href; } } - diff --git a/src/Model/VouchersVouchersInner.php b/src/Model/VouchersVouchersInner.php index 4a2187694..e00168f08 100644 --- a/src/Model/VouchersVouchersInner.php +++ b/src/Model/VouchersVouchersInner.php @@ -13,8 +13,6 @@ */ final class VouchersVouchersInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $code = null, private readonly ?string $amount = null, @@ -23,7 +21,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -59,12 +56,11 @@ public function getCurrency(): ?string return $this->currency; } - /** - * @return VouchersVouchersInnerOrdersInner[]|null - */ + /** + * @return VouchersVouchersInnerOrdersInner[]|null + */ public function getOrders(): ?array { return $this->orders; } } - diff --git a/src/Model/VouchersVouchersInnerOrdersInner.php b/src/Model/VouchersVouchersInnerOrdersInner.php index 364efd72a..21e7295e2 100644 --- a/src/Model/VouchersVouchersInnerOrdersInner.php +++ b/src/Model/VouchersVouchersInnerOrdersInner.php @@ -13,8 +13,6 @@ */ final class VouchersVouchersInnerOrdersInner implements Model, JsonSerializable { - - public function __construct( private readonly ?string $orderId = null, private readonly ?string $status = null, @@ -26,7 +24,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -85,4 +82,3 @@ public function getCurrency(): ?string return $this->currency; } } - diff --git a/src/Model/WebApplicationsValue.php b/src/Model/WebApplicationsValue.php index 19b277553..5ee65bce2 100644 --- a/src/Model/WebApplicationsValue.php +++ b/src/Model/WebApplicationsValue.php @@ -13,7 +13,6 @@ */ final class WebApplicationsValue implements Model, JsonSerializable { - public const SIZE__2_XL = '2XL'; public const SIZE__4_XL = '4XL'; public const SIZE_AUTO = 'AUTO'; @@ -63,7 +62,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -133,17 +131,17 @@ public function getAccess(): array return $this->access; } - /** - * @return AuthorizationsInner[] - */ + /** + * @return AuthorizationsInner[] + */ public function getAuthorizations(): array { return $this->authorizations; } - /** - * @return ServiceRelationshipsValue[] - */ + /** + * @return ServiceRelationshipsValue[] + */ public function getRelationships(): array { return $this->relationships; @@ -154,9 +152,9 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * @return MountsValue[] - */ + /** + * @return MountsValue[] + */ public function getMounts(): array { return $this->mounts; @@ -182,9 +180,9 @@ public function getContainerProfile(): ?string return $this->containerProfile; } - /** - * @return OperationsValue[] - */ + /** + * @return OperationsValue[] + */ public function getOperations(): array { return $this->operations; @@ -235,9 +233,9 @@ public function getHooks(): Hooks return $this->hooks; } - /** - * @return CronsValue[] - */ + /** + * @return CronsValue[] + */ public function getCrons(): array { return $this->crons; @@ -293,4 +291,3 @@ public function getSupportsHorizontalScaling(): bool return $this->supportsHorizontalScaling; } } - diff --git a/src/Model/WebApplicationsValue1.php b/src/Model/WebApplicationsValue1.php index b8c123e77..50fcc5028 100644 --- a/src/Model/WebApplicationsValue1.php +++ b/src/Model/WebApplicationsValue1.php @@ -13,8 +13,6 @@ */ final class WebApplicationsValue1 implements Model, JsonSerializable { - - public function __construct( private readonly ?Resources3 $resources, private readonly ?int $instanceCount, @@ -22,7 +20,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -57,4 +54,3 @@ public function getDisk(): ?int return $this->disk; } } - diff --git a/src/Model/WebConfiguration.php b/src/Model/WebConfiguration.php index 3ac09e2ec..f65b602e5 100644 --- a/src/Model/WebConfiguration.php +++ b/src/Model/WebConfiguration.php @@ -13,8 +13,6 @@ */ final class WebConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly array $locations, private readonly bool $moveToRoot, @@ -29,7 +27,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -55,9 +52,9 @@ public function __toString(): string { return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * @return WebLocationsValue[] - */ + /** + * @return WebLocationsValue[] + */ public function getLocations(): array { return $this->locations; @@ -108,4 +105,3 @@ public function getExpires(): ?string return $this->expires; } } - diff --git a/src/Model/WebHookIntegration.php b/src/Model/WebHookIntegration.php index 0b775e47f..354847343 100644 --- a/src/Model/WebHookIntegration.php +++ b/src/Model/WebHookIntegration.php @@ -2,8 +2,8 @@ namespace Upsun\Model; +use DateTime; use JsonSerializable; -use Upsun\Model\Integration; /** * Low level WebHookIntegration (auto-generated) @@ -14,7 +14,6 @@ */ final class WebHookIntegration implements Model, JsonSerializable, Integration { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -28,14 +27,13 @@ public function __construct( private readonly array $states, private readonly string $result, private readonly string $url, - private readonly ?\DateTime $createdAt, - private readonly ?\DateTime $updatedAt, + private readonly ?DateTime $createdAt, + private readonly ?DateTime $updatedAt, private readonly ?string $sharedKey, private readonly ?string $id = null, ) { } - public function getModelName(): string { return self::class; @@ -64,33 +62,33 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The creation date - */ - public function getCreatedAt(): ?\DateTime + /** + * The creation date + */ + public function getCreatedAt(): ?DateTime { return $this->createdAt; } - /** - * The update date - */ - public function getUpdatedAt(): ?\DateTime + /** + * The update date + */ + public function getUpdatedAt(): ?DateTime { return $this->updatedAt; } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The role of the integration - */ + /** + * The role of the integration + */ public function getRole(): string { return $this->role; @@ -116,36 +114,35 @@ public function getStates(): array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): string { return $this->result; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; } - /** - * The identifier of WebHookIntegration - */ + /** + * The identifier of WebHookIntegration + */ public function getId(): ?string { return $this->id; } } - diff --git a/src/Model/WebHookIntegrationCreateInput.php b/src/Model/WebHookIntegrationCreateInput.php index 513bdb1de..470e8e158 100644 --- a/src/Model/WebHookIntegrationCreateInput.php +++ b/src/Model/WebHookIntegrationCreateInput.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationCreateCreateInput; /** * Low level WebHookIntegrationCreateInput (auto-generated) @@ -14,7 +13,6 @@ */ final class WebHookIntegrationCreateInput implements Model, JsonSerializable, IntegrationCreateCreateInput { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -31,7 +29,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,17 +53,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; @@ -92,20 +89,19 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } - diff --git a/src/Model/WebHookIntegrationPatch.php b/src/Model/WebHookIntegrationPatch.php index 0551b5869..563a0d14b 100644 --- a/src/Model/WebHookIntegrationPatch.php +++ b/src/Model/WebHookIntegrationPatch.php @@ -3,7 +3,6 @@ namespace Upsun\Model; use JsonSerializable; -use Upsun\Model\IntegrationPatch; /** * Low level WebHookIntegrationPatch (auto-generated) @@ -14,7 +13,6 @@ */ final class WebHookIntegrationPatch implements Model, JsonSerializable, IntegrationPatch { - public const RESULT_STAR = '*'; public const RESULT_FAILURE = 'failure'; public const RESULT_SUCCESS = 'success'; @@ -31,7 +29,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -56,17 +53,17 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The type of the integration - */ + /** + * The type of the integration + */ public function getType(): string { return $this->type; } - /** - * The URL of the webhook - */ + /** + * The URL of the webhook + */ public function getUrl(): string { return $this->url; @@ -92,20 +89,19 @@ public function getStates(): ?array return $this->states; } - /** - * Result to execute the hook on - */ + /** + * Result to execute the hook on + */ public function getResult(): ?string { return $this->result; } - /** - * The JWS shared secret key - */ + /** + * The JWS shared secret key + */ public function getSharedKey(): ?string { return $this->sharedKey; } } - diff --git a/src/Model/WebLocationsValue.php b/src/Model/WebLocationsValue.php index 951bf1c17..a2d1adce8 100644 --- a/src/Model/WebLocationsValue.php +++ b/src/Model/WebLocationsValue.php @@ -13,8 +13,6 @@ */ final class WebLocationsValue implements Model, JsonSerializable { - - public function __construct( private readonly string $expires, private readonly string $passthru, @@ -28,7 +26,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -84,9 +81,9 @@ public function getHeaders(): array return $this->headers; } - /** - * @return SpecificOverridesValue[] - */ + /** + * @return SpecificOverridesValue[] + */ public function getRules(): array { return $this->rules; @@ -102,4 +99,3 @@ public function getRequestBuffering(): ?RequestBuffering return $this->requestBuffering; } } - diff --git a/src/Model/Webhook.php b/src/Model/Webhook.php index 6c5495839..476fc5f8a 100644 --- a/src/Model/Webhook.php +++ b/src/Model/Webhook.php @@ -14,15 +14,12 @@ */ final class Webhook implements Model, JsonSerializable { - - public function __construct( private readonly ?bool $enabled = null, private readonly ?string $role = null, ) { } - public function getModelName(): string { return self::class; @@ -41,20 +38,19 @@ public function __toString(): string return json_encode($this->jsonSerialize(), JSON_PRETTY_PRINT); } - /** - * The integration is enabled. - */ + /** + * The integration is enabled. + */ public function getEnabled(): ?bool { return $this->enabled; } - /** - * Minimum required role for creating the integration. - */ + /** + * Minimum required role for creating the integration. + */ public function getRole(): ?string { return $this->role; } } - diff --git a/src/Model/WorkerConfiguration.php b/src/Model/WorkerConfiguration.php index f3b07b469..8d7246190 100644 --- a/src/Model/WorkerConfiguration.php +++ b/src/Model/WorkerConfiguration.php @@ -13,15 +13,12 @@ */ final class WorkerConfiguration implements Model, JsonSerializable { - - public function __construct( private readonly Commands2 $commands, private readonly ?int $disk = null, ) { } - public function getModelName(): string { return self::class; @@ -50,4 +47,3 @@ public function getDisk(): ?int return $this->disk; } } - diff --git a/src/Model/WorkersValue.php b/src/Model/WorkersValue.php index 9beae4f23..8e869b9fb 100644 --- a/src/Model/WorkersValue.php +++ b/src/Model/WorkersValue.php @@ -13,7 +13,6 @@ */ final class WorkersValue implements Model, JsonSerializable { - public const SIZE__2_XL = '2XL'; public const SIZE__4_XL = '4XL'; public const SIZE_AUTO = 'AUTO'; @@ -57,7 +56,6 @@ public function __construct( ) { } - public function getModelName(): string { return self::class; @@ -121,17 +119,17 @@ public function getAccess(): array return $this->access; } - /** - * @return AuthorizationsInner[] - */ + /** + * @return AuthorizationsInner[] + */ public function getAuthorizations(): array { return $this->authorizations; } - /** - * @return ServiceRelationshipsValue[] - */ + /** + * @return ServiceRelationshipsValue[] + */ public function getRelationships(): array { return $this->relationships; @@ -142,9 +140,9 @@ public function getAdditionalHosts(): array return $this->additionalHosts; } - /** - * @return MountsValue[] - */ + /** + * @return MountsValue[] + */ public function getMounts(): array { return $this->mounts; @@ -170,9 +168,9 @@ public function getContainerProfile(): ?string return $this->containerProfile; } - /** - * @return OperationsValue[] - */ + /** + * @return OperationsValue[] + */ public function getOperations(): array { return $this->operations; @@ -248,4 +246,3 @@ public function getSupportsHorizontalScaling(): bool return $this->supportsHorizontalScaling; } } - From edb31bbf24392a76b0f374f6df1e7d8eac26be64 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 12:07:26 +0200 Subject: [PATCH 05/13] test(oauth2): add AbstractApiTest (401 retry) and OAuthProvider edge-case tests, expand coverage to AbstractApi --- phpunit.xml | 1 + tests/Api/AbstractApiTest.php | 297 +++++++++++++++++++++++++++++++ tests/Core/OAuthProviderTest.php | 221 +++++++++++++++++++++++ 3 files changed, 519 insertions(+) create mode 100644 tests/Api/AbstractApiTest.php diff --git a/phpunit.xml b/phpunit.xml index 03fff2705..9b903c69f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,6 +16,7 @@ src/Core + src/Api/AbstractApi.php diff --git a/tests/Api/AbstractApiTest.php b/tests/Api/AbstractApiTest.php new file mode 100644 index 000000000..db203e779 --- /dev/null +++ b/tests/Api/AbstractApiTest.php @@ -0,0 +1,297 @@ +httpClient = $this->createMock(ClientInterface::class); + $this->oauthProvider = $this->createMock(OAuthProvider::class); + $this->psr17Factory = new Psr17Factory(); + + // Stub getAuthorization() so createAuthenticatedRequest() never hits the network + $this->oauthProvider + ->method('getAuthorization') + ->willReturn('Bearer test-token'); + + $this->api = new class ( + $this->oauthProvider, + $this->httpClient, + $this->psr17Factory, + 'https://api.upsun.com', + $this->psr17Factory, + ) extends AbstractApi { + /** + * Expose the protected method publicly for testing. + * + * @throws ApiException + * @throws Exception + */ + public function callSendAuthenticatedRequest( + string $method, + string $uri, + array $headers = [], + string|StreamInterface|null $body = null + ): ResponseInterface { + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body); + } + + /** + * Expose refreshToken() publicly for testing. + * + * @throws Exception + */ + public function callRefreshToken(): void + { + $this->refreshToken(); + } + }; + } + + /** + * FIX 1 — 200 response is returned as-is (no retry). + * + * @throws Exception + */ + public function testSendAuthenticatedRequestReturns200(): void + { + $expectedResponse = new Response(200, ['Content-Type' => 'application/json'], '{"ok":true}'); + + $this->httpClient + ->expects($this->once()) + ->method('sendRequest') + ->willReturn($expectedResponse); + + $response = $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + + $this->assertSame(200, $response->getStatusCode()); + } + + /** + * FIX 1 — On 401, forceRefresh() is called and the request is retried exactly once. + * If the retry succeeds (200), the successful response is returned. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestRetries401WithForceRefresh(): void + { + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(401, [], 'Unauthorized'), + new Response(200, ['Content-Type' => 'application/json'], '{"ok":true}'), + ); + + $this->oauthProvider + ->expects($this->once()) + ->method('forceRefresh'); + + $response = $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + + $this->assertSame(200, $response->getStatusCode()); + } + + /** + * FIX 1 — On 401, retry is attempted. If retry also returns 401, ApiException is thrown. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestThrowsApiExceptionIfRetryAlso401(): void + { + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnOnConsecutiveCalls( + new Response(401, [], 'Unauthorized'), + new Response(401, [], 'Unauthorized'), + ); + + $this->oauthProvider + ->expects($this->once()) + ->method('forceRefresh'); + + $this->expectException(ApiException::class); + + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + } + + /** + * FIX 1 — Non-401 4xx/5xx errors throw ApiException immediately without retry. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestThrowsApiExceptionOn403WithoutRetry(): void + { + $this->httpClient + ->expects($this->once()) // Only one request — no retry for non-401 + ->method('sendRequest') + ->willReturn(new Response(403, [], 'Forbidden')); + + $this->oauthProvider + ->expects($this->never()) + ->method('forceRefresh'); + + $this->expectException(ApiException::class); + + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + } + + /** + * FIX 1 — 500 errors throw ApiException immediately without retry. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestThrowsApiExceptionOn500WithoutRetry(): void + { + $this->httpClient + ->expects($this->once()) + ->method('sendRequest') + ->willReturn(new Response(500, [], 'Internal Server Error')); + + $this->oauthProvider + ->expects($this->never()) + ->method('forceRefresh'); + + $this->expectException(ApiException::class); + + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + } + + /** + * FIX 1 — ClientExceptionInterface (network failure) is wrapped in ApiException. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestWrapsClientException(): void + { + $networkError = new class ('Connection refused') extends Exception implements ClientExceptionInterface { + }; + + $this->httpClient + ->method('sendRequest') + ->willThrowException($networkError); + + $this->expectException(ApiException::class); + + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + } + + /** + * Authorization header is set from OAuthProvider::getAuthorization(). + * + * @throws Exception + */ + public function testSendAuthenticatedRequestSetsAuthorizationHeader(): void + { + $capturedRequest = null; + + $this->httpClient + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use (&$capturedRequest) { + $capturedRequest = $request; + return new Response(200, [], '{}'); + }); + + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + + $this->assertNotNull($capturedRequest); + $this->assertEquals('Bearer test-token', $capturedRequest->getHeaderLine('Authorization')); + } + + /** + * refreshToken() delegates to OAuthProvider::ensureValidToken(). + * + * @throws Exception + */ + public function testRefreshTokenCallsEnsureValidToken(): void + { + $this->oauthProvider + ->expects($this->once()) + ->method('ensureValidToken'); + + $this->api->callRefreshToken(); + } + + /** + * Extra custom headers are forwarded in the request. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestForwardsCustomHeaders(): void + { + $capturedRequest = null; + + $this->httpClient + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use (&$capturedRequest) { + $capturedRequest = $request; + return new Response(200, [], '{}'); + }); + + $this->api->callSendAuthenticatedRequest( + 'POST', + '/v1/projects', + ['X-Custom-Header' => 'custom-value', 'Content-Type' => 'application/json'], + '{"title":"test"}' + ); + + $this->assertNotNull($capturedRequest); + $this->assertEquals('custom-value', $capturedRequest->getHeaderLine('X-Custom-Header')); + $this->assertStringContainsString('application/json', $capturedRequest->getHeaderLine('Content-Type')); + } + + /** + * Body is sent with the request. + * + * @throws Exception + */ + public function testSendAuthenticatedRequestSendsBody(): void + { + $capturedRequest = null; + + $this->httpClient + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use (&$capturedRequest) { + $capturedRequest = $request; + return new Response(200, [], '{}'); + }); + + $this->api->callSendAuthenticatedRequest('POST', '/v1/projects', [], '{"title":"my-project"}'); + + $this->assertNotNull($capturedRequest); + $this->assertEquals('{"title":"my-project"}', (string)$capturedRequest->getBody()); + } +} diff --git a/tests/Core/OAuthProviderTest.php b/tests/Core/OAuthProviderTest.php index 360089d9c..75972728a 100644 --- a/tests/Core/OAuthProviderTest.php +++ b/tests/Core/OAuthProviderTest.php @@ -680,6 +680,227 @@ public function testBuffer120SecondsTriggersProactiveRefresh(): void $provider2->getAuthorization(); // must NOT trigger a second HTTP call } + /** + * FIX 2 — refreshAccessToken() throws (and doAcquireToken falls back) when refresh response + * contains invalid JSON. + * + * @throws Exception + */ + public function testRefreshAccessTokenFallsBackOnInvalidJsonResponse(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'valid-refresh-token', + 'expires_in' => -1, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'api-token-fallback', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $fallbackResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + // Refresh request — return invalid JSON + $this->assertStringContainsString('grant_type=refresh_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], 'not-valid-json{{{'); + } + // Fallback to api_token + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer api-token-fallback', $auth); + } + + /** + * FIX 2 — refreshAccessToken() throws (and doAcquireToken falls back) when refresh response + * has no access_token. + * + * @throws Exception + */ + public function testRefreshAccessTokenFallsBackWhenMissingAccessToken(): void + { + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'valid-refresh-token', + 'expires_in' => -1, + ]); + + $refreshWithoutToken = json_encode([ + 'expires_in' => 3600, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'api-token-fallback', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshWithoutToken, $fallbackResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + $this->assertStringContainsString('grant_type=refresh_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $refreshWithoutToken); + } + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer api-token-fallback', $auth); + } + + /** + * FIX 2 — refreshAccessToken() wraps ClientExceptionInterface and doAcquireToken falls back. + * + * @throws Exception + */ + public function testRefreshAccessTokenFallsBackOnClientException(): void + { + $networkError = new class ('Connection timed out') extends \Exception implements ClientExceptionInterface { + }; + + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'valid-refresh-token', + 'expires_in' => -1, + ]); + + $fallbackResponse = json_encode([ + 'access_token' => 'api-token-fallback', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(3)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $fallbackResponse, $networkError, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 1) { + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + } + if ($callCount === 2) { + $this->assertStringContainsString('grant_type=refresh_token', $body); + throw $networkError; + } + $this->assertStringContainsString('grant_type=api_token', $body); + return new Response(200, ['Content-Type' => 'application/json'], $fallbackResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer api-token-fallback', $auth); + } + + /** + * storeTokenData() — token_type and refresh_token from response are stored. + * Verified by checking that a subsequent expiry triggers refresh_token grant (not api_token). + * + * @throws Exception + */ + public function testStoreTokenDataPersistsRefreshToken(): void + { + $initialResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'persisted-refresh-token', + 'token_type' => 'Bearer', + 'expires_in' => -1, + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'refreshed-via-stored-token', + 'expires_in' => 3600, + ]); + + $callCount = 0; + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($initialResponse, $refreshResponse, &$callCount) { + $callCount++; + $body = (string)$request->getBody(); + if ($callCount === 2) { + // The stored refresh_token must appear in the refresh call body + $this->assertStringContainsString('grant_type=refresh_token', $body); + $this->assertStringContainsString('refresh_token=persisted-refresh-token', $body); + } + return new Response(200, ['Content-Type' => 'application/json'], + $callCount === 1 ? $initialResponse : $refreshResponse); + }); + + $this->oauthProvider->exchangeCodeForToken(); + $auth = $this->oauthProvider->getAuthorization(); + $this->assertEquals('Bearer refreshed-via-stored-token', $auth); + } + + /** + * FIX 4 — When no refreshEndpoint is provided, tokenEndpoint is used as fallback. + * + * @throws Exception + */ + public function testRefreshEndpointDefaultsToTokenEndpoint(): void + { + // Construct a provider WITHOUT a refreshEndpoint + $provider = new OAuthProvider( + $this->httpClient, + $this->requestFactory, + $this->tokenEndpoint, + $this->clientId, + $this->clientSecret, + // no refreshEndpoint + ); + + $firstResponse = json_encode([ + 'access_token' => 'initial-token', + 'refresh_token' => 'refresh-abc', + 'expires_in' => -1, + ]); + + $refreshResponse = json_encode([ + 'access_token' => 'token-after-refresh', + 'expires_in' => 3600, + ]); + + $this->httpClient + ->expects($this->exactly(2)) + ->method('sendRequest') + ->willReturnCallback(function (RequestInterface $request) use ($firstResponse, $refreshResponse) { + $body = (string)$request->getBody(); + if (str_contains($body, 'grant_type=refresh_token')) { + // Should target tokenEndpoint (the default) + $this->assertEquals($this->tokenEndpoint, (string)$request->getUri()); + return new Response(200, ['Content-Type' => 'application/json'], $refreshResponse); + } + return new Response(200, ['Content-Type' => 'application/json'], $firstResponse); + }); + + $provider->exchangeCodeForToken(); + $auth = $provider->getAuthorization(); + $this->assertEquals('Bearer token-after-refresh', $auth); + } + /** * @throws Exception */ From 4be361b610b5774ed262bc510eb7d376a8d557d1 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 12:31:36 +0200 Subject: [PATCH 06/13] refactor(oauth): remove unreachable guard in refreshAccessToken() doAcquireToken() already guards $this->refreshToken before calling refreshAccessToken(), making the inner check dead code (never reachable). Removing it achieves 100% line + method coverage on OAuthProvider. Also syncs template (oauth_provider.mustache) and commits phpunit.xml coverage-scope update (added src/Api/AbstractApi.php). --- phpunit.xml | 2 +- src/Core/OAuthProvider.php | 4 ---- templates/php/oauth_provider.mustache | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 9b903c69f..74c03f9f9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,7 +16,7 @@ src/Core - src/Api/AbstractApi.php + diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index 4434f861b..f8a229716 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -98,10 +98,6 @@ public function exchangeCodeForToken(): bool */ private function refreshAccessToken(): void { - if (!$this->refreshToken) { - throw new Exception('No refresh token available'); - } - try { $body = http_build_query([ 'grant_type' => 'refresh_token', diff --git a/templates/php/oauth_provider.mustache b/templates/php/oauth_provider.mustache index 9d1d480f2..5b53df7fb 100644 --- a/templates/php/oauth_provider.mustache +++ b/templates/php/oauth_provider.mustache @@ -101,10 +101,6 @@ class OAuthProvider */ private function refreshAccessToken(): void { - if (!$this->refreshToken) { - throw new Exception('No refresh token available'); - } - try { $body = http_build_query([ 'grant_type' => 'refresh_token', From 9269e4847653f33cb86b02657ffcb7998e775a4c Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 16:39:00 +0200 Subject: [PATCH 07/13] feat(auth): bearer mode, Fiber thundering-herd guard, $_retried anti-double-retry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change 1 — Bearer-only mode + \Closure tokenProvider in AbstractApi - AbstractApi: replace OAuthProvider $oauthProvider with \Closure $tokenProvider - getAuthorizationHeader() → ($this->tokenProvider)() - refreshToken() → ($this->tokenProvider)() - All ~62 concrete API files: sed OAuthProvider → \Closure tokenProvider - api.mustache + abstract_api.mustache: updated to match - UpsunClient: $auth nullable (?OAuthProvider), only created when apiToken !== '' - new setBearerToken(string $token): void - getToken() three-way: auth → bearerToken → throw RuntimeException - $tokenProvider closure passed to all concrete APIs instead of $this->auth Change 2 — Fiber-based thundering-herd guard in OAuthProvider::ensureValidToken() - Replace bool $acquiringToken with ?\Fiber $acquiringFiber - Concurrent Fiber callers suspend (via \Fiber::getCurrent()?->suspend()) until the first acquisition completes, then return without a second HTTP call - In sync (FPM) contexts \Fiber::getCurrent() is null, so acquiringFiber is always null and the guard is a no-op — identical behaviour to the old bool flag Change 3 — $_retried guard in sendAuthenticatedRequest() prevents double forceRefresh - Add bool $_retried = false param; on 401 call tokenProvider(true) then recurse with $_retried=true so a second 401 goes straight to ApiException without a redundant force-refresh call Tests: - AbstractApiTest: rewritten to use closure tracking (tokenCallCount/forceRefreshCount) instead of OAuthProvider mock; 401-retry $_retried guard verified - UpsunClientTest: removed testGetTokenReturnsApiToken (now HTTP-backed); added testGetTokenDelegatesToOAuthProvider, testGetTokenReturnsBearerToken, testGetTokenThrowsWhenNoAuthMethodSet - OAuthProviderTest: replaced reflection-based acquiringToken test with proper Fiber concurrency test (testFiberGuardPreventsDoubleAcquisitionUnderConcurrency) - BaseTestCase + all ~25 TaskTests: OAuthProvider mock → \Closure tokenProvider Result: 584/584 tests pass, lint clean --- docs/php-alignment-node-prompt.md | 290 + phpunit.xml | 2 +- schema/openapispec-upsun-processed.json | 36374 ++++++++++++++++ src/Api/AbstractApi.php | 21 +- src/Api/AddOnsApi.php | 5 +- src/Api/AlertsApi.php | 5 +- src/Api/ApiTokensApi.php | 5 +- src/Api/AutoscalingApi.php | 5 +- src/Api/BlackfireMonitoringApi.php | 5 +- src/Api/BlackfireProfilingApi.php | 5 +- src/Api/CertManagementApi.php | 5 +- src/Api/ConnectionsApi.php | 5 +- src/Api/ContinuousProfilingApi.php | 5 +- src/Api/DefaultApi.php | 5 +- src/Api/DeploymentApi.php | 5 +- src/Api/DeploymentTargetApi.php | 5 +- src/Api/DiffApi.php | 5 +- src/Api/DiscountsApi.php | 5 +- src/Api/DomainClaimApi.php | 5 +- src/Api/DomainManagementApi.php | 5 +- src/Api/EntrypointApi.php | 5 +- src/Api/EnvironmentActivityApi.php | 5 +- src/Api/EnvironmentApi.php | 5 +- src/Api/EnvironmentBackupsApi.php | 5 +- src/Api/EnvironmentTypeApi.php | 5 +- src/Api/EnvironmentVariablesApi.php | 5 +- src/Api/GrantsApi.php | 5 +- src/Api/HttpTrafficApi.php | 5 +- src/Api/InvoicesApi.php | 5 +- src/Api/MfaApi.php | 5 +- src/Api/OrdersApi.php | 5 +- src/Api/OrganizationInvitationsApi.php | 5 +- src/Api/OrganizationManagementApi.php | 5 +- src/Api/OrganizationMembersApi.php | 5 +- src/Api/OrganizationProjectsApi.php | 5 +- src/Api/OrganizationsApi.php | 5 +- src/Api/PhoneNumberApi.php | 5 +- src/Api/ProfilesApi.php | 5 +- src/Api/ProjectActivityApi.php | 5 +- src/Api/ProjectApi.php | 5 +- src/Api/ProjectInvitationsApi.php | 5 +- src/Api/ProjectSettingsApi.php | 5 +- src/Api/ProjectVariablesApi.php | 5 +- src/Api/ProjectsApi.php | 5 +- src/Api/RecordsApi.php | 5 +- src/Api/ReferencesApi.php | 5 +- src/Api/RegionsApi.php | 5 +- src/Api/RegistryCredentialApi.php | 5 +- src/Api/RepositoryApi.php | 5 +- src/Api/ResourcesApi.php | 5 +- src/Api/RoutingApi.php | 5 +- src/Api/RuntimeOperationsApi.php | 5 +- src/Api/SbomApi.php | 5 +- src/Api/SourceOperationsApi.php | 5 +- src/Api/SshKeysApi.php | 5 +- src/Api/SubscriptionsApi.php | 5 +- src/Api/SupportApi.php | 5 +- src/Api/SystemInformationApi.php | 5 +- src/Api/TaskApi.php | 5 +- src/Api/TeamAccessApi.php | 5 +- src/Api/TeamsApi.php | 5 +- src/Api/ThirdPartyIntegrationsApi.php | 5 +- src/Api/UserAccessApi.php | 5 +- src/Api/UserProfilesApi.php | 5 +- src/Api/UsersApi.php | 5 +- src/Api/VouchersApi.php | 5 +- src/Core/OAuthProvider.php | 45 +- src/UpsunClient.php | 46 +- templates/php/abstract_api.mustache | 21 +- templates/php/libraries/psr-18/api.mustache | 5 +- templates/php/oauth_provider.mustache | 45 +- tests/Api/AbstractApiTest.php | 78 +- tests/Core/OAuthProviderTest.php | 50 +- tests/Core/Tasks/ActivitiesTaskTest.php | 3 +- tests/Core/Tasks/ApplicationsTaskTest.php | 3 +- tests/Core/Tasks/BackupsTaskTest.php | 3 +- tests/Core/Tasks/BaseTestCase.php | 5 +- tests/Core/Tasks/CertificatesTaskTest.php | 3 +- tests/Core/Tasks/DomainsTaskTest.php | 3 +- tests/Core/Tasks/EnvironmentsTaskTest.php | 3 +- tests/Core/Tasks/IntegrationsTaskTest.php | 3 +- tests/Core/Tasks/InvitationsTaskTest.php | 3 +- tests/Core/Tasks/MountsTaskTest.php | 3 +- tests/Core/Tasks/OperationsTaskTest.php | 3 +- tests/Core/Tasks/OrganizationsTaskTest.php | 3 +- tests/Core/Tasks/ProjectsTaskTest.php | 3 +- tests/Core/Tasks/RegionsTaskTest.php | 3 +- tests/Core/Tasks/RepositoriesTaskTest.php | 3 +- tests/Core/Tasks/ResourcesTaskTest.php | 3 +- tests/Core/Tasks/RoutesTaskTest.php | 3 +- tests/Core/Tasks/ServicesTaskTest.php | 3 +- tests/Core/Tasks/SourceOperationsTaskTest.php | 3 +- tests/Core/Tasks/SshTaskTest.php | 3 +- tests/Core/Tasks/SupportTicketsTaskTest.php | 3 +- tests/Core/Tasks/TeamsTaskTest.php | 3 +- tests/Core/Tasks/UsersInvitationsTaskTest.php | 3 +- tests/Core/Tasks/UsersTaskTest.php | 3 +- tests/Core/Tasks/VariablesTaskTest.php | 3 +- tests/Core/Tasks/WorkersTaskTest.php | 5 +- tests/UpsunClientTest.php | 40 +- 100 files changed, 37043 insertions(+), 366 deletions(-) create mode 100644 docs/php-alignment-node-prompt.md create mode 100644 schema/openapispec-upsun-processed.json diff --git a/docs/php-alignment-node-prompt.md b/docs/php-alignment-node-prompt.md new file mode 100644 index 000000000..5537a1bb5 --- /dev/null +++ b/docs/php-alignment-node-prompt.md @@ -0,0 +1,290 @@ +# PHP SDK — Alignment with Node.js SDK + +## Context + +The PHP SDK (`upsun-sdk-php`) must be aligned with the Node.js SDK (`upsun-sdk-node`) on three +points that were recently fixed in Node.js. The changes are **backward-compatible** and must not +break any existing consumer of the SDK. + +--- + +## CRITICAL RULE — Generated files vs. templates + +Before touching any PHP file, determine whether it is generated or custom: + +| File | Status | How to edit | +|---|---|---| +| `src/Api/AbstractApi.php` | **Generated** — listed in `.openapi-generator/FILES` | Edit `templates/php/abstract_api.mustache`, then regenerate | +| `src/Core/OAuthProvider.php` | **Generated** — listed in `.openapi-generator/FILES` | Edit `templates/php/oauth_provider.mustache`, then regenerate | +| `src/UpsunClient.php` | **Custom** — NOT in `.openapi-generator/FILES` | Edit directly | +| `src/UpsunConfig.php` | **Custom** — NOT in `.openapi-generator/FILES` | Edit directly | + +**Regeneration command:** +```bash +npx openapi-generator-cli generate -c templates/config.yaml +``` + +**Template → generated file mapping** (from `templates/config.yaml`): +``` +templates/php/abstract_api.mustache → src/Api/AbstractApi.php +templates/php/oauth_provider.mustache → src/Core/OAuthProvider.php +``` + +After every change to a mustache template, run the generator and verify the generated output +matches the template intent exactly. + +--- + +## Change 1 — Bearer-only mode (`setBearerToken`) + +### Goal + +Allow a consumer to bypass OAuth2 entirely and inject a static bearer token, exactly as in +Node.js: + +```typescript +// Node.js — src/upsun.ts +setBearerToken(token: string): void { + this.accessToken = token; +} + +public async getToken(name?: string, scopes?: string[]): Promise { + if (this.auth) { + return await this.auth.getAuthorization(); // OAuth2 path + } else if (this.accessToken) { + return `${this.accessToken}`; // Bearer path + } else { + throw new Error('No authentication method available...'); + } +} +``` + +### Files to change + +#### `src/UpsunClient.php` (custom — edit directly) + +1. Add a nullable `?string $bearerToken` property (default `null`). +2. Add a `setBearerToken(string $token): void` public method that sets it. +3. Make the `$auth` property nullable (`?OAuthProvider`) — only instantiated when `$upsunConfig->apiToken` is not the default empty value. +4. Update `getToken()` (currently returns `$this->upsunConfig->apiToken`) to implement the three-way logic: + +```php +public function getToken(): string +{ + if ($this->auth !== null) { + return $this->auth->getAuthorization(); // OAuth2 path + } + + if ($this->bearerToken !== null) { + return 'Bearer ' . $this->bearerToken; // Bearer-only path + } + + throw new \RuntimeException( + 'No authentication method available. Provide an API key or call setBearerToken().' + ); +} +``` + +5. Pass `$this->auth` (which may now be `null`) down to all API class constructors. The + `AbstractApi` and each concrete API must accept `?OAuthProvider`. + +#### `src/Api/AbstractApi.php` + `templates/php/abstract_api.mustache` (generated — edit template) + +- Accept `?OAuthProvider $oauthProvider` in the constructor. +- In `getAuthorizationHeader()`, delegate to `$this->oauthProvider->getAuthorization()` only when + `$oauthProvider !== null`, otherwise call `$this->upsunClient->getToken()`. + + Simpler alternative (avoids circular dependency): inject a `callable $tokenProvider` instead of + `OAuthProvider` directly, so the auth strategy is resolved at call time: + +```php +// In AbstractApi constructor, replace OAuthProvider with a callable +public function __construct( + private readonly \Closure $tokenProvider, // () => string + ... +) + +// In getAuthorizationHeader() +protected function getAuthorizationHeader(): string +{ + return ($this->tokenProvider)(); +} +``` + + In `UpsunClient.php`, pass the closure when building task params: +```php +$tokenProvider = fn(): string => $this->getToken(); +$taskParams = [$tokenProvider, $this->apiClient, $requestFactory, $this->apiConfig]; +``` + +- **Also update `templates/php/abstract_api.mustache`** with the same change before regenerating. + +--- + +## Change 2 — Thundering-herd protection with PHP Fibers + +### Goal + +The current guard in `OAuthProvider::ensureValidToken()` is a simple boolean: + +```php +if ($this->acquiringToken) { + return; // ← caller returns with NO valid token — bug in concurrent Fiber contexts +} +``` + +This is safe for FPM (mono-thread per request) but incorrect when multiple `Fiber`s within the +same PHP process call `ensureValidToken()` concurrently: the second Fiber returns immediately +with `$accessToken = null`. + +The Node.js equivalent shares a single in-flight `Promise`: +```typescript +if (!this.pendingToken) { + this.pendingToken = this.doAcquireToken().finally(() => { this.pendingToken = null; }); +} +await this.pendingToken; // ALL concurrent callers wait for the same result +``` + +### PHP Fiber implementation + +Replace the boolean guard with a `?Fiber` reference that all concurrent callers can join: + +```php +/** @var \Fiber|null */ +private ?\Fiber $acquiringFiber = null; + +public function ensureValidToken(): void +{ + $buffer = 120; + + if ($this->accessToken && time() <= ($this->tokenExpiry - $buffer)) { + return; // token still valid — fast path + } + + if ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + // Another Fiber is already acquiring — suspend until it completes, + // then check if the token is now valid (it should be). + while (!$this->acquiringFiber->isTerminated()) { + \Fiber::getCurrent()?->suspend(); + } + // After the acquiring Fiber finishes, the token is valid. + return; + } + + // This Fiber takes ownership of the acquisition. + $this->acquiringFiber = \Fiber::getCurrent(); + try { + $this->doAcquireToken(); + } finally { + $this->acquiringFiber = null; + } +} +``` + +> **Note for the agent**: `\Fiber::getCurrent()` returns `null` when called outside a Fiber +> (e.g., standard FPM synchronous code). Add a null-guard so the method still works in sync +> contexts: +> +> ```php +> $currentFiber = \Fiber::getCurrent(); +> $this->acquiringFiber = $currentFiber; // may be null in sync FPM context +> ``` +> +> When `$acquiringFiber` is `null` (sync context), no other Fiber can join — which is correct +> because FPM is inherently single-threaded per request. + +### Files to change + +- **`templates/php/oauth_provider.mustache`** — replace `private bool $acquiringToken` + the + boolean guard with the `?Fiber` implementation above. +- **`src/Core/OAuthProvider.php`** — regenerated output of the template; verify after generation. +- Remove the `private bool $acquiringToken = false;` property. + +--- + +## Change 3 — 401 retry guard in async/Fiber mode + +### Goal + +In Node.js, the middleware uses a `__upsunRetry` flag on the request `init` object to prevent +double-retry: + +```typescript +if (retryInit.__upsunRetry) return response; // guard: no double-retry +retryInit.__upsunRetry = true; +``` + +The current PHP implementation in `AbstractApi::sendAuthenticatedRequest()` has no such guard: + +```php +if ($response->getStatusCode() === 401) { + $this->oauthProvider->forceRefresh(); + $request = $this->createAuthenticatedRequest(...); + $response = $this->httpClient->sendRequest($request); + // ← if the second response is also 401, we silently fall through to ApiException + // ← in Fiber mode with concurrent requests, two Fibers could both trigger forceRefresh() +} +``` + +In synchronous FPM this is harmless (only one request in flight). In Fiber async mode, two +concurrent 401s could each call `forceRefresh()` back-to-back, causing two token re-acquisitions. + +### PHP implementation + +Add an instance-level retry guard (per-request correlation via a local flag): + +```php +protected function sendAuthenticatedRequest( + string $method, + string $uri, + array $headers = [], + string|StreamInterface|null $body = null, + bool $_retried = false, // ← internal guard, not part of public API +): ResponseInterface { + try { + $this->refreshToken(); + $request = $this->createAuthenticatedRequest($method, $uri, $headers, $body); + $response = $this->httpClient->sendRequest($request); + + if ($response->getStatusCode() === 401 && !$_retried) { + // RFC 6750 §3.1 — retry once with a fresh token. + // The $_retried=true guard prevents infinite loops in Fiber contexts. + $this->oauthProvider->forceRefresh(); + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body, true); + } + + if ($response->getStatusCode() >= 400) { + throw new ApiException(...); + } + + return $response; + } catch (...) { ... } +} +``` + +> The recursive self-call with `$_retried = true` mirrors the `__upsunRetry` flag in Node.js +> without modifying the PSR-7 request object. + +### Files to change + +- **`templates/php/abstract_api.mustache`** — update `sendAuthenticatedRequest()` signature and + body as above. +- **`src/Api/AbstractApi.php`** — regenerated; verify after generation. + +--- + +## Validation checklist + +After all changes: + +- [ ] `composer run spec:generate` runs without error +- [ ] `src/Api/AbstractApi.php` matches `templates/php/abstract_api.mustache` (no drift) +- [ ] `src/Core/OAuthProvider.php` matches `templates/php/oauth_provider.mustache` (no drift) +- [ ] `composer run lint:phpcs` passes +- [ ] `composer run test` — all existing unit tests pass +- [ ] New unit tests added for: + - `setBearerToken()` — bearer path returns `Bearer ` without calling `OAuthProvider` + - `getToken()` throws when neither API key nor bearer is set + - `ensureValidToken()` — two concurrent Fiber callers only trigger one HTTP request + - `sendAuthenticatedRequest()` — 401 retry guard prevents double `forceRefresh()` in Fiber mode +- [ ] PHP 8.1+ minimum (Fiber requires 8.1) diff --git a/phpunit.xml b/phpunit.xml index 74c03f9f9..9b903c69f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -16,7 +16,7 @@ src/Core - + src/Api/AbstractApi.php diff --git a/schema/openapispec-upsun-processed.json b/schema/openapispec-upsun-processed.json new file mode 100644 index 000000000..363d808a6 --- /dev/null +++ b/schema/openapispec-upsun-processed.json @@ -0,0 +1,36374 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Upsun.com Rest API", + "version": "1.0", + "contact": { + "name": "Support", + "url": "https://upsun.com/contact-us/" + }, + "termsOfService": "https://upsun.com/trust-center/legal/tos/", + "description": "# Introduction\n\nUpsun, formerly Platform.sh, is a container-based Platform-as-a-Service. Our main API\nis simply Git. With a single `git push` and a couple of YAML files in\nyour repository you can deploy an arbitrarily complex cluster.\nEvery [**Project**](#tag/Project) can have multiple applications (PHP,\nNode.js, Python, Ruby, Go, etc.) and managed, automatically\nprovisioned services (databases, message queues, etc.).\n\nEach project also comes with multiple concurrent\nlive staging/development [**Environments**](#tag/Environment).\nThese ephemeral development environments\nare automatically created every time you push a new branch or create a\npull request, and each has a full copy of the data of its parent branch,\nwhich is created on-the-fly in seconds.\n\nOur Git implementation supports integrations with third party Git\nproviders such as GitHub, Bitbucket, or GitLab, allowing you to simply\nintegrate Upsun into your existing workflow.\n\n## Using the REST API\n\nIn addition to the Git API, we also offer a REST API that allows you to manage\nevery aspect of the platform, from managing projects and environments,\nto accessing accounts and subscriptions, to creating robust workflows\nand integrations with your CI systems and internal services.\n\nThese API docs are generated from a standard **OpenAPI (Swagger)** Specification document\nwhich you can find here in [YAML](openapispec-upsun.yaml) and in [JSON](openapispec-upsun.json) formats.\n\nThis RESTful API consumes and produces HAL-style JSON over HTTPS,\nand any REST library can be used to access it. On GitHub, we also host\na few API libraries that you can use to make API access easier, such as our\n[PHP API client](https://github.com/upsun/upsun-sdk-php).\n\nIn order to use the API you will first need to have an [Upsun account](https://auth.upsun.com/register/) \nand [create an API Token](https://docs.upsun.com/anchors/cli/api-token/).\n\n# Authentication\n\n## OAuth2\n\nAPI authentication is done with OAuth2 access tokens.\n\n### API tokens\n\nYou can use an API token as one way to get an OAuth2 access token. This\nis particularly useful in scripts, e.g. for CI pipelines.\n\nTo create an API token, go to the \"API Tokens\" section\nof the \"Account Settings\" tab on the [Console](https://console.upsun.com).\n\nTo exchange this API token for an access token, a `POST` request\nmust be made to `https://auth.upsun.com/oauth2/token`.\n\nThe request will look like this in cURL:\n\n
\ncurl -u platform-api-user: \\\n    -d 'grant_type=api_token&api_token=API_TOKEN' \\\n    https://auth.upsun.com/oauth2/token\n
\n\nThis will return a \"Bearer\" access token that\ncan be used to authenticate further API requests, for example:\n\n
\n{\n    \"access_token\": \"abcdefghij1234567890\",\n    \"expires_in\": 900,\n    \"token_type\": \"bearer\"\n}\n
\n\n### Using the Access Token\n\nTo authenticate further API requests, include this returned bearer token\nin the `Authorization` header. For example, to retrieve a list of\n[Projects](#tag/Project)\naccessible by the current user, you can make the following request\n(substituting the dummy token for your own):\n\n
\ncurl -H \"Authorization: Bearer abcdefghij1234567890\" \\\n    https://api.upsun.com/projects\n
\n\n# HAL Links\n\nMost endpoints in the API return fields which defines a HAL\n(Hypertext Application Language) schema for the requested endpoint.\nThe particular objects returns and their contents can vary by endpoint.\nThe payload examples we give here for the requests do not show these\nelements. These links can allow you to create a fully dynamic API client\nthat does not need to hardcode any method or schema.\n\nUnless they are used for pagination we do not show the HAL links in the\npayload examples in this documentation for brevity and as their content\nis contextual (based on the permissions of the user).\n\n## _links Objects\n\nMost endpoints that respond to `GET` requests will include a `_links` object\nin their response. The `_links` object contains a key-object pair labelled `self`, which defines\ntwo further key-value pairs:\n\n* `href` - A URL string referring to the fully qualified name of the returned object. For many endpoints, this will be the direct link to the API endpoint on the region gateway, rather than on the general API gateway. This means it may reference a host of, for example, `eu-2.platform.sh` rather than `api.upsun.com`.\n* `meta` - An object defining the OpenAPI Specification (OAS) [schema object](https://swagger.io/specification/#schemaObject) of the component returned by the endpoint.\n\nThere may be zero or more other fields in the `_links` object resembling fragment identifiers\nbeginning with a hash mark, e.g. `#edit` or `#delete`. Each of these keys\nrefers to a JSON object containing two key-value pairs:\n\n* `href` - A URL string referring to the path name of endpoint which can perform the action named in the key.\n* `meta` - An object defining the OAS schema of the endpoint. This consists of a key-value pair, with the key defining an HTTP method and the value defining the [operation object](https://swagger.io/specification/#operationObject) of the endpoint.\n\nTo use one of these HAL links, you must send a new request to the URL defined\nin the `href` field which contains a body defined the schema object in the `meta` field.\n\nFor example, if you make a request such as `GET /projects/abcdefghij1234567890`, the `_links`\nobject in the returned response will include the key `#delete`. That object\nwill look something like this fragment:\n\n```\n\"#delete\": {\n \"href\": \"/api/projects/abcdefghij1234567890\",\n \"meta\": {\n \"delete\": {\n \"responses\": {\n . . . // Response definition omitted for space\n },\n \"parameters\": []\n }\n }\n}\n```\n\nTo use this information to delete a project, you would then send a `DELETE`\nrequest to the endpoint `https://api.upsun.com/api/projects/abcdefghij1234567890`\nwith no body or parameters to delete the project that was originally requested.\n\n## _embedded Objects\n\nRequests to endpoints which create or modify objects, such as `POST`, `PATCH`, or `DELETE`\nrequests, will include an `_embedded` key in their response. The object\nrepresented by this key will contain the created or modified object. This\nobject is identical to what would be returned by a subsequent `GET` request\nfor the object referred to by the endpoint.\n", + "x-logo": { + "url": "https://docs.upsun.com/images/upsun-api.svg", + "href": "https://upsun.com/#section/Introduction", + "altText": "Upsun logo" + } + }, + "servers": [ + { + "url": "{schemes}://api.upsun.com", + "description": "The Upsun.com API gateway", + "variables": { + "schemes": { + "default": "https" + } + } + } + ], + "security": [ + { + "OAuth2": {} + } + ], + "tags": [ + { + "name": "Cert Management", + "description": "User-supplied SSL/TLS certificates can be managed using these\nendpoints. For more information, see our\n[Third-party TLS certificate](https://docs.upsun.com/anchors/domains/custom/custom-certificates/)\ndocumentation. These endpoints are not for managing certificates\nthat are automatically supplied by Upsun via Let's Encrypt.\n" + }, + { + "name": "Environment", + "description": "On Upsun, an environment encompasses a single instance of your\nentire application stack, the services used by the application,\nthe application's data storage, and the environment's backups.\n\nIn general, an environment represents a single branch or merge request\nin the Git repository backing a project. It is a virtual cluster\nof read-only application and service containers with read-write\nmounts for application and service data.\n\nOn Upsun, the default branch is your production environment\u2014thus,\nmerging changes to this branch will put those changes to production.\n" + }, + { + "name": "Environment Type", + "description": "Environment Types is the way Upsun manages access. We currently have 3 environment types:\n* Development\n* Staging\n* Production\n\nEach environment type will contain a group of users and their accesses. We manage access,\nadding, updating and removing users and their roles, here.\n\nEach environment will have a type, pointing to one of these 3 environment types.\nSee `type` in [Environments](#tag/Environment).\n\nIn general:\n* Production will be reserved for the default branch, and cannot be set manually.\n* An environment can be set to be type `staging` or development manually and when branching.\n\nDedicated Generation 2 projects have different rules for environment types. If your project\ncontains at least one of those Dedicated Generation 2 environments, the rules are slightly different:\n* All non-dedicated environments in your project can be `development` or `staging`, but never `production`.\n* Dedicated Generation 2 environments can be set either to `staging` or `production`, but never `development`.\n* The default branch is not considered to be a special case.\n" + }, + { + "name": "Environment Backups", + "description": "A snapshot is a complete backup of an environment, including all the\npersistent data from all services running in an environment and all\nfiles present in mounted volumes.\n\nThese endpoints can be used to trigger the creation of new backups,\nget information about existing backups, delete existing backups or\nrestore a backup.\nMore information about backups can be found in our\n[documentation](https://docs.upsun.com/anchors/environments/backup/).\n" + }, + { + "name": "Environment Variables", + "description": "These endpoints manipulate user-defined variables which are bound to a\nspecific environment, as well as (optionally) the children of an\nenvironment. These variables can be made available at both build time\nand runtime. For more information on environment variables,\nsee the [Variables](https://docs.upsun.com/anchors/variables/set/environment/create/)\nsection of the documentation.\n" + }, + { + "name": "Project", + "description": "## Project Overview\n\nOn Upsun, a Project is backed by a single Git repository\nand encompasses your entire application stack, the services\nused by your application, the application's data storage,\nthe production and staging environments, and the backups of those\nenvironments.\n\nWhen you create a new project, you start with a single\n[Environment](#tag/Environment) called *Master*,\ncorresponding to the master branch in the Git repository of\nthe project\u2014this will be your production environment.\n\nIf you connect your project to an external Git repo\nusing one of our [Third-Party Integrations](#tag/Third-Party-Integrations)\na new development environment can be created for each branch\nor pull request created in the repository. When a new development\nenvironment is created, the production environment's data\nwill be cloned on-the-fly, giving you an isolated, production-ready\ntest environment.\n\nThis set of API endpoints can be used to retrieve a list of projects\nassociated with an API key, as well as create and update the parameters\nof existing projects.\n\n> **Note**:\n>\n> To list projects or to create a new project, use [`/subscriptions`](#tag/Subscriptions).\n" + }, + { + "name": "Project Variables", + "description": "These endpoints manipulate user-defined variables which are bound to an\nentire project. These variables are accessible to all environments\nwithin a single project, and they can be made available at both build\ntime and runtime. For more information on project variables,\nsee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection of the documentation.\n" + }, + { + "name": "Project Settings", + "description": "These endpoints can be used to retrieve and manipulate project-level\nsettings. Only the `initialize` property can be set by end users. It is used\nto initialize a project from an existing Git repository.\n\nThe other properties can only be set by a privileged user.\n" + }, + { + "name": "Repository", + "description": "The Git repository backing projects hosted on Upsun can be\naccessed in a **read-only** manner through the `/projects/{projectId}/git/*`\nfamily of endpoints. With these endpoints, you can retrieve objects from\nthe Git repository in the same way that you would in a local environment.\n" + }, + { + "name": "Domain Management", + "description": "These endpoints can be used to add, modify, or remove domains from\na project. For more information on how domains function on\nUpsun, see the [Domains](https://docs.upsun.com/anchors/domains/custom/)\nsection of our documentation.\n" + }, + { + "name": "Routing", + "description": "These endpoints access an environment's `routes:` section of the `.upsun/config.yaml` file.\nFor routes to propagate to child environments, the child environments\nmust be synchronized with their parent.\n\nMore information about routing can be found in the [Routes](https://docs.upsun.com/anchors/routes/)\nsection of the documentation.\n" + }, + { + "name": "Source Operations", + "description": "These endpoints interact with source code operations as defined in the `source.operations`\nkey in a project's `.upsun/config.yaml` configuration. More information\non source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/source-operations/).\n" + }, + { + "name": "Deployment Target", + "description": "Upsun is capable of deploying the production environments of\nprojects in multiple topologies: both in clusters of containers, and\nas dedicated virtual machines. This is an internal API that can\nonly be used by privileged users.\n" + }, + { + "name": "Deployments", + "description": "The deployments endpoints gives detailed information about the actual\ndeployment of an active environment. Currently, it returns the _current_\ndeployment with information about the different apps, services, and\nroutes contained within.\n" + }, + { + "name": "Third-Party Integrations", + "description": "Upsun can easily integrate with many third-party services, including\nGit hosting services (GitHub, GitLab, and Bitbucket),\nhealth notification services (email, Slack, PagerDuty),\nperformance analytics platforms (New Relic, Blackfire, Tideways),\nand webhooks.\n\nFor clarification about what information each field requires, see the\n[External Integrations](https://docs.upsun.com/anchors/integrations/)\ndocumentation. NOTE: The names of the CLI arguments listed in the\ndocumentation are not always named exactly the same as the\nrequired body fields in the API request.\n" + }, + { + "name": "MFA", + "description": "Multi-factor authentication (MFA) requires the user to present two (or more) types of evidence (or factors) to prove their identity.\n\nFor example, the evidence might be a password and a device-generated code, which show the user has the knowledge factor (\"something you know\") \nas well as the possession factor (\"something you have\"). In this way MFA offers good protection against the compromise of any single factor, \nsuch as a stolen password.\n\nUsing the MFA API you can set up time-based one-time passcodes (TOTP), which can be generated on a single registered device (\"something you have\") such as a mobile phone.\n" + }, + { + "name": "Subscriptions", + "description": "Each project is represented by a subscription that holds the plan information.\nThese endpoints can be used to go to a larger plan, add more storage, or subscribe to\noptional features.\n" + }, + { + "name": "Orders", + "description": "These endpoints can be used to retrieve order information from our billing\nsystem. Here you can view information about your bill for our services,\ninclude the billed amount and a link to a PDF of the bill.\n" + }, + { + "name": "Invoices", + "description": "These endpoints can be used to retrieve invoices from our billing system.\nAn invoice of type \"invoice\" is generated automatically every month, if the customer has active projects.\nInvoices of type \"credit_memo\" are a result of manual action when there was a refund or an invoice correction.\n" + }, + { + "name": "Vouchers", + "description": "These endpoints can be used to retrieve vouchers associated with a particular\nuser as well as apply a voucher to a particular user.\n" + }, + { + "name": "Records", + "description": "These endpoints retrieve information about which plans were assigned to a particular\nproject at which time.\n" + }, + { + "name": "Support", + "description": "These endpoints can be used to retrieve information about support ticket priority\nand allow you to submit new ticket to the Upsun Support Team.\n" + }, + { + "name": "System Information", + "description": "These endpoints can be used to retrieve low-level information and interact with the\ncore component of Upsun infrastructure.\n\nThis is an internal API that can only be used by privileged users.\n" + } + ], + "paths": { + "/alerts/subscriptions/{subscriptionId}/usage": { + "get": { + "tags": [ + "Alerts" + ], + "summary": "Get usage alerts for a subscription", + "operationId": "get-usage-alerts", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + } + ], + "responses": { + "200": { + "description": "The list of current and available alerts for the subscription.", + "content": { + "application/json": { + "schema": { + "properties": { + "available": { + "description": "The list of available usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + }, + "current": { + "description": "The list of the current usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "get-usage-alerts", + "x-tag-id-kebab": "Alerts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + }, + "patch": { + "tags": [ + "Alerts" + ], + "summary": "Update usage alerts.", + "operationId": "update-usage-alerts", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "alerts": { + "description": "The list of usage alerts to create or update.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "The list of current and available alerts for the subscription.", + "content": { + "application/json": { + "schema": { + "properties": { + "available": { + "description": "The list of available usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + }, + "current": { + "description": "The list of the current usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "update-usage-alerts", + "x-tag-id-kebab": "Alerts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/orders/download": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Download an invoice.", + "operationId": "download-invoice", + "parameters": [ + { + "name": "token", + "in": "query", + "description": "JWT for invoice.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An invoice PDF.", + "content": { + "application/pdf": {} + } + } + }, + "x-property-id-kebab": "download-invoice", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "string" + ], + "x-return-types-union": "string", + "x-phpdoc": { + "return": false + }, + "x-returnable": true + } + }, + "/discounts/{id}": { + "get": { + "tags": [ + "Discounts" + ], + "summary": "Get an organization discount", + "operationId": "get-discount", + "parameters": [ + { + "$ref": "#/components/parameters/discountId" + } + ], + "responses": { + "200": { + "description": "A discount object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Discount" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-discount", + "x-tag-id-kebab": "Discounts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Discount" + ], + "x-return-types-union": "\\Upsun\\Model\\Discount", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Discount" + }, + "x-returnable": true + } + }, + "/discounts/types/allowance": { + "get": { + "tags": [ + "Discounts" + ], + "summary": "Get the value of the First Project Incentive discount", + "operationId": "get-type-allowance", + "responses": { + "200": { + "description": "A discount object", + "content": { + "application/json": { + "schema": { + "properties": { + "currencies": { + "description": "Discount values per currency.", + "properties": { + "EUR": { + "description": "Discount value in EUR.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "USD": { + "description": "Discount value in USD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "GBP": { + "description": "Discount value in GBP.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "AUD": { + "description": "Discount value in AUD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "CAD": { + "description": "Discount value in CAD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-type-allowance", + "x-tag-id-kebab": "Discounts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/me": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get current logged-in user info", + "description": "Retrieve information about the currently logged-in user (the user associated with the access token).", + "operationId": "get-current-user-deprecated", + "responses": { + "200": { + "description": "The user object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentUser" + } + } + } + } + }, + "x-deprecated": true, + "x-property-id-kebab": "get-current-user-deprecated", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\CurrentUser" + ], + "x-return-types-union": "\\Upsun\\Model\\CurrentUser", + "x-phpdoc": { + "return": "\\Upsun\\Model\\CurrentUser" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about the currently logged-in user (the user associated with the access token)." + ] + } + }, + "/ssh_keys/{key_id}": { + "get": { + "tags": [ + "Ssh Keys" + ], + "summary": "Get an SSH key", + "operationId": "get-ssh-key", + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The ID of the ssh key.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "A single SSH public key record.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SshKey" + } + } + } + } + }, + "x-property-id-kebab": "get-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SshKey" + ], + "x-return-types-union": "\\Upsun\\Model\\SshKey", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SshKey" + }, + "x-returnable": true + }, + "delete": { + "tags": [ + "Ssh Keys" + ], + "summary": "Delete an SSH key", + "operationId": "delete-ssh-key", + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The ID of the ssh key.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Success." + } + }, + "x-property-id-kebab": "delete-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false + } + }, + "/ssh_keys": { + "post": { + "tags": [ + "Ssh Keys" + ], + "summary": "Add a new public SSH key to a user", + "operationId": "create-ssh-key", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "value" + ], + "properties": { + "value": { + "description": "The value of the ssh key.", + "type": "string" + }, + "title": { + "description": "The title of the ssh key.", + "type": "string" + }, + "uuid": { + "description": "The uuid of the user.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "The newly created ssh key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SshKey" + } + } + } + } + }, + "x-property-id-kebab": "create-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SshKey" + ], + "x-return-types-union": "\\Upsun\\Model\\SshKey", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SshKey" + }, + "x-returnable": true + } + }, + "/me/phone": { + "post": { + "tags": [ + "Users" + ], + "summary": "Check if phone verification is required", + "description": "Find out if the current logged in user requires phone verification to create projects.", + "operationId": "get-current-user-verification-status", + "responses": { + "200": { + "description": "The information pertinent to determine if the account requires phone verification before project creation.", + "content": { + "application/json": { + "schema": { + "properties": { + "verify_phone": { + "description": "Does this user need to verify their phone number for project creation.", + "type": "boolean" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "get-current-user-verification-status", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Find out if the current logged in user requires phone verification to create projects." + ] + } + }, + "/me/verification": { + "post": { + "tags": [ + "Users" + ], + "summary": "Check if verification is required", + "description": "Find out if the current logged in user requires verification (phone or staff) to create projects.", + "operationId": "get-current-user-verification-status-full", + "responses": { + "200": { + "description": "The information pertinent to determine if the account requires any type of verification before project creation.", + "content": { + "application/json": { + "schema": { + "properties": { + "state": { + "description": "Does this user need verification for project creation.", + "type": "boolean" + }, + "type": { + "description": "What type of verification is needed (phone or ticket)", + "type": "string" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "get-current-user-verification-status-full", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Find out if the current logged in user requires verification (phone or staff) to create projects." + ] + } + }, + "/plans": { + "get": { + "tags": [ + "Plans" + ], + "summary": "List available plans", + "description": "Retrieve information about plans and pricing on Platform.sh.", + "operationId": "list-plans", + "responses": { + "200": { + "description": "The list of plans.", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "Total number of plans.", + "type": "integer" + }, + "plans": { + "description": "Array of plans.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Plan" + } + }, + "_links": { + "$ref": "#/components/schemas/HalLinks" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "list-plans", + "x-tag-id-kebab": "Plans", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about plans and pricing on Platform.sh." + ] + } + }, + "/subscriptions/{subscriptionId}/can-update": { + "get": { + "tags": [ + "Subscriptions" + ], + "summary": "Checks if the user is able to update a project.", + "operationId": "can-update-subscription", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + }, + { + "$ref": "#/components/parameters/subscription_plan" + }, + { + "$ref": "#/components/parameters/subscription_environments" + }, + { + "$ref": "#/components/parameters/subscription_storage" + }, + { + "$ref": "#/components/parameters/subscription_user_licenses" + } + ], + "responses": { + "200": { + "description": "Check result with error message if presented", + "content": { + "application/json": { + "schema": { + "properties": { + "can_update": { + "description": "Boolean result of the check.", + "type": "boolean" + }, + "message": { + "description": "Details in case of negative check result.", + "type": "string" + }, + "required_action": { + "description": "Required action impeding project update.", + "type": "object" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "can-update-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/profiles": { + "get": { + "tags": [ + "User Profiles" + ], + "summary": "List user profiles", + "operationId": "list-profiles", + "responses": { + "200": { + "description": "The list of user profiles.", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "Total number of results.", + "type": "integer" + }, + "profiles": { + "description": "Array of user profiles.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Profile" + } + }, + "_links": { + "$ref": "#/components/schemas/HalLinks" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "list-profiles", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/profiles/{userId}": { + "get": { + "tags": [ + "User Profiles" + ], + "summary": "Get a single user profile", + "operationId": "get-profile", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "responses": { + "200": { + "description": "A User profile object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + } + }, + "x-property-id-kebab": "get-profile", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true + }, + "patch": { + "tags": [ + "User Profiles" + ], + "summary": "Update a user profile", + "description": "Update a user profile, supplying one or more key/value pairs to to change.", + "operationId": "update-profile", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "display_name": { + "description": "The user's display name.", + "type": "string" + }, + "username": { + "description": "The user's username.", + "type": "string" + }, + "current_password": { + "description": "The user's current password.", + "type": "string" + }, + "password": { + "description": "The user's new password.", + "type": "string" + }, + "company_type": { + "description": "The company type.", + "type": "string" + }, + "company_name": { + "description": "The name of the company.", + "type": "string" + }, + "vat_number": { + "description": "The vat number of the user.", + "type": "string" + }, + "company_role": { + "description": "The role of the user in the company.", + "type": "string" + }, + "marketing": { + "description": "Flag if the user agreed to receive marketing communication.", + "type": "boolean" + }, + "ui_colorscheme": { + "description": "The user's chosen color scheme for user interfaces. Available values are 'light' and 'dark'.", + "type": "string" + }, + "default_catalog": { + "description": "The URL of a catalog file which overrides the default.", + "type": "string" + }, + "project_options_url": { + "description": "The URL of an account-wide project options file.", + "type": "string" + }, + "picture": { + "description": "Url of the user's picture.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "A User profile object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + } + }, + "x-property-id-kebab": "update-profile", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true, + "x-description": [ + "Update a user profile, supplying one or more key/value pairs to to change." + ] + } + }, + "/profiles/{userId}/address": { + "get": { + "tags": [ + "User Profiles" + ], + "summary": "Get a user address", + "operationId": "get-address", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "responses": { + "200": { + "description": "A user Address object extended with field metadata", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Address" + }, + { + "$ref": "#/components/schemas/AddressMetadata" + } + ] + } + } + } + } + }, + "x-property-id-kebab": "get-address", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": {}, + "x-phpdoc": {}, + "x-returnable": true + }, + "patch": { + "tags": [ + "User Profiles" + ], + "summary": "Update a user address", + "description": "Update a user address, supplying one or more key/value pairs to to change.", + "operationId": "update-address", + "parameters": [ + { + "$ref": "#/components/parameters/user_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "responses": { + "200": { + "description": "A user Address object extended with field metadata.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Address" + }, + { + "$ref": "#/components/schemas/AddressMetadata" + } + ] + } + } + } + } + }, + "x-property-id-kebab": "update-address", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": {}, + "x-phpdoc": {}, + "x-returnable": true, + "x-description": [ + "Update a user address, supplying one or more key/value pairs to to change." + ] + } + }, + "/profile/{uuid}/picture": { + "post": { + "tags": [ + "User Profiles" + ], + "summary": "Create a user profile picture", + "operationId": "create-profile-picture", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The uuid of the user", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "The image file to upload.", + "type": "string", + "format": "binary" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "The new picture url.", + "content": { + "application/json": { + "schema": { + "properties": { + "url": { + "description": "The relative url of the picture.", + "type": "string" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "create-profile-picture", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + }, + "delete": { + "tags": [ + "User Profiles" + ], + "summary": "Delete a user profile picture", + "operationId": "delete-profile-picture", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The uuid of the user", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "No Content success." + } + }, + "x-property-id-kebab": "delete-profile-picture", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false + } + }, + "/tickets": { + "get": { + "summary": "List support tickets", + "operationId": "list-tickets", + "parameters": [ + { + "$ref": "#/components/parameters/filter_ticket_id" + }, + { + "$ref": "#/components/parameters/filter_created" + }, + { + "$ref": "#/components/parameters/filter_updated" + }, + { + "$ref": "#/components/parameters/filter_type" + }, + { + "$ref": "#/components/parameters/filter_priority" + }, + { + "$ref": "#/components/parameters/filter_ticket_status" + }, + { + "$ref": "#/components/parameters/filter_requester_id" + }, + { + "$ref": "#/components/parameters/filter_submitter_id" + }, + { + "$ref": "#/components/parameters/filter_assignee_id" + }, + { + "$ref": "#/components/parameters/filter_has_incidents" + }, + { + "$ref": "#/components/parameters/filter_due" + }, + { + "name": "search", + "in": "query", + "description": "Search string for the ticket subject and description.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "The list of tickets.", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "Total number of results.", + "type": "integer" + }, + "tickets": { + "description": "Array of support tickets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Ticket" + } + }, + "_links": { + "$ref": "#/components/schemas/HalLinks" + } + }, + "type": "object" + } + } + } + } + }, + "x-property-id-kebab": "list-tickets", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + }, + "post": { + "tags": [ + "Support" + ], + "summary": "Create a new support ticket", + "operationId": "create-ticket", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "subject", + "description" + ], + "properties": { + "subject": { + "description": "A title of the ticket.", + "type": "string" + }, + "description": { + "description": "The description body of the support ticket.", + "type": "string" + }, + "requester_id": { + "description": "UUID of the ticket requester. Converted from the ZID value.", + "type": "string", + "format": "uuid" + }, + "priority": { + "description": "A priority of the ticket.", + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ] + }, + "subscription_id": { + "description": "see create()", + "type": "string" + }, + "organization_id": { + "description": "see create()", + "type": "string" + }, + "affected_url": { + "description": "see create().", + "type": "string", + "format": "url" + }, + "followup_tid": { + "description": "The unique ID of the ticket which this ticket is a follow-up to.", + "type": "string" + }, + "category": { + "description": "The category of the support ticket.", + "type": "string", + "enum": [ + "access", + "billing_question", + "complaint", + "compliance_question", + "configuration_change", + "general_question", + "incident_outage", + "bug_report", + "report_a_gui_bug", + "onboarding", + "close_my_account" + ] + }, + "attachments": { + "description": "A list of attachments for the ticket.", + "type": "array", + "items": { + "properties": { + "filename": { + "description": "The filename to be used in storage.", + "type": "string" + }, + "data": { + "description": "the base64 encoded file.", + "type": "string" + } + }, + "type": "object" + } + }, + "collaborator_ids": { + "description": "A list of collaborators uuids for the ticket.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "A Support Ticket object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ticket" + } + } + } + } + }, + "x-property-id-kebab": "create-ticket", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Ticket" + ], + "x-return-types-union": "\\Upsun\\Model\\Ticket", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ticket" + }, + "x-returnable": true + } + }, + "/tickets/{ticket_id}": { + "patch": { + "tags": [ + "Support" + ], + "summary": "Update a ticket", + "operationId": "update-ticket", + "parameters": [ + { + "name": "ticket_id", + "in": "path", + "description": "The ID of the ticket", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "The status of the support ticket.", + "type": "string", + "enum": [ + "open", + "solved" + ] + }, + "collaborator_ids": { + "description": "A list of collaborators uuids for the ticket.", + "type": "array", + "items": { + "type": "string" + } + }, + "collaborators_replace": { + "description": "Whether or not should replace ticket collaborators with the provided values. If false, the collaborators will be appended.", + "type": "boolean", + "default": null + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Success.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ticket" + } + } + } + }, + "204": { + "description": "The ticket was not updated." + } + }, + "x-property-id-kebab": "update-ticket", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Ticket", + "null" + ], + "x-return-types-union": "\\Upsun\\Model\\Ticket|null", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ticket" + }, + "x-returnable": true + } + }, + "/tickets/priority": { + "get": { + "tags": [ + "Support" + ], + "summary": "List support ticket priorities", + "operationId": "list-ticket-priorities", + "parameters": [ + { + "name": "subscription_id", + "in": "query", + "description": "The ID of the subscription the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "category", + "in": "query", + "description": "The category of the support ticket.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An array of available priorities for that license.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "id": { + "description": "Machine name of the priority.", + "type": "string" + }, + "label": { + "description": "The human-readable label of the priority.", + "type": "string" + }, + "short_description": { + "description": "The short description of the priority.", + "type": "string" + }, + "description": { + "description": "The long description of the priority.", + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + }, + "x-property-id-kebab": "list-ticket-priorities", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": true, + "x-return-types": [ + "object[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "object[]" + }, + "x-returnable": true + } + }, + "/tickets/category": { + "get": { + "tags": [ + "Support" + ], + "summary": "List support ticket categories", + "operationId": "list-ticket-categories", + "parameters": [ + { + "name": "subscription_id", + "in": "query", + "description": "The ID of the subscription the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "organization_id", + "in": "query", + "description": "The ID of the organization the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An array of available categories for a ticket.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "id": { + "description": "Machine name of the category as is listed in zendesk.", + "type": "string" + }, + "label": { + "description": "The human-readable label of the category.", + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + }, + "x-property-id-kebab": "list-ticket-categories", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": true, + "x-return-types": [ + "object[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "object[]" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/invitations": { + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "post": { + "summary": "Invite user to an organization by email", + "description": "Creates an invitation to an organization for a user with the specified email address.", + "operationId": "create-org-invite", + "tags": [ + "Organization Invitations" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationInvitation" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict when there already is a pending invitation for the invitee", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee." + }, + "permissions": { + "$ref": "#/components/schemas/OrganizationPermissions" + }, + "force": { + "type": "boolean", + "description": "Whether to cancel any pending invitation for the specified invitee, and create a new invitation." + } + }, + "required": [ + "email", + "permissions" + ] + } + } + } + }, + "x-property-id-kebab": "create-org-invite", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationInvitation" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationInvitation", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationInvitation" + }, + "x-returnable": true, + "x-description": [ + "Creates an invitation to an organization for a user with the specified email address." + ] + }, + "get": { + "summary": "List invitations to an organization", + "description": "Returns a list of invitations to an organization.", + "operationId": "list-org-invites", + "tags": [ + "Organization Invitations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[state]", + "description": "Allows filtering by `state` of the invtations: \"pending\" (default), \"error\".", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationInvitation" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-invites", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationInvitation[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationInvitation[]" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of invitations to an organization." + ] + } + }, + "/organizations/{organization_id}/invitations/{invitation_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/InvitationID" + } + ], + "delete": { + "summary": "Cancel a pending invitation to an organization", + "description": "Cancels the specified invitation.", + "operationId": "cancel-org-invite", + "tags": [ + "Organization Invitations" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "cancel-org-invite", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Cancels the specified invitation." + ] + } + }, + "/projects/{project_id}/invitations": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "post": { + "summary": "Invite user to a project by email", + "description": "Creates an invitation to a project for a user with the specified email address.", + "operationId": "create-project-invite", + "tags": [ + "Project Invitations" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectInvitation" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "402": { + "description": "Payment Required when the number of users exceeds the subscription limit", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict when there already is a pending invitation for the invitee", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "admin", + "viewer" + ], + "description": "The role the invitee should be given on the project.", + "default": null + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee." + }, + "permissions": { + "type": "array", + "description": "Specifying the role on each environment type.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "production", + "staging", + "development" + ], + "description": "The environment type." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The role the invitee should be given on the environment type." + } + } + } + }, + "environments": { + "deprecated": true, + "type": "array", + "description": "(Deprecated, use permissions instead) Specifying the role on each environment.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the environment." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The role the invitee should be given on the environment." + } + } + } + }, + "force": { + "type": "boolean", + "description": "Whether to cancel any pending invitation for the specified invitee, and create a new invitation." + } + }, + "required": [ + "email" + ] + } + } + } + }, + "x-property-id-kebab": "create-project-invite", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectInvitation" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectInvitation", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectInvitation" + }, + "x-returnable": true, + "x-description": [ + "Creates an invitation to a project for a user with the specified email address." + ] + }, + "get": { + "summary": "List invitations to a project", + "description": "Returns a list of invitations to a project.", + "operationId": "list-project-invites", + "tags": [ + "Project Invitations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[state]", + "description": "Allows filtering by `state` of the invtations: \"pending\" (default), \"error\".", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectInvitation" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-project-invites", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectInvitation[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectInvitation[]" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of invitations to a project." + ] + } + }, + "/projects/{project_id}/invitations/{invitation_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/InvitationID" + } + ], + "delete": { + "summary": "Cancel a pending invitation to a project", + "description": "Cancels the specified invitation.", + "operationId": "cancel-project-invite", + "tags": [ + "Project Invitations" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "cancel-project-invite", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Cancels the specified invitation." + ] + } + }, + "/ref/users": { + "get": { + "summary": "List referenced users", + "description": "Retrieves a list of users referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:users:0.", + "operationId": "list-referenced-users", + "tags": [ + "References" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced users indexed by the user ID.", + "additionalProperties": { + "$ref": "#/components/schemas/UserReference" + } + }, + "examples": { + "example-1": { + "value": { + "497f6eca-6276-4993-bfeb-53cbbbba6f08": { + "email": "user@example.com", + "first_name": "string", + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "last_name": "string", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "username": "string", + "mfa_enabled": false, + "sso_enabled": false + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated user IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "x-property-id-kebab": "list-referenced-users", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of users referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:users:0." + ] + } + }, + "/ref/teams": { + "get": { + "summary": "List referenced teams", + "description": "Retrieves a list of teams referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:teams:0.", + "operationId": "list-referenced-teams", + "tags": [ + "References" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced teams indexed by the team ID.", + "additionalProperties": { + "$ref": "#/components/schemas/TeamReference" + } + }, + "examples": { + "example-1": { + "value": { + "01FVMKN9KHVWWVY488AVKDWHR3": { + "id": "01FVMKN9KHVWWVY488AVKDWHR3", + "label": "Contractors" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated team IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "x-property-id-kebab": "list-referenced-teams", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of teams referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:teams:0." + ] + } + }, + "/teams": { + "get": { + "summary": "List teams", + "description": "Retrieves a list of teams.", + "operationId": "list-teams", + "tags": [ + "Teams" + ], + "parameters": [ + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "label", + "-label", + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "count": { + "type": "integer", + "description": "Total count of all the teams." + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-teams", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of teams." + ] + }, + "post": { + "summary": "Create team", + "description": "Creates a new team.", + "operationId": "create-team", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "organization_id", + "label" + ], + "properties": { + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the parent organization." + }, + "label": { + "type": "string", + "description": "The human-readable label of the team." + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Team" + }, + "x-returnable": true, + "x-description": [ + "Creates a new team." + ] + } + }, + "/teams/{team_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "Get team", + "description": "Retrieves the specified team.", + "operationId": "get-team", + "tags": [ + "Teams" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Team" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified team." + ] + }, + "patch": { + "summary": "Update team", + "description": "Updates the specified team.", + "operationId": "update-team", + "tags": [ + "Teams" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The human-readable label of the team." + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Team" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified team." + ] + }, + "delete": { + "summary": "Delete team", + "description": "Deletes the specified team.", + "operationId": "delete-team", + "tags": [ + "Teams" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-team", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified team." + ] + } + }, + "/teams/{team_id}/members": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "List team members", + "description": "Retrieves a list of users associated with a single team.", + "operationId": "list-team-members", + "tags": [ + "Teams" + ], + "parameters": [ + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamMember" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-team-members", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of users associated with a single team." + ] + }, + "post": { + "summary": "Create team member", + "description": "Creates a new team member.", + "operationId": "create-team-member", + "tags": [ + "Teams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "user_id" + ], + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "ID of the user." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMember" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-team-member", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamMember" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamMember" + }, + "x-returnable": true, + "x-description": [ + "Creates a new team member." + ] + } + }, + "/teams/{team_id}/members/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get team member", + "description": "Retrieves the specified team member.", + "operationId": "get-team-member", + "tags": [ + "Teams" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMember" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-team-member", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamMember" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamMember" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified team member." + ] + }, + "delete": { + "summary": "Delete team member", + "description": "Deletes the specified team member.", + "operationId": "delete-team-member", + "tags": [ + "Teams" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-team-member", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified team member." + ] + } + }, + "/users/{user_id}/extended-access": { + "get": { + "summary": "List extended access of a user", + "description": "List extended access of the given user, which includes both individual and team access to project and organization.", + "operationId": "list-user-extended-access", + "tags": [ + "Grants" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "in": "query", + "name": "filter[resource_type]", + "description": "Allows filtering by `resource_type` (project or organization) using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[permissions]", + "description": "Allows filtering by `permissions` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "x-examples": { + "example-1": { + "user_id": "ff9c8376-0227-4928-9b52-b08bc5426689", + "resource_id": "an3sjsfwfbgkm", + "resource_type": "project", + "organization_id": "01H2X80DMRDZWR6CX753YQHTND", + "granted_at": "2022-04-01T10:11:30.783289Z", + "updated_at": "2022-04-03T22:12:59.937864Z", + "permissions": [ + "viewer", + "staging:contributor" + ] + } + }, + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user." + }, + "resource_id": { + "type": "string", + "description": "The ID of the resource." + }, + "resource_type": { + "type": "string", + "description": "The type of the resource access to which is granted.", + "enum": [ + "project", + "organization" + ] + }, + "organization_id": { + "type": "string", + "description": "The ID of the organization owning the resource." + }, + "permissions": { + "type": "array", + "description": "List of project permissions.", + "items": { + "type": "string" + } + }, + "granted_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was granted." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was updated." + } + } + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-extended-access", + "x-tag-id-kebab": "Grants", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "List extended access of the given user, which includes both individual and team access to project and", + "organization." + ] + } + }, + "/users/me": { + "get": { + "summary": "Get the current user", + "description": "Retrieves the current user, determined from the used access token.", + "operationId": "get-current-user", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-current-user", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the current user, determined from the used access token." + ] + } + }, + "/users/email={email}": { + "parameters": [ + { + "schema": { + "type": "string", + "format": "email", + "example": "hello@example.com" + }, + "name": "email", + "in": "path", + "required": true, + "description": "The user's email address." + } + ], + "get": { + "summary": "Get a user by email", + "description": "Retrieves a user matching the specified email address.", + "operationId": "get-user-by-email-address", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-user-by-email-address", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a user matching the specified email address." + ] + } + }, + "/users/username={username}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "platform-sh" + }, + "name": "username", + "in": "path", + "required": true, + "description": "The user's username." + } + ], + "get": { + "summary": "Get a user by username", + "description": "Retrieves a user matching the specified username.", + "operationId": "get-user-by-username", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": {} + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-user-by-username", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a user matching the specified username." + ] + } + }, + "/users/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get a user", + "description": "Retrieves the specified user.", + "operationId": "get-user", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-user", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified user." + ] + }, + "patch": { + "summary": "Update a user", + "description": "Updates the specified user.", + "operationId": "update-user", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "", + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "The user's username." + }, + "first_name": { + "type": "string", + "description": "The user's first name." + }, + "last_name": { + "type": "string", + "description": "The user's last name." + }, + "picture": { + "type": "string", + "format": "uri", + "description": "The user's picture." + }, + "company": { + "type": "string", + "description": "The user's company." + }, + "website": { + "type": "string", + "format": "uri", + "description": "The user's website." + }, + "country": { + "type": "string", + "maxLength": 2, + "minLength": 2, + "description": "The user's country (2-letter country code)." + } + }, + "x-examples": { + "example-1": { + "company": "Platform.sh SAS", + "country": "EU", + "first_name": "Hello", + "last_name": "World", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "username": "username", + "website": "https://platform.sh" + } + } + } + } + } + }, + "x-property-id-kebab": "update-user", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified user." + ] + } + }, + "/users/{user_id}/emailaddress": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Reset email address", + "description": "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the request is accepted.", + "operationId": "reset-email-address", + "tags": [ + "Users" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email_address": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email_address" + ] + } + } + }, + "description": "" + }, + "x-property-id-kebab": "reset-email-address", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the", + "request is accepted." + ] + } + }, + "/users/{user_id}/resetpassword": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Reset user password", + "description": "Requests a reset of the user's password. A password reset email will be sent to the user when the request is accepted.", + "operationId": "reset-password", + "tags": [ + "Users" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "reset-password", + "x-tag-id-kebab": "Users", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Requests a reset of the user's password. A password reset email will be sent to the user when the request is", + "accepted." + ] + } + }, + "/users/{user_id}/api-tokens": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List a user's API tokens", + "description": "Retrieves a list of API tokens associated with a single user.", + "operationId": "list-api-tokens", + "tags": [ + "Api Tokens" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-api-tokens", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of API tokens associated with a single user." + ] + }, + "post": { + "summary": "Create an API token", + "description": "Creates an API token", + "operationId": "create-api-token", + "tags": [ + "Api Tokens" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The token name." + } + }, + "required": [ + "name" + ] + } + } + } + }, + "x-property-id-kebab": "create-api-token", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken" + ], + "x-return-types-union": "\\Upsun\\Model\\ApiToken", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken" + }, + "x-returnable": true, + "x-description": [ + "Creates an API token" + ] + } + }, + "/users/{user_id}/api-tokens/{token_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "schema": { + "type": "string", + "format": "uuid" + }, + "name": "token_id", + "in": "path", + "required": true, + "description": "The ID of the token." + } + ], + "get": { + "summary": "Get an API token", + "description": "Retrieves the specified API token.", + "operationId": "get-api-token", + "tags": [ + "Api Tokens" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-api-token", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken" + ], + "x-return-types-union": "\\Upsun\\Model\\ApiToken", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified API token." + ] + }, + "delete": { + "summary": "Delete an API token", + "description": "Deletes an API token", + "operationId": "delete-api-token", + "tags": [ + "Api Tokens" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "delete-api-token", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes an API token" + ] + } + }, + "/users/{user_id}/connections": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List federated login connections", + "description": "Retrieves a list of connections associated with a single user.", + "operationId": "list-login-connections", + "tags": [ + "Connections" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-login-connections", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Connection[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Connection[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of connections associated with a single user." + ] + } + }, + "/users/{user_id}/connections/{provider}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "provider", + "in": "path", + "required": true, + "description": "The name of the federation provider." + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get a federated login connection", + "description": "Retrieves the specified connection.", + "operationId": "get-login-connection", + "tags": [ + "Connections" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "get-login-connection", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Connection" + ], + "x-return-types-union": "\\Upsun\\Model\\Connection", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Connection" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified connection." + ] + }, + "delete": { + "summary": "Delete a federated login connection", + "description": "Deletes the specified connection.", + "operationId": "delete-login-connection", + "tags": [ + "Connections" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "delete-login-connection", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified connection." + ] + } + }, + "/users/{user_id}/totp": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get information about TOTP enrollment", + "description": "Retrieves TOTP enrollment information.", + "operationId": "get-totp-enrollment", + "tags": [ + "Mfa" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "issuer": { + "type": "string", + "format": "uri", + "description": "" + }, + "account_name": { + "type": "string", + "description": "Account name for the enrollment." + }, + "secret": { + "type": "string", + "description": "The secret seed for the enrollment" + }, + "qr_code": { + "type": "string", + "format": "byte", + "description": "Data URI of a PNG QR code image for the enrollment." + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict" + } + }, + "x-property-id-kebab": "get-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves TOTP enrollment information." + ] + }, + "post": { + "summary": "Confirm TOTP enrollment", + "description": "Confirms the given TOTP enrollment.", + "operationId": "confirm-totp-enrollment", + "tags": [ + "Mfa" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recovery_codes": { + "type": "array", + "description": "A list of recovery codes for the MFA enrollment.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The secret seed for the enrollment" + }, + "passcode": { + "type": "string", + "description": "TOTP passcode for the enrollment" + } + }, + "required": [ + "secret", + "passcode" + ] + } + } + }, + "description": "" + }, + "x-property-id-kebab": "confirm-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Confirms the given TOTP enrollment." + ] + }, + "delete": { + "summary": "Withdraw TOTP enrollment", + "description": "Withdraws from the TOTP enrollment.", + "operationId": "withdraw-totp-enrollment", + "tags": [ + "Mfa" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "withdraw-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Withdraws from the TOTP enrollment." + ] + } + }, + "/users/{user_id}/codes": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Re-create recovery codes", + "description": "Re-creates recovery codes for the MFA enrollment.", + "operationId": "recreate-recovery-codes", + "tags": [ + "Mfa" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recovery_codes": { + "type": "array", + "description": "A list of recovery codes for the MFA enrollment.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "recreate-recovery-codes", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Re-creates recovery codes for the MFA enrollment." + ] + } + }, + "/users/{user_id}/phonenumber": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Verify phone number", + "description": "Starts a phone number verification session.", + "operationId": "verify-phone-number", + "tags": [ + "PhoneNumber" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sid": { + "type": "string", + "description": "Session ID of the verification." + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "description": "The channel used to receive the verification code.", + "enum": [ + "sms", + "whatsapp", + "call" + ] + }, + "phone_number": { + "type": "string", + "description": "The phone number used to receive the verification code." + } + }, + "required": [ + "channel", + "phone_number" + ] + } + } + } + }, + "x-property-id-kebab": "verify-phone-number", + "x-tag-id-kebab": "PhoneNumber", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Starts a phone number verification session." + ] + } + }, + "/users/{user_id}/phonenumber/{sid}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "sid", + "in": "path", + "required": true, + "description": "The session ID obtained from `POST /users/{user_id}/phonenumber`." + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Confirm phone number", + "description": "Confirms phone number using a verification code.", + "operationId": "confirm-phone-number", + "tags": [ + "PhoneNumber" + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The verification code received on your phone." + } + }, + "required": [ + "code" + ] + } + } + } + }, + "x-property-id-kebab": "confirm-phone-number", + "x-tag-id-kebab": "PhoneNumber", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Confirms phone number using a verification code." + ] + } + }, + "/users/{user_id}/teams": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "User teams", + "description": "Retrieves teams that the specified user is a member of.", + "operationId": "list-user-teams", + "tags": [ + "Teams" + ], + "parameters": [ + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "count": { + "type": "integer", + "description": "Total count of all the teams." + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-teams", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves teams that the specified user is a member of." + ] + } + }, + "/projects/{projectId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Get a project", + "description": "Retrieve the details of a single project.", + "x-property-id-kebab": "get-projects", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Project" + ], + "x-return-types-union": "\\Upsun\\Model\\Project", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Project" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the details of a single project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "update-projects", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Update a project", + "description": "Update the details of an existing project.", + "x-property-id-kebab": "update-projects", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the details of an existing project." + ] + } + }, + "/projects/{projectId}/activities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityCollection" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Get project activity log", + "description": "Retrieve a project's activity log including logging actions in all\nenvironments within a project. This returns a list of objects\nwith records of actions such as:\n\n- Commits being pushed to the repository\n- A new environment being branched out from the specified environment\n- A snapshot being created of the specified environment\n\nThe object includes a timestamp of when the action occurred\n(`created_at`), when the action concluded (`updated_at`),\nthe current `state` of the action, the action's completion\npercentage (`completion_percent`), the `environments` it\napplies to and when the activity expires (`expires_at`).\n\nThere are other related information in the `payload`.\nThe contents of the `payload` varies based on the `type` of the\nactivity. For example:\n\n- An `environment.branch` action's `payload` can contain objects\nrepresenting the environment's `parent` environment and the\nbranching action's `outcome`.\n\n- An `environment.push` action's `payload` can contain objects\nrepresenting the `environment`, the specific `commits` included in\nthe push, and the `user` who pushed.\n\nExpired activities are removed from the project activity log, except\nthe last 100 expired objects provided they are not of type `environment.cron`\nor `environment.backup`.\n", + "x-property-id-kebab": "list-projects-activities", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a project's activity log including logging actions in all environments within a project. This returns a", + "list of objects with records of actions such as: - Commits being pushed to the repository - A new environment", + "being branched out from the specified environment - A snapshot being created of the specified environment The", + "object includes a timestamp of when the action occurred (`created_at`), when the action concluded (`updated_at`),", + "the current `state` of the action, the action's completion percentage (`completion_percent`), the `environments`", + "it applies to and when the activity expires (`expires_at`). There are other related information in the `payload`.", + "The contents of the `payload` varies based on the `type` of the activity. For example: - An `environment.branch`", + "action's `payload` can contain objects representing the environment's `parent` environment and the branching", + "action's `outcome`. - An `environment.push` action's `payload` can contain objects representing the", + "`environment`, the specific `commits` included in the push, and the `user` who pushed. Expired activities are", + "removed from the project activity log, except the last 100 expired objects provided they are not of type", + "`environment.cron` or `environment.backup`." + ] + } + }, + "/projects/{projectId}/activities/{activityId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "get-projects-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Get a project activity log entry", + "description": "Retrieve a single activity log entry as specified by an\n`id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint. See the documentation on that endpoint for details about\nthe information this endpoint can return.\n", + "x-property-id-kebab": "get-projects-activities", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Activity" + ], + "x-return-types-union": "\\Upsun\\Model\\Activity", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single activity log entry as specified by an `id` returned by the Get project activity log", + "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. See the", + "documentation on that endpoint for details about the information this endpoint can return." + ] + } + }, + "/projects/{projectId}/activities/{activityId}/cancel": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "action-projects-activities-cancel", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Cancel a project activity", + "description": "Cancel a single activity as specified by an `id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint.\n\nPlease note that not all activities are cancelable.\n", + "x-property-id-kebab": "action-projects-activities-cancel", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Cancel a single activity as specified by an `id` returned by the Get project activity log", + "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. Please", + "note that not all activities are cancelable." + ] + } + }, + "/projects/{projectId}/capabilities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-capabilities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCapabilities" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Get a project's capabilities", + "description": "Get a list of capabilities on a project, as defined by the billing system.\nFor instance, one special capability that could be defined on a project is\nlarge development environments.\n", + "x-property-id-kebab": "get-projects-capabilities", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectCapabilities" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectCapabilities", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectCapabilities" + }, + "x-returnable": true, + "x-description": [ + "Get a list of capabilities on a project, as defined by the billing system. For instance, one special capability", + "that could be defined on a project is large development environments." + ] + } + }, + "/projects/{projectId}/certificates": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateCollection" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Get list of SSL certificates", + "description": "Retrieve a list of objects representing the SSL certificates\nassociated with a project.\n", + "x-property-id-kebab": "list-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Certificate[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Certificate[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the SSL certificates associated with a project." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateCreateInput" + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Add an SSL certificate", + "description": "Add a single SSL certificate to a project.\n", + "x-property-id-kebab": "create-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a single SSL certificate to a project." + ] + } + }, + "/projects/{projectId}/certificates/{certificateId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "get-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Get an SSL certificate", + "description": "Retrieve information about a single SSL certificate\nassociated with a project.\n", + "x-property-id-kebab": "get-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Certificate" + ], + "x-return-types-union": "\\Upsun\\Model\\Certificate", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Certificate" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about a single SSL certificate associated with a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificatePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "update-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Update an SSL certificate", + "description": "Update a single SSL certificate associated with a project.\n", + "x-property-id-kebab": "update-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update a single SSL certificate associated with a project." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "delete-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Delete an SSL certificate", + "description": "Delete a single SSL certificate associated with a project.\n", + "x-property-id-kebab": "delete-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single SSL certificate associated with a project." + ] + } + }, + "/projects/{projectId}/clear_build_cache": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "action-projects-clear-build-cache", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Clear project build cache", + "description": "On rare occasions, a project's build cache can become corrupted. This\nendpoint will entirely flush the project's build cache. More information\non [clearing the build cache can be found in our user documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)\n", + "x-property-id-kebab": "action-projects-clear-build-cache", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "On rare occasions, a project's build cache can become corrupted. This endpoint will entirely flush the project's", + "build cache. More information on [clearing the build cache can be found in our user", + "documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)" + ] + } + }, + "/projects/{projectId}/deployments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetCollection" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Get project deployment target info", + "description": "The deployment target information for the project.\n", + "x-property-id-kebab": "list-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\DeploymentTarget[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\DeploymentTarget[]" + }, + "x-returnable": true, + "x-description": [ + "The deployment target information for the project." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetCreateInput" + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Create a project deployment target", + "description": "Set the deployment target information for a project.\n", + "x-property-id-kebab": "create-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Set the deployment target information for a project." + ] + } + }, + "/projects/{projectId}/deployments/{deploymentTargetConfigurationId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "get-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTarget" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Get a single project deployment target", + "description": "Get a single deployment target configuration of a project.\n", + "x-property-id-kebab": "get-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\DeploymentTarget" + ], + "x-return-types-union": "\\Upsun\\Model\\DeploymentTarget", + "x-phpdoc": { + "return": "\\Upsun\\Model\\DeploymentTarget" + }, + "x-returnable": true, + "x-description": [ + "Get a single deployment target configuration of a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "update-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Update a project deployment", + "x-property-id-kebab": "update-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "delete-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Delete a single project deployment target", + "description": "Delete a single deployment target configuration associated with a specific project.\n", + "x-property-id-kebab": "delete-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single deployment target configuration associated with a specific project." + ] + } + }, + "/projects/{projectId}/domains": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCollection" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get list of project domains", + "description": "Retrieve a list of objects representing the user-specified domains\nassociated with a project. Note that this does *not* return the\ndomains automatically assigned to a project that appear under\n\"Access site\" on the user interface.\n", + "x-property-id-kebab": "list-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-specified domains associated with a project. Note that this does", + "*not* return the domains automatically assigned to a project that appear under \"Access site\" on the user", + "interface." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCreateInput" + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Add a project domain", + "description": "Add a single domain to a project.\nIf the `ssl` field is left blank without an object containing\na PEM-encoded SSL certificate, a certificate will\n[be provisioned for you via Let's Encrypt.](https://docs.upsun.com/anchors/routes/https/certificates/)\n", + "x-property-id-kebab": "create-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a single domain to a project. If the `ssl` field is left blank without an object containing a PEM-encoded SSL", + "certificate, a certificate will [be provisioned for you via Let's", + "Encrypt.](https://docs.upsun.com/anchors/routes/https/certificates/)" + ] + } + }, + "/projects/{projectId}/domains/{domainId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "get-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get a project domain", + "description": "Retrieve information about a single user-specified domain\nassociated with a project.\n", + "x-property-id-kebab": "get-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Domain" + ], + "x-return-types-union": "\\Upsun\\Model\\Domain", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about a single user-specified domain associated with a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "update-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Update a project domain", + "description": "Update the information associated with a single user-specified\ndomain associated with a project.\n", + "x-property-id-kebab": "update-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the information associated with a single user-specified domain associated with a project." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "delete-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Delete a project domain", + "description": "Delete a single user-specified domain associated with a project.\n", + "x-property-id-kebab": "delete-projects-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-specified domain associated with a project." + ] + } + }, + "/projects/{projectId}/environment-types": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-environment-types", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentTypeCollection" + } + } + } + } + }, + "tags": [ + "Environment Type" + ], + "summary": "Get environment types", + "description": "List all available environment types", + "x-property-id-kebab": "list-projects-environment-types", + "x-tag-id-kebab": "Environment-Type", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentType[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentType[]" + }, + "x-returnable": true, + "x-description": [ + "List all available environment types" + ] + } + }, + "/projects/{projectId}/environment-types/{environmentTypeId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentTypeId" + } + ], + "operationId": "get-environment-type", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentType" + } + } + } + } + }, + "tags": [ + "Environment Type" + ], + "summary": "Get environment type links", + "description": "Lists the endpoints used to retrieve info about the environment type.", + "x-property-id-kebab": "get-environment-type", + "x-tag-id-kebab": "Environment-Type", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentType" + ], + "x-return-types-union": "\\Upsun\\Model\\EnvironmentType", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentType" + }, + "x-returnable": true, + "x-description": [ + "Lists the endpoints used to retrieve info about the environment type." + ] + } + }, + "/projects/{projectId}/environments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-environments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentCollection" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Get list of project environments", + "description": "Retrieve a list of a project's existing environments and the\ninformation associated with each environment.\n", + "x-property-id-kebab": "list-projects-environments", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Environment[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Environment[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of a project's existing environments and the information associated with each environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "get-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Environment" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Get an environment", + "description": "Retrieve the details of a single existing environment.", + "x-property-id-kebab": "get-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Environment" + ], + "x-return-types-union": "\\Upsun\\Model\\Environment", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Environment" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the details of a single existing environment." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "update-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Update an environment", + "description": "Update the details of a single existing environment.", + "x-property-id-kebab": "update-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the details of a single existing environment." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "delete-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Delete an environment", + "description": "Delete a specified environment.", + "x-property-id-kebab": "delete-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a specified environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activate": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "activate-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentActivateInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Activate an environment", + "description": "Set the specified environment's status to active", + "x-property-id-kebab": "activate-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Set the specified environment's status to active" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityCollection" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Get environment activity log", + "description": "Retrieve an environment's activity log. This returns a list of object\nwith records of actions such as:\n\n- Commits being pushed to the repository\n- A new environment being branched out from the specified environment\n- A snapshot being created of the specified environment\n\nThe object includes a timestamp of when the action occurred\n(`created_at`), when the action concluded (`updated_at`),\nthe current `state` of the action, the action's completion\npercentage (`completion_percent`), and other related information in\nthe `payload`.\n\nThe contents of the `payload` varies based on the `type` of the\nactivity. For example:\n\n- An `environment.branch` action's `payload` can contain objects\nrepresenting the `parent` environment and the branching action's\n`outcome`.\n\n- An `environment.push` action's `payload` can contain objects\nrepresenting the `environment`, the specific `commits` included in\nthe push, and the `user` who pushed.\n", + "x-property-id-kebab": "list-projects-environments-activities", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve an environment's activity log. This returns a list of object with records of actions such as: - Commits", + "being pushed to the repository - A new environment being branched out from the specified environment - A snapshot", + "being created of the specified environment The object includes a timestamp of when the action occurred", + "(`created_at`), when the action concluded (`updated_at`), the current `state` of the action, the action's", + "completion percentage (`completion_percent`), and other related information in the `payload`. The contents of the", + "`payload` varies based on the `type` of the activity. For example: - An `environment.branch` action's `payload`", + "can contain objects representing the `parent` environment and the branching action's `outcome`. - An", + "`environment.push` action's `payload` can contain objects representing the `environment`, the specific `commits`", + "included in the push, and the `user` who pushed." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activities/{activityId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "get-projects-environments-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Get an environment activity log entry", + "description": "Retrieve a single environment activity entry as specified by an\n`id` returned by the\n[Get environment activities list](#tag/Environment-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1activities%2Fget)\nendpoint. See the documentation on that endpoint for details about\nthe information this endpoint can return.\n", + "x-property-id-kebab": "get-projects-environments-activities", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Activity" + ], + "x-return-types-union": "\\Upsun\\Model\\Activity", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single environment activity entry as specified by an `id` returned by the Get environment activities", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", + "endpoint. See the documentation on that endpoint for details about the information this endpoint can return." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/activities/{activityId}/cancel": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "action-projects-environments-activities-cancel", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Cancel an environment activity", + "description": "Cancel a single activity as specified by an `id` returned by the\n[Get environment activities list](#tag/Environment-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1activities%2Fget)\nendpoint.\n\nPlease note that not all activities are cancelable.\n", + "x-property-id-kebab": "action-projects-environments-activities-cancel", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Cancel a single activity as specified by an `id` returned by the Get environment activities list", + "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", + "endpoint. Please note that not all activities are cancelable." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backup": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "backup-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentBackupInput" + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Create backup of environment", + "description": "Trigger a new backup of an environment to be created. See the\n[Backups](https://docs.upsun.com/anchors/environments/backup/)\nsection of the documentation for more information.\n", + "x-property-id-kebab": "backup-environment", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Trigger a new backup of an environment to be created. See the", + "[Backups](https://docs.upsun.com/anchors/environments/backup/) section of the documentation for more information." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backups": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BackupCollection" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Get an environment's backup list", + "description": "Retrieve a list of objects representing backups of this environment.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "list-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Backup[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Backup[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing backups of this environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backups/{backupId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "get-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Backup" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Get an environment backup's info", + "description": "Get the details of a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "get-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Backup" + ], + "x-return-types-union": "\\Upsun\\Model\\Backup", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Backup" + }, + "x-returnable": true, + "x-description": [ + "Get the details of a specific backup from an environment using the `id` of the entry retrieved by the Get backups", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "delete-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Delete an environment backup", + "description": "Delete a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "delete-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/backups/{backupId}/restore": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "restore-backup", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentRestoreInput" + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Restore an environment snapshot", + "description": "Restore a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL", + "x-property-id-kebab": "restore-backup", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Restore a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/branch": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "branch-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentBranchInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Branch an environment", + "description": "Create a new environment as a branch of the current environment.\n", + "x-property-id-kebab": "branch-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Create a new environment as a branch of the current environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deactivate": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "deactivate-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Deactivate an environment", + "description": "Destroy all services and data running on this environment so that\nonly the Git branch remains. The environment can be reactivated\nlater at any time; reactivating an environment will sync data\nfrom the parent environment and redeploy.\n\n**NOTE: ALL DATA IN THIS ENVIRONMENT WILL BE IRREVOCABLY LOST**\n", + "x-property-id-kebab": "deactivate-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Destroy all services and data running on this environment so that only the Git branch remains. The environment", + "can be reactivated later at any time; reactivating an environment will sync data from the parent environment and", + "redeploy. **NOTE: ALL DATA IN THIS ENVIRONMENT WILL BE IRREVOCABLY LOST**" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "deploy-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentDeployInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Deploy an environment", + "description": "Trigger a controlled [manual deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment)\nto release all the staged changes\n", + "x-property-id-kebab": "deploy-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Trigger a controlled [manual", + "deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment) to release all the staged", + "changes" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentCollection" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "summary": "Get an environment's deployment information", + "description": "Retrieve the read-only configuration of an environment's deployment.\nThe returned information is everything required to\nrecreate a project's current deployment.\n\nMore specifically, the objects\nreturned by this endpoint contain the configuration derived from the\nrepository's YAML configuration file: `.upsun/config.yaml`.\n\nAdditionally, any values deriving from environment variables, the\ndomains attached to a project, project access settings, etc. are\nincluded here.\n\nThis endpoint currently returns a list containing a single deployment\nconfiguration with an `id` of `current`. This may be subject to change\nin the future.\n", + "x-property-id-kebab": "list-projects-environments-deployments", + "x-tag-id-kebab": "Deployment", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Deployment[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Deployment[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the read-only configuration of an environment's deployment. The returned information is everything", + "required to recreate a project's current deployment. More specifically, the objects returned by this endpoint", + "contain the configuration derived from the repository's YAML configuration file: `.upsun/config.yaml`.", + "Additionally, any values deriving from environment variables, the domains attached to a project, project access", + "settings, etc. are included here. This endpoint currently returns a list containing a single deployment", + "configuration with an `id` of `current`. This may be subject to change in the future." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentId" + } + ], + "operationId": "get-projects-environments-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "summary": "Get a single environment deployment", + "description": "Retrieve a single deployment configuration with an id of `current`. This may be subject to change in the future.\nOnly `current` can be queried.\n", + "x-property-id-kebab": "get-projects-environments-deployments", + "x-tag-id-kebab": "Deployment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Deployment" + ], + "x-return-types-union": "\\Upsun\\Model\\Deployment", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Deployment" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single deployment configuration with an id of `current`. This may be subject to change in the future.", + "Only `current` can be queried." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/operations": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentId" + } + ], + "operationId": "run-operation", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentOperationInput" + } + } + } + }, + "tags": [ + "Runtime Operations" + ], + "summary": "Execute a runtime operation", + "description": "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml` configuration. More information on runtime operations is [available in our user documentation](https://docs.upsun.com/anchors/app/runtime-operations/).", + "x-property-id-kebab": "run-operation", + "x-tag-id-kebab": "Runtime-Operations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as", + "rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml`", + "configuration. More information on runtime operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/runtime-operations/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/domains": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCollection" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get a list of environment domains", + "description": "Retrieve a list of objects representing the user-specified domains\nassociated with an environment. Note that this does *not* return the\n`.platformsh.site` subdomains, which are automatically assigned to\nthe environment.\n", + "x-property-id-kebab": "list-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-specified domains associated with an environment. Note that this", + "does *not* return the `.platformsh.site` subdomains, which are automatically assigned to the environment." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCreateInput" + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Add an environment domain", + "description": "Add a single domain to an environment.\nIf the environment is not production, the `replacement_for` field\nis required, which binds a new domain to an existing one from a\nproduction environment.\nIf the `ssl` field is left blank without an object containing\na PEM-encoded SSL certificate, a certificate will\n[be provisioned for you via Let's Encrypt](https://docs.upsun.com/anchors/routes/https/certificates/).\n", + "x-property-id-kebab": "create-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a single domain to an environment. If the environment is not production, the `replacement_for` field is", + "required, which binds a new domain to an existing one from a production environment. If the `ssl` field is left", + "blank without an object containing a PEM-encoded SSL certificate, a certificate will [be provisioned for you via", + "Let's Encrypt](https://docs.upsun.com/anchors/routes/https/certificates/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/domains/{domainId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "get-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get an environment domain", + "description": "Retrieve information about a single user-specified domain\nassociated with an environment.\n", + "x-property-id-kebab": "get-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Domain" + ], + "x-return-types-union": "\\Upsun\\Model\\Domain", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Domain" + }, + "x-returnable": true, + "x-description": [ + "Retrieve information about a single user-specified domain associated with an environment." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "update-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Update an environment domain", + "description": "Update the information associated with a single user-specified\ndomain associated with an environment.\n", + "x-property-id-kebab": "update-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the information associated with a single user-specified domain associated with an environment." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "delete-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Delete an environment domain", + "description": "Delete a single user-specified domain associated with an environment.\n", + "x-property-id-kebab": "delete-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-specified domain associated with an environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/initialize": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "initialize-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentInitializeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Initialize a new environment", + "description": "Initialize and configure a new environment with an existing repository.\nThe payload is the url of a git repository with a profile name:\n\n```\n{\n \"repository\": \"git@github.com:platformsh/a-project-template.git@master\",\n \"profile\": \"Example Project\",\n \"files\": [\n {\n \"mode\": 0600,\n \"path\": \"config.json\",\n \"contents\": \"XXXXXXXX\"\n }\n ]\n}\n```\nIt can optionally carry additional files that will be committed to the\nrepository, the POSIX file mode to set on each file, and the base64-encoded\ncontents of each file.\n\nThis endpoint can also add a second repository\nURL in the `config` parameter that will be added to the contents of the first.\nThis allows you to put your application in one repository and the Upsun\nYAML configuration files in another.\n", + "x-property-id-kebab": "initialize-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Initialize and configure a new environment with an existing repository. The payload is the url of a git", + "repository with a profile name: ``` { \"repository\": \"git@github.com:platformsh/a-project-template.git@master\",", + "\"profile\": \"Example Project\", \"files\": [ { \"mode\": 0600, \"path\": \"config.json\", \"contents\": \"XXXXXXXX\" } ] } ```", + "It can optionally carry additional files that will be committed to the repository, the POSIX file mode to set on", + "each file, and the base64-encoded contents of each file. This endpoint can also add a second repository URL in", + "the `config` parameter that will be added to the contents of the first. This allows you to put your application", + "in one repository and the Upsun YAML configuration files in another." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/merge": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "merge-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentMergeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Merge an environment", + "description": "Merge an environment into its parent. This means that code changes\nfrom the branch environment will be merged into the parent branch, and\nthe parent branch will be rebuilt and deployed with the new code changes,\nretaining the existing data in the parent environment.\n", + "x-property-id-kebab": "merge-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Merge an environment into its parent. This means that code changes from the branch environment will be merged", + "into the parent branch, and the parent branch will be rebuilt and deployed with the new code changes, retaining", + "the existing data in the parent environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/pause": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "pause-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Pause an environment", + "description": "Pause an environment, stopping all services and applications (except the router).\n\nDevelopment environments are often used for a limited time and then abandoned.\nTo prevent unnecessary consumption of resources, development environments that\nhaven't been redeployed in 14 days are automatically paused.\n\nYou can pause an environment manually at any time using this endpoint. Further\ninformation is available in our [public documentation](https://docs.upsun.com/anchors/environments/paused/).\n", + "x-property-id-kebab": "pause-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Pause an environment, stopping all services and applications (except the router). Development environments are", + "often used for a limited time and then abandoned. To prevent unnecessary consumption of resources, development", + "environments that haven't been redeployed in 14 days are automatically paused. You can pause an environment", + "manually at any time using this endpoint. Further information is available in our [public", + "documentation](https://docs.upsun.com/anchors/environments/paused/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/redeploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "redeploy-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Redeploy an environment", + "description": "Trigger the redeployment sequence of an environment.", + "x-property-id-kebab": "redeploy-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Trigger the redeployment sequence of an environment." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/resume": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "resume-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Resume a paused environment", + "description": "Resume a paused environment, restarting all services and applications.\n\nDevelopment environments that haven't been used for 14 days will be paused\nautomatically. They can be resumed via a redeployment or manually using this\nendpoint or the CLI as described in the [public documentation](https://docs.upsun.com/anchors/environments/paused/).\n", + "x-property-id-kebab": "resume-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Resume a paused environment, restarting all services and applications. Development environments that haven't been", + "used for 14 days will be paused automatically. They can be resumed via a redeployment or manually using this", + "endpoint or the CLI as described in the [public", + "documentation](https://docs.upsun.com/anchors/environments/paused/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/routes": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-routes", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteCollection" + } + } + } + } + }, + "tags": [ + "Routing" + ], + "summary": "Get list of routes", + "description": "Retrieve a list of objects containing route definitions for\na specific environment. The definitions returned by this endpoint\nare those present in an environment's `.upsun/config.yaml` file.\n", + "x-property-id-kebab": "list-projects-environments-routes", + "x-tag-id-kebab": "Routing", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Route[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Route[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects containing route definitions for a specific environment. The definitions returned by", + "this endpoint are those present in an environment's `.upsun/config.yaml` file." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/routes/{routeId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "routeId" + } + ], + "operationId": "get-projects-environments-routes", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Route" + } + } + } + } + }, + "tags": [ + "Routing" + ], + "summary": "Get a route's info", + "description": "Get details of a route from an environment using the `id` of the entry\nretrieved by the [Get environment routes list](#tag/Environment-Routes%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1routes%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-environments-routes", + "x-tag-id-kebab": "Routing", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Route" + ], + "x-return-types-union": "\\Upsun\\Model\\Route", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Route" + }, + "x-returnable": true, + "x-description": [ + "Get details of a route from an environment using the `id` of the entry retrieved by the Get environment routes", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Routes/paths//projects/{projectId}/environments/{environmentId}/routes/get)", + "endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/source-operation": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "run-source-operation", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSourceOperationInput" + } + } + } + }, + "tags": [ + "Source Operations" + ], + "summary": "Trigger a source operation", + "description": "This endpoint triggers a source code operation as defined in the `source.operations`\nkey in a project's `.upsun/config.yaml` configuration. More information\non source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/reference/source/operations/).\n", + "x-property-id-kebab": "run-source-operation", + "x-tag-id-kebab": "Source-Operations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "This endpoint triggers a source code operation as defined in the `source.operations` key in a project's", + "`.upsun/config.yaml` configuration. More information on source code operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/source-operations": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-source-operations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSourceOperationCollection" + } + } + } + } + }, + "tags": [ + "Source Operations" + ], + "summary": "List source operations", + "description": "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment.\nMore information on source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/reference/source/operations/).\n", + "x-property-id-kebab": "list-projects-environments-source-operations", + "x-tag-id-kebab": "Source-Operations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentSourceOperation[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentSourceOperation[]" + }, + "x-returnable": true, + "x-description": [ + "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment. More", + "information on source code operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/synchronize": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "synchronize-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSynchronizeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Synchronize a child environment with its parent", + "description": "This synchronizes the code and/or data of an environment with that of\nits parent, then redeploys the environment. Synchronization is only\npossible if a branch has no unmerged commits and it can be fast-forwarded.\n\nIf data synchronization is specified, the data in the environment will\nbe overwritten with that of its parent.\n", + "x-property-id-kebab": "synchronize-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "This synchronizes the code and/or data of an environment with that of its parent, then redeploys the environment.", + "Synchronization is only possible if a branch has no unmerged commits and it can be fast-forwarded. If data", + "synchronization is specified, the data in the environment will be overwritten with that of its parent." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/variables": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableCollection" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Get list of environment variables", + "description": "Retrieve a list of objects representing the user-defined variables\nwithin an environment.\n", + "x-property-id-kebab": "list-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentVariable[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentVariable[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-defined variables within an environment." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableCreateInput" + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Add an environment variable", + "description": "Add a variable to an environment. The `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nAdditionally, the inheritability of an environment variable can be\ndetermined through the `is_inheritable` flag (default: true).\nSee the [Environment Variables](https://docs.upsun.com/anchors/variables/set/environment/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "create-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a variable to an environment. The `value` can be either a string or a JSON object (default: string), as", + "specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable can be", + "determined through the `is_inheritable` flag (default: true). See the [Environment", + "Variables](https://docs.upsun.com/anchors/variables/set/environment/create/) section in our documentation for", + "more information." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/variables/{variableId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "get-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Get an environment variable", + "description": "Retrieve a single user-defined environment variable.", + "x-property-id-kebab": "get-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentVariable" + ], + "x-return-types-union": "\\Upsun\\Model\\EnvironmentVariable", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentVariable" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single user-defined environment variable." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariablePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "update-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Update an environment variable", + "description": "Update a single user-defined environment variable.\nThe `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nAdditionally, the inheritability of an environment variable can be\ndetermined through the `is_inheritable` flag (default: true).\nSee the [Variables](https://docs.upsun.com/anchors/variables/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "update-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update a single user-defined environment variable. The `value` can be either a string or a JSON object (default:", + "string), as specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable", + "can be determined through the `is_inheritable` flag (default: true). See the", + "[Variables](https://docs.upsun.com/anchors/variables/) section in our documentation for more information." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "delete-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Delete an environment variable", + "description": "Delete a single user-defined environment variable.", + "x-property-id-kebab": "delete-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-defined environment variable." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/versions": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCollection" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "List versions associated with the environment", + "description": "List versions associated with the `{environmentId}` environment.\nAt least one version always exists.\nWhen multiple versions exist, it means that multiple versions of an app are deployed.\nThe deployment target type denotes whether staged deployment is supported.\n", + "x-property-id-kebab": "list-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Version[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Version[]" + }, + "x-returnable": true, + "x-description": [ + "List versions associated with the `{environmentId}` environment. At least one version always exists. When", + "multiple versions exist, it means that multiple versions of an app are deployed. The deployment target type", + "denotes whether staged deployment is supported." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreateInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Create versions associated with the environment", + "description": "Create versions associated with the `{environmentId}` environment.\nAt least one version always exists.\nWhen multiple versions exist, it means that multiple versions of an app are deployed.\nThe deployment target type denotes whether staged deployment is supported.\n", + "x-property-id-kebab": "create-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Create versions associated with the `{environmentId}` environment. At least one version always exists. When", + "multiple versions exist, it means that multiple versions of an app are deployed. The deployment target type", + "denotes whether staged deployment is supported." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/versions/{versionId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "versionId" + } + ], + "operationId": "get-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Version" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "List the version", + "description": "List the `{versionId}` version.\nA routing percentage for this version may be specified for staged rollouts\n(if the deployment target supports it).\n", + "x-property-id-kebab": "get-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Version" + ], + "x-return-types-union": "\\Upsun\\Model\\Version", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Version" + }, + "x-returnable": true, + "x-description": [ + "List the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if", + "the deployment target supports it)." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "versionId" + } + ], + "operationId": "update-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Update the version", + "description": "Update the `{versionId}` version.\nA routing percentage for this version may be specified for staged rollouts\n(if the deployment target supports it).\n", + "x-property-id-kebab": "update-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if", + "the deployment target supports it)." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "versionId" + } + ], + "operationId": "delete-projects-environments-versions", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Delete the version", + "description": "Delete the `{versionId}` version.\nA routing percentage for this version may be specified for staged rollouts\n(if the deployment target supports it).\n", + "x-property-id-kebab": "delete-projects-environments-versions", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete the `{versionId}` version. A routing percentage for this version may be specified for staged rollouts (if", + "the deployment target supports it)." + ] + } + }, + "/projects/{projectId}/git/blobs/{repositoryBlobId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryBlobId" + } + ], + "operationId": "get-projects-git-blobs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blob" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a blob object", + "description": "Retrieve, by hash, an object representing a blob in the repository\nbacking a project. This endpoint allows direct read-only access\nto the contents of files in a repo. It returns the file in the\n`content` field of the response object, encoded according to the\nformat in the `encoding` field, e.g. `base64`.\n", + "x-property-id-kebab": "get-projects-git-blobs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Blob" + ], + "x-return-types-union": "\\Upsun\\Model\\Blob", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Blob" + }, + "x-returnable": true, + "x-description": [ + "Retrieve, by hash, an object representing a blob in the repository backing a project. This endpoint allows direct", + "read-only access to the contents of files in a repo. It returns the file in the `content` field of the response", + "object, encoded according to the format in the `encoding` field, e.g. `base64`." + ] + } + }, + "/projects/{projectId}/git/commits/{repositoryCommitId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryCommitId" + } + ], + "operationId": "get-projects-git-commits", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Commit" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a commit object", + "description": "Retrieve, by hash, an object representing a commit in the repository backing\na project. This endpoint functions similarly to `git cat-file -p `.\nThe returned object contains the hash of the Git tree that it\nbelongs to, as well as the ID of parent commits.\n\nThe commit represented by a parent ID can be retrieved using this\nendpoint, while the tree state represented by this commit can\nbe retrieved using the\n[Get a tree object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1trees~1%7BrepositoryTreeId%7D%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-git-commits", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Commit" + ], + "x-return-types-union": "\\Upsun\\Model\\Commit", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Commit" + }, + "x-returnable": true, + "x-description": [ + "Retrieve, by hash, an object representing a commit in the repository backing a project. This endpoint functions", + "similarly to `git cat-file -p `. The returned object contains the hash of the Git tree that it belongs", + "to, as well as the ID of parent commits. The commit represented by a parent ID can be retrieved using this", + "endpoint, while the tree state represented by this commit can be retrieved using the Get a tree object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/trees/{repositoryTreeId}/get) endpoint." + ] + } + }, + "/projects/{projectId}/git/refs": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-git-refs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefCollection" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get list of repository refs", + "description": "Retrieve a list of `refs/*` in the repository backing a project.\nThis endpoint functions similarly to `git show-ref`, with each\nreturned object containing a `ref` field with the ref's name,\nand an object containing the associated commit ID.\n\nThe returned commit ID can be used with the\n[Get a commit object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1commits~1%7BrepositoryCommitId%7D%2Fget)\nendpoint to retrieve information about that specific commit.\n", + "x-property-id-kebab": "list-projects-git-refs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Ref[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ref[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of `refs/*` in the repository backing a project. This endpoint functions similarly to `git", + "show-ref`, with each returned object containing a `ref` field with the ref's name, and an object containing the", + "associated commit ID. The returned commit ID can be used with the Get a commit object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/commits/{repositoryCommitId}/get)", + "endpoint to retrieve information about that specific commit." + ] + } + }, + "/projects/{projectId}/git/refs/{repositoryRefId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryRefId" + } + ], + "operationId": "get-projects-git-refs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ref" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a ref object", + "description": "Retrieve the details of a single `refs` object in the repository\nbacking a project. This endpoint functions similarly to\n`git show-ref `, although the pattern must be a full ref `id`,\nrather than a matching pattern.\n\n*NOTE: The `{repositoryRefId}` must be properly escaped.*\nThat is, the ref `refs/heads/master` is accessible via\n`/projects/{projectId}/git/refs/heads%2Fmaster`.\n", + "x-property-id-kebab": "get-projects-git-refs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Ref" + ], + "x-return-types-union": "\\Upsun\\Model\\Ref", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ref" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the details of a single `refs` object in the repository backing a project. This endpoint functions", + "similarly to `git show-ref `, although the pattern must be a full ref `id`, rather than a matching", + "pattern. *NOTE: The `{repositoryRefId}` must be properly escaped.* That is, the ref `refs/heads/master` is", + "accessible via `/projects/{projectId}/git/refs/heads/master`." + ] + } + }, + "/projects/{projectId}/git/trees/{repositoryTreeId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "repositoryTreeId" + } + ], + "operationId": "get-projects-git-trees", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tree" + } + } + } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a tree object", + "description": "Retrieve, by hash, the tree state represented by a commit.\nThe returned object's `tree` field contains a list of files and\ndirectories present in the tree.\n\nDirectories in the tree can be recursively retrieved by this endpoint\nthrough their hashes. Files in the tree can be retrieved by the\n[Get a blob object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1blobs~1%7BrepositoryBlobId%7D%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-git-trees", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Tree" + ], + "x-return-types-union": "\\Upsun\\Model\\Tree", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Tree" + }, + "x-returnable": true, + "x-description": [ + "Retrieve, by hash, the tree state represented by a commit. The returned object's `tree` field contains a list of", + "files and directories present in the tree. Directories in the tree can be recursively retrieved by this endpoint", + "through their hashes. Files in the tree can be retrieved by the Get a blob object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/blobs/{repositoryBlobId}/get) endpoint." + ] + } + }, + "/projects/{projectId}/integrations": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationCollection" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Get list of existing integrations for a project", + "x-property-id-kebab": "list-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\Integration[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Integration[]" + }, + "x-returnable": true + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationCreateInput" + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Integrate project with a third-party service", + "x-property-id-kebab": "create-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/integrations/{integrationId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "get-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Get information about an existing third-party integration", + "x-property-id-kebab": "get-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Integration" + ], + "x-return-types-union": "\\Upsun\\Model\\Integration", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Integration" + }, + "x-returnable": true + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "update-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Update an existing third-party integration", + "x-property-id-kebab": "update-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "delete-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Delete an existing third-party integration", + "x-property-id-kebab": "delete-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/provisioners": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisionerCollection" + } + } + } + } + }, + "tags": [ + "CertificateProvisioner" + ], + "x-property-id-kebab": "list-projects-provisioners", + "x-tag-id-kebab": "CertificateProvisioner", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\CertificateProvisioner[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\CertificateProvisioner[]" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/provisioners/{certificateProvisionerDocumentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateProvisionerDocumentId" + } + ], + "operationId": "get-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisioner" + } + } + } + } + }, + "tags": [ + "CertificateProvisioner" + ], + "x-property-id-kebab": "get-projects-provisioners", + "x-tag-id-kebab": "CertificateProvisioner", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\CertificateProvisioner" + ], + "x-return-types-union": "\\Upsun\\Model\\CertificateProvisioner", + "x-phpdoc": { + "return": "\\Upsun\\Model\\CertificateProvisioner" + }, + "x-returnable": true + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisionerPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateProvisionerDocumentId" + } + ], + "operationId": "update-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "CertificateProvisioner" + ], + "x-property-id-kebab": "update-projects-provisioners", + "x-tag-id-kebab": "CertificateProvisioner", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true + } + }, + "/projects/{projectId}/settings": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-settings", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSettings" + } + } + } + } + }, + "tags": [ + "Project Settings" + ], + "summary": "Get list of project settings", + "description": "Retrieve the global settings for a project.", + "x-property-id-kebab": "get-projects-settings", + "x-tag-id-kebab": "Project-Settings", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectSettings" + }, + "x-returnable": true, + "x-description": [ + "Retrieve the global settings for a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSettingsPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "update-projects-settings", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Settings" + ], + "summary": "Update a project setting", + "description": "Update one or more project-level settings.", + "x-property-id-kebab": "update-projects-settings", + "x-tag-id-kebab": "Project-Settings", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update one or more project-level settings." + ] + } + }, + "/projects/{projectId}/system": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-system", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemInformation" + } + } + } + } + }, + "tags": [ + "System Information" + ], + "summary": "Get information about the Git server.", + "description": "Output information for the project.", + "x-property-id-kebab": "get-projects-system", + "x-tag-id-kebab": "System-Information", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SystemInformation" + ], + "x-return-types-union": "\\Upsun\\Model\\SystemInformation", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SystemInformation" + }, + "x-returnable": true, + "x-description": [ + "Output information for the project." + ] + } + }, + "/projects/{projectId}/system/restart": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "action-projects-system-restart", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "System Information" + ], + "summary": "Restart the Git server", + "description": "Force the Git server to restart.", + "x-property-id-kebab": "action-projects-system-restart", + "x-tag-id-kebab": "System-Information", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Force the Git server to restart." + ] + } + }, + "/projects/{projectId}/variables": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariableCollection" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Get list of project variables", + "description": "Retrieve a list of objects representing the user-defined variables\nwithin a project.\n", + "x-property-id-kebab": "list-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectVariable[]" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectVariable[]" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a list of objects representing the user-defined variables within a project." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariableCreateInput" + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Add a project variable", + "description": "Add a variable to a project. The `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "create-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Add a variable to a project. The `value` can be either a string or a JSON object (default: string), as specified", + "by the `is_json` boolean flag. See the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)", + "section in our documentation for more information." + ] + } + }, + "/projects/{projectId}/variables/{projectVariableId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "get-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariable" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Get a project variable", + "description": "Retrieve a single user-defined project variable.", + "x-property-id-kebab": "get-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectVariable" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectVariable", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectVariable" + }, + "x-returnable": true, + "x-description": [ + "Retrieve a single user-defined project variable." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariablePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "update-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Update a project variable", + "description": "Update a single user-defined project variable.\nThe `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "update-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update a single user-defined project variable. The `value` can be either a string or a JSON object (default:", + "string), as specified by the `is_json` boolean flag. See the", + "[Variables](https://docs.upsun.com/anchors/variables/set/project/create/) section in our documentation for more", + "information." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "delete-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Delete a project variable", + "description": "Delete a single user-defined project variable.", + "x-property-id-kebab": "delete-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Delete a single user-defined project variable." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/autoscaling/settings": { + "get": { + "tags": [ + "Autoscaling" + ], + "description": "Retrieves Autoscaler settings", + "operationId": "get-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "x-property-id-kebab": "get-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerSettings" + }, + "x-returnable": true, + "x-description": [ + "Retrieves Autoscaler settings" + ] + }, + "post": { + "tags": [ + "Autoscaling" + ], + "description": "Updates Autoscaler settings", + "operationId": "post-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Settings to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "x-property-id-kebab": "post-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerSettings" + }, + "x-returnable": true, + "x-description": [ + "Updates Autoscaler settings" + ] + }, + "patch": { + "tags": [ + "Autoscaling" + ], + "description": "Modifies Autoscaler settings", + "operationId": "patch-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Settings to modify", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "x-property-id-kebab": "patch-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerSettings" + }, + "x-returnable": true, + "x-description": [ + "Modifies Autoscaler settings" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/autoscaling/alerts": { + "post": { + "tags": [ + "Autoscaling" + ], + "description": "Sends an Autoscaler alert for processing", + "operationId": "post-autoscaler-alert", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Alert to process", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerAlertPartial" + } + } + } + }, + "responses": { + "202": { + "description": "Alert is accepted for processing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerEmptyBody" + } + } + } + } + }, + "x-property-id-kebab": "post-autoscaler-alert", + "x-tag-id-kebab": "Autoscaling", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerEmptyBody" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerEmptyBody", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AutoscalerEmptyBody" + }, + "x-returnable": true, + "x-description": [ + "Sends an Autoscaler alert for processing" + ] + } + }, + "/ref/organizations": { + "get": { + "summary": "List referenced organizations", + "description": "Retrieves a list of organizations referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:organizations:0.", + "operationId": "list-referenced-orgs", + "tags": [ + "References" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated organization IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced organizations indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/OrganizationReference" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-referenced-orgs", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of organizations referenced by a trusted service. Clients cannot construct the URL themselves.", + "The correct URL will be provided in the HAL links of another API response, in the _links object with", + "a key like ref:organizations:0." + ] + } + }, + "/users/{user_id}/organizations": { + "get": { + "summary": "User organizations", + "description": "Retrieves organizations that the specified user is a member of.", + "operationId": "list-user-orgs", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[type]", + "description": "Allows filtering by `type` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[vendor]", + "description": "Allows filtering by `vendor` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-orgs", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves organizations that the specified user is a member of." + ] + } + }, + "/organizations": { + "get": { + "summary": "List organizations", + "description": "Non-admin users will only see organizations they are members of.", + "operationId": "list-orgs", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[type]", + "description": "Allows filtering by `type` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[owner_id]", + "description": "Allows filtering by `owner_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[name]", + "description": "Allows filtering by `name` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[label]", + "description": "Allows filtering by `label` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[vendor]", + "description": "Allows filtering by `vendor` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[capabilities]", + "description": "Allows filtering by `capabilites` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/ArrayFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-orgs", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Non-admin users will only see organizations they are members of." + ] + }, + "post": { + "summary": "Create organization", + "description": "Creates a new organization.", + "operationId": "create-org", + "tags": [ + "Organizations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "label" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of the organization.", + "enum": [ + "fixed", + "flexible" + ] + }, + "owner_id": { + "type": "string", + "format": "uuid", + "description": "ID of the owner." + }, + "name": { + "type": "string", + "description": "A unique machine name representing the organization." + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization." + }, + "country": { + "type": "string", + "description": "The organization country (2-letter country code).", + "maxLength": 2 + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-returnable": true, + "x-description": [ + "Creates a new organization." + ] + } + }, + "/organizations/{organization_id}": { + "get": { + "summary": "Get organization", + "description": "Retrieves the specified organization.", + "operationId": "get-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified organization." + ] + }, + "patch": { + "summary": "Update organization", + "description": "Updates the specified organization.", + "operationId": "update-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique machine name representing the organization." + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization." + }, + "country": { + "type": "string", + "description": "The organization country (2-letter country code).", + "maxLength": 2 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified organization." + ] + }, + "delete": { + "summary": "Delete organization", + "description": "Deletes the specified organization.", + "operationId": "delete-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa-enforcement": { + "get": { + "summary": "Get organization MFA settings", + "description": "Retrieves MFA settings for the specified organization.", + "operationId": "get-org-mfa-enforcement", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMfaEnforcement" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMfaEnforcement" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMfaEnforcement", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMfaEnforcement" + }, + "x-returnable": true, + "x-description": [ + "Retrieves MFA settings for the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa-enforcement/enable": { + "post": { + "summary": "Enable organization MFA enforcement", + "description": "Enables MFA enforcement for the specified organization.", + "operationId": "enable-org-mfa-enforcement", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "enable-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Enables MFA enforcement for the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa-enforcement/disable": { + "post": { + "summary": "Disable organization MFA enforcement", + "description": "Disables MFA enforcement for the specified organization.", + "operationId": "disable-org-mfa-enforcement", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "disable-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Disables MFA enforcement for the specified organization." + ] + } + }, + "/organizations/{organization_id}/mfa/remind": { + "post": { + "summary": "Send MFA reminders to organization members", + "description": "Sends a reminder about setting up MFA to the specified organization members.", + "operationId": "send-org-mfa-reminders", + "tags": [ + "Mfa" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_ids": { + "type": "array", + "description": "The organization members.", + "items": { + "type": "string", + "format": "uuid", + "description": "The ID of the user." + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "An HTTP-like status code referring to the result of the operation for the specific user." + }, + "message": { + "type": "string", + "description": "A human-readable message describing the result of the operation for the specific user" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "send-org-mfa-reminders", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-return-types": {}, + "x-phpdoc": { + "return": true + }, + "x-returnable": true, + "x-description": [ + "Sends a reminder about setting up MFA to the specified organization members." + ] + } + }, + "/organizations/{organization_id}/members": { + "get": { + "summary": "List organization members", + "description": "Accessible to organization owners and members with the \"manage members\" permission.", + "operationId": "list-org-members", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "in": "query", + "name": "filter[permissions]", + "description": "Allows filtering by `permissions` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/ArrayFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationMember" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-members", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Accessible to organization owners and members with the \"manage members\" permission." + ] + }, + "post": { + "summary": "Create organization member", + "description": "Creates a new organization member.", + "operationId": "create-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "user_id" + ], + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "ID of the user." + }, + "permissions": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-returnable": true, + "x-description": [ + "Creates a new organization member." + ] + } + }, + "/organizations/{organization_id}/members/{user_id}": { + "get": { + "summary": "Get organization member", + "description": "Retrieves the specified organization member.", + "operationId": "get-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified organization member." + ] + }, + "patch": { + "summary": "Update organization member", + "description": "Updates the specified organization member.", + "operationId": "update-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permissions": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified organization member." + ] + }, + "delete": { + "summary": "Delete organization member", + "description": "Deletes the specified organization member.", + "operationId": "delete-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified organization member." + ] + } + }, + "/organizations/{organization_id}/address": { + "get": { + "summary": "Get address", + "description": "Retrieves the address for the specified organization.", + "operationId": "get-org-address", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-address", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Address" + ], + "x-return-types-union": "\\Upsun\\Model\\Address", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Address" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the address for the specified organization." + ] + }, + "patch": { + "summary": "Update address", + "description": "Updates the address for the specified organization.", + "operationId": "update-org-address", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-address", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Address" + ], + "x-return-types-union": "\\Upsun\\Model\\Address", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Address" + }, + "x-returnable": true, + "x-description": [ + "Updates the address for the specified organization." + ] + } + }, + "/organizations/{organization_id}/invoices": { + "get": { + "summary": "List invoices", + "description": "Retrieves a list of invoices for the specified organization.", + "operationId": "list-org-invoices", + "tags": [ + "Invoices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_invoice_status" + }, + { + "$ref": "#/components/parameters/filter_invoice_type" + }, + { + "$ref": "#/components/parameters/filter_order_id" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invoice" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-invoices", + "x-tag-id-kebab": "Invoices", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of invoices for the specified organization." + ] + } + }, + "/organizations/{organization_id}/invoices/{invoice_id}": { + "get": { + "summary": "Get invoice", + "description": "Retrieves an invoice for the specified organization.", + "operationId": "get-org-invoice", + "tags": [ + "Invoices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/InvoiceID" + }, + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invoice" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-invoice", + "x-tag-id-kebab": "Invoices", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Invoice" + ], + "x-return-types-union": "\\Upsun\\Model\\Invoice", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Invoice" + }, + "x-returnable": true, + "x-description": [ + "Retrieves an invoice for the specified organization." + ] + } + }, + "/organizations/{organization_id}/profile": { + "get": { + "summary": "Get profile", + "description": "Retrieves the profile for the specified organization.", + "operationId": "get-org-profile", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-profile", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the profile for the specified organization." + ] + }, + "patch": { + "summary": "Update profile", + "description": "Updates the profile for the specified organization.", + "operationId": "update-org-profile", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_catalog": { + "type": "string", + "description": "The URL of a catalog file which overrides the default." + }, + "project_options_url": { + "type": "string", + "format": "uri", + "description": "The URL of an organization-wide project options file." + }, + "security_contact": { + "type": "string", + "format": "email", + "description": "The e-mail address of a contact to whom security notices will be sent." + }, + "company_name": { + "type": "string", + "description": "The company name." + }, + "vat_number": { + "type": "string", + "description": "The VAT number of the company." + }, + "billing_contact": { + "type": "string", + "format": "email", + "description": "The e-mail address of a contact to whom billing notices will be sent." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-profile", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-returnable": true, + "x-description": [ + "Updates the profile for the specified organization." + ] + } + }, + "/organizations/{organization_id}/orders": { + "get": { + "summary": "List orders", + "description": "Retrieves orders for the specified organization.", + "operationId": "list-org-orders", + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_order_status" + }, + { + "$ref": "#/components/parameters/filter_order_total" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/mode" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Order" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-orders", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves orders for the specified organization." + ] + } + }, + "/organizations/{organization_id}/orders/{order_id}": { + "get": { + "summary": "Get order", + "description": "Retrieves an order for the specified organization.", + "operationId": "get-org-order", + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/OrderID" + }, + { + "$ref": "#/components/parameters/mode" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-order", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Order" + ], + "x-return-types-union": "\\Upsun\\Model\\Order", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Order" + }, + "x-returnable": true, + "x-description": [ + "Retrieves an order for the specified organization." + ] + } + }, + "/organizations/{organization_id}/orders/{order_id}/authorize": { + "post": { + "summary": "Create confirmation credentials for for 3D-Secure", + "description": "Creates confirmation credentials for payments that require online authorization", + "operationId": "create-authorization-credentials", + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/OrderID" + } + ], + "responses": { + "200": { + "description": "Payment authorization credentials, if the payment is pending", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "redirect_to_url": { + "type": "object", + "description": "URL information to complete the payment.", + "properties": { + "return_url": { + "type": "string", + "description": "Return URL after payment completion." + }, + "url": { + "type": "string", + "description": "URL for payment finalization." + } + } + }, + "type": { + "type": "string", + "description": "Required payment action type." + } + } + } + } + } + }, + "400": { + "description": "Bad Request when no authorization is required.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-authorization-credentials", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Creates confirmation credentials for payments that require online authorization" + ] + } + }, + "/organizations/{organization_id}/records/plan": { + "get": { + "summary": "List plan records", + "description": "Retrieves plan records for the specified organization.", + "operationId": "list-org-plan-records", + "tags": [ + "Records" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_subscription_id" + }, + { + "$ref": "#/components/parameters/filter_subscription_plan" + }, + { + "$ref": "#/components/parameters/record_status" + }, + { + "$ref": "#/components/parameters/record_start" + }, + { + "$ref": "#/components/parameters/record_end" + }, + { + "$ref": "#/components/parameters/record_started_at" + }, + { + "$ref": "#/components/parameters/record_ended_at" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PlanRecords" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-plan-records", + "x-tag-id-kebab": "Records", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves plan records for the specified organization." + ] + } + }, + "/organizations/{organization_id}/records/usage": { + "get": { + "summary": "List usage records", + "description": "Retrieves usage records for the specified organization.", + "operationId": "list-org-usage-records", + "tags": [ + "Records" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_subscription_id" + }, + { + "$ref": "#/components/parameters/record_usage_group" + }, + { + "$ref": "#/components/parameters/record_start" + }, + { + "$ref": "#/components/parameters/record_started_at" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Usage" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-usage-records", + "x-tag-id-kebab": "Records", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves usage records for the specified organization." + ] + } + }, + "/organizations/{organization_id}/subscriptions/estimate": { + "get": { + "summary": "Estimate the price of a new subscription", + "operationId": "estimate-new-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "in": "query", + "name": "plan", + "description": "The plan type of the subscription.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "environments", + "description": "The maximum number of environments which can be provisioned on the project.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "storage", + "description": "The total storage available to each environment, in MiB.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "user_licenses", + "description": "The number of user licenses.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "format", + "description": "The format of the estimation output.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "formatted", + "complex" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EstimationObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "estimate-new-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\EstimationObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EstimationObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/can-create": { + "get": { + "summary": "Checks if the user is able to create a new project.", + "operationId": "can-create-new-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "can_create": { + "description": "Boolean result of the check.", + "type": "boolean" + }, + "message": { + "description": "Details in case of negative check result.", + "type": "string" + }, + "required_action": { + "description": "Required action impending project creation.", + "type": "object", + "nullable": true, + "properties": { + "action": { + "description": "Machine readable definition of requirement.", + "type": "string" + }, + "type": { + "description": "Specification of the type of action.", + "type": "string" + } + } + } + }, + "type": "object" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "can-create-new-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}/estimate": { + "get": { + "summary": "Estimate the price of a subscription", + "operationId": "estimate-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + }, + { + "in": "query", + "name": "plan", + "description": "The plan type of the subscription.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "environments", + "description": "The maximum number of environments which can be provisioned on the project.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "storage", + "description": "The total storage available to each environment, in MiB.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "user_licenses", + "description": "The number of user licenses.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "format", + "description": "The format of the estimation output.", + "schema": { + "type": "string", + "enum": [ + "formatted", + "complex" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EstimationObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "estimate-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\EstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\EstimationObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\EstimationObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}/current_usage": { + "get": { + "summary": "Get current usage for a subscription", + "operationId": "get-org-subscription-current-usage", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + }, + { + "in": "query", + "name": "usage_groups", + "description": "A list of usage groups to retrieve current usage for.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "include_not_charged", + "description": "Whether to include not charged usage groups.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionCurrentUsageObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-subscription-current-usage", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SubscriptionCurrentUsageObject" + ], + "x-return-types-union": "\\Upsun\\Model\\SubscriptionCurrentUsageObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SubscriptionCurrentUsageObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}/addons": { + "get": { + "summary": "List addons for a subscription", + "operationId": "list-subscription-addons", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionAddonsObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "list-subscription-addons", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\SubscriptionAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\SubscriptionAddonsObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\SubscriptionAddonsObject" + }, + "x-returnable": true + } + }, + "/organizations/{organization_id}/vouchers": { + "get": { + "summary": "List vouchers", + "description": "Retrieves vouchers for the specified organization.", + "operationId": "list-org-vouchers", + "tags": [ + "Vouchers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Vouchers" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-vouchers", + "x-tag-id-kebab": "Vouchers", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Vouchers" + ], + "x-return-types-union": "\\Upsun\\Model\\Vouchers", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Vouchers" + }, + "x-returnable": true, + "x-description": [ + "Retrieves vouchers for the specified organization." + ] + } + }, + "/organizations/{organization_id}/vouchers/apply": { + "post": { + "summary": "Apply voucher", + "description": "Applies a voucher for the specified organization, and refreshes the currently open order.", + "operationId": "apply-org-voucher", + "tags": [ + "Vouchers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "description": "The voucher code." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "apply-org-voucher", + "x-tag-id-kebab": "Vouchers", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Applies a voucher for the specified organization, and refreshes the currently open order." + ] + } + }, + "/organizations/{organization_id}/estimate": { + "get": { + "summary": "Estimate total spend", + "description": "Estimates the total spend for the specified organization.", + "operationId": "estimate-org", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationEstimationObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "estimate-org", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationEstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationEstimationObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationEstimationObject" + }, + "x-returnable": true, + "x-description": [ + "Estimates the total spend for the specified organization." + ] + } + }, + "/organizations/{organization_id}/addons": { + "get": { + "summary": "Get add-ons", + "description": "Retrieves information about the add-ons for an organization.", + "operationId": "get-org-addons", + "tags": [ + "Add-ons" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAddonsObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-org-addons", + "x-tag-id-kebab": "Add-ons", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAddonsObject" + }, + "x-returnable": true, + "x-description": [ + "Retrieves information about the add-ons for an organization." + ] + }, + "patch": { + "summary": "Update organization add-ons", + "description": "Updates the add-ons configuration for an organization.", + "operationId": "update-org-addons", + "tags": [ + "Add-ons" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_management": { + "type": "string", + "description": "The user management level to apply.", + "enum": [ + "standard", + "enhanced" + ], + "example": "standard" + }, + "support_level": { + "type": "string", + "description": "The support level to apply.", + "enum": [ + "basic", + "premium" + ], + "example": "basic" + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + }, + "responses": { + "200": { + "description": "Add-ons updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAddonsObject" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "update-org-addons", + "x-tag-id-kebab": "Add-ons", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAddonsObject" + }, + "x-returnable": true, + "x-description": [ + "Updates the add-ons configuration for an organization." + ] + } + }, + "/organizations/{organization_id}/alerts/billing": { + "get": { + "summary": "Get billing alert configuration", + "description": "Retrieves billing alert configuration for the specified organization.", + "operationId": "get-org-billing-alert-config", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAlertConfig" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-org-billing-alert-config", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAlertConfig" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAlertConfig" + }, + "x-returnable": true, + "x-description": [ + "Retrieves billing alert configuration for the specified organization." + ] + }, + "patch": { + "summary": "Update billing alert configuration", + "description": "Updates billing alert configuration for the specified organization.", + "operationId": "update-org-billing-alert-config", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "description": "Whether the billing alert should be active or not." + }, + "config": { + "type": "object", + "description": "The configuration for billing alerts.", + "properties": { + "threshold": { + "type": "integer", + "description": "The amount after which a billing alert should be triggered." + }, + "mode": { + "type": "string", + "description": "The mode in which the alert is triggered." + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAlertConfig" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "update-org-billing-alert-config", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAlertConfig" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAlertConfig" + }, + "x-returnable": true, + "x-description": [ + "Updates billing alert configuration for the specified organization." + ] + } + }, + "/organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage": { + "get": { + "summary": "Get usage alerts", + "description": "Retrieves current and available usage alerts.", + "operationId": "get-subscription-usage-alerts", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "current": { + "type": "array", + "description": "The list of currently set usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + }, + "available": { + "type": "array", + "description": "The list of available usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-subscription-usage-alerts", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves current and available usage alerts." + ] + }, + "patch": { + "summary": "Update usage alerts.", + "description": "Updates usage alerts for a subscription.", + "operationId": "update-subscription-usage-alerts", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "alerts": { + "type": "array", + "description": "The list of alerts to update.", + "items": { + "type": "object", + "description": "An alert object.", + "properties": { + "id": { + "type": "string", + "description": "The usage alert identifier." + }, + "active": { + "type": "boolean", + "description": "Whether the alert is activated." + }, + "config": { + "type": "object", + "description": "The configuration for the usage alerts.", + "properties": { + "threshold": { + "type": "integer", + "description": "The amount after which an alert should be triggered." + } + } + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "current": { + "type": "array", + "description": "The list of currently set usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + }, + "available": { + "type": "array", + "description": "The list of available usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-subscription-usage-alerts", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Updates usage alerts for a subscription." + ] + } + }, + "/organizations/{organization_id}/discounts": { + "get": { + "summary": "List organization discounts", + "description": "Retrieves all applicable discounts granted to the specified organization.", + "operationId": "list-org-discounts", + "tags": [ + "Discounts" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Discount" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "list-org-discounts", + "x-tag-id-kebab": "Discounts", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves all applicable discounts granted to the specified organization." + ] + } + }, + "/organizations/{organization_id}/prepayment": { + "get": { + "summary": "Get organization prepayment information", + "description": "Retrieves prepayment information for the specified organization, if applicable.", + "operationId": "get-org-prepayment-info", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prepayment": { + "$ref": "#/components/schemas/PrepaymentObject" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "transactions": { + "type": "object", + "description": "Link to the prepayment transactions resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "get-org-prepayment-info", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves prepayment information for the specified organization, if applicable." + ] + } + }, + "/organizations/{organization_id}/prepayment/transactions": { + "get": { + "summary": "List organization prepayment transactions", + "description": "Retrieves a list of prepayment transactions for the specified organization, if applicable.", + "operationId": "list-org-prepayment-transactions", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PrepaymentTransactionObject" + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "previous": { + "type": "object", + "description": "Link to the previous set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "next": { + "type": "object", + "description": "Link to the next set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link" + } + } + }, + "prepayment": { + "type": "object", + "description": "Link to the prepayment resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "list-org-prepayment-transactions", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of prepayment transactions for the specified organization, if applicable." + ] + } + }, + "/organizations/{organization_id}/projects": { + "get": { + "summary": "List projects", + "description": "Retrieves a list of projects for the specified organization.", + "operationId": "list-org-projects", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[title]", + "description": "Allows filtering by `title` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "filter[created_at]", + "description": "Allows filtering by `created_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationProject" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-projects", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of projects for the specified organization." + ] + }, + "post": { + "summary": "Create project", + "description": "Creates a new project in the specified organization.", + "operationId": "create-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "region" + ], + "properties": { + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "region": { + "$ref": "#/components/schemas/RegionID" + }, + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "type": { + "$ref": "#/components/schemas/ProjectType" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "default_branch": { + "$ref": "#/components/schemas/ProjectDefaultBranch" + }, + "cse_notes": { + "$ref": "#/components/schemas/ProjectCSENotes" + }, + "dedicated_tag": { + "$ref": "#/components/schemas/ProjectDedicatedTag" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-returnable": true, + "x-description": [ + "Creates a new project in the specified organization." + ] + } + }, + "/organizations/{organization_id}/projects/{project_id}": { + "get": { + "summary": "Get project", + "description": "Retrieves the specified project.", + "operationId": "get-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified project." + ] + }, + "patch": { + "summary": "Update project", + "description": "Updates the specified project.", + "operationId": "update-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + }, + "cse_notes": { + "$ref": "#/components/schemas/ProjectCSENotes" + }, + "dedicated_tag": { + "$ref": "#/components/schemas/ProjectDedicatedTag" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-returnable": true, + "x-description": [ + "Updates the specified project." + ] + }, + "delete": { + "summary": "Delete project", + "description": "Deletes the specified project.", + "operationId": "delete-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes the specified project." + ] + } + }, + "/organizations/{organization_id}/metrics/carbon": { + "get": { + "summary": "Query project carbon emissions metrics for an entire organization", + "description": "Queries the carbon emission data for all projects owned by the specified organiation.", + "operationId": "query-organiation-carbon", + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/from" + }, + { + "$ref": "#/components/parameters/to" + }, + { + "$ref": "#/components/parameters/interval" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationCarbon" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "query-organiation-carbon", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationCarbon" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationCarbon", + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationCarbon" + }, + "x-returnable": true, + "x-description": [ + "Queries the carbon emission data for all projects owned by the specified organiation." + ] + } + }, + "/organizations/{organization_id}/projects/{project_id}/metrics/carbon": { + "get": { + "summary": "Query project carbon emissions metrics", + "description": "Queries the carbon emission data for the specified project using the supplied parameters.", + "operationId": "query-project-carbon", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/from" + }, + { + "$ref": "#/components/parameters/to" + }, + { + "$ref": "#/components/parameters/interval" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCarbon" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "query-project-carbon", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\ProjectCarbon" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectCarbon", + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectCarbon" + }, + "x-returnable": true, + "x-description": [ + "Queries the carbon emission data for the specified project using the supplied parameters." + ] + } + }, + "/organizations/{organization_id}/subscriptions": { + "get": { + "summary": "List subscriptions", + "description": "Retrieves subscriptions for the specified organization.", + "operationId": "list-org-subscriptions", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/subscription_status" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/project_title" + }, + { + "$ref": "#/components/parameters/region" + }, + { + "$ref": "#/components/parameters/updated_at" + }, + { + "$ref": "#/components/parameters/page_size" + }, + { + "$ref": "#/components/parameters/page_before" + }, + { + "$ref": "#/components/parameters/page_after" + }, + { + "$ref": "#/components/parameters/subscription_sort" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Subscription" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-subscriptions", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves subscriptions for the specified organization." + ] + }, + "post": { + "summary": "Create subscription", + "description": "Creates a subscription for the specified organization.", + "operationId": "create-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "project_region" + ], + "properties": { + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "project_region": { + "type": "string", + "description": "The machine name of the region where the project is located. Cannot be changed after project creation." + }, + "project_title": { + "type": "string", + "description": "The name given to the project. Appears as the title in the UI." + }, + "options_url": { + "type": "string", + "description": "The URL of the project options file." + }, + "default_branch": { + "type": "string", + "description": "The default Git branch name for the project." + }, + "environments": { + "type": "integer", + "description": "The maximum number of active environments on the project." + }, + "storage": { + "type": "integer", + "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Subscription" + }, + "x-returnable": true, + "x-description": [ + "Creates a subscription for the specified organization." + ] + } + }, + "/organizations/{organization_id}/subscriptions/{subscription_id}": { + "get": { + "summary": "Get subscription", + "description": "Retrieves a subscription for the specified organization.", + "operationId": "get-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Subscription" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a subscription for the specified organization." + ] + }, + "patch": { + "summary": "Update subscription", + "description": "Updates a subscription for the specified organization.", + "operationId": "update-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "project_title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + }, + "environments": { + "type": "integer", + "description": "The maximum number of environments which can be provisioned on the project." + }, + "storage": { + "type": "integer", + "description": "The total storage available to each environment, in MiB." + }, + "big_dev": { + "type": "string", + "description": "The development environment plan." + }, + "big_dev_service": { + "type": "string", + "description": "The development service plan." + }, + "backups": { + "type": "string", + "description": "The backups plan." + }, + "observability_suite": { + "type": "string", + "description": "The observability suite option." + }, + "blackfire": { + "type": "string", + "description": "The Blackfire integration option." + }, + "continuous_profiling": { + "type": "string", + "description": "The Blackfire continuous profiling option." + }, + "project_support_level": { + "type": "string", + "description": "The project uptime option." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Subscription" + }, + "x-returnable": true, + "x-description": [ + "Updates a subscription for the specified organization." + ] + }, + "delete": { + "summary": "Delete subscription", + "description": "Deletes a subscription for the specified organization.", + "operationId": "delete-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Deletes a subscription for the specified organization." + ] + } + }, + "/regions": { + "get": { + "summary": "List regions", + "description": "Retrieves a list of available regions.", + "operationId": "list-regions", + "tags": [ + "Regions" + ], + "parameters": [ + { + "in": "query", + "name": "filter[available]", + "description": "Allows filtering by `available` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[private]", + "description": "Allows filtering by `private` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[zone]", + "description": "Allows filtering by `zone` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "regions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Region" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-regions", + "x-tag-id-kebab": "Regions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of available regions." + ] + } + }, + "/regions/{region_id}": { + "get": { + "summary": "Get region", + "description": "Retrieves the specified region.", + "operationId": "get-region", + "tags": [ + "Regions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/RegionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Region" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-region", + "x-tag-id-kebab": "Regions", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\Region" + ], + "x-return-types-union": "\\Upsun\\Model\\Region", + "x-phpdoc": { + "return": "\\Upsun\\Model\\Region" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the specified region." + ] + } + }, + "/ref/projects": { + "get": { + "summary": "List referenced projects", + "description": "Retrieves a list of projects referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:projects:0.", + "operationId": "list-referenced-projects", + "tags": [ + "References" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated project IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced projects indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/ProjectReference" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-referenced-projects", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of projects referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:projects:0." + ] + } + }, + "/ref/regions": { + "get": { + "summary": "List referenced regions", + "description": "Retrieves a list of regions referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:regions:0.", + "operationId": "list-referenced-regions", + "tags": [ + "References" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated region IDs generated by a trusted service.", + "required": true + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A map of referenced projects indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/RegionReference" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-referenced-regions", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-phpdoc": { + "return": "array" + }, + "x-returnable": true, + "x-description": [ + "Retrieves a list of regions referenced by a trusted service. Clients cannot construct the URL themselves. The", + "correct URL will be provided in the HAL links of another API response, in the _links object with a", + "key like ref:regions:0." + ] + } + }, + "/projects/{project_id}/team-access": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "List team access for a project", + "description": "Returns a list of items representing the project access.", + "operationId": "list-project-team-access", + "tags": [ + "Team Access" + ], + "parameters": [ + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the project access." + ] + }, + "post": { + "summary": "Grant team access to a project", + "description": "Grants one or more team access to a specific project.", + "operationId": "grant-project-team-access", + "tags": [ + "Team Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "team_id": { + "type": "string", + "description": "ID of the team." + } + }, + "required": [ + "team_id" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Grants one or more team access to a specific project." + ] + } + }, + "/projects/{project_id}/team-access/{team_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "Get team access for a project", + "description": "Retrieves the team's permissions for the current project.", + "operationId": "get-project-team-access", + "tags": [ + "Team Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the team's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove team access for a project", + "description": "Removes the team from the current project.", + "operationId": "remove-project-team-access", + "tags": [ + "Team Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the team from the current project." + ] + } + }, + "/projects/{project_id}/user-access": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "List user access for a project", + "description": "Returns a list of items representing the project access.", + "operationId": "list-project-user-access", + "tags": [ + "User Access" + ], + "parameters": [ + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the project access." + ] + }, + "post": { + "summary": "Grant user access to a project", + "description": "Grants one or more users access to a specific project.", + "operationId": "grant-project-user-access", + "tags": [ + "User Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "description": "ID of the user." + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + }, + "auto_add_member": { + "type": "boolean", + "description": "If the specified user is not a member of the project's organization, add it automatically." + } + }, + "required": [ + "user_id", + "permissions" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Grants one or more users access to a specific project." + ] + } + }, + "/projects/{project_id}/user-access/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get user access for a project", + "description": "Retrieves the user's permissions for the current project.", + "operationId": "get-project-user-access", + "tags": [ + "User Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\UserProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\UserProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the user's permissions for the current project." + ] + }, + "patch": { + "summary": "Update user access for a project", + "description": "Updates the user's permissions for the current project.", + "operationId": "update-project-user-access", + "tags": [ + "User Access" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "permissions" + ], + "properties": { + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Updates the user's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove user access for a project", + "description": "Removes the user from the current project.", + "operationId": "remove-project-user-access", + "tags": [ + "User Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-project-user-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the user from the current project." + ] + } + }, + "/users/{user_id}/project-access": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List project access for a user", + "description": "Returns a list of items representing the user's project access.", + "operationId": "list-user-project-access", + "tags": [ + "User Access" + ], + "parameters": [ + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id`.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the user's project access." + ] + }, + "post": { + "summary": "Grant project access to a user", + "description": "Adds the user to one or more specified projects.", + "operationId": "grant-user-project-access", + "tags": [ + "User Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "description": "ID of the project." + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + } + }, + "required": [ + "project_id", + "permissions" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Adds the user to one or more specified projects." + ] + } + }, + "/users/{user_id}/project-access/{project_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "Get project access for a user", + "description": "Retrieves the user's permissions for the current project.", + "operationId": "get-user-project-access", + "tags": [ + "User Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\UserProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\UserProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the user's permissions for the current project." + ] + }, + "patch": { + "summary": "Update project access for a user", + "description": "Updates the user's permissions for the current project.", + "operationId": "update-user-project-access", + "tags": [ + "User Access" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "permissions" + ], + "properties": { + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Updates the user's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove project access for a user", + "description": "Removes the user from the current project.", + "operationId": "remove-user-project-access", + "tags": [ + "User Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-user-project-access", + "x-tag-id-kebab": "User-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the user from the current project." + ] + } + }, + "/teams/{team_id}/project-access": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "List project access for a team", + "description": "Returns a list of items representing the team's project access.", + "operationId": "list-team-project-access", + "tags": [ + "Team Access" + ], + "parameters": [ + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "object" + ], + "x-phpdoc": { + "return": "object" + }, + "x-returnable": true, + "x-description": [ + "Returns a list of items representing the team's project access." + ] + }, + "post": { + "summary": "Grant project access to a team", + "description": "Adds the team to one or more specified projects.", + "operationId": "grant-team-project-access", + "tags": [ + "Team Access" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "description": "ID of the project." + } + }, + "required": [ + "project_id" + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "grant-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Adds the team to one or more specified projects." + ] + } + }, + "/teams/{team_id}/project-access/{project_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "get": { + "summary": "Get project access for a team", + "description": "Retrieves the team's permissions for the current project.", + "operationId": "get-team-project-access", + "tags": [ + "Team Access" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "get-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\TeamProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamProjectAccess" + }, + "x-returnable": true, + "x-description": [ + "Retrieves the team's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove project access for a team", + "description": "Removes the team from the current project.", + "operationId": "remove-team-project-access", + "tags": [ + "Team Access" + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "remove-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-phpdoc": {}, + "x-returnable": false, + "x-description": [ + "Removes the team from the current project." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/next": { + "patch": { + "summary": "Update the next deployment", + "description": "Update resources for either webapps, services, or workers in the next deployment.", + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "webapps": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "$ref": "#/components/schemas/ResourceConfig" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "description": "Number of instances to run", + "example": 2 + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk Size", + "description": "Size of the disk in Bytes", + "example": 1024 + } + } + } + }, + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "$ref": "#/components/schemas/ResourceConfig" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "description": "Number of instances to run", + "example": 1 + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk Size", + "description": "Size of the disk in Bytes", + "example": 1024 + } + } + } + }, + "workers": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "$ref": "#/components/schemas/ResourceConfig" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "description": "Number of instances to run", + "example": 1 + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk Size", + "description": "Size of the disk in Bytes", + "example": 1024 + } + } + } + } + } + } + } + } + }, + "responses": { + "default": { + "description": "Deployment successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "operationId": "update-projects-environments-deployments-next", + "x-property-id-kebab": "update-projects-environments-deployments-next", + "x-tag-id-kebab": "Deployment", + "x-return-types-displayReturn": false, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-returnable": true, + "x-description": [ + "Update resources for either webapps, services, or workers in the next deployment." + ] + } + } + }, + "components": { + "schemas": { + "Alert": { + "description": "The alert object.", + "properties": { + "id": { + "description": "The identification of the alert type.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The identification of the alert type." + ] + }, + "active": { + "description": "Whether the alert is currently active.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the alert is currently active." + ] + }, + "alerts_sent": { + "description": "The amount of alerts of this type that have been sent so far.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The amount of alerts of this type that have been sent so far." + ] + }, + "last_alert_at": { + "description": "The time the last alert has been sent.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time the last alert has been sent." + ] + }, + "updated_at": { + "description": "The time the alert has last been updated.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time the alert has last been updated." + ] + }, + "config": { + "description": "The alert type specific configuration.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The alert type specific configuration." + ] + } + }, + "type": "object", + "x-description": [ + "The alert object." + ] + }, + "LineItem": { + "description": "A line item in an order.", + "properties": { + "type": { + "description": "The type of line item.", + "type": "string", + "enum": [ + "project_plan", + "project_feature", + "project_subtotal", + "organization_plan", + "organization_feature", + "organization_subtotal" + ], + "x-isDateTime": false, + "x-description": [ + "The type of line item." + ] + }, + "license_id": { + "description": "The associated subscription identifier.", + "type": "number", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The associated subscription identifier." + ] + }, + "project_id": { + "description": "The associated project identifier.", + "type": "string", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The associated project identifier." + ] + }, + "product": { + "description": "Display name of the line item product.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Display name of the line item product." + ] + }, + "sku": { + "description": "The line item product SKU.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The line item product SKU." + ] + }, + "total": { + "description": "Total price as a decimal.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Total price as a decimal." + ] + }, + "total_formatted": { + "description": "Total price, formatted with currency.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Total price, formatted with currency." + ] + }, + "components": { + "description": "The price components for the line item, keyed by type.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LineItemComponent" + }, + "x-isDateTime": false, + "x-description": [ + "The price components for the line item, keyed by type." + ] + }, + "exclude_from_invoice": { + "description": "Line item should not be considered billable.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Line item should not be considered billable." + ] + } + }, + "type": "object", + "x-description": [ + "A line item in an order." + ] + }, + "LineItemComponent": { + "description": "A price component for a line item.", + "properties": { + "amount": { + "description": "The price as a decimal.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The price as a decimal." + ] + }, + "amount_formatted": { + "description": "The price formatted with currency.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The price formatted with currency." + ] + }, + "display_title": { + "description": "The display title for the component.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The display title for the component." + ] + }, + "currency": { + "description": "The currency code for the component.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The currency code for the component." + ] + } + }, + "type": "object", + "x-description": [ + "A price component for a line item." + ] + }, + "Address": { + "description": "The address of the user.", + "properties": { + "country": { + "description": "Two-letter country codes are used to represent countries and states", + "type": "string", + "format": "ISO ALPHA-2", + "x-isDateTime": false, + "x-description": [ + "Two-letter country codes are used to represent countries and states" + ] + }, + "name_line": { + "description": "The full name of the user", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The full name of the user" + ] + }, + "premise": { + "description": "Premise (i.e. Apt, Suite, Bldg.)", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Premise (i.e. Apt, Suite, Bldg.)" + ] + }, + "sub_premise": { + "description": "Sub Premise (i.e. Suite, Apartment, Floor, Unknown.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Sub Premise (i.e. Suite, Apartment, Floor, Unknown." + ] + }, + "thoroughfare": { + "description": "The address of the user", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The address of the user" + ] + }, + "administrative_area": { + "description": "The administrative area of the user address", + "type": "string", + "format": "ISO ALPHA-2", + "x-isDateTime": false, + "x-description": [ + "The administrative area of the user address" + ] + }, + "sub_administrative_area": { + "description": "The sub-administrative area of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The sub-administrative area of the user address" + ] + }, + "locality": { + "description": "The locality of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The locality of the user address" + ] + }, + "dependent_locality": { + "description": "The dependant_locality area of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The dependant_locality area of the user address" + ] + }, + "postal_code": { + "description": "The postal code area of the user address", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The postal code area of the user address" + ] + } + }, + "type": "object", + "x-description": [ + "The address of the user." + ] + }, + "Components": { + "description": "The components of the project", + "properties": { + "voucher/vat/baseprice": { + "description": "stub", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "stub" + ] + } + }, + "type": "object", + "x-description": [ + "The components of the project" + ] + }, + "Discount": { + "description": "The discount object.", + "properties": { + "id": { + "description": "The ID of the organization discount.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization discount." + ] + }, + "organization_id": { + "description": "The ULID of the organization the discount applies to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ULID of the organization the discount applies to." + ] + }, + "type": { + "description": "The machine name of the discount type.", + "type": "string", + "enum": [ + "allowance", + "startup", + "enterprise" + ], + "x-isDateTime": false, + "x-description": [ + "The machine name of the discount type." + ] + }, + "type_label": { + "description": "The label of the discount type.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The label of the discount type." + ] + }, + "status": { + "description": "The status of the discount.", + "type": "string", + "enum": [ + "inactive", + "active", + "expired", + "deactivated" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the discount." + ] + }, + "commitment": { + "description": "The minimum commitment associated with the discount (if applicable).", + "properties": { + "months": { + "description": "Commitment period length in months.", + "type": "integer", + "x-description": [ + "Commitment period length in months." + ] + }, + "amount": { + "description": "Commitment amounts.", + "properties": { + "monthly": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "commitment_period": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "contract_total": { + "$ref": "#/components/schemas/CurrencyAmount" + } + }, + "type": "object", + "x-description": [ + "Commitment amounts." + ] + }, + "net": { + "description": "Net commitment amounts (discount deducted).", + "properties": { + "monthly": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "commitment_period": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "contract_total": { + "$ref": "#/components/schemas/CurrencyAmount" + } + }, + "type": "object", + "x-description": [ + "Net commitment amounts (discount deducted)." + ] + } + }, + "type": "object", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The minimum commitment associated with the discount (if applicable)." + ] + }, + "total_months": { + "description": "The contract length in months (if applicable).", + "type": "integer", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The contract length in months (if applicable)." + ] + }, + "discount": { + "description": "Discount value per relevant time periods.", + "properties": { + "monthly": { + "$ref": "#/components/schemas/CurrencyAmount" + }, + "commitment_period": { + "$ref": "#/components/schemas/CurrencyAmountNullable" + }, + "contract_total": { + "$ref": "#/components/schemas/CurrencyAmountNullable" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Discount value per relevant time periods." + ] + }, + "config": { + "description": "The discount type specific configuration.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The discount type specific configuration." + ] + }, + "start_at": { + "description": "The start time of the discount period.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The start time of the discount period." + ] + }, + "end_at": { + "description": "The end time of the discount period (if applicable).", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The end time of the discount period (if applicable)." + ] + } + }, + "type": "object", + "x-description": [ + "The discount object." + ] + }, + "CurrencyAmount": { + "description": "Currency amount with detailed components.", + "properties": { + "formatted": { + "description": "Formatted currency value.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Formatted currency value." + ] + }, + "amount": { + "description": "Plain amount.", + "type": "number", + "format": "float", + "x-isDateTime": false, + "x-description": [ + "Plain amount." + ] + }, + "currency_code": { + "description": "Currency code.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency code." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "x-description": [ + "Currency amount with detailed components." + ] + }, + "CurrencyAmountNullable": { + "description": "Currency amount with detailed components.", + "properties": { + "formatted": { + "description": "Formatted currency value.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Formatted currency value." + ] + }, + "amount": { + "description": "Plain amount.", + "type": "number", + "format": "float", + "x-isDateTime": false, + "x-description": [ + "Plain amount." + ] + }, + "currency_code": { + "description": "Currency code.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency code." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "nullable": true, + "x-description": [ + "Currency amount with detailed components." + ] + }, + "OwnerInfo": { + "description": "Project owner information that can be exposed to collaborators.", + "properties": { + "type": { + "description": "Type of the owner, usually 'user'.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Type of the owner, usually 'user'." + ] + }, + "username": { + "description": "The username of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The username of the owner." + ] + }, + "display_name": { + "description": "The full name of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The full name of the owner." + ] + } + }, + "type": "object", + "x-description": [ + "Project owner information that can be exposed to collaborators." + ] + }, + "SshKey": { + "description": "The ssh key object.", + "properties": { + "key_id": { + "description": "The ID of the public key.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The ID of the public key." + ] + }, + "uid": { + "description": "The internal user ID.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The internal user ID." + ] + }, + "fingerprint": { + "description": "The fingerprint of the public key.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The fingerprint of the public key." + ] + }, + "title": { + "description": "The title of the public key.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The title of the public key." + ] + }, + "value": { + "description": "The actual value of the public key.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The actual value of the public key." + ] + }, + "changed": { + "description": "The time of the last key modification (ISO 8601)", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The time of the last key modification (ISO 8601)" + ] + } + }, + "type": "object", + "x-description": [ + "The ssh key object." + ] + }, + "Plan": { + "description": "The hosting plan.", + "properties": { + "name": { + "description": "The machine name of the plan.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the plan." + ] + }, + "label": { + "description": "The human-readable name of the plan.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The human-readable name of the plan." + ] + } + }, + "type": "object", + "x-description": [ + "The hosting plan." + ] + }, + "Region": { + "description": "The hosting region.", + "properties": { + "id": { + "description": "The ID of the region.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the region." + ] + }, + "label": { + "description": "The human-readable name of the region.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The human-readable name of the region." + ] + }, + "zone": { + "description": "Geographical zone of the region", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Geographical zone of the region" + ] + }, + "selection_label": { + "description": "The label to display when choosing between regions for new projects.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The label to display when choosing between regions for new projects." + ] + }, + "project_label": { + "description": "The label to display on existing projects.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The label to display on existing projects." + ] + }, + "timezone": { + "description": "Default timezone of the region", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Default timezone of the region" + ] + }, + "available": { + "description": "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up during checkout.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up", + "during checkout." + ] + }, + "private": { + "description": "Indicator whether or not this platform is for private use only.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Indicator whether or not this platform is for private use only." + ] + }, + "endpoint": { + "description": "Link to the region API endpoint.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Link to the region API endpoint." + ] + }, + "provider": { + "description": "Information about the region provider.", + "properties": { + "name": { + "type": "string" + }, + "logo": { + "type": "string" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Information about the region provider." + ] + }, + "datacenter": { + "description": "Information about the region provider data center.", + "properties": { + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "location": { + "type": "string" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Information about the region provider data center." + ] + }, + "environmental_impact": { + "description": "Information about the region provider's environmental impact.", + "properties": { + "zone": { + "type": "string" + }, + "carbon_intensity": { + "type": "string" + }, + "green": { + "type": "boolean" + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Information about the region provider's environmental impact." + ] + } + }, + "type": "object", + "x-description": [ + "The hosting region." + ] + }, + "Subscription": { + "description": "The subscription object.", + "properties": { + "id": { + "description": "The internal ID of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The internal ID of the subscription." + ] + }, + "status": { + "description": "The status of the subscription.", + "type": "string", + "enum": [ + "requested", + "provisioning failure", + "provisioning", + "active", + "suspended", + "deleted" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the subscription." + ] + }, + "created_at": { + "description": "The date and time when the subscription was created.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The date and time when the subscription was created." + ] + }, + "updated_at": { + "description": "The date and time when the subscription was last updated.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The date and time when the subscription was last updated." + ] + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "owner_info": { + "$ref": "#/components/schemas/OwnerInfo" + }, + "vendor": { + "description": "The machine name of the vendor the subscription belongs to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the vendor the subscription belongs to." + ] + }, + "plan": { + "description": "The plan type of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The plan type of the subscription." + ] + }, + "environments": { + "description": "The number of environments which can be provisioned on the project.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The number of environments which can be provisioned on the project." + ] + }, + "storage": { + "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values." + ] + }, + "user_licenses": { + "description": "The number of chargeable users who currently have access to the project. Manage this value by adding and removing users through the Platform project API. Staff and billing/administrative contacts can be added to a project for no charge. Contact support for questions about user licenses.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The number of chargeable users who currently have access to the project. Manage this value by adding and removing", + "users through the Platform project API. Staff and billing/administrative contacts can be added to a project for", + "no charge. Contact support for questions about user licenses." + ] + }, + "project_id": { + "description": "The unique ID string of the project.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The unique ID string of the project." + ] + }, + "project_endpoint": { + "description": "The project API endpoint for the project.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The project API endpoint for the project." + ] + }, + "project_title": { + "description": "The name given to the project. Appears as the title in the UI.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The name given to the project. Appears as the title in the UI." + ] + }, + "project_region": { + "description": "The machine name of the region where the project is located. Cannot be changed after project creation.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the region where the project is located. Cannot be changed after project creation." + ] + }, + "project_region_label": { + "description": "The human-readable name of the region where the project is located.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The human-readable name of the region where the project is located." + ] + }, + "project_ui": { + "description": "The URL for the project's user interface.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The URL for the project's user interface." + ] + }, + "project_options": { + "$ref": "#/components/schemas/ProjectOptions" + }, + "agency_site": { + "description": "True if the project is an agency site.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "True if the project is an agency site." + ] + }, + "invoiced": { + "description": "Whether the subscription is invoiced.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the subscription is invoiced." + ] + }, + "hipaa": { + "description": "Whether the project is marked as HIPAA.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the project is marked as HIPAA." + ] + }, + "is_trial_plan": { + "description": "Whether the project is currently on a trial plan.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the project is currently on a trial plan." + ] + }, + "services": { + "description": "Details of the attached services.", + "type": "array", + "items": { + "description": "Details of a service", + "type": "object" + }, + "x-isDateTime": false, + "x-description": [ + "Details of the attached services." + ] + }, + "green": { + "description": "Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing purposes.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the subscription is considered green (on a green region, belonging to a green vendor) for billing", + "purposes." + ] + } + }, + "type": "object", + "x-description": [ + "The subscription object." + ] + }, + "ProjectOptions": { + "description": "The project options object.", + "properties": { + "defaults": { + "description": "The initial values applied to the project.", + "properties": { + "settings": { + "description": "The project settings.", + "type": "object", + "x-description": [ + "The project settings." + ] + }, + "variables": { + "description": "The project variables.", + "type": "object", + "x-description": [ + "The project variables." + ] + }, + "access": { + "description": "The project access list.", + "type": "object", + "x-description": [ + "The project access list." + ] + }, + "capabilities": { + "description": "The project capabilities.", + "type": "object", + "x-description": [ + "The project capabilities." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The initial values applied to the project." + ] + }, + "enforced": { + "description": "The enforced values applied to the project.", + "properties": { + "settings": { + "description": "The project settings.", + "type": "object", + "x-description": [ + "The project settings." + ] + }, + "capabilities": { + "description": "The project capabilities.", + "type": "object", + "x-description": [ + "The project capabilities." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The enforced values applied to the project." + ] + }, + "regions": { + "description": "The available regions.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "The available regions." + ] + }, + "plans": { + "description": "The available plans.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "The available plans." + ] + }, + "billing": { + "description": "The billing settings.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The billing settings." + ] + } + }, + "type": "object", + "x-description": [ + "The project options object." + ] + }, + "SubscriptionCurrentUsageObject": { + "description": "A subscription's usage group current usage object.", + "properties": { + "cpu_app": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "storage_app_services": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "memory_app": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "cpu_services": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "memory_services": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "backup_storage": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "build_cpu": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "build_memory": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "egress_bandwidth": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "ingress_requests": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "logs_fwd_content_size": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "fastly_bandwidth": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + }, + "fastly_requests": { + "$ref": "#/components/schemas/UsageGroupCurrentUsageProperties" + } + }, + "type": "object", + "x-description": [ + "A subscription's usage group current usage object." + ] + }, + "UsageGroupCurrentUsageProperties": { + "description": "Current usage info for a usage group.", + "properties": { + "title": { + "description": "The title of the usage group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The title of the usage group." + ] + }, + "type": { + "description": "The usage group type.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The usage group type." + ] + }, + "current_usage": { + "description": "The value of current usage for the group.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The value of current usage for the group." + ] + }, + "current_usage_formatted": { + "description": "The formatted value of current usage for the group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The formatted value of current usage for the group." + ] + }, + "not_charged": { + "description": "Whether the group is not charged for the subscription.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the group is not charged for the subscription." + ] + }, + "free_quantity": { + "description": "The amount of free usage for the group.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The amount of free usage for the group." + ] + }, + "free_quantity_formatted": { + "description": "The formatted amount of free usage for the group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The formatted amount of free usage for the group." + ] + }, + "daily_average": { + "description": "The daily average usage calculated for the group.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The daily average usage calculated for the group." + ] + }, + "daily_average_formatted": { + "description": "The formatted daily average usage calculated for the group.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The formatted daily average usage calculated for the group." + ] + } + }, + "type": "object", + "x-description": [ + "Current usage info for a usage group." + ] + }, + "HalLinks": { + "description": "Links to _self, and previous or next page, given that they exist.", + "properties": { + "self": { + "description": "The cardinal link to the self resource.", + "properties": { + "title": { + "description": "Title of the link", + "type": "string", + "x-description": [ + "Title of the link" + ] + }, + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The cardinal link to the self resource." + ] + }, + "previous": { + "description": "The link to the previous resource page, given that it exists.", + "properties": { + "title": { + "description": "Title of the link", + "type": "string", + "x-description": [ + "Title of the link" + ] + }, + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The link to the previous resource page, given that it exists." + ] + }, + "next": { + "description": "The link to the next resource page, given that it exists.", + "properties": { + "title": { + "description": "Title of the link", + "type": "string", + "x-description": [ + "Title of the link" + ] + }, + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The link to the next resource page, given that it exists." + ] + } + }, + "type": "object", + "x-description": [ + "Links to _self, and previous or next page, given that they exist." + ] + }, + "Profile": { + "description": "The user profile.", + "properties": { + "id": { + "description": "The user's unique ID.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The user's unique ID." + ] + }, + "display_name": { + "description": "The user's display name.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user's display name." + ] + }, + "email": { + "description": "The user's email address.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The user's email address." + ] + }, + "username": { + "description": "The user's username.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user's username." + ] + }, + "type": { + "description": "The user's type (user/organization).", + "type": "string", + "enum": [ + "user", + "organization" + ], + "x-isDateTime": false, + "x-description": [ + "The user's type (user/organization)." + ] + }, + "picture": { + "description": "The URL of the user's picture.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "The URL of the user's picture." + ] + }, + "company_type": { + "description": "The company type.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The company type." + ] + }, + "company_name": { + "description": "The name of the company.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The name of the company." + ] + }, + "currency": { + "description": "A 3-letter ISO 4217 currency code (assigned according to the billing address).", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A 3-letter ISO 4217 currency code (assigned according to the billing address)." + ] + }, + "vat_number": { + "description": "The vat number of the user.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The vat number of the user." + ] + }, + "company_role": { + "description": "The role of the user in the company.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The role of the user in the company." + ] + }, + "website_url": { + "description": "The user or company website.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user or company website." + ] + }, + "new_ui": { + "description": "Whether the new UI features are enabled for this user.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether the new UI features are enabled for this user." + ] + }, + "ui_colorscheme": { + "description": "The user's chosen color scheme for user interfaces.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The user's chosen color scheme for user interfaces." + ] + }, + "default_catalog": { + "description": "The URL of a catalog file which overrides the default.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The URL of a catalog file which overrides the default." + ] + }, + "project_options_url": { + "description": "The URL of an account-wide project options file.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The URL of an account-wide project options file." + ] + }, + "marketing": { + "description": "Flag if the user agreed to receive marketing communication.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Flag if the user agreed to receive marketing communication." + ] + }, + "created_at": { + "description": "The timestamp representing when the user account was created.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The timestamp representing when the user account was created." + ] + }, + "updated_at": { + "description": "The timestamp representing when the user account was last modified.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The timestamp representing when the user account was last modified." + ] + }, + "billing_contact": { + "description": "The e-mail address of a contact to whom billing notices will be sent.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The e-mail address of a contact to whom billing notices will be sent." + ] + }, + "security_contact": { + "description": "The e-mail address of a contact to whom security notices will be sent.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The e-mail address of a contact to whom security notices will be sent." + ] + }, + "current_trial": { + "description": "The current trial for the profile.", + "properties": { + "active": { + "description": "The trial active status.", + "type": "boolean", + "x-description": [ + "The trial active status." + ] + }, + "created": { + "description": "The trial creation date.", + "type": "string", + "format": "date-time", + "x-description": [ + "The trial creation date." + ] + }, + "description": { + "description": "The trial description.", + "type": "string", + "x-description": [ + "The trial description." + ] + }, + "expiration": { + "description": "The trial expiration-date.", + "type": "string", + "format": "date-time", + "x-description": [ + "The trial expiration-date." + ] + }, + "current": { + "description": "The total amount spent by the trial user at this point in time.", + "properties": { + "formatted": { + "description": "The total amount formatted.", + "type": "string", + "x-description": [ + "The total amount formatted." + ] + }, + "amount": { + "description": "The total amount.", + "type": "string", + "x-description": [ + "The total amount." + ] + }, + "currency": { + "description": "The currency.", + "type": "string", + "x-description": [ + "The currency." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "x-description": [ + "The total amount spent by the trial user at this point in time." + ] + }, + "spend": { + "description": "The total amount available for the trial.", + "properties": { + "formatted": { + "description": "The total amount formatted.", + "type": "string", + "x-description": [ + "The total amount formatted." + ] + }, + "amount": { + "description": "The total amount.", + "type": "string", + "x-description": [ + "The total amount." + ] + }, + "currency": { + "description": "The currency.", + "type": "string", + "x-description": [ + "The currency." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-description": [ + "Currency symbol." + ] + } + }, + "type": "object", + "x-description": [ + "The total amount available for the trial." + ] + }, + "spend_remaining": { + "description": "The remaining amount available for the trial.", + "properties": { + "formatted": { + "description": "The total amount formatted.", + "type": "string", + "x-description": [ + "The total amount formatted." + ] + }, + "amount": { + "description": "The total amount.", + "type": "string", + "x-description": [ + "The total amount." + ] + }, + "currency": { + "description": "The currency.", + "type": "string", + "x-description": [ + "The currency." + ] + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string", + "x-description": [ + "Currency symbol." + ] + }, + "unlimited": { + "description": "Spend limit is ignored (in favor of resource limitations).", + "type": "boolean", + "x-description": [ + "Spend limit is ignored (in favor of resource limitations)." + ] + } + }, + "type": "object", + "x-description": [ + "The remaining amount available for the trial." + ] + }, + "projects": { + "description": "Projects active under trial", + "properties": { + "id": { + "description": "Trial project ID", + "type": "string", + "x-description": [ + "Trial project ID" + ] + }, + "name": { + "description": "Trial project name", + "type": "string", + "x-description": [ + "Trial project name" + ] + }, + "total": { + "properties": { + "amount": { + "description": "Trial project cost", + "type": "integer", + "x-description": [ + "Trial project cost" + ] + }, + "currency_code": { + "description": "Currency code", + "type": "string", + "x-description": [ + "Currency code" + ] + }, + "currency_symbol": { + "description": "Currency symbol", + "type": "string", + "x-description": [ + "Currency symbol" + ] + }, + "formatted": { + "description": "Trial project cost formatted with currency sign", + "type": "string", + "x-description": [ + "Trial project cost formatted with currency sign" + ] + } + }, + "type": "object" + } + }, + "type": "object", + "x-description": [ + "Projects active under trial" + ] + }, + "pending_verification": { + "description": "Required verification method (if applicable).", + "type": "string", + "enum": [ + "credit-card" + ], + "nullable": true, + "deprecated": true, + "x-description": [ + "Required verification method (if applicable)." + ] + }, + "model": { + "description": "The trial trial model.", + "type": "string", + "x-description": [ + "The trial trial model." + ] + }, + "days_remaining": { + "description": "The amount of days until the trial expires.", + "type": "integer", + "x-description": [ + "The amount of days until the trial expires." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "The current trial for the profile." + ] + }, + "invoiced": { + "description": "The customer is invoiced.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The customer is invoiced." + ] + } + }, + "type": "object", + "x-description": [ + "The user profile." + ] + }, + "AddressMetadata": { + "description": "Information about fields required to express an address.", + "properties": { + "metadata": { + "description": "Address field metadata.", + "properties": { + "required_fields": { + "description": "Fields required to express the address.", + "type": "array", + "items": { + "type": "string" + }, + "x-description": [ + "Fields required to express the address." + ] + }, + "field_labels": { + "description": "Localized labels for address fields.", + "type": "object", + "x-description": [ + "Localized labels for address fields." + ] + }, + "show_vat": { + "description": "Whether this country supports a VAT number.", + "type": "boolean", + "x-description": [ + "Whether this country supports a VAT number." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Address field metadata." + ] + } + }, + "type": "object", + "x-description": [ + "Information about fields required to express an address." + ] + }, + "Ticket": { + "description": "The support ticket object.", + "properties": { + "ticket_id": { + "description": "The ID of the ticket.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The ID of the ticket." + ] + }, + "created": { + "description": "The time when the support ticket was created.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the support ticket was created." + ] + }, + "updated": { + "description": "The time when the support ticket was updated.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the support ticket was updated." + ] + }, + "type": { + "description": "A type of the ticket.", + "type": "string", + "enum": [ + "problem", + "task", + "incident", + "question" + ], + "x-isDateTime": false, + "x-description": [ + "A type of the ticket." + ] + }, + "subject": { + "description": "A title of the ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A title of the ticket." + ] + }, + "description": { + "description": "The description body of the support ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The description body of the support ticket." + ] + }, + "priority": { + "description": "A priority of the ticket.", + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ], + "x-isDateTime": false, + "x-description": [ + "A priority of the ticket." + ] + }, + "followup_tid": { + "description": "Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Followup ticket ID. The unique ID of the ticket which this ticket is a follow-up to." + ] + }, + "status": { + "description": "The status of the support ticket.", + "type": "string", + "enum": [ + "closed", + "deleted", + "hold", + "new", + "open", + "pending", + "solved" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the support ticket." + ] + }, + "recipient": { + "description": "Email address of the ticket recipient, defaults to support@upsun.com.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Email address of the ticket recipient, defaults to support@upsun.com." + ] + }, + "requester_id": { + "description": "UUID of the ticket requester.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "UUID of the ticket requester." + ] + }, + "submitter_id": { + "description": "UUID of the ticket submitter.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "UUID of the ticket submitter." + ] + }, + "assignee_id": { + "description": "UUID of the ticket assignee.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "UUID of the ticket assignee." + ] + }, + "organization_id": { + "description": "A reference id that is usable to find the commerce license.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A reference id that is usable to find the commerce license." + ] + }, + "collaborator_ids": { + "description": "A list of the collaborators uuids for this ticket.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "A list of the collaborators uuids for this ticket." + ] + }, + "has_incidents": { + "description": "Whether or not this ticket has incidents.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "Whether or not this ticket has incidents." + ] + }, + "due": { + "description": "A time that the ticket is due at.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "A time that the ticket is due at." + ] + }, + "tags": { + "description": "A list of tags assigned to the ticket.", + "type": "array", + "items": { + "type": "string" + }, + "x-isDateTime": false, + "x-description": [ + "A list of tags assigned to the ticket." + ] + }, + "subscription_id": { + "description": "The internal ID of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The internal ID of the subscription." + ] + }, + "ticket_group": { + "description": "Maps to zendesk field 'Request group'.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Request group'." + ] + }, + "support_plan": { + "description": "Maps to zendesk field 'The support plan associated with this ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'The support plan associated with this ticket." + ] + }, + "affected_url": { + "description": "The affected URL associated with the support ticket.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "The affected URL associated with the support ticket." + ] + }, + "queue": { + "description": "The queue the support ticket is in.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The queue the support ticket is in." + ] + }, + "issue_type": { + "description": "The issue type of the support ticket.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The issue type of the support ticket." + ] + }, + "resolution_time": { + "description": "Maps to zendesk field 'Resolution Time'.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "Maps to zendesk field 'Resolution Time'." + ] + }, + "response_time": { + "description": "Maps to zendesk field 'Response Time (time from request to reply).", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "Maps to zendesk field 'Response Time (time from request to reply)." + ] + }, + "project_url": { + "description": "Maps to zendesk field 'Project URL'.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Project URL'." + ] + }, + "region": { + "description": "Maps to zendesk field 'Region'.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Region'." + ] + }, + "category": { + "description": "Maps to zendesk field 'Category'.", + "type": "string", + "enum": [ + "access", + "billing_question", + "complaint", + "compliance_question", + "configuration_change", + "general_question", + "incident_outage", + "bug_report", + "onboarding", + "report_a_gui_bug", + "close_my_account" + ], + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Category'." + ] + }, + "environment": { + "description": "Maps to zendesk field 'Environment'.", + "type": "string", + "enum": [ + "env_development", + "env_staging", + "env_production" + ], + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Environment'." + ] + }, + "ticket_sharing_status": { + "description": "Maps to zendesk field 'Ticket Sharing Status'.", + "type": "string", + "enum": [ + "ts_sent_to_platform", + "ts_accepted_by_platform", + "ts_returned_from_platform", + "ts_solved_by_platform", + "ts_rejected_by_platform" + ], + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Ticket Sharing Status'." + ] + }, + "application_ticket_url": { + "description": "Maps to zendesk field 'Application Ticket URL'.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Application Ticket URL'." + ] + }, + "infrastructure_ticket_url": { + "description": "Maps to zendesk field 'Infrastructure Ticket URL'.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "Maps to zendesk field 'Infrastructure Ticket URL'." + ] + }, + "jira": { + "description": "A list of JIRA issues related to the support ticket.", + "type": "array", + "items": { + "properties": { + "id": { + "description": "The id of the query.", + "type": "integer" + }, + "ticket_id": { + "description": "The id of the ticket.", + "type": "integer" + }, + "issue_id": { + "description": "The issue id number.", + "type": "integer" + }, + "issue_key": { + "description": "The issue key.", + "type": "string" + }, + "created_at": { + "description": "The created at timestamp.", + "type": "number", + "format": "float" + }, + "updated_at": { + "description": "The updated at timestamp.", + "type": "number", + "format": "float" + } + }, + "type": "object" + }, + "x-isDateTime": false, + "x-description": [ + "A list of JIRA issues related to the support ticket." + ] + }, + "zd_ticket_url": { + "description": "URL to the customer-facing ticket in Zendesk.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "URL to the customer-facing ticket in Zendesk." + ] + } + }, + "type": "object", + "x-description": [ + "The support ticket object." + ] + }, + "CurrentUser": { + "description": "The user object.", + "properties": { + "id": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "uuid": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "username": { + "description": "The username of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The username of the owner." + ] + }, + "display_name": { + "description": "The full name of the owner.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The full name of the owner." + ] + }, + "status": { + "description": "Status of the user. 0 = blocked; 1 = active.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Status of the user. 0 = blocked; 1 = active." + ] + }, + "mail": { + "description": "The email address of the owner.", + "type": "string", + "format": "email", + "x-isDateTime": false, + "x-description": [ + "The email address of the owner." + ] + }, + "ssh_keys": { + "description": "The list of user's public SSH keys.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SshKey" + }, + "x-isDateTime": false, + "x-description": [ + "The list of user's public SSH keys." + ] + }, + "has_key": { + "description": "The indicator whether the user has a public ssh key on file or not.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The indicator whether the user has a public ssh key on file or not." + ] + }, + "projects": { + "type": "array", + "items": { + "properties": { + "id": { + "description": "The unique ID string of the project.", + "type": "string" + }, + "name": { + "description": "The name given to the project. Appears as the title in the user interface.", + "type": "string" + }, + "title": { + "description": "The name given to the project. Appears as the title in the user interface.", + "type": "string" + }, + "cluster": { + "description": "The machine name of the region where the project is located. Cannot be changed after project creation.", + "type": "string" + }, + "cluster_label": { + "description": "The human-readable name of the region where the project is located.", + "type": "string" + }, + "region": { + "description": "The machine name of the region where the project is located. Cannot be changed after project creation.", + "type": "string" + }, + "region_label": { + "description": "The human-readable name of the region where the project is located.", + "type": "string" + }, + "uri": { + "description": "The URL for the project's user interface.", + "type": "string" + }, + "endpoint": { + "description": "The project API endpoint for the project.", + "type": "string" + }, + "license_id": { + "description": "The ID of the subscription.", + "type": "integer" + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid" + }, + "owner_info": { + "$ref": "#/components/schemas/OwnerInfo" + }, + "plan": { + "description": "The plan type of the subscription.", + "type": "string" + }, + "subscription_id": { + "description": "The ID of the subscription.", + "type": "integer" + }, + "status": { + "description": "The status of the project.", + "type": "string" + }, + "vendor": { + "description": "The machine name of the vendor the subscription belongs to.", + "type": "string" + }, + "vendor_label": { + "description": "The machine name of the vendor the subscription belongs to.", + "type": "string" + }, + "vendor_website": { + "description": "The URL of the vendor the subscription belongs to.", + "type": "string", + "format": "url" + }, + "vendor_resources": { + "description": "The link to the resources of the vendor the subscription belongs to.", + "type": "string" + }, + "created_at": { + "description": "The creation date of the subscription.", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "x-isDateTime": false + }, + "sequence": { + "description": "The sequential ID of the user.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The sequential ID of the user." + ] + }, + "roles": { + "type": "array", + "items": { + "description": "The user role name.", + "type": "string" + }, + "x-isDateTime": false + }, + "picture": { + "description": "The URL of the user image.", + "type": "string", + "format": "url", + "x-isDateTime": false, + "x-description": [ + "The URL of the user image." + ] + }, + "tickets": { + "description": "Number of support tickets by status.", + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Number of support tickets by status." + ] + }, + "trial": { + "description": "The indicator whether the user is in trial or not.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The indicator whether the user is in trial or not." + ] + }, + "current_trial": { + "type": "array", + "items": { + "properties": { + "created": { + "description": "The ISO timestamp of the trial creation date time.", + "type": "string", + "format": "date-time" + }, + "description": { + "description": "The human readable trial description", + "type": "string" + }, + "spend_remaining": { + "description": "Total spend amount of the voucher minus existing project costs for the existing billing cycle.", + "type": "string" + }, + "expiration": { + "description": "Date the trial expires.", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "x-isDateTime": false + } + }, + "type": "object", + "x-description": [ + "The user object." + ] + }, + "OrganizationInvitation": { + "title": "OrganizationInvitation", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the invitation.", + "x-isDateTime": false, + "x-description": [ + "The ID of the invitation." + ] + }, + "state": { + "type": "string", + "enum": [ + "pending", + "processing", + "accepted", + "cancelled", + "error" + ], + "description": "The invitation state.", + "x-isDateTime": false, + "x-description": [ + "The invitation state." + ] + }, + "organization_id": { + "type": "string", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee.", + "x-isDateTime": false, + "x-description": [ + "The email address of the invitee." + ] + }, + "owner": { + "type": "object", + "description": "The inviter.", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-description": [ + "The ID of the user." + ] + }, + "display_name": { + "type": "string", + "description": "The user's display name.", + "x-description": [ + "The user's display name." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The inviter." + ] + }, + "created_at": { + "type": "string", + "description": "The date and time when the invitation was created.", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was last updated." + ] + }, + "finished_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was finished.", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was finished." + ] + }, + "permissions": { + "$ref": "#/components/schemas/OrganizationPermissions" + } + }, + "x-examples": { + "example-1": { + "id": "97f46eca-6276-4993-bfeb-bbb53cba6f08", + "state": "pending", + "organization_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", + "email": "bob@example.com", + "owner": { + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "display_name": "Alice" + }, + "created_at": "2019-08-24T14:15:22Z", + "updated_at": "2019-08-24T14:15:22Z", + "finished_at": null, + "permissions": [ + "members" + ] + } + } + }, + "OrganizationPermissions": { + "type": "array", + "description": "The permissions the invitee should be given on the organization.", + "items": { + "type": "string", + "enum": [ + "admin", + "billing", + "plans", + "members", + "project:create", + "projects:list" + ] + }, + "x-description": [ + "The permissions the invitee should be given on the organization." + ] + }, + "ProjectInvitation": { + "title": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the invitation.", + "x-isDateTime": false, + "x-description": [ + "The ID of the invitation." + ] + }, + "state": { + "type": "string", + "enum": [ + "pending", + "processing", + "accepted", + "cancelled", + "error" + ], + "description": "The invitation state.", + "x-isDateTime": false, + "x-description": [ + "The invitation state." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project." + ] + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer" + ], + "description": "The project role.", + "x-isDateTime": false, + "x-description": [ + "The project role." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee.", + "x-isDateTime": false, + "x-description": [ + "The email address of the invitee." + ] + }, + "owner": { + "type": "object", + "description": "The inviter.", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-description": [ + "The ID of the user." + ] + }, + "display_name": { + "type": "string", + "description": "The user's display name.", + "x-description": [ + "The user's display name." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The inviter." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the invitation was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was last updated." + ] + }, + "finished_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date and time when the invitation was finished.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the invitation was finished." + ] + }, + "environments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the environment." + }, + "type": { + "type": "string", + "description": "The environment type." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The environment role." + }, + "title": { + "type": "string", + "description": "The environment title." + } + } + }, + "x-isDateTime": false + } + }, + "x-examples": { + "example-1": { + "id": "97f46eca-6276-4993-bfeb-bbb53cba6f08", + "state": "pending", + "project_id": "652soceglkw4u", + "role": "admin", + "email": "bob@example.com", + "owner": { + "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", + "display_name": "Alice" + }, + "created_at": "2019-08-24T14:15:22Z", + "updated_at": "2019-08-24T14:15:22Z", + "finished_at": null, + "environments": {} + } + } + }, + "User": { + "description": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "deactivated": { + "type": "boolean", + "description": "Whether the user has been deactivated.", + "x-isDateTime": false, + "x-description": [ + "Whether the user has been deactivated." + ] + }, + "namespace": { + "type": "string", + "description": "The namespace in which the user's username is unique.", + "x-isDateTime": false, + "x-description": [ + "The namespace in which the user's username is unique." + ] + }, + "username": { + "type": "string", + "description": "The user's username.", + "x-isDateTime": false, + "x-description": [ + "The user's username." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The user's email address.", + "x-isDateTime": false, + "x-description": [ + "The user's email address." + ] + }, + "email_verified": { + "type": "boolean", + "description": "Whether the user's email address has been verified.", + "x-isDateTime": false, + "x-description": [ + "Whether the user's email address has been verified." + ] + }, + "first_name": { + "type": "string", + "description": "The user's first name.", + "x-isDateTime": false, + "x-description": [ + "The user's first name." + ] + }, + "last_name": { + "type": "string", + "description": "The user's last name.", + "x-isDateTime": false, + "x-description": [ + "The user's last name." + ] + }, + "picture": { + "type": "string", + "format": "uri", + "description": "The user's picture.", + "x-isDateTime": false, + "x-description": [ + "The user's picture." + ] + }, + "company": { + "type": "string", + "description": "The user's company.", + "x-isDateTime": false, + "x-description": [ + "The user's company." + ] + }, + "website": { + "type": "string", + "format": "uri", + "description": "The user's website.", + "x-isDateTime": false, + "x-description": [ + "The user's website." + ] + }, + "country": { + "type": "string", + "maxLength": 2, + "minLength": 2, + "description": "The user's ISO 3166-1 alpha-2 country code.", + "x-isDateTime": false, + "x-description": [ + "The user's ISO 3166-1 alpha-2 country code." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the user was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the user was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the user was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the user was last updated." + ] + }, + "consented_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the user consented to the Terms of Service.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the user consented to the Terms of Service." + ] + }, + "consent_method": { + "type": "string", + "description": "The method by which the user consented to the Terms of Service.", + "enum": [ + "opt-in", + "text-ref" + ], + "x-isDateTime": false, + "x-description": [ + "The method by which the user consented to the Terms of Service." + ] + } + }, + "required": [ + "id", + "deactivated", + "namespace", + "username", + "email", + "email_verified", + "first_name", + "last_name", + "picture", + "company", + "website", + "country", + "created_at", + "updated_at" + ], + "x-examples": { + "example-1": { + "company": "Platform.sh SAS", + "country": "FR", + "created_at": "2010-04-19T10:00:00Z", + "deactivated": false, + "email": "hello@platform.sh", + "email_verified": true, + "first_name": "Hello", + "id": "d81c8ee2-44b3-429f-b944-a33ad7437690", + "last_name": "World", + "namespace": "platformsh", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "updated_at": "2021-01-27T13:58:38.06968Z", + "username": "platform-sh", + "website": "https://platform.sh", + "consented_at": "2010-04-19T10:00:00Z", + "consent_method": "opt-in" + } + } + }, + "Error": { + "description": "", + "type": "object", + "properties": { + "status": { + "type": "string", + "x-isDateTime": false + }, + "message": { + "type": "string", + "x-isDateTime": false + }, + "code": { + "type": "number", + "x-isDateTime": false + }, + "detail": { + "type": "object", + "x-isDateTime": false + }, + "title": { + "type": "string", + "x-isDateTime": false + } + }, + "title": "", + "x-examples": { + "example-1": { + "status": "Invalid input", + "message": "This field is required.", + "code": 400, + "detail": { + "field": [ + "This field is required." + ] + }, + "title": "Bad Request" + } + } + }, + "ListLinks": { + "type": "object", + "properties": { + "self": { + "$ref": "#/components/schemas/Link" + }, + "previous": { + "$ref": "#/components/schemas/Link" + }, + "next": { + "$ref": "#/components/schemas/Link" + } + } + }, + "Link": { + "type": "object", + "title": "Link", + "description": "A hypermedia link to the {current, next, previous} set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link", + "x-isDateTime": false, + "x-description": [ + "URL of the link" + ] + } + }, + "x-description": [ + "A hypermedia link to the {current, next, previous} set of items." + ] + }, + "ApiToken": { + "description": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the token.", + "x-isDateTime": false, + "x-description": [ + "The ID of the token." + ] + }, + "name": { + "type": "string", + "description": "The token name.", + "x-isDateTime": false, + "x-description": [ + "The token name." + ] + }, + "mfa_on_creation": { + "type": "boolean", + "description": "Whether the user had multi-factor authentication (MFA) enabled when they created the token.", + "x-isDateTime": false, + "x-description": [ + "Whether the user had multi-factor authentication (MFA) enabled when they created the token." + ] + }, + "token": { + "type": "string", + "description": "The token in plain text (available only when created).", + "x-isDateTime": false, + "x-description": [ + "The token in plain text (available only when created)." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the token was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the token was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the token was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the token was last updated." + ] + }, + "last_used_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date and time when the token was last exchanged for an access token. This will be null for a token which has never been used, or not used since this API property was added. Note: After an API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH certificate(s) derived from the access token.\n", + "x-isDateTime": true, + "x-description": [ + "The date and time when the token was last exchanged for an access token. This will be null for a", + "token which has never been used, or not used since this API property was added. Note: After an", + "API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH", + "certificate(s) derived from the access token." + ] + } + }, + "x-examples": { + "example-1": { + "created_at": "2019-01-29T08:17:47Z", + "id": "660aa36d-23cf-402b-8889-63af71967f2b", + "name": "Token for CI", + "updated_at": "2019-01-29T08:17:47Z" + } + } + }, + "Connection": { + "description": "", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "The name of the federation provider.", + "x-isDateTime": false, + "x-description": [ + "The name of the federation provider." + ] + }, + "provider_type": { + "type": "string", + "description": "The type of the federation provider.", + "x-isDateTime": false, + "x-description": [ + "The type of the federation provider." + ] + }, + "is_mandatory": { + "type": "boolean", + "description": "Whether the federated login connection is mandatory.", + "x-isDateTime": false, + "x-description": [ + "Whether the federated login connection is mandatory." + ] + }, + "subject": { + "type": "string", + "description": "The identity on the federation provider.", + "x-isDateTime": false, + "x-description": [ + "The identity on the federation provider." + ] + }, + "email_address": { + "type": "string", + "description": "The email address presented on the federated login connection.", + "x-isDateTime": false, + "x-description": [ + "The email address presented on the federated login connection." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the connection was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the connection was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the connection was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the connection was last updated." + ] + } + }, + "x-examples": { + "example-1": { + "created_at": "2021-05-24T07:20:35.683264Z", + "provider": "acme-inc-oidc", + "provider_type": "okta", + "subject": "1621840835647277693", + "email_address": "name@example.com", + "updated_at": "2021-05-24T07:20:35.683264Z" + } + } + }, + "OrganizationMfaEnforcement": { + "description": "The MFA enforcement for the organization.", + "type": "object", + "properties": { + "enforce_mfa": { + "type": "boolean", + "description": "Whether the MFA enforcement is enabled.", + "x-isDateTime": false, + "x-description": [ + "Whether the MFA enforcement is enabled." + ] + } + }, + "x-examples": { + "example-1": { + "enforce_mfa": true + } + }, + "x-description": [ + "The MFA enforcement for the organization." + ] + }, + "OrganizationSSOConfig": { + "description": "The SSO configuration for the organization.", + "type": "object", + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleSSOConfig" + } + ] + }, + { + "type": "object", + "properties": { + "organization_id": { + "type": "string", + "description": "Organization ID.", + "x-description": [ + "Organization ID." + ] + }, + "enforced": { + "type": "boolean", + "description": "Whether the configuration is enforced for all the organization members.", + "x-description": [ + "Whether the configuration is enforced for all the organization members." + ] + }, + "created_at": { + "type": "string", + "description": "The date and time when the SSO configuration was created.", + "format": "date-time", + "x-description": [ + "The date and time when the SSO configuration was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the SSO configuration was last updated.", + "x-description": [ + "The date and time when the SSO configuration was last updated." + ] + } + } + } + ], + "x-examples": { + "example-1": { + "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS", + "provider_type": "google", + "domain": "example.com", + "enforced": true, + "created_at": "2021-05-24T07:20:35.683264Z", + "updated_at": "2021-05-24T07:20:35.683264Z" + } + }, + "x-description": [ + "The SSO configuration for the organization." + ] + }, + "GoogleSSOConfig": { + "type": "object", + "title": "GoogleSSO", + "properties": { + "provider_type": { + "type": "string", + "description": "SSO provider type.", + "enum": [ + "google" + ], + "x-isDateTime": false, + "x-description": [ + "SSO provider type." + ] + }, + "domain": { + "type": "string", + "description": "Google hosted domain.", + "x-isDateTime": false, + "x-description": [ + "Google hosted domain." + ] + } + } + }, + "Team": { + "description": "", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the parent organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the parent organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the team.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the team." + ] + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string", + "enum": [ + "admin", + "viewer", + "development:admin", + "development:contributor", + "development:viewer", + "staging:admin", + "staging:contributor", + "staging:viewer", + "production:admin", + "production:contributor", + "production:viewer" + ] + }, + "x-isDateTime": false, + "x-description": [ + "Project permissions that are granted to the team." + ] + }, + "counts": { + "type": "object", + "properties": { + "member_count": { + "type": "integer", + "description": "Total count of members of the team.", + "x-description": [ + "Total count of members of the team." + ] + }, + "project_count": { + "type": "integer", + "description": "Total count of projects that the team has access to.", + "x-description": [ + "Total count of projects that the team has access to." + ] + } + }, + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was last updated." + ] + } + }, + "x-examples": { + "example-1": { + "id": "01FVMKN9KHVWWVY488AVKDWHR3", + "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS", + "counts": { + "member_count": 12, + "project_count": 5 + }, + "label": "Contractors", + "created_at": "2021-05-24T07:20:35.683264Z", + "updated_at": "2021-05-24T07:20:35.683264Z", + "project_permissions": [ + "viewer", + "staging:contributor", + "development:admin" + ] + } + } + }, + "TeamMember": { + "type": "object", + "properties": { + "team_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team member was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team member was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team member was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team member was last updated." + ] + } + } + }, + "UserReference": { + "description": "The referenced user, or null if it no longer exists.", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "username": { + "type": "string", + "description": "The user's username.", + "x-isDateTime": false, + "x-description": [ + "The user's username." + ] + }, + "email": { + "type": "string", + "format": "email", + "description": "The user's email address.", + "x-isDateTime": false, + "x-description": [ + "The user's email address." + ] + }, + "first_name": { + "type": "string", + "description": "The user's first name.", + "x-isDateTime": false, + "x-description": [ + "The user's first name." + ] + }, + "last_name": { + "type": "string", + "description": "The user's last name.", + "x-isDateTime": false, + "x-description": [ + "The user's last name." + ] + }, + "picture": { + "type": "string", + "format": "uri", + "description": "The user's picture.", + "x-isDateTime": false, + "x-description": [ + "The user's picture." + ] + }, + "mfa_enabled": { + "type": "boolean", + "description": "Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a mandatory SSO provider that itself supports MFA (see \"sso_enabled\\\").", + "x-isDateTime": false, + "x-description": [ + "Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a", + "mandatory SSO provider that itself supports MFA (see \"sso_enabled\\\")." + ] + }, + "sso_enabled": { + "type": "boolean", + "description": "Whether the user is linked to a mandatory SSO provider.", + "x-isDateTime": false, + "x-description": [ + "Whether the user is linked to a mandatory SSO provider." + ] + } + }, + "x-examples": { + "example-1": { + "email": "hello@platform.sh", + "first_name": "Hello", + "id": "d81c8ee2-44b3-429f-b944-a33ad7437690", + "last_name": "World", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "username": "platform-sh", + "mfa_enabled": true, + "sso_enabled": true + } + }, + "x-description": [ + "The referenced user, or null if it no longer exists." + ] + }, + "TeamReference": { + "description": "The referenced team, or null if it no longer exists.", + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the parent organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the parent organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the team.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the team." + ] + }, + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string", + "enum": [ + "admin", + "viewer", + "development:admin", + "development:contributor", + "development:viewer", + "staging:admin", + "staging:contributor", + "staging:viewer", + "production:admin", + "production:contributor", + "production:viewer" + ] + }, + "x-isDateTime": false, + "x-description": [ + "Project permissions that are granted to the team." + ] + }, + "counts": { + "type": "object", + "properties": { + "member_count": { + "type": "integer", + "description": "Total count of members of the team.", + "x-description": [ + "Total count of members of the team." + ] + }, + "project_count": { + "type": "integer", + "description": "Total count of projects that the team has access to.", + "x-description": [ + "Total count of projects that the team has access to." + ] + } + }, + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the team was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the team was last updated." + ] + } + }, + "x-examples": { + "example-1": { + "id": "01FVMKN9KHVWWVY488AVKDWHR3", + "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS", + "counts": { + "member_count": 12, + "project_count": 5 + }, + "label": "Contractors", + "project_permissions": [ + "viewer", + "staging:contributor", + "development:admin" + ], + "created_at": "2021-05-24T07:20:35.683264Z", + "updated_at": "2021-05-24T07:20:35.683264Z" + } + }, + "x-description": [ + "The referenced team, or null if it no longer exists." + ] + }, + "DateTimeFilter": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal", + "x-isDateTime": false, + "x-description": [ + "Equal" + ] + }, + "ne": { + "type": "string", + "description": "Not equal", + "x-isDateTime": false, + "x-description": [ + "Not equal" + ] + }, + "between": { + "type": "string", + "description": "Between (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Between (comma-separated list)" + ] + }, + "gt": { + "type": "string", + "description": "Greater than", + "x-isDateTime": false, + "x-description": [ + "Greater than" + ] + }, + "gte": { + "type": "string", + "description": "Greater than or equal", + "x-isDateTime": false, + "x-description": [ + "Greater than or equal" + ] + }, + "lt": { + "type": "string", + "description": "Less than", + "x-isDateTime": false, + "x-description": [ + "Less than" + ] + }, + "lte": { + "type": "string", + "description": "Less than or equal", + "x-isDateTime": false, + "x-description": [ + "Less than or equal" + ] + } + } + }, + "StringFilter": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal", + "x-isDateTime": false, + "x-description": [ + "Equal" + ] + }, + "ne": { + "type": "string", + "description": "Not equal", + "x-isDateTime": false, + "x-description": [ + "Not equal" + ] + }, + "in": { + "type": "string", + "description": "In (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "In (comma-separated list)" + ] + }, + "nin": { + "type": "string", + "description": "Not in (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Not in (comma-separated list)" + ] + }, + "between": { + "type": "string", + "description": "Between (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Between (comma-separated list)" + ] + }, + "contains": { + "type": "string", + "description": "Contains", + "x-isDateTime": false, + "x-description": [ + "Contains" + ] + }, + "starts": { + "type": "string", + "description": "Starts with", + "x-isDateTime": false, + "x-description": [ + "Starts with" + ] + }, + "ends": { + "type": "string", + "description": "Ends with", + "x-isDateTime": false, + "x-description": [ + "Ends with" + ] + } + } + }, + "AcceptedResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "title": "The status text of the response", + "x-isDateTime": false + }, + "code": { + "type": "integer", + "title": "The status code of the response", + "x-isDateTime": false + } + }, + "required": [ + "status", + "code" + ], + "additionalProperties": false + }, + "Activity": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Activity", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Type", + "x-isDateTime": false + }, + "parameters": { + "type": "object", + "title": "Parameters", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project", + "x-isDateTime": false + }, + "integration": { + "type": "string", + "title": "Integration", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Environments", + "x-isDateTime": false + }, + "state": { + "type": "string", + "enum": [ + "cancelled", + "complete", + "in_progress", + "pending", + "scheduled", + "staged" + ], + "title": "State", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "failure", + "success" + ], + "nullable": true, + "title": "Result", + "x-isDateTime": false + }, + "started_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Start date", + "x-isDateTime": true + }, + "completed_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Completion date", + "x-isDateTime": true + }, + "completion_percent": { + "type": "integer", + "title": "Completion percentage", + "x-isDateTime": false + }, + "cancelled_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Cancellation date", + "x-isDateTime": true + }, + "timings": { + "type": "object", + "additionalProperties": { + "type": "number", + "format": "float" + }, + "title": "Timings related to different phases of the activity", + "x-isDateTime": false + }, + "log": { + "type": "string", + "title": "Log", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + }, + "payload": { + "type": "object", + "title": "Payload", + "x-isDateTime": false + }, + "description": { + "type": "string", + "nullable": true, + "title": "The description of the activity, formatted with HTML", + "x-isDateTime": false + }, + "text": { + "type": "string", + "nullable": true, + "title": "The description of the activity, formatted as plain text", + "x-isDateTime": false + }, + "expires_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "The date at which the activity will expire.", + "x-isDateTime": true + }, + "commands": { + "type": "array", + "items": { + "type": "object", + "properties": { + "app": { + "type": "string", + "title": "Application" + }, + "type": { + "type": "string", + "title": "Type" + }, + "exit_code": { + "type": "integer", + "title": "Exit status code" + } + }, + "required": [ + "app", + "type", + "exit_code" + ], + "additionalProperties": false + }, + "title": "Commands", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "type", + "parameters", + "project", + "state", + "result", + "started_at", + "completed_at", + "completion_percent", + "cancelled_at", + "timings", + "log", + "payload", + "description", + "text", + "expires_at", + "commands" + ], + "additionalProperties": false + }, + "ActivityCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + }, + "Backup": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Backup", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "DELETING" + ], + "title": "The status of the backup", + "x-isDateTime": false + }, + "expires_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Expiration date of the backup", + "x-isDateTime": true + }, + "index": { + "type": "integer", + "nullable": true, + "title": "The index of this automated backup", + "x-isDateTime": false + }, + "commit_id": { + "type": "string", + "title": "The ID of the code commit attached to the backup", + "x-isDateTime": false + }, + "environment": { + "type": "string", + "title": "The environment the backup belongs to", + "x-isDateTime": false + }, + "safe": { + "type": "boolean", + "title": "Whether this backup was taken in a safe way", + "x-isDateTime": false + }, + "size_of_volumes": { + "type": "integer", + "nullable": true, + "title": "Total size of volumes backed up", + "x-isDateTime": false + }, + "size_used": { + "type": "integer", + "nullable": true, + "title": "Total size of space used on volumes backed up", + "x-isDateTime": false + }, + "deployment": { + "type": "string", + "nullable": true, + "title": "The current deployment at the time of backup.", + "x-isDateTime": false + }, + "restorable": { + "type": "boolean", + "title": "Whether the backup is restorable", + "x-isDateTime": false + }, + "automated": { + "type": "boolean", + "title": "Whether the backup is automated", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "attributes", + "status", + "expires_at", + "index", + "commit_id", + "environment", + "safe", + "size_of_volumes", + "size_used", + "deployment", + "restorable", + "automated" + ], + "additionalProperties": false + }, + "BackupCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Backup" + } + }, + "BitbucketIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of BitbucketIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "app_credentials": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "The OAuth consumer key." + } + }, + "required": [ + "key" + ], + "additionalProperties": false, + "nullable": true, + "title": "The OAuth2 consumer information (optional).", + "x-isDateTime": false + }, + "addon_credentials": { + "type": "object", + "properties": { + "addon_key": { + "type": "string", + "title": "The addon key (public identifier)." + }, + "client_key": { + "type": "string", + "title": "The client key (public identifier)." + } + }, + "required": [ + "addon_key", + "client_key" + ], + "additionalProperties": false, + "nullable": true, + "title": "The addon credential information (optional).", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + }, + "resync_pull_requests": { + "type": "boolean", + "title": "Whether or not pull request environment data should be re-synced on every build.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "repository", + "build_pull_requests", + "pull_requests_clone_parent_data", + "resync_pull_requests" + ], + "additionalProperties": false + }, + "BitbucketIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "app_credentials": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "The OAuth consumer key." + }, + "secret": { + "type": "string", + "title": "The OAuth consumer secret." + } + }, + "required": [ + "key", + "secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The OAuth2 consumer information (optional).", + "x-isDateTime": false + }, + "addon_credentials": { + "type": "object", + "properties": { + "addon_key": { + "type": "string", + "title": "The addon key (public identifier)." + }, + "client_key": { + "type": "string", + "title": "The client key (public identifier)." + }, + "shared_secret": { + "type": "string", + "title": "The secret of the client." + } + }, + "required": [ + "addon_key", + "client_key", + "shared_secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The addon credential information (optional).", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + }, + "resync_pull_requests": { + "type": "boolean", + "title": "Whether or not pull request environment data should be re-synced on every build.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "repository" + ], + "additionalProperties": false + }, + "BitbucketIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "app_credentials": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "The OAuth consumer key." + }, + "secret": { + "type": "string", + "title": "The OAuth consumer secret." + } + }, + "required": [ + "key", + "secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The OAuth2 consumer information (optional).", + "x-isDateTime": false + }, + "addon_credentials": { + "type": "object", + "properties": { + "addon_key": { + "type": "string", + "title": "The addon key (public identifier)." + }, + "client_key": { + "type": "string", + "title": "The client key (public identifier)." + }, + "shared_secret": { + "type": "string", + "title": "The secret of the client." + } + }, + "required": [ + "addon_key", + "client_key", + "shared_secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "The addon credential information (optional).", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + }, + "resync_pull_requests": { + "type": "boolean", + "title": "Whether or not pull request environment data should be re-synced on every build.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "repository" + ], + "additionalProperties": false + }, + "BitbucketServerIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of BitbucketServerIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The base URL of the Bitbucket Server installation.", + "x-isDateTime": false + }, + "username": { + "type": "string", + "title": "The Bitbucket Server user.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The Bitbucket Server project", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket Server repository", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "url", + "username", + "project", + "repository", + "build_pull_requests", + "pull_requests_clone_parent_data" + ], + "additionalProperties": false + }, + "BitbucketServerIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The base URL of the Bitbucket Server installation.", + "x-isDateTime": false + }, + "username": { + "type": "string", + "title": "The Bitbucket Server user.", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Bitbucket Server personal access token.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The Bitbucket Server project", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket Server repository", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "username", + "token", + "project", + "repository" + ], + "additionalProperties": false + }, + "BitbucketServerIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The base URL of the Bitbucket Server installation.", + "x-isDateTime": false + }, + "username": { + "type": "string", + "title": "The Bitbucket Server user.", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Bitbucket Server personal access token.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The Bitbucket Server project", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The Bitbucket Server repository", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "username", + "token", + "project", + "repository" + ], + "additionalProperties": false + }, + "BlackfireIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of BlackfireIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "environments_credentials": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "server_uuid": { + "type": "string", + "title": "Environment server UUID" + }, + "server_token": { + "type": "string", + "title": "Environment server token" + } + }, + "required": [ + "server_uuid", + "server_token" + ], + "additionalProperties": false + }, + "title": "Blackfire environments credentials", + "x-isDateTime": false + }, + "continuous_profiling": { + "type": "boolean", + "title": "Whether continuous profiling is enabled for the project", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "environments_credentials", + "continuous_profiling" + ], + "additionalProperties": false + }, + "BlackfireIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "BlackfireIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "Blob": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Blob", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The identifier of the tag", + "x-isDateTime": false + }, + "size": { + "type": "integer", + "title": "The size of the blob", + "x-isDateTime": false + }, + "encoding": { + "type": "string", + "enum": [ + "base64", + "utf-8" + ], + "title": "The encoding of the contents", + "x-isDateTime": false + }, + "content": { + "type": "string", + "title": "The contents", + "x-isDateTime": false + } + }, + "required": [ + "id", + "sha", + "size", + "encoding", + "content" + ], + "additionalProperties": false + }, + "Certificate": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Certificate", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "certificate": { + "type": "string", + "title": "The PEM-encoded certificate", + "x-isDateTime": false + }, + "chain": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate chain", + "x-isDateTime": false + }, + "is_provisioned": { + "type": "boolean", + "title": "Whether this certificate is automatically provisioned", + "x-isDateTime": false + }, + "is_invalid": { + "type": "boolean", + "title": "Whether this certificate should be skipped during provisioning", + "x-isDateTime": false + }, + "is_root": { + "type": "boolean", + "title": "Whether this certificate is root type", + "x-isDateTime": false + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The domains covered by this certificate", + "x-isDateTime": false + }, + "auth_type": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The type of authentication the certificate supports", + "x-isDateTime": false + }, + "issuer": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oid": { + "type": "string", + "title": "The OID of the attribute" + }, + "alias": { + "type": "string", + "nullable": true, + "title": "The alias of the attribute, if known" + }, + "value": { + "type": "string", + "title": "The value" + } + }, + "required": [ + "oid", + "alias", + "value" + ], + "additionalProperties": false + }, + "title": "The issuer of the certificate", + "x-isDateTime": false + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expiration date", + "x-isDateTime": true + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "certificate", + "chain", + "is_provisioned", + "is_invalid", + "is_root", + "domains", + "auth_type", + "issuer", + "expires_at" + ], + "additionalProperties": false + }, + "CertificateCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Certificate" + } + }, + "CertificateCreateInput": { + "type": "object", + "properties": { + "certificate": { + "type": "string", + "title": "The PEM-encoded certificate", + "x-isDateTime": false + }, + "key": { + "type": "string", + "title": "The PEM-encoded private key", + "x-isDateTime": false + }, + "chain": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate chain", + "x-isDateTime": false + }, + "is_invalid": { + "type": "boolean", + "title": "Whether this certificate should be skipped during provisioning", + "x-isDateTime": false + } + }, + "required": [ + "certificate", + "key" + ], + "additionalProperties": false + }, + "CertificatePatch": { + "type": "object", + "properties": { + "chain": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate chain", + "x-isDateTime": false + }, + "is_invalid": { + "type": "boolean", + "title": "Whether this certificate should be skipped during provisioning", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "CertificateProvisioner": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of CertificateProvisioner", + "x-isDateTime": false + }, + "directory_url": { + "type": "string", + "title": "ACME directory url", + "x-isDateTime": false + }, + "email": { + "type": "string", + "title": "Contacted email address", + "x-isDateTime": false + }, + "eab_kid": { + "type": "string", + "nullable": true, + "title": "Eab Kid", + "x-isDateTime": false + }, + "eab_hmac_key": { + "type": "string", + "nullable": true, + "title": "Eab Hmac Key", + "x-isDateTime": false + } + }, + "required": [ + "id", + "directory_url", + "email", + "eab_kid", + "eab_hmac_key" + ], + "additionalProperties": false + }, + "CertificateProvisionerCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CertificateProvisioner" + } + }, + "CertificateProvisionerPatch": { + "type": "object", + "properties": { + "directory_url": { + "type": "string", + "title": "ACME directory url", + "x-isDateTime": false + }, + "email": { + "type": "string", + "title": "Contacted email address", + "x-isDateTime": false + }, + "eab_kid": { + "type": "string", + "nullable": true, + "title": "Eab Kid", + "x-isDateTime": false + }, + "eab_hmac_key": { + "type": "string", + "nullable": true, + "title": "Eab Hmac Key", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "Commit": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Commit", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The identifier of the commit", + "x-isDateTime": false + }, + "author": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "title": "The time of the author or committer" + }, + "name": { + "type": "string", + "title": "The name of the author or committer" + }, + "email": { + "type": "string", + "title": "The email of the author or committer" + } + }, + "required": [ + "date", + "name", + "email" + ], + "additionalProperties": false, + "title": "The information about the author", + "x-isDateTime": false + }, + "committer": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "title": "The time of the author or committer" + }, + "name": { + "type": "string", + "title": "The name of the author or committer" + }, + "email": { + "type": "string", + "title": "The email of the author or committer" + } + }, + "required": [ + "date", + "name", + "email" + ], + "additionalProperties": false, + "title": "The information about the committer", + "x-isDateTime": false + }, + "message": { + "type": "string", + "title": "The commit message", + "x-isDateTime": false + }, + "tree": { + "type": "string", + "title": "The identifier of the tree", + "x-isDateTime": false + }, + "parents": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The identifiers of the parents of the commit", + "x-isDateTime": false + } + }, + "required": [ + "id", + "sha", + "author", + "committer", + "message", + "tree", + "parents" + ], + "additionalProperties": false + }, + "DedicatedDeploymentTarget": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of DedicatedDeploymentTarget", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "deploy_host": { + "type": "string", + "nullable": true, + "title": "The host to deploy to.", + "x-isDateTime": false + }, + "deploy_port": { + "type": "integer", + "nullable": true, + "title": "The port to deploy to.", + "x-isDateTime": false + }, + "ssh_host": { + "type": "string", + "nullable": true, + "title": "The host to use to SSH to app containers.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type", + "services" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "auto_mounts": { + "type": "boolean", + "title": "Whether to take application mounts from the pushed data or the deployment target.", + "x-isDateTime": false + }, + "excluded_mounts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Directories that should not be mounted", + "x-isDateTime": false + }, + "enforced_mounts": { + "type": "object", + "title": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount).", + "x-isDateTime": false + }, + "auto_crons": { + "type": "boolean", + "title": "Whether to take application crons from the pushed data or the deployment target.", + "x-isDateTime": false + }, + "auto_nginx": { + "type": "boolean", + "title": "Whether to take application crons from the pushed data or the deployment target.", + "x-isDateTime": false + }, + "maintenance_mode": { + "type": "boolean", + "title": "Whether to perform deployments or not", + "x-isDateTime": false + }, + "guardrails_phase": { + "type": "integer", + "title": "which phase of guardrails are we in", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name", + "deploy_host", + "deploy_port", + "ssh_host", + "hosts", + "auto_mounts", + "excluded_mounts", + "enforced_mounts", + "auto_crons", + "auto_nginx", + "maintenance_mode", + "guardrails_phase" + ], + "additionalProperties": false + }, + "DedicatedDeploymentTargetCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "enforced_mounts": { + "type": "object", + "title": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount).", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "DedicatedDeploymentTargetPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "enforced_mounts": { + "type": "object", + "title": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount).", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "Deployment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Deployment", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "fingerprint": { + "type": "string", + "title": "The fingerprint of the deployment", + "x-isDateTime": false + }, + "cluster_name": { + "type": "string", + "title": "The name of the cluster.", + "x-isDateTime": false + }, + "project_info": { + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "name": { + "type": "string", + "title": "Name" + }, + "namespace": { + "type": "string", + "nullable": true, + "title": "Namespace" + }, + "organization": { + "type": "string", + "nullable": true, + "title": "Organization" + }, + "capabilities": { + "type": "object", + "title": "Capabilities" + }, + "settings": { + "type": "object", + "title": "Settings" + } + }, + "required": [ + "title", + "name", + "namespace", + "organization", + "capabilities", + "settings" + ], + "additionalProperties": false, + "title": "Project Info", + "x-isDateTime": false + }, + "environment_info": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "The machine name of the environment" + }, + "status": { + "type": "string", + "title": "The enviroment status" + }, + "is_main": { + "type": "boolean", + "title": "Is this environment the main environment" + }, + "is_production": { + "type": "boolean", + "title": "Is this environment a production environment" + }, + "constraints": { + "type": "object", + "title": "Constraints of the environment's deployment" + }, + "reference": { + "type": "string", + "title": "The reference in Git for this environment" + }, + "machine_name": { + "type": "string", + "title": "The machine name of the environment" + }, + "environment_type": { + "type": "string", + "title": "The type of environment (Production, Staging or Development)" + }, + "links": { + "type": "object", + "title": "Links" + } + }, + "required": [ + "name", + "status", + "is_main", + "is_production", + "constraints", + "reference", + "machine_name", + "environment_type", + "links" + ], + "additionalProperties": false, + "title": "Environment Info", + "x-isDateTime": false + }, + "deployment_target": { + "type": "string", + "title": "The deployment target.", + "x-isDateTime": false + }, + "vpn": { + "type": "object", + "properties": { + "version": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "title": "The IKE version to use (1 or 2)" + }, + "aggressive": { + "type": "string", + "enum": [ + "no", + "yes" + ], + "title": "Whether to use IKEv1 Aggressive or Main Mode" + }, + "modeconfig": { + "type": "string", + "enum": [ + "pull", + "push" + ], + "title": "Defines which mode is used to assign a virtual IP (must be the same on both sides)" + }, + "authentication": { + "type": "string", + "title": "The authentication scheme" + }, + "gateway_ip": { + "type": "string", + "title": "Remote gateway IP" + }, + "identity": { + "type": "string", + "nullable": true, + "title": "The identity of the ipsec participant" + }, + "second_identity": { + "type": "string", + "nullable": true, + "title": "The second identity of the ipsec participant" + }, + "remote_identity": { + "type": "string", + "nullable": true, + "title": "The identity of the remote ipsec participant" + }, + "remote_subnets": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Remote subnets (CIDR notation)" + }, + "ike": { + "type": "string", + "title": "The IKE algorithms to negotiate for this VPN connection." + }, + "esp": { + "type": "string", + "title": "The ESP algorithms to negotiate for this VPN connection." + }, + "ikelifetime": { + "type": "string", + "title": "The lifetime of the IKE exchange." + }, + "lifetime": { + "type": "string", + "title": "The lifetime of the ESP exchange." + }, + "margintime": { + "type": "string", + "title": "The margin time for re-keying." + } + }, + "required": [ + "version", + "aggressive", + "modeconfig", + "authentication", + "gateway_ip", + "identity", + "second_identity", + "remote_identity", + "remote_subnets", + "ike", + "esp", + "ikelifetime", + "lifetime", + "margintime" + ], + "additionalProperties": false, + "nullable": true, + "title": "VPN configuration", + "x-isDateTime": false + }, + "http_access": { + "type": "object", + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Whether http_access control is enabled" + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "Permission" + }, + "address": { + "type": "string", + "title": "IP address or CIDR" + } + }, + "required": [ + "permission", + "address" + ], + "additionalProperties": false + }, + "title": "Address grants" + }, + "basic_auth": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Basic auth grants" + } + }, + "required": [ + "is_enabled", + "addresses", + "basic_auth" + ], + "additionalProperties": false, + "title": "Http access permissions", + "x-isDateTime": false + }, + "enable_smtp": { + "type": "boolean", + "title": "Whether to configure SMTP for this environment.", + "x-isDateTime": false + }, + "restrict_robots": { + "type": "boolean", + "title": "Whether to restrict robots for this environment.", + "x-isDateTime": false + }, + "variables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name of the variable" + }, + "value": { + "type": "string", + "title": "Value of the variable" + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive" + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string" + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build" + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime" + } + }, + "required": [ + "name", + "is_sensitive", + "is_json", + "visible_build", + "visible_runtime" + ], + "additionalProperties": false + }, + "title": "The variables applying to this environment", + "x-isDateTime": false + }, + "access": { + "type": "array", + "items": { + "type": "object", + "properties": { + "entity_id": { + "type": "string", + "title": "Entity ID" + }, + "role": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ], + "title": "Role" + } + }, + "required": [ + "entity_id", + "role" + ], + "additionalProperties": false + }, + "title": "Access control definition for this enviroment", + "x-isDateTime": false + }, + "subscription": { + "type": "object", + "properties": { + "license_uri": { + "type": "string", + "title": "URI of the subscription" + }, + "plan": { + "type": "string", + "enum": [ + "2xlarge", + "2xlarge-high-memory", + "4xlarge", + "8xlarge", + "development", + "large", + "large-high-memory", + "medium", + "medium-high-memory", + "standard", + "standard-high-memory", + "xlarge", + "xlarge-high-memory" + ], + "title": "Plan level" + }, + "environments": { + "type": "integer", + "title": "Number of environments" + }, + "storage": { + "type": "integer", + "title": "Size of storage (in MB)" + }, + "included_users": { + "type": "integer", + "title": "Number of users" + }, + "subscription_management_uri": { + "type": "string", + "title": "URI for managing the subscription" + }, + "restricted": { + "type": "boolean", + "title": "True if subscription attributes, like number of users, are frozen" + }, + "suspended": { + "type": "boolean", + "title": "Whether or not the subscription is suspended" + }, + "user_licenses": { + "type": "integer", + "title": "Current number of users" + }, + "resources": { + "type": "object", + "properties": { + "container_profiles": { + "type": "boolean", + "title": "Enable support for customizable container profiles." + }, + "production": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for production environments" + }, + "development": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for development environments" + } + }, + "required": [ + "container_profiles", + "production", + "development" + ], + "additionalProperties": false, + "title": "Resources limits" + }, + "resource_validation_url": { + "type": "string", + "title": "URL for resources validation" + }, + "image_types": { + "type": "object", + "properties": { + "only": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be allowed use." + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be denied use." + } + }, + "additionalProperties": false, + "title": "Restricted and denied image types" + } + }, + "required": [ + "license_uri", + "storage", + "included_users", + "subscription_management_uri", + "restricted", + "suspended", + "user_licenses" + ], + "additionalProperties": false, + "title": "Subscription", + "x-isDateTime": false + }, + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "The service type." + }, + "size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "AUTO", + "L", + "M", + "S", + "XL" + ], + "title": "The service size." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + }, + "access": { + "type": "object", + "title": "The configuration of the service." + }, + "configuration": { + "type": "object", + "title": "The configuration of the service." + }, + "relationships": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "The relationships of the service to other services." + }, + "firewall": { + "type": "object", + "properties": { + "outbound": { + "type": "array", + "items": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "tcp" + ], + "title": "The IP protocol to apply the restriction on." + }, + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The IP range in CIDR notation to apply the restriction on." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Domains of the restriction." + }, + "ports": { + "type": "array", + "items": { + "type": "integer" + }, + "title": "The port to apply the restriction on." + } + }, + "required": [ + "protocol", + "ips", + "domains", + "ports" + ], + "additionalProperties": false + }, + "title": "Outbound firewall restrictions" + } + }, + "required": [ + "outbound" + ], + "additionalProperties": false, + "nullable": true, + "title": "Firewall" + }, + "resources": { + "type": "object", + "properties": { + "base_memory": { + "type": "integer", + "nullable": true, + "title": "The base memory for the container" + }, + "memory_ratio": { + "type": "integer", + "nullable": true, + "title": "The amount of memory to allocate per units of CPU" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "Selected size from container profile" + }, + "minimum": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The minimum resources for this service" + }, + "default": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The default resources for this service" + }, + "disk": { + "type": "object", + "properties": { + "temporary": { + "type": "integer", + "nullable": true, + "title": "Temporary" + }, + "instance": { + "type": "integer", + "nullable": true, + "title": "Instance" + }, + "storage": { + "type": "integer", + "nullable": true, + "title": "Storage" + } + }, + "required": [ + "temporary", + "instance", + "storage" + ], + "additionalProperties": false, + "nullable": true, + "title": "The disks resources" + } + }, + "required": [ + "base_memory", + "memory_ratio", + "profile_size", + "minimum", + "default", + "disk" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "container_profile": { + "type": "string", + "nullable": true, + "title": "Selected container profile for the service" + }, + "endpoints": { + "type": "object", + "nullable": true, + "title": "Endpoints" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this service" + } + }, + "required": [ + "type", + "size", + "disk", + "access", + "configuration", + "relationships", + "firewall", + "resources", + "container_profile", + "endpoints", + "instance_count" + ], + "additionalProperties": false + }, + "title": "Services", + "x-isDateTime": false + }, + "routes": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProxyRoute" + }, + { + "$ref": "#/components/schemas/RedirectRoute" + }, + { + "$ref": "#/components/schemas/UpstreamRoute" + } + ] + }, + "title": "Routes", + "x-isDateTime": false + }, + "webapps": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "base_memory": { + "type": "integer", + "nullable": true, + "title": "The base memory for the container" + }, + "memory_ratio": { + "type": "integer", + "nullable": true, + "title": "The amount of memory to allocate per units of CPU" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "Selected size from container profile" + }, + "minimum": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The minimum resources for this service" + }, + "default": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The default resources for this service" + }, + "disk": { + "type": "object", + "properties": { + "temporary": { + "type": "integer", + "nullable": true, + "title": "Temporary" + }, + "instance": { + "type": "integer", + "nullable": true, + "title": "Instance" + }, + "storage": { + "type": "integer", + "nullable": true, + "title": "Storage" + } + }, + "required": [ + "temporary", + "instance", + "storage" + ], + "additionalProperties": false, + "nullable": true, + "title": "The disks resources" + } + }, + "required": [ + "base_memory", + "memory_ratio", + "profile_size", + "minimum", + "default", + "disk" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "AUTO", + "L", + "M", + "S", + "XL", + "XS" + ], + "title": "The container size for this application in production. Leave blank to allow it to be set dynamically." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + }, + "access": { + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ] + }, + "title": "Access information, a mapping between access type and roles." + }, + "relationships": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service." + }, + "endpoint": { + "type": "string", + "nullable": true, + "title": "The name of the endpoint on the service." + } + }, + "required": [ + "service", + "endpoint" + ], + "additionalProperties": false, + "nullable": true + }, + "title": "The relationships of the application to defined services." + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A mapping of hostname to ip address to be added to the container's hosts file" + }, + "mounts": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "instance", + "local", + "service", + "storage", + "temporary", + "tmp" + ], + "title": "The type of mount that will provide the data." + }, + "source_path": { + "type": "string", + "title": "The path to be mounted, relative to the root directory of the volume that's being mounted from." + }, + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service that the volume will be mounted from. Must be a service in `services.yaml` of type `network-storage`." + } + }, + "required": [ + "source", + "source_path" + ], + "additionalProperties": false + }, + "title": "Filesystem mounts of this application. If not specified the application will have no writeable disk space." + }, + "timezone": { + "type": "string", + "nullable": true, + "title": "The timezone of the application. This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified." + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment." + }, + "firewall": { + "type": "object", + "properties": { + "outbound": { + "type": "array", + "items": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "tcp" + ], + "title": "The IP protocol to apply the restriction on." + }, + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The IP range in CIDR notation to apply the restriction on." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Domains of the restriction." + }, + "ports": { + "type": "array", + "items": { + "type": "integer" + }, + "title": "The port to apply the restriction on." + } + }, + "required": [ + "protocol", + "ips", + "domains", + "ports" + ], + "additionalProperties": false + }, + "title": "Outbound firewall restrictions" + } + }, + "required": [ + "outbound" + ], + "additionalProperties": false, + "nullable": true, + "title": "Firewall" + }, + "container_profile": { + "type": "string", + "nullable": true, + "title": "Selected container profile for the application" + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "The command used to start the operation." + }, + "stop": { + "type": "string", + "nullable": true, + "title": "The command used to stop the operation." + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands definition." + }, + "timeout": { + "type": "integer", + "nullable": true, + "title": "The maximum timeout in seconds after which the operation will be forcefully killed." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ], + "title": "The minimum role necessary to trigger this operation." + } + }, + "required": [ + "commands", + "timeout", + "role" + ], + "additionalProperties": false + }, + "title": "Operations that can be triggered on this application" + }, + "name": { + "type": "string", + "title": "The name of the application. Must be unique within a project." + }, + "type": { + "type": "string", + "title": "The base runtime and version to use for this worker." + }, + "preflight": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the preflight security blocks are enabled." + }, + "ignored_rules": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Specific rules to ignore during preflight security checks. See the documentation for options." + } + }, + "required": [ + "enabled", + "ignored_rules" + ], + "additionalProperties": false, + "title": "Configuration for pre-flight checks." + }, + "tree_id": { + "type": "string", + "title": "The identifier of the source tree of the application" + }, + "app_dir": { + "type": "string", + "title": "The path of the application in the container" + }, + "endpoints": { + "type": "object", + "nullable": true, + "title": "Endpoints" + }, + "runtime": { + "type": "object", + "title": "Runtime-specific configuration." + }, + "web": { + "type": "object", + "properties": { + "locations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "root": { + "type": "string", + "nullable": true, + "title": "The folder from which to serve static assets for this location relative to the application root." + }, + "expires": { + "type": "string", + "title": "Amount of time to cache static assets." + }, + "passthru": { + "type": "string", + "title": "Whether to forward disallowed and missing resources from this location to the application. On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`." + }, + "scripts": { + "type": "boolean", + "title": "Whether to execute scripts in this location (for script based runtimes)." + }, + "index": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Files to look for to serve directories." + }, + "allow": { + "type": "boolean", + "title": "Whether to allow access to this location by default." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A set of header fields set to the HTTP response. Applies only to static files, not responses from the application." + }, + "rules": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "nullable": true, + "title": "Amount of time to cache static assets." + }, + "passthru": { + "type": "string", + "title": "Whether to forward disallowed and missing resources from this location to the application. On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`." + }, + "scripts": { + "type": "boolean", + "title": "Whether to execute scripts in this location (for script based runtimes)." + }, + "allow": { + "type": "boolean", + "title": "Whether to allow access to this location by default." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A set of header fields set to the HTTP response. Replaces headers set on the location block." + } + }, + "additionalProperties": false + }, + "title": "Specific overrides." + }, + "request_buffering": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable request buffering." + }, + "max_request_size": { + "type": "string", + "nullable": true, + "title": "The maximum size request that can be buffered. Supports K, M, and G suffixes." + } + }, + "required": [ + "enabled", + "max_request_size" + ], + "additionalProperties": false, + "title": "Configuration for supporting request buffering." + } + }, + "required": [ + "root", + "expires", + "passthru", + "scripts", + "allow", + "headers", + "rules" + ], + "additionalProperties": false + }, + "title": "The specification of the web locations served by this application." + }, + "commands": { + "type": "object", + "properties": { + "pre_start": { + "type": "string", + "nullable": true, + "title": "A command executed before the application is started" + }, + "start": { + "type": "string", + "nullable": true, + "title": "The command used to start the application. It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP." + }, + "post_start": { + "type": "string", + "nullable": true, + "title": "A command executed after the application is started" + } + }, + "additionalProperties": false, + "title": "Commands to manage the application's lifecycle." + }, + "upstream": { + "type": "object", + "properties": { + "socket_family": { + "type": "string", + "enum": [ + "tcp", + "unix" + ], + "title": "If `tcp`, check the PORT environment variable on application startup. If `unix`, check SOCKET." + }, + "protocol": { + "type": "string", + "enum": [ + "fastcgi", + "http" + ], + "nullable": true, + "title": "Protocol" + } + }, + "required": [ + "socket_family", + "protocol" + ], + "additionalProperties": false, + "title": "Configuration on how the web server communicates with the application." + }, + "document_root": { + "type": "string", + "nullable": true, + "title": "The document root of this application, relative to its root." + }, + "passthru": { + "type": "string", + "nullable": true, + "title": "The URL to use as a passthru if a file doesn't match the whitelist." + }, + "index_files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Files to look for to serve directories." + }, + "whitelist": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Whitelisted entries." + }, + "blacklist": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Blacklisted entries." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "Amount of time to cache static assets." + }, + "move_to_root": { + "type": "boolean", + "title": "Whether to move the whole root of the app to the document root." + } + }, + "required": [ + "locations", + "move_to_root" + ], + "additionalProperties": false, + "title": "Configuration for accessing this application via HTTP." + }, + "hooks": { + "type": "object", + "properties": { + "build": { + "type": "string", + "nullable": true, + "title": "Hook executed after the build process." + }, + "deploy": { + "type": "string", + "nullable": true, + "title": "Hook executed after the deployment of new code." + }, + "post_deploy": { + "type": "string", + "nullable": true, + "title": "Hook executed after an environment is fully deployed." + } + }, + "required": [ + "build", + "deploy", + "post_deploy" + ], + "additionalProperties": false, + "title": "Hooks executed at various point in the lifecycle of the application." + }, + "crons": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "spec": { + "type": "string", + "title": "The cron schedule specification." + }, + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "The command used to start the operation." + }, + "stop": { + "type": "string", + "nullable": true, + "title": "The command used to stop the operation." + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands definition." + }, + "shutdown_timeout": { + "type": "integer", + "nullable": true, + "title": "The timeout in seconds after which the cron job will be forcefully killed." + }, + "timeout": { + "type": "integer", + "title": "The maximum timeout in seconds after which the cron job will be forcefully killed." + }, + "cmd": { + "type": "string", + "title": "The command to execute." + } + }, + "required": [ + "spec", + "commands", + "timeout" + ], + "additionalProperties": false + }, + "title": "Scheduled cron tasks executed by this application." + }, + "source": { + "type": "object", + "properties": { + "root": { + "type": "string", + "nullable": true, + "title": "The root of the application relative to the repository root." + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "command": { + "type": "string", + "nullable": true, + "title": "The command to use to update this application." + } + }, + "required": [ + "command" + ], + "additionalProperties": false + }, + "title": "Operations that can be applied to the source code." + } + }, + "required": [ + "root", + "operations" + ], + "additionalProperties": false, + "title": "Configuration related to the source code of the application." + }, + "build": { + "type": "object", + "properties": { + "flavor": { + "type": "string", + "nullable": true, + "title": "The pre-set build tasks to use for this application." + }, + "caches": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "directory": { + "type": "string", + "nullable": true, + "title": "The directory, relative to the application root, that should be cached." + }, + "watch": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The file or files whose hashed contents should be considered part of the cache key." + }, + "allow_stale": { + "type": "boolean", + "title": "If true, on a cache miss the last cache version will be used and can be updated in place." + }, + "share_between_apps": { + "type": "boolean", + "title": "Whether multiple applications in the project should share cached directories." + } + }, + "required": [ + "directory", + "watch", + "allow_stale", + "share_between_apps" + ], + "additionalProperties": false + }, + "title": "The configuration of paths managed by the build cache." + } + }, + "required": [ + "flavor", + "caches" + ], + "additionalProperties": false, + "title": "The build configuration of the application." + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "title": "External global dependencies of this application. They will be downloaded by the language's package manager." + }, + "stack": { + "type": "array", + "items": { + "type": "object" + }, + "nullable": true, + "title": "Composable images" + }, + "is_across_submodule": { + "type": "boolean", + "title": "Is this application coming from a submodule" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "config_id": { + "type": "string", + "title": "Config Id" + }, + "slug_id": { + "type": "string", + "title": "The identifier of the built artifact of the application" + } + }, + "required": [ + "resources", + "size", + "disk", + "access", + "relationships", + "additional_hosts", + "mounts", + "timezone", + "variables", + "firewall", + "container_profile", + "operations", + "name", + "type", + "preflight", + "tree_id", + "app_dir", + "endpoints", + "runtime", + "web", + "hooks", + "crons", + "source", + "build", + "dependencies", + "stack", + "is_across_submodule", + "instance_count", + "config_id", + "slug_id" + ], + "additionalProperties": false + }, + "title": "Web applications", + "x-isDateTime": false + }, + "workers": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "base_memory": { + "type": "integer", + "nullable": true, + "title": "The base memory for the container" + }, + "memory_ratio": { + "type": "integer", + "nullable": true, + "title": "The amount of memory to allocate per units of CPU" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "Selected size from container profile" + }, + "minimum": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The minimum resources for this service" + }, + "default": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk size in MB" + }, + "profile_size": { + "type": "string", + "nullable": true, + "title": "The closest profile size that matches the resources" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type", + "disk", + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "The default resources for this service" + }, + "disk": { + "type": "object", + "properties": { + "temporary": { + "type": "integer", + "nullable": true, + "title": "Temporary" + }, + "instance": { + "type": "integer", + "nullable": true, + "title": "Instance" + }, + "storage": { + "type": "integer", + "nullable": true, + "title": "Storage" + } + }, + "required": [ + "temporary", + "instance", + "storage" + ], + "additionalProperties": false, + "nullable": true, + "title": "The disks resources" + } + }, + "required": [ + "base_memory", + "memory_ratio", + "profile_size", + "minimum", + "default", + "disk" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "AUTO", + "L", + "M", + "S", + "XL", + "XS" + ], + "title": "The container size for this application in production. Leave blank to allow it to be set dynamically." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The writeable disk size to reserve on this application container." + }, + "access": { + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ] + }, + "title": "Access information, a mapping between access type and roles." + }, + "relationships": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service." + }, + "endpoint": { + "type": "string", + "nullable": true, + "title": "The name of the endpoint on the service." + } + }, + "required": [ + "service", + "endpoint" + ], + "additionalProperties": false, + "nullable": true + }, + "title": "The relationships of the application to defined services." + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A mapping of hostname to ip address to be added to the container's hosts file" + }, + "mounts": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": [ + "instance", + "local", + "service", + "storage", + "temporary", + "tmp" + ], + "title": "The type of mount that will provide the data." + }, + "source_path": { + "type": "string", + "title": "The path to be mounted, relative to the root directory of the volume that's being mounted from." + }, + "service": { + "type": "string", + "nullable": true, + "title": "The name of the service that the volume will be mounted from. Must be a service in `services.yaml` of type `network-storage`." + } + }, + "required": [ + "source", + "source_path" + ], + "additionalProperties": false + }, + "title": "Filesystem mounts of this application. If not specified the application will have no writeable disk space." + }, + "timezone": { + "type": "string", + "nullable": true, + "title": "The timezone of the application. This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified." + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "Variables provide environment-sensitive information to control how your application behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment." + }, + "firewall": { + "type": "object", + "properties": { + "outbound": { + "type": "array", + "items": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "tcp" + ], + "title": "The IP protocol to apply the restriction on." + }, + "ips": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The IP range in CIDR notation to apply the restriction on." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Domains of the restriction." + }, + "ports": { + "type": "array", + "items": { + "type": "integer" + }, + "title": "The port to apply the restriction on." + } + }, + "required": [ + "protocol", + "ips", + "domains", + "ports" + ], + "additionalProperties": false + }, + "title": "Outbound firewall restrictions" + } + }, + "required": [ + "outbound" + ], + "additionalProperties": false, + "nullable": true, + "title": "Firewall" + }, + "container_profile": { + "type": "string", + "nullable": true, + "title": "Selected container profile for the application" + }, + "operations": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "commands": { + "type": "object", + "properties": { + "start": { + "type": "string", + "title": "The command used to start the operation." + }, + "stop": { + "type": "string", + "nullable": true, + "title": "The command used to stop the operation." + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands definition." + }, + "timeout": { + "type": "integer", + "nullable": true, + "title": "The maximum timeout in seconds after which the operation will be forcefully killed." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "contributor", + "viewer" + ], + "title": "The minimum role necessary to trigger this operation." + } + }, + "required": [ + "commands", + "timeout", + "role" + ], + "additionalProperties": false + }, + "title": "Operations that can be triggered on this application" + }, + "name": { + "type": "string", + "title": "The name of the worker." + }, + "type": { + "type": "string", + "title": "The base runtime and version to use for this worker." + }, + "preflight": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the preflight security blocks are enabled." + }, + "ignored_rules": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Specific rules to ignore during preflight security checks. See the documentation for options." + } + }, + "required": [ + "enabled", + "ignored_rules" + ], + "additionalProperties": false, + "title": "Configuration for pre-flight checks." + }, + "tree_id": { + "type": "string", + "title": "The identifier of the source tree of the application" + }, + "app_dir": { + "type": "string", + "title": "The path of the application in the container" + }, + "endpoints": { + "type": "object", + "nullable": true, + "title": "Endpoints" + }, + "runtime": { + "type": "object", + "title": "Runtime-specific configuration." + }, + "worker": { + "type": "object", + "properties": { + "commands": { + "type": "object", + "properties": { + "pre_start": { + "type": "string", + "nullable": true, + "title": "A command executed before the worker is started" + }, + "start": { + "type": "string", + "title": "The command used to start the worker." + }, + "post_start": { + "type": "string", + "nullable": true, + "title": "A command executed after the worker is started" + } + }, + "required": [ + "start" + ], + "additionalProperties": false, + "title": "The commands to manage the worker." + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The writeable disk size to reserve on this application container." + } + }, + "required": [ + "commands" + ], + "additionalProperties": false, + "title": "Configuration of a worker container instance." + }, + "app": { + "type": "string", + "title": "App" + }, + "stack": { + "type": "array", + "items": { + "type": "object" + }, + "nullable": true, + "title": "Composable images" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this worker" + }, + "slug_id": { + "type": "string", + "title": "The identifier of the built artifact of the application" + } + }, + "required": [ + "resources", + "size", + "disk", + "access", + "relationships", + "additional_hosts", + "mounts", + "timezone", + "variables", + "firewall", + "container_profile", + "operations", + "name", + "type", + "preflight", + "tree_id", + "app_dir", + "endpoints", + "runtime", + "worker", + "app", + "stack", + "instance_count", + "slug_id" + ], + "additionalProperties": false + }, + "title": "Workers", + "x-isDateTime": false + }, + "container_profiles": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "Cpu value" + }, + "memory": { + "type": "integer", + "title": "Memory in MB" + }, + "cpu_type": { + "type": "string", + "enum": [ + "guaranteed", + "shared" + ], + "title": "resource type" + } + }, + "required": [ + "cpu", + "memory", + "cpu_type" + ], + "additionalProperties": false + } + }, + "title": "Container profiles", + "x-isDateTime": false + } + }, + "required": [ + "id", + "cluster_name", + "project_info", + "environment_info", + "deployment_target", + "vpn", + "http_access", + "enable_smtp", + "restrict_robots", + "variables", + "access", + "subscription", + "services", + "routes", + "webapps", + "workers", + "container_profiles" + ], + "additionalProperties": false + }, + "DeploymentCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Deployment" + } + }, + "DeploymentTarget": { + "oneOf": [ + { + "$ref": "#/components/schemas/DedicatedDeploymentTarget" + }, + { + "$ref": "#/components/schemas/EnterpriseDeploymentTarget" + }, + { + "$ref": "#/components/schemas/FoundationDeploymentTarget" + } + ] + }, + "DeploymentTargetCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentTarget" + } + }, + "DeploymentTargetCreateInput": { + "oneOf": [ + { + "$ref": "#/components/schemas/DedicatedDeploymentTargetCreateInput" + }, + { + "$ref": "#/components/schemas/EnterpriseDeploymentTargetCreateInput" + }, + { + "$ref": "#/components/schemas/FoundationDeploymentTargetCreateInput" + } + ] + }, + "DeploymentTargetPatch": { + "oneOf": [ + { + "$ref": "#/components/schemas/DedicatedDeploymentTargetPatch" + }, + { + "$ref": "#/components/schemas/EnterpriseDeploymentTargetPatch" + }, + { + "$ref": "#/components/schemas/FoundationDeploymentTargetPatch" + } + ] + }, + "Domain": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProdDomainStorage" + }, + { + "$ref": "#/components/schemas/ReplacementDomainStorage" + } + ] + }, + "DomainCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Domain" + } + }, + "DomainCreateInput": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProdDomainStorageCreateInput" + }, + { + "$ref": "#/components/schemas/ReplacementDomainStorageCreateInput" + } + ] + }, + "DomainPatch": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProdDomainStoragePatch" + }, + { + "$ref": "#/components/schemas/ReplacementDomainStoragePatch" + } + ] + }, + "EmailIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EmailIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "from_address": { + "type": "string", + "nullable": true, + "title": "The email address to use", + "x-isDateTime": false + }, + "recipients": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Recipients of the email", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "from_address", + "recipients" + ], + "additionalProperties": false + }, + "EmailIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "from_address": { + "type": "string", + "nullable": true, + "title": "The email address to use", + "x-isDateTime": false + }, + "recipients": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Recipients of the email", + "x-isDateTime": false + } + }, + "required": [ + "type", + "recipients" + ], + "additionalProperties": false + }, + "EmailIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "from_address": { + "type": "string", + "nullable": true, + "title": "The email address to use", + "x-isDateTime": false + }, + "recipients": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Recipients of the email", + "x-isDateTime": false + } + }, + "required": [ + "type", + "recipients" + ], + "additionalProperties": false + }, + "EnterpriseDeploymentTarget": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnterpriseDeploymentTarget", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "deploy_host": { + "type": "string", + "nullable": true, + "title": "The host to deploy to.", + "x-isDateTime": false + }, + "docroots": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "active_docroot": { + "type": "string", + "nullable": true, + "title": "The enterprise docroot, that is associated with this application/cluster." + }, + "docroot_versions": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "Versions of the enterprise docroot. When a new environment version is created the active_docroot is updated from these values." + } + }, + "required": [ + "active_docroot", + "docroot_versions" + ], + "additionalProperties": false + }, + "title": "Mapping of clusters to Enterprise applications", + "x-isDateTime": false + }, + "site_urls": { + "type": "object", + "title": "Site URLs", + "x-isDateTime": false + }, + "ssh_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of SSH Hosts.", + "x-isDateTime": false + }, + "maintenance_mode": { + "type": "boolean", + "title": "Whether to perform deployments or not", + "x-isDateTime": false + }, + "enterprise_environments_mapping": { + "type": "object", + "title": "Mapping of clusters to Enterprise applications", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name", + "deploy_host", + "docroots", + "site_urls", + "ssh_hosts", + "maintenance_mode" + ], + "additionalProperties": false + }, + "EnterpriseDeploymentTargetCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "site_urls": { + "type": "object", + "title": "Site URLs", + "x-isDateTime": false + }, + "ssh_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of SSH Hosts.", + "x-isDateTime": false + }, + "enterprise_environments_mapping": { + "type": "object", + "title": "Mapping of clusters to Enterprise applications", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "EnterpriseDeploymentTargetPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "site_urls": { + "type": "object", + "title": "Site URLs", + "x-isDateTime": false + }, + "ssh_hosts": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of SSH Hosts.", + "x-isDateTime": false + }, + "enterprise_environments_mapping": { + "type": "object", + "title": "Mapping of clusters to Enterprise applications", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "Environment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Environment", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "machine_name": { + "type": "string", + "title": "Machine name", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "development", + "production", + "staging" + ], + "title": "The type of environment (`production`, `staging` or `development`). If not provided, a default will be calculated.", + "x-isDateTime": false + }, + "parent": { + "type": "string", + "nullable": true, + "title": "Parent environment", + "x-isDateTime": false + }, + "default_domain": { + "type": "string", + "nullable": true, + "title": "Default domain", + "x-isDateTime": false + }, + "has_domains": { + "type": "boolean", + "title": "Whether the environment has domains", + "x-isDateTime": false + }, + "clone_parent_on_create": { + "type": "boolean", + "title": "Clone data when creating that environment", + "x-isDateTime": false + }, + "deployment_target": { + "type": "string", + "nullable": true, + "title": "Deployment target of the environment", + "x-isDateTime": false + }, + "is_pr": { + "type": "boolean", + "title": "Is this environment a pull request / merge request", + "x-isDateTime": false + }, + "has_remote": { + "type": "boolean", + "title": "Does this environment have a remote repository", + "x-isDateTime": false + }, + "status": { + "type": "string", + "enum": [ + "active", + "deleting", + "dirty", + "inactive", + "paused" + ], + "title": "Status", + "x-isDateTime": false + }, + "http_access": { + "type": "object", + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Whether http_access control is enabled" + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "Permission" + }, + "address": { + "type": "string", + "title": "IP address or CIDR" + } + }, + "required": [ + "permission", + "address" + ], + "additionalProperties": false + }, + "title": "Address grants" + }, + "basic_auth": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Basic auth grants" + } + }, + "required": [ + "is_enabled", + "addresses", + "basic_auth" + ], + "additionalProperties": false, + "title": "Http access permissions", + "x-isDateTime": false + }, + "enable_smtp": { + "type": "boolean", + "title": "Whether to configure SMTP for this environment.", + "x-isDateTime": false + }, + "restrict_robots": { + "type": "boolean", + "title": "Whether to restrict robots for this environment.", + "x-isDateTime": false + }, + "edge_hostname": { + "type": "string", + "title": "The hostname to use as the CNAME.", + "x-isDateTime": false + }, + "deployment_state": { + "type": "object", + "properties": { + "last_deployment_successful": { + "type": "boolean", + "title": "Whether the last deployment was successful" + }, + "last_deployment_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Datetime of the last deployment" + }, + "last_autoscale_up_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Datetime of the last autoscale up deployment" + }, + "last_autoscale_down_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Datetime of the last autoscale down deployment" + }, + "crons": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled or disabled" + }, + "status": { + "type": "string", + "enum": [ + "paused", + "running", + "sleeping" + ], + "title": "The status of the crons" + } + }, + "required": [ + "enabled", + "status" + ], + "additionalProperties": false, + "title": "The crons deployment state" + } + }, + "required": [ + "last_deployment_successful", + "last_deployment_at", + "last_autoscale_up_at", + "last_autoscale_down_at", + "crons" + ], + "additionalProperties": false, + "nullable": true, + "title": "The environment deployment state", + "x-isDateTime": false + }, + "sizing": { + "type": "object", + "properties": { + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "title": "Profile size of the service." + } + }, + "required": [ + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + } + }, + "required": [ + "resources", + "instance_count", + "disk" + ], + "additionalProperties": false + }, + "title": "Services" + }, + "webapps": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "title": "Profile size of the service." + } + }, + "required": [ + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + } + }, + "required": [ + "resources", + "instance_count", + "disk" + ], + "additionalProperties": false + }, + "title": "Web applications" + }, + "workers": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "title": "Profile size of the service." + } + }, + "required": [ + "profile_size" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources" + }, + "instance_count": { + "type": "integer", + "nullable": true, + "title": "Instance replication count of this application" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "The size of the disk." + } + }, + "required": [ + "resources", + "instance_count", + "disk" + ], + "additionalProperties": false + }, + "title": "Workers" + } + }, + "required": [ + "services", + "webapps", + "workers" + ], + "additionalProperties": false, + "nullable": true, + "title": "The environment sizing configuration", + "x-isDateTime": false + }, + "resources_overrides": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "services": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "CPU" + }, + "memory": { + "type": "integer", + "nullable": true, + "title": "Memory" + }, + "disk": { + "type": "integer", + "nullable": true, + "title": "Disk" + } + }, + "required": [ + "cpu", + "memory", + "disk" + ], + "additionalProperties": false + }, + "title": "Per-service resources overrides." + }, + "starts_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Date when the override will apply. When null, don't do an auto redeployment but still be effective to redeploys initiated otherwise." + }, + "ends_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Date when the override will be reverted. When null, the overrides will never go out of effect." + }, + "redeployed_start": { + "type": "boolean", + "title": "Whether the starting redeploy activity has been fired for this override." + }, + "redeployed_end": { + "type": "boolean", + "title": "Whether the ending redeploy activity has been fired for this override." + } + }, + "required": [ + "services", + "starts_at", + "ends_at", + "redeployed_start", + "redeployed_end" + ], + "additionalProperties": false + }, + "title": "Resources overrides", + "x-isDateTime": false + }, + "max_instance_count": { + "type": "integer", + "nullable": true, + "title": "Max number of instances for this environment.", + "x-isDateTime": false + }, + "last_active_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Last activity date", + "x-isDateTime": true + }, + "last_backup_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Last backup date", + "x-isDateTime": true + }, + "project": { + "type": "string", + "title": "Project", + "x-isDateTime": false + }, + "is_main": { + "type": "boolean", + "title": "Is this environment the main environment", + "x-isDateTime": false + }, + "is_dirty": { + "type": "boolean", + "title": "Is there any pending activity on this environment", + "x-isDateTime": false + }, + "has_staged_activities": { + "type": "boolean", + "title": "Is there any staged activity on this environment", + "x-isDateTime": false + }, + "can_rolling_deploy": { + "type": "boolean", + "title": "If the environment supports rolling deployments", + "x-isDateTime": false + }, + "has_code": { + "type": "boolean", + "title": "Does this environment have code", + "x-isDateTime": false + }, + "head_commit": { + "type": "string", + "nullable": true, + "title": "The SHA of the head commit for this environment", + "x-isDateTime": false + }, + "merge_info": { + "type": "object", + "properties": { + "commits_ahead": { + "type": "integer", + "nullable": true, + "title": "The amount of commits that are in the environment but not in the parent" + }, + "commits_behind": { + "type": "integer", + "nullable": true, + "title": "The amount of commits that are in the parent but not in the environment" + }, + "parent_ref": { + "type": "string", + "nullable": true, + "title": "The reference in Git for the parent environment" + } + }, + "required": [ + "commits_ahead", + "commits_behind", + "parent_ref" + ], + "additionalProperties": false, + "title": "The commit distance info between parent and child environments", + "x-isDateTime": false + }, + "has_deployment": { + "type": "boolean", + "title": "Whether this environment had a successful deployment.", + "x-isDateTime": false + }, + "supports_restrict_robots": { + "type": "boolean", + "title": "Does this environment support configuring restrict_robots", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "name", + "machine_name", + "title", + "attributes", + "type", + "parent", + "default_domain", + "has_domains", + "clone_parent_on_create", + "deployment_target", + "is_pr", + "has_remote", + "status", + "http_access", + "enable_smtp", + "restrict_robots", + "edge_hostname", + "deployment_state", + "sizing", + "resources_overrides", + "max_instance_count", + "last_active_at", + "last_backup_at", + "project", + "is_main", + "is_dirty", + "has_staged_activities", + "can_rolling_deploy", + "has_code", + "head_commit", + "merge_info", + "has_deployment", + "supports_restrict_robots" + ], + "additionalProperties": false + }, + "EnvironmentActivateInput": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "default", + "minimum", + "parent" + ], + "nullable": true, + "title": "The resources used when activating an environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "resources" + ], + "additionalProperties": false + }, + "EnvironmentBackupInput": { + "type": "object", + "properties": { + "safe": { + "type": "boolean", + "title": "Take a safe or a live backup", + "x-isDateTime": false + } + }, + "required": [ + "safe" + ], + "additionalProperties": false + }, + "EnvironmentBranchInput": { + "type": "object", + "properties": { + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "clone_parent": { + "type": "boolean", + "title": "Clone data from the parent environment", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "development", + "staging" + ], + "title": "The type of environment (`staging` or `development`)", + "x-isDateTime": false + }, + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "default", + "minimum", + "parent" + ], + "nullable": true, + "title": "The resources used when initializing services of the new environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "title", + "name", + "clone_parent", + "type", + "resources" + ], + "additionalProperties": false + }, + "EnvironmentCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Environment" + } + }, + "EnvironmentDeployInput": { + "type": "object", + "properties": { + "strategy": { + "type": "string", + "enum": [ + "rolling", + "stopstart" + ], + "title": "The deployment strategy (`rolling` or `stopstart`)", + "x-isDateTime": false + } + }, + "required": [ + "strategy" + ], + "additionalProperties": false + }, + "EnvironmentInitializeInput": { + "type": "object", + "properties": { + "profile": { + "type": "string", + "title": "Name of the profile to show in the UI", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "Repository to clone from", + "x-isDateTime": false + }, + "config": { + "type": "string", + "nullable": true, + "title": "Repository to clone the configuration files from", + "x-isDateTime": false + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "The path to the file." + }, + "mode": { + "type": "integer", + "title": "The octal value of the file protection mode." + }, + "contents": { + "type": "string", + "title": "The contents of the file (base64 encoded)." + } + }, + "required": [ + "path", + "mode", + "contents" + ], + "additionalProperties": false + }, + "title": "A list of files to add to the repository during initialization", + "x-isDateTime": false + }, + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "default", + "minimum" + ], + "nullable": true, + "title": "The resources used when initializing the environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "profile", + "repository", + "config", + "files", + "resources" + ], + "additionalProperties": false + }, + "EnvironmentMergeInput": { + "type": "object", + "properties": { + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "child", + "default", + "manual", + "minimum" + ], + "nullable": true, + "title": "The resources used when merging an environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "resources" + ], + "additionalProperties": false + }, + "EnvironmentOperationInput": { + "type": "object", + "properties": { + "service": { + "type": "string", + "title": "The name of the application or worker to run the operation on", + "x-isDateTime": false + }, + "operation": { + "type": "string", + "title": "The name of the operation", + "x-isDateTime": false + }, + "parameters": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The parameters to run the operation with", + "x-isDateTime": false + } + }, + "required": [ + "service", + "operation", + "parameters" + ], + "additionalProperties": false + }, + "EnvironmentPatch": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "development", + "production", + "staging" + ], + "title": "The type of environment (`production`, `staging` or `development`). If not provided, a default will be calculated.", + "x-isDateTime": false + }, + "parent": { + "type": "string", + "nullable": true, + "title": "Parent environment", + "x-isDateTime": false + }, + "clone_parent_on_create": { + "type": "boolean", + "title": "Clone data when creating that environment", + "x-isDateTime": false + }, + "http_access": { + "type": "object", + "properties": { + "is_enabled": { + "type": "boolean", + "title": "Whether http_access control is enabled" + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "Permission" + }, + "address": { + "type": "string", + "title": "IP address or CIDR" + } + }, + "required": [ + "permission", + "address" + ], + "additionalProperties": false + }, + "title": "Address grants" + }, + "basic_auth": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Basic auth grants" + } + }, + "additionalProperties": false, + "title": "Http access permissions", + "x-isDateTime": false + }, + "enable_smtp": { + "type": "boolean", + "title": "Whether to configure SMTP for this environment.", + "x-isDateTime": false + }, + "restrict_robots": { + "type": "boolean", + "title": "Whether to restrict robots for this environment.", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "EnvironmentRestoreInput": { + "type": "object", + "properties": { + "environment_name": { + "type": "string", + "nullable": true, + "title": "Environment name", + "x-isDateTime": false + }, + "branch_from": { + "type": "string", + "nullable": true, + "title": "Branch from", + "x-isDateTime": false + }, + "restore_code": { + "type": "boolean", + "title": "Whether we should restore the code or only the data", + "x-isDateTime": false + }, + "restore_resources": { + "type": "boolean", + "title": "Whether we should restore resources configuration from the backup", + "x-isDateTime": false + }, + "resources": { + "type": "object", + "properties": { + "init": { + "type": "string", + "enum": [ + "backup", + "default", + "minimum", + "parent" + ], + "nullable": true, + "title": "The resources used when initializing services of the environment" + } + }, + "required": [ + "init" + ], + "additionalProperties": false, + "nullable": true, + "title": "Resources", + "x-isDateTime": false + } + }, + "required": [ + "environment_name", + "branch_from", + "restore_code", + "restore_resources", + "resources" + ], + "additionalProperties": false + }, + "EnvironmentSourceOperation": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnvironmentSourceOperation", + "x-isDateTime": false + }, + "app": { + "type": "string", + "title": "The name of the application", + "x-isDateTime": false + }, + "operation": { + "type": "string", + "title": "The name of the source operation", + "x-isDateTime": false + }, + "command": { + "type": "string", + "title": "The command that will be triggered", + "x-isDateTime": false + } + }, + "required": [ + "id", + "app", + "operation", + "command" + ], + "additionalProperties": false + }, + "EnvironmentSourceOperationCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentSourceOperation" + } + }, + "EnvironmentSourceOperationInput": { + "type": "object", + "properties": { + "operation": { + "type": "string", + "title": "The name of the operation to execute", + "x-isDateTime": false + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": {} + }, + "title": "The variables of the application.", + "x-isDateTime": false + } + }, + "required": [ + "operation", + "variables" + ], + "additionalProperties": false + }, + "EnvironmentSynchronizeInput": { + "type": "object", + "properties": { + "synchronize_code": { + "type": "boolean", + "title": "Synchronize code?", + "x-isDateTime": false + }, + "rebase": { + "type": "boolean", + "title": "Synchronize code by rebasing instead of merging", + "x-isDateTime": false + }, + "synchronize_data": { + "type": "boolean", + "title": "Synchronize data?", + "x-isDateTime": false + }, + "synchronize_resources": { + "type": "boolean", + "title": "Synchronize resources?", + "x-isDateTime": false + } + }, + "required": [ + "synchronize_code", + "rebase", + "synchronize_data", + "synchronize_resources" + ], + "additionalProperties": false + }, + "EnvironmentType": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnvironmentType", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + } + }, + "required": [ + "id", + "attributes" + ], + "additionalProperties": false + }, + "EnvironmentTypeCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentType" + } + }, + "EnvironmentVariable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of EnvironmentVariable", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project name", + "x-isDateTime": false + }, + "environment": { + "type": "string", + "title": "Environment name", + "x-isDateTime": false + }, + "inherited": { + "type": "boolean", + "title": "The variable is inherited from a parent environment", + "x-isDateTime": false + }, + "is_enabled": { + "type": "boolean", + "title": "The variable is enabled on this environment", + "x-isDateTime": false + }, + "is_inheritable": { + "type": "boolean", + "title": "The variable is inheritable to child environments", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "name", + "attributes", + "is_json", + "is_sensitive", + "visible_build", + "visible_runtime", + "application_scope", + "project", + "environment", + "inherited", + "is_enabled", + "is_inheritable" + ], + "additionalProperties": false + }, + "EnvironmentVariableCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + }, + "EnvironmentVariableCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + }, + "is_enabled": { + "type": "boolean", + "title": "The variable is enabled on this environment", + "x-isDateTime": false + }, + "is_inheritable": { + "type": "boolean", + "title": "The variable is inheritable to child environments", + "x-isDateTime": false + } + }, + "required": [ + "name", + "value" + ], + "additionalProperties": false + }, + "EnvironmentVariablePatch": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + }, + "is_enabled": { + "type": "boolean", + "title": "The variable is enabled on this environment", + "x-isDateTime": false + }, + "is_inheritable": { + "type": "boolean", + "title": "The variable is inheritable to child environments", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "FastlyIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of FastlyIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "service_id": { + "type": "string", + "title": "Fastly Service ID", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "events", + "environments", + "excluded_environments", + "states", + "result", + "service_id" + ], + "additionalProperties": false + }, + "FastlyIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "Fastly API Token", + "x-isDateTime": false + }, + "service_id": { + "type": "string", + "title": "Fastly Service ID", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "service_id" + ], + "additionalProperties": false + }, + "FastlyIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "Fastly API Token", + "x-isDateTime": false + }, + "service_id": { + "type": "string", + "title": "Fastly Service ID", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "service_id" + ], + "additionalProperties": false + }, + "FoundationDeploymentTarget": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of FoundationDeploymentTarget", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type", + "services" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "use_dedicated_grid": { + "type": "boolean", + "title": "Whether the deployment should target dedicated Grid hosts.", + "x-isDateTime": false + }, + "storage_type": { + "type": "string", + "nullable": true, + "title": "The storage type.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name", + "hosts", + "use_dedicated_grid", + "storage_type" + ], + "additionalProperties": false + }, + "FoundationDeploymentTargetCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "use_dedicated_grid": { + "type": "boolean", + "title": "Whether the deployment should target dedicated Grid hosts.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "FoundationDeploymentTargetPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "dedicated", + "enterprise", + "local" + ], + "title": "The type of the deployment target.", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "The name of the deployment target.", + "x-isDateTime": false + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "title": "The identifier of the host." + }, + "type": { + "type": "string", + "enum": [ + "core", + "satellite" + ], + "title": "The type of the deployment to this host." + }, + "services": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true, + "title": "The services assigned to this host" + } + }, + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "The hosts of the deployment target.", + "x-isDateTime": false + }, + "use_dedicated_grid": { + "type": "boolean", + "title": "Whether the deployment should target dedicated Grid hosts.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "name" + ], + "additionalProperties": false + }, + "GitLabIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of GitLabIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "title": "The base URL of the GitLab installation.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The GitLab project (in the form `namespace/repo`).", + "x-isDateTime": false + }, + "build_merge_requests": { + "type": "boolean", + "title": "Whether or not to build merge requests.", + "x-isDateTime": false + }, + "build_wip_merge_requests": { + "type": "boolean", + "title": "Whether or not to build work in progress merge requests (requires `build_merge_requests`).", + "x-isDateTime": false + }, + "merge_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "base_url", + "project", + "build_merge_requests", + "build_wip_merge_requests", + "merge_requests_clone_parent_data" + ], + "additionalProperties": false + }, + "GitLabIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitLab private token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "title": "The base URL of the GitLab installation.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The GitLab project (in the form `namespace/repo`).", + "x-isDateTime": false + }, + "build_merge_requests": { + "type": "boolean", + "title": "Whether or not to build merge requests.", + "x-isDateTime": false + }, + "build_wip_merge_requests": { + "type": "boolean", + "title": "Whether or not to build work in progress merge requests (requires `build_merge_requests`).", + "x-isDateTime": false + }, + "merge_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "project" + ], + "additionalProperties": false + }, + "GitLabIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitLab private token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "title": "The base URL of the GitLab installation.", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "The GitLab project (in the form `namespace/repo`).", + "x-isDateTime": false + }, + "build_merge_requests": { + "type": "boolean", + "title": "Whether or not to build merge requests.", + "x-isDateTime": false + }, + "build_wip_merge_requests": { + "type": "boolean", + "title": "Whether or not to build work in progress merge requests (requires `build_merge_requests`).", + "x-isDateTime": false + }, + "merge_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building merge requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "project" + ], + "additionalProperties": false + }, + "GithubIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of GithubIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "nullable": true, + "title": "The base URL of the Github API endpoint.", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The GitHub repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "build_draft_pull_requests": { + "type": "boolean", + "title": "Whether or not to build draft pull requests (requires `build_pull_requests`).", + "x-isDateTime": false + }, + "build_pull_requests_post_merge": { + "type": "boolean", + "title": "Whether to build pull requests post-merge (if true) or pre-merge (if false).", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building pull requests.", + "x-isDateTime": false + }, + "token_type": { + "type": "string", + "enum": [ + "classic_personal_token", + "github_app" + ], + "title": "The type of the token of this GitHub integration", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "fetch_branches", + "prune_branches", + "environment_init_resources", + "base_url", + "repository", + "build_pull_requests", + "build_draft_pull_requests", + "build_pull_requests_post_merge", + "pull_requests_clone_parent_data", + "token_type" + ], + "additionalProperties": false + }, + "GithubIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitHub token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "nullable": true, + "title": "The base URL of the Github API endpoint.", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The GitHub repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "build_draft_pull_requests": { + "type": "boolean", + "title": "Whether or not to build draft pull requests (requires `build_pull_requests`).", + "x-isDateTime": false + }, + "build_pull_requests_post_merge": { + "type": "boolean", + "title": "Whether to build pull requests post-merge (if true) or pre-merge (if false).", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building pull requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "repository" + ], + "additionalProperties": false + }, + "GithubIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "fetch_branches": { + "type": "boolean", + "title": "Whether or not to fetch branches.", + "x-isDateTime": false + }, + "prune_branches": { + "type": "boolean", + "title": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`).", + "x-isDateTime": false + }, + "environment_init_resources": { + "type": "string", + "enum": [ + "default", + "manual", + "minimum", + "parent" + ], + "title": "The resources used when initializing a new service", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The GitHub token.", + "x-isDateTime": false + }, + "base_url": { + "type": "string", + "nullable": true, + "title": "The base URL of the Github API endpoint.", + "x-isDateTime": false + }, + "repository": { + "type": "string", + "title": "The GitHub repository (in the form `user/repo`).", + "x-isDateTime": false + }, + "build_pull_requests": { + "type": "boolean", + "title": "Whether or not to build pull requests.", + "x-isDateTime": false + }, + "build_draft_pull_requests": { + "type": "boolean", + "title": "Whether or not to build draft pull requests (requires `build_pull_requests`).", + "x-isDateTime": false + }, + "build_pull_requests_post_merge": { + "type": "boolean", + "title": "Whether to build pull requests post-merge (if true) or pre-merge (if false).", + "x-isDateTime": false + }, + "pull_requests_clone_parent_data": { + "type": "boolean", + "title": "Whether or not to clone parent data when building pull requests.", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "repository" + ], + "additionalProperties": false + }, + "HealthWebHookIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of HealthWebHookIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "url" + ], + "additionalProperties": false + }, + "HealthWebHookIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "HealthWebHookIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "HttpLogIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of HttpLogIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "HTTP endpoint", + "x-isDateTime": false + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "HTTP headers to use in POST requests", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "headers", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "HttpLogIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "HTTP endpoint", + "x-isDateTime": false + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "HTTP headers to use in POST requests", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "HttpLogIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "HTTP endpoint", + "x-isDateTime": false + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "HTTP headers to use in POST requests", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "Integration": { + "oneOf": [ + { + "$ref": "#/components/schemas/BitbucketIntegration" + }, + { + "$ref": "#/components/schemas/BitbucketServerIntegration" + }, + { + "$ref": "#/components/schemas/BlackfireIntegration" + }, + { + "$ref": "#/components/schemas/FastlyIntegration" + }, + { + "$ref": "#/components/schemas/GithubIntegration" + }, + { + "$ref": "#/components/schemas/GitLabIntegration" + }, + { + "$ref": "#/components/schemas/EmailIntegration" + }, + { + "$ref": "#/components/schemas/PagerDutyIntegration" + }, + { + "$ref": "#/components/schemas/SlackIntegration" + }, + { + "$ref": "#/components/schemas/HealthWebHookIntegration" + }, + { + "$ref": "#/components/schemas/HttpLogIntegration" + }, + { + "$ref": "#/components/schemas/NewRelicIntegration" + }, + { + "$ref": "#/components/schemas/HttpLogIntegration" + }, + { + "$ref": "#/components/schemas/ScriptIntegration" + }, + { + "$ref": "#/components/schemas/SplunkIntegration" + }, + { + "$ref": "#/components/schemas/SumologicIntegration" + }, + { + "$ref": "#/components/schemas/SyslogIntegration" + }, + { + "$ref": "#/components/schemas/WebHookIntegration" + } + ] + }, + "IntegrationCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + }, + "IntegrationCreateInput": { + "oneOf": [ + { + "$ref": "#/components/schemas/BitbucketIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/BitbucketServerIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/BlackfireIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/FastlyIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/GithubIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/GitLabIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/EmailIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/PagerDutyIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SlackIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/HealthWebHookIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/NewRelicIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/ScriptIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SplunkIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SumologicIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/SyslogIntegrationCreateInput" + }, + { + "$ref": "#/components/schemas/WebHookIntegrationCreateInput" + } + ] + }, + "IntegrationPatch": { + "oneOf": [ + { + "$ref": "#/components/schemas/BitbucketIntegrationPatch" + }, + { + "$ref": "#/components/schemas/BitbucketServerIntegrationPatch" + }, + { + "$ref": "#/components/schemas/BlackfireIntegrationPatch" + }, + { + "$ref": "#/components/schemas/FastlyIntegrationPatch" + }, + { + "$ref": "#/components/schemas/GithubIntegrationPatch" + }, + { + "$ref": "#/components/schemas/GitLabIntegrationPatch" + }, + { + "$ref": "#/components/schemas/EmailIntegrationPatch" + }, + { + "$ref": "#/components/schemas/PagerDutyIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SlackIntegrationPatch" + }, + { + "$ref": "#/components/schemas/HealthWebHookIntegrationPatch" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationPatch" + }, + { + "$ref": "#/components/schemas/NewRelicIntegrationPatch" + }, + { + "$ref": "#/components/schemas/HttpLogIntegrationPatch" + }, + { + "$ref": "#/components/schemas/ScriptIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SplunkIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SumologicIntegrationPatch" + }, + { + "$ref": "#/components/schemas/SyslogIntegrationPatch" + }, + { + "$ref": "#/components/schemas/WebHookIntegrationPatch" + } + ] + }, + "NewRelicIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of NewRelicIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The NewRelic Logs endpoint", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "NewRelicIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The NewRelic Logs endpoint", + "x-isDateTime": false + }, + "license_key": { + "type": "string", + "title": "The NewRelic Logs License Key", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "license_key" + ], + "additionalProperties": false + }, + "NewRelicIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The NewRelic Logs endpoint", + "x-isDateTime": false + }, + "license_key": { + "type": "string", + "title": "The NewRelic Logs License Key", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "license_key" + ], + "additionalProperties": false + }, + "PagerDutyIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of PagerDutyIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "routing_key": { + "type": "string", + "title": "The PagerDuty routing key", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "routing_key" + ], + "additionalProperties": false + }, + "PagerDutyIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "routing_key": { + "type": "string", + "title": "The PagerDuty routing key", + "x-isDateTime": false + } + }, + "required": [ + "type", + "routing_key" + ], + "additionalProperties": false + }, + "PagerDutyIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "routing_key": { + "type": "string", + "title": "The PagerDuty routing key", + "x-isDateTime": false + } + }, + "required": [ + "type", + "routing_key" + ], + "additionalProperties": false + }, + "ProdDomainStorage": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ProdDomainStorage", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Domain type", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project name", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "registered_name": { + "type": "string", + "title": "Claimed domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "is_default": { + "type": "boolean", + "title": "Is this domain default", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "name", + "attributes" + ], + "additionalProperties": false + }, + "ProdDomainStorageCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "is_default": { + "type": "boolean", + "title": "Is this domain default", + "x-isDateTime": false + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "ProdDomainStoragePatch": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "is_default": { + "type": "boolean", + "title": "Is this domain default", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "Project": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Project", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "description": { + "type": "string", + "title": "Description", + "x-isDateTime": false + }, + "owner": { + "type": "string", + "title": "Owner", + "deprecated": true, + "x-stability": "DEPRECATED", + "x-isDateTime": false + }, + "namespace": { + "type": "string", + "nullable": true, + "title": "The namespace the project belongs in", + "x-stability": "EXPERIMENTAL", + "x-isDateTime": false + }, + "organization": { + "type": "string", + "nullable": true, + "title": "The organization the project belongs in", + "x-stability": "EXPERIMENTAL", + "x-isDateTime": false + }, + "default_branch": { + "type": "string", + "nullable": true, + "title": "Default branch", + "x-isDateTime": false + }, + "status": { + "type": "object", + "properties": { + "code": { + "type": "string", + "title": "Status code" + }, + "message": { + "type": "string", + "title": "Status text" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false, + "title": "Status", + "x-isDateTime": false + }, + "timezone": { + "type": "string", + "title": "Timezone of the project", + "x-isDateTime": false + }, + "region": { + "type": "string", + "title": "Region", + "x-isDateTime": false + }, + "repository": { + "type": "object", + "properties": { + "url": { + "type": "string", + "title": "Git URL" + }, + "client_ssh_key": { + "type": "string", + "nullable": true, + "title": "SSH Key used to access external private repositories." + } + }, + "required": [ + "url", + "client_ssh_key" + ], + "additionalProperties": false, + "title": "Repository information", + "x-isDateTime": false + }, + "default_domain": { + "type": "string", + "nullable": true, + "title": "Default domain", + "x-isDateTime": false + }, + "subscription": { + "type": "object", + "properties": { + "license_uri": { + "type": "string", + "title": "URI of the subscription" + }, + "plan": { + "type": "string", + "enum": [ + "2xlarge", + "2xlarge-high-memory", + "4xlarge", + "8xlarge", + "development", + "large", + "large-high-memory", + "medium", + "medium-high-memory", + "standard", + "standard-high-memory", + "xlarge", + "xlarge-high-memory" + ], + "title": "Plan level" + }, + "environments": { + "type": "integer", + "title": "Number of environments" + }, + "storage": { + "type": "integer", + "title": "Size of storage (in MB)" + }, + "included_users": { + "type": "integer", + "title": "Number of users" + }, + "subscription_management_uri": { + "type": "string", + "title": "URI for managing the subscription" + }, + "restricted": { + "type": "boolean", + "title": "True if subscription attributes, like number of users, are frozen" + }, + "suspended": { + "type": "boolean", + "title": "Whether or not the subscription is suspended" + }, + "user_licenses": { + "type": "integer", + "title": "Current number of users" + }, + "resources": { + "type": "object", + "properties": { + "container_profiles": { + "type": "boolean", + "title": "Enable support for customizable container profiles." + }, + "production": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for production environments" + }, + "development": { + "type": "object", + "properties": { + "legacy_development": { + "type": "boolean", + "title": "Enable legacy development sizing for this environment type." + }, + "max_cpu": { + "type": "number", + "format": "float", + "nullable": true, + "title": "Maximum number of allocated CPU units." + }, + "max_memory": { + "type": "integer", + "nullable": true, + "title": "Maximum amount of allocated RAM." + }, + "max_environments": { + "type": "integer", + "nullable": true, + "title": "Maximum number of environments" + } + }, + "required": [ + "legacy_development", + "max_cpu", + "max_memory", + "max_environments" + ], + "additionalProperties": false, + "title": "Resources for development environments" + } + }, + "required": [ + "container_profiles", + "production", + "development" + ], + "additionalProperties": false, + "title": "Resources limits" + }, + "resource_validation_url": { + "type": "string", + "title": "URL for resources validation" + }, + "image_types": { + "type": "object", + "properties": { + "only": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be allowed use." + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Image types to be denied use." + } + }, + "additionalProperties": false, + "title": "Restricted and denied image types" + } + }, + "required": [ + "license_uri", + "storage", + "included_users", + "subscription_management_uri", + "restricted", + "suspended", + "user_licenses" + ], + "additionalProperties": false, + "title": "Subscription information", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "attributes", + "title", + "description", + "owner", + "namespace", + "organization", + "default_branch", + "status", + "timezone", + "region", + "repository", + "default_domain", + "subscription" + ], + "additionalProperties": false + }, + "ProjectCapabilities": { + "type": "object", + "properties": { + "custom_domains": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, custom domains can be added to the project." + }, + "environments_with_domains_limit": { + "type": "integer", + "title": "Limit on the amount of non-production environments that can have domains set" + } + }, + "required": [ + "enabled", + "environments_with_domains_limit" + ], + "additionalProperties": false, + "title": "Custom Domains", + "x-isDateTime": false + }, + "source_operations": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, source operations can be triggered." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Source Operations", + "x-isDateTime": false + }, + "runtime_operations": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, runtime operations can be triggered." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Runtime Operations", + "x-isDateTime": false + }, + "outbound_firewall": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, outbound firewall can be used." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Outbound Firewall", + "x-isDateTime": false + }, + "metrics": { + "type": "object", + "properties": { + "max_range": { + "type": "string", + "title": "Limit on the maximum time range allowed in metrics retrieval" + } + }, + "required": [ + "max_range" + ], + "additionalProperties": false, + "title": "Metrics", + "x-isDateTime": false + }, + "logs_forwarding": { + "type": "object", + "properties": { + "max_extra_payload_size": { + "type": "integer", + "title": "Limit on the maximum size for the custom extra attributes added to the forwarded logs payload" + } + }, + "required": [ + "max_extra_payload_size" + ], + "additionalProperties": false, + "title": "Logs Forwarding", + "x-isDateTime": false + }, + "guaranteed_resources": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, guaranteed resources can be used" + }, + "instance_limit": { + "type": "integer", + "title": "Instance limit for guaranteed resources" + } + }, + "required": [ + "enabled", + "instance_limit" + ], + "additionalProperties": false, + "title": "Guaranteed Resources", + "x-isDateTime": false + }, + "images": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "available": { + "type": "boolean", + "title": "The image is available for deployment" + } + }, + "required": [ + "available" + ], + "additionalProperties": false + } + }, + "title": "Images", + "x-isDateTime": false + }, + "instance_limit": { + "type": "integer", + "title": "Maximum number of instance per service", + "x-isDateTime": false + }, + "build_resources": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, build resources can be modified." + }, + "max_cpu": { + "type": "number", + "format": "float", + "title": "CPU" + }, + "max_memory": { + "type": "integer", + "title": "Memory" + } + }, + "required": [ + "enabled", + "max_cpu", + "max_memory" + ], + "additionalProperties": false, + "title": "Build Resources", + "x-isDateTime": false + }, + "data_retention": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, data retention configuration can be modified." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Data Retention", + "x-isDateTime": false + }, + "autoscaling": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, autoscaling can be configured." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Autoscaling", + "x-isDateTime": false + }, + "integrations": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "If true, integrations can be used" + }, + "config": { + "type": "object", + "properties": { + "newrelic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "New Relic log-forwarding integration configurations" + }, + "sumologic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Sumo Logic log-forwarding integration configurations" + }, + "splunk": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Splunk log-forwarding integration configurations" + }, + "httplog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "HTTP log-forwarding integration configurations" + }, + "syslog": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Syslog log-forwarding integration configurations" + }, + "webhook": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Webhook integration configurations" + }, + "script": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Script integration configurations" + }, + "github": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "GitHub integration configurations" + }, + "gitlab": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "GitLab integration configurations" + }, + "bitbucket": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Bitbucket integration configurations" + }, + "bitbucket_server": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Bitbucket server integration configurations" + }, + "health.email": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health Email notification integration configurations" + }, + "health.webhook": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health Webhook notification integration configurations" + }, + "health.pagerduty": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health PagerDuty notification integration configurations" + }, + "health.slack": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Health Slack notification integration configurations" + }, + "cdn.fastly": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Fastly CDN integration configurations" + }, + "blackfire": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "Blackfire integration configurations" + }, + "otlp": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "The integration is enabled." + }, + "role": { + "type": "string", + "title": "Minimum required role for creating the integration." + } + }, + "additionalProperties": false, + "title": "OpenTelemetry log-forwarding integration configurations" + } + }, + "additionalProperties": false, + "title": "Config" + }, + "allowed_integrations": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of integrations allowed to be created" + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Integrations", + "x-isDateTime": false + } + }, + "required": [ + "metrics", + "logs_forwarding", + "guaranteed_resources", + "images", + "instance_limit", + "build_resources", + "data_retention", + "autoscaling" + ], + "additionalProperties": false + }, + "ProjectPatch": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "title": { + "type": "string", + "title": "Title", + "x-isDateTime": false + }, + "description": { + "type": "string", + "title": "Description", + "x-isDateTime": false + }, + "default_branch": { + "type": "string", + "nullable": true, + "title": "Default branch", + "x-isDateTime": false + }, + "timezone": { + "type": "string", + "title": "Timezone of the project", + "x-isDateTime": false + }, + "region": { + "type": "string", + "title": "Region", + "x-isDateTime": false + }, + "default_domain": { + "type": "string", + "nullable": true, + "title": "Default domain", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "ProjectSettings": { + "type": "object", + "properties": { + "initialize": { + "type": "object", + "title": "Initialization key", + "x-isDateTime": false + }, + "product_name": { + "type": "string", + "title": "The name of the product.", + "x-isDateTime": false + }, + "product_code": { + "type": "string", + "title": "The lowercase ASCII code of the product.", + "x-isDateTime": false + }, + "ui_uri_template": { + "type": "string", + "title": "The template of the project UI uri", + "x-isDateTime": false + }, + "variables_prefix": { + "type": "string", + "title": "The prefix of the generated environment variables.", + "x-isDateTime": false + }, + "bot_email": { + "type": "string", + "title": "The email of the bot.", + "x-isDateTime": false + }, + "application_config_file": { + "type": "string", + "title": "The name of the application-specific configuration file.", + "x-isDateTime": false + }, + "project_config_dir": { + "type": "string", + "title": "The name of the project configuration directory.", + "x-isDateTime": false + }, + "use_drupal_defaults": { + "type": "boolean", + "title": "Whether to use the default Drupal-centric configuration files when missing from the repository.", + "x-isDateTime": false + }, + "use_legacy_subdomains": { + "type": "boolean", + "title": "Whether to use legacy subdomain scheme, that replaces `.` by `---` in development subdomains.", + "x-isDateTime": false + }, + "development_service_size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "L", + "M", + "S", + "XL" + ], + "title": "The size of development services.", + "x-isDateTime": false + }, + "development_application_size": { + "type": "string", + "enum": [ + "2XL", + "4XL", + "L", + "M", + "S", + "XL" + ], + "title": "The size of development applications.", + "x-isDateTime": false + }, + "enable_certificate_provisioning": { + "type": "boolean", + "title": "Enable automatic certificate provisioning.", + "x-isDateTime": false + }, + "certificate_style": { + "type": "string", + "enum": [ + "ecdsa", + "rsa" + ], + "title": "Certificate Style", + "x-isDateTime": false + }, + "certificate_renewal_activity": { + "type": "boolean", + "title": "Create an activity for certificate renewal", + "x-isDateTime": false + }, + "development_domain_template": { + "type": "string", + "nullable": true, + "title": "The template of the development domain, can include {project} and {environment} placeholders.", + "x-isDateTime": false + }, + "enable_state_api_deployments": { + "type": "boolean", + "title": "Enable the State API-driven deployments on regions that support them.", + "x-isDateTime": false + }, + "temporary_disk_size": { + "type": "integer", + "nullable": true, + "title": "Set the size of the temporary disk (/tmp, in MB).", + "x-isDateTime": false + }, + "local_disk_size": { + "type": "integer", + "nullable": true, + "title": "Set the size of the instance disk (in MB).", + "x-isDateTime": false + }, + "cron_minimum_interval": { + "type": "integer", + "title": "Minimum interval between cron runs (in minutes)", + "x-isDateTime": false + }, + "cron_maximum_jitter": { + "type": "integer", + "title": "Maximum jitter inserted in cron runs (in minutes)", + "x-isDateTime": false + }, + "cron_production_expiry_interval": { + "type": "integer", + "title": "The interval (in days) for which cron activity and logs are kept around", + "x-isDateTime": false + }, + "cron_non_production_expiry_interval": { + "type": "integer", + "title": "The interval (in days) for which cron activity and logs are kept around", + "x-isDateTime": false + }, + "concurrency_limits": { + "type": "object", + "additionalProperties": { + "type": "integer", + "nullable": true + }, + "title": "The concurrency limits applied to different kind of activities", + "x-isDateTime": false + }, + "flexible_build_cache": { + "type": "boolean", + "title": "Enable the flexible build cache implementation", + "x-isDateTime": false + }, + "strict_configuration": { + "type": "boolean", + "title": "Strict configuration validation.", + "x-isDateTime": false + }, + "has_sleepy_crons": { + "type": "boolean", + "title": "Enable sleepy crons.", + "x-isDateTime": false + }, + "crons_in_git": { + "type": "boolean", + "title": "Enable crons from git.", + "x-isDateTime": false + }, + "custom_error_template": { + "type": "string", + "nullable": true, + "title": "Custom error template for the router.", + "x-isDateTime": false + }, + "app_error_page_template": { + "type": "string", + "nullable": true, + "title": "Custom error template for the application.", + "x-isDateTime": false + }, + "environment_name_strategy": { + "type": "string", + "enum": [ + "hash", + "name-and-hash" + ], + "title": "The strategy used to generate environment machine names", + "x-isDateTime": false + }, + "data_retention": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "max_backups": { + "type": "integer", + "title": "The maximum number of backups per environment" + }, + "default_config": { + "type": "object", + "properties": { + "manual_count": { + "type": "integer", + "title": "The number of manual backups to keep." + }, + "schedule": { + "type": "array", + "items": { + "type": "object", + "properties": { + "interval": { + "type": "string", + "title": "The policy interval specification." + }, + "count": { + "type": "integer", + "title": "The number of backups to keep under this interval." + } + }, + "required": [ + "interval", + "count" + ], + "additionalProperties": false + }, + "title": "The backup schedule specification." + } + }, + "required": [ + "manual_count", + "schedule" + ], + "additionalProperties": false, + "title": "Default Config", + "x-stability": "EXPERIMENTAL" + } + }, + "required": [ + "max_backups", + "default_config" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "Data retention configuration", + "x-isDateTime": false + }, + "enable_codesource_integration_push": { + "type": "boolean", + "title": "Enable pushing commits to codesource integration.", + "x-isDateTime": false + }, + "enforce_mfa": { + "type": "boolean", + "title": "Enforce multi-factor authentication.", + "x-isDateTime": false + }, + "systemd": { + "type": "boolean", + "title": "Use systemd images.", + "x-isDateTime": false + }, + "router_gen2": { + "type": "boolean", + "title": "Use the router v2 image.", + "x-isDateTime": false + }, + "build_resources": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "CPU" + }, + "memory": { + "type": "integer", + "title": "Memory" + } + }, + "required": [ + "cpu", + "memory" + ], + "additionalProperties": false, + "title": "Build Resources", + "x-isDateTime": false + }, + "outbound_restrictions_default_policy": { + "type": "string", + "enum": [ + "allow", + "deny" + ], + "title": "The default policy for firewall outbound restrictions", + "x-isDateTime": false + }, + "self_upgrade": { + "type": "boolean", + "title": "Whether self-upgrades are enabled", + "x-isDateTime": false + }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "A mapping of hostname to ip address to be added to the container's hosts file", + "x-isDateTime": false + }, + "max_allowed_routes": { + "type": "integer", + "title": "Maximum number of routes allowed", + "x-isDateTime": false + }, + "max_allowed_redirects_paths": { + "type": "integer", + "title": "Maximum number of redirect paths allowed", + "x-isDateTime": false + }, + "enable_incremental_backups": { + "type": "boolean", + "title": "Enable incremental backups on regions that support them.", + "x-isDateTime": false + }, + "sizing_api_enabled": { + "type": "boolean", + "title": "Enable sizing api.", + "x-isDateTime": false + }, + "enable_cache_grace_period": { + "type": "boolean", + "title": "Enable cache grace period.", + "x-isDateTime": false + }, + "enable_zero_downtime_deployments": { + "type": "boolean", + "title": "Enable zero-downtime deployments for resource-only changes.", + "x-isDateTime": false + }, + "enable_admin_agent": { + "type": "boolean", + "title": "Enable admin agent", + "x-isDateTime": false + }, + "certifier_url": { + "type": "string", + "title": "The certifier url", + "x-isDateTime": false + }, + "centralized_permissions": { + "type": "boolean", + "title": "Whether centralized permissions are enabled", + "x-isDateTime": false + }, + "glue_server_max_request_size": { + "type": "integer", + "title": "Maximum size of request to glue-server (in MB)", + "x-isDateTime": false + }, + "persistent_endpoints_ssh": { + "type": "boolean", + "title": "Enable SSH access update with persistent endpoint", + "x-isDateTime": false + }, + "persistent_endpoints_ssl_certificates": { + "type": "boolean", + "title": "Enable SSL certificate update with persistent endpoint", + "x-isDateTime": false + }, + "enable_disk_health_monitoring": { + "type": "boolean", + "title": "Enable disk health monitoring", + "x-isDateTime": false + }, + "enable_paused_environments": { + "type": "boolean", + "title": "Enable paused environments", + "x-isDateTime": false + }, + "enable_unified_configuration": { + "type": "boolean", + "title": "Enable unified configuration files", + "x-isDateTime": false + }, + "enable_routes_tracing": { + "type": "boolean", + "title": "Enable tracing support in routes", + "x-isDateTime": false + }, + "image_deployment_validation": { + "type": "boolean", + "title": "Enable extended deployment validation by images", + "x-isDateTime": false + }, + "support_generic_images": { + "type": "boolean", + "title": "Support composable images", + "x-isDateTime": false + }, + "enable_github_app_token_exchange": { + "type": "boolean", + "title": "Enable fetching the GitHub App token from SIA.", + "x-isDateTime": false + }, + "continuous_profiling": { + "type": "object", + "properties": { + "supported_runtimes": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of images supported for continuous profiling" + } + }, + "required": [ + "supported_runtimes" + ], + "additionalProperties": false, + "title": "The continuous profiling configuration", + "x-isDateTime": false + }, + "disable_agent_error_reporter": { + "type": "boolean", + "title": "Disable agent error reporter", + "x-isDateTime": false + }, + "requires_domain_ownership": { + "type": "boolean", + "title": "Require ownership proof before domains are added to environments.", + "x-isDateTime": false + }, + "enable_guaranteed_resources": { + "type": "boolean", + "title": "Enable guaranteed resources feature", + "x-isDateTime": false + }, + "git_server": { + "type": "object", + "properties": { + "push_size_hard_limit": { + "type": "integer", + "title": "Push Size Reject Limit" + } + }, + "required": [ + "push_size_hard_limit" + ], + "additionalProperties": false, + "title": "Git Server configuration", + "x-isDateTime": false + }, + "activity_logs_max_size": { + "type": "integer", + "title": "The maximum size of activity logs in bytes. This limit is applied on the pre-compressed log size.", + "x-isDateTime": false + }, + "allow_manual_deployments": { + "type": "boolean", + "title": "If deployments can be manual, i.e. explicitly triggered by user.", + "x-isDateTime": false + }, + "allow_rolling_deployments": { + "type": "boolean", + "title": "If the project can use rolling deployments.", + "x-isDateTime": false + }, + "allow_burst": { + "type": "boolean", + "title": "Allow burst", + "x-isDateTime": false + }, + "router_resources": { + "type": "object", + "properties": { + "baseline_cpu": { + "type": "number", + "format": "float", + "title": "Router baseline CPU for flex plan" + }, + "baseline_memory": { + "type": "integer", + "title": "Router baseline memory (MB) for flex plan" + }, + "max_cpu": { + "type": "number", + "format": "float", + "title": "Router max CPU for flex plan" + }, + "max_memory": { + "type": "integer", + "title": "Router max memory (MB) for flex plan" + } + }, + "required": [ + "baseline_cpu", + "baseline_memory", + "max_cpu", + "max_memory" + ], + "additionalProperties": false, + "title": "Router resource settings for flex plan", + "x-isDateTime": false + } + }, + "required": [ + "initialize", + "product_name", + "product_code", + "ui_uri_template", + "variables_prefix", + "bot_email", + "application_config_file", + "project_config_dir", + "use_drupal_defaults", + "use_legacy_subdomains", + "development_service_size", + "development_application_size", + "enable_certificate_provisioning", + "certificate_style", + "certificate_renewal_activity", + "development_domain_template", + "enable_state_api_deployments", + "temporary_disk_size", + "local_disk_size", + "cron_minimum_interval", + "cron_maximum_jitter", + "cron_production_expiry_interval", + "cron_non_production_expiry_interval", + "concurrency_limits", + "flexible_build_cache", + "strict_configuration", + "has_sleepy_crons", + "crons_in_git", + "custom_error_template", + "app_error_page_template", + "environment_name_strategy", + "data_retention", + "enable_codesource_integration_push", + "enforce_mfa", + "systemd", + "router_gen2", + "build_resources", + "outbound_restrictions_default_policy", + "self_upgrade", + "additional_hosts", + "max_allowed_routes", + "max_allowed_redirects_paths", + "enable_incremental_backups", + "sizing_api_enabled", + "enable_cache_grace_period", + "enable_zero_downtime_deployments", + "enable_admin_agent", + "certifier_url", + "centralized_permissions", + "glue_server_max_request_size", + "persistent_endpoints_ssh", + "persistent_endpoints_ssl_certificates", + "enable_disk_health_monitoring", + "enable_paused_environments", + "enable_unified_configuration", + "enable_routes_tracing", + "image_deployment_validation", + "support_generic_images", + "enable_github_app_token_exchange", + "continuous_profiling", + "disable_agent_error_reporter", + "requires_domain_ownership", + "enable_guaranteed_resources", + "git_server", + "activity_logs_max_size", + "allow_manual_deployments", + "allow_rolling_deployments", + "allow_burst", + "router_resources" + ], + "additionalProperties": false + }, + "ProjectSettingsPatch": { + "type": "object", + "properties": { + "initialize": { + "type": "object", + "title": "Initialization key", + "x-isDateTime": false + }, + "data_retention": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "max_backups": { + "type": "integer", + "title": "The maximum number of backups per environment" + }, + "default_config": { + "type": "object", + "properties": { + "manual_count": { + "type": "integer", + "title": "The number of manual backups to keep." + }, + "schedule": { + "type": "array", + "items": { + "type": "object", + "properties": { + "interval": { + "type": "string", + "title": "The policy interval specification." + }, + "count": { + "type": "integer", + "title": "The number of backups to keep under this interval." + } + }, + "required": [ + "interval", + "count" + ], + "additionalProperties": false + }, + "title": "The backup schedule specification." + } + }, + "additionalProperties": false, + "title": "Default Config", + "x-stability": "EXPERIMENTAL" + } + }, + "required": [ + "default_config" + ], + "additionalProperties": false + }, + "nullable": true, + "title": "Data retention configuration", + "x-isDateTime": false + }, + "build_resources": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float", + "title": "CPU" + }, + "memory": { + "type": "integer", + "title": "Memory" + } + }, + "additionalProperties": false, + "title": "Build Resources", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "ProjectVariable": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ProjectVariable", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "name", + "attributes", + "is_json", + "is_sensitive", + "visible_build", + "visible_runtime", + "application_scope" + ], + "additionalProperties": false + }, + "ProjectVariableCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectVariable" + } + }, + "ProjectVariableCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + } + }, + "required": [ + "name", + "value" + ], + "additionalProperties": false + }, + "ProjectVariablePatch": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "value": { + "type": "string", + "title": "Value", + "x-isDateTime": false + }, + "is_json": { + "type": "boolean", + "title": "The variable is a JSON string", + "x-isDateTime": false + }, + "is_sensitive": { + "type": "boolean", + "title": "The variable is sensitive", + "x-isDateTime": false + }, + "visible_build": { + "type": "boolean", + "title": "The variable is visible during build", + "x-isDateTime": false + }, + "visible_runtime": { + "type": "boolean", + "title": "The variable is visible at runtime", + "x-isDateTime": false + }, + "application_scope": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Applications that have access to this variable", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "ProxyRoute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ProxyRoute", + "nullable": true, + "x-isDateTime": false + }, + "primary": { + "type": "boolean", + "nullable": true, + "title": "This route is the primary route of the environment", + "x-isDateTime": false + }, + "production_url": { + "type": "string", + "nullable": true, + "title": "How this URL route would look on production environment", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "proxy", + "redirect", + "upstream" + ], + "title": "Route type.", + "x-isDateTime": false + }, + "tls": { + "type": "object", + "properties": { + "strict_transport_security": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Whether strict transport security is enabled or not." + }, + "include_subdomains": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should include all subdomains." + }, + "preload": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should be preloaded in browsers." + } + }, + "required": [ + "enabled", + "include_subdomains", + "preload" + ], + "additionalProperties": false, + "title": "Strict-Transport-Security options." + }, + "min_version": { + "type": "string", + "enum": [ + "TLSv1.0", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "nullable": true, + "title": "The minimum TLS version to support." + }, + "client_authentication": { + "type": "string", + "enum": [ + "request", + "require" + ], + "nullable": true, + "title": "The type of client authentication to request." + }, + "client_certificate_authorities": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used." + } + }, + "required": [ + "strict_transport_security", + "min_version", + "client_authentication", + "client_certificate_authorities" + ], + "additionalProperties": false, + "title": "TLS settings for the route.", + "x-isDateTime": false + }, + "to": { + "type": "string", + "title": "Proxy destination", + "x-isDateTime": false + }, + "redirects": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "title": "The amount of time, in seconds, to cache the redirects." + }, + "paths": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "regexp": { + "type": "boolean", + "title": "Whether the path is a regular expression." + }, + "to": { + "type": "string", + "title": "The URL to redirect to." + }, + "prefix": { + "type": "boolean", + "nullable": true, + "title": "Whether to redirect all the paths that start with the path." + }, + "append_suffix": { + "type": "boolean", + "nullable": true, + "title": "Whether to append the incoming suffix to the redirected URL." + }, + "code": { + "type": "integer", + "enum": [ + 301, + 302, + 307, + 308 + ], + "title": "The redirect code to use." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "The amount of time, in seconds, to cache the redirects." + } + }, + "required": [ + "regexp", + "to", + "prefix", + "append_suffix", + "code", + "expires" + ], + "additionalProperties": false + }, + "title": "The paths to redirect" + } + }, + "required": [ + "expires", + "paths" + ], + "additionalProperties": false, + "title": "The configuration of the redirects.", + "nullable": true, + "x-isDateTime": false + }, + "cache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the cache is enabled." + }, + "default_ttl": { + "type": "integer", + "title": "The TTL to apply when the response doesn't specify one. Only applies to static files." + }, + "cookies": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The cookies to take into account for the cache key." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The headers to take into account for the cache key." + } + }, + "required": [ + "enabled", + "default_ttl", + "cookies", + "headers" + ], + "additionalProperties": false, + "title": "Cache configuration.", + "nullable": true, + "x-isDateTime": false + }, + "ssi": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether SSI include is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Server-Side Include configuration.", + "nullable": true, + "x-isDateTime": false + }, + "upstream": { + "type": "string", + "title": "The upstream to use for this route.", + "nullable": true, + "x-isDateTime": false + }, + "sticky": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether sticky routing is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Sticky routing configuration.", + "nullable": true, + "x-isDateTime": false + } + }, + "required": [ + "attributes", + "type", + "tls", + "to" + ], + "additionalProperties": false + }, + "RedirectRoute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of RedirectRoute", + "nullable": true, + "x-isDateTime": false + }, + "primary": { + "type": "boolean", + "nullable": true, + "title": "This route is the primary route of the environment", + "x-isDateTime": false + }, + "production_url": { + "type": "string", + "nullable": true, + "title": "How this URL route would look on production environment", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "proxy", + "redirect", + "upstream" + ], + "title": "Route type.", + "x-isDateTime": false + }, + "tls": { + "type": "object", + "properties": { + "strict_transport_security": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Whether strict transport security is enabled or not." + }, + "include_subdomains": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should include all subdomains." + }, + "preload": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should be preloaded in browsers." + } + }, + "required": [ + "enabled", + "include_subdomains", + "preload" + ], + "additionalProperties": false, + "title": "Strict-Transport-Security options." + }, + "min_version": { + "type": "string", + "enum": [ + "TLSv1.0", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "nullable": true, + "title": "The minimum TLS version to support." + }, + "client_authentication": { + "type": "string", + "enum": [ + "request", + "require" + ], + "nullable": true, + "title": "The type of client authentication to request." + }, + "client_certificate_authorities": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used." + } + }, + "required": [ + "strict_transport_security", + "min_version", + "client_authentication", + "client_certificate_authorities" + ], + "additionalProperties": false, + "title": "TLS settings for the route.", + "x-isDateTime": false + }, + "to": { + "type": "string", + "title": "Redirect destination", + "x-isDateTime": false + }, + "redirects": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "title": "The amount of time, in seconds, to cache the redirects." + }, + "paths": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "regexp": { + "type": "boolean", + "title": "Whether the path is a regular expression." + }, + "to": { + "type": "string", + "title": "The URL to redirect to." + }, + "prefix": { + "type": "boolean", + "nullable": true, + "title": "Whether to redirect all the paths that start with the path." + }, + "append_suffix": { + "type": "boolean", + "nullable": true, + "title": "Whether to append the incoming suffix to the redirected URL." + }, + "code": { + "type": "integer", + "enum": [ + 301, + 302, + 307, + 308 + ], + "title": "The redirect code to use." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "The amount of time, in seconds, to cache the redirects." + } + }, + "required": [ + "regexp", + "to", + "prefix", + "append_suffix", + "code", + "expires" + ], + "additionalProperties": false + }, + "title": "The paths to redirect" + } + }, + "required": [ + "expires", + "paths" + ], + "additionalProperties": false, + "title": "The configuration of the redirects.", + "nullable": true, + "x-isDateTime": false + }, + "cache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the cache is enabled." + }, + "default_ttl": { + "type": "integer", + "title": "The TTL to apply when the response doesn't specify one. Only applies to static files." + }, + "cookies": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The cookies to take into account for the cache key." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The headers to take into account for the cache key." + } + }, + "required": [ + "enabled", + "default_ttl", + "cookies", + "headers" + ], + "additionalProperties": false, + "title": "Cache configuration.", + "nullable": true, + "x-isDateTime": false + }, + "ssi": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether SSI include is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Server-Side Include configuration.", + "nullable": true, + "x-isDateTime": false + }, + "upstream": { + "type": "string", + "title": "The upstream to use for this route.", + "nullable": true, + "x-isDateTime": false + }, + "sticky": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether sticky routing is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Sticky routing configuration.", + "nullable": true, + "x-isDateTime": false + } + }, + "required": [ + "attributes", + "type", + "tls", + "to" + ], + "additionalProperties": false + }, + "Ref": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Ref", + "x-isDateTime": false + }, + "ref": { + "type": "string", + "title": "The name of the reference", + "x-isDateTime": false + }, + "object": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "The type of object pointed to" + }, + "sha": { + "type": "string", + "title": "The SHA of the object pointed to" + } + }, + "required": [ + "type", + "sha" + ], + "additionalProperties": false, + "title": "The object the reference points to", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The commit sha of the ref", + "x-isDateTime": false + } + }, + "required": [ + "id", + "ref", + "object", + "sha" + ], + "additionalProperties": false + }, + "RefCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ref" + } + }, + "ReplacementDomainStorage": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ReplacementDomainStorage", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Domain type", + "x-isDateTime": false + }, + "project": { + "type": "string", + "title": "Project name", + "x-isDateTime": false + }, + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "registered_name": { + "type": "string", + "title": "Claimed domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "replacement_for": { + "type": "string", + "title": "Prod domain which will be replaced by this domain.", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "name", + "attributes" + ], + "additionalProperties": false + }, + "ReplacementDomainStorageCreateInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Domain name", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "replacement_for": { + "type": "string", + "title": "Prod domain which will be replaced by this domain.", + "x-isDateTime": false + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "ReplacementDomainStoragePatch": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "Route": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProxyRoute" + }, + { + "$ref": "#/components/schemas/RedirectRoute" + }, + { + "$ref": "#/components/schemas/UpstreamRoute" + } + ] + }, + "RouteCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Route" + } + }, + "ScriptIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of ScriptIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "script": { + "type": "string", + "title": "The script to run", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "events", + "environments", + "excluded_environments", + "states", + "result", + "script" + ], + "additionalProperties": false + }, + "ScriptIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "script": { + "type": "string", + "title": "The script to run", + "x-isDateTime": false + } + }, + "required": [ + "type", + "script" + ], + "additionalProperties": false + }, + "ScriptIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "script": { + "type": "string", + "title": "The script to run", + "x-isDateTime": false + } + }, + "required": [ + "type", + "script" + ], + "additionalProperties": false + }, + "SlackIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SlackIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "channel": { + "type": "string", + "title": "The Slack channel to post messages to", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "channel" + ], + "additionalProperties": false + }, + "SlackIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Slack token to use", + "x-isDateTime": false + }, + "channel": { + "type": "string", + "title": "The Slack channel to post messages to", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "channel" + ], + "additionalProperties": false + }, + "SlackIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Slack token to use", + "x-isDateTime": false + }, + "channel": { + "type": "string", + "title": "The Slack channel to post messages to", + "x-isDateTime": false + } + }, + "required": [ + "type", + "token", + "channel" + ], + "additionalProperties": false + }, + "SplunkIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SplunkIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Splunk HTTP Event Connector REST API endpoint", + "x-isDateTime": false + }, + "index": { + "type": "string", + "title": "The Splunk Index", + "x-isDateTime": false + }, + "sourcetype": { + "type": "string", + "title": "The event 'sourcetype'", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "index", + "sourcetype", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "SplunkIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Splunk HTTP Event Connector REST API endpoint", + "x-isDateTime": false + }, + "index": { + "type": "string", + "title": "The Splunk Index", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Splunk Authorization Token", + "x-isDateTime": false + }, + "sourcetype": { + "type": "string", + "title": "The event 'sourcetype'", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "index", + "token" + ], + "additionalProperties": false + }, + "SplunkIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Splunk HTTP Event Connector REST API endpoint", + "x-isDateTime": false + }, + "index": { + "type": "string", + "title": "The Splunk Index", + "x-isDateTime": false + }, + "token": { + "type": "string", + "title": "The Splunk Authorization Token", + "x-isDateTime": false + }, + "sourcetype": { + "type": "string", + "title": "The event 'sourcetype'", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url", + "index", + "token" + ], + "additionalProperties": false + }, + "SumologicIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SumologicIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Sumologic HTTPS endpoint", + "x-isDateTime": false + }, + "category": { + "type": "string", + "title": "The Category used to easy filtering (sent as X-Sumo-Category header)", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "url", + "category", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "SumologicIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Sumologic HTTPS endpoint", + "x-isDateTime": false + }, + "category": { + "type": "string", + "title": "The Category used to easy filtering (sent as X-Sumo-Category header)", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "SumologicIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The Sumologic HTTPS endpoint", + "x-isDateTime": false + }, + "category": { + "type": "string", + "title": "The Category used to easy filtering (sent as X-Sumo-Category header)", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "SyslogIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of SyslogIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "host": { + "type": "string", + "title": "Syslog relay/collector host", + "x-isDateTime": false + }, + "port": { + "type": "integer", + "title": "Syslog relay/collector port", + "x-isDateTime": false + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "tls", + "udp" + ], + "title": "Transport protocol", + "x-isDateTime": false + }, + "facility": { + "type": "integer", + "title": "Syslog facility", + "x-isDateTime": false + }, + "message_format": { + "type": "string", + "enum": [ + "rfc3164", + "rfc5424" + ], + "title": "Syslog message format", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "extra", + "host", + "port", + "protocol", + "facility", + "message_format", + "tls_verify", + "excluded_services" + ], + "additionalProperties": false + }, + "SyslogIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "host": { + "type": "string", + "title": "Syslog relay/collector host", + "x-isDateTime": false + }, + "port": { + "type": "integer", + "title": "Syslog relay/collector port", + "x-isDateTime": false + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "tls", + "udp" + ], + "title": "Transport protocol", + "x-isDateTime": false + }, + "facility": { + "type": "integer", + "title": "Syslog facility", + "x-isDateTime": false + }, + "message_format": { + "type": "string", + "enum": [ + "rfc3164", + "rfc5424" + ], + "title": "Syslog message format", + "x-isDateTime": false + }, + "auth_token": { + "type": "string", + "title": "Authentication token", + "x-isDateTime": false + }, + "auth_mode": { + "type": "string", + "enum": [ + "prefix", + "structured_data" + ], + "title": "Authentication mode", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "SyslogIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "extra": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary key/value pairs to include with forwarded logs", + "x-isDateTime": false + }, + "host": { + "type": "string", + "title": "Syslog relay/collector host", + "x-isDateTime": false + }, + "port": { + "type": "integer", + "title": "Syslog relay/collector port", + "x-isDateTime": false + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "tls", + "udp" + ], + "title": "Transport protocol", + "x-isDateTime": false + }, + "facility": { + "type": "integer", + "title": "Syslog facility", + "x-isDateTime": false + }, + "message_format": { + "type": "string", + "enum": [ + "rfc3164", + "rfc5424" + ], + "title": "Syslog message format", + "x-isDateTime": false + }, + "auth_token": { + "type": "string", + "title": "Authentication token", + "x-isDateTime": false + }, + "auth_mode": { + "type": "string", + "enum": [ + "prefix", + "structured_data" + ], + "title": "Authentication mode", + "x-isDateTime": false + }, + "tls_verify": { + "type": "boolean", + "title": "Enable/Disable HTTPS certificate verification", + "x-isDateTime": false + }, + "excluded_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Comma separated list of service and application names to exclude from logging", + "x-isDateTime": false + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "SystemInformation": { + "type": "object", + "properties": { + "version": { + "type": "string", + "title": "The version of this project server", + "x-isDateTime": false + }, + "image": { + "type": "string", + "title": "The image version of the project server", + "x-isDateTime": false + }, + "started_at": { + "type": "string", + "format": "date-time", + "title": "Started At", + "x-isDateTime": true + } + }, + "required": [ + "version", + "image", + "started_at" + ], + "additionalProperties": false + }, + "Tree": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Tree", + "x-isDateTime": false + }, + "sha": { + "type": "string", + "title": "The identifier of the tree", + "x-isDateTime": false + }, + "tree": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "The path of the item" + }, + "mode": { + "type": "string", + "enum": [ + "040000", + "100644", + "100755", + "120000", + "160000" + ], + "title": "The mode of the item" + }, + "type": { + "type": "string", + "title": "The type of the item (blob or tree)" + }, + "sha": { + "type": "string", + "nullable": true, + "title": "The sha of the item" + } + }, + "required": [ + "path", + "mode", + "type", + "sha" + ], + "additionalProperties": false + }, + "title": "The tree items", + "x-isDateTime": false + } + }, + "required": [ + "id", + "sha", + "tree" + ], + "additionalProperties": false + }, + "UpstreamRoute": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of UpstreamRoute", + "nullable": true, + "x-isDateTime": false + }, + "primary": { + "type": "boolean", + "nullable": true, + "title": "This route is the primary route of the environment", + "x-isDateTime": false + }, + "production_url": { + "type": "string", + "nullable": true, + "title": "How this URL route would look on production environment", + "x-isDateTime": false + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Arbitrary attributes attached to this resource", + "x-isDateTime": false + }, + "type": { + "type": "string", + "enum": [ + "proxy", + "redirect", + "upstream" + ], + "title": "Route type.", + "x-isDateTime": false + }, + "tls": { + "type": "object", + "properties": { + "strict_transport_security": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Whether strict transport security is enabled or not." + }, + "include_subdomains": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should include all subdomains." + }, + "preload": { + "type": "boolean", + "nullable": true, + "title": "Whether the strict transport security policy should be preloaded in browsers." + } + }, + "required": [ + "enabled", + "include_subdomains", + "preload" + ], + "additionalProperties": false, + "title": "Strict-Transport-Security options." + }, + "min_version": { + "type": "string", + "enum": [ + "TLSv1.0", + "TLSv1.1", + "TLSv1.2", + "TLSv1.3" + ], + "nullable": true, + "title": "The minimum TLS version to support." + }, + "client_authentication": { + "type": "string", + "enum": [ + "request", + "require" + ], + "nullable": true, + "title": "The type of client authentication to request." + }, + "client_certificate_authorities": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used." + } + }, + "required": [ + "strict_transport_security", + "min_version", + "client_authentication", + "client_certificate_authorities" + ], + "additionalProperties": false, + "title": "TLS settings for the route.", + "x-isDateTime": false + }, + "cache": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether the cache is enabled." + }, + "default_ttl": { + "type": "integer", + "title": "The TTL to apply when the response doesn't specify one. Only applies to static files." + }, + "cookies": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The cookies to take into account for the cache key." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The headers to take into account for the cache key." + } + }, + "required": [ + "enabled", + "default_ttl", + "cookies", + "headers" + ], + "additionalProperties": false, + "title": "Cache configuration.", + "nullable": true, + "x-isDateTime": false + }, + "ssi": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether SSI include is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Server-Side Include configuration.", + "nullable": true, + "x-isDateTime": false + }, + "upstream": { + "type": "string", + "title": "The upstream to use for this route.", + "nullable": true, + "x-isDateTime": false + }, + "redirects": { + "type": "object", + "properties": { + "expires": { + "type": "string", + "title": "The amount of time, in seconds, to cache the redirects." + }, + "paths": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "regexp": { + "type": "boolean", + "title": "Whether the path is a regular expression." + }, + "to": { + "type": "string", + "title": "The URL to redirect to." + }, + "prefix": { + "type": "boolean", + "nullable": true, + "title": "Whether to redirect all the paths that start with the path." + }, + "append_suffix": { + "type": "boolean", + "nullable": true, + "title": "Whether to append the incoming suffix to the redirected URL." + }, + "code": { + "type": "integer", + "enum": [ + 301, + 302, + 307, + 308 + ], + "title": "The redirect code to use." + }, + "expires": { + "type": "string", + "nullable": true, + "title": "The amount of time, in seconds, to cache the redirects." + } + }, + "required": [ + "regexp", + "to", + "prefix", + "append_suffix", + "code", + "expires" + ], + "additionalProperties": false + }, + "title": "The paths to redirect" + } + }, + "required": [ + "expires", + "paths" + ], + "additionalProperties": false, + "title": "The configuration of the redirects.", + "nullable": true, + "x-isDateTime": false + }, + "sticky": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Whether sticky routing is enabled." + } + }, + "required": [ + "enabled" + ], + "additionalProperties": false, + "title": "Sticky routing configuration.", + "nullable": true, + "x-isDateTime": false + }, + "to": { + "type": "string", + "title": "Proxy destination", + "nullable": true, + "x-isDateTime": false + } + }, + "required": [ + "attributes", + "type", + "tls" + ], + "additionalProperties": false + }, + "Version": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of Version", + "x-isDateTime": false + }, + "commit": { + "type": "string", + "nullable": true, + "title": "The SHA of the commit of this version", + "x-isDateTime": false + }, + "locked": { + "type": "boolean", + "title": "Whether this version is locked and cannot be modified", + "x-isDateTime": false + }, + "routing": { + "type": "object", + "properties": { + "percentage": { + "type": "integer", + "title": "The percentage of traffic routed to this version" + } + }, + "required": [ + "percentage" + ], + "additionalProperties": false, + "title": "Configuration about the traffic routed to this version", + "x-isDateTime": false + } + }, + "required": [ + "id", + "commit", + "locked", + "routing" + ], + "additionalProperties": false + }, + "VersionCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Version" + } + }, + "VersionCreateInput": { + "type": "object", + "properties": { + "routing": { + "type": "object", + "properties": { + "percentage": { + "type": "integer", + "title": "The percentage of traffic routed to this version" + } + }, + "additionalProperties": false, + "title": "Configuration about the traffic routed to this version", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "VersionPatch": { + "type": "object", + "properties": { + "routing": { + "type": "object", + "properties": { + "percentage": { + "type": "integer", + "title": "The percentage of traffic routed to this version" + } + }, + "additionalProperties": false, + "title": "Configuration about the traffic routed to this version", + "x-isDateTime": false + } + }, + "additionalProperties": false + }, + "WebHookIntegration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Identifier of WebHookIntegration", + "x-isDateTime": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "x-isDateTime": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "x-isDateTime": true + }, + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "created_at", + "updated_at", + "type", + "events", + "environments", + "excluded_environments", + "states", + "result", + "shared_key", + "url" + ], + "additionalProperties": false + }, + "WebHookIntegrationCreateInput": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "WebHookIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "x-isDateTime": false + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to execute the hook on", + "x-isDateTime": false + }, + "excluded_environments": { + "type": "array", + "items": { + "type": "string" + }, + "title": "The environments to not execute the hook on", + "x-isDateTime": false + }, + "states": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Events to execute the hook on", + "x-isDateTime": false + }, + "result": { + "type": "string", + "enum": [ + "*", + "failure", + "success" + ], + "title": "Result to execute the hook on", + "x-isDateTime": false + }, + "shared_key": { + "type": "string", + "nullable": true, + "title": "The JWS shared secret key", + "x-isDateTime": false + }, + "url": { + "type": "string", + "title": "The URL of the webhook", + "x-isDateTime": false + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false + }, + "AutoscalerAlertPartial": { + "properties": { + "name": { + "description": "User friendly name for the alert", + "title": "Name", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "User friendly name for the alert" + ] + }, + "environment": { + "type": "string", + "nullable": true, + "title": "Environment", + "description": "Environment for which the alert was received", + "x-isDateTime": false, + "x-description": [ + "Environment for which the alert was received" + ] + }, + "service": { + "description": "Service for which the alert was received", + "title": "Service", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Service for which the alert was received" + ] + }, + "resource": { + "type": "string", + "nullable": true, + "title": "Resource", + "description": "Name of resource that triggered the alert", + "x-isDateTime": false, + "x-description": [ + "Name of resource that triggered the alert" + ] + }, + "condition": { + "description": "Comparison condition to use when evaluating the alert", + "title": "Condition", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Comparison condition to use when evaluating the alert" + ] + }, + "threshold": { + "description": "Value that has to be crossed for the alert to be considered triggered", + "title": "Threshold", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Value that has to be crossed for the alert to be considered triggered" + ] + }, + "duration": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerDuration" + }, + "nullable": true, + "description": "Number of seconds during which the condition was satisfied", + "x-isDateTime": false, + "x-description": [ + "Number of seconds during which the condition was satisfied" + ] + }, + "value": { + "description": "Current value for the received alert", + "title": "Value", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Current value for the received alert" + ] + } + }, + "required": [ + "name", + "service", + "condition", + "threshold", + "value" + ], + "title": "AutoscalerAlertPartial", + "type": "object" + }, + "AutoscalerCPUPressureTrigger": { + "description": "CPU pressure trigger settings.\n\nWhen CPU pressure goes below lower bound, service will be scaled down.\nWhen CPU pressure goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerCPUPressureTrigger", + "type": "object", + "x-description": [ + "CPU pressure trigger settings. When CPU pressure goes below lower bound, service will be scaled down. When CPU", + "pressure goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerCPUResources": { + "description": "CPU scaling settings", + "properties": { + "min": { + "description": "Minimum CPUs when scaling down vertically", + "minimum": 0, + "title": "Min", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Minimum CPUs when scaling down vertically" + ] + }, + "max": { + "description": "Maximum CPUs when scaling up vertically", + "minimum": 0, + "title": "Max", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Maximum CPUs when scaling up vertically" + ] + } + }, + "title": "AutoscalerCPUResources", + "type": "object", + "x-description": [ + "CPU scaling settings" + ] + }, + "AutoscalerCPUTrigger": { + "description": "CPU resource trigger settings.\n\nWhen CPU usage goes below lower bound, service will be scaled down.\nWhen CPU usage goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerCPUTrigger", + "type": "object", + "x-description": [ + "CPU resource trigger settings. When CPU usage goes below lower bound, service will be scaled down. When CPU usage", + "goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerCondition": { + "description": "Trigger condition settings", + "properties": { + "threshold": { + "description": "Value at which the condition is satisfied", + "maximum": 100, + "minimum": 0, + "title": "Threshold", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "Value at which the condition is satisfied" + ] + }, + "duration": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerDuration" + }, + { + "description": "Number of seconds during which the condition must be satisfied" + } + ], + "x-isDateTime": false + }, + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the condition should be used for generating alerts", + "x-isDateTime": false, + "x-description": [ + "Whether the condition should be used for generating alerts" + ] + } + }, + "required": [ + "threshold" + ], + "title": "AutoscalerCondition", + "type": "object", + "x-description": [ + "Trigger condition settings" + ] + }, + "AutoscalerDuration": { + "enum": [ + 60, + 120, + 300, + 600, + 1800, + 3600 + ], + "title": "AutoscalerDuration", + "type": "integer" + }, + "AutoscalerEmptyBody": { + "description": "Empty body", + "properties": {}, + "title": "AutoscalerEmptyBody", + "type": "object", + "x-description": [ + "Empty body" + ] + }, + "AutoscalerInstances": { + "description": "Horizontal scaling settings", + "properties": { + "min": { + "description": "Minimum number of instances when scaling down horizontally", + "title": "Min", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Minimum number of instances when scaling down horizontally" + ] + }, + "max": { + "description": "Maximum number of instances when scaling up horizontally", + "title": "Max", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Maximum number of instances when scaling up horizontally" + ] + } + }, + "title": "AutoscalerInstances", + "type": "object", + "x-description": [ + "Horizontal scaling settings" + ] + }, + "AutoscalerMemoryPressureTrigger": { + "description": "Memory pressure trigger settings.\n\nWhen memory pressure goes below lower bound, service will be scaled down.\nWhen memory pressure goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerMemoryPressureTrigger", + "type": "object", + "x-description": [ + "Memory pressure trigger settings. When memory pressure goes below lower bound, service will be scaled down. When", + "memory pressure goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerMemoryResources": { + "description": "Memory scaling settings", + "properties": { + "min": { + "description": "Minimum memory (bytes) when scaling down vertically", + "minimum": 0, + "title": "Min", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Minimum memory (bytes) when scaling down vertically" + ] + }, + "max": { + "description": "Maximum memory (bytes) when scaling up vertically", + "minimum": 0, + "title": "Max", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Maximum memory (bytes) when scaling up vertically" + ] + } + }, + "title": "AutoscalerMemoryResources", + "type": "object", + "x-description": [ + "Memory scaling settings" + ] + }, + "AutoscalerMemoryTrigger": { + "description": "Memory resource trigger settings.\n\nWhen memory usage goes below lower bound, service will be scaled down.\nWhen memory usage goes above upper bound, service will be scaled up.", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true, + "title": "Enabled", + "description": "Whether the trigger is enabled", + "x-isDateTime": false, + "x-description": [ + "Whether the trigger is enabled" + ] + }, + "down": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Lower bound on resource usage" + } + ], + "x-isDateTime": false + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerCondition" + }, + { + "description": "Upper bound on resource usage" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerMemoryTrigger", + "type": "object", + "x-description": [ + "Memory resource trigger settings. When memory usage goes below lower bound, service will be scaled down. When", + "memory usage goes above upper bound, service will be scaled up." + ] + }, + "AutoscalerResources": { + "description": "Vertical scaling settings", + "properties": { + "cpu": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerCPUResources" + }, + "nullable": true, + "description": "Lower/Upper bounds on CPU allocation when scaling", + "x-isDateTime": false, + "x-description": [ + "Lower/Upper bounds on CPU allocation when scaling" + ] + }, + "memory": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerMemoryResources" + }, + "nullable": true, + "description": "Lower/Upper bounds on Memory allocation when scaling", + "x-isDateTime": false, + "x-description": [ + "Lower/Upper bounds on Memory allocation when scaling" + ] + } + }, + "title": "AutoscalerResources", + "type": "object", + "x-description": [ + "Vertical scaling settings" + ] + }, + "AutoscalerScalingCooldown": { + "description": "Scaling cooldown settings", + "properties": { + "up": { + "description": "Number of seconds to wait until scaling up can be done again (since last attempt)", + "minimum": 0, + "title": "Up", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of seconds to wait until scaling up can be done again (since last attempt)" + ] + }, + "down": { + "description": "Number of seconds to wait until scaling down can be done again (since last attempt)", + "minimum": 0, + "title": "Down", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of seconds to wait until scaling down can be done again (since last attempt)" + ] + } + }, + "title": "AutoscalerScalingCooldown", + "type": "object", + "x-description": [ + "Scaling cooldown settings" + ] + }, + "AutoscalerScalingFactor": { + "description": "Scaling factor settings", + "properties": { + "up": { + "description": "Number of instances to add when scaling up horizontally", + "minimum": 0, + "title": "Up", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of instances to add when scaling up horizontally" + ] + }, + "down": { + "description": "Number of instances to remove when scaling down horizontally", + "minimum": 0, + "title": "Down", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "Number of instances to remove when scaling down horizontally" + ] + } + }, + "title": "AutoscalerScalingFactor", + "type": "object", + "x-description": [ + "Scaling factor settings" + ] + }, + "AutoscalerServiceSettings": { + "description": "Autoscaling settings for a specific service", + "properties": { + "triggers": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerTriggers" + }, + { + "description": "Metrics should be evaluated as triggers for autoscaling" + } + ], + "x-isDateTime": false + }, + "instances": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerInstances" + }, + { + "description": "Lower/Upper bounds on number of instances for horizontal scaling" + } + ], + "x-isDateTime": false + }, + "resources": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerResources" + }, + { + "description": "Lower/Upper bounds on cpu/memory for vertical scaling" + } + ], + "x-isDateTime": false + }, + "scale_factor": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerScalingFactor" + }, + { + "description": "How many instances to add/remove on each scaling attempt" + } + ], + "x-isDateTime": false + }, + "scale_cooldown": { + "allOf": [ + { + "$ref": "#/components/schemas/AutoscalerScalingCooldown" + }, + { + "description": "How long to wait before the next scaling attempt can be performed" + } + ], + "x-isDateTime": false + } + }, + "title": "AutoscalerServiceSettings", + "type": "object", + "x-description": [ + "Autoscaling settings for a specific service" + ] + }, + "AutoscalerSettings": { + "description": "Update model for autoscaling settings.\n\nThis model is mainly used for partial updates (PATCH), therefore all its\nattributes are optional.", + "properties": { + "services": { + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerServiceSettings" + }, + "nullable": true + }, + "type": "object", + "nullable": true, + "title": "Services", + "description": "Each service for which autoscaling is configured is listed in the key", + "x-isDateTime": false, + "x-description": [ + "Each service for which autoscaling is configured is listed in the key" + ] + } + }, + "title": "AutoscalerSettings", + "type": "object", + "x-description": [ + "Update model for autoscaling settings. This model is mainly used for partial updates (PATCH), therefore all its", + "attributes are optional." + ] + }, + "AutoscalerTriggers": { + "additionalProperties": false, + "description": "Scaling triggers settings", + "properties": { + "cpu": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerCPUTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on CPU usage", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on CPU usage" + ] + }, + "memory": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerMemoryTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on Memory usage", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on Memory usage" + ] + }, + "cpu_pressure": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerCPUPressureTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on CPU pressure", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on CPU pressure" + ] + }, + "memory_pressure": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoscalerMemoryPressureTrigger" + }, + "nullable": true, + "description": "Settings for scaling based on Memory pressure", + "x-isDateTime": false, + "x-description": [ + "Settings for scaling based on Memory pressure" + ] + } + }, + "title": "AutoscalerTriggers", + "type": "object", + "x-description": [ + "Scaling triggers settings" + ] + }, + "Invoice": { + "type": "object", + "description": "The invoice object.", + "properties": { + "id": { + "type": "string", + "description": "The invoice id.", + "x-isDateTime": false, + "x-description": [ + "The invoice id." + ] + }, + "invoice_number": { + "description": "The invoice number.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The invoice number." + ] + }, + "type": { + "description": "Invoice type.", + "type": "string", + "enum": [ + "invoice", + "credit_memo" + ], + "x-isDateTime": false, + "x-description": [ + "Invoice type." + ] + }, + "order_id": { + "description": "The id of the related order.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The id of the related order." + ] + }, + "related_invoice_id": { + "description": "If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice.", + "type": "string", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice." + ] + }, + "status": { + "description": "The invoice status.", + "type": "string", + "enum": [ + "paid", + "charged_off", + "pending", + "refunded", + "canceled", + "refund_pending" + ], + "x-isDateTime": false, + "x-description": [ + "The invoice status." + ] + }, + "owner": { + "description": "The ULID of the owner.", + "type": "string", + "format": "ulid", + "x-isDateTime": false, + "x-description": [ + "The ULID of the owner." + ] + }, + "invoice_date": { + "description": "The invoice date.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The invoice date." + ] + }, + "invoice_due": { + "description": "The invoice due date.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The invoice due date." + ] + }, + "created": { + "description": "The time when the invoice was created.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The time when the invoice was created." + ] + }, + "changed": { + "description": "The time when the invoice was changed.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The time when the invoice was changed." + ] + }, + "company": { + "description": "Company name (if any).", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "Company name (if any)." + ] + }, + "total": { + "description": "The invoice total.", + "type": "number", + "format": "double", + "x-isDateTime": false, + "x-description": [ + "The invoice total." + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "notes": { + "description": "The invoice note.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The invoice note." + ] + }, + "invoice_pdf": { + "$ref": "#/components/schemas/InvoicePDF" + } + }, + "x-description": [ + "The invoice object." + ] + }, + "Organization": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "type": { + "type": "string", + "description": "The type of the organization.", + "enum": [ + "fixed", + "flexible" + ], + "x-isDateTime": false, + "x-description": [ + "The type of the organization." + ] + }, + "owner_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the owner.", + "x-isDateTime": false, + "x-description": [ + "The ID of the owner." + ] + }, + "namespace": { + "type": "string", + "description": "The namespace in which the organization name is unique.", + "x-isDateTime": false, + "x-description": [ + "The namespace in which the organization name is unique." + ] + }, + "name": { + "type": "string", + "description": "A unique machine name representing the organization.", + "x-isDateTime": false, + "x-description": [ + "A unique machine name representing the organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the organization." + ] + }, + "country": { + "type": "string", + "description": "The organization country (2-letter country code).", + "maxLength": 2, + "x-isDateTime": false, + "x-description": [ + "The organization country (2-letter country code)." + ] + }, + "capabilities": { + "type": "array", + "description": "The organization capabilities.", + "items": { + "type": "string" + }, + "uniqueItems": true, + "x-isDateTime": false, + "x-description": [ + "The organization capabilities." + ] + }, + "vendor": { + "type": "string", + "description": "The vendor.", + "x-isDateTime": false, + "x-description": [ + "The vendor." + ] + }, + "billing_account_id": { + "type": "string", + "description": "The Billing Account ID.", + "x-isDateTime": false, + "x-description": [ + "The Billing Account ID." + ] + }, + "billing_legacy": { + "type": "boolean", + "description": "Whether the account is billed with the legacy system.", + "x-isDateTime": false, + "x-description": [ + "Whether the account is billed with the legacy system." + ] + }, + "status": { + "type": "string", + "description": "The status of the organization.", + "enum": [ + "active", + "restricted", + "suspended", + "deleted" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the organization." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current organization." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current organization." + ] + }, + "members": { + "type": "object", + "description": "Link to the current organization's members.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's members." + ] + }, + "create-member": { + "type": "object", + "description": "Link for creating a new organization member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for creating a new organization member." + ] + }, + "address": { + "type": "object", + "description": "Link to the current organization's address.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's address." + ] + }, + "profile": { + "type": "object", + "description": "Link to the current organization's profile.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's profile." + ] + }, + "payment-source": { + "type": "object", + "description": "Link to the current organization's payment source.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's payment source." + ] + }, + "orders": { + "type": "object", + "description": "Link to the current organization's orders.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's orders." + ] + }, + "vouchers": { + "type": "object", + "description": "Link to the current organization's vouchers.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's vouchers." + ] + }, + "apply-voucher": { + "type": "object", + "description": "Link for applying a voucher for the current organization.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for applying a voucher for the current organization." + ] + }, + "subscriptions": { + "type": "object", + "description": "Link to the current organization's subscriptions.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's subscriptions." + ] + }, + "create-subscription": { + "type": "object", + "description": "Link for creating a new organization subscription.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for creating a new organization subscription." + ] + }, + "estimate-subscription": { + "type": "object", + "description": "Link for estimating the price of a new subscription.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link for estimating the price of a new subscription." + ] + }, + "mfa-enforcement": { + "type": "object", + "description": "Link to the current organization's MFA enforcement settings.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's MFA enforcement settings." + ] + } + } + } + } + }, + "OrganizationReference": { + "description": "The referenced organization, or null if it no longer exists.", + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "type": { + "type": "string", + "description": "The type of the organization.", + "x-isDateTime": false, + "x-description": [ + "The type of the organization." + ] + }, + "owner_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the owner.", + "x-isDateTime": false, + "x-description": [ + "The ID of the owner." + ] + }, + "name": { + "type": "string", + "description": "A unique machine name representing the organization.", + "x-isDateTime": false, + "x-description": [ + "A unique machine name representing the organization." + ] + }, + "label": { + "type": "string", + "description": "The human-readable label of the organization.", + "x-isDateTime": false, + "x-description": [ + "The human-readable label of the organization." + ] + }, + "vendor": { + "type": "string", + "description": "The vendor.", + "x-isDateTime": false, + "x-description": [ + "The vendor." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the organization was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the organization was last updated." + ] + } + }, + "x-description": [ + "The referenced organization, or null if it no longer exists." + ] + }, + "OrganizationMember": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "deprecated": true, + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "permissions": { + "$ref": "#/components/schemas/Permissions" + }, + "level": { + "type": "string", + "description": "Access level of the member.", + "enum": [ + "admin", + "viewer" + ], + "x-isDateTime": false, + "x-description": [ + "Access level of the member." + ] + }, + "owner": { + "type": "boolean", + "description": "Whether the member is the organization owner.", + "x-isDateTime": false, + "x-description": [ + "Whether the member is the organization owner." + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the member was created.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the member was created." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the member was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the member was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current member." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current member." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current member.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current member." + ] + } + } + } + } + }, + "Vouchers": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "The uuid of the user.", + "x-isDateTime": false, + "x-description": [ + "The uuid of the user." + ] + }, + "vouchers_total": { + "type": "string", + "description": "The total voucher credit given to the user.", + "x-isDateTime": false, + "x-description": [ + "The total voucher credit given to the user." + ] + }, + "vouchers_applied": { + "type": "string", + "description": "The part of total voucher credit applied to orders.", + "x-isDateTime": false, + "x-description": [ + "The part of total voucher credit applied to orders." + ] + }, + "vouchers_remaining_balance": { + "type": "string", + "description": "The remaining voucher credit, available for future orders.", + "x-isDateTime": false, + "x-description": [ + "The remaining voucher credit, available for future orders." + ] + }, + "currency": { + "type": "string", + "description": "The currency of the vouchers.", + "x-isDateTime": false, + "x-description": [ + "The currency of the vouchers." + ] + }, + "vouchers": { + "description": "Array of vouchers.", + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The voucher code." + }, + "amount": { + "type": "string", + "description": "The total voucher credit." + }, + "currency": { + "type": "string", + "description": "The currency of the voucher." + }, + "orders": { + "type": "array", + "description": "Array of orders to which a voucher applied.", + "items": { + "type": "object", + "properties": { + "order_id": { + "type": "string", + "description": "The id of the order." + }, + "status": { + "type": "string", + "description": "The status of the order." + }, + "billing_period_start": { + "type": "string", + "description": "The billing period start timestamp of the order (ISO 8601)." + }, + "billing_period_end": { + "type": "string", + "description": "The billing period end timestamp of the order (ISO 8601)." + }, + "order_total": { + "type": "string", + "description": "The total of the order." + }, + "order_discount": { + "type": "string", + "description": "The total voucher credit applied to the order." + }, + "currency": { + "type": "string", + "description": "The currency of the order." + } + } + } + } + } + }, + "x-isDateTime": false, + "x-description": [ + "Array of vouchers." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current resource." + ] + } + } + } + } + }, + "Permissions": { + "type": "array", + "description": "The organization member permissions.", + "items": { + "type": "string", + "enum": [ + "admin", + "billing", + "members", + "plans", + "projects:create", + "projects:list" + ] + }, + "x-description": [ + "The organization member permissions." + ] + }, + "EstimationObject": { + "type": "object", + "description": "A price estimate object.", + "properties": { + "plan": { + "type": "string", + "description": "The monthly price of the plan.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the plan." + ] + }, + "user_licenses": { + "type": "string", + "description": "The monthly price of the user licenses.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the user licenses." + ] + }, + "environments": { + "type": "string", + "description": "The monthly price of the environments.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the environments." + ] + }, + "storage": { + "type": "string", + "description": "The monthly price of the storage.", + "x-isDateTime": false, + "x-description": [ + "The monthly price of the storage." + ] + }, + "total": { + "type": "string", + "description": "The total monthly price.", + "x-isDateTime": false, + "x-description": [ + "The total monthly price." + ] + }, + "options": { + "type": "object", + "description": "The unit prices of the options.", + "x-isDateTime": false, + "x-description": [ + "The unit prices of the options." + ] + } + }, + "x-description": [ + "A price estimate object." + ] + }, + "OrganizationEstimationObject": { + "type": "object", + "description": "An estimation of all organization spend.", + "properties": { + "total": { + "type": "string", + "description": "The total estimated price for the organization.", + "x-isDateTime": false, + "x-description": [ + "The total estimated price for the organization." + ] + }, + "sub_total": { + "type": "string", + "description": "The sub total for all projects and sellables.", + "x-isDateTime": false, + "x-description": [ + "The sub total for all projects and sellables." + ] + }, + "vouchers": { + "type": "string", + "description": "The total amount of vouchers.", + "x-isDateTime": false, + "x-description": [ + "The total amount of vouchers." + ] + }, + "user_licenses": { + "type": "object", + "description": "An estimation of user licenses cost.", + "properties": { + "base": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "The number of base user licenses.", + "x-description": [ + "The number of base user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for base user licenses.", + "x-description": [ + "The total price for base user licenses." + ] + }, + "list": { + "type": "object", + "properties": { + "admin_user": { + "type": "object", + "description": "An estimation of admin users cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of admin user licenses.", + "x-description": [ + "The number of admin user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for admin user licenses.", + "x-description": [ + "The total price for admin user licenses." + ] + } + }, + "x-description": [ + "An estimation of admin users cost." + ] + }, + "viewer_user": { + "type": "object", + "description": "An estimation of viewer users cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of viewer user licenses.", + "x-description": [ + "The number of viewer user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for viewer user licenses.", + "x-description": [ + "The total price for viewer user licenses." + ] + } + }, + "x-description": [ + "An estimation of viewer users cost." + ] + } + } + } + } + }, + "user_management": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "The number of user_management licenses.", + "x-description": [ + "The number of user_management licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for user_management licenses.", + "x-description": [ + "The total price for user_management licenses." + ] + }, + "list": { + "type": "object", + "properties": { + "standard_management_user": { + "type": "object", + "description": "An estimation of standard_management_user cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of standard_management_user licenses.", + "x-description": [ + "The number of standard_management_user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for standard_management_user licenses.", + "x-description": [ + "The total price for standard_management_user licenses." + ] + } + }, + "x-description": [ + "An estimation of standard_management_user cost." + ] + }, + "advanced_management_user": { + "type": "object", + "description": "An estimation of advanced_management_user cost.", + "properties": { + "count": { + "type": "integer", + "description": "The number of advanced_management_user licenses.", + "x-description": [ + "The number of advanced_management_user licenses." + ] + }, + "total": { + "type": "string", + "description": "The total price for advanced_management_user licenses.", + "x-description": [ + "The total price for advanced_management_user licenses." + ] + } + }, + "x-description": [ + "An estimation of advanced_management_user cost." + ] + } + } + } + } + } + }, + "x-isDateTime": false, + "x-description": [ + "An estimation of user licenses cost." + ] + }, + "user_management": { + "type": "string", + "description": "An estimation of the advanced user management sellable cost.", + "x-isDateTime": false, + "x-description": [ + "An estimation of the advanced user management sellable cost." + ] + }, + "support_level": { + "type": "string", + "description": "The total monthly price for premium support.", + "x-isDateTime": false, + "x-description": [ + "The total monthly price for premium support." + ] + }, + "subscriptions": { + "type": "object", + "description": "An estimation of subscriptions cost.", + "properties": { + "total": { + "type": "string", + "description": "The total price for subscriptions.", + "x-description": [ + "The total price for subscriptions." + ] + }, + "list": { + "type": "array", + "description": "The list of active subscriptions.", + "items": { + "description": "Details of a subscription", + "type": "object", + "properties": { + "license_id": { + "type": "string", + "description": "The id of the subscription." + }, + "project_title": { + "type": "string", + "description": "The name of the project." + }, + "total": { + "type": "string", + "description": "The total price for the subscription." + }, + "usage": { + "type": "object", + "description": "The detail of the usage for the subscription.", + "properties": { + "cpu": { + "type": "number", + "description": "The total cpu for this subsciption." + }, + "memory": { + "type": "number", + "description": "The total memory for this subsciption." + }, + "storage": { + "type": "number", + "description": "The total storage for this subsciption." + }, + "environments": { + "type": "integer", + "description": "The total environments for this subsciption." + } + } + } + } + }, + "x-description": [ + "The list of active subscriptions." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "An estimation of subscriptions cost." + ] + } + }, + "x-description": [ + "An estimation of all organization spend." + ] + }, + "OrganizationAddonsObject": { + "type": "object", + "description": "The list of available and current add-ons of an organization.", + "properties": { + "available": { + "type": "object", + "description": "The list of available add-ons and their possible values.", + "properties": { + "user_management": { + "type": "object", + "description": "Information about the levels of user management that are available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days required for the addon." + }, + "x-description": [ + "Information about the levels of user management that are available." + ] + }, + "support_level": { + "type": "object", + "description": "Information about the levels of support available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days required for the addon." + }, + "x-description": [ + "Information about the levels of support available." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of available add-ons and their possible values." + ] + }, + "current": { + "type": "object", + "description": "The list of existing add-ons and their current values.", + "properties": { + "user_management": { + "type": "object", + "description": "Information about the type of user management currently selected.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days that remain for the addon." + }, + "x-description": [ + "Information about the type of user management currently selected." + ] + }, + "support_level": { + "type": "object", + "description": "Information about the level of support currently selected.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days that remain for the addon." + }, + "x-description": [ + "Information about the level of support currently selected." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of existing add-ons and their current values." + ] + }, + "upgrades_available": { + "type": "object", + "description": "The upgrades available for current add-ons.", + "properties": { + "user_management": { + "type": "array", + "description": "Available upgrade options for user management.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for user management." + ] + }, + "support_level": { + "type": "array", + "description": "Available upgrade options for support.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for support." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The upgrades available for current add-ons." + ] + } + }, + "x-description": [ + "The list of available and current add-ons of an organization." + ] + }, + "SubscriptionAddonsObject": { + "type": "object", + "description": "The list of available and current addons for the license.", + "properties": { + "available": { + "type": "object", + "description": "The list of available addons.", + "properties": { + "continuous_profiling": { + "type": "object", + "description": "Information about the continuous profiling options available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days for the addon." + }, + "x-description": [ + "Information about the continuous profiling options available." + ] + }, + "project_support_level": { + "type": "object", + "description": "Information about the project uptime options available.", + "additionalProperties": { + "type": "number", + "description": "The number of commitment days for the addon." + }, + "x-description": [ + "Information about the project uptime options available." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of available addons." + ] + }, + "current": { + "type": "object", + "description": "The list of existing addons and their current values.", + "properties": { + "continuous_profiling": { + "type": "object", + "description": "The current continuous profiling level of the license.", + "additionalProperties": { + "type": "number", + "description": "The number of remaining commitment days for the addon." + }, + "x-description": [ + "The current continuous profiling level of the license." + ] + }, + "project_support_level": { + "type": "object", + "description": "The current project uptime level of the license.", + "additionalProperties": { + "type": "number", + "description": "The number of remaining commitment days for the addon." + }, + "x-description": [ + "The current project uptime level of the license." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The list of existing addons and their current values." + ] + }, + "upgrades_available": { + "type": "object", + "description": "The upgrades available for current addons.", + "properties": { + "continuous_profiling": { + "type": "array", + "description": "Available upgrade options for continuous profiling.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for continuous profiling." + ] + }, + "project_support_level": { + "type": "array", + "description": "Available upgrade options for project uptime.", + "items": { + "type": "string" + }, + "x-description": [ + "Available upgrade options for project uptime." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The upgrades available for current addons." + ] + } + }, + "x-description": [ + "The list of available and current addons for the license." + ] + }, + "OrganizationAlertConfig": { + "type": "object", + "description": "The alert configuration for an organization.", + "properties": { + "id": { + "type": "string", + "description": "Type of alert (e.g. \"billing\")", + "x-isDateTime": false, + "x-description": [ + "Type of alert (e.g. \"billing\")" + ] + }, + "active": { + "type": "boolean", + "description": "Whether the billing alert should be active or not.", + "x-isDateTime": false, + "x-description": [ + "Whether the billing alert should be active or not." + ] + }, + "alerts_sent": { + "type": "number", + "description": "Number of alerts sent.", + "x-isDateTime": false, + "x-description": [ + "Number of alerts sent." + ] + }, + "last_alert_at": { + "type": "string", + "description": "The datetime the alert was last sent.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last sent." + ] + }, + "updated_at": { + "type": "string", + "description": "The datetime the alert was last updated.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last updated." + ] + }, + "config": { + "type": "object", + "nullable": true, + "description": "Configuration for threshold and mode.", + "properties": { + "threshold": { + "type": "object", + "description": "Data regarding threshold spend.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted threshold value.", + "x-description": [ + "Formatted threshold value." + ] + }, + "amount": { + "type": "number", + "description": "Threshold value.", + "x-description": [ + "Threshold value." + ] + }, + "currency_code": { + "type": "string", + "description": "Threshold currency code.", + "x-description": [ + "Threshold currency code." + ] + }, + "currency_symbol": { + "type": "string", + "description": "Threshold currency symbol.", + "x-description": [ + "Threshold currency symbol." + ] + } + }, + "x-description": [ + "Data regarding threshold spend." + ] + }, + "mode": { + "type": "string", + "description": "The mode of alert.", + "x-description": [ + "The mode of alert." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "Configuration for threshold and mode." + ] + } + }, + "x-description": [ + "The alert configuration for an organization." + ] + }, + "UsageAlert": { + "type": "object", + "description": "The usage alert for a subscription.", + "properties": { + "id": { + "type": "string", + "description": "Tidentifier of the alert.", + "x-isDateTime": false, + "x-description": [ + "Tidentifier of the alert." + ] + }, + "active": { + "type": "boolean", + "description": "Whether the usage alert is activated.", + "x-isDateTime": false, + "x-description": [ + "Whether the usage alert is activated." + ] + }, + "alerts_sent": { + "type": "number", + "description": "Number of alerts sent.", + "x-isDateTime": false, + "x-description": [ + "Number of alerts sent." + ] + }, + "last_alert_at": { + "type": "string", + "description": "The datetime the alert was last sent.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last sent." + ] + }, + "updated_at": { + "type": "string", + "description": "The datetime the alert was last updated.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The datetime the alert was last updated." + ] + }, + "config": { + "type": "object", + "nullable": true, + "description": "Configuration for the usage alert.", + "properties": { + "threshold": { + "type": "object", + "description": "Data regarding threshold spend.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted threshold value.", + "x-description": [ + "Formatted threshold value." + ] + }, + "amount": { + "type": "number", + "description": "Threshold value.", + "x-description": [ + "Threshold value." + ] + }, + "unit": { + "type": "string", + "description": "Threshold unit.", + "x-description": [ + "Threshold unit." + ] + } + }, + "x-description": [ + "Data regarding threshold spend." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "Configuration for the usage alert." + ] + } + }, + "x-description": [ + "The usage alert for a subscription." + ] + }, + "PrepaymentObject": { + "type": "object", + "description": "Prepayment information for an organization.", + "properties": { + "prepayment": { + "type": "object", + "description": "Prepayment information for an organization.", + "properties": { + "organization_id": { + "type": "string", + "description": "Organization ID", + "x-description": [ + "Organization ID" + ] + }, + "balance": { + "type": "object", + "description": "The prepayment balance in complex format.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted balance.", + "x-description": [ + "Formatted balance." + ] + }, + "amount": { + "type": "number", + "description": "The balance amount.", + "x-description": [ + "The balance amount." + ] + }, + "currency_code": { + "type": "string", + "description": "The balance currency code.", + "x-description": [ + "The balance currency code." + ] + }, + "currency_symbol": { + "type": "string", + "description": "The balance currency symbol.", + "x-description": [ + "The balance currency symbol." + ] + } + }, + "x-description": [ + "The prepayment balance in complex format." + ] + }, + "last_updated_at": { + "type": "string", + "nullable": true, + "description": "The date the prepayment balance was last updated.", + "x-description": [ + "The date the prepayment balance was last updated." + ] + }, + "sufficient": { + "type": "boolean", + "description": "Whether the prepayment balance is enough to cover the upcoming order.", + "x-description": [ + "Whether the prepayment balance is enough to cover the upcoming order." + ] + }, + "fallback": { + "type": "string", + "nullable": true, + "description": "The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order.", + "x-description": [ + "The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "Prepayment information for an organization." + ] + } + }, + "x-description": [ + "Prepayment information for an organization." + ] + }, + "PrepaymentTransactionObject": { + "type": "object", + "description": "Prepayment transaction for an organization.", + "properties": { + "order_id": { + "type": "string", + "description": "Order ID", + "x-isDateTime": false, + "x-description": [ + "Order ID" + ] + }, + "message": { + "type": "string", + "description": "The message associated with transaction.", + "x-isDateTime": false, + "x-description": [ + "The message associated with transaction." + ] + }, + "status": { + "type": "string", + "description": "Whether the transactions was successful or a failure.", + "x-isDateTime": false, + "x-description": [ + "Whether the transactions was successful or a failure." + ] + }, + "amount": { + "type": "object", + "description": "The prepayment balance in complex format.", + "properties": { + "formatted": { + "type": "string", + "description": "Formatted balance.", + "x-description": [ + "Formatted balance." + ] + }, + "amount": { + "type": "number", + "description": "The balance amount.", + "x-description": [ + "The balance amount." + ] + }, + "currency_code": { + "type": "string", + "description": "The balance currency code.", + "x-description": [ + "The balance currency code." + ] + }, + "currency_symbol": { + "type": "string", + "description": "The balance currency symbol.", + "x-description": [ + "The balance currency symbol." + ] + } + }, + "x-isDateTime": false, + "x-description": [ + "The prepayment balance in complex format." + ] + }, + "created": { + "type": "string", + "description": "Time the transaction was created.", + "x-isDateTime": false, + "x-description": [ + "Time the transaction was created." + ] + }, + "updated": { + "type": "string", + "description": "Time the transaction was last updated.", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "Time the transaction was last updated." + ] + }, + "expire_date": { + "type": "string", + "description": "The expiration date of the transaction (deposits only).", + "nullable": true, + "x-isDateTime": false, + "x-description": [ + "The expiration date of the transaction (deposits only)." + ] + } + }, + "x-description": [ + "Prepayment transaction for an organization." + ] + }, + "ArrayFilter": { + "type": "object", + "properties": { + "eq": { + "type": "string", + "description": "Equal", + "x-isDateTime": false, + "x-description": [ + "Equal" + ] + }, + "ne": { + "type": "string", + "description": "Not equal", + "x-isDateTime": false, + "x-description": [ + "Not equal" + ] + }, + "in": { + "type": "string", + "description": "In (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "In (comma-separated list)" + ] + }, + "nin": { + "type": "string", + "description": "Not in (comma-separated list)", + "x-isDateTime": false, + "x-description": [ + "Not in (comma-separated list)" + ] + } + } + }, + "OrganizationProject": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/ProjectID" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "subscription_id": { + "$ref": "#/components/schemas/SubscriptionID" + }, + "vendor": { + "type": "string", + "description": "Vendor of the project.", + "x-isDateTime": false, + "x-description": [ + "Vendor of the project." + ] + }, + "region": { + "$ref": "#/components/schemas/RegionID" + }, + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "type": { + "$ref": "#/components/schemas/ProjectType" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + }, + "default_branch": { + "$ref": "#/components/schemas/ProjectDefaultBranch" + }, + "status": { + "$ref": "#/components/schemas/ProjectStatus" + }, + "trial_plan": { + "$ref": "#/components/schemas/ProjectTrialPlan" + }, + "project_ui": { + "$ref": "#/components/schemas/ProjectUI" + }, + "locked": { + "$ref": "#/components/schemas/ProjectLocked" + }, + "cse_notes": { + "$ref": "#/components/schemas/ProjectCSENotes" + }, + "dedicated_tag": { + "$ref": "#/components/schemas/ProjectDedicatedTag" + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current project.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current project." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current project.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current project." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current project.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current project." + ] + }, + "activities": { + "type": "object", + "description": "Link to the project's activities.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the project's activities." + ] + }, + "addons": { + "type": "object", + "description": "Link to the project's add-ons.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the project's add-ons." + ] + } + } + } + } + }, + "OrganizationCarbon": { + "type": "object", + "properties": { + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "meta": { + "$ref": "#/components/schemas/MetricsMetadata" + }, + "projects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationProjectCarbon" + }, + "x-isDateTime": false + }, + "total": { + "$ref": "#/components/schemas/CarbonTotal" + } + } + }, + "ProjectCarbon": { + "type": "object", + "properties": { + "project_id": { + "$ref": "#/components/schemas/ProjectID" + }, + "project_title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "meta": { + "$ref": "#/components/schemas/MetricsMetadata" + }, + "values": { + "$ref": "#/components/schemas/MetricsValues" + }, + "total": { + "$ref": "#/components/schemas/CarbonTotal" + } + } + }, + "OrganizationProjectCarbon": { + "type": "object", + "properties": { + "project_id": { + "$ref": "#/components/schemas/ProjectID" + }, + "project_title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "values": { + "$ref": "#/components/schemas/MetricsValues" + }, + "total": { + "$ref": "#/components/schemas/CarbonTotal" + } + } + }, + "ProjectPlan": { + "type": "string", + "description": "The project plan.", + "x-description": [ + "The project plan." + ] + }, + "ProjectReference": { + "description": "The referenced project, or null if it no longer exists.", + "type": "object", + "nullable": true, + "required": [ + "id", + "organization_id", + "subscription_id", + "region", + "title", + "type", + "plan", + "status", + "agency_site", + "support_tier", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ProjectID" + }, + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "subscription_id": { + "$ref": "#/components/schemas/SubscriptionID" + }, + "region": { + "$ref": "#/components/schemas/RegionID" + }, + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "type": { + "$ref": "#/components/schemas/ProjectType" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "status": { + "$ref": "#/components/schemas/ProjectStatus" + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" + } + }, + "x-description": [ + "The referenced project, or null if it no longer exists." + ] + }, + "RegionReference": { + "description": "The referenced region, or null if it no longer exists.", + "type": "object", + "nullable": true, + "required": [ + "id", + "label", + "zone", + "selection_label", + "project_label", + "timezone", + "available", + "endpoint", + "provider", + "datacenter", + "compliance", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/RegionID" + }, + "label": { + "$ref": "#/components/schemas/RegionLabel" + }, + "zone": { + "$ref": "#/components/schemas/RegionZone" + }, + "selection_label": { + "$ref": "#/components/schemas/RegionSelectionLabel" + }, + "project_label": { + "$ref": "#/components/schemas/RegionProjectLabel" + }, + "timezone": { + "$ref": "#/components/schemas/RegionTimezone" + }, + "available": { + "$ref": "#/components/schemas/RegionAvailable" + }, + "private": { + "$ref": "#/components/schemas/RegionPrivate" + }, + "endpoint": { + "$ref": "#/components/schemas/RegionEndpoint" + }, + "code": { + "$ref": "#/components/schemas/RegionCode" + }, + "provider": { + "$ref": "#/components/schemas/RegionProvider" + }, + "datacenter": { + "$ref": "#/components/schemas/RegionDataCenter" + }, + "envimpact": { + "$ref": "#/components/schemas/RegionEnvImpact" + }, + "compliance": { + "$ref": "#/components/schemas/RegionCompliance" + }, + "created_at": { + "$ref": "#/components/schemas/CreatedAt" + }, + "updated_at": { + "$ref": "#/components/schemas/UpdatedAt" + } + }, + "x-description": [ + "The referenced region, or null if it no longer exists." + ] + }, + "ProjectID": { + "type": "string", + "description": "The ID of the project.", + "x-description": [ + "The ID of the project." + ] + }, + "OrganizationID": { + "type": "string", + "description": "The ID of the organization.", + "x-description": [ + "The ID of the organization." + ] + }, + "SubscriptionID": { + "type": "string", + "description": "The ID of the subscription.", + "x-description": [ + "The ID of the subscription." + ] + }, + "RegionID": { + "type": "string", + "description": "The machine name of the region where the project is located.", + "x-description": [ + "The machine name of the region where the project is located." + ] + }, + "ProjectTitle": { + "type": "string", + "description": "The title of the project.", + "x-description": [ + "The title of the project." + ] + }, + "ProjectType": { + "type": "string", + "description": "The type of projects.", + "enum": [ + "grid", + "dedicated" + ], + "x-description": [ + "The type of projects." + ] + }, + "ProjectTimeZone": { + "type": "string", + "description": "Timezone of the project.", + "x-description": [ + "Timezone of the project." + ] + }, + "ProjectDefaultBranch": { + "type": "string", + "description": "Default branch.", + "x-description": [ + "Default branch." + ] + }, + "ProjectLocked": { + "type": "boolean", + "description": "Locked", + "x-description": [ + "Locked" + ] + }, + "ProjectCSENotes": { + "type": "string", + "description": "CSE notes.", + "x-description": [ + "CSE notes." + ] + }, + "ProjectStatus": { + "type": "string", + "description": "The status of the project.", + "enum": [ + "requested", + "active", + "failed", + "suspended", + "deleted" + ], + "x-description": [ + "The status of the project." + ] + }, + "ProjectDedicatedTag": { + "type": "string", + "description": "Dedicated tag.", + "x-description": [ + "Dedicated tag." + ] + }, + "ProjectUI": { + "description": "The URL for the project's user interface.", + "type": "string", + "x-description": [ + "The URL for the project's user interface." + ] + }, + "ProjectTrialPlan": { + "description": "Whether the project is currently on a trial plan.", + "type": "boolean", + "x-description": [ + "Whether the project is currently on a trial plan." + ] + }, + "RegionLabel": { + "type": "string", + "description": "The human-readable name of the region.", + "x-description": [ + "The human-readable name of the region." + ] + }, + "RegionZone": { + "type": "string", + "description": "The geographical zone of the region.", + "x-description": [ + "The geographical zone of the region." + ] + }, + "RegionSelectionLabel": { + "type": "string", + "description": "The label to display when choosing between regions for new projects.", + "x-description": [ + "The label to display when choosing between regions for new projects." + ] + }, + "RegionProjectLabel": { + "type": "string", + "description": "The label to display on existing projects.", + "x-description": [ + "The label to display on existing projects." + ] + }, + "RegionTimezone": { + "type": "string", + "description": "Default timezone of the region.", + "x-description": [ + "Default timezone of the region." + ] + }, + "RegionAvailable": { + "type": "boolean", + "description": "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up during checkout.", + "x-description": [ + "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up", + "during checkout." + ] + }, + "RegionPrivate": { + "type": "boolean", + "description": "Indicator whether or not this platform is for private use only.", + "x-description": [ + "Indicator whether or not this platform is for private use only." + ] + }, + "RegionEndpoint": { + "type": "string", + "description": "Link to the region API endpoint.", + "x-description": [ + "Link to the region API endpoint." + ] + }, + "RegionCode": { + "type": "string", + "description": "The code of the region", + "x-description": [ + "The code of the region" + ] + }, + "RegionProvider": { + "type": "object", + "description": "Information about the region provider.", + "x-description": [ + "Information about the region provider." + ] + }, + "RegionDataCenter": { + "type": "object", + "description": "Information about the region provider data center.", + "x-description": [ + "Information about the region provider data center." + ] + }, + "RegionEnvImpact": { + "type": "object", + "description": "Information about the region provider's environmental impact.", + "x-description": [ + "Information about the region provider's environmental impact." + ] + }, + "RegionCompliance": { + "type": "object", + "description": "Information about the region's compliance.", + "x-description": [ + "Information about the region's compliance." + ] + }, + "MetricsMetadata": { + "type": "object", + "properties": { + "from": { + "description": "The value used to calculate the lower bound of the temporal query. Inclusive.", + "x-isDateTime": false, + "x-description": [ + "The value used to calculate the lower bound of the temporal query. Inclusive." + ] + }, + "to": { + "description": "The truncated value used to calculate the upper bound of the temporal query. Exclusive.", + "x-isDateTime": false, + "x-description": [ + "The truncated value used to calculate the upper bound of the temporal query. Exclusive." + ] + }, + "interval": { + "description": "The interval used to group the metric values.", + "x-isDateTime": false, + "x-description": [ + "The interval used to group the metric values." + ] + }, + "units": { + "description": "The units associated with the provided values.", + "x-isDateTime": false, + "x-description": [ + "The units associated with the provided values." + ] + } + } + }, + "MetricsValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricsValue" + } + }, + "MetricsValue": { + "type": "object", + "properties": { + "value": { + "description": "The measured value of the metric for the given time interval.", + "x-isDateTime": false, + "x-description": [ + "The measured value of the metric for the given time interval." + ] + }, + "start_time": { + "description": "The timestamp at which the time interval began.", + "x-isDateTime": false, + "x-description": [ + "The timestamp at which the time interval began." + ] + } + } + }, + "CarbonTotal": { + "type": "number", + "description": "The calculated total of the metric for the given interval.", + "x-description": [ + "The calculated total of the metric for the given interval." + ] + }, + "CreatedAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when the resource was created.", + "x-description": [ + "The date and time when the resource was created." + ] + }, + "UpdatedAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when the resource was last updated.", + "x-description": [ + "The date and time when the resource was last updated." + ] + }, + "TeamProjectAccess": { + "type": "object", + "properties": { + "team_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the team.", + "x-isDateTime": false, + "x-description": [ + "The ID of the team." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project." + ] + }, + "project_title": { + "type": "string", + "description": "The title of the project.", + "x-isDateTime": false, + "x-description": [ + "The title of the project." + ] + }, + "granted_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was granted.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was granted." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current access item." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current access item." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current access item." + ] + } + } + } + } + }, + "UserProjectAccess": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user." + ] + }, + "organization_id": { + "type": "string", + "format": "ulid", + "description": "The ID of the organization.", + "x-isDateTime": false, + "x-description": [ + "The ID of the organization." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project." + ] + }, + "project_title": { + "type": "string", + "description": "The title of the project.", + "x-isDateTime": false, + "x-description": [ + "The title of the project." + ] + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + }, + "granted_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was granted.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was granted." + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was last updated.", + "x-isDateTime": true, + "x-description": [ + "The date and time when the access was last updated." + ] + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current access item." + ] + }, + "update": { + "type": "object", + "description": "Link for updating the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for updating the current access item." + ] + }, + "delete": { + "type": "object", + "description": "Link for deleting the current access item.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link.", + "x-description": [ + "URL of the link." + ] + }, + "method": { + "type": "string", + "description": "The HTTP method to use.", + "x-description": [ + "The HTTP method to use." + ] + } + }, + "x-description": [ + "Link for deleting the current access item." + ] + } + } + } + } + }, + "ProjectPermissions": { + "type": "array", + "description": "An array of project permissions.", + "items": { + "type": "string", + "enum": [ + "admin", + "viewer", + "development:admin", + "development:contributor", + "development:viewer", + "staging:admin", + "staging:contributor", + "staging:viewer", + "production:admin", + "production:contributor", + "production:viewer" + ] + }, + "x-description": [ + "An array of project permissions." + ] + }, + "InvoicePDF": { + "description": "Invoice PDF document details.", + "properties": { + "url": { + "description": "A link to the PDF invoice.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A link to the PDF invoice." + ] + }, + "status": { + "description": "The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF is not created but queued up. If you get this status, try again later.", + "type": "string", + "enum": [ + "ready", + "pending" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not", + "be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF", + "is not created but queued up. If you get this status, try again later." + ] + } + }, + "type": "object", + "x-description": [ + "Invoice PDF document details." + ] + }, + "Order": { + "description": "The order object.", + "properties": { + "id": { + "description": "The ID of the order.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the order." + ] + }, + "status": { + "description": "The status of the subscription.", + "type": "string", + "enum": [ + "completed", + "past_due", + "pending", + "canceled", + "payment_failed_soft_decline", + "payment_failed_hard_decline" + ], + "x-isDateTime": false, + "x-description": [ + "The status of the subscription." + ] + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "company": { + "description": "The company name.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The company name." + ] + }, + "vat_number": { + "description": "An identifier used in many countries for value added tax purposes.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "An identifier used in many countries for value added tax purposes." + ] + }, + "billing_period_start": { + "description": "The time when the billing period of the order started.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the billing period of the order started." + ] + }, + "billing_period_end": { + "description": "The time when the billing period of the order ended.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the billing period of the order ended." + ] + }, + "billing_period_label": { + "description": "Descriptive information about the billing cycle.", + "properties": { + "formatted": { + "description": "The renderable label for the billing cycle.", + "type": "string", + "x-description": [ + "The renderable label for the billing cycle." + ] + }, + "month": { + "description": "The month of the billing cycle.", + "type": "string", + "x-description": [ + "The month of the billing cycle." + ] + }, + "year": { + "description": "The year of the billing cycle.", + "type": "string", + "x-description": [ + "The year of the billing cycle." + ] + }, + "next_month": { + "description": "The name of the next month following this billing cycle.", + "type": "string", + "x-description": [ + "The name of the next month following this billing cycle." + ] + } + }, + "type": "object", + "x-isDateTime": false, + "x-description": [ + "Descriptive information about the billing cycle." + ] + }, + "billing_period_duration": { + "description": "The duration of the billing period of the order in seconds.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The duration of the billing period of the order in seconds." + ] + }, + "paid_on": { + "description": "The time when the order was successfully charged.", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The time when the order was successfully charged." + ] + }, + "total": { + "description": "The total of the order.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The total of the order." + ] + }, + "total_formatted": { + "description": "The total of the order, formatted with currency.", + "type": "integer", + "x-isDateTime": false, + "x-description": [ + "The total of the order, formatted with currency." + ] + }, + "components": { + "$ref": "#/components/schemas/Components" + }, + "currency": { + "description": "The order currency code.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The order currency code." + ] + }, + "invoice_url": { + "description": "A link to the PDF invoice.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "A link to the PDF invoice." + ] + }, + "last_refreshed": { + "description": "The time when the order was last refreshed.", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The time when the order was last refreshed." + ] + }, + "invoiced": { + "description": "The customer is invoiced.", + "type": "boolean", + "x-isDateTime": false, + "x-description": [ + "The customer is invoiced." + ] + }, + "line_items": { + "description": "The line items that comprise the order.", + "type": "array", + "items": { + "$ref": "#/components/schemas/LineItem" + }, + "x-isDateTime": false, + "x-description": [ + "The line items that comprise the order." + ] + }, + "_links": { + "description": "Links to related API endpoints.", + "properties": { + "invoices": { + "description": "Link to related Invoices API. Use this to retrieve invoices related to this order.", + "properties": { + "href": { + "description": "URL of the link", + "type": "string", + "x-description": [ + "URL of the link" + ] + } + }, + "type": "object", + "x-description": [ + "Link to related Invoices API. Use this to retrieve invoices related to this order." + ] + } + }, + "type": "object", + "x-description": [ + "Links to related API endpoints." + ] + } + }, + "type": "object", + "x-description": [ + "The order object." + ] + }, + "PlanRecords": { + "description": "The plan record object.", + "properties": { + "id": { + "description": "The unique ID of the plan record.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The unique ID of the plan record." + ] + }, + "owner": { + "description": "The UUID of the owner.", + "type": "string", + "format": "uuid", + "x-isDateTime": false, + "x-description": [ + "The UUID of the owner." + ] + }, + "subscription_id": { + "description": "The ID of the subscription this record pertains to.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the subscription this record pertains to." + ] + }, + "sku": { + "description": "The product SKU of the plan that this record represents.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The product SKU of the plan that this record represents." + ] + }, + "plan": { + "description": "The machine name of the plan that this record represents.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The machine name of the plan that this record represents." + ] + }, + "options": { + "type": "array", + "items": { + "description": "The SKU of an option.", + "type": "string" + }, + "x-isDateTime": false + }, + "start": { + "description": "The start timestamp of this plan record (ISO 8601).", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The start timestamp of this plan record (ISO 8601)." + ] + }, + "end": { + "description": "The end timestamp of this plan record (ISO 8601).", + "type": "string", + "format": "date-time", + "nullable": true, + "x-isDateTime": true, + "x-description": [ + "The end timestamp of this plan record (ISO 8601)." + ] + }, + "status": { + "description": "The status of the subscription during this record: active or suspended.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The status of the subscription during this record: active or suspended." + ] + } + }, + "type": "object", + "x-description": [ + "The plan record object." + ] + }, + "Usage": { + "description": "The usage object.", + "properties": { + "id": { + "description": "The unique ID of the usage record.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The unique ID of the usage record." + ] + }, + "subscription_id": { + "description": "The ID of the subscription.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The ID of the subscription." + ] + }, + "usage_group": { + "description": "The type of usage that this record represents.", + "type": "string", + "x-isDateTime": false, + "x-description": [ + "The type of usage that this record represents." + ] + }, + "quantity": { + "description": "The quantity used.", + "type": "number", + "x-isDateTime": false, + "x-description": [ + "The quantity used." + ] + }, + "start": { + "description": "The start timestamp of this usage record (ISO 8601).", + "type": "string", + "format": "date-time", + "x-isDateTime": true, + "x-description": [ + "The start timestamp of this usage record (ISO 8601)." + ] + } + }, + "type": "object", + "x-description": [ + "The usage object." + ] + }, + "ResourceConfig": { + "type": "object", + "properties": { + "profile_size": { + "type": "string", + "nullable": true, + "description": "Profile size (e.g. \"0.5\", \"1\", \"2\")", + "example": "2", + "x-description": [ + "Profile size (e.g. \"0.5\", \"1\", \"2\")" + ] + } + } + } + }, + "parameters": { + "filter_invoice_type": { + "name": "filter[type]", + "in": "query", + "description": "The invoice type. Use invoice for standard invoices, credit_memo for refund/credit invoices.", + "schema": { + "type": "string", + "enum": [ + "credit_memo", + "invoice" + ] + } + }, + "filter_order_id": { + "name": "filter[order_id]", + "in": "query", + "description": "The order id of Invoice.", + "schema": { + "type": "string" + } + }, + "filter_invoice_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the invoice.", + "schema": { + "type": "string", + "enum": [ + "paid", + "charged_off", + "pending", + "refunded", + "canceled", + "refund_pending" + ] + } + }, + "mode": { + "name": "mode", + "in": "query", + "description": "The output mode.", + "schema": { + "type": "string", + "enum": [ + "details" + ] + } + }, + "filter_order_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the order.", + "schema": { + "type": "string", + "enum": [ + "completed", + "past_due", + "pending", + "canceled", + "payment_failed_soft_decline", + "payment_failed_hard_decline" + ] + } + }, + "filter_order_total": { + "name": "filter[total]", + "in": "query", + "description": "The total of the order.", + "schema": { + "type": "integer" + } + }, + "record_end": { + "name": "filter[end]", + "in": "query", + "description": "The end of the observation period for the record. E.g. filter[end]=2018-01-01 will display all records that were active on (i.e. they started before) 2018-01-01", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "record_ended_at": { + "name": "filter[ended_at]", + "in": "query", + "description": "The record's end timestamp. You can use this filter to list records ended after, or before a certain time. E.g. filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=>", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "record_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the plan record. ", + "schema": { + "type": "string", + "enum": [ + "active", + "suspended" + ] + } + }, + "record_usage_group": { + "name": "filter[usage_group]", + "in": "query", + "description": "Filter records by the type of usage.", + "schema": { + "type": "string", + "enum": [ + "storage", + "environments", + "user_licenses" + ] + } + }, + "record_start": { + "name": "filter[start]", + "in": "query", + "description": "The start of the observation period for the record. E.g. filter[start]=2018-01-01 will display all records that were active (i.e. did not end) on 2018-01-01", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "record_started_at": { + "name": "filter[started_at]", + "in": "query", + "description": "The record's start timestamp. You can use this filter to list records started after, or before a certain time. E.g. filter[started_at][value]=2020-01-01&filter[started_at][operator]=>", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "discountId": { + "name": "id", + "in": "path", + "description": "The ID of the organization discount", + "required": true, + "schema": { + "type": "string" + } + }, + "id": { + "name": "filter[id]", + "in": "query", + "description": "Machine name of the region.", + "schema": { + "type": "string" + } + }, + "subscription_id": { + "name": "subscriptionId", + "in": "path", + "description": "The ID of the subscription", + "required": true, + "schema": { + "type": "string" + } + }, + "filter_subscription_id": { + "name": "filter[subscription_id]", + "in": "query", + "description": "The ID of the subscription", + "required": false, + "schema": { + "type": "string" + } + }, + "subscription_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the subscription. ", + "schema": { + "type": "string", + "enum": [ + "active", + "provisioning", + "provisioning failure", + "suspended", + "deleted" + ] + } + }, + "subscription_plan": { + "name": "plan", + "in": "query", + "description": "The plan type of the subscription.", + "schema": { + "type": "string", + "enum": [ + "development", + "standard", + "medium", + "large", + "xlarge", + "2xlarge" + ] + } + }, + "filter_subscription_plan": { + "name": "filter[plan]", + "in": "query", + "description": "The plan type of the subscription.", + "schema": { + "type": "string", + "enum": [ + "development", + "standard", + "medium", + "large", + "xlarge", + "2xlarge" + ] + } + }, + "subscription_environments": { + "name": "environments", + "in": "query", + "description": "The number of environments which can be provisioned on the project.", + "schema": { + "type": "integer", + "default": null + } + }, + "subscription_storage": { + "name": "storage", + "in": "query", + "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values.", + "schema": { + "type": "integer", + "default": null + } + }, + "subscription_user_licenses": { + "name": "user_licenses", + "in": "query", + "description": "The number of user licenses.", + "schema": { + "type": "integer" + } + }, + "page": { + "name": "page", + "in": "query", + "description": "Page to be displayed. Defaults to 1.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "user_id": { + "name": "userId", + "in": "path", + "description": "The UUID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + "filter_ticket_id": { + "name": "filter[ticket_id]", + "in": "query", + "description": "The ID of the ticket.", + "schema": { + "type": "integer" + } + }, + "filter_created": { + "name": "filter[created]", + "in": "query", + "description": "ISO dateformat expected. The time when the support ticket was created.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "filter_updated": { + "name": "filter[updated]", + "in": "query", + "description": "ISO dateformat expected. The time when the support ticket was updated.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "filter_type": { + "name": "filter[type]", + "in": "query", + "description": "The type of the support ticket.", + "schema": { + "type": "string", + "enum": [ + "problem", + "task", + "incident", + "question" + ] + } + }, + "filter_priority": { + "name": "filter[priority]", + "in": "query", + "description": "The priority of the support ticket.", + "schema": { + "type": "string", + "enum": [ + "low", + "normal", + "high", + "urgent" + ] + } + }, + "filter_ticket_status": { + "name": "filter[status]", + "in": "query", + "description": "The status of the support ticket.", + "schema": { + "type": "string", + "enum": [ + "closed", + "deleted", + "hold", + "new", + "open", + "pending", + "solved" + ] + } + }, + "filter_requester_id": { + "name": "filter[requester_id]", + "in": "query", + "description": "UUID of the ticket requester. Converted from the ZID value.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "filter_submitter_id": { + "name": "filter[submitter_id]", + "in": "query", + "description": "UUID of the ticket submitter. Converted from the ZID value.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "filter_assignee_id": { + "name": "filter[assignee_id]", + "in": "query", + "description": "UUID of the ticket assignee. Converted from the ZID value.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + "filter_has_incidents": { + "name": "filter[has_incidents]", + "in": "query", + "description": "Whether or not this ticket has incidents.", + "schema": { + "type": "boolean" + } + }, + "filter_due": { + "name": "filter[due]", + "in": "query", + "description": "ISO dateformat expected. A time that the ticket is due at.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "InvitationID": { + "name": "invitation_id", + "in": "path", + "required": true, + "description": "The ID of the invitation.", + "schema": { + "type": "string" + } + }, + "OrganizationID": { + "name": "organization_id", + "in": "path", + "required": true, + "description": "The ID of the organization.", + "schema": { + "type": "string", + "format": "ulid" + } + }, + "ProjectID": { + "name": "project_id", + "in": "path", + "required": true, + "description": "The ID of the project.", + "schema": { + "type": "string" + } + }, + "TeamID": { + "name": "team_id", + "in": "path", + "required": true, + "description": "The ID of the team.", + "schema": { + "type": "string" + } + }, + "UserID": { + "name": "user_id", + "in": "path", + "required": true, + "description": "The ID of the user.", + "schema": { + "type": "string", + "example": "d81c8ee2-44b3-429f-b944-a33ad7437690", + "format": "uuid" + } + }, + "OrganizationIDName": { + "in": "path", + "name": "organization_id", + "description": "The ID of the organization.
\nPrefix with name= to retrieve the organization by name instead.\n", + "required": true, + "schema": { + "type": "string" + } + }, + "OrderID": { + "in": "path", + "name": "order_id", + "description": "The ID of the order.", + "required": true, + "schema": { + "type": "string" + } + }, + "SubscriptionID": { + "in": "path", + "name": "subscription_id", + "description": "The ID of the subscription.", + "required": true, + "schema": { + "type": "string" + } + }, + "InvoiceID": { + "in": "path", + "name": "invoice_id", + "description": "The ID of the invoice.", + "required": true, + "schema": { + "type": "string" + } + }, + "RegionID": { + "in": "path", + "name": "region_id", + "description": "The ID of the region.", + "required": true, + "schema": { + "type": "string" + } + }, + "project_id": { + "name": "filter[project_id]", + "in": "query", + "description": "Allows filtering by `project_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + "project_title": { + "in": "query", + "name": "filter[project_title]", + "description": "Allows filtering by `project_title` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + "region": { + "in": "query", + "name": "filter[region]", + "description": "Allows filtering by `region` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + "updated_at": { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + "subscription_sort": { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `region`, `project_title`, `type`, `plan`, `status`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + }, + "page_size": { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + "page_before": { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + "page_after": { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + "from": { + "in": "query", + "name": "from", + "description": "The start of the time frame for the query. Inclusive.", + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + "to": { + "in": "query", + "name": "to", + "description": "The end of the time frame for the query. Exclusive.", + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + "interval": { + "in": "query", + "name": "interval", + "description": "The interval by which the query groups the results. of the time frame for the query. Exclusive.", + "schema": { + "type": "string", + "enum": [ + "day", + "month", + "year" + ] + } + } + }, + "securitySchemes": { + "OAuth2": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "tokenUrl": "https://auth.api.platform.sh/oauth2/token", + "refreshUrl": "https://auth.api.platform.sh/oauth2/token", + "scopes": {}, + "authorizationUrl": "https://auth.api.platform.sh/oauth2/authorize" + } + }, + "description": "" + }, + "OAuth2Admin": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://auth.api.platform.sh/oauth2/token", + "refreshUrl": "", + "scopes": { + "admin": "administrative operations" + } + } + }, + "description": "" + } + }, + "responses": {}, + "examples": {} + }, + "x-tagGroups": [ + { + "name": "Organization Administration", + "tags": [ + "Organizations", + "Organization Members", + "Organization Invitations", + "Organization Projects", + "Add-ons" + ] + }, + { + "name": "Project Administration", + "tags": [ + "Project", + "Domain Management", + "Cert Management", + "Project Variables", + "Repository", + "Third-Party Integrations", + "Support" + ] + }, + { + "name": "Environments", + "tags": [ + "Environment", + "Environment Backups", + "Environment Variables", + "Routing", + "Source Operations", + "Runtime Operations", + "Deployment" + ] + }, + { + "name": "User Activity", + "tags": [ + "Project Activity", + "Environment Activity" + ] + }, + { + "name": "Project Access", + "tags": [ + "Project Invitations", + "Teams", + "Team Access", + "User Access" + ] + }, + { + "name": "Account Management", + "tags": [ + "API Tokens", + "Connections", + "MFA", + "Users", + "User Profiles", + "SSH Keys", + "Plans" + ] + }, + { + "name": "Billing", + "tags": [ + "Organization Management", + "Subscriptions", + "Orders", + "Invoices", + "Discounts", + "Vouchers", + "Records", + "Profiles" + ] + }, + { + "name": "Global Info", + "tags": [ + "Project Discovery", + "References", + "Regions" + ] + }, + { + "name": "Internal APIs", + "tags": [ + "Project Settings", + "Environment Settings", + "Deployment Target", + "System Information", + "Container Profile" + ] + } + ] +} \ No newline at end of file diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index cf901cf51..5eab7efa0 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -18,7 +18,6 @@ use Psr\Http\Message\UriFactoryInterface; use Psr\Http\Message\UriInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use function sprintf; @@ -40,7 +39,7 @@ abstract class AbstractApi private readonly UriFactoryInterface $uriFactory; public function __construct( - private readonly OAuthProvider $oauthProvider, + private readonly \Closure $tokenProvider, private ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $baseUri, @@ -64,7 +63,7 @@ public function __construct( */ protected function getAuthorizationHeader(): string { - return $this->oauthProvider->getAuthorization(); + return ($this->tokenProvider)(); } /** @@ -110,7 +109,8 @@ protected function sendAuthenticatedRequest( string $method, string $uri, array $headers = [], - string|StreamInterface|null $body = null + string|StreamInterface|null $body = null, + bool $_retried = false ): ResponseInterface { try { $this->refreshToken(); @@ -118,12 +118,11 @@ protected function sendAuthenticatedRequest( $response = $this->httpClient->sendRequest($request); - // FIX 1: On 401, force token re-acquisition (prefers refresh_token grant) and retry once. - // RFC 6750 §3.1 + RFC 6749 Fig. 2 steps F→G→H. - if ($response->getStatusCode() === 401) { - $this->oauthProvider->forceRefresh(); - $request = $this->createAuthenticatedRequest($method, $uri, $headers, $body); - $response = $this->httpClient->sendRequest($request); + // Change 1+3: On 401, call tokenProvider(true) to force-refresh, then retry once. + // $_retried prevents a second retry if the force-refreshed token is also rejected. + if ($response->getStatusCode() === 401 && !$_retried) { + ($this->tokenProvider)(true); + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body, true); } // Manually check status code @@ -170,7 +169,7 @@ protected function sendAuthenticatedRequest( */ public function refreshToken(): void { - $this->oauthProvider->ensureValidToken(); + ($this->tokenProvider)(); } /** diff --git a/src/Api/AddOnsApi.php b/src/Api/AddOnsApi.php index 9c7349651..3f8b58212 100644 --- a/src/Api/AddOnsApi.php +++ b/src/Api/AddOnsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\OrganizationAddonsObject; use Upsun\Model\UpdateOrgAddonsRequest; @@ -29,7 +28,7 @@ final class AddOnsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/AlertsApi.php b/src/Api/AlertsApi.php index a477fca4c..db69073d6 100644 --- a/src/Api/AlertsApi.php +++ b/src/Api/AlertsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\GetUsageAlerts200Response; use Upsun\Model\UpdateUsageAlertsRequest; @@ -29,7 +28,7 @@ final class AlertsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ApiTokensApi.php b/src/Api/ApiTokensApi.php index 5a7442a67..393e24f56 100644 --- a/src/Api/ApiTokensApi.php +++ b/src/Api/ApiTokensApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ApiToken; use Upsun\Model\CreateApiTokenRequest; @@ -29,7 +28,7 @@ final class ApiTokensApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/AutoscalingApi.php b/src/Api/AutoscalingApi.php index 02b58f8bb..81aa487bf 100644 --- a/src/Api/AutoscalingApi.php +++ b/src/Api/AutoscalingApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AutoscalerSettings; /** @@ -28,7 +27,7 @@ final class AutoscalingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/BlackfireMonitoringApi.php b/src/Api/BlackfireMonitoringApi.php index f0bbe5ac7..90ebd8ba4 100644 --- a/src/Api/BlackfireMonitoringApi.php +++ b/src/Api/BlackfireMonitoringApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level BlackfireMonitoringApi (auto-generated) @@ -28,7 +27,7 @@ final class BlackfireMonitoringApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/BlackfireProfilingApi.php b/src/Api/BlackfireProfilingApi.php index 2c6a75b09..fe33b35f6 100644 --- a/src/Api/BlackfireProfilingApi.php +++ b/src/Api/BlackfireProfilingApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\FilterSelect; /** @@ -29,7 +28,7 @@ final class BlackfireProfilingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/CertManagementApi.php b/src/Api/CertManagementApi.php index 39f97514f..42b3e9810 100644 --- a/src/Api/CertManagementApi.php +++ b/src/Api/CertManagementApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Certificate; use Upsun\Model\CertificateCreateInput; @@ -33,7 +32,7 @@ final class CertManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -41,7 +40,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ConnectionsApi.php b/src/Api/ConnectionsApi.php index 27abdf011..3778d0957 100644 --- a/src/Api/ConnectionsApi.php +++ b/src/Api/ConnectionsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Connection; /** @@ -28,7 +27,7 @@ final class ConnectionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ContinuousProfilingApi.php b/src/Api/ContinuousProfilingApi.php index e1c2926f5..a58ddf6ea 100644 --- a/src/Api/ContinuousProfilingApi.php +++ b/src/Api/ContinuousProfilingApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level ContinuousProfilingApi (auto-generated) @@ -28,7 +27,7 @@ final class ContinuousProfilingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/DefaultApi.php b/src/Api/DefaultApi.php index e544f9343..cb12a2b3a 100644 --- a/src/Api/DefaultApi.php +++ b/src/Api/DefaultApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\DateTimeFilter; use Upsun\Model\ListTickets200Response; use Upsun\Model\OrganizationCarbon; @@ -31,7 +30,7 @@ final class DefaultApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/DeploymentApi.php b/src/Api/DeploymentApi.php index 4077f6990..1370b2f01 100644 --- a/src/Api/DeploymentApi.php +++ b/src/Api/DeploymentApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Deployment; use Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest; @@ -30,7 +29,7 @@ final class DeploymentApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/DeploymentTargetApi.php b/src/Api/DeploymentTargetApi.php index 96b7617be..331535b82 100644 --- a/src/Api/DeploymentTargetApi.php +++ b/src/Api/DeploymentTargetApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DeploymentTarget; use Upsun\Model\DeploymentTargetCreateInput; @@ -31,7 +30,7 @@ final class DeploymentTargetApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/DiffApi.php b/src/Api/DiffApi.php index fb2adaba0..935c74224 100644 --- a/src/Api/DiffApi.php +++ b/src/Api/DiffApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level DiffApi (auto-generated) @@ -27,7 +26,7 @@ final class DiffApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -35,7 +34,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/DiscountsApi.php b/src/Api/DiscountsApi.php index ca90a4114..9ba7b18fb 100644 --- a/src/Api/DiscountsApi.php +++ b/src/Api/DiscountsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Discount; use Upsun\Model\GetTypeAllowance200Response; use Upsun\Model\ListOrgDiscounts200Response; @@ -30,7 +29,7 @@ final class DiscountsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/DomainClaimApi.php b/src/Api/DomainClaimApi.php index 0d6b3d8ac..abfbb79bf 100644 --- a/src/Api/DomainClaimApi.php +++ b/src/Api/DomainClaimApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DomainClaim; @@ -29,7 +28,7 @@ final class DomainClaimApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/DomainManagementApi.php b/src/Api/DomainManagementApi.php index 2976608d4..7164b88e0 100644 --- a/src/Api/DomainManagementApi.php +++ b/src/Api/DomainManagementApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Domain; use Upsun\Model\DomainCreateInput; @@ -31,7 +30,7 @@ final class DomainManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/EntrypointApi.php b/src/Api/EntrypointApi.php index ac47af1cd..6262379e1 100644 --- a/src/Api/EntrypointApi.php +++ b/src/Api/EntrypointApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level EntrypointApi (auto-generated) @@ -27,7 +26,7 @@ final class EntrypointApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -35,7 +34,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/EnvironmentActivityApi.php b/src/Api/EnvironmentActivityApi.php index 6034f23f5..3109e8156 100644 --- a/src/Api/EnvironmentActivityApi.php +++ b/src/Api/EnvironmentActivityApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; @@ -29,7 +28,7 @@ final class EnvironmentActivityApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/EnvironmentApi.php b/src/Api/EnvironmentApi.php index 653a5ad18..9044eb7c4 100644 --- a/src/Api/EnvironmentApi.php +++ b/src/Api/EnvironmentApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Environment; use Upsun\Model\EnvironmentActivateInput; @@ -36,7 +35,7 @@ final class EnvironmentApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -44,7 +43,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/EnvironmentBackupsApi.php b/src/Api/EnvironmentBackupsApi.php index 0109f64ff..f855eb3f4 100644 --- a/src/Api/EnvironmentBackupsApi.php +++ b/src/Api/EnvironmentBackupsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Backup; use Upsun\Model\EnvironmentBackupInput; @@ -31,7 +30,7 @@ final class EnvironmentBackupsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/EnvironmentTypeApi.php b/src/Api/EnvironmentTypeApi.php index b84590fd3..00206e801 100644 --- a/src/Api/EnvironmentTypeApi.php +++ b/src/Api/EnvironmentTypeApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\EnvironmentType; /** @@ -28,7 +27,7 @@ final class EnvironmentTypeApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/EnvironmentVariablesApi.php b/src/Api/EnvironmentVariablesApi.php index 7febd614a..af2511ef7 100644 --- a/src/Api/EnvironmentVariablesApi.php +++ b/src/Api/EnvironmentVariablesApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentVariable; use Upsun\Model\EnvironmentVariableCreateInput; @@ -31,7 +30,7 @@ final class EnvironmentVariablesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/GrantsApi.php b/src/Api/GrantsApi.php index 1a15a12d0..73a6e56e1 100644 --- a/src/Api/GrantsApi.php +++ b/src/Api/GrantsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ListUserExtendedAccess200Response; use Upsun\Model\StringFilter; @@ -30,7 +29,7 @@ final class GrantsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/HttpTrafficApi.php b/src/Api/HttpTrafficApi.php index 19298534f..4da490789 100644 --- a/src/Api/HttpTrafficApi.php +++ b/src/Api/HttpTrafficApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level HttpTrafficApi (auto-generated) @@ -28,7 +27,7 @@ final class HttpTrafficApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/InvoicesApi.php b/src/Api/InvoicesApi.php index 5076fd5a6..846174a75 100644 --- a/src/Api/InvoicesApi.php +++ b/src/Api/InvoicesApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Invoice; use Upsun\Model\ListOrgInvoices200Response; @@ -30,7 +29,7 @@ final class InvoicesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/MfaApi.php b/src/Api/MfaApi.php index cbca2b9e4..319ad5ed9 100644 --- a/src/Api/MfaApi.php +++ b/src/Api/MfaApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ConfirmTotpEnrollment200Response; use Upsun\Model\ConfirmTotpEnrollmentRequest; use Upsun\Model\GetTotpEnrollment200Response; @@ -32,7 +31,7 @@ final class MfaApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -40,7 +39,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/OrdersApi.php b/src/Api/OrdersApi.php index eec215916..bf175f441 100644 --- a/src/Api/OrdersApi.php +++ b/src/Api/OrdersApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CreateAuthorizationCredentials200Response; use Upsun\Model\ListOrgOrders200Response; use Upsun\Model\Order; @@ -31,7 +30,7 @@ final class OrdersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/OrganizationInvitationsApi.php b/src/Api/OrganizationInvitationsApi.php index e631b5151..4a51a1992 100644 --- a/src/Api/OrganizationInvitationsApi.php +++ b/src/Api/OrganizationInvitationsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CreateOrgInviteRequest; use Upsun\Model\OrganizationInvitation; use Upsun\Model\StringFilter; @@ -31,7 +30,7 @@ final class OrganizationInvitationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/OrganizationManagementApi.php b/src/Api/OrganizationManagementApi.php index 5332c55a7..f6dd7c377 100644 --- a/src/Api/OrganizationManagementApi.php +++ b/src/Api/OrganizationManagementApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\GetOrgPrepaymentInfo200Response; use Upsun\Model\ListOrgPrepaymentTransactions200Response; use Upsun\Model\OrganizationAlertConfig; @@ -32,7 +31,7 @@ final class OrganizationManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -40,7 +39,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/OrganizationMembersApi.php b/src/Api/OrganizationMembersApi.php index 9239dd845..6fcc82adf 100644 --- a/src/Api/OrganizationMembersApi.php +++ b/src/Api/OrganizationMembersApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ArrayFilter; use Upsun\Model\CreateOrgMemberRequest; use Upsun\Model\ListOrgMembers200Response; @@ -33,7 +32,7 @@ final class OrganizationMembersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -41,7 +40,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/OrganizationProjectsApi.php b/src/Api/OrganizationProjectsApi.php index 1deb18ffb..42c68b75c 100644 --- a/src/Api/OrganizationProjectsApi.php +++ b/src/Api/OrganizationProjectsApi.php @@ -13,7 +13,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CreateOrgProjectRequest; use Upsun\Model\DateTimeFilter; use Upsun\Model\OrganizationProject; @@ -35,7 +34,7 @@ final class OrganizationProjectsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -43,7 +42,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index d44d6568a..24bd7f889 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ArrayFilter; use Upsun\Model\CreateOrgRequest; use Upsun\Model\DateTimeFilter; @@ -36,7 +35,7 @@ final class OrganizationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -44,7 +43,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/PhoneNumberApi.php b/src/Api/PhoneNumberApi.php index 342021451..b19dafecd 100644 --- a/src/Api/PhoneNumberApi.php +++ b/src/Api/PhoneNumberApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ConfirmPhoneNumberRequest; use Upsun\Model\VerifyPhoneNumber200Response; use Upsun\Model\VerifyPhoneNumberRequest; @@ -30,7 +29,7 @@ final class PhoneNumberApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ProfilesApi.php b/src/Api/ProfilesApi.php index 81d653434..cb6e4bb7f 100644 --- a/src/Api/ProfilesApi.php +++ b/src/Api/ProfilesApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Address; use Upsun\Model\Profile; use Upsun\Model\UpdateOrgProfileRequest; @@ -30,7 +29,7 @@ final class ProfilesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ProjectActivityApi.php b/src/Api/ProjectActivityApi.php index 6c9d7b75c..ddf7a290d 100644 --- a/src/Api/ProjectActivityApi.php +++ b/src/Api/ProjectActivityApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; @@ -29,7 +28,7 @@ final class ProjectActivityApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ProjectApi.php b/src/Api/ProjectApi.php index 2b580f85d..538bf7287 100644 --- a/src/Api/ProjectApi.php +++ b/src/Api/ProjectApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Project; use Upsun\Model\ProjectCapabilities; @@ -30,7 +29,7 @@ final class ProjectApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ProjectInvitationsApi.php b/src/Api/ProjectInvitationsApi.php index b21d0c44d..588578ff3 100644 --- a/src/Api/ProjectInvitationsApi.php +++ b/src/Api/ProjectInvitationsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CreateProjectInviteRequest; use Upsun\Model\ProjectInvitation; use Upsun\Model\StringFilter; @@ -31,7 +30,7 @@ final class ProjectInvitationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ProjectSettingsApi.php b/src/Api/ProjectSettingsApi.php index e5e62e2fc..e02ce7fe0 100644 --- a/src/Api/ProjectSettingsApi.php +++ b/src/Api/ProjectSettingsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\ProjectSettings; use Upsun\Model\ProjectSettingsPatch; @@ -30,7 +29,7 @@ final class ProjectSettingsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ProjectVariablesApi.php b/src/Api/ProjectVariablesApi.php index 4ead8266e..118b315f9 100644 --- a/src/Api/ProjectVariablesApi.php +++ b/src/Api/ProjectVariablesApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\ProjectVariable; use Upsun\Model\ProjectVariableCreateInput; @@ -31,7 +30,7 @@ final class ProjectVariablesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index 625ebbc13..227b08b72 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level ProjectsApi (auto-generated) @@ -27,7 +26,7 @@ final class ProjectsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -35,7 +34,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/RecordsApi.php b/src/Api/RecordsApi.php index e81431c94..3e558d52a 100644 --- a/src/Api/RecordsApi.php +++ b/src/Api/RecordsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ListOrgPlanRecords200Response; use Upsun\Model\ListOrgUsageRecords200Response; @@ -30,7 +29,7 @@ final class RecordsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ReferencesApi.php b/src/Api/ReferencesApi.php index 4eeeea702..c1334cb1b 100644 --- a/src/Api/ReferencesApi.php +++ b/src/Api/ReferencesApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level ReferencesApi (auto-generated) @@ -28,7 +27,7 @@ final class ReferencesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/RegionsApi.php b/src/Api/RegionsApi.php index ae31cde8e..4f2d1c746 100644 --- a/src/Api/RegionsApi.php +++ b/src/Api/RegionsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Region; use Upsun\Model\StringFilter; @@ -30,7 +29,7 @@ final class RegionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/RegistryCredentialApi.php b/src/Api/RegistryCredentialApi.php index 81c6a8674..d1246499a 100644 --- a/src/Api/RegistryCredentialApi.php +++ b/src/Api/RegistryCredentialApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\RegistryCredential; use Upsun\Model\RegistryCredentialCreateInput; @@ -31,7 +30,7 @@ final class RegistryCredentialApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/RepositoryApi.php b/src/Api/RepositoryApi.php index 12572ce58..30f064525 100644 --- a/src/Api/RepositoryApi.php +++ b/src/Api/RepositoryApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Blob; use Upsun\Model\Commit; use Upsun\Model\Ref; @@ -31,7 +30,7 @@ final class RepositoryApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ResourcesApi.php b/src/Api/ResourcesApi.php index 0d7a0e521..f1d331cad 100644 --- a/src/Api/ResourcesApi.php +++ b/src/Api/ResourcesApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; /** * Low level ResourcesApi (auto-generated) @@ -28,7 +27,7 @@ final class ResourcesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/RoutingApi.php b/src/Api/RoutingApi.php index 1ffe87faa..fbd806831 100644 --- a/src/Api/RoutingApi.php +++ b/src/Api/RoutingApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Route; /** @@ -28,7 +27,7 @@ final class RoutingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/RuntimeOperationsApi.php b/src/Api/RuntimeOperationsApi.php index adbb70cae..f5cf65bc3 100644 --- a/src/Api/RuntimeOperationsApi.php +++ b/src/Api/RuntimeOperationsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentOperationInput; @@ -29,7 +28,7 @@ final class RuntimeOperationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/SbomApi.php b/src/Api/SbomApi.php index aadd71a03..f9aa9a5f8 100644 --- a/src/Api/SbomApi.php +++ b/src/Api/SbomApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Sbom; /** @@ -28,7 +27,7 @@ final class SbomApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -36,7 +35,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/SourceOperationsApi.php b/src/Api/SourceOperationsApi.php index 1a8f5521c..caa6ff22c 100644 --- a/src/Api/SourceOperationsApi.php +++ b/src/Api/SourceOperationsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentSourceOperationInput; @@ -29,7 +28,7 @@ final class SourceOperationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/SshKeysApi.php b/src/Api/SshKeysApi.php index 31e4a918c..6508d1b79 100644 --- a/src/Api/SshKeysApi.php +++ b/src/Api/SshKeysApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CreateSshKeyRequest; use Upsun\Model\SshKey; @@ -29,7 +28,7 @@ final class SshKeysApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/SubscriptionsApi.php b/src/Api/SubscriptionsApi.php index 7f5d494bc..23ba19b3b 100644 --- a/src/Api/SubscriptionsApi.php +++ b/src/Api/SubscriptionsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CanAffordSubscriptionRequest; use Upsun\Model\CanCreateNewOrgSubscription200Response; use Upsun\Model\CanUpdateSubscription200Response; @@ -41,7 +40,7 @@ final class SubscriptionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -49,7 +48,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/SupportApi.php b/src/Api/SupportApi.php index a67553109..4010f9150 100644 --- a/src/Api/SupportApi.php +++ b/src/Api/SupportApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CreateTicketRequest; use Upsun\Model\Ticket; use Upsun\Model\UpdateTicketRequest; @@ -31,7 +30,7 @@ final class SupportApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/SystemInformationApi.php b/src/Api/SystemInformationApi.php index 99b292519..1512cadd8 100644 --- a/src/Api/SystemInformationApi.php +++ b/src/Api/SystemInformationApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\SystemInformation; @@ -29,7 +28,7 @@ final class SystemInformationApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/TaskApi.php b/src/Api/TaskApi.php index 52ee72067..ca498c852 100644 --- a/src/Api/TaskApi.php +++ b/src/Api/TaskApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Task; use Upsun\Model\TaskTriggerInput; @@ -30,7 +29,7 @@ final class TaskApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/TeamAccessApi.php b/src/Api/TeamAccessApi.php index c9e9772e9..162b781a1 100644 --- a/src/Api/TeamAccessApi.php +++ b/src/Api/TeamAccessApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\TeamProjectAccess; /** @@ -29,7 +28,7 @@ final class TeamAccessApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/TeamsApi.php b/src/Api/TeamsApi.php index 98b8489c3..3eb6c99a1 100644 --- a/src/Api/TeamsApi.php +++ b/src/Api/TeamsApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CreateTeamMemberRequest; use Upsun\Model\CreateTeamRequest; use Upsun\Model\DateTimeFilter; @@ -37,7 +36,7 @@ final class TeamsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -45,7 +44,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/ThirdPartyIntegrationsApi.php b/src/Api/ThirdPartyIntegrationsApi.php index 8119bce6a..b98262644 100644 --- a/src/Api/ThirdPartyIntegrationsApi.php +++ b/src/Api/ThirdPartyIntegrationsApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Integration; use Upsun\Model\IntegrationCreateCreateInput; @@ -31,7 +30,7 @@ final class ThirdPartyIntegrationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -39,7 +38,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/UserAccessApi.php b/src/Api/UserAccessApi.php index dbd7e92dd..6378f9c79 100644 --- a/src/Api/UserAccessApi.php +++ b/src/Api/UserAccessApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\UpdateProjectUserAccessRequest; use Upsun\Model\UserProjectAccess; @@ -30,7 +29,7 @@ final class UserAccessApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -38,7 +37,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/UserProfilesApi.php b/src/Api/UserProfilesApi.php index ee0fb558d..51244959f 100644 --- a/src/Api/UserProfilesApi.php +++ b/src/Api/UserProfilesApi.php @@ -12,7 +12,6 @@ use Psr\Http\Message\StreamFactoryInterface; use SplFileObject; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\Address; use Upsun\Model\CreateProfilePicture200Response; use Upsun\Model\ListProfiles200Response; @@ -33,7 +32,7 @@ final class UserProfilesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -41,7 +40,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/UsersApi.php b/src/Api/UsersApi.php index 2297d1f18..0ad52076a 100644 --- a/src/Api/UsersApi.php +++ b/src/Api/UsersApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\CurrentUser; use Upsun\Model\GetCurrentUserVerificationStatus200Response; use Upsun\Model\GetCurrentUserVerificationStatusFull200Response; @@ -33,7 +32,7 @@ final class UsersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -41,7 +40,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Api/VouchersApi.php b/src/Api/VouchersApi.php index 28bf7e196..026bb0c87 100644 --- a/src/Api/VouchersApi.php +++ b/src/Api/VouchersApi.php @@ -11,7 +11,6 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; -use Upsun\Core\OAuthProvider; use Upsun\Model\ApplyOrgVoucherRequest; use Upsun\Model\Vouchers; @@ -29,7 +28,7 @@ final class VouchersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -37,7 +36,7 @@ public function __construct( ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index f8a229716..e949e0d01 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -28,8 +28,14 @@ class OAuthProvider private ?string $typeToken = null; private int $tokenExpiry = 0; - /** Re-entrance guard — prevents recursive acquisition in PHP Fiber contexts (FIX 5). */ - private bool $acquiringToken = false; + /** + * Fiber-based thundering-herd guard (Change 2). + * When non-null, a Fiber is already acquiring a token; other Fibers suspend until it finishes. + * In synchronous (FPM) contexts Fiber::getCurrent() returns null, so this is always null. + * + * @var \Fiber|null + */ + private ?\Fiber $acquiringFiber = null; /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ private readonly string $effectiveRefreshEndpoint; @@ -164,11 +170,10 @@ private function storeTokenData(array $data): void /** * Forces unconditional token re-acquisition, bypassing the expiry check. - * Called by the 401 retry middleware (RFC 6750 §3.1) (FIX 1 prerequisite). + * Called by the 401 retry path (RFC 6750 §3.1) (FIX 1 prerequisite). * * - Clears accessToken and tokenExpiry so ensureValidToken() triggers re-acquisition. * - Does NOT clear refreshToken — the next ensureValidToken() call will prefer it. - * - Does NOT reset acquiringToken — avoids restarting an already in-flight acquisition. * * @throws Exception */ @@ -181,28 +186,34 @@ public function forceRefresh(): void /** * Ensures a valid token is available, with a 120 s proactive buffer (FIX 3). - * Re-entrance guard prevents recursive acquisition in PHP Fiber contexts (FIX 5). + * Uses a Fiber-based thundering-herd guard (Change 2): + * - In Fiber contexts, concurrent callers suspend until the first acquisition completes. + * - In synchronous (FPM) contexts, Fiber::getCurrent() is null and the guard is a no-op. * * @throws Exception */ public function ensureValidToken(): void { $buffer = 120; + if ($this->accessToken && time() <= ($this->tokenExpiry - $buffer)) { + return; // fast path — token is still valid + } - if (!$this->accessToken || time() > ($this->tokenExpiry - $buffer)) { - // Re-entrance guard: if acquisition is already in progress (e.g., from a Fiber), - // return immediately rather than triggering a second concurrent request. - // For multi-process FPM thundering-herd, an external lock (APCu/Redis) is required. - if ($this->acquiringToken) { - return; + if ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + // Another Fiber is already acquiring — suspend until it finishes, + // then the token will be valid. In FPM/sync contexts this branch is + // never taken because acquiringFiber is always null. + while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + \Fiber::getCurrent()?->suspend(); } + return; + } - $this->acquiringToken = true; - try { - $this->doAcquireToken(); - } finally { - $this->acquiringToken = false; - } + $this->acquiringFiber = \Fiber::getCurrent(); // null in sync (FPM) context + try { + $this->doAcquireToken(); + } finally { + $this->acquiringFiber = null; } } diff --git a/src/UpsunClient.php b/src/UpsunClient.php index da1eb9427..22e266f78 100644 --- a/src/UpsunClient.php +++ b/src/UpsunClient.php @@ -93,7 +93,9 @@ class UpsunClient public ApiConfiguration $apiConfig; - public OAuthProvider $auth; + public ?OAuthProvider $auth = null; + + private ?string $bearerToken = null; public ?string $userId = null; @@ -156,16 +158,25 @@ public function __construct(protected UpsunConfig $upsunConfig, ?ClientInterface $requestFactory = Psr17FactoryDiscovery::findRequestFactory(); - $this->auth = new OAuthProvider( - httpClient: $this->apiClient, - requestFactory: $requestFactory, - tokenEndpoint: $this->upsunConfig->auth_url . "/" . $this->upsunConfig->token_endpoint, - clientId: $this->upsunConfig->clientId, - clientSecret: $this->upsunConfig->apiToken, - refreshEndpoint: $this->upsunConfig->auth_url . "/" . $this->upsunConfig->refresh_endpoint, - ); + if ($upsunConfig->apiToken !== '') { + $this->auth = new OAuthProvider( + httpClient: $this->apiClient, + requestFactory: $requestFactory, + tokenEndpoint: $this->upsunConfig->auth_url . '/' . $this->upsunConfig->token_endpoint, + clientId: $this->upsunConfig->clientId, + clientSecret: $this->upsunConfig->apiToken, + refreshEndpoint: $this->upsunConfig->auth_url . '/' . $this->upsunConfig->refresh_endpoint, + ); + } + + $tokenProvider = function (bool $force = false): string { + if ($force && $this->auth !== null) { + $this->auth->forceRefresh(); + } + return $this->getToken(); + }; - $taskParams = [$this->auth, $this->apiClient, $requestFactory, $this->apiConfig]; + $taskParams = [$tokenProvider, $this->apiClient, $requestFactory, $this->apiConfig]; // Init used API classes $addOnsApi = new AddOnsApi(...$taskParams); @@ -359,8 +370,21 @@ private function discoverHttpClient(): ClientInterface } } + public function setBearerToken(string $token): void + { + $this->bearerToken = $token; + } + public function getToken(): string { - return $this->upsunConfig->apiToken; + if ($this->auth !== null) { + return $this->auth->getAuthorization(); + } + if ($this->bearerToken !== null) { + return 'Bearer ' . $this->bearerToken; + } + throw new RuntimeException( + 'No authentication method available. Provide an API key via UpsunConfig or call setBearerToken().' + ); } } diff --git a/templates/php/abstract_api.mustache b/templates/php/abstract_api.mustache index 0d243f712..7ed5bd191 100644 --- a/templates/php/abstract_api.mustache +++ b/templates/php/abstract_api.mustache @@ -10,7 +10,6 @@ use Http\Client\Common\PluginClientFactory; use Http\Discovery\Psr17FactoryDiscovery; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Message\StreamFactoryInterface; -use {{invokerPackage}}\Core\OAuthProvider; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; @@ -37,7 +36,7 @@ abstract class AbstractApi private readonly UriFactoryInterface $uriFactory; public function __construct( - private readonly OAuthProvider $oauthProvider, + private readonly \Closure $tokenProvider, private ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $baseUri, @@ -61,7 +60,7 @@ abstract class AbstractApi */ protected function getAuthorizationHeader(): string { - return $this->oauthProvider->getAuthorization(); + return ($this->tokenProvider)(); } /** @@ -107,7 +106,8 @@ abstract class AbstractApi string $method, string $uri, array $headers = [], - string|StreamInterface|null $body = null + string|StreamInterface|null $body = null, + bool $_retried = false ): ResponseInterface { try { $this->refreshToken(); @@ -115,12 +115,11 @@ abstract class AbstractApi $response = $this->httpClient->sendRequest($request); - // FIX 1: On 401, force token re-acquisition (prefers refresh_token grant) and retry once. - // RFC 6750 §3.1 + RFC 6749 Fig. 2 steps F→G→H. - if ($response->getStatusCode() === 401) { - $this->oauthProvider->forceRefresh(); - $request = $this->createAuthenticatedRequest($method, $uri, $headers, $body); - $response = $this->httpClient->sendRequest($request); + // Change 1+3: On 401, call tokenProvider(true) to force-refresh, then retry once. + // $_retried prevents a second retry if the force-refreshed token is also rejected. + if ($response->getStatusCode() === 401 && !$_retried) { + ($this->tokenProvider)(true); + return $this->sendAuthenticatedRequest($method, $uri, $headers, $body, true); } // Manually check status code @@ -167,7 +166,7 @@ abstract class AbstractApi */ public function refreshToken(): void { - $this->oauthProvider->ensureValidToken(); + ($this->tokenProvider)(); } /** diff --git a/templates/php/libraries/psr-18/api.mustache b/templates/php/libraries/psr-18/api.mustache index f611fe818..9416ddf30 100644 --- a/templates/php/libraries/psr-18/api.mustache +++ b/templates/php/libraries/psr-18/api.mustache @@ -12,7 +12,6 @@ use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use {{apiPackage}}\Serializer\ObjectSerializer; -use {{invokerPackage}}\Core\OAuthProvider; /** * Low level {{classname}} (auto-generated) @@ -25,7 +24,7 @@ use {{invokerPackage}}\Core\OAuthProvider; private ApiConfiguration $config; public function __construct( - OAuthProvider $oauthProvider, + \Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, @@ -33,7 +32,7 @@ use {{invokerPackage}}\Core\OAuthProvider; ?ApiHeaderSelector $selector = null, ) { parent::__construct( - $oauthProvider, + $tokenProvider, $httpClient, $requestFactory, AbstractApi::BASE_PATH, diff --git a/templates/php/oauth_provider.mustache b/templates/php/oauth_provider.mustache index 5b53df7fb..84e339009 100644 --- a/templates/php/oauth_provider.mustache +++ b/templates/php/oauth_provider.mustache @@ -25,8 +25,14 @@ class OAuthProvider private ?string $typeToken = null; private int $tokenExpiry = 0; - /** Re-entrance guard — prevents recursive acquisition in PHP Fiber contexts (FIX 5). */ - private bool $acquiringToken = false; + /** + * Fiber-based thundering-herd guard (Change 2). + * When non-null, a Fiber is already acquiring a token; other Fibers suspend until it finishes. + * In synchronous (FPM) contexts Fiber::getCurrent() returns null, so this is always null. + * + * @var \Fiber|null + */ + private ?\Fiber $acquiringFiber = null; /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ private readonly string $effectiveRefreshEndpoint; @@ -167,11 +173,10 @@ class OAuthProvider /** * Forces unconditional token re-acquisition, bypassing the expiry check. - * Called by the 401 retry middleware (RFC 6750 §3.1) (FIX 1 prerequisite). + * Called by the 401 retry path (RFC 6750 §3.1) (FIX 1 prerequisite). * * - Clears accessToken and tokenExpiry so ensureValidToken() triggers re-acquisition. * - Does NOT clear refreshToken — the next ensureValidToken() call will prefer it. - * - Does NOT reset acquiringToken — avoids restarting an already in-flight acquisition. * * @throws Exception */ @@ -184,28 +189,34 @@ class OAuthProvider /** * Ensures a valid token is available, with a 120 s proactive buffer (FIX 3). - * Re-entrance guard prevents recursive acquisition in PHP Fiber contexts (FIX 5). + * Uses a Fiber-based thundering-herd guard (Change 2): + * - In Fiber contexts, concurrent callers suspend until the first acquisition completes. + * - In synchronous (FPM) contexts, Fiber::getCurrent() is null and the guard is a no-op. * * @throws Exception */ public function ensureValidToken(): void { $buffer = 120; + if ($this->accessToken && time() <= ($this->tokenExpiry - $buffer)) { + return; // fast path — token is still valid + } - if (!$this->accessToken || time() > ($this->tokenExpiry - $buffer)) { - // Re-entrance guard: if acquisition is already in progress (e.g., from a Fiber), - // return immediately rather than triggering a second concurrent request. - // For multi-process FPM thundering-herd, an external lock (APCu/Redis) is required. - if ($this->acquiringToken) { - return; + if ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + // Another Fiber is already acquiring — suspend until it finishes, + // then the token will be valid. In FPM/sync contexts this branch is + // never taken because acquiringFiber is always null. + while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { + \Fiber::getCurrent()?->suspend(); } + return; + } - $this->acquiringToken = true; - try { - $this->doAcquireToken(); - } finally { - $this->acquiringToken = false; - } + $this->acquiringFiber = \Fiber::getCurrent(); // null in sync (FPM) context + try { + $this->doAcquireToken(); + } finally { + $this->acquiringFiber = null; } } diff --git a/tests/Api/AbstractApiTest.php b/tests/Api/AbstractApiTest.php index db203e779..809ada4ac 100644 --- a/tests/Api/AbstractApiTest.php +++ b/tests/Api/AbstractApiTest.php @@ -13,7 +13,6 @@ use Psr\Http\Message\StreamInterface; use Upsun\Api\AbstractApi; use Upsun\Api\ApiException; -use Upsun\Core\OAuthProvider; /** * Test suite for AbstractApi — focuses on sendAuthenticatedRequest() logic (FIX 1: 401 retry). @@ -30,24 +29,29 @@ class AbstractApiTest extends TestCase /** @var ClientInterface&\PHPUnit\Framework\MockObject\MockObject */ private ClientInterface $httpClient; - /** @var OAuthProvider&\PHPUnit\Framework\MockObject\MockObject */ - private OAuthProvider $oauthProvider; + private int $tokenCallCount = 0; + private int $forceRefreshCount = 0; private Psr17Factory $psr17Factory; protected function setUp(): void { - $this->httpClient = $this->createMock(ClientInterface::class); - $this->oauthProvider = $this->createMock(OAuthProvider::class); - $this->psr17Factory = new Psr17Factory(); - - // Stub getAuthorization() so createAuthenticatedRequest() never hits the network - $this->oauthProvider - ->method('getAuthorization') - ->willReturn('Bearer test-token'); + $this->httpClient = $this->createMock(ClientInterface::class); + $this->psr17Factory = new Psr17Factory(); + $this->tokenCallCount = 0; + $this->forceRefreshCount = 0; + + // Closure-based tokenProvider: tracks call count and force-refresh requests. + $tokenProvider = function (bool $force = false): string { + $this->tokenCallCount++; + if ($force) { + $this->forceRefreshCount++; + } + return 'Bearer test-token'; + }; $this->api = new class ( - $this->oauthProvider, + $tokenProvider, $this->httpClient, $this->psr17Factory, 'https://api.upsun.com', @@ -115,13 +119,10 @@ public function testSendAuthenticatedRequestRetries401WithForceRefresh(): void new Response(200, ['Content-Type' => 'application/json'], '{"ok":true}'), ); - $this->oauthProvider - ->expects($this->once()) - ->method('forceRefresh'); - $response = $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); $this->assertSame(200, $response->getStatusCode()); + $this->assertSame(1, $this->forceRefreshCount, 'tokenProvider(force=true) should be called once on 401'); } /** @@ -139,13 +140,14 @@ public function testSendAuthenticatedRequestThrowsApiExceptionIfRetryAlso401(): new Response(401, [], 'Unauthorized'), ); - $this->oauthProvider - ->expects($this->once()) - ->method('forceRefresh'); - - $this->expectException(ApiException::class); + try { + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->fail('Expected ApiException was not thrown'); + } catch (ApiException) { + // expected — $_retried guard prevents a second forceRefresh on the already-retried call + } - $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->assertSame(1, $this->forceRefreshCount, '$_retried guard: tokenProvider(force=true) called exactly once even on double-401'); } /** @@ -160,13 +162,14 @@ public function testSendAuthenticatedRequestThrowsApiExceptionOn403WithoutRetry( ->method('sendRequest') ->willReturn(new Response(403, [], 'Forbidden')); - $this->oauthProvider - ->expects($this->never()) - ->method('forceRefresh'); + try { + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->fail('Expected ApiException was not thrown'); + } catch (ApiException) { + // expected + } - $this->expectException(ApiException::class); - - $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->assertSame(0, $this->forceRefreshCount, 'tokenProvider(force=true) should never be called for a 403'); } /** @@ -181,13 +184,14 @@ public function testSendAuthenticatedRequestThrowsApiExceptionOn500WithoutRetry( ->method('sendRequest') ->willReturn(new Response(500, [], 'Internal Server Error')); - $this->oauthProvider - ->expects($this->never()) - ->method('forceRefresh'); - - $this->expectException(ApiException::class); + try { + $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->fail('Expected ApiException was not thrown'); + } catch (ApiException) { + // expected + } - $this->api->callSendAuthenticatedRequest('GET', '/v1/organizations'); + $this->assertSame(0, $this->forceRefreshCount, 'tokenProvider(force=true) should never be called for a 500'); } /** @@ -238,11 +242,9 @@ public function testSendAuthenticatedRequestSetsAuthorizationHeader(): void */ public function testRefreshTokenCallsEnsureValidToken(): void { - $this->oauthProvider - ->expects($this->once()) - ->method('ensureValidToken'); - $this->api->callRefreshToken(); + + $this->assertSame(1, $this->tokenCallCount, 'refreshToken() should invoke the tokenProvider closure once'); } /** diff --git a/tests/Core/OAuthProviderTest.php b/tests/Core/OAuthProviderTest.php index 75972728a..b382dd9fb 100644 --- a/tests/Core/OAuthProviderTest.php +++ b/tests/Core/OAuthProviderTest.php @@ -553,24 +553,45 @@ public function testForceRefreshPrefersRefreshTokenIfAvailable(): void } /** - * FIX 5 — Re-entrance guard: while acquiringToken=true, ensureValidToken() is a no-op. + * Change 2 — Fiber-based thundering-herd guard: concurrent Fiber callers only trigger + * one HTTP acquisition. The second Fiber suspends until the first finishes. * * @throws Exception */ - public function testReEntranceGuardPreventsDoubleAcquisition(): void + public function testFiberGuardPreventsDoubleAcquisitionUnderConcurrency(): void { - // Simulate being mid-acquisition by setting the flag via reflection - $reflection = new \ReflectionClass($this->oauthProvider); - $prop = $reflection->getProperty('acquiringToken'); - $prop->setAccessible(true); - $prop->setValue($this->oauthProvider, true); + $httpCallCount = 0; + $tokenResponse = json_encode([ + 'access_token' => 'fiber-token', + 'expires_in' => 3600, + ]); - // No HTTP call should be triggered since acquisition is already in progress $this->httpClient - ->expects($this->never()) - ->method('sendRequest'); + ->method('sendRequest') + ->willReturnCallback(function () use (&$httpCallCount, $tokenResponse) { + $httpCallCount++; + \Fiber::getCurrent()?->suspend(); // simulate async I/O suspending the Fiber + return new Response(200, ['Content-Type' => 'application/json'], $tokenResponse); + }); - $this->oauthProvider->ensureValidToken(); + $provider = $this->oauthProvider; + + $fiber1 = new \Fiber(fn () => $provider->ensureValidToken()); + $fiber2 = new \Fiber(fn () => $provider->ensureValidToken()); + + // Fiber1 starts acquiring and suspends mid-HTTP call + $fiber1->start(); + // Fiber2 detects Fiber1 is acquiring; suspends in the while-loop guard + $fiber2->start(); + + // Fiber1 resumes: HTTP call returns, token stored, acquiringFiber cleared + $fiber1->resume(); + // Fiber2 resumes: while-loop sees acquiringFiber=null, exits, returns without HTTP call + $fiber2->resume(); + + $this->assertTrue($fiber1->isTerminated()); + $this->assertTrue($fiber2->isTerminated()); + $this->assertSame(1, $httpCallCount, 'Fiber guard: only one HTTP call should be made under concurrent access'); } /** @@ -846,8 +867,11 @@ public function testStoreTokenDataPersistsRefreshToken(): void $this->assertStringContainsString('grant_type=refresh_token', $body); $this->assertStringContainsString('refresh_token=persisted-refresh-token', $body); } - return new Response(200, ['Content-Type' => 'application/json'], - $callCount === 1 ? $initialResponse : $refreshResponse); + return new Response( + 200, + ['Content-Type' => 'application/json'], + $callCount === 1 ? $initialResponse : $refreshResponse + ); }); $this->oauthProvider->exchangeCodeForToken(); diff --git a/tests/Core/Tasks/ActivitiesTaskTest.php b/tests/Core/Tasks/ActivitiesTaskTest.php index 16d639aad..bc87863e4 100644 --- a/tests/Core/Tasks/ActivitiesTaskTest.php +++ b/tests/Core/Tasks/ActivitiesTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\ApiException; use Upsun\Api\EnvironmentActivityApi; use Upsun\Api\ProjectActivityApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ActivitiesTask; use Upsun\UpsunClient; @@ -30,7 +29,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ApplicationsTaskTest.php b/tests/Core/Tasks/ApplicationsTaskTest.php index 26f0350a1..c0f3434e1 100644 --- a/tests/Core/Tasks/ApplicationsTaskTest.php +++ b/tests/Core/Tasks/ApplicationsTaskTest.php @@ -9,7 +9,6 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ApplicationsTask; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\UpsunClient; @@ -31,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/BackupsTaskTest.php b/tests/Core/Tasks/BackupsTaskTest.php index 604dfc502..37a7a5476 100644 --- a/tests/Core/Tasks/BackupsTaskTest.php +++ b/tests/Core/Tasks/BackupsTaskTest.php @@ -9,7 +9,6 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\EnvironmentBackupsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\BackupsTask; use Upsun\Model\AcceptedResponse; use Upsun\Model\Backup; @@ -31,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/BaseTestCase.php b/tests/Core/Tasks/BaseTestCase.php index 8af529c41..9fa92c2c2 100644 --- a/tests/Core/Tasks/BaseTestCase.php +++ b/tests/Core/Tasks/BaseTestCase.php @@ -11,7 +11,6 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; -use Upsun\Core\OAuthProvider; abstract class BaseTestCase extends TestCase { @@ -94,7 +93,7 @@ protected function assertObjectMatchesArray(array $actual, array $expected, stri /** * Create standard API class parameters for testing. - * Returns array: [OAuthProvider, ClientInterface, Psr17Factory, ApiConfiguration] + * Returns array: [\Closure tokenProvider, ClientInterface, Psr17Factory, ApiConfiguration] * * @param ClientInterface|null $httpClient Optional HTTP client mock to use * @return array @@ -106,7 +105,7 @@ protected function createApiClassParams(?ClientInterface $httpClient = null): ar } return [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/CertificatesTaskTest.php b/tests/Core/Tasks/CertificatesTaskTest.php index 2375d99fb..4f7a99663 100644 --- a/tests/Core/Tasks/CertificatesTaskTest.php +++ b/tests/Core/Tasks/CertificatesTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\CertManagementApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\CertificatesTask; use Upsun\Model\AcceptedResponse; use Upsun\Model\Certificate; @@ -32,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/DomainsTaskTest.php b/tests/Core/Tasks/DomainsTaskTest.php index 3f01dfb26..fdf1dae9e 100644 --- a/tests/Core/Tasks/DomainsTaskTest.php +++ b/tests/Core/Tasks/DomainsTaskTest.php @@ -9,7 +9,6 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\DomainManagementApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\DomainsTask; use Upsun\Model\AcceptedResponse; use Upsun\Model\DomainPatch; @@ -36,7 +35,7 @@ class_exists(ReplacementDomainStorage::class); $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/EnvironmentsTaskTest.php b/tests/Core/Tasks/EnvironmentsTaskTest.php index 9d298d77f..a13a95d0f 100644 --- a/tests/Core/Tasks/EnvironmentsTaskTest.php +++ b/tests/Core/Tasks/EnvironmentsTaskTest.php @@ -20,7 +20,6 @@ use Upsun\Api\ProjectVariablesApi; use Upsun\Api\RoutingApi; use Upsun\Api\SourceOperationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ActivitiesTask; use Upsun\Core\Tasks\BackupsTask; use Upsun\Core\Tasks\DomainsTask; @@ -59,7 +58,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/IntegrationsTaskTest.php b/tests/Core/Tasks/IntegrationsTaskTest.php index 8336ba4d4..ae56d0c20 100644 --- a/tests/Core/Tasks/IntegrationsTaskTest.php +++ b/tests/Core/Tasks/IntegrationsTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\ThirdPartyIntegrationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\IntegrationsTask; use Upsun\Model\AcceptedResponse; use Upsun\Model\GitHubIntegrationCreateInput; @@ -33,7 +32,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/InvitationsTaskTest.php b/tests/Core/Tasks/InvitationsTaskTest.php index bf6ac248c..0c7bf8c47 100644 --- a/tests/Core/Tasks/InvitationsTaskTest.php +++ b/tests/Core/Tasks/InvitationsTaskTest.php @@ -11,7 +11,6 @@ use Upsun\Api\ApiException; use Upsun\Api\OrganizationInvitationsApi; use Upsun\Api\ProjectInvitationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\UsersInvitationsTask; use Upsun\Model\OrganizationInvitation; use Upsun\Model\ProjectInvitation; @@ -36,7 +35,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/MountsTaskTest.php b/tests/Core/Tasks/MountsTaskTest.php index d0b0d7673..cf6f05b36 100644 --- a/tests/Core/Tasks/MountsTaskTest.php +++ b/tests/Core/Tasks/MountsTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\MountsTask; use Upsun\UpsunClient; @@ -32,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/OperationsTaskTest.php b/tests/Core/Tasks/OperationsTaskTest.php index ce9f80529..44e80e742 100644 --- a/tests/Core/Tasks/OperationsTaskTest.php +++ b/tests/Core/Tasks/OperationsTaskTest.php @@ -9,7 +9,6 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\RuntimeOperationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\OperationsTask; use Upsun\Model\AcceptedResponse; use Upsun\UpsunClient; @@ -30,7 +29,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/OrganizationsTaskTest.php b/tests/Core/Tasks/OrganizationsTaskTest.php index 05eacee9d..959e8cdfc 100644 --- a/tests/Core/Tasks/OrganizationsTaskTest.php +++ b/tests/Core/Tasks/OrganizationsTaskTest.php @@ -31,7 +31,6 @@ use Upsun\Api\UserProfilesApi; use Upsun\Api\UsersApi; use Upsun\Api\VouchersApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\OrganizationsTask; use Upsun\Core\Tasks\ProjectsTask; use Upsun\Core\Tasks\TeamsTask; @@ -78,7 +77,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ProjectsTaskTest.php b/tests/Core/Tasks/ProjectsTaskTest.php index 4b43f74d3..adb432966 100644 --- a/tests/Core/Tasks/ProjectsTaskTest.php +++ b/tests/Core/Tasks/ProjectsTaskTest.php @@ -54,7 +54,6 @@ use Upsun\Api\UserProfilesApi; use Upsun\Api\UsersApi; use Upsun\Api\VouchersApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ActivitiesTask; use Upsun\Core\Tasks\ApplicationsTask; use Upsun\Core\Tasks\BackupsTask; @@ -112,7 +111,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RegionsTaskTest.php b/tests/Core/Tasks/RegionsTaskTest.php index 60310ee8c..bbaeca730 100644 --- a/tests/Core/Tasks/RegionsTaskTest.php +++ b/tests/Core/Tasks/RegionsTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\RegionsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\RegionsTask; use Upsun\Model\Region; use Upsun\UpsunClient; @@ -31,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RepositoriesTaskTest.php b/tests/Core/Tasks/RepositoriesTaskTest.php index 796d15410..2356551a7 100644 --- a/tests/Core/Tasks/RepositoriesTaskTest.php +++ b/tests/Core/Tasks/RepositoriesTaskTest.php @@ -11,7 +11,6 @@ use Upsun\Api\ApiException; use Upsun\Api\RepositoryApi; use Upsun\Api\SystemInformationApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\RepositoriesTask; use Upsun\Model\Blob; use Upsun\Model\Commit; @@ -36,7 +35,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ResourcesTaskTest.php b/tests/Core/Tasks/ResourcesTaskTest.php index 34bcd1ebd..f6367acd6 100644 --- a/tests/Core/Tasks/ResourcesTaskTest.php +++ b/tests/Core/Tasks/ResourcesTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\ApiException; use Upsun\Api\AutoscalingApi; use Upsun\Api\DeploymentApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ResourcesTask; use Upsun\Model\AcceptedResponse; use Upsun\UpsunClient; @@ -31,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RoutesTaskTest.php b/tests/Core/Tasks/RoutesTaskTest.php index 290aefae0..11548ccfc 100644 --- a/tests/Core/Tasks/RoutesTaskTest.php +++ b/tests/Core/Tasks/RoutesTaskTest.php @@ -9,7 +9,6 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\RoutingApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\RoutesTask; use Upsun\Model\Route; use Upsun\UpsunClient; @@ -30,7 +29,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ServicesTaskTest.php b/tests/Core/Tasks/ServicesTaskTest.php index b3f5b3b36..2b87c8695 100644 --- a/tests/Core/Tasks/ServicesTaskTest.php +++ b/tests/Core/Tasks/ServicesTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\ServicesTask; use Upsun\Model\ServicesValue; @@ -34,7 +33,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SourceOperationsTaskTest.php b/tests/Core/Tasks/SourceOperationsTaskTest.php index 594dc0a21..f1d421841 100644 --- a/tests/Core/Tasks/SourceOperationsTaskTest.php +++ b/tests/Core/Tasks/SourceOperationsTaskTest.php @@ -9,7 +9,6 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\SourceOperationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\SourceOperationsTask; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentSourceOperation; @@ -31,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SshTaskTest.php b/tests/Core/Tasks/SshTaskTest.php index 9142228d3..d4c96314a 100644 --- a/tests/Core/Tasks/SshTaskTest.php +++ b/tests/Core/Tasks/SshTaskTest.php @@ -10,7 +10,6 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; use Upsun\Api\SshKeysApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\SshTask; use Upsun\Model\SshKey; use Upsun\UpsunClient; @@ -31,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SupportTicketsTaskTest.php b/tests/Core/Tasks/SupportTicketsTaskTest.php index 8877bdf56..041bcb6f3 100644 --- a/tests/Core/Tasks/SupportTicketsTaskTest.php +++ b/tests/Core/Tasks/SupportTicketsTaskTest.php @@ -19,7 +19,6 @@ use Upsun\Api\SupportApi; use Upsun\Api\SystemInformationApi; use Upsun\Api\ThirdPartyIntegrationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\ProjectsTask; use Upsun\Core\Tasks\SupportTicketsTask; use Upsun\Model\ListTicketCategories200ResponseInner; @@ -44,7 +43,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/TeamsTaskTest.php b/tests/Core/Tasks/TeamsTaskTest.php index b160fe688..02fc411eb 100644 --- a/tests/Core/Tasks/TeamsTaskTest.php +++ b/tests/Core/Tasks/TeamsTaskTest.php @@ -11,7 +11,6 @@ use Upsun\Api\ApiException; use Upsun\Api\TeamAccessApi; use Upsun\Api\TeamsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\TeamsTask; use Upsun\Model\{ListProjectTeamAccess200Response, ListTeamMembers200Response, @@ -36,7 +35,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/UsersInvitationsTaskTest.php b/tests/Core/Tasks/UsersInvitationsTaskTest.php index 955eb4484..7bff8bb92 100644 --- a/tests/Core/Tasks/UsersInvitationsTaskTest.php +++ b/tests/Core/Tasks/UsersInvitationsTaskTest.php @@ -11,7 +11,6 @@ use Upsun\Api\ApiException; use Upsun\Api\OrganizationInvitationsApi; use Upsun\Api\ProjectInvitationsApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\UsersInvitationsTask; use Upsun\Model\OrganizationInvitation; use Upsun\Model\ProjectInvitation; @@ -33,7 +32,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/UsersTaskTest.php b/tests/Core/Tasks/UsersTaskTest.php index 78e127e5b..a9be83a97 100644 --- a/tests/Core/Tasks/UsersTaskTest.php +++ b/tests/Core/Tasks/UsersTaskTest.php @@ -18,7 +18,6 @@ use Upsun\Api\UserAccessApi; use Upsun\Api\UserProfilesApi; use Upsun\Api\UsersApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\UsersTask; use Upsun\Model\ApiToken; use Upsun\Model\ConfirmTotpEnrollment200Response; @@ -53,7 +52,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/VariablesTaskTest.php b/tests/Core/Tasks/VariablesTaskTest.php index 10a2862b7..8e6154f49 100644 --- a/tests/Core/Tasks/VariablesTaskTest.php +++ b/tests/Core/Tasks/VariablesTaskTest.php @@ -11,7 +11,6 @@ use Upsun\Api\ApiException; use Upsun\Api\EnvironmentVariablesApi; use Upsun\Api\ProjectVariablesApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\VariablesTask; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentVariable; @@ -34,7 +33,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/WorkersTaskTest.php b/tests/Core/Tasks/WorkersTaskTest.php index 814d170b3..e5e1b000d 100644 --- a/tests/Core/Tasks/WorkersTaskTest.php +++ b/tests/Core/Tasks/WorkersTaskTest.php @@ -13,7 +13,6 @@ use Upsun\Api\DeploymentApi; use Upsun\Api\EnvironmentApi; use Upsun\Api\EnvironmentTypeApi; -use Upsun\Core\OAuthProvider; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\WorkersTask; use Upsun\Model\WorkersValue; @@ -35,7 +34,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() @@ -51,7 +50,7 @@ protected function setUp(): void $upsunClient->environments = $environmentsTask; $apiClassParams = [ - $this->createMock(OAuthProvider::class), + static fn (bool $force = false): string => 'Bearer test-token', $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/UpsunClientTest.php b/tests/UpsunClientTest.php index 783c9d1ff..c5971d8cb 100644 --- a/tests/UpsunClientTest.php +++ b/tests/UpsunClientTest.php @@ -191,11 +191,43 @@ public function testConstructorInitializesWorkersTask() $this->assertInstanceOf(WorkersTask::class, $this->upsunClient->workers); } - public function testGetTokenReturnsApiToken() + public function testGetTokenDelegatesToOAuthProviderWhenAuthSet(): void { - $token = $this->upsunClient->getToken(); + $mockAuth = $this->createMock(OAuthProvider::class); + $mockAuth->method('getAuthorization')->willReturn('Bearer oauth-token'); + $this->upsunClient->auth = $mockAuth; - $this->assertEquals('test-api-token', $token); + $this->assertEquals('Bearer oauth-token', $this->upsunClient->getToken()); + } + + public function testGetTokenReturnsBearerTokenWhenNoApiKey(): void + { + $config = new UpsunConfig( + base_url: 'https://api.upsun.com', + auth_url: 'https://auth.upsun.com', + apiToken: '', + token_endpoint: 'oauth2/token', + clientId: 'test-client-id' + ); + $client = new UpsunClient($config); + $client->setBearerToken('static-bearer'); + + $this->assertEquals('Bearer static-bearer', $client->getToken()); + } + + public function testGetTokenThrowsWhenNoAuthMethodSet(): void + { + $config = new UpsunConfig( + base_url: 'https://api.upsun.com', + auth_url: 'https://auth.upsun.com', + apiToken: '', + token_endpoint: 'oauth2/token', + clientId: 'test-client-id' + ); + $client = new UpsunClient($config); + + $this->expectException(\RuntimeException::class); + $client->getToken(); } public function testUserIdIsNullByDefault() @@ -223,7 +255,7 @@ public function testConstructorWithDifferentConfiguration() $customClient = new UpsunClient($customConfig); $this->assertEquals('https://custom.api.com', $customClient->apiConfig->getHost()); - $this->assertEquals('custom-token', $customClient->getToken()); + $this->assertInstanceOf(OAuthProvider::class, $customClient->auth); } /** From cb55c7df08fc9bdddbd1264fc6e09d0514e823f1 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 16:46:10 +0200 Subject: [PATCH 08/13] style: use imported Closure/Fiber names instead of FQNS backslash prefix --- src/Api/AbstractApi.php | 3 ++- src/Api/AddOnsApi.php | 3 ++- src/Api/AlertsApi.php | 3 ++- src/Api/ApiTokensApi.php | 3 ++- src/Api/AutoscalingApi.php | 3 ++- src/Api/BlackfireMonitoringApi.php | 3 ++- src/Api/BlackfireProfilingApi.php | 3 ++- src/Api/CertManagementApi.php | 3 ++- src/Api/ConnectionsApi.php | 3 ++- src/Api/ContinuousProfilingApi.php | 3 ++- src/Api/DefaultApi.php | 3 ++- src/Api/DeploymentApi.php | 3 ++- src/Api/DeploymentTargetApi.php | 3 ++- src/Api/DiffApi.php | 3 ++- src/Api/DiscountsApi.php | 3 ++- src/Api/DomainClaimApi.php | 3 ++- src/Api/DomainManagementApi.php | 3 ++- src/Api/EntrypointApi.php | 3 ++- src/Api/EnvironmentActivityApi.php | 3 ++- src/Api/EnvironmentApi.php | 3 ++- src/Api/EnvironmentBackupsApi.php | 3 ++- src/Api/EnvironmentTypeApi.php | 3 ++- src/Api/EnvironmentVariablesApi.php | 3 ++- src/Api/GrantsApi.php | 3 ++- src/Api/HttpTrafficApi.php | 3 ++- src/Api/InvoicesApi.php | 3 ++- src/Api/MfaApi.php | 3 ++- src/Api/OrdersApi.php | 3 ++- src/Api/OrganizationInvitationsApi.php | 3 ++- src/Api/OrganizationManagementApi.php | 3 ++- src/Api/OrganizationMembersApi.php | 3 ++- src/Api/OrganizationProjectsApi.php | 3 ++- src/Api/OrganizationsApi.php | 3 ++- src/Api/PhoneNumberApi.php | 3 ++- src/Api/ProfilesApi.php | 3 ++- src/Api/ProjectActivityApi.php | 3 ++- src/Api/ProjectApi.php | 3 ++- src/Api/ProjectInvitationsApi.php | 3 ++- src/Api/ProjectSettingsApi.php | 3 ++- src/Api/ProjectVariablesApi.php | 3 ++- src/Api/ProjectsApi.php | 3 ++- src/Api/RecordsApi.php | 3 ++- src/Api/ReferencesApi.php | 3 ++- src/Api/RegionsApi.php | 3 ++- src/Api/RegistryCredentialApi.php | 3 ++- src/Api/RepositoryApi.php | 3 ++- src/Api/ResourcesApi.php | 3 ++- src/Api/RoutingApi.php | 3 ++- src/Api/RuntimeOperationsApi.php | 3 ++- src/Api/SbomApi.php | 3 ++- src/Api/SourceOperationsApi.php | 3 ++- src/Api/SshKeysApi.php | 3 ++- src/Api/SubscriptionsApi.php | 3 ++- src/Api/SupportApi.php | 3 ++- src/Api/SystemInformationApi.php | 3 ++- src/Api/TaskApi.php | 3 ++- src/Api/TeamAccessApi.php | 3 ++- src/Api/TeamsApi.php | 3 ++- src/Api/ThirdPartyIntegrationsApi.php | 3 ++- src/Api/UserAccessApi.php | 3 ++- src/Api/UserProfilesApi.php | 3 ++- src/Api/UsersApi.php | 3 ++- src/Api/VouchersApi.php | 3 ++- src/Core/OAuthProvider.php | 9 +++++---- 64 files changed, 131 insertions(+), 67 deletions(-) diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index 5eab7efa0..d57de230b 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClientFactory; @@ -39,7 +40,7 @@ abstract class AbstractApi private readonly UriFactoryInterface $uriFactory; public function __construct( - private readonly \Closure $tokenProvider, + private readonly Closure $tokenProvider, private ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $baseUri, diff --git a/src/Api/AddOnsApi.php b/src/Api/AddOnsApi.php index 3f8b58212..80ea29a34 100644 --- a/src/Api/AddOnsApi.php +++ b/src/Api/AddOnsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class AddOnsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/AlertsApi.php b/src/Api/AlertsApi.php index db69073d6..feec4b93a 100644 --- a/src/Api/AlertsApi.php +++ b/src/Api/AlertsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class AlertsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ApiTokensApi.php b/src/Api/ApiTokensApi.php index 393e24f56..03359d449 100644 --- a/src/Api/ApiTokensApi.php +++ b/src/Api/ApiTokensApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class ApiTokensApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/AutoscalingApi.php b/src/Api/AutoscalingApi.php index 81aa487bf..d20f05e50 100644 --- a/src/Api/AutoscalingApi.php +++ b/src/Api/AutoscalingApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -27,7 +28,7 @@ final class AutoscalingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/BlackfireMonitoringApi.php b/src/Api/BlackfireMonitoringApi.php index 90ebd8ba4..a16e91329 100644 --- a/src/Api/BlackfireMonitoringApi.php +++ b/src/Api/BlackfireMonitoringApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -27,7 +28,7 @@ final class BlackfireMonitoringApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/BlackfireProfilingApi.php b/src/Api/BlackfireProfilingApi.php index fe33b35f6..41851981f 100644 --- a/src/Api/BlackfireProfilingApi.php +++ b/src/Api/BlackfireProfilingApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -28,7 +29,7 @@ final class BlackfireProfilingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/CertManagementApi.php b/src/Api/CertManagementApi.php index 42b3e9810..d22f6f415 100644 --- a/src/Api/CertManagementApi.php +++ b/src/Api/CertManagementApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -32,7 +33,7 @@ final class CertManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ConnectionsApi.php b/src/Api/ConnectionsApi.php index 3778d0957..929b6c0b9 100644 --- a/src/Api/ConnectionsApi.php +++ b/src/Api/ConnectionsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -27,7 +28,7 @@ final class ConnectionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ContinuousProfilingApi.php b/src/Api/ContinuousProfilingApi.php index a58ddf6ea..609cd2bf8 100644 --- a/src/Api/ContinuousProfilingApi.php +++ b/src/Api/ContinuousProfilingApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -27,7 +28,7 @@ final class ContinuousProfilingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DefaultApi.php b/src/Api/DefaultApi.php index cb12a2b3a..7914ae113 100644 --- a/src/Api/DefaultApi.php +++ b/src/Api/DefaultApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -30,7 +31,7 @@ final class DefaultApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DeploymentApi.php b/src/Api/DeploymentApi.php index 1370b2f01..b73c1ea26 100644 --- a/src/Api/DeploymentApi.php +++ b/src/Api/DeploymentApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -29,7 +30,7 @@ final class DeploymentApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DeploymentTargetApi.php b/src/Api/DeploymentTargetApi.php index 331535b82..443c2b5bf 100644 --- a/src/Api/DeploymentTargetApi.php +++ b/src/Api/DeploymentTargetApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class DeploymentTargetApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DiffApi.php b/src/Api/DiffApi.php index 935c74224..d5093efa8 100644 --- a/src/Api/DiffApi.php +++ b/src/Api/DiffApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -26,7 +27,7 @@ final class DiffApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DiscountsApi.php b/src/Api/DiscountsApi.php index 9ba7b18fb..2ce4f7e6b 100644 --- a/src/Api/DiscountsApi.php +++ b/src/Api/DiscountsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -29,7 +30,7 @@ final class DiscountsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DomainClaimApi.php b/src/Api/DomainClaimApi.php index abfbb79bf..cc28c07a8 100644 --- a/src/Api/DomainClaimApi.php +++ b/src/Api/DomainClaimApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class DomainClaimApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DomainManagementApi.php b/src/Api/DomainManagementApi.php index 7164b88e0..63eca17c9 100644 --- a/src/Api/DomainManagementApi.php +++ b/src/Api/DomainManagementApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class DomainManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EntrypointApi.php b/src/Api/EntrypointApi.php index 6262379e1..5ce58d531 100644 --- a/src/Api/EntrypointApi.php +++ b/src/Api/EntrypointApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -26,7 +27,7 @@ final class EntrypointApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentActivityApi.php b/src/Api/EnvironmentActivityApi.php index 3109e8156..4e2358e7f 100644 --- a/src/Api/EnvironmentActivityApi.php +++ b/src/Api/EnvironmentActivityApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class EnvironmentActivityApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentApi.php b/src/Api/EnvironmentApi.php index 9044eb7c4..6de0a650a 100644 --- a/src/Api/EnvironmentApi.php +++ b/src/Api/EnvironmentApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -35,7 +36,7 @@ final class EnvironmentApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentBackupsApi.php b/src/Api/EnvironmentBackupsApi.php index f855eb3f4..b58c1e3bc 100644 --- a/src/Api/EnvironmentBackupsApi.php +++ b/src/Api/EnvironmentBackupsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class EnvironmentBackupsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentTypeApi.php b/src/Api/EnvironmentTypeApi.php index 00206e801..e2329863f 100644 --- a/src/Api/EnvironmentTypeApi.php +++ b/src/Api/EnvironmentTypeApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -27,7 +28,7 @@ final class EnvironmentTypeApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentVariablesApi.php b/src/Api/EnvironmentVariablesApi.php index af2511ef7..0232f0032 100644 --- a/src/Api/EnvironmentVariablesApi.php +++ b/src/Api/EnvironmentVariablesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class EnvironmentVariablesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/GrantsApi.php b/src/Api/GrantsApi.php index 73a6e56e1..46024a74b 100644 --- a/src/Api/GrantsApi.php +++ b/src/Api/GrantsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -29,7 +30,7 @@ final class GrantsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/HttpTrafficApi.php b/src/Api/HttpTrafficApi.php index 4da490789..21a46b2dc 100644 --- a/src/Api/HttpTrafficApi.php +++ b/src/Api/HttpTrafficApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -27,7 +28,7 @@ final class HttpTrafficApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/InvoicesApi.php b/src/Api/InvoicesApi.php index 846174a75..f4683d0e2 100644 --- a/src/Api/InvoicesApi.php +++ b/src/Api/InvoicesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -29,7 +30,7 @@ final class InvoicesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/MfaApi.php b/src/Api/MfaApi.php index 319ad5ed9..1afb11ee7 100644 --- a/src/Api/MfaApi.php +++ b/src/Api/MfaApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -31,7 +32,7 @@ final class MfaApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrdersApi.php b/src/Api/OrdersApi.php index bf175f441..d0c2d0004 100644 --- a/src/Api/OrdersApi.php +++ b/src/Api/OrdersApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -30,7 +31,7 @@ final class OrdersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationInvitationsApi.php b/src/Api/OrganizationInvitationsApi.php index 4a51a1992..0decea1df 100644 --- a/src/Api/OrganizationInvitationsApi.php +++ b/src/Api/OrganizationInvitationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -30,7 +31,7 @@ final class OrganizationInvitationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationManagementApi.php b/src/Api/OrganizationManagementApi.php index f6dd7c377..4a6dc4fc3 100644 --- a/src/Api/OrganizationManagementApi.php +++ b/src/Api/OrganizationManagementApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -31,7 +32,7 @@ final class OrganizationManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationMembersApi.php b/src/Api/OrganizationMembersApi.php index 6fcc82adf..461ee306d 100644 --- a/src/Api/OrganizationMembersApi.php +++ b/src/Api/OrganizationMembersApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -32,7 +33,7 @@ final class OrganizationMembersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationProjectsApi.php b/src/Api/OrganizationProjectsApi.php index 42c68b75c..7fe2f73bd 100644 --- a/src/Api/OrganizationProjectsApi.php +++ b/src/Api/OrganizationProjectsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use Generator; @@ -34,7 +35,7 @@ final class OrganizationProjectsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index 24bd7f889..9729f1577 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -35,7 +36,7 @@ final class OrganizationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/PhoneNumberApi.php b/src/Api/PhoneNumberApi.php index b19dafecd..b5eba2dd3 100644 --- a/src/Api/PhoneNumberApi.php +++ b/src/Api/PhoneNumberApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -29,7 +30,7 @@ final class PhoneNumberApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProfilesApi.php b/src/Api/ProfilesApi.php index cb6e4bb7f..426672cf5 100644 --- a/src/Api/ProfilesApi.php +++ b/src/Api/ProfilesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -29,7 +30,7 @@ final class ProfilesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectActivityApi.php b/src/Api/ProjectActivityApi.php index ddf7a290d..d81a4c11b 100644 --- a/src/Api/ProjectActivityApi.php +++ b/src/Api/ProjectActivityApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class ProjectActivityApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectApi.php b/src/Api/ProjectApi.php index 538bf7287..71aea434a 100644 --- a/src/Api/ProjectApi.php +++ b/src/Api/ProjectApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -29,7 +30,7 @@ final class ProjectApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectInvitationsApi.php b/src/Api/ProjectInvitationsApi.php index 588578ff3..80be16fe1 100644 --- a/src/Api/ProjectInvitationsApi.php +++ b/src/Api/ProjectInvitationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -30,7 +31,7 @@ final class ProjectInvitationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectSettingsApi.php b/src/Api/ProjectSettingsApi.php index e02ce7fe0..4550c94f8 100644 --- a/src/Api/ProjectSettingsApi.php +++ b/src/Api/ProjectSettingsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -29,7 +30,7 @@ final class ProjectSettingsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectVariablesApi.php b/src/Api/ProjectVariablesApi.php index 118b315f9..70d1d0fbb 100644 --- a/src/Api/ProjectVariablesApi.php +++ b/src/Api/ProjectVariablesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class ProjectVariablesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index 227b08b72..06ad840fd 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -26,7 +27,7 @@ final class ProjectsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RecordsApi.php b/src/Api/RecordsApi.php index 3e558d52a..be16b3d74 100644 --- a/src/Api/RecordsApi.php +++ b/src/Api/RecordsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -29,7 +30,7 @@ final class RecordsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ReferencesApi.php b/src/Api/ReferencesApi.php index c1334cb1b..7be23f289 100644 --- a/src/Api/ReferencesApi.php +++ b/src/Api/ReferencesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -27,7 +28,7 @@ final class ReferencesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RegionsApi.php b/src/Api/RegionsApi.php index 4f2d1c746..cce49a3a9 100644 --- a/src/Api/RegionsApi.php +++ b/src/Api/RegionsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -29,7 +30,7 @@ final class RegionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RegistryCredentialApi.php b/src/Api/RegistryCredentialApi.php index d1246499a..784db2438 100644 --- a/src/Api/RegistryCredentialApi.php +++ b/src/Api/RegistryCredentialApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class RegistryCredentialApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RepositoryApi.php b/src/Api/RepositoryApi.php index 30f064525..1f6689f3a 100644 --- a/src/Api/RepositoryApi.php +++ b/src/Api/RepositoryApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class RepositoryApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ResourcesApi.php b/src/Api/ResourcesApi.php index f1d331cad..8b0d74991 100644 --- a/src/Api/ResourcesApi.php +++ b/src/Api/ResourcesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -27,7 +28,7 @@ final class ResourcesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RoutingApi.php b/src/Api/RoutingApi.php index fbd806831..8a3ac4e07 100644 --- a/src/Api/RoutingApi.php +++ b/src/Api/RoutingApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -27,7 +28,7 @@ final class RoutingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RuntimeOperationsApi.php b/src/Api/RuntimeOperationsApi.php index f5cf65bc3..e388fae2e 100644 --- a/src/Api/RuntimeOperationsApi.php +++ b/src/Api/RuntimeOperationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class RuntimeOperationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SbomApi.php b/src/Api/SbomApi.php index f9aa9a5f8..2ea1710d8 100644 --- a/src/Api/SbomApi.php +++ b/src/Api/SbomApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -27,7 +28,7 @@ final class SbomApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SourceOperationsApi.php b/src/Api/SourceOperationsApi.php index caa6ff22c..ccde46c76 100644 --- a/src/Api/SourceOperationsApi.php +++ b/src/Api/SourceOperationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class SourceOperationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SshKeysApi.php b/src/Api/SshKeysApi.php index 6508d1b79..7662ff249 100644 --- a/src/Api/SshKeysApi.php +++ b/src/Api/SshKeysApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class SshKeysApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SubscriptionsApi.php b/src/Api/SubscriptionsApi.php index 23ba19b3b..1c2ba0379 100644 --- a/src/Api/SubscriptionsApi.php +++ b/src/Api/SubscriptionsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -40,7 +41,7 @@ final class SubscriptionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SupportApi.php b/src/Api/SupportApi.php index 4010f9150..b119b6003 100644 --- a/src/Api/SupportApi.php +++ b/src/Api/SupportApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -30,7 +31,7 @@ final class SupportApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SystemInformationApi.php b/src/Api/SystemInformationApi.php index 1512cadd8..f087098f4 100644 --- a/src/Api/SystemInformationApi.php +++ b/src/Api/SystemInformationApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class SystemInformationApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/TaskApi.php b/src/Api/TaskApi.php index ca498c852..efab4aecb 100644 --- a/src/Api/TaskApi.php +++ b/src/Api/TaskApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -29,7 +30,7 @@ final class TaskApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/TeamAccessApi.php b/src/Api/TeamAccessApi.php index 162b781a1..234c34a5c 100644 --- a/src/Api/TeamAccessApi.php +++ b/src/Api/TeamAccessApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -28,7 +29,7 @@ final class TeamAccessApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/TeamsApi.php b/src/Api/TeamsApi.php index 3eb6c99a1..27bfaf1b0 100644 --- a/src/Api/TeamsApi.php +++ b/src/Api/TeamsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -36,7 +37,7 @@ final class TeamsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ThirdPartyIntegrationsApi.php b/src/Api/ThirdPartyIntegrationsApi.php index b98262644..b4008ab97 100644 --- a/src/Api/ThirdPartyIntegrationsApi.php +++ b/src/Api/ThirdPartyIntegrationsApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -30,7 +31,7 @@ final class ThirdPartyIntegrationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/UserAccessApi.php b/src/Api/UserAccessApi.php index 6378f9c79..4120ab4ab 100644 --- a/src/Api/UserAccessApi.php +++ b/src/Api/UserAccessApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -29,7 +30,7 @@ final class UserAccessApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/UserProfilesApi.php b/src/Api/UserProfilesApi.php index 51244959f..e1f20a855 100644 --- a/src/Api/UserProfilesApi.php +++ b/src/Api/UserProfilesApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -32,7 +33,7 @@ final class UserProfilesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/UsersApi.php b/src/Api/UsersApi.php index 0ad52076a..fd89594b9 100644 --- a/src/Api/UsersApi.php +++ b/src/Api/UsersApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -32,7 +33,7 @@ final class UsersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/VouchersApi.php b/src/Api/VouchersApi.php index 026bb0c87..7b859137d 100644 --- a/src/Api/VouchersApi.php +++ b/src/Api/VouchersApi.php @@ -2,6 +2,7 @@ namespace Upsun\Api; +use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -28,7 +29,7 @@ final class VouchersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + Closure $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index e949e0d01..d01a432e9 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -3,6 +3,7 @@ namespace Upsun\Core; use Exception; +use Fiber; use Nyholm\Psr7\Stream; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; @@ -33,9 +34,9 @@ class OAuthProvider * When non-null, a Fiber is already acquiring a token; other Fibers suspend until it finishes. * In synchronous (FPM) contexts Fiber::getCurrent() returns null, so this is always null. * - * @var \Fiber|null + * @var Fiber|null */ - private ?\Fiber $acquiringFiber = null; + private ?Fiber $acquiringFiber = null; /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ private readonly string $effectiveRefreshEndpoint; @@ -204,12 +205,12 @@ public function ensureValidToken(): void // then the token will be valid. In FPM/sync contexts this branch is // never taken because acquiringFiber is always null. while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { - \Fiber::getCurrent()?->suspend(); + Fiber::getCurrent()?->suspend(); } return; } - $this->acquiringFiber = \Fiber::getCurrent(); // null in sync (FPM) context + $this->acquiringFiber = Fiber::getCurrent(); // null in sync (FPM) context try { $this->doAcquireToken(); } finally { From 490c7f10a2a6a5de7c2dbde0f80e51b2bd40a682 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 17:34:19 +0200 Subject: [PATCH 09/13] refactor(auth): introduce TokenProvider interface for typed token acquisition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces bare Closure with a proper TokenProvider interface, aligning naming with the Node SDK's `type TokenProvider = (force?: boolean) => string`. - src/Core/TokenProvider.php: new interface with __invoke(bool $force=false): string - OAuthProvider: implements TokenProvider, adds __invoke() covering force-refresh path - AbstractApi: TokenProvider type hint replacing Closure - UpsunClient: $tokenProvider declared as named variable before $taskParams array (facade does not implement the interface — clean separation of concerns) - All 62 concrete API files + mustache templates updated - All tests updated: anonymous class implements TokenProvider (Closure != interface in PHP) - 25 task test files: multi-line anonymous class format (PHPCS compliant) --- src/Api/AbstractApi.php | 4 +-- src/Api/AddOnsApi.php | 4 +-- src/Api/AlertsApi.php | 4 +-- src/Api/ApiTokensApi.php | 4 +-- src/Api/AutoscalingApi.php | 4 +-- src/Api/BlackfireMonitoringApi.php | 4 +-- src/Api/BlackfireProfilingApi.php | 4 +-- src/Api/CertManagementApi.php | 4 +-- src/Api/ConnectionsApi.php | 4 +-- src/Api/ContinuousProfilingApi.php | 4 +-- src/Api/DefaultApi.php | 4 +-- src/Api/DeploymentApi.php | 4 +-- src/Api/DeploymentTargetApi.php | 4 +-- src/Api/DiffApi.php | 4 +-- src/Api/DiscountsApi.php | 4 +-- src/Api/DomainClaimApi.php | 4 +-- src/Api/DomainManagementApi.php | 4 +-- src/Api/EntrypointApi.php | 4 +-- src/Api/EnvironmentActivityApi.php | 4 +-- src/Api/EnvironmentApi.php | 4 +-- src/Api/EnvironmentBackupsApi.php | 4 +-- src/Api/EnvironmentTypeApi.php | 4 +-- src/Api/EnvironmentVariablesApi.php | 4 +-- src/Api/GrantsApi.php | 4 +-- src/Api/HttpTrafficApi.php | 4 +-- src/Api/InvoicesApi.php | 4 +-- src/Api/MfaApi.php | 4 +-- src/Api/OrdersApi.php | 4 +-- src/Api/OrganizationInvitationsApi.php | 4 +-- src/Api/OrganizationManagementApi.php | 4 +-- src/Api/OrganizationMembersApi.php | 4 +-- src/Api/OrganizationProjectsApi.php | 4 +-- src/Api/OrganizationsApi.php | 4 +-- src/Api/PhoneNumberApi.php | 4 +-- src/Api/ProfilesApi.php | 4 +-- src/Api/ProjectActivityApi.php | 4 +-- src/Api/ProjectApi.php | 4 +-- src/Api/ProjectInvitationsApi.php | 4 +-- src/Api/ProjectSettingsApi.php | 4 +-- src/Api/ProjectVariablesApi.php | 4 +-- src/Api/ProjectsApi.php | 4 +-- src/Api/RecordsApi.php | 4 +-- src/Api/ReferencesApi.php | 4 +-- src/Api/RegionsApi.php | 4 +-- src/Api/RegistryCredentialApi.php | 4 +-- src/Api/RepositoryApi.php | 4 +-- src/Api/ResourcesApi.php | 4 +-- src/Api/RoutingApi.php | 4 +-- src/Api/RuntimeOperationsApi.php | 4 +-- src/Api/SbomApi.php | 4 +-- src/Api/SourceOperationsApi.php | 4 +-- src/Api/SshKeysApi.php | 4 +-- src/Api/SubscriptionsApi.php | 4 +-- src/Api/SupportApi.php | 4 +-- src/Api/SystemInformationApi.php | 4 +-- src/Api/TaskApi.php | 4 +-- src/Api/TeamAccessApi.php | 4 +-- src/Api/TeamsApi.php | 4 +-- src/Api/ThirdPartyIntegrationsApi.php | 4 +-- src/Api/UserAccessApi.php | 4 +-- src/Api/UserProfilesApi.php | 4 +-- src/Api/UsersApi.php | 4 +-- src/Api/VouchersApi.php | 4 +-- src/Core/OAuthProvider.php | 19 ++++++++++++- src/Core/TokenProvider.php | 27 +++++++++++++++++++ src/UpsunClient.php | 23 ++++++++++++---- templates/php/abstract_api.mustache | 3 ++- templates/php/libraries/psr-18/api.mustache | 3 ++- tests/Api/AbstractApiTest.php | 24 +++++++++++------ tests/Core/Tasks/ActivitiesTaskTest.php | 8 +++++- tests/Core/Tasks/ApplicationsTaskTest.php | 8 +++++- tests/Core/Tasks/BackupsTaskTest.php | 8 +++++- tests/Core/Tasks/BaseTestCase.php | 10 +++++-- tests/Core/Tasks/CertificatesTaskTest.php | 8 +++++- tests/Core/Tasks/DomainsTaskTest.php | 8 +++++- tests/Core/Tasks/EnvironmentsTaskTest.php | 8 +++++- tests/Core/Tasks/IntegrationsTaskTest.php | 8 +++++- tests/Core/Tasks/InvitationsTaskTest.php | 8 +++++- tests/Core/Tasks/MountsTaskTest.php | 8 +++++- tests/Core/Tasks/OperationsTaskTest.php | 8 +++++- tests/Core/Tasks/OrganizationsTaskTest.php | 8 +++++- tests/Core/Tasks/ProjectsTaskTest.php | 8 +++++- tests/Core/Tasks/RegionsTaskTest.php | 8 +++++- tests/Core/Tasks/RepositoriesTaskTest.php | 8 +++++- tests/Core/Tasks/ResourcesTaskTest.php | 8 +++++- tests/Core/Tasks/RoutesTaskTest.php | 8 +++++- tests/Core/Tasks/ServicesTaskTest.php | 8 +++++- tests/Core/Tasks/SourceOperationsTaskTest.php | 8 +++++- tests/Core/Tasks/SshTaskTest.php | 8 +++++- tests/Core/Tasks/SupportTicketsTaskTest.php | 8 +++++- tests/Core/Tasks/TeamsTaskTest.php | 8 +++++- tests/Core/Tasks/UsersInvitationsTaskTest.php | 8 +++++- tests/Core/Tasks/UsersTaskTest.php | 8 +++++- tests/Core/Tasks/VariablesTaskTest.php | 8 +++++- tests/Core/Tasks/WorkersTaskTest.php | 16 +++++++++-- 95 files changed, 399 insertions(+), 170 deletions(-) create mode 100644 src/Core/TokenProvider.php diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index d57de230b..14c60c1db 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClientFactory; @@ -19,6 +18,7 @@ use Psr\Http\Message\UriFactoryInterface; use Psr\Http\Message\UriInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use function sprintf; @@ -40,7 +40,7 @@ abstract class AbstractApi private readonly UriFactoryInterface $uriFactory; public function __construct( - private readonly Closure $tokenProvider, + private readonly TokenProvider $tokenProvider, private ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $baseUri, diff --git a/src/Api/AddOnsApi.php b/src/Api/AddOnsApi.php index 80ea29a34..75edd96fe 100644 --- a/src/Api/AddOnsApi.php +++ b/src/Api/AddOnsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\OrganizationAddonsObject; use Upsun\Model\UpdateOrgAddonsRequest; @@ -29,7 +29,7 @@ final class AddOnsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/AlertsApi.php b/src/Api/AlertsApi.php index feec4b93a..954161237 100644 --- a/src/Api/AlertsApi.php +++ b/src/Api/AlertsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\GetUsageAlerts200Response; use Upsun\Model\UpdateUsageAlertsRequest; @@ -29,7 +29,7 @@ final class AlertsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ApiTokensApi.php b/src/Api/ApiTokensApi.php index 03359d449..3c77f73ef 100644 --- a/src/Api/ApiTokensApi.php +++ b/src/Api/ApiTokensApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ApiToken; use Upsun\Model\CreateApiTokenRequest; @@ -29,7 +29,7 @@ final class ApiTokensApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/AutoscalingApi.php b/src/Api/AutoscalingApi.php index d20f05e50..5207dedf0 100644 --- a/src/Api/AutoscalingApi.php +++ b/src/Api/AutoscalingApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AutoscalerSettings; /** @@ -28,7 +28,7 @@ final class AutoscalingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/BlackfireMonitoringApi.php b/src/Api/BlackfireMonitoringApi.php index a16e91329..0a4e4bbfd 100644 --- a/src/Api/BlackfireMonitoringApi.php +++ b/src/Api/BlackfireMonitoringApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level BlackfireMonitoringApi (auto-generated) @@ -28,7 +28,7 @@ final class BlackfireMonitoringApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/BlackfireProfilingApi.php b/src/Api/BlackfireProfilingApi.php index 41851981f..d844f1ffe 100644 --- a/src/Api/BlackfireProfilingApi.php +++ b/src/Api/BlackfireProfilingApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\FilterSelect; /** @@ -29,7 +29,7 @@ final class BlackfireProfilingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/CertManagementApi.php b/src/Api/CertManagementApi.php index d22f6f415..b4c9c46dc 100644 --- a/src/Api/CertManagementApi.php +++ b/src/Api/CertManagementApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Certificate; use Upsun\Model\CertificateCreateInput; @@ -33,7 +33,7 @@ final class CertManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ConnectionsApi.php b/src/Api/ConnectionsApi.php index 929b6c0b9..33665f5df 100644 --- a/src/Api/ConnectionsApi.php +++ b/src/Api/ConnectionsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Connection; /** @@ -28,7 +28,7 @@ final class ConnectionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ContinuousProfilingApi.php b/src/Api/ContinuousProfilingApi.php index 609cd2bf8..90075c5c9 100644 --- a/src/Api/ContinuousProfilingApi.php +++ b/src/Api/ContinuousProfilingApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level ContinuousProfilingApi (auto-generated) @@ -28,7 +28,7 @@ final class ContinuousProfilingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DefaultApi.php b/src/Api/DefaultApi.php index 7914ae113..5739346ca 100644 --- a/src/Api/DefaultApi.php +++ b/src/Api/DefaultApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\DateTimeFilter; use Upsun\Model\ListTickets200Response; use Upsun\Model\OrganizationCarbon; @@ -31,7 +31,7 @@ final class DefaultApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DeploymentApi.php b/src/Api/DeploymentApi.php index b73c1ea26..785ac1711 100644 --- a/src/Api/DeploymentApi.php +++ b/src/Api/DeploymentApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Deployment; use Upsun\Model\UpdateProjectsEnvironmentsDeploymentsNextRequest; @@ -30,7 +30,7 @@ final class DeploymentApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DeploymentTargetApi.php b/src/Api/DeploymentTargetApi.php index 443c2b5bf..bede61cf0 100644 --- a/src/Api/DeploymentTargetApi.php +++ b/src/Api/DeploymentTargetApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DeploymentTarget; use Upsun\Model\DeploymentTargetCreateInput; @@ -31,7 +31,7 @@ final class DeploymentTargetApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DiffApi.php b/src/Api/DiffApi.php index d5093efa8..20b5664cd 100644 --- a/src/Api/DiffApi.php +++ b/src/Api/DiffApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level DiffApi (auto-generated) @@ -27,7 +27,7 @@ final class DiffApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DiscountsApi.php b/src/Api/DiscountsApi.php index 2ce4f7e6b..4eefdae15 100644 --- a/src/Api/DiscountsApi.php +++ b/src/Api/DiscountsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Discount; use Upsun\Model\GetTypeAllowance200Response; use Upsun\Model\ListOrgDiscounts200Response; @@ -30,7 +30,7 @@ final class DiscountsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DomainClaimApi.php b/src/Api/DomainClaimApi.php index cc28c07a8..9b623478c 100644 --- a/src/Api/DomainClaimApi.php +++ b/src/Api/DomainClaimApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DomainClaim; @@ -29,7 +29,7 @@ final class DomainClaimApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/DomainManagementApi.php b/src/Api/DomainManagementApi.php index 63eca17c9..62653639c 100644 --- a/src/Api/DomainManagementApi.php +++ b/src/Api/DomainManagementApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Domain; use Upsun\Model\DomainCreateInput; @@ -31,7 +31,7 @@ final class DomainManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EntrypointApi.php b/src/Api/EntrypointApi.php index 5ce58d531..4af29c63e 100644 --- a/src/Api/EntrypointApi.php +++ b/src/Api/EntrypointApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level EntrypointApi (auto-generated) @@ -27,7 +27,7 @@ final class EntrypointApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentActivityApi.php b/src/Api/EnvironmentActivityApi.php index 4e2358e7f..2e717b695 100644 --- a/src/Api/EnvironmentActivityApi.php +++ b/src/Api/EnvironmentActivityApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; @@ -29,7 +29,7 @@ final class EnvironmentActivityApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentApi.php b/src/Api/EnvironmentApi.php index 6de0a650a..8e42dd372 100644 --- a/src/Api/EnvironmentApi.php +++ b/src/Api/EnvironmentApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Environment; use Upsun\Model\EnvironmentActivateInput; @@ -36,7 +36,7 @@ final class EnvironmentApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentBackupsApi.php b/src/Api/EnvironmentBackupsApi.php index b58c1e3bc..ac6431584 100644 --- a/src/Api/EnvironmentBackupsApi.php +++ b/src/Api/EnvironmentBackupsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Backup; use Upsun\Model\EnvironmentBackupInput; @@ -31,7 +31,7 @@ final class EnvironmentBackupsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentTypeApi.php b/src/Api/EnvironmentTypeApi.php index e2329863f..a8f673d51 100644 --- a/src/Api/EnvironmentTypeApi.php +++ b/src/Api/EnvironmentTypeApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\EnvironmentType; /** @@ -28,7 +28,7 @@ final class EnvironmentTypeApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/EnvironmentVariablesApi.php b/src/Api/EnvironmentVariablesApi.php index 0232f0032..1e0b395b4 100644 --- a/src/Api/EnvironmentVariablesApi.php +++ b/src/Api/EnvironmentVariablesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentVariable; use Upsun\Model\EnvironmentVariableCreateInput; @@ -31,7 +31,7 @@ final class EnvironmentVariablesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/GrantsApi.php b/src/Api/GrantsApi.php index 46024a74b..31eb8dc07 100644 --- a/src/Api/GrantsApi.php +++ b/src/Api/GrantsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ListUserExtendedAccess200Response; use Upsun\Model\StringFilter; @@ -30,7 +30,7 @@ final class GrantsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/HttpTrafficApi.php b/src/Api/HttpTrafficApi.php index 21a46b2dc..9a761db72 100644 --- a/src/Api/HttpTrafficApi.php +++ b/src/Api/HttpTrafficApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level HttpTrafficApi (auto-generated) @@ -28,7 +28,7 @@ final class HttpTrafficApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/InvoicesApi.php b/src/Api/InvoicesApi.php index f4683d0e2..2c74fce18 100644 --- a/src/Api/InvoicesApi.php +++ b/src/Api/InvoicesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Invoice; use Upsun\Model\ListOrgInvoices200Response; @@ -30,7 +30,7 @@ final class InvoicesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/MfaApi.php b/src/Api/MfaApi.php index 1afb11ee7..f770c4e08 100644 --- a/src/Api/MfaApi.php +++ b/src/Api/MfaApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ConfirmTotpEnrollment200Response; use Upsun\Model\ConfirmTotpEnrollmentRequest; use Upsun\Model\GetTotpEnrollment200Response; @@ -32,7 +32,7 @@ final class MfaApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrdersApi.php b/src/Api/OrdersApi.php index d0c2d0004..7d083f5c0 100644 --- a/src/Api/OrdersApi.php +++ b/src/Api/OrdersApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateAuthorizationCredentials200Response; use Upsun\Model\ListOrgOrders200Response; use Upsun\Model\Order; @@ -31,7 +31,7 @@ final class OrdersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationInvitationsApi.php b/src/Api/OrganizationInvitationsApi.php index 0decea1df..c17efc23f 100644 --- a/src/Api/OrganizationInvitationsApi.php +++ b/src/Api/OrganizationInvitationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateOrgInviteRequest; use Upsun\Model\OrganizationInvitation; use Upsun\Model\StringFilter; @@ -31,7 +31,7 @@ final class OrganizationInvitationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationManagementApi.php b/src/Api/OrganizationManagementApi.php index 4a6dc4fc3..21c67cbb3 100644 --- a/src/Api/OrganizationManagementApi.php +++ b/src/Api/OrganizationManagementApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\GetOrgPrepaymentInfo200Response; use Upsun\Model\ListOrgPrepaymentTransactions200Response; use Upsun\Model\OrganizationAlertConfig; @@ -32,7 +32,7 @@ final class OrganizationManagementApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationMembersApi.php b/src/Api/OrganizationMembersApi.php index 461ee306d..c8eb32f7b 100644 --- a/src/Api/OrganizationMembersApi.php +++ b/src/Api/OrganizationMembersApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ArrayFilter; use Upsun\Model\CreateOrgMemberRequest; use Upsun\Model\ListOrgMembers200Response; @@ -33,7 +33,7 @@ final class OrganizationMembersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationProjectsApi.php b/src/Api/OrganizationProjectsApi.php index 7fe2f73bd..a9c6095e7 100644 --- a/src/Api/OrganizationProjectsApi.php +++ b/src/Api/OrganizationProjectsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use Generator; @@ -14,6 +13,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateOrgProjectRequest; use Upsun\Model\DateTimeFilter; use Upsun\Model\OrganizationProject; @@ -35,7 +35,7 @@ final class OrganizationProjectsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index 9729f1577..eea13f5f7 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ArrayFilter; use Upsun\Model\CreateOrgRequest; use Upsun\Model\DateTimeFilter; @@ -36,7 +36,7 @@ final class OrganizationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/PhoneNumberApi.php b/src/Api/PhoneNumberApi.php index b5eba2dd3..a01f148a2 100644 --- a/src/Api/PhoneNumberApi.php +++ b/src/Api/PhoneNumberApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ConfirmPhoneNumberRequest; use Upsun\Model\VerifyPhoneNumber200Response; use Upsun\Model\VerifyPhoneNumberRequest; @@ -30,7 +30,7 @@ final class PhoneNumberApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProfilesApi.php b/src/Api/ProfilesApi.php index 426672cf5..91a71b3bd 100644 --- a/src/Api/ProfilesApi.php +++ b/src/Api/ProfilesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Address; use Upsun\Model\Profile; use Upsun\Model\UpdateOrgProfileRequest; @@ -30,7 +30,7 @@ final class ProfilesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectActivityApi.php b/src/Api/ProjectActivityApi.php index d81a4c11b..c46596550 100644 --- a/src/Api/ProjectActivityApi.php +++ b/src/Api/ProjectActivityApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; @@ -29,7 +29,7 @@ final class ProjectActivityApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectApi.php b/src/Api/ProjectApi.php index 71aea434a..3426dc8c7 100644 --- a/src/Api/ProjectApi.php +++ b/src/Api/ProjectApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Project; use Upsun\Model\ProjectCapabilities; @@ -30,7 +30,7 @@ final class ProjectApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectInvitationsApi.php b/src/Api/ProjectInvitationsApi.php index 80be16fe1..d5dcfd56f 100644 --- a/src/Api/ProjectInvitationsApi.php +++ b/src/Api/ProjectInvitationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateProjectInviteRequest; use Upsun\Model\ProjectInvitation; use Upsun\Model\StringFilter; @@ -31,7 +31,7 @@ final class ProjectInvitationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectSettingsApi.php b/src/Api/ProjectSettingsApi.php index 4550c94f8..f7254cea9 100644 --- a/src/Api/ProjectSettingsApi.php +++ b/src/Api/ProjectSettingsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\ProjectSettings; use Upsun\Model\ProjectSettingsPatch; @@ -30,7 +30,7 @@ final class ProjectSettingsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectVariablesApi.php b/src/Api/ProjectVariablesApi.php index 70d1d0fbb..66880a3ab 100644 --- a/src/Api/ProjectVariablesApi.php +++ b/src/Api/ProjectVariablesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\ProjectVariable; use Upsun\Model\ProjectVariableCreateInput; @@ -31,7 +31,7 @@ final class ProjectVariablesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ProjectsApi.php b/src/Api/ProjectsApi.php index 06ad840fd..fc5f904cd 100644 --- a/src/Api/ProjectsApi.php +++ b/src/Api/ProjectsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level ProjectsApi (auto-generated) @@ -27,7 +27,7 @@ final class ProjectsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RecordsApi.php b/src/Api/RecordsApi.php index be16b3d74..d28dded6f 100644 --- a/src/Api/RecordsApi.php +++ b/src/Api/RecordsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ListOrgPlanRecords200Response; use Upsun\Model\ListOrgUsageRecords200Response; @@ -30,7 +30,7 @@ final class RecordsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ReferencesApi.php b/src/Api/ReferencesApi.php index 7be23f289..172e976d7 100644 --- a/src/Api/ReferencesApi.php +++ b/src/Api/ReferencesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level ReferencesApi (auto-generated) @@ -28,7 +28,7 @@ final class ReferencesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RegionsApi.php b/src/Api/RegionsApi.php index cce49a3a9..455c0312e 100644 --- a/src/Api/RegionsApi.php +++ b/src/Api/RegionsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Region; use Upsun\Model\StringFilter; @@ -30,7 +30,7 @@ final class RegionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RegistryCredentialApi.php b/src/Api/RegistryCredentialApi.php index 784db2438..5b023dd3e 100644 --- a/src/Api/RegistryCredentialApi.php +++ b/src/Api/RegistryCredentialApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\RegistryCredential; use Upsun\Model\RegistryCredentialCreateInput; @@ -31,7 +31,7 @@ final class RegistryCredentialApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RepositoryApi.php b/src/Api/RepositoryApi.php index 1f6689f3a..927b57e75 100644 --- a/src/Api/RepositoryApi.php +++ b/src/Api/RepositoryApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Blob; use Upsun\Model\Commit; use Upsun\Model\Ref; @@ -31,7 +31,7 @@ final class RepositoryApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ResourcesApi.php b/src/Api/ResourcesApi.php index 8b0d74991..5f6eefff9 100644 --- a/src/Api/ResourcesApi.php +++ b/src/Api/ResourcesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; /** * Low level ResourcesApi (auto-generated) @@ -28,7 +28,7 @@ final class ResourcesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RoutingApi.php b/src/Api/RoutingApi.php index 8a3ac4e07..583b8da95 100644 --- a/src/Api/RoutingApi.php +++ b/src/Api/RoutingApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Route; /** @@ -28,7 +28,7 @@ final class RoutingApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/RuntimeOperationsApi.php b/src/Api/RuntimeOperationsApi.php index e388fae2e..6aa285829 100644 --- a/src/Api/RuntimeOperationsApi.php +++ b/src/Api/RuntimeOperationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentOperationInput; @@ -29,7 +29,7 @@ final class RuntimeOperationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SbomApi.php b/src/Api/SbomApi.php index 2ea1710d8..fbb0dfe23 100644 --- a/src/Api/SbomApi.php +++ b/src/Api/SbomApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Sbom; /** @@ -28,7 +28,7 @@ final class SbomApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SourceOperationsApi.php b/src/Api/SourceOperationsApi.php index ccde46c76..636287b84 100644 --- a/src/Api/SourceOperationsApi.php +++ b/src/Api/SourceOperationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentSourceOperationInput; @@ -29,7 +29,7 @@ final class SourceOperationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SshKeysApi.php b/src/Api/SshKeysApi.php index 7662ff249..89c41f1fe 100644 --- a/src/Api/SshKeysApi.php +++ b/src/Api/SshKeysApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateSshKeyRequest; use Upsun\Model\SshKey; @@ -29,7 +29,7 @@ final class SshKeysApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SubscriptionsApi.php b/src/Api/SubscriptionsApi.php index 1c2ba0379..c1daba061 100644 --- a/src/Api/SubscriptionsApi.php +++ b/src/Api/SubscriptionsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CanAffordSubscriptionRequest; use Upsun\Model\CanCreateNewOrgSubscription200Response; use Upsun\Model\CanUpdateSubscription200Response; @@ -41,7 +41,7 @@ final class SubscriptionsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SupportApi.php b/src/Api/SupportApi.php index b119b6003..eb1efd86f 100644 --- a/src/Api/SupportApi.php +++ b/src/Api/SupportApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateTicketRequest; use Upsun\Model\Ticket; use Upsun\Model\UpdateTicketRequest; @@ -31,7 +31,7 @@ final class SupportApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/SystemInformationApi.php b/src/Api/SystemInformationApi.php index f087098f4..af4d96447 100644 --- a/src/Api/SystemInformationApi.php +++ b/src/Api/SystemInformationApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\SystemInformation; @@ -29,7 +29,7 @@ final class SystemInformationApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/TaskApi.php b/src/Api/TaskApi.php index efab4aecb..ed4b02d57 100644 --- a/src/Api/TaskApi.php +++ b/src/Api/TaskApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Task; use Upsun\Model\TaskTriggerInput; @@ -30,7 +30,7 @@ final class TaskApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/TeamAccessApi.php b/src/Api/TeamAccessApi.php index 234c34a5c..7311962f8 100644 --- a/src/Api/TeamAccessApi.php +++ b/src/Api/TeamAccessApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\TeamProjectAccess; /** @@ -29,7 +29,7 @@ final class TeamAccessApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/TeamsApi.php b/src/Api/TeamsApi.php index 27bfaf1b0..9daabde9c 100644 --- a/src/Api/TeamsApi.php +++ b/src/Api/TeamsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CreateTeamMemberRequest; use Upsun\Model\CreateTeamRequest; use Upsun\Model\DateTimeFilter; @@ -37,7 +37,7 @@ final class TeamsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/ThirdPartyIntegrationsApi.php b/src/Api/ThirdPartyIntegrationsApi.php index b4008ab97..d49b35a95 100644 --- a/src/Api/ThirdPartyIntegrationsApi.php +++ b/src/Api/ThirdPartyIntegrationsApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Integration; use Upsun\Model\IntegrationCreateCreateInput; @@ -31,7 +31,7 @@ final class ThirdPartyIntegrationsApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/UserAccessApi.php b/src/Api/UserAccessApi.php index 4120ab4ab..546f6d41d 100644 --- a/src/Api/UserAccessApi.php +++ b/src/Api/UserAccessApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use DateTime; use Exception; use GuzzleHttp\Psr7\MultipartStream; @@ -13,6 +12,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\UpdateProjectUserAccessRequest; use Upsun\Model\UserProjectAccess; @@ -30,7 +30,7 @@ final class UserAccessApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/UserProfilesApi.php b/src/Api/UserProfilesApi.php index e1f20a855..7f86526d7 100644 --- a/src/Api/UserProfilesApi.php +++ b/src/Api/UserProfilesApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -13,6 +12,7 @@ use Psr\Http\Message\StreamFactoryInterface; use SplFileObject; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\Address; use Upsun\Model\CreateProfilePicture200Response; use Upsun\Model\ListProfiles200Response; @@ -33,7 +33,7 @@ final class UserProfilesApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/UsersApi.php b/src/Api/UsersApi.php index fd89594b9..dd428968d 100644 --- a/src/Api/UsersApi.php +++ b/src/Api/UsersApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\CurrentUser; use Upsun\Model\GetCurrentUserVerificationStatus200Response; use Upsun\Model\GetCurrentUserVerificationStatusFull200Response; @@ -33,7 +33,7 @@ final class UsersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Api/VouchersApi.php b/src/Api/VouchersApi.php index 7b859137d..93bcca449 100644 --- a/src/Api/VouchersApi.php +++ b/src/Api/VouchersApi.php @@ -2,7 +2,6 @@ namespace Upsun\Api; -use Closure; use Exception; use GuzzleHttp\Psr7\MultipartStream; use InvalidArgumentException; @@ -12,6 +11,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Upsun\Api\Serializer\ObjectSerializer; +use Upsun\Core\TokenProvider; use Upsun\Model\ApplyOrgVoucherRequest; use Upsun\Model\Vouchers; @@ -29,7 +29,7 @@ final class VouchersApi extends AbstractApi private ApiConfiguration $config; public function __construct( - Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index d01a432e9..8b398981b 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -8,6 +8,7 @@ use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; +use Upsun\Core\TokenProvider; /** * class (auto-generated) @@ -22,7 +23,7 @@ * @see https://docs.upsun.com * @generated This file was generated by OpenAPI Generator. Do not edit manually. */ -class OAuthProvider +class OAuthProvider implements TokenProvider { private ?string $accessToken = null; private ?string $refreshToken = null; @@ -218,6 +219,22 @@ public function ensureValidToken(): void } } + /** + * TokenProvider implementation: return the Authorization header value. + * When `$force` is true, unconditionally re-acquires the token first (401 retry path). + * + * @throws Exception + */ + public function __invoke(bool $force = false): string + { + if ($force) { + $this->forceRefresh(); + return 'Bearer ' . $this->accessToken; + } + + return $this->getAuthorization(); + } + /** * @throws Exception */ diff --git a/src/Core/TokenProvider.php b/src/Core/TokenProvider.php new file mode 100644 index 000000000..02436902e --- /dev/null +++ b/src/Core/TokenProvider.php @@ -0,0 +1,27 @@ + string` in the Node SDK. + * + * Implementations: + * @see \Upsun\Core\OAuthProvider — OAuth2 client-credentials implementation + * @see \Upsun\UpsunClient — façade covering OAuth2 and static bearer modes + */ +interface TokenProvider +{ + /** + * Return the current authorization header value (e.g. `"Bearer eyJ..."`). + * + * @param bool $force When true, force-refresh the token before returning. + * @return string The full Authorization header value. + */ + public function __invoke(bool $force = false): string; +} diff --git a/src/UpsunClient.php b/src/UpsunClient.php index 22e266f78..b9ee28870 100644 --- a/src/UpsunClient.php +++ b/src/UpsunClient.php @@ -79,6 +79,7 @@ use Upsun\Core\Tasks\UsersTask; use Upsun\Core\Tasks\VariablesTask; use Upsun\Core\Tasks\WorkersTask; +use Upsun\Core\TokenProvider; /** * Upsun Client to interact with the API. @@ -169,14 +170,26 @@ public function __construct(protected UpsunConfig $upsunConfig, ?ClientInterface ); } - $tokenProvider = function (bool $force = false): string { - if ($force && $this->auth !== null) { - $this->auth->forceRefresh(); + $tokenProvider = new class ($this) implements TokenProvider { + public function __construct(private readonly UpsunClient $client) + { + } + + public function __invoke(bool $force = false): string + { + if ($force && $this->client->auth !== null) { + $this->client->auth->forceRefresh(); + } + return $this->client->getToken(); } - return $this->getToken(); }; - $taskParams = [$tokenProvider, $this->apiClient, $requestFactory, $this->apiConfig]; + $taskParams = [ + $tokenProvider, + $this->apiClient, + $requestFactory, + $this->apiConfig, + ]; // Init used API classes $addOnsApi = new AddOnsApi(...$taskParams); diff --git a/templates/php/abstract_api.mustache b/templates/php/abstract_api.mustache index 7ed5bd191..3f1591954 100644 --- a/templates/php/abstract_api.mustache +++ b/templates/php/abstract_api.mustache @@ -5,6 +5,7 @@ namespace {{invokerPackage}}\Api; use Exception; use InvalidArgumentException; use JsonException; +use {{invokerPackage}}\Core\TokenProvider; use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClientFactory; use Http\Discovery\Psr17FactoryDiscovery; @@ -36,7 +37,7 @@ abstract class AbstractApi private readonly UriFactoryInterface $uriFactory; public function __construct( - private readonly \Closure $tokenProvider, + private readonly TokenProvider $tokenProvider, private ClientInterface $httpClient, private readonly RequestFactoryInterface $requestFactory, private readonly string $baseUri, diff --git a/templates/php/libraries/psr-18/api.mustache b/templates/php/libraries/psr-18/api.mustache index 9416ddf30..dcc5169c0 100644 --- a/templates/php/libraries/psr-18/api.mustache +++ b/templates/php/libraries/psr-18/api.mustache @@ -12,6 +12,7 @@ use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamFactoryInterface; use {{apiPackage}}\Serializer\ObjectSerializer; +use {{invokerPackage}}\Core\TokenProvider; /** * Low level {{classname}} (auto-generated) @@ -24,7 +25,7 @@ use {{apiPackage}}\Serializer\ObjectSerializer; private ApiConfiguration $config; public function __construct( - \Closure $tokenProvider, + TokenProvider $tokenProvider, ?ClientInterface $httpClient = null, ?RequestFactoryInterface $requestFactory = null, ?ApiConfiguration $config = null, diff --git a/tests/Api/AbstractApiTest.php b/tests/Api/AbstractApiTest.php index 809ada4ac..745c25b7b 100644 --- a/tests/Api/AbstractApiTest.php +++ b/tests/Api/AbstractApiTest.php @@ -13,6 +13,7 @@ use Psr\Http\Message\StreamInterface; use Upsun\Api\AbstractApi; use Upsun\Api\ApiException; +use Upsun\Core\TokenProvider; /** * Test suite for AbstractApi — focuses on sendAuthenticatedRequest() logic (FIX 1: 401 retry). @@ -29,8 +30,8 @@ class AbstractApiTest extends TestCase /** @var ClientInterface&\PHPUnit\Framework\MockObject\MockObject */ private ClientInterface $httpClient; - private int $tokenCallCount = 0; - private int $forceRefreshCount = 0; + public int $tokenCallCount = 0; + public int $forceRefreshCount = 0; private Psr17Factory $psr17Factory; @@ -41,13 +42,20 @@ protected function setUp(): void $this->tokenCallCount = 0; $this->forceRefreshCount = 0; - // Closure-based tokenProvider: tracks call count and force-refresh requests. - $tokenProvider = function (bool $force = false): string { - $this->tokenCallCount++; - if ($force) { - $this->forceRefreshCount++; + // Anonymous class implementing TokenProvider: tracks call count and force-refresh requests. + $tokenProvider = new class ($this) implements TokenProvider { + public function __construct(private readonly AbstractApiTest $test) + { + } + + public function __invoke(bool $force = false): string + { + $this->test->tokenCallCount++; + if ($force) { + $this->test->forceRefreshCount++; + } + return 'Bearer test-token'; } - return 'Bearer test-token'; }; $this->api = new class ( diff --git a/tests/Core/Tasks/ActivitiesTaskTest.php b/tests/Core/Tasks/ActivitiesTaskTest.php index bc87863e4..fa5b24ca3 100644 --- a/tests/Core/Tasks/ActivitiesTaskTest.php +++ b/tests/Core/Tasks/ActivitiesTaskTest.php @@ -29,7 +29,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ApplicationsTaskTest.php b/tests/Core/Tasks/ApplicationsTaskTest.php index c0f3434e1..5452e933d 100644 --- a/tests/Core/Tasks/ApplicationsTaskTest.php +++ b/tests/Core/Tasks/ApplicationsTaskTest.php @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/BackupsTaskTest.php b/tests/Core/Tasks/BackupsTaskTest.php index 37a7a5476..48418724e 100644 --- a/tests/Core/Tasks/BackupsTaskTest.php +++ b/tests/Core/Tasks/BackupsTaskTest.php @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/BaseTestCase.php b/tests/Core/Tasks/BaseTestCase.php index 9fa92c2c2..bb5b0e53f 100644 --- a/tests/Core/Tasks/BaseTestCase.php +++ b/tests/Core/Tasks/BaseTestCase.php @@ -11,6 +11,7 @@ use Psr\Http\Client\ClientInterface; use Upsun\Api\ApiConfiguration; use Upsun\Api\ApiException; +use Upsun\Core\TokenProvider; abstract class BaseTestCase extends TestCase { @@ -93,7 +94,7 @@ protected function assertObjectMatchesArray(array $actual, array $expected, stri /** * Create standard API class parameters for testing. - * Returns array: [\Closure tokenProvider, ClientInterface, Psr17Factory, ApiConfiguration] + * Returns array: [TokenProvider, ClientInterface, Psr17Factory, ApiConfiguration] * * @param ClientInterface|null $httpClient Optional HTTP client mock to use * @return array @@ -105,7 +106,12 @@ protected function createApiClassParams(?ClientInterface $httpClient = null): ar } return [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements TokenProvider { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/CertificatesTaskTest.php b/tests/Core/Tasks/CertificatesTaskTest.php index 4f7a99663..7de9826a9 100644 --- a/tests/Core/Tasks/CertificatesTaskTest.php +++ b/tests/Core/Tasks/CertificatesTaskTest.php @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/DomainsTaskTest.php b/tests/Core/Tasks/DomainsTaskTest.php index fdf1dae9e..e0a723c2f 100644 --- a/tests/Core/Tasks/DomainsTaskTest.php +++ b/tests/Core/Tasks/DomainsTaskTest.php @@ -35,7 +35,13 @@ class_exists(ReplacementDomainStorage::class); $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/EnvironmentsTaskTest.php b/tests/Core/Tasks/EnvironmentsTaskTest.php index a13a95d0f..a46e3af65 100644 --- a/tests/Core/Tasks/EnvironmentsTaskTest.php +++ b/tests/Core/Tasks/EnvironmentsTaskTest.php @@ -58,7 +58,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/IntegrationsTaskTest.php b/tests/Core/Tasks/IntegrationsTaskTest.php index ae56d0c20..9c61388b8 100644 --- a/tests/Core/Tasks/IntegrationsTaskTest.php +++ b/tests/Core/Tasks/IntegrationsTaskTest.php @@ -32,7 +32,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/InvitationsTaskTest.php b/tests/Core/Tasks/InvitationsTaskTest.php index 0c7bf8c47..ebaf2e782 100644 --- a/tests/Core/Tasks/InvitationsTaskTest.php +++ b/tests/Core/Tasks/InvitationsTaskTest.php @@ -35,7 +35,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/MountsTaskTest.php b/tests/Core/Tasks/MountsTaskTest.php index cf6f05b36..876bee0cb 100644 --- a/tests/Core/Tasks/MountsTaskTest.php +++ b/tests/Core/Tasks/MountsTaskTest.php @@ -31,7 +31,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/OperationsTaskTest.php b/tests/Core/Tasks/OperationsTaskTest.php index 44e80e742..5f88b33ef 100644 --- a/tests/Core/Tasks/OperationsTaskTest.php +++ b/tests/Core/Tasks/OperationsTaskTest.php @@ -29,7 +29,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/OrganizationsTaskTest.php b/tests/Core/Tasks/OrganizationsTaskTest.php index 959e8cdfc..24cf6fb2d 100644 --- a/tests/Core/Tasks/OrganizationsTaskTest.php +++ b/tests/Core/Tasks/OrganizationsTaskTest.php @@ -77,7 +77,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ProjectsTaskTest.php b/tests/Core/Tasks/ProjectsTaskTest.php index adb432966..25453c78f 100644 --- a/tests/Core/Tasks/ProjectsTaskTest.php +++ b/tests/Core/Tasks/ProjectsTaskTest.php @@ -111,7 +111,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RegionsTaskTest.php b/tests/Core/Tasks/RegionsTaskTest.php index bbaeca730..bc7c6b713 100644 --- a/tests/Core/Tasks/RegionsTaskTest.php +++ b/tests/Core/Tasks/RegionsTaskTest.php @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RepositoriesTaskTest.php b/tests/Core/Tasks/RepositoriesTaskTest.php index 2356551a7..65ce7f24c 100644 --- a/tests/Core/Tasks/RepositoriesTaskTest.php +++ b/tests/Core/Tasks/RepositoriesTaskTest.php @@ -35,7 +35,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ResourcesTaskTest.php b/tests/Core/Tasks/ResourcesTaskTest.php index f6367acd6..8f2c5082e 100644 --- a/tests/Core/Tasks/ResourcesTaskTest.php +++ b/tests/Core/Tasks/ResourcesTaskTest.php @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/RoutesTaskTest.php b/tests/Core/Tasks/RoutesTaskTest.php index 11548ccfc..6bbd1b7a8 100644 --- a/tests/Core/Tasks/RoutesTaskTest.php +++ b/tests/Core/Tasks/RoutesTaskTest.php @@ -29,7 +29,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/ServicesTaskTest.php b/tests/Core/Tasks/ServicesTaskTest.php index 2b87c8695..07c5ea6c3 100644 --- a/tests/Core/Tasks/ServicesTaskTest.php +++ b/tests/Core/Tasks/ServicesTaskTest.php @@ -33,7 +33,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SourceOperationsTaskTest.php b/tests/Core/Tasks/SourceOperationsTaskTest.php index f1d421841..7185ba8c2 100644 --- a/tests/Core/Tasks/SourceOperationsTaskTest.php +++ b/tests/Core/Tasks/SourceOperationsTaskTest.php @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SshTaskTest.php b/tests/Core/Tasks/SshTaskTest.php index d4c96314a..62f38d2bf 100644 --- a/tests/Core/Tasks/SshTaskTest.php +++ b/tests/Core/Tasks/SshTaskTest.php @@ -30,7 +30,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/SupportTicketsTaskTest.php b/tests/Core/Tasks/SupportTicketsTaskTest.php index 041bcb6f3..319f93252 100644 --- a/tests/Core/Tasks/SupportTicketsTaskTest.php +++ b/tests/Core/Tasks/SupportTicketsTaskTest.php @@ -43,7 +43,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/TeamsTaskTest.php b/tests/Core/Tasks/TeamsTaskTest.php index 02fc411eb..205242a44 100644 --- a/tests/Core/Tasks/TeamsTaskTest.php +++ b/tests/Core/Tasks/TeamsTaskTest.php @@ -35,7 +35,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/UsersInvitationsTaskTest.php b/tests/Core/Tasks/UsersInvitationsTaskTest.php index 7bff8bb92..39f5f102b 100644 --- a/tests/Core/Tasks/UsersInvitationsTaskTest.php +++ b/tests/Core/Tasks/UsersInvitationsTaskTest.php @@ -32,7 +32,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/UsersTaskTest.php b/tests/Core/Tasks/UsersTaskTest.php index a9be83a97..5d4b8e79a 100644 --- a/tests/Core/Tasks/UsersTaskTest.php +++ b/tests/Core/Tasks/UsersTaskTest.php @@ -52,7 +52,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/VariablesTaskTest.php b/tests/Core/Tasks/VariablesTaskTest.php index 8e6154f49..efca604ce 100644 --- a/tests/Core/Tasks/VariablesTaskTest.php +++ b/tests/Core/Tasks/VariablesTaskTest.php @@ -33,7 +33,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() diff --git a/tests/Core/Tasks/WorkersTaskTest.php b/tests/Core/Tasks/WorkersTaskTest.php index e5e1b000d..20c9d2d3a 100644 --- a/tests/Core/Tasks/WorkersTaskTest.php +++ b/tests/Core/Tasks/WorkersTaskTest.php @@ -34,7 +34,13 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() @@ -50,7 +56,13 @@ protected function setUp(): void $upsunClient->environments = $environmentsTask; $apiClassParams = [ - static fn (bool $force = false): string => 'Bearer test-token', + new class implements \Upsun\Core\TokenProvider + { + public function __invoke(bool $force = false): string + { + return 'Bearer test-token'; + } + }, $this->httpClient, new Psr17Factory(), new ApiConfiguration() From cd94809dea598daa746f713c8cbda64433adc0e6 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 17:36:22 +0200 Subject: [PATCH 10/13] fix(templates): sync abstract_api.mustache import order with generated file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alphabetical use-statement order (matching PHPCS rule) was broken after introducing TokenProvider — `use {{invokerPackage}}\Core\TokenProvider;` was sitting between JsonException and Http\ imports. Now matches the order produced by phpcbf on AbstractApi.php. --- templates/php/abstract_api.mustache | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/php/abstract_api.mustache b/templates/php/abstract_api.mustache index 3f1591954..a13695b15 100644 --- a/templates/php/abstract_api.mustache +++ b/templates/php/abstract_api.mustache @@ -3,22 +3,22 @@ namespace {{invokerPackage}}\Api; use Exception; -use InvalidArgumentException; -use JsonException; -use {{invokerPackage}}\Core\TokenProvider; use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClientFactory; use Http\Discovery\Psr17FactoryDiscovery; +use InvalidArgumentException; +use JsonException; use Psr\Http\Client\ClientExceptionInterface; -use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamFactoryInterface; +use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UriFactoryInterface; -use {{apiPackage}}\Serializer\ObjectSerializer; use Psr\Http\Message\UriInterface; -use Psr\Http\Message\StreamInterface; +use {{apiPackage}}\Serializer\ObjectSerializer; +use {{invokerPackage}}\Core\TokenProvider; use function sprintf; From 7cc88150f0c5b277e0bd9a0c5af228d27a36ae09 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 17:38:23 +0200 Subject: [PATCH 11/13] style: fix:all cleanup + sync oauth_provider.mustache with generated code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix:all (phpcbf + rector + php-cs-fixer) applied: - OAuthProvider: remove redundant `use Upsun\Core\TokenProvider;` (same namespace) - 25 task test files: FQNS `\Upsun\Core\TokenProvider` → `use` import + short name oauth_provider.mustache synced with OAuthProvider.php: - use Fiber; import (was \Fiber FQNS) - class OAuthProvider implements TokenProvider - short Fiber name throughout (not \Fiber) - __invoke(bool $force = false): string method added --- src/Core/OAuthProvider.php | 1 - templates/php/oauth_provider.mustache | 31 ++++++++++++++----- tests/Core/Tasks/ActivitiesTaskTest.php | 3 +- tests/Core/Tasks/ApplicationsTaskTest.php | 3 +- tests/Core/Tasks/BackupsTaskTest.php | 3 +- tests/Core/Tasks/CertificatesTaskTest.php | 3 +- tests/Core/Tasks/DomainsTaskTest.php | 3 +- tests/Core/Tasks/EnvironmentsTaskTest.php | 3 +- tests/Core/Tasks/IntegrationsTaskTest.php | 3 +- tests/Core/Tasks/InvitationsTaskTest.php | 3 +- tests/Core/Tasks/MountsTaskTest.php | 3 +- tests/Core/Tasks/OperationsTaskTest.php | 3 +- tests/Core/Tasks/OrganizationsTaskTest.php | 3 +- tests/Core/Tasks/ProjectsTaskTest.php | 3 +- tests/Core/Tasks/RegionsTaskTest.php | 3 +- tests/Core/Tasks/RepositoriesTaskTest.php | 3 +- tests/Core/Tasks/ResourcesTaskTest.php | 3 +- tests/Core/Tasks/RoutesTaskTest.php | 3 +- tests/Core/Tasks/ServicesTaskTest.php | 3 +- tests/Core/Tasks/SourceOperationsTaskTest.php | 3 +- tests/Core/Tasks/SshTaskTest.php | 3 +- tests/Core/Tasks/SupportTicketsTaskTest.php | 3 +- tests/Core/Tasks/TeamsTaskTest.php | 3 +- tests/Core/Tasks/UsersInvitationsTaskTest.php | 3 +- tests/Core/Tasks/UsersTaskTest.php | 3 +- tests/Core/Tasks/VariablesTaskTest.php | 3 +- tests/Core/Tasks/WorkersTaskTest.php | 5 +-- 27 files changed, 75 insertions(+), 34 deletions(-) diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index 8b398981b..48ab1d727 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -8,7 +8,6 @@ use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; -use Upsun\Core\TokenProvider; /** * class (auto-generated) diff --git a/templates/php/oauth_provider.mustache b/templates/php/oauth_provider.mustache index 84e339009..7b0dfbace 100644 --- a/templates/php/oauth_provider.mustache +++ b/templates/php/oauth_provider.mustache @@ -3,10 +3,11 @@ namespace {{invokerPackage}}\Core; use Exception; +use Fiber; +use Nyholm\Psr7\Stream; +use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; -use Psr\Http\Client\ClientExceptionInterface; -use Nyholm\Psr7\Stream; /** * {{classname}} class (auto-generated) @@ -18,7 +19,7 @@ use Nyholm\Psr7\Stream; * - Re-entrance guard protects synchronous/Fiber contexts (FIX 5) * {{> partial_internal_header }} */ -class OAuthProvider +class OAuthProvider implements TokenProvider { private ?string $accessToken = null; private ?string $refreshToken = null; @@ -30,9 +31,9 @@ class OAuthProvider * When non-null, a Fiber is already acquiring a token; other Fibers suspend until it finishes. * In synchronous (FPM) contexts Fiber::getCurrent() returns null, so this is always null. * - * @var \Fiber|null + * @var Fiber|null */ - private ?\Fiber $acquiringFiber = null; + private ?Fiber $acquiringFiber = null; /** Effective refresh endpoint (defaults to tokenEndpoint when not provided). */ private readonly string $effectiveRefreshEndpoint; @@ -207,12 +208,12 @@ class OAuthProvider // then the token will be valid. In FPM/sync contexts this branch is // never taken because acquiringFiber is always null. while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { - \Fiber::getCurrent()?->suspend(); + Fiber::getCurrent()?->suspend(); } return; } - $this->acquiringFiber = \Fiber::getCurrent(); // null in sync (FPM) context + $this->acquiringFiber = Fiber::getCurrent(); // null in sync (FPM) context try { $this->doAcquireToken(); } finally { @@ -220,6 +221,22 @@ class OAuthProvider } } + /** + * TokenProvider implementation: return the Authorization header value. + * When `$force` is true, unconditionally re-acquires the token first (401 retry path). + * + * @throws Exception + */ + public function __invoke(bool $force = false): string + { + if ($force) { + $this->forceRefresh(); + return 'Bearer ' . $this->accessToken; + } + + return $this->getAuthorization(); + } + /** * @throws Exception */ diff --git a/tests/Core/Tasks/ActivitiesTaskTest.php b/tests/Core/Tasks/ActivitiesTaskTest.php index fa5b24ca3..cd7abc7bd 100644 --- a/tests/Core/Tasks/ActivitiesTaskTest.php +++ b/tests/Core/Tasks/ActivitiesTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -29,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/ApplicationsTaskTest.php b/tests/Core/Tasks/ApplicationsTaskTest.php index 5452e933d..06b1f4eba 100644 --- a/tests/Core/Tasks/ApplicationsTaskTest.php +++ b/tests/Core/Tasks/ApplicationsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use GuzzleHttp\Psr7\Response; use Nyholm\Psr7\Factory\Psr17Factory; use Psr\Http\Client\ClientInterface; @@ -30,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/BackupsTaskTest.php b/tests/Core/Tasks/BackupsTaskTest.php index 48418724e..0dd752dd4 100644 --- a/tests/Core/Tasks/BackupsTaskTest.php +++ b/tests/Core/Tasks/BackupsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -30,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/CertificatesTaskTest.php b/tests/Core/Tasks/CertificatesTaskTest.php index 7de9826a9..2421ca3ef 100644 --- a/tests/Core/Tasks/CertificatesTaskTest.php +++ b/tests/Core/Tasks/CertificatesTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -31,7 +32,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/DomainsTaskTest.php b/tests/Core/Tasks/DomainsTaskTest.php index e0a723c2f..cc162c7a5 100644 --- a/tests/Core/Tasks/DomainsTaskTest.php +++ b/tests/Core/Tasks/DomainsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -35,7 +36,7 @@ class_exists(ReplacementDomainStorage::class); $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/EnvironmentsTaskTest.php b/tests/Core/Tasks/EnvironmentsTaskTest.php index a46e3af65..6f72af8a2 100644 --- a/tests/Core/Tasks/EnvironmentsTaskTest.php +++ b/tests/Core/Tasks/EnvironmentsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -58,7 +59,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/IntegrationsTaskTest.php b/tests/Core/Tasks/IntegrationsTaskTest.php index 9c61388b8..9eeabac06 100644 --- a/tests/Core/Tasks/IntegrationsTaskTest.php +++ b/tests/Core/Tasks/IntegrationsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -32,7 +33,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/InvitationsTaskTest.php b/tests/Core/Tasks/InvitationsTaskTest.php index ebaf2e782..ff23c1716 100644 --- a/tests/Core/Tasks/InvitationsTaskTest.php +++ b/tests/Core/Tasks/InvitationsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -35,7 +36,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/MountsTaskTest.php b/tests/Core/Tasks/MountsTaskTest.php index 876bee0cb..9fe185b80 100644 --- a/tests/Core/Tasks/MountsTaskTest.php +++ b/tests/Core/Tasks/MountsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use GuzzleHttp\Psr7\Response; use Nyholm\Psr7\Factory\Psr17Factory; use Psr\Http\Client\ClientInterface; @@ -31,7 +32,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/OperationsTaskTest.php b/tests/Core/Tasks/OperationsTaskTest.php index 5f88b33ef..dd2b87200 100644 --- a/tests/Core/Tasks/OperationsTaskTest.php +++ b/tests/Core/Tasks/OperationsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -29,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/OrganizationsTaskTest.php b/tests/Core/Tasks/OrganizationsTaskTest.php index 24cf6fb2d..73d5a5e3c 100644 --- a/tests/Core/Tasks/OrganizationsTaskTest.php +++ b/tests/Core/Tasks/OrganizationsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -77,7 +78,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/ProjectsTaskTest.php b/tests/Core/Tasks/ProjectsTaskTest.php index 25453c78f..f64a0be93 100644 --- a/tests/Core/Tasks/ProjectsTaskTest.php +++ b/tests/Core/Tasks/ProjectsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -111,7 +112,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/RegionsTaskTest.php b/tests/Core/Tasks/RegionsTaskTest.php index bc7c6b713..c38e19fa4 100644 --- a/tests/Core/Tasks/RegionsTaskTest.php +++ b/tests/Core/Tasks/RegionsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -30,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/RepositoriesTaskTest.php b/tests/Core/Tasks/RepositoriesTaskTest.php index 65ce7f24c..a4871b850 100644 --- a/tests/Core/Tasks/RepositoriesTaskTest.php +++ b/tests/Core/Tasks/RepositoriesTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -35,7 +36,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/ResourcesTaskTest.php b/tests/Core/Tasks/ResourcesTaskTest.php index 8f2c5082e..ecee48fa8 100644 --- a/tests/Core/Tasks/ResourcesTaskTest.php +++ b/tests/Core/Tasks/ResourcesTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -30,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/RoutesTaskTest.php b/tests/Core/Tasks/RoutesTaskTest.php index 6bbd1b7a8..eb7fdd0a8 100644 --- a/tests/Core/Tasks/RoutesTaskTest.php +++ b/tests/Core/Tasks/RoutesTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -29,7 +30,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/ServicesTaskTest.php b/tests/Core/Tasks/ServicesTaskTest.php index 07c5ea6c3..dc7daec68 100644 --- a/tests/Core/Tasks/ServicesTaskTest.php +++ b/tests/Core/Tasks/ServicesTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use GuzzleHttp\Psr7\Response; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; @@ -33,7 +34,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/SourceOperationsTaskTest.php b/tests/Core/Tasks/SourceOperationsTaskTest.php index 7185ba8c2..9afbe67b1 100644 --- a/tests/Core/Tasks/SourceOperationsTaskTest.php +++ b/tests/Core/Tasks/SourceOperationsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -30,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/SshTaskTest.php b/tests/Core/Tasks/SshTaskTest.php index 62f38d2bf..3812394cc 100644 --- a/tests/Core/Tasks/SshTaskTest.php +++ b/tests/Core/Tasks/SshTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -30,7 +31,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/SupportTicketsTaskTest.php b/tests/Core/Tasks/SupportTicketsTaskTest.php index 319f93252..9b17bba0b 100644 --- a/tests/Core/Tasks/SupportTicketsTaskTest.php +++ b/tests/Core/Tasks/SupportTicketsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use DateTime; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; @@ -43,7 +44,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/TeamsTaskTest.php b/tests/Core/Tasks/TeamsTaskTest.php index 205242a44..de5540ba9 100644 --- a/tests/Core/Tasks/TeamsTaskTest.php +++ b/tests/Core/Tasks/TeamsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -35,7 +36,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/UsersInvitationsTaskTest.php b/tests/Core/Tasks/UsersInvitationsTaskTest.php index 39f5f102b..1f8160ec2 100644 --- a/tests/Core/Tasks/UsersInvitationsTaskTest.php +++ b/tests/Core/Tasks/UsersInvitationsTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -32,7 +33,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/UsersTaskTest.php b/tests/Core/Tasks/UsersTaskTest.php index 5d4b8e79a..c57dde745 100644 --- a/tests/Core/Tasks/UsersTaskTest.php +++ b/tests/Core/Tasks/UsersTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use BadMethodCallException; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; @@ -52,7 +53,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/VariablesTaskTest.php b/tests/Core/Tasks/VariablesTaskTest.php index efca604ce..479e056ae 100644 --- a/tests/Core/Tasks/VariablesTaskTest.php +++ b/tests/Core/Tasks/VariablesTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -33,7 +34,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { diff --git a/tests/Core/Tasks/WorkersTaskTest.php b/tests/Core/Tasks/WorkersTaskTest.php index 20c9d2d3a..96a88e1a7 100644 --- a/tests/Core/Tasks/WorkersTaskTest.php +++ b/tests/Core/Tasks/WorkersTaskTest.php @@ -2,6 +2,7 @@ namespace Upsun\Tests\Core\Tasks; +use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -34,7 +35,7 @@ protected function setUp(): void $upsunClient = $this->createMock(UpsunClient::class); $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { @@ -56,7 +57,7 @@ public function __invoke(bool $force = false): string $upsunClient->environments = $environmentsTask; $apiClassParams = [ - new class implements \Upsun\Core\TokenProvider + new class implements TokenProvider { public function __invoke(bool $force = false): string { From 3ac36671517df4b79d94bb4ac7f775244ffbc8d6 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 17:43:52 +0200 Subject: [PATCH 12/13] Fix lint --- tests/Core/Tasks/ActivitiesTaskTest.php | 2 +- tests/Core/Tasks/ApplicationsTaskTest.php | 2 +- tests/Core/Tasks/BackupsTaskTest.php | 2 +- tests/Core/Tasks/CertificatesTaskTest.php | 2 +- tests/Core/Tasks/DomainsTaskTest.php | 2 +- tests/Core/Tasks/EnvironmentsTaskTest.php | 2 +- tests/Core/Tasks/IntegrationsTaskTest.php | 2 +- tests/Core/Tasks/InvitationsTaskTest.php | 2 +- tests/Core/Tasks/MountsTaskTest.php | 2 +- tests/Core/Tasks/OperationsTaskTest.php | 2 +- tests/Core/Tasks/OrganizationsTaskTest.php | 2 +- tests/Core/Tasks/ProjectsTaskTest.php | 2 +- tests/Core/Tasks/RegionsTaskTest.php | 2 +- tests/Core/Tasks/RepositoriesTaskTest.php | 2 +- tests/Core/Tasks/ResourcesTaskTest.php | 2 +- tests/Core/Tasks/RoutesTaskTest.php | 2 +- tests/Core/Tasks/ServicesTaskTest.php | 2 +- tests/Core/Tasks/SourceOperationsTaskTest.php | 2 +- tests/Core/Tasks/SshTaskTest.php | 2 +- tests/Core/Tasks/SupportTicketsTaskTest.php | 2 +- tests/Core/Tasks/UsersInvitationsTaskTest.php | 2 +- tests/Core/Tasks/UsersTaskTest.php | 2 +- tests/Core/Tasks/VariablesTaskTest.php | 2 +- tests/Core/Tasks/WorkersTaskTest.php | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/Core/Tasks/ActivitiesTaskTest.php b/tests/Core/Tasks/ActivitiesTaskTest.php index cd7abc7bd..786ae56b7 100644 --- a/tests/Core/Tasks/ActivitiesTaskTest.php +++ b/tests/Core/Tasks/ActivitiesTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -12,6 +11,7 @@ use Upsun\Api\EnvironmentActivityApi; use Upsun\Api\ProjectActivityApi; use Upsun\Core\Tasks\ActivitiesTask; +use Upsun\Core\TokenProvider; use Upsun\UpsunClient; class ActivitiesTaskTest extends BaseTestCase diff --git a/tests/Core/Tasks/ApplicationsTaskTest.php b/tests/Core/Tasks/ApplicationsTaskTest.php index 06b1f4eba..6a8585bf7 100644 --- a/tests/Core/Tasks/ApplicationsTaskTest.php +++ b/tests/Core/Tasks/ApplicationsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use GuzzleHttp\Psr7\Response; use Nyholm\Psr7\Factory\Psr17Factory; use Psr\Http\Client\ClientInterface; @@ -12,6 +11,7 @@ use Upsun\Api\EnvironmentTypeApi; use Upsun\Core\Tasks\ApplicationsTask; use Upsun\Core\Tasks\EnvironmentsTask; +use Upsun\Core\TokenProvider; use Upsun\UpsunClient; class ApplicationsTaskTest extends BaseTestCase diff --git a/tests/Core/Tasks/BackupsTaskTest.php b/tests/Core/Tasks/BackupsTaskTest.php index 0dd752dd4..1794b2719 100644 --- a/tests/Core/Tasks/BackupsTaskTest.php +++ b/tests/Core/Tasks/BackupsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -11,6 +10,7 @@ use Upsun\Api\ApiException; use Upsun\Api\EnvironmentBackupsApi; use Upsun\Core\Tasks\BackupsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Backup; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/CertificatesTaskTest.php b/tests/Core/Tasks/CertificatesTaskTest.php index 2421ca3ef..6c11a6c50 100644 --- a/tests/Core/Tasks/CertificatesTaskTest.php +++ b/tests/Core/Tasks/CertificatesTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -12,6 +11,7 @@ use Upsun\Api\ApiException; use Upsun\Api\CertManagementApi; use Upsun\Core\Tasks\CertificatesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Certificate; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/DomainsTaskTest.php b/tests/Core/Tasks/DomainsTaskTest.php index cc162c7a5..991eb6274 100644 --- a/tests/Core/Tasks/DomainsTaskTest.php +++ b/tests/Core/Tasks/DomainsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -11,6 +10,7 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\DomainManagementApi; use Upsun\Core\Tasks\DomainsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\DomainPatch; use Upsun\Model\ProdDomainStorage; diff --git a/tests/Core/Tasks/EnvironmentsTaskTest.php b/tests/Core/Tasks/EnvironmentsTaskTest.php index 6f72af8a2..3cce0fca0 100644 --- a/tests/Core/Tasks/EnvironmentsTaskTest.php +++ b/tests/Core/Tasks/EnvironmentsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -28,6 +27,7 @@ use Upsun\Core\Tasks\RoutesTask; use Upsun\Core\Tasks\SourceOperationsTask; use Upsun\Core\Tasks\VariablesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; use Upsun\Model\Backup; diff --git a/tests/Core/Tasks/IntegrationsTaskTest.php b/tests/Core/Tasks/IntegrationsTaskTest.php index 9eeabac06..148ef8427 100644 --- a/tests/Core/Tasks/IntegrationsTaskTest.php +++ b/tests/Core/Tasks/IntegrationsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -12,6 +11,7 @@ use Upsun\Api\ApiException; use Upsun\Api\ThirdPartyIntegrationsApi; use Upsun\Core\Tasks\IntegrationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\GitHubIntegrationCreateInput; use Upsun\Model\GitHubIntegrationPatch; diff --git a/tests/Core/Tasks/InvitationsTaskTest.php b/tests/Core/Tasks/InvitationsTaskTest.php index ff23c1716..7229b69a0 100644 --- a/tests/Core/Tasks/InvitationsTaskTest.php +++ b/tests/Core/Tasks/InvitationsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -13,6 +12,7 @@ use Upsun\Api\OrganizationInvitationsApi; use Upsun\Api\ProjectInvitationsApi; use Upsun\Core\Tasks\UsersInvitationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\OrganizationInvitation; use Upsun\Model\ProjectInvitation; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/MountsTaskTest.php b/tests/Core/Tasks/MountsTaskTest.php index 9fe185b80..2b581c6dc 100644 --- a/tests/Core/Tasks/MountsTaskTest.php +++ b/tests/Core/Tasks/MountsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use GuzzleHttp\Psr7\Response; use Nyholm\Psr7\Factory\Psr17Factory; use Psr\Http\Client\ClientInterface; @@ -13,6 +12,7 @@ use Upsun\Api\EnvironmentTypeApi; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\MountsTask; +use Upsun\Core\TokenProvider; use Upsun\UpsunClient; class MountsTaskTest extends BaseTestCase diff --git a/tests/Core/Tasks/OperationsTaskTest.php b/tests/Core/Tasks/OperationsTaskTest.php index dd2b87200..48fc447c0 100644 --- a/tests/Core/Tasks/OperationsTaskTest.php +++ b/tests/Core/Tasks/OperationsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -11,6 +10,7 @@ use Upsun\Api\ApiException; use Upsun\Api\RuntimeOperationsApi; use Upsun\Core\Tasks\OperationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/OrganizationsTaskTest.php b/tests/Core/Tasks/OrganizationsTaskTest.php index 73d5a5e3c..adf4e9054 100644 --- a/tests/Core/Tasks/OrganizationsTaskTest.php +++ b/tests/Core/Tasks/OrganizationsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -36,6 +35,7 @@ use Upsun\Core\Tasks\ProjectsTask; use Upsun\Core\Tasks\TeamsTask; use Upsun\Core\Tasks\UsersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Address; use Upsun\Model\CanCreateNewOrgSubscription200Response; diff --git a/tests/Core/Tasks/ProjectsTaskTest.php b/tests/Core/Tasks/ProjectsTaskTest.php index f64a0be93..89295b2a8 100644 --- a/tests/Core/Tasks/ProjectsTaskTest.php +++ b/tests/Core/Tasks/ProjectsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -78,6 +77,7 @@ use Upsun\Core\Tasks\UsersTask; use Upsun\Core\Tasks\VariablesTask; use Upsun\Core\Tasks\WorkersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\Activity; use Upsun\Model\Certificate; diff --git a/tests/Core/Tasks/RegionsTaskTest.php b/tests/Core/Tasks/RegionsTaskTest.php index c38e19fa4..1754fac87 100644 --- a/tests/Core/Tasks/RegionsTaskTest.php +++ b/tests/Core/Tasks/RegionsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -12,6 +11,7 @@ use Upsun\Api\ApiException; use Upsun\Api\RegionsApi; use Upsun\Core\Tasks\RegionsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\Region; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/RepositoriesTaskTest.php b/tests/Core/Tasks/RepositoriesTaskTest.php index a4871b850..aa5002155 100644 --- a/tests/Core/Tasks/RepositoriesTaskTest.php +++ b/tests/Core/Tasks/RepositoriesTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -13,6 +12,7 @@ use Upsun\Api\RepositoryApi; use Upsun\Api\SystemInformationApi; use Upsun\Core\Tasks\RepositoriesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\Blob; use Upsun\Model\Commit; use Upsun\Model\Ref; diff --git a/tests/Core/Tasks/ResourcesTaskTest.php b/tests/Core/Tasks/ResourcesTaskTest.php index ecee48fa8..177a3b899 100644 --- a/tests/Core/Tasks/ResourcesTaskTest.php +++ b/tests/Core/Tasks/ResourcesTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; use Psr\Http\Client\ClientExceptionInterface; @@ -12,6 +11,7 @@ use Upsun\Api\AutoscalingApi; use Upsun\Api\DeploymentApi; use Upsun\Core\Tasks\ResourcesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/RoutesTaskTest.php b/tests/Core/Tasks/RoutesTaskTest.php index eb7fdd0a8..9b9573538 100644 --- a/tests/Core/Tasks/RoutesTaskTest.php +++ b/tests/Core/Tasks/RoutesTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -11,6 +10,7 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\RoutingApi; use Upsun\Core\Tasks\RoutesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\Route; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/ServicesTaskTest.php b/tests/Core/Tasks/ServicesTaskTest.php index dc7daec68..19e76e55a 100644 --- a/tests/Core/Tasks/ServicesTaskTest.php +++ b/tests/Core/Tasks/ServicesTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use GuzzleHttp\Psr7\Response; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; @@ -13,6 +12,7 @@ use Upsun\Api\EnvironmentTypeApi; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\ServicesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\ServicesValue; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/SourceOperationsTaskTest.php b/tests/Core/Tasks/SourceOperationsTaskTest.php index 9afbe67b1..3660060ef 100644 --- a/tests/Core/Tasks/SourceOperationsTaskTest.php +++ b/tests/Core/Tasks/SourceOperationsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -11,6 +10,7 @@ use Upsun\Api\ApiConfiguration; use Upsun\Api\SourceOperationsApi; use Upsun\Core\Tasks\SourceOperationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentSourceOperation; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/SshTaskTest.php b/tests/Core/Tasks/SshTaskTest.php index 3812394cc..9d1ca2751 100644 --- a/tests/Core/Tasks/SshTaskTest.php +++ b/tests/Core/Tasks/SshTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -12,6 +11,7 @@ use Upsun\Api\ApiException; use Upsun\Api\SshKeysApi; use Upsun\Core\Tasks\SshTask; +use Upsun\Core\TokenProvider; use Upsun\Model\SshKey; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/SupportTicketsTaskTest.php b/tests/Core/Tasks/SupportTicketsTaskTest.php index 9b17bba0b..a44cef3ba 100644 --- a/tests/Core/Tasks/SupportTicketsTaskTest.php +++ b/tests/Core/Tasks/SupportTicketsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use DateTime; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; @@ -22,6 +21,7 @@ use Upsun\Api\ThirdPartyIntegrationsApi; use Upsun\Core\Tasks\ProjectsTask; use Upsun\Core\Tasks\SupportTicketsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\ListTicketCategories200ResponseInner; use Upsun\Model\ListTicketPriorities200ResponseInner; use Upsun\Model\ListTickets200Response; diff --git a/tests/Core/Tasks/UsersInvitationsTaskTest.php b/tests/Core/Tasks/UsersInvitationsTaskTest.php index 1f8160ec2..90cfe7997 100644 --- a/tests/Core/Tasks/UsersInvitationsTaskTest.php +++ b/tests/Core/Tasks/UsersInvitationsTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use InvalidArgumentException; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -13,6 +12,7 @@ use Upsun\Api\OrganizationInvitationsApi; use Upsun\Api\ProjectInvitationsApi; use Upsun\Core\Tasks\UsersInvitationsTask; +use Upsun\Core\TokenProvider; use Upsun\Model\OrganizationInvitation; use Upsun\Model\ProjectInvitation; use Upsun\UpsunClient; diff --git a/tests/Core/Tasks/UsersTaskTest.php b/tests/Core/Tasks/UsersTaskTest.php index c57dde745..7e3cbabfb 100644 --- a/tests/Core/Tasks/UsersTaskTest.php +++ b/tests/Core/Tasks/UsersTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use BadMethodCallException; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; @@ -20,6 +19,7 @@ use Upsun\Api\UserProfilesApi; use Upsun\Api\UsersApi; use Upsun\Core\Tasks\UsersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\ApiToken; use Upsun\Model\ConfirmTotpEnrollment200Response; use Upsun\Model\Connection; diff --git a/tests/Core/Tasks/VariablesTaskTest.php b/tests/Core/Tasks/VariablesTaskTest.php index 479e056ae..177cd96e0 100644 --- a/tests/Core/Tasks/VariablesTaskTest.php +++ b/tests/Core/Tasks/VariablesTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -13,6 +12,7 @@ use Upsun\Api\EnvironmentVariablesApi; use Upsun\Api\ProjectVariablesApi; use Upsun\Core\Tasks\VariablesTask; +use Upsun\Core\TokenProvider; use Upsun\Model\AcceptedResponse; use Upsun\Model\EnvironmentVariable; use Upsun\Model\ProjectVariable; diff --git a/tests/Core/Tasks/WorkersTaskTest.php b/tests/Core/Tasks/WorkersTaskTest.php index 96a88e1a7..1a2c2714a 100644 --- a/tests/Core/Tasks/WorkersTaskTest.php +++ b/tests/Core/Tasks/WorkersTaskTest.php @@ -2,7 +2,6 @@ namespace Upsun\Tests\Core\Tasks; -use Upsun\Core\TokenProvider; use Exception; use Nyholm\Psr7\Factory\Psr17Factory; use Nyholm\Psr7\Response; @@ -16,6 +15,7 @@ use Upsun\Api\EnvironmentTypeApi; use Upsun\Core\Tasks\EnvironmentsTask; use Upsun\Core\Tasks\WorkersTask; +use Upsun\Core\TokenProvider; use Upsun\Model\WorkersValue; use Upsun\UpsunClient; From 5b0dc30998e3de8e9533ceab1673cf821a3cbfd7 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 4 Jun 2026 17:55:01 +0200 Subject: [PATCH 13/13] fix(fiber): use canonical Fiber::suspend() static call instead of nullsafe instance call Fiber::suspend() is a static method. Calling it via a nullsafe instance reference ($fiber?->suspend()) is technically valid but a PHP anti-pattern (calling static methods on instances). The correct form is: if (Fiber::getCurrent() !== null) { Fiber::suspend(); } This is explicit about the guard intent and avoids potential deprecation warnings from static-via-instance call patterns. --- src/Core/OAuthProvider.php | 4 +++- templates/php/oauth_provider.mustache | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Core/OAuthProvider.php b/src/Core/OAuthProvider.php index 48ab1d727..a523e97dc 100644 --- a/src/Core/OAuthProvider.php +++ b/src/Core/OAuthProvider.php @@ -205,7 +205,9 @@ public function ensureValidToken(): void // then the token will be valid. In FPM/sync contexts this branch is // never taken because acquiringFiber is always null. while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { - Fiber::getCurrent()?->suspend(); + if (Fiber::getCurrent() !== null) { + Fiber::suspend(); + } } return; } diff --git a/templates/php/oauth_provider.mustache b/templates/php/oauth_provider.mustache index 7b0dfbace..ad52bebc8 100644 --- a/templates/php/oauth_provider.mustache +++ b/templates/php/oauth_provider.mustache @@ -208,7 +208,9 @@ class OAuthProvider implements TokenProvider // then the token will be valid. In FPM/sync contexts this branch is // never taken because acquiringFiber is always null. while ($this->acquiringFiber !== null && !$this->acquiringFiber->isTerminated()) { - Fiber::getCurrent()?->suspend(); + if (Fiber::getCurrent() !== null) { + Fiber::suspend(); + } } return; }