Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 53 additions & 69 deletions clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/GitHubEnterpriseCloud/src/Client.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/GitHubEnterpriseCloud/src/ClientInterface.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
$properties['archivedAt'] = $value;

after_archivedAt:

$value = $payload['deploy_keys_enabled_for_repositories'] ?? null;

if ($value === null) {
$properties['deployKeysEnabledForRepositories'] = null;
goto after_deployKeysEnabledForRepositories;
}

$properties['deployKeysEnabledForRepositories'] = $value;

after_deployKeysEnabledForRepositories:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationFull', $exception, stack: $this->hydrationStack);
}
Expand Down Expand Up @@ -1313,6 +1324,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou

after_archivedAt: $result['archived_at'] = $archivedAt;

$deployKeysEnabledForRepositories = $object->deployKeysEnabledForRepositories;

if ($deployKeysEnabledForRepositories === null) {
goto after_deployKeysEnabledForRepositories;
}

after_deployKeysEnabledForRepositories: $result['deploy_keys_enabled_for_repositories'] = $deployKeysEnabledForRepositories;

return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Hydrator\Operation\Orgs\Org\Copilot\Billing;

use ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok;
use EventSauce\ObjectHydrator\IterableList;
use EventSauce\ObjectHydrator\ObjectMapper;
use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems;
Expand Down Expand Up @@ -39,14 +40,14 @@ public function __construct()
public function hydrateObject(string $className, array $payload): object
{
return match ($className) {
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok($payload),
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
};
}

private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json(array $payload): Json
private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created(array $payload): Created
{
$properties = [];
$missingFields = [];
Expand All @@ -62,17 +63,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S

after_seatsCreated:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created', $exception, stack: $this->hydrationStack);
}

if (count($missingFields) > 0) {
throw UnableToHydrateObject::dueToMissingFields(Json::class, $missingFields, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToMissingFields(Created::class, $missingFields, stack: $this->hydrationStack);
}

try {
return new Json(...$properties);
return new Created(...$properties);
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created', $exception, stack: $this->hydrationStack);
}
}

Expand Down Expand Up @@ -139,7 +140,7 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
}
}

private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(array $payload): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json
private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok
{
$properties = [];
$missingFields = [];
Expand All @@ -155,17 +156,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S

after_seatsCancelled:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack);
}

if (count($missingFields) > 0) {
throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json::class, $missingFields, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack);
}

try {
return new \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json(...$properties);
return new Ok(...$properties);
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack);
}
}

Expand Down Expand Up @@ -200,9 +201,9 @@ public function serializeObjectOfType(object $object, string $className): mixed
'DateTime' => $this->serializeValueDateTime($object),
'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object),
'DateTimeInterface' => $this->serializeValueDateTimeInterface($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok($object),
default => throw new LogicException("No serialization defined for $className"),
};
} catch (Throwable $exception) {
Expand Down Expand Up @@ -265,9 +266,9 @@ private function serializeValueDateTimeInterface(mixed $value): mixed
return $serializer->serialize($value, $this);
}

private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created⚡️Application⚡️Json(mixed $object): mixed
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️AddCopilotSeatsForUsers⚡️Response⚡️ApplicationJson⚡️Created(mixed $object): mixed
{
assert($object instanceof Json);
assert($object instanceof Created);
$result = [];

$seatsCreated = $object->seatsCreated;
Expand Down Expand Up @@ -316,9 +317,9 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
return $result;
}

private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(mixed $object): mixed
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Copilot⚡️CancelCopilotSeatAssignmentForUsers⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed
{
assert($object instanceof \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json);
assert($object instanceof Ok);
$result = [];

$seatsCancelled = $object->seatsCancelled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
$properties['lastUsed'] = $value;

after_lastUsed:

$value = $payload['enabled'] ?? null;

if ($value === null) {
$properties['enabled'] = null;
goto after_enabled;
}

$properties['enabled'] = $value;

after_enabled:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\DeployKey', $exception, stack: $this->hydrationStack);
}
Expand Down Expand Up @@ -352,6 +363,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou

after_lastUsed: $result['last_used'] = $lastUsed;

$enabled = $object->enabled;

if ($enabled === null) {
goto after_enabled;
}

after_enabled: $result['enabled'] = $enabled;

return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
$properties['lastUsed'] = $value;

after_lastUsed:

$value = $payload['enabled'] ?? null;

if ($value === null) {
$properties['enabled'] = null;
goto after_enabled;
}

$properties['enabled'] = $value;

after_enabled:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\DeployKey', $exception, stack: $this->hydrationStack);
}
Expand Down Expand Up @@ -363,6 +374,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou

after_lastUsed: $result['last_used'] = $lastUsed;

$enabled = $object->enabled;

if ($enabled === null) {
goto after_enabled;
}

after_enabled: $result['enabled'] = $enabled;

return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
$properties['verified'] = $value;

after_verified:

$value = $payload['enabled'] ?? null;

if ($value === null) {
$properties['enabled'] = null;
goto after_enabled;
}

$properties['enabled'] = $value;

after_enabled:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhooksDeployKey', $exception, stack: $this->hydrationStack);
}
Expand Down Expand Up @@ -3977,6 +3988,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
$verified = $object->verified;
after_verified: $result['verified'] = $verified;

$enabled = $object->enabled;

if ($enabled === null) {
goto after_enabled;
}

after_enabled: $result['enabled'] = $enabled;

return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S

after_tokenId:

$value = $payload['token_name'] ?? null;

if ($value === null) {
$missingFields[] = 'token_name';
goto after_tokenName;
}

$properties['tokenName'] = $value;

after_tokenName:

$value = $payload['token_expired'] ?? null;

if ($value === null) {
Expand Down Expand Up @@ -1992,6 +2003,9 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
$tokenId = $object->tokenId;
after_tokenId: $result['token_id'] = $tokenId;

$tokenName = $object->tokenName;
after_tokenName: $result['token_name'] = $tokenName;

$tokenExpired = $object->tokenExpired;
after_tokenExpired: $result['token_expired'] = $tokenExpired;

Expand Down
Loading
Loading