Skip to content

Commit

Permalink
Merge pull request #1523 from php-api-clients/GitHubEnterpriseCloud/f…
Browse files Browse the repository at this point in the history
…rom-1.1.4-e8e191683d6dfdf9b336e7b70932841c-from-1.1.4-e8e191683d6dfdf9b336e7b70932841c
  • Loading branch information
WyriHaximus authored Feb 13, 2025
2 parents e082f5c + fb8cb9c commit bd7a1e2
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 71 deletions.
34 changes: 17 additions & 17 deletions clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"specHash": "aa1162e8505efc555be8f6dd8c43e5bd",
"specHash": "e8e191683d6dfdf9b336e7b70932841c",
"generatedFiles": {
"files": [
{
Expand Down Expand Up @@ -5880,7 +5880,7 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
"hash": "7337b63b40e43a7ab4fc91a22e161750"
"hash": "130042383c5aa05a52281022e90e3279"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Actions.php",
Expand Down Expand Up @@ -5932,7 +5932,7 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Orgs.php",
"hash": "faae510999154371d5098311c2e9762c"
"hash": "f03a8a11b7564a3243f41f75dba649f1"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Oidc.php",
Expand Down Expand Up @@ -5964,7 +5964,7 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php",
"hash": "cf030e3d54061adbb5c82811d325d8c8"
"hash": "3c426094dad68b9152f3ab91dece0856"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php",
Expand Down Expand Up @@ -12042,13 +12042,9 @@
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRuleDetailed.php",
"hash": "7ad5bee2d05299f118389d2b364c9160"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CopilotSeatBreakdown.php",
"hash": "b9cd7833d09e495f6da2ae8b4b45281a"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationDetails.php",
"hash": "315efe2685fbad5a698a485a92dccce0"
"hash": "fe7d51cd7adf55007125d07dbf2b3554"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CopilotSeatDetails.php",
Expand Down Expand Up @@ -26020,7 +26016,7 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/EnterpriseAdmin.php",
"hash": "aeaf8a8fbb276d98121d05e97a7acd1b"
"hash": "091be6da5e86079717193d21053b4453"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/AnnouncementBanners.php",
Expand Down Expand Up @@ -26536,7 +26532,7 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
"hash": "d8f09dbc2342b125044e95e9973f6d52"
"hash": "8e265f765978087244e8b8f3f68ae7eb"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
Expand Down Expand Up @@ -27184,7 +27180,7 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing.php",
"hash": "8409d7d2f07a2b9872adafaf648e10e1"
"hash": "1df952014d52ef1e43d549bf0287032c"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing\/Seats.php",
Expand Down Expand Up @@ -28912,15 +28908,15 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
"hash": "b618373a67c1b831d08ea5b2391b54f1"
"hash": "802223b2d9635be2a3d1491c44f2dbed"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php",
"hash": "ee00e2d201fccc180e6d065686a8fc1c"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php",
"hash": "1ec134803413b6c8f62f1dc5a15ee898"
"hash": "8104a6828e36304a8f6b848a0eaa8394"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterpriseTest.php",
Expand Down Expand Up @@ -28992,7 +28988,7 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/EnterpriseAdmin\/ListProvisionedIdentitiesEnterprise.php",
"hash": "fbe4dc8c4e89e0b8f483416c0b77ad1e"
"hash": "0e8e3aace8e45c3fb630495772ecd317"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedIdentitiesEnterpriseTest.php",
Expand Down Expand Up @@ -29708,11 +29704,11 @@
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
"hash": "e9478f458cf8e2989ba95971657e46be"
"hash": "4589549fec8bfd220ad15aa38611a81d"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
"hash": "c7fdc33f1caa5ed1f6038aebbf6960af"
"hash": "00d30ffff5201893a463ed144d33b0c3"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
Expand Down Expand Up @@ -35057,6 +35053,10 @@
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookCodeScanningAlertClosedByUser\/Alert\/DismissalApprovedBy.php",
"hash": "fc5d33769ec29362f22f3d2abc94e408"
},
{
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationSeatBreakdown.php",
"hash": "ae9b75aa40c504807916598c96e7569a"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationDetails;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatBreakdown;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationSeatBreakdown;
use EventSauce\ObjectHydrator\IterableList;
use EventSauce\ObjectHydrator\ObjectMapper;
use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems;
Expand Down Expand Up @@ -43,7 +43,7 @@ public function hydrateObject(string $className, array $payload): object
{
return match ($className) {
'ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationDetails' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationDetails($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatBreakdown' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotSeatBreakdown($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationSeatBreakdown' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationSeatBreakdown($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload),
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
};
Expand All @@ -64,7 +64,7 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
if (is_array($value)) {
try {
$this->hydrationStack[] = 'seatBreakdown';
$value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotSeatBreakdown($value);
$value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationSeatBreakdown($value);
} finally {
array_pop($this->hydrationStack);
}
Expand Down Expand Up @@ -154,7 +154,7 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
}
}

private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotSeatBreakdown(array $payload): CopilotSeatBreakdown
private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationSeatBreakdown(array $payload): CopilotOrganizationSeatBreakdown
{
$properties = [];
$missingFields = [];
Expand Down Expand Up @@ -225,17 +225,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S

after_inactiveThisCycle:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatBreakdown', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationSeatBreakdown', $exception, stack: $this->hydrationStack);
}

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

try {
return new CopilotSeatBreakdown(...$properties);
return new CopilotOrganizationSeatBreakdown(...$properties);
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatBreakdown', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationSeatBreakdown', $exception, stack: $this->hydrationStack);
}
}

Expand Down Expand Up @@ -334,7 +334,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object),
'DateTimeInterface' => $this->serializeValueDateTimeInterface($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationDetails' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationDetails($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatBreakdown' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotSeatBreakdown($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationSeatBreakdown' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationSeatBreakdown($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object),
default => throw new LogicException("No serialization defined for $className"),
};
Expand Down Expand Up @@ -404,7 +404,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
$result = [];

$seatBreakdown = $object->seatBreakdown;
$seatBreakdown = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotSeatBreakdown($seatBreakdown);
$seatBreakdown = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationSeatBreakdown($seatBreakdown);
after_seatBreakdown: $result['seat_breakdown'] = $seatBreakdown;

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

private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotSeatBreakdown(mixed $object): mixed
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CopilotOrganizationSeatBreakdown(mixed $object): mixed
{
assert($object instanceof CopilotSeatBreakdown);
assert($object instanceof CopilotOrganizationSeatBreakdown);
$result = [];

$total = $object->total;
Expand Down
4 changes: 2 additions & 2 deletions clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ public function hydrateObject(string $className, array $payload): object
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodespacesPublicKey' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀PublicKey()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodespacesOrgSecret' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Codespaces\\ListSelectedReposForOrgSecret\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName🌀Repositories()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotOrganizationSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\ListCopilotSeats\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀Seats()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\AddCopilotSeatsForTeams\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForTeams\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedTeams()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\AddCopilotSeatsForUsers\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForUsers\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedUsers()->hydrateObject($className, $payload),
Expand Down Expand Up @@ -1368,7 +1368,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodespacesPublicKey' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀PublicKey()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodespacesOrgSecret' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Codespaces\\ListSelectedReposForOrgSecret\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀SecretName🌀Repositories()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotOrganizationDetails', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CopilotOrganizationSeatBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\ListCopilotSeats\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀Seats()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\AddCopilotSeatsForTeams\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForTeams\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedTeams()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\AddCopilotSeatsForUsers\\Response\\ApplicationJson\\Created', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\CancelCopilotSeatAssignmentForUsers\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Copilot🌀Billing🌀SelectedUsers()->serializeObject($object),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
{
}

/** @return */
public function call(string $filter, string $excludedAttributes, string $enterprise, int $startIndex = 1, int $count = 30): ScimEnterpriseGroupList|WithoutBody
{
$operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\EnterpriseAdmin\ListProvisionedGroupsEnterprise($this->responseSchemaValidator, $this->hydrator, $filter, $excludedAttributes, $enterprise, $startIndex, $count);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
{
}

/** @return */
public function call(string $filter, string $enterprise, int $startIndex = 1, int $count = 30): ScimEnterpriseUserList|WithoutBody
{
$operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\EnterpriseAdmin\ListProvisionedIdentitiesEnterprise($this->responseSchemaValidator, $this->hydrator, $filter, $enterprise, $startIndex, $count);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ public function getEnterpriseRulesetHistory(array $params): iterable
return $operator->call($arguments['enterprise'], $arguments['ruleset_id'], $arguments['per_page'], $arguments['page']);
}

/** @return */
public function listProvisionedGroupsEnterprise(array $params): ScimEnterpriseGroupList|WithoutBody
{
$arguments = [];
Expand Down Expand Up @@ -555,6 +556,7 @@ public function listProvisionedGroupsEnterprise(array $params): ScimEnterpriseGr
return $operator->call($arguments['filter'], $arguments['excludedAttributes'], $arguments['enterprise'], $arguments['startIndex'], $arguments['count']);
}

/** @return */
public function listProvisionedIdentitiesEnterprise(array $params): ScimEnterpriseUserList|WithoutBody
{
$arguments = [];
Expand Down
Loading

0 comments on commit bd7a1e2

Please sign in to comment.