diff --git a/clients/GitHub/README.md b/clients/GitHub/README.md index bd35d588115..801d7311a19 100644 --- a/clients/GitHub/README.md +++ b/clients/GitHub/README.md @@ -2678,6 +2678,216 @@ $client->operations()->actions()->getActionsCacheUsageByRepoForOrg( org: You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization). +### actions/list-hosted-runners-for-org + +List GitHub-hosted runners for an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/hosted-runners', [ + 'org' => 'generated', + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->actions()->listHostedRunnersForOrg( org: 'generated', + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#list-github-hosted-runners-for-an-organization). + + +### actions/create-hosted-runner-for-org + +Create a GitHub-hosted runner for an organization + +Using the `call` method: +```php +$client->call('POST /orgs/{org}/actions/hosted-runners', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->actions()->createHostedRunnerForOrg( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#create-a-github-hosted-runner-for-an-organization). + + +### actions/get-hosted-runners-github-owned-images-for-org + +Get GitHub-owned images for GitHub-hosted runners in an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/hosted-runners/images/github-owned', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->actions()->getHostedRunnersGithubOwnedImagesForOrg( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#get-github-owned-images-for-github-hosted-runners-in-an-organization). + + +### actions/get-hosted-runners-partner-images-for-org + +Get partner images for GitHub-hosted runners in an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/hosted-runners/images/partner', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->actions()->getHostedRunnersPartnerImagesForOrg( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#get-partner-images-for-github-hosted-runners-in-an-organization). + + +### actions/get-hosted-runners-limits-for-org + +Get limits on GitHub-hosted runners for an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/hosted-runners/limits', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->actions()->getHostedRunnersLimitsForOrg( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#get-limits-on-github-hosted-runners-for-an-organization). + + +### actions/get-hosted-runners-machine-specs-for-org + +Get GitHub-hosted runners machine specs for an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/hosted-runners/machine-sizes', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->actions()->getHostedRunnersMachineSpecsForOrg( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#get-github-hosted-runners-machine-specs-for-an-organization). + + +### actions/get-hosted-runners-platforms-for-org + +Get platforms for GitHub-hosted runners in an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/hosted-runners/platforms', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->actions()->getHostedRunnersPlatformsForOrg( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#get-platforms-for-github-hosted-runners-in-an-organization). + + +### actions/get-hosted-runner-for-org + +Get a GitHub-hosted runner for an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}', [ + 'org' => 'generated', + 'hosted_runner_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->actions()->getHostedRunnerForOrg( org: 'generated', + hosted_runner_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#get-a-github-hosted-runner-for-an-organization). + + +### actions/delete-hosted-runner-for-org + +Delete a GitHub-hosted runner for an organization + +Using the `call` method: +```php +$client->call('DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}', [ + 'org' => 'generated', + 'hosted_runner_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->actions()->deleteHostedRunnerForOrg( org: 'generated', + hosted_runner_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#delete-a-github-hosted-runner-for-an-organization). + + +### actions/update-hosted-runner-for-org + +Update a GitHub-hosted runner for an organization + +Using the `call` method: +```php +$client->call('PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}', [ + 'org' => 'generated', + 'hosted_runner_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->actions()->updateHostedRunnerForOrg( org: 'generated', + hosted_runner_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/hosted-runners#update-a-github-hosted-runner-for-an-organization). + + ### oidc/get-oidc-custom-sub-template-for-org Get the customization template for an OIDC subject claim for an organization @@ -3038,6 +3248,32 @@ $client->operations()->actions()->updateSelfHostedRunnerGroupForOrg( org: You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-organization). +### actions/list-github-hosted-runners-in-group-for-org + +List GitHub-hosted runners in a group for an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners', [ + 'org' => 'generated', + 'runner_group_id' => 15, + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->actions()->listGithubHostedRunnersInGroupForOrg( org: 'generated', + runner_group_id: 15, + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/actions/self-hosted-runner-groups#list-github-hosted-runners-in-a-group-for-an-organization). + + ### actions/list-repo-access-to-self-hosted-runner-group-in-org List repository access to a self-hosted runner group in an organization diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index 1ee491e5221..34c00513aa9 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "2fa68ef1401ab1f8ecec407bb7c5d77b", + "specHash": "46eadb305342d3e08e981c8d774b0cb1", "generatedFiles": { "files": [ { @@ -12,7 +12,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Integration.php", - "hash": "4af28f53526f4dd4a7bd12c14a67d735" + "hash": "3f006c92313a9a47e185eb095c751b01" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/BasicError.php", @@ -196,15 +196,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Issue.php", - "hash": "1683cc71fcddef2b84ff30fee78b98a5" + "hash": "97938b7af1ccd9745e480b15b4b7bdac" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/IssueComment.php", - "hash": "e215f455cd4058d63e81e45fce6c06a9" + "hash": "86535eef98496533e153e5a440a77f2c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Event.php", - "hash": "7c5b70c046446fd58bc9e6a9f4e7e167" + "hash": "e4d79e332bf5ebdf4ebdb15321843f33" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/LinkWithType.php", @@ -756,7 +756,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Deployment.php", - "hash": "97f36fed69e64f323baa0c75fa0c7438" + "hash": "9a1ed2fa480427a88668d04c6633a237" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WorkflowRunUsage.php", @@ -780,7 +780,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranchPullRequestReview.php", - "hash": "37f79e379dc76a5b9a8b8f0cd712f2ad" + "hash": "e30f810054c39e2ab7b9d13bb9401092" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/BranchRestrictionPolicy.php", @@ -788,11 +788,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/BranchProtection.php", - "hash": "efb90bb2e0ef4749457bf61e41d0641d" + "hash": "4dceaa6ef73dc773712e6dc57e96c919" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ShortBranch.php", - "hash": "e497646b9cbcedaf50522b21ece4e274" + "hash": "d12172d4cc58c8831d979ed818ad1e8a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/GitUser.php", @@ -812,7 +812,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/BranchWithProtection.php", - "hash": "54714fd004195550c61ed3c30be086ee" + "hash": "255c4d2d3cd09360e4a8997f21dbd266" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/StatusCheckPolicy.php", @@ -820,15 +820,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranch.php", - "hash": "bcfa5522a8ed26443ba38cf57ddd63f9" + "hash": "f8c6299e1565803bcb5eb8c7c3dd1a3e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DeploymentSimple.php", - "hash": "8cb43387cb6009e24bbde98530107d78" + "hash": "15fe36dedad1e657207c6a9051ee0989" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CheckRun.php", - "hash": "6d3f14235fc54cfe5e505b447baa39b3" + "hash": "95eb6f6256171f3e95b1c0c33af77345" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CheckAnnotation.php", @@ -836,7 +836,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CheckSuite.php", - "hash": "b4978ef4bfc06cf01d25c8294ed030ad" + "hash": "7ae3cd7aa64f8c70848553e1a958508b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CheckSuitePreference.php", @@ -1040,7 +1040,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DeploymentStatus.php", - "hash": "55cc37f3470e41832b9eb676b1d318fa" + "hash": "86d5c5073d3319ba94281dc76feba070" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WaitTimer.php", @@ -1136,71 +1136,71 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/IssueEvent.php", - "hash": "60232cd90afe561e4a58a7ef4b8bf727" + "hash": "13485b84e7e185c35e3acc73aa15a55c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/LabeledIssueEvent.php", - "hash": "60f93b1959026c623f5905fd233d9da0" + "hash": "415ffcc42a91c0b22ccc300ff0172f3c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/UnlabeledIssueEvent.php", - "hash": "72e16c1ee43b46fd06420adfba963b8b" + "hash": "7a374f48e6b19b6b6872f4a83dc79eda" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AssignedIssueEvent.php", - "hash": "5e7f8b4b70a42c93a222078a5aa9a637" + "hash": "b7269caa0ed4c46deabc2c89c2c15046" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/UnassignedIssueEvent.php", - "hash": "967c6a084794d4bd491f3e7e999eaaa2" + "hash": "878f1fa2a35ebbdbe1e6dfa512727459" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/MilestonedIssueEvent.php", - "hash": "d0327b30a98cca627af9b0b31ffb97ed" + "hash": "2ae8d5dda3dbc1198379aabe04341d74" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DemilestonedIssueEvent.php", - "hash": "f5444fa836349e8c7fbac6a45da9450d" + "hash": "d5ca2ec14dfe7126edb71dbaa36453a8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RenamedIssueEvent.php", - "hash": "aee4f11dd4aa457865a9412bc940e54a" + "hash": "ae388c79c2c822a310c2728ff8a046ba" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ReviewRequestedIssueEvent.php", - "hash": "d561efdf627779cfbd0ce423b106d6da" + "hash": "e0555f855ec969129cfeccf4017a97c3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ReviewRequestRemovedIssueEvent.php", - "hash": "b5b20300c26d2f082efe66777526216a" + "hash": "743dfc3b06bde956251e25b2f671eb20" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ReviewDismissedIssueEvent.php", - "hash": "d0bea35c3a140fadd8cd435748d46070" + "hash": "6d5c6145d81f6056fd2fbf901809c074" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/LockedIssueEvent.php", - "hash": "1d772cf49ee0c3d8ff0ebfc4af0bacea" + "hash": "5a86f7996f3b937f32967f5b189e80c7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AddedToProjectIssueEvent.php", - "hash": "3b0e9f17c5a8242e83169c1bb54ac774" + "hash": "2f3fcc5e15bd7d7ef72d44604d19f4e9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/MovedColumnInProjectIssueEvent.php", - "hash": "3ed72ca3b4738d761553518082e1b32e" + "hash": "e4d3667348e765a3db81e6f6d291ebf9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RemovedFromProjectIssueEvent.php", - "hash": "aa460b4947af2e8b7a1d00f455777eeb" + "hash": "b1e2f85aa5a7e6a4224ecbda2ed04f07" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ConvertedNoteToIssueIssueEvent.php", - "hash": "b37f8d45469604f2e88e09286c958b0a" + "hash": "e8b0ace86b7b6d85650344e4347ebdfa" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/IssueEventForIssue.php", - "hash": "a70d3a2a4fbc015a784228bc5e525a0c" + "hash": "f33d4118f3bcd69dafa9a5291d0e6e74" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Label.php", @@ -1208,11 +1208,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineCommentEvent.php", - "hash": "32e009f8cd11bce1cc4eac11d87ffd05" + "hash": "426915e303af7408ae66702aaef55f22" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineCrossReferencedEvent.php", - "hash": "2ac95f63dbc9e7b2254082fdd9316a4f" + "hash": "6711f5ecfe09899873a2b82c008de2c6" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineCommittedEvent.php", @@ -1236,19 +1236,19 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineAssignedIssueEvent.php", - "hash": "d9b29b39f88d49b23dfaf1e67d68f6cd" + "hash": "30fc4a46daa0545228e32e5b3bd8c664" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineUnassignedIssueEvent.php", - "hash": "fb698aca160e3a32056203e600ba6357" + "hash": "5e613a9bc3e12dcd689b4e4e8a77f5cd" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/StateChangeIssueEvent.php", - "hash": "e836e12581c8d70525b1cb12ce70bd84" + "hash": "e7224579c3e2aef5abc1553ced602959" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineIssueEvents.php", - "hash": "a0eabb7433a24ca8c4db2cefdf7b4b50" + "hash": "35bbc5a6afde6b2757a90cd9ad22649c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DeployKey.php", @@ -1456,7 +1456,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/IssueSearchResultItem.php", - "hash": "24027f0eae1b6dd53dcf4b88cbdaa2f8" + "hash": "c5affc7930aa2af5e662dd95a231797c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/LabelSearchResultItem.php", @@ -1540,11 +1540,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SimpleCheckSuite.php", - "hash": "f507c406fbc96adfe2f81c48d7f2e525" + "hash": "a82d5f7e23cee1e31ffd851552604a62" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CheckRunWithSimpleCheckSuite.php", - "hash": "5c6820f05867a2e3994706bfa08f9867" + "hash": "41192f58604d320599abea97e9102f07" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Discussion.php", @@ -1580,7 +1580,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunCompleted.php", - "hash": "debe5822dab57f4c5d3cd124559f412c" + "hash": "6f6284726b01035e2940a381f0134a1b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunCompletedFormEncoded.php", @@ -1588,7 +1588,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunCreated.php", - "hash": "f819e9734383ee420c4056b2685a9f52" + "hash": "43283caaa5561dc62614f6d638526742" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunCreatedFormEncoded.php", @@ -1596,7 +1596,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunRequestedAction.php", - "hash": "7292e736e4a3ca42c83a17a319dbfbb7" + "hash": "5d1fcf58a5357f9e3cfcdf3a6ce56124" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunRequestedActionFormEncoded.php", @@ -1604,7 +1604,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunRerequested.php", - "hash": "5abaf920fa355b507105dd78a7930cc2" + "hash": "2488ee5a61f581a849dd0c574d36de63" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCheckRunRerequestedFormEncoded.php", @@ -1700,7 +1700,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookDeploymentProtectionRuleRequested.php", - "hash": "66c74799ae79c7bd4ed1921525e9cb5c" + "hash": "89eea91e3370824bf395fb54b8766754" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookDeploymentStatusCreated.php", @@ -1824,15 +1824,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookIssueCommentCreated.php", - "hash": "e52f5e494a6f0040f221ffe2e0cb8dd0" + "hash": "4dff2d6ffd2faf52f6a937dd047e8c48" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookIssueCommentDeleted.php", - "hash": "8c835a6a5054ff98cf7014636c781e2f" + "hash": "6384e22520185de210e4dfed9890f1c1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookIssueCommentEdited.php", - "hash": "c9da91fa26e3c77613209f80846a10f7" + "hash": "0cd8b9da71e2eadd4125117ddb87555d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookIssuesAssigned.php", @@ -2484,19 +2484,19 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookWorkflowJobCompleted.php", - "hash": "881364308e2600926eea792d4889b761" + "hash": "4d0f813302715532aeece265a16dfe51" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookWorkflowJobInProgress.php", - "hash": "d669db4c71cc45c7703588daebe4b2e2" + "hash": "054f356b4bc45176e941e23754d36b1e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookWorkflowJobQueued.php", - "hash": "296ddaabcfc6b79014d188167220b38a" + "hash": "96804b8ad2b6c4a0183eeda6a792630d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookWorkflowJobWaiting.php", - "hash": "f60b20cf730818d54f14515c025cc1ce" + "hash": "4e8e1adea0cde911e75c02577e5e2ca7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookWorkflowRunCompleted.php", @@ -2584,7 +2584,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Event\/Payload.php", - "hash": "79db4535500bd00c251cbd52598ffa9e" + "hash": "f944bbe8c6eac566369fa5c6463b6ba3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Event\/Payload\/Pages.php", @@ -2812,11 +2812,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranchPullRequestReview\/DismissalRestrictions.php", - "hash": "e58db98a06a05aa84f76e79f26c8934b" + "hash": "08839e58509088813cde742da184fe1c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranchPullRequestReview\/BypassPullRequestAllowances.php", - "hash": "e9dca34ee5e8ae2647b0f77a66144c2c" + "hash": "a08076adbbc46a84b39e024ca097f936" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/BranchRestrictionPolicy\/Teams.php", @@ -2880,15 +2880,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranch\/RequiredPullRequestReviews.php", - "hash": "c91e292ba0963d895c2fe281968b68db" + "hash": "1baa05c410f5c8d2101a0e6b9de935da" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranch\/RequiredPullRequestReviews\/DismissalRestrictions.php", - "hash": "03b5ca1664148496b3e3b74b4252e692" + "hash": "76d8619d1f1eaebc6d750ad8c02ffafc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranch\/RequiredPullRequestReviews\/BypassPullRequestAllowances.php", - "hash": "17f74d032f3054a29594452736deaa8c" + "hash": "e199ee81d4ddd19af65c743292141cba" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ProtectedBranch\/EnforceAdmins.php", @@ -3100,7 +3100,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineCrossReferencedEvent\/Source.php", - "hash": "38c0c81c5983ab4cd3574d59603d7ce8" + "hash": "36077a9e567b6c0336e38c7285f58689" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TimelineReviewedEvent\/Links.php", @@ -3496,7 +3496,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookIssueCommentCreated\/Comment.php", - "hash": "c7ea8dd23b93d72df02657bf70397aba" + "hash": "a0648afbb1d740991683954e4f5176aa" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookIssueCommentCreated\/Issue.php", @@ -4340,7 +4340,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Apps\/CreateFromManifest\/Response\/ApplicationJson\/Created.php", - "hash": "748d828e7c209d8d32e2828ee7ccb896" + "hash": "18ed312ec04ca4ff33720ab84540e69f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Apps\/UpdateWebhookConfigForApp\/Request\/ApplicationJson.php", @@ -4900,7 +4900,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Checks\/ListForSuite\/Response\/ApplicationJson\/Ok.php", - "hash": "1b47e2219fdf9faa99e2ef7874b7777e" + "hash": "505aaab63121f6caf890d875ba7825e7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanning\/UpdateAlert\/Request\/ApplicationJson.php", @@ -4960,7 +4960,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Checks\/ListSuitesForRef\/Response\/ApplicationJson\/Ok.php", - "hash": "1594e1f3e1baf91efddcb033a04a11ba" + "hash": "d65d9afd4ec4953f4e2153d0c91a25f1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Repos\/GetContent\/Response\/ApplicationJson\/Ok.php", @@ -5376,7 +5376,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Search\/IssuesAndPullRequests\/Response\/ApplicationJson\/Ok.php", - "hash": "bd083655b71bf85207994e79201682fb" + "hash": "b84a128bac471ac647ab965e8cd2c632" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Search\/Labels\/Response\/ApplicationJson\/Ok.php", @@ -5500,11 +5500,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/ClientInterface.php", - "hash": "5d1dbc33b47699a1e1cbdf25f3f4111a" + "hash": "126248e3c4deb532a9aed017971e108a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Client.php", - "hash": "5bb6261736418bf18da5576ea5961f20" + "hash": "a50f447007a5a08f10f4a5cea8b40204" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/OperationsInterface.php", @@ -5528,7 +5528,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Dependabot.php", - "hash": "3a6517c15d8d3fd5de6d517e971ef7cb" + "hash": "fa1c273eb1a20a4ea4b111ca5f2388b6" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", @@ -5564,7 +5564,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", - "hash": "cf5e04f90fad359b9fda348253f022c9" + "hash": "6e7aed391bbe1be7c203129bc18bd22f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Oidc.php", @@ -11468,11 +11468,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Checks\/ListForRef\/Response\/ApplicationJson\/Ok.php", - "hash": "51931f5a9e903ba8ce8ef112db59e6d5" + "hash": "91256770724d53c9177a17842e569b8a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Checks\/ListForRef\/Response\/ApplicationJson\/Ok\/Application\/Json.php", - "hash": "9cc4626d40252c196cce9c10180b84fa" + "hash": "20a93c76ed50c53ef6633e33e060bd2c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Codespaces\/CodespaceMachinesForAuthenticatedUser\/Response\/ApplicationJson\/Ok.php", @@ -12340,7 +12340,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForEnterprise.php", - "hash": "ea28c2098c6763092cb86b0fcb51c78f" + "hash": "0dc27f93e93d8d947e6bef4c295c75d1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForEnterpriseTest.php", @@ -13888,7 +13888,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForOrg.php", - "hash": "b20ebfd0ce6968c498688feebc0b52ab" + "hash": "e10c97c2b428a405c5a187d57e70b1c8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForOrgTest.php", @@ -18268,7 +18268,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForRepo.php", - "hash": "e436241a58d3e260c2eb58479031a779" + "hash": "34f1cf4133d0b419f69bfebf5171849f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForRepoTest.php", @@ -18280,7 +18280,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForRepoListing.php", - "hash": "f14486ffb902e553f3a43e87d84dd146" + "hash": "65ccb463e32963488866088a37df2b8e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForRepoListingTest.php", @@ -24400,7 +24400,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Dependabot.php", - "hash": "00f2aa971a06e56bfef9c6f4f3f2ddba" + "hash": "ed719cca92aedb500a230e5644360803" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecretScanning.php", @@ -24408,7 +24408,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Actions.php", - "hash": "c9b95b0c549547599811b0e93d576bb1" + "hash": "56fc653e6f72a5c7448ef27437dec7ce" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeScanning.php", @@ -24476,7 +24476,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Actions.php", - "hash": "0c04a9e983936d9a632607b1c5ac341e" + "hash": "7578c3cb485de97ba6163c2b9e3e084a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Codespaces.php", @@ -24572,7 +24572,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Actions.php", - "hash": "f3a1683b6043836fd07807958a285a07" + "hash": "b6823afb4dc15c22251923f40f80ff0d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Checks.php", @@ -24668,7 +24668,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Dependabot.php", - "hash": "e4d10d3de6be6a6af650db49b2fc09cd" + "hash": "2904f5501d22f0bb18e658d6ae9e32e0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Reactions.php", @@ -24728,7 +24728,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Actions.php", - "hash": "5f2e14e545a88672678f066962c3fa34" + "hash": "6676bf700dbfdf2e13f4bc39d4bd4b6b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/CodeScanning.php", @@ -24852,15 +24852,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "ff68911366f33955b0478aadf2534fa6" + "hash": "c2fc676cac58750466db40247854e981" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "9514e15f8163474624b106b01abd53e7" + "hash": "5d47a6f661a9cfb5aa60f5f8a7df1505" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "e85f20601ef2dcffde4fb0a209d452c4" + "hash": "4c76157e6f50683aef73200a8da94e6a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", @@ -24884,7 +24884,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Five.php", - "hash": "03395870c9bef0b76510c7dbe8efacdf" + "hash": "55c069d81cfeb93a26d2e05254c1f148" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Two.php", @@ -24924,7 +24924,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Six.php", - "hash": "353eb06177d17d6895b5e24a7d48b110" + "hash": "d29fb2c52984fabd6e9f5242a62b888d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php", @@ -24960,7 +24960,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "ed11367ddbea9bae53fda7450797048c" + "hash": "71625fca086e278619781593e380e8fb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -24996,7 +24996,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Six.php", - "hash": "e37c275484741e21538fef83350d5c80" + "hash": "84b07adf38374bcd8ddde31f8ce87a7d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Eight.php", @@ -25060,7 +25060,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operators.php", - "hash": "96cc7fc59a68797d9c7a397788d57db5" + "hash": "847a03cc9d689fec518e40513e24c5bc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php", @@ -25076,11 +25076,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App.php", - "hash": "696667db568eba8dca685aab91923d59" + "hash": "8d8012572bafeab8db18e0ed3664c793" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/AppManifests\/Code\/Conversions.php", - "hash": "6c6dbbdfc74c9e920fa5a1ce1595f341" + "hash": "16327a7e15c80cd88aef693ea0d09ca3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App\/Hook\/Config.php", @@ -25128,7 +25128,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Apps\/AppSlug.php", - "hash": "4620b70bacc04cd06b232b3a78323dc0" + "hash": "fb1b99e871519fdda512e5d8e21758e3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/CodesOfConduct\/Key.php", @@ -25960,11 +25960,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CheckRuns.php", - "hash": "bfdc28d1d041d611b08c2e7e5861ae11" + "hash": "14d0642e36fdb43a2569d71e07ff1c5d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CheckRuns\/CheckRunId.php", - "hash": "d4243d555e8a5bb97b1c87527cc4570b" + "hash": "a596eed7d3ab5793397f791aa7aabc18" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CheckRuns\/CheckRunId\/Rerequest.php", @@ -25972,7 +25972,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CheckSuites.php", - "hash": "c36e309cae7a54d49dc2b5ff95668f03" + "hash": "0987b085735c394b63cb8ca026b4507b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CheckSuites\/Preferences.php", @@ -25980,7 +25980,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CheckSuites\/CheckSuiteId.php", - "hash": "0ffcdfb6f06e1fcdb403a193f9025c39" + "hash": "c541bcf79191dd8f8344047e043b90f4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CheckSuites\/CheckSuiteId\/CheckRuns.php", @@ -26164,19 +26164,19 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Deployments.php", - "hash": "8b741b6448f8a2ba503aa1511d2dbae9" + "hash": "a88b6aae6369ea62b969e80ec6cb639d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Deployments\/DeploymentId.php", - "hash": "a73de80f9241a1718bb765703ffcc259" + "hash": "c60067eb69beb68226838925b5b38d72" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Deployments\/DeploymentId\/Statuses.php", - "hash": "cd59b5b2412f6ddd0e8a7cadaa2d5dbe" + "hash": "553eb35dcef44f24716710f5aa9c7bae" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Deployments\/DeploymentId\/Statuses\/StatusId.php", - "hash": "586c8d7988b2d9937e3da21dc088b9ff" + "hash": "75b3c37fe6640a7633ddb64288d190d9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Dispatches.php", @@ -26324,7 +26324,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues.php", - "hash": "8ac78c8f8fdca7c8e0ccb53a491b456f" + "hash": "6d8c34a61d5efd8d3b162c60a0b830a4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/Comments.php", @@ -26332,7 +26332,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/Comments\/CommentId.php", - "hash": "a744ca5960d015d2b8c7f55bdfba2250" + "hash": "84fadea30d801165f5b1dcb6bda3a445" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/Comments\/CommentId\/Reactions.php", @@ -26344,15 +26344,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/Events\/EventId.php", - "hash": "cc1134975091aa4b20422188fa564760" + "hash": "8cd84814d3d7cc28c34ab927a7359735" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber.php", - "hash": "c5e10e162a323078f1ccfe94cf6ce48b" + "hash": "52e42b2c6b21784fc48d51a57d61e31c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/Assignees.php", - "hash": "187dfd743bdd27aabd74f3fb85416782" + "hash": "2f822da358a65a8feced4d7ee7b0caf6" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/Assignees\/Assignee.php", @@ -26360,7 +26360,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/Comments.php", - "hash": "de36cdc616356b70b566a8b8d4cb3de1" + "hash": "192c4a368b7d0b6213d999bf69419b87" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/Events.php", @@ -27052,7 +27052,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "1420ee355ad26d257146b21d7bbafe89" + "hash": "ddc168438fc47efa555dd23153ab9604" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27632,11 +27632,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "4bef484ec1c9bf2a694431cdc1527182" + "hash": "cb70e7766e3862bd08962beb86b1605c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "c59b57641584d1c139b7020e591e92d2" + "hash": "1dc36842c9462201ed3e3ed47d09210c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -27936,7 +27936,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CheckRun.php", - "hash": "e3eeb47f9fd6ebf897f1f12c5c4036ec" + "hash": "431e4f80ccb11a61dc80833d7f3844ce" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CheckSuite.php", @@ -27980,7 +27980,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/DeploymentProtectionRule.php", - "hash": "ef5b728d12358de719fa1ea26b7ec3a8" + "hash": "4d5b1d9a75aa4c20b6828344c64647b8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/DeploymentReview.php", @@ -28024,7 +28024,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/IssueComment.php", - "hash": "3fceb826939ae1c6f38d797d074cadc2" + "hash": "87317eb722980a30843ad49ab0eff2d5" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Issues.php", @@ -28204,7 +28204,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/WorkflowJob.php", - "hash": "7691fc704d4e89b5005e7d3c6a71c0f0" + "hash": "46b49a4ab7cd5a3ba897dbe03ad2d7b2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/WorkflowRun.php", @@ -28848,7 +28848,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhooksIssueComment.php", - "hash": "2da3cd5aba28da29aabdfb5f4d7dd570" + "hash": "b01f3c12f6adc76bc506eac9e5c1584f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhooksChanges.php", @@ -30088,19 +30088,19 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesParentIssueAdded.php", - "hash": "e8bfc6823b8b4994b8bf533dad3e9bdc" + "hash": "0997af6da47af64249af5c0237bbb786" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesParentIssueRemoved.php", - "hash": "6f6a27f9242abcbe7bc6e87fb98ea78e" + "hash": "ae3d094a0362036b5de4f0b5fd7ff4d0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesSubIssueAdded.php", - "hash": "0a2d156207938b086ea97bdc7ced985f" + "hash": "c50fbf0cb96352fc91ed99e8bf50fc21" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesSubIssueRemoved.php", - "hash": "12197c4de3202da88b4251798dd17241" + "hash": "db66dffc1ae5c37caab143e773344f72" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Epss.php", @@ -30116,7 +30116,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SubIssues.php", - "hash": "09c561171930421b3f9dfc610e4b0095" + "hash": "28f5a5f54bab3870fd0a5e333e175e5a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CvssSeverities.php", @@ -30292,7 +30292,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RunnerGroupsOrg.php", - "hash": "64ec814c2ec5a63d45a7b8ab4650404d" + "hash": "d5736d657fa43eff42b493cfb7255043" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecurityAndAnalysis\/SecretScanningAiDetection.php", @@ -30300,15 +30300,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnerGroupsForOrg\/Response\/ApplicationJson\/Ok.php", - "hash": "9004a033e2568a4b1f7ee9b61f5a5ae7" + "hash": "a6e695406130659322b1f92f80a11c9a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Actions\/CreateSelfHostedRunnerGroupForOrg\/Request\/ApplicationJson.php", - "hash": "c6d32cd5185165deddcc71e588efa072" + "hash": "84d6bff5d544bfed98e0c8e63344216b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Actions\/UpdateSelfHostedRunnerGroupForOrg\/Request\/ApplicationJson.php", - "hash": "97b8b1dd5e1454765fe00c105357514d" + "hash": "bd8364d4ca17f1c332bca5b8510bf1ad" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListRepoAccessToSelfHostedRunnerGroupInOrg\/Response\/ApplicationJson\/Ok.php", @@ -30332,11 +30332,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/RunnerGroups.php", - "hash": "2ed48b702d4dd4435db6423fe3212743" + "hash": "9fa2ddd8411e1ce6573bbd92a852815e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/RunnerGroups\/RunnerGroupId.php", - "hash": "f16db830ead0d732cd986d408d129ebe" + "hash": "8fcfb78b2b3f60c5ad770a7cf9503355" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/RunnerGroups\/RunnerGroupId\/Repositories.php", @@ -30482,10 +30482,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet66F4412D\/TietFC2046E3\/TietB3D959E1\/Tiet27911EDC.php", "hash": "e941f7964b7bdc49c3392db3e915dd7e" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet719311E5\/TietC0B26D9A\/TietFEF50F4E\/TietB9D1A15D.php", - "hash": "db6be56fabaac1708da89263c00c825c" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet74354F0A\/TietB23EADEE\/TietEECB5A28\/TietF4DC7C16.php", "hash": "59f9c28ff8a8678e7993407346028aca" @@ -31060,15 +31056,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/SubIssue.php", - "hash": "2537b206db308fc601750c0994f01d5d" + "hash": "58849edbbac491fa7aceac3d27b002c8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/SubIssues.php", - "hash": "ffae08a15478c089800129527baf3cde" + "hash": "98673c3a75c63ccf4282cf7a1d57cd43" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/SubIssues\/Priority.php", - "hash": "8f937489bfbe5b1a84bcfd618c6d9d21" + "hash": "ffd5978df2928a8efbbf1ea3ada3acb3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningDefaultSetupOptions.php", @@ -31481,6 +31477,250 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/PrivateRegistries\/SecretName.php", "hash": "9c1aea78ca493b921e68010e29661819" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/ListHostedRunnersForOrg.php", + "hash": "80db43cd09156125a9fc9241e3775a7c" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/ListHostedRunnersForOrg.php", + "hash": "7dc06fa1dc61d47d9c22e5c09280ee84" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/ListHostedRunnersForOrgTest.php", + "hash": "f0fcc85812ff1db1bbbaddb64ecbb772" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/CreateHostedRunnerForOrg.php", + "hash": "c7c1c8afd381f1ee572e86f7e4dd7dcb" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/CreateHostedRunnerForOrg.php", + "hash": "62c3d4d62e59fa14ad4cbfb069ffad13" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/CreateHostedRunnerForOrgTest.php", + "hash": "e0523cd91b5f3d673f3126005333637e" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GetHostedRunnersGithubOwnedImagesForOrg.php", + "hash": "6f7bba2128cb9a278a10c5d8e3864cee" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GetHostedRunnersGithubOwnedImagesForOrg.php", + "hash": "1b8d1e73666dffed1273e07f17ecfb9b" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GetHostedRunnersGithubOwnedImagesForOrgTest.php", + "hash": "4b01aeb62adf9239da237f0673e5b76b" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GetHostedRunnersPartnerImagesForOrg.php", + "hash": "4c63cec68c798dd6608a61b64295867f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GetHostedRunnersPartnerImagesForOrg.php", + "hash": "cbeb1c11c48e2f58f37d3ed1fadc8471" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GetHostedRunnersPartnerImagesForOrgTest.php", + "hash": "47ac98b2949d7507a78b7fcf49696581" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GetHostedRunnersLimitsForOrg.php", + "hash": "2607c32848bd12291d2f4cae2c4389cb" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GetHostedRunnersLimitsForOrg.php", + "hash": "4008d6c35b5cb7c3eeb599624c7cf27c" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GetHostedRunnersLimitsForOrgTest.php", + "hash": "b1ca7f1324288091b3d019f03fc6467c" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GetHostedRunnersMachineSpecsForOrg.php", + "hash": "023d0b8ebc8fb4b0defbde5d9d048c9f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GetHostedRunnersMachineSpecsForOrg.php", + "hash": "6216394df8ba85291c6c3887d1e28560" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GetHostedRunnersMachineSpecsForOrgTest.php", + "hash": "748b23a51dffc1462644bdb10b42cbb2" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GetHostedRunnersPlatformsForOrg.php", + "hash": "b6c80b17f1a914925e8f2a3ae4023a2f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GetHostedRunnersPlatformsForOrg.php", + "hash": "2ac1039ba63fff95633cf2dca3be5c44" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GetHostedRunnersPlatformsForOrgTest.php", + "hash": "da2da17b4ff56e2455ef30f31dd209b7" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GetHostedRunnerForOrg.php", + "hash": "c443a25eb86a75bf5c8b27157909fa76" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GetHostedRunnerForOrg.php", + "hash": "32be8fae5a261e035fc3e29e6bd8b79d" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GetHostedRunnerForOrgTest.php", + "hash": "f1ee8cff1f127da4cc29cabc62e1a506" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/DeleteHostedRunnerForOrg.php", + "hash": "e934054fa12b61facc140b25dc9d72f6" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/DeleteHostedRunnerForOrg.php", + "hash": "f38d38c3b7e245e48584a3330f3c85ce" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/DeleteHostedRunnerForOrgTest.php", + "hash": "e3b272cb836dd17bfc377b64d923a409" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/UpdateHostedRunnerForOrg.php", + "hash": "8c7f998604029d18afbb2f8bfa2a65f9" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/UpdateHostedRunnerForOrg.php", + "hash": "ba67fde3ddeb887b009f2215b35b56bc" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/UpdateHostedRunnerForOrgTest.php", + "hash": "59a156c8a060559df5952df832959bf8" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/ListGithubHostedRunnersInGroupForOrg.php", + "hash": "3e1a8cde9d03cf6fb072411dfb1526af" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/ListGithubHostedRunnersInGroupForOrg.php", + "hash": "89209094eeed4c7a4aaa28fdf102648d" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/ListGithubHostedRunnersInGroupForOrgTest.php", + "hash": "a73871a58bcafef4e81739421c4d4cb6" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/Integration\/Owner.php", + "hash": "b605cf811b09109b99ac981a33fede56" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ActionsHostedRunnerPoolImage.php", + "hash": "4d24d4ba4e62acc83e556ebf5596b879" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ActionsHostedRunnerMachineSpec.php", + "hash": "d491526500a66b9ea9e375db66ba4d8f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PublicIp.php", + "hash": "d68039747d8c030105e93876ba623081" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ActionsHostedRunner.php", + "hash": "876cfedefd2e189e9ffb2e4db88cb304" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ActionsHostedRunnerImage.php", + "hash": "c06b765acbd52fea2db4be7f3dcf132e" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ActionsHostedRunnerLimits.php", + "hash": "3c7780f71d3d8bd10b680712d05d73ae" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ActionsHostedRunnerLimits\/PublicIps.php", + "hash": "273d700cc3be1120183130790e5c396d" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListHostedRunnersForOrg\/Response\/ApplicationJson\/Ok.php", + "hash": "54ff03317476d52b6e8edb59dd4a9ff6" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Actions\/CreateHostedRunnerForOrg\/Request\/ApplicationJson.php", + "hash": "59f5ef35df86b699c44a275c16765ad0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Actions\/CreateHostedRunnerForOrg\/Request\/ApplicationJson\/Image.php", + "hash": "e8389afcb4f43ace309c140caba7bc8f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietC564D611\/Tiet7E69EF5F\/Tiet7C05F65C\/Tiet87EB6EC8.php", + "hash": "de988b043ea0e5324d2992fdb52cfc80" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/GetHostedRunnersPartnerImagesForOrg\/Response\/ApplicationJson\/Ok.php", + "hash": "40087ec3fe6b22369772acf5bb4a41d0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/GetHostedRunnersPartnerImagesForOrg\/Response\/ApplicationJson\/Ok\/Application\/Json.php", + "hash": "2a5b7772d52fc0aa02edef357e91e9d1" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/GetHostedRunnersGithubOwnedImagesForOrg\/Response\/ApplicationJson\/Ok.php", + "hash": "4beb006af96587d8749a9d4a6f5d097b" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/GetHostedRunnersMachineSpecsForOrg\/Response\/ApplicationJson\/Ok.php", + "hash": "ea15f64484ad8dd104c532d541ae55c6" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/GetHostedRunnersPlatformsForOrg\/Response\/ApplicationJson\/Ok.php", + "hash": "e592acf30ad5d896f8aad77641085122" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Actions\/UpdateHostedRunnerForOrg\/Request\/ApplicationJson.php", + "hash": "84d696b2183a47cddcb31f01f3c04535" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListGithubHostedRunnersInGroupForOrg\/Response\/ApplicationJson\/Ok.php", + "hash": "34e72a80bb7f5d7a68f4ab56d1d43ed2" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet67EF09F8\/Tiet8959F0C4\/Tiet45DBD47E\/Tiet2C497E99.php", + "hash": "df59b4b04219f8141a49d7bccc31100c" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/HostedRunners.php", + "hash": "16a77ff4a46527d257a5a1724b50cb04" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/HostedRunners\/Images\/GithubOwned.php", + "hash": "c3aa9aadf05749adf6f11ca3f5bc4c56" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/HostedRunners\/Images\/Partner.php", + "hash": "a9a16b31aee517893acd793bf5a07e11" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/HostedRunners\/Limits.php", + "hash": "ac40fe69191f723098ed04142afc390a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/HostedRunners\/MachineSizes.php", + "hash": "9c403b24c9950e02a1ac120206989711" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/HostedRunners\/Platforms.php", + "hash": "69bfe726d1c82a7dc9f845a7aa2aeb0b" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/HostedRunners\/HostedRunnerId.php", + "hash": "ccd5d2c9ef0ca98755d525cb424612e0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/RunnerGroups\/RunnerGroupId\/HostedRunners.php", + "hash": "ac003f50a74ffa77bb174464c1837b1a" } ] }, diff --git a/clients/GitHub/src/Client.php b/clients/GitHub/src/Client.php index ad1f4089fab..991f29559d4 100644 --- a/clients/GitHub/src/Client.php +++ b/clients/GitHub/src/Client.php @@ -27,7 +27,7 @@ public function __construct(AuthenticationInterface $authentication, Browser $br } // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository + public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository { [$method, $path] = explode(' ', $call); $pathChunks = explode('/', $path); diff --git a/clients/GitHub/src/ClientInterface.php b/clients/GitHub/src/ClientInterface.php index abf3938a3ef..48954f15c0e 100644 --- a/clients/GitHub/src/ClientInterface.php +++ b/clients/GitHub/src/ClientInterface.php @@ -7,7 +7,7 @@ interface ClientInterface { // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository; + public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository; public function operations(): OperationsInterface; diff --git a/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/Integration/Owner.php b/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/Integration/Owner.php new file mode 100644 index 00000000000..368a0e7fa9c --- /dev/null +++ b/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/Integration/Owner.php @@ -0,0 +1,45 @@ +hydrateObject(Schema\SimpleUser::class, $value); + } catch (Throwable) { + } + } + + if ($signature === 'avatar_url|created_at|description|html_url|id|name|node_id|slug|updated_at|website_url') { + try { + return $hydrator->hydrateObject(Schema\Enterprise::class, $value); + } catch (Throwable) { + } + } + } + + return $value; + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/App.php b/clients/GitHub/src/Internal/Hydrator/Operation/App.php index 301723cc100..316520bcb98 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/App.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/App.php @@ -4,9 +4,9 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; -use ApiClients\Client\GitHub\Schema\SimpleUser; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -43,7 +43,6 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; @@ -101,17 +100,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -273,267 +276,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser - { - $properties = []; - $missingFields = []; - try { - $value = $payload['name'] ?? null; - - if ($value === null) { - $properties['name'] = null; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['email'] ?? null; - - if ($value === null) { - $properties['email'] = null; - goto after_email; - } - - $properties['email'] = $value; - - after_email: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; - } - - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; - } - - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; - } - - $properties['gistsUrl'] = $value; - - after_gistsUrl: - - $value = $payload['starred_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; - } - - $properties['starredUrl'] = $value; - - after_starredUrl: - - $value = $payload['subscriptions_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; - } - - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_at'] ?? null; - - if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; - } - - $properties['starredAt'] = $value; - - after_starredAt: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; @@ -640,7 +382,6 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), default => throw new LogicException("No serialization defined for $className"), }; @@ -732,12 +473,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -812,105 +551,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/AppManifests/Code/Conversions.php b/clients/GitHub/src/Internal/Hydrator/Operation/AppManifests/Code/Conversions.php index 69a0a234cd5..433818ea3e8 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/AppManifests/Code/Conversions.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/AppManifests/Code/Conversions.php @@ -4,10 +4,10 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\AppManifests\Code; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; -use ApiClients\Client\GitHub\Schema\SimpleUser; use ApiClients\Client\GitHub\Schema\ValidationErrorSimple; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; @@ -45,7 +45,6 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHub\Schema\ValidationErrorSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationErrorSimple($payload), @@ -105,17 +104,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -277,267 +280,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser - { - $properties = []; - $missingFields = []; - try { - $value = $payload['name'] ?? null; - - if ($value === null) { - $properties['name'] = null; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['email'] ?? null; - - if ($value === null) { - $properties['email'] = null; - goto after_email; - } - - $properties['email'] = $value; - - after_email: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; - } - - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; - } - - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; - } - - $properties['gistsUrl'] = $value; - - after_gistsUrl: - - $value = $payload['starred_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; - } - - $properties['starredUrl'] = $value; - - after_starredUrl: - - $value = $payload['subscriptions_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; - } - - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_at'] ?? null; - - if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; - } - - $properties['starredAt'] = $value; - - after_starredAt: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; @@ -759,7 +501,6 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), 'ApiClients\Client\GitHub\Schema\ValidationErrorSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationErrorSimple($object), @@ -853,12 +594,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -933,105 +672,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Apps/AppSlug.php b/clients/GitHub/src/Internal/Hydrator/Operation/Apps/AppSlug.php index adcc9ac5cb6..1133313204f 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Apps/AppSlug.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Apps/AppSlug.php @@ -4,10 +4,10 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Apps; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; -use ApiClients\Client\GitHub\Schema\SimpleUser; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -44,7 +44,6 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), @@ -103,17 +102,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -275,267 +278,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser - { - $properties = []; - $missingFields = []; - try { - $value = $payload['name'] ?? null; - - if ($value === null) { - $properties['name'] = null; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['email'] ?? null; - - if ($value === null) { - $properties['email'] = null; - goto after_email; - } - - $properties['email'] = $value; - - after_email: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; - } - - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; - } - - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; - } - - $properties['gistsUrl'] = $value; - - after_gistsUrl: - - $value = $payload['starred_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; - } - - $properties['starredUrl'] = $value; - - after_starredUrl: - - $value = $payload['subscriptions_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; - } - - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_at'] ?? null; - - if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; - } - - $properties['starredAt'] = $value; - - after_starredAt: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; @@ -705,7 +447,6 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException("No serialization defined for $className"), @@ -798,12 +539,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -878,105 +617,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners.php new file mode 100644 index 00000000000..3bea651ceae --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners.php @@ -0,0 +1,669 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListHostedRunnersForOrg⚡️Response⚡️ApplicationJson⚡️Ok($payload), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner($payload), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($payload), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListHostedRunnersForOrg⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok + { + $properties = []; + $missingFields = []; + try { + $value = $payload['total_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'total_count'; + goto after_totalCount; + } + + $properties['totalCount'] = $value; + + after_totalCount: + + $value = $payload['runners'] ?? null; + + if ($value === null) { + $missingFields[] = 'runners'; + goto after_runners; + } + + $properties['runners'] = $value; + + after_runners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Ok(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner(array $payload): ActionsHostedRunner + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['runner_group_id'] ?? null; + + if ($value === null) { + $properties['runnerGroupId'] = null; + goto after_runnerGroupId; + } + + $properties['runnerGroupId'] = $value; + + after_runnerGroupId: + + $value = $payload['image_details'] ?? null; + + if ($value === null) { + $properties['imageDetails'] = null; + goto after_imageDetails; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'imageDetails'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['imageDetails'] = $value; + + after_imageDetails: + + $value = $payload['machine_size_details'] ?? null; + + if ($value === null) { + $missingFields[] = 'machine_size_details'; + goto after_machineSizeDetails; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'machineSizeDetails'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['machineSizeDetails'] = $value; + + after_machineSizeDetails: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $missingFields[] = 'status'; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['platform'] ?? null; + + if ($value === null) { + $missingFields[] = 'platform'; + goto after_platform; + } + + $properties['platform'] = $value; + + after_platform: + + $value = $payload['maximum_runners'] ?? null; + + if ($value === null) { + $properties['maximumRunners'] = null; + goto after_maximumRunners; + } + + $properties['maximumRunners'] = $value; + + after_maximumRunners: + + $value = $payload['public_ip_enabled'] ?? null; + + if ($value === null) { + $missingFields[] = 'public_ip_enabled'; + goto after_publicIpEnabled; + } + + $properties['publicIpEnabled'] = $value; + + after_publicIpEnabled: + + $value = $payload['public_ips'] ?? null; + + if ($value === null) { + $properties['publicIps'] = null; + goto after_publicIps; + } + + $properties['publicIps'] = $value; + + after_publicIps: + + $value = $payload['last_active_on'] ?? null; + + if ($value === null) { + $properties['lastActiveOn'] = null; + goto after_lastActiveOn; + } + + $properties['lastActiveOn'] = $value; + + after_lastActiveOn: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunner', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsHostedRunner::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsHostedRunner(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunner', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage(array $payload): ActionsHostedRunnerPoolImage + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['size_gb'] ?? null; + + if ($value === null) { + $missingFields[] = 'size_gb'; + goto after_sizeGb; + } + + $properties['sizeGb'] = $value; + + after_sizeGb: + + $value = $payload['display_name'] ?? null; + + if ($value === null) { + $missingFields[] = 'display_name'; + goto after_displayName; + } + + $properties['displayName'] = $value; + + after_displayName: + + $value = $payload['source'] ?? null; + + if ($value === null) { + $missingFields[] = 'source'; + goto after_source; + } + + $properties['source'] = $value; + + after_source: + + $value = $payload['version'] ?? null; + + if ($value === null) { + $missingFields[] = 'version'; + goto after_version; + } + + $properties['version'] = $value; + + after_version: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsHostedRunnerPoolImage::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsHostedRunnerPoolImage(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec(array $payload): ActionsHostedRunnerMachineSpec + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['cpu_cores'] ?? null; + + if ($value === null) { + $missingFields[] = 'cpu_cores'; + goto after_cpuCores; + } + + $properties['cpuCores'] = $value; + + after_cpuCores: + + $value = $payload['memory_gb'] ?? null; + + if ($value === null) { + $missingFields[] = 'memory_gb'; + goto after_memoryGb; + } + + $properties['memoryGb'] = $value; + + after_memoryGb: + + $value = $payload['storage_gb'] ?? null; + + if ($value === null) { + $missingFields[] = 'storage_gb'; + goto after_storageGb; + } + + $properties['storageGb'] = $value; + + after_storageGb: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsHostedRunnerMachineSpec::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsHostedRunnerMachineSpec(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListHostedRunnersForOrg⚡️Response⚡️ApplicationJson⚡️Ok($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListHostedRunnersForOrg⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed + { + assert($object instanceof Ok); + $result = []; + + $totalCount = $object->totalCount; + after_totalCount: $result['total_count'] = $totalCount; + + $runners = $object->runners; + static $runnersSerializer0; + + if ($runnersSerializer0 === null) { + $runnersSerializer0 = new SerializeArrayItems(...[]); + } + + $runners = $runnersSerializer0->serialize($runners, $this); + after_runners: $result['runners'] = $runners; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner(mixed $object): mixed + { + assert($object instanceof ActionsHostedRunner); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $name = $object->name; + after_name: $result['name'] = $name; + + $runnerGroupId = $object->runnerGroupId; + + if ($runnerGroupId === null) { + goto after_runnerGroupId; + } + + after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId; + + $imageDetails = $object->imageDetails; + + if ($imageDetails === null) { + goto after_imageDetails; + } + + $imageDetails = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($imageDetails); + after_imageDetails: $result['image_details'] = $imageDetails; + + $machineSizeDetails = $object->machineSizeDetails; + $machineSizeDetails = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($machineSizeDetails); + after_machineSizeDetails: $result['machine_size_details'] = $machineSizeDetails; + + $status = $object->status; + after_status: $result['status'] = $status; + + $platform = $object->platform; + after_platform: $result['platform'] = $platform; + + $maximumRunners = $object->maximumRunners; + + if ($maximumRunners === null) { + goto after_maximumRunners; + } + + after_maximumRunners: $result['maximum_runners'] = $maximumRunners; + + $publicIpEnabled = $object->publicIpEnabled; + after_publicIpEnabled: $result['public_ip_enabled'] = $publicIpEnabled; + + $publicIps = $object->publicIps; + + if ($publicIps === null) { + goto after_publicIps; + } + + static $publicIpsSerializer0; + + if ($publicIpsSerializer0 === null) { + $publicIpsSerializer0 = new SerializeArrayItems(...[]); + } + + $publicIps = $publicIpsSerializer0->serialize($publicIps, $this); + after_publicIps: $result['public_ips'] = $publicIps; + + $lastActiveOn = $object->lastActiveOn; + + if ($lastActiveOn === null) { + goto after_lastActiveOn; + } + + after_lastActiveOn: $result['last_active_on'] = $lastActiveOn; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage(mixed $object): mixed + { + assert($object instanceof ActionsHostedRunnerPoolImage); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $sizeGb = $object->sizeGb; + after_sizeGb: $result['size_gb'] = $sizeGb; + + $displayName = $object->displayName; + after_displayName: $result['display_name'] = $displayName; + + $source = $object->source; + after_source: $result['source'] = $source; + + $version = $object->version; + after_version: $result['version'] = $version; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec(mixed $object): mixed + { + assert($object instanceof ActionsHostedRunnerMachineSpec); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $cpuCores = $object->cpuCores; + after_cpuCores: $result['cpu_cores'] = $cpuCores; + + $memoryGb = $object->memoryGb; + after_memoryGb: $result['memory_gb'] = $memoryGb; + + $storageGb = $object->storageGb; + after_storageGb: $result['storage_gb'] = $storageGb; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/HostedRunnerId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/HostedRunnerId.php new file mode 100644 index 00000000000..ed58d867ca8 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/HostedRunnerId.php @@ -0,0 +1,604 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner($payload), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($payload), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner(array $payload): ActionsHostedRunner + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['runner_group_id'] ?? null; + + if ($value === null) { + $properties['runnerGroupId'] = null; + goto after_runnerGroupId; + } + + $properties['runnerGroupId'] = $value; + + after_runnerGroupId: + + $value = $payload['image_details'] ?? null; + + if ($value === null) { + $properties['imageDetails'] = null; + goto after_imageDetails; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'imageDetails'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['imageDetails'] = $value; + + after_imageDetails: + + $value = $payload['machine_size_details'] ?? null; + + if ($value === null) { + $missingFields[] = 'machine_size_details'; + goto after_machineSizeDetails; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'machineSizeDetails'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['machineSizeDetails'] = $value; + + after_machineSizeDetails: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $missingFields[] = 'status'; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['platform'] ?? null; + + if ($value === null) { + $missingFields[] = 'platform'; + goto after_platform; + } + + $properties['platform'] = $value; + + after_platform: + + $value = $payload['maximum_runners'] ?? null; + + if ($value === null) { + $properties['maximumRunners'] = null; + goto after_maximumRunners; + } + + $properties['maximumRunners'] = $value; + + after_maximumRunners: + + $value = $payload['public_ip_enabled'] ?? null; + + if ($value === null) { + $missingFields[] = 'public_ip_enabled'; + goto after_publicIpEnabled; + } + + $properties['publicIpEnabled'] = $value; + + after_publicIpEnabled: + + $value = $payload['public_ips'] ?? null; + + if ($value === null) { + $properties['publicIps'] = null; + goto after_publicIps; + } + + $properties['publicIps'] = $value; + + after_publicIps: + + $value = $payload['last_active_on'] ?? null; + + if ($value === null) { + $properties['lastActiveOn'] = null; + goto after_lastActiveOn; + } + + $properties['lastActiveOn'] = $value; + + after_lastActiveOn: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunner', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsHostedRunner::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsHostedRunner(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunner', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage(array $payload): ActionsHostedRunnerPoolImage + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['size_gb'] ?? null; + + if ($value === null) { + $missingFields[] = 'size_gb'; + goto after_sizeGb; + } + + $properties['sizeGb'] = $value; + + after_sizeGb: + + $value = $payload['display_name'] ?? null; + + if ($value === null) { + $missingFields[] = 'display_name'; + goto after_displayName; + } + + $properties['displayName'] = $value; + + after_displayName: + + $value = $payload['source'] ?? null; + + if ($value === null) { + $missingFields[] = 'source'; + goto after_source; + } + + $properties['source'] = $value; + + after_source: + + $value = $payload['version'] ?? null; + + if ($value === null) { + $missingFields[] = 'version'; + goto after_version; + } + + $properties['version'] = $value; + + after_version: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsHostedRunnerPoolImage::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsHostedRunnerPoolImage(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec(array $payload): ActionsHostedRunnerMachineSpec + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['cpu_cores'] ?? null; + + if ($value === null) { + $missingFields[] = 'cpu_cores'; + goto after_cpuCores; + } + + $properties['cpuCores'] = $value; + + after_cpuCores: + + $value = $payload['memory_gb'] ?? null; + + if ($value === null) { + $missingFields[] = 'memory_gb'; + goto after_memoryGb; + } + + $properties['memoryGb'] = $value; + + after_memoryGb: + + $value = $payload['storage_gb'] ?? null; + + if ($value === null) { + $missingFields[] = 'storage_gb'; + goto after_storageGb; + } + + $properties['storageGb'] = $value; + + after_storageGb: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsHostedRunnerMachineSpec::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsHostedRunnerMachineSpec(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerPoolImage' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerMachineSpec' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunner(mixed $object): mixed + { + assert($object instanceof ActionsHostedRunner); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $name = $object->name; + after_name: $result['name'] = $name; + + $runnerGroupId = $object->runnerGroupId; + + if ($runnerGroupId === null) { + goto after_runnerGroupId; + } + + after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId; + + $imageDetails = $object->imageDetails; + + if ($imageDetails === null) { + goto after_imageDetails; + } + + $imageDetails = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage($imageDetails); + after_imageDetails: $result['image_details'] = $imageDetails; + + $machineSizeDetails = $object->machineSizeDetails; + $machineSizeDetails = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec($machineSizeDetails); + after_machineSizeDetails: $result['machine_size_details'] = $machineSizeDetails; + + $status = $object->status; + after_status: $result['status'] = $status; + + $platform = $object->platform; + after_platform: $result['platform'] = $platform; + + $maximumRunners = $object->maximumRunners; + + if ($maximumRunners === null) { + goto after_maximumRunners; + } + + after_maximumRunners: $result['maximum_runners'] = $maximumRunners; + + $publicIpEnabled = $object->publicIpEnabled; + after_publicIpEnabled: $result['public_ip_enabled'] = $publicIpEnabled; + + $publicIps = $object->publicIps; + + if ($publicIps === null) { + goto after_publicIps; + } + + static $publicIpsSerializer0; + + if ($publicIpsSerializer0 === null) { + $publicIpsSerializer0 = new SerializeArrayItems(...[]); + } + + $publicIps = $publicIpsSerializer0->serialize($publicIps, $this); + after_publicIps: $result['public_ips'] = $publicIps; + + $lastActiveOn = $object->lastActiveOn; + + if ($lastActiveOn === null) { + goto after_lastActiveOn; + } + + after_lastActiveOn: $result['last_active_on'] = $lastActiveOn; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerPoolImage(mixed $object): mixed + { + assert($object instanceof ActionsHostedRunnerPoolImage); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $sizeGb = $object->sizeGb; + after_sizeGb: $result['size_gb'] = $sizeGb; + + $displayName = $object->displayName; + after_displayName: $result['display_name'] = $displayName; + + $source = $object->source; + after_source: $result['source'] = $source; + + $version = $object->version; + after_version: $result['version'] = $version; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerMachineSpec(mixed $object): mixed + { + assert($object instanceof ActionsHostedRunnerMachineSpec); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $cpuCores = $object->cpuCores; + after_cpuCores: $result['cpu_cores'] = $cpuCores; + + $memoryGb = $object->memoryGb; + after_memoryGb: $result['memory_gb'] = $memoryGb; + + $storageGb = $object->storageGb; + after_storageGb: $result['storage_gb'] = $storageGb; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Images/GithubOwned.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Images/GithubOwned.php new file mode 100644 index 00000000000..60b0b6f4404 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Images/GithubOwned.php @@ -0,0 +1,245 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersGithubOwnedImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersGithubOwnedImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok + { + $properties = []; + $missingFields = []; + try { + $value = $payload['total_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'total_count'; + goto after_totalCount; + } + + $properties['totalCount'] = $value; + + after_totalCount: + + $value = $payload['images'] ?? null; + + if ($value === null) { + $missingFields[] = 'images'; + goto after_images; + } + + $properties['images'] = $value; + + after_images: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Ok(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersGithubOwnedImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersGithubOwnedImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed + { + assert($object instanceof Ok); + $result = []; + + $totalCount = $object->totalCount; + after_totalCount: $result['total_count'] = $totalCount; + + $images = $object->images; + static $imagesSerializer0; + + if ($imagesSerializer0 === null) { + $imagesSerializer0 = new SerializeArrayItems(...[]); + } + + $images = $imagesSerializer0->serialize($images, $this); + after_images: $result['images'] = $images; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Images/Partner.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Images/Partner.php new file mode 100644 index 00000000000..4346b88c121 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Images/Partner.php @@ -0,0 +1,245 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPartnerImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPartnerImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(array $payload): Json + { + $properties = []; + $missingFields = []; + try { + $value = $payload['total_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'total_count'; + goto after_totalCount; + } + + $properties['totalCount'] = $value; + + after_totalCount: + + $value = $payload['images'] ?? null; + + if ($value === null) { + $missingFields[] = 'images'; + goto after_images; + } + + $properties['images'] = $value; + + after_images: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Json::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Json(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPartnerImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPartnerImagesForOrg⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(mixed $object): mixed + { + assert($object instanceof Json); + $result = []; + + $totalCount = $object->totalCount; + after_totalCount: $result['total_count'] = $totalCount; + + $images = $object->images; + static $imagesSerializer0; + + if ($imagesSerializer0 === null) { + $imagesSerializer0 = new SerializeArrayItems(...[]); + } + + $images = $imagesSerializer0->serialize($images, $this); + after_images: $result['images'] = $images; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Limits.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Limits.php new file mode 100644 index 00000000000..f1db19e9f16 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Limits.php @@ -0,0 +1,294 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits($payload), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits\PublicIps' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits⚡️PublicIps($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits(array $payload): ActionsHostedRunnerLimits + { + $properties = []; + $missingFields = []; + try { + $value = $payload['public_ips'] ?? null; + + if ($value === null) { + $missingFields[] = 'public_ips'; + goto after_publicIps; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'publicIps'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits⚡️PublicIps($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['publicIps'] = $value; + + after_publicIps: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsHostedRunnerLimits::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsHostedRunnerLimits(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits⚡️PublicIps(array $payload): PublicIps + { + $properties = []; + $missingFields = []; + try { + $value = $payload['maximum'] ?? null; + + if ($value === null) { + $missingFields[] = 'maximum'; + goto after_maximum; + } + + $properties['maximum'] = $value; + + after_maximum: + + $value = $payload['current_usage'] ?? null; + + if ($value === null) { + $missingFields[] = 'current_usage'; + goto after_currentUsage; + } + + $properties['currentUsage'] = $value; + + after_currentUsage: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits\PublicIps', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(PublicIps::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new PublicIps(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits\PublicIps', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits($object), + 'ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits\PublicIps' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits⚡️PublicIps($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits(mixed $object): mixed + { + assert($object instanceof ActionsHostedRunnerLimits); + $result = []; + + $publicIps = $object->publicIps; + $publicIps = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits⚡️PublicIps($publicIps); + after_publicIps: $result['public_ips'] = $publicIps; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ActionsHostedRunnerLimits⚡️PublicIps(mixed $object): mixed + { + assert($object instanceof PublicIps); + $result = []; + + $maximum = $object->maximum; + after_maximum: $result['maximum'] = $maximum; + + $currentUsage = $object->currentUsage; + after_currentUsage: $result['current_usage'] = $currentUsage; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/MachineSizes.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/MachineSizes.php new file mode 100644 index 00000000000..0c67be46e14 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/MachineSizes.php @@ -0,0 +1,245 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersMachineSpecsForOrg⚡️Response⚡️ApplicationJson⚡️Ok($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersMachineSpecsForOrg⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok + { + $properties = []; + $missingFields = []; + try { + $value = $payload['total_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'total_count'; + goto after_totalCount; + } + + $properties['totalCount'] = $value; + + after_totalCount: + + $value = $payload['machine_specs'] ?? null; + + if ($value === null) { + $missingFields[] = 'machine_specs'; + goto after_machineSpecs; + } + + $properties['machineSpecs'] = $value; + + after_machineSpecs: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Ok(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersMachineSpecsForOrg⚡️Response⚡️ApplicationJson⚡️Ok($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersMachineSpecsForOrg⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed + { + assert($object instanceof Ok); + $result = []; + + $totalCount = $object->totalCount; + after_totalCount: $result['total_count'] = $totalCount; + + $machineSpecs = $object->machineSpecs; + static $machineSpecsSerializer0; + + if ($machineSpecsSerializer0 === null) { + $machineSpecsSerializer0 = new SerializeArrayItems(...[]); + } + + $machineSpecs = $machineSpecsSerializer0->serialize($machineSpecs, $this); + after_machineSpecs: $result['machine_specs'] = $machineSpecs; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Platforms.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Platforms.php new file mode 100644 index 00000000000..e430c0241a8 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/HostedRunners/Platforms.php @@ -0,0 +1,245 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPlatformsForOrg⚡️Response⚡️ApplicationJson⚡️Ok($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPlatformsForOrg⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok + { + $properties = []; + $missingFields = []; + try { + $value = $payload['total_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'total_count'; + goto after_totalCount; + } + + $properties['totalCount'] = $value; + + after_totalCount: + + $value = $payload['platforms'] ?? null; + + if ($value === null) { + $missingFields[] = 'platforms'; + goto after_platforms; + } + + $properties['platforms'] = $value; + + after_platforms: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Ok(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPlatformsForOrg⚡️Response⚡️ApplicationJson⚡️Ok($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️GetHostedRunnersPlatformsForOrg⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed + { + assert($object instanceof Ok); + $result = []; + + $totalCount = $object->totalCount; + after_totalCount: $result['total_count'] = $totalCount; + + $platforms = $object->platforms; + static $platformsSerializer0; + + if ($platformsSerializer0 === null) { + $platformsSerializer0 = new SerializeArrayItems(...[]); + } + + $platforms = $platformsSerializer0->serialize($platforms, $this); + after_platforms: $result['platforms'] = $platforms; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups.php index fcbd26233c9..3f095c04f35 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups.php @@ -168,6 +168,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Runn after_hostedRunnersUrl: + $value = $payload['network_configuration_id'] ?? null; + + if ($value === null) { + $properties['networkConfigurationId'] = null; + goto after_networkConfigurationId; + } + + $properties['networkConfigurationId'] = $value; + + after_networkConfigurationId: + $value = $payload['inherited'] ?? null; if ($value === null) { @@ -400,6 +411,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_hostedRunnersUrl: $result['hosted_runners_url'] = $hostedRunnersUrl; + $networkConfigurationId = $object->networkConfigurationId; + + if ($networkConfigurationId === null) { + goto after_networkConfigurationId; + } + + after_networkConfigurationId: $result['network_configuration_id'] = $networkConfigurationId; + $inherited = $object->inherited; after_inherited: $result['inherited'] = $inherited; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups/RunnerGroupId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups/RunnerGroupId.php index 058c50ace00..e78e918038f 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups/RunnerGroupId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups/RunnerGroupId.php @@ -125,6 +125,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Runn after_hostedRunnersUrl: + $value = $payload['network_configuration_id'] ?? null; + + if ($value === null) { + $properties['networkConfigurationId'] = null; + goto after_networkConfigurationId; + } + + $properties['networkConfigurationId'] = $value; + + after_networkConfigurationId: + $value = $payload['inherited'] ?? null; if ($value === null) { @@ -335,6 +346,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_hostedRunnersUrl: $result['hosted_runners_url'] = $hostedRunnersUrl; + $networkConfigurationId = $object->networkConfigurationId; + + if ($networkConfigurationId === null) { + goto after_networkConfigurationId; + } + + after_networkConfigurationId: $result['network_configuration_id'] = $networkConfigurationId; + $inherited = $object->inherited; after_inherited: $result['inherited'] = $inherited; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups/RunnerGroupId/HostedRunners.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups/RunnerGroupId/HostedRunners.php new file mode 100644 index 00000000000..cca1aec0964 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/RunnerGroups/RunnerGroupId/HostedRunners.php @@ -0,0 +1,245 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListGithubHostedRunnersInGroupForOrg⚡️Response⚡️ApplicationJson⚡️Ok($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListGithubHostedRunnersInGroupForOrg⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok + { + $properties = []; + $missingFields = []; + try { + $value = $payload['total_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'total_count'; + goto after_totalCount; + } + + $properties['totalCount'] = $value; + + after_totalCount: + + $value = $payload['runners'] ?? null; + + if ($value === null) { + $missingFields[] = 'runners'; + goto after_runners; + } + + $properties['runners'] = $value; + + after_runners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Ok(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListGithubHostedRunnersInGroupForOrg⚡️Response⚡️ApplicationJson⚡️Ok($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Actions⚡️ListGithubHostedRunnersInGroupForOrg⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed + { + assert($object instanceof Ok); + $result = []; + + $totalCount = $object->totalCount; + after_totalCount: $result['total_count'] = $totalCount; + + $runners = $object->runners; + static $runnersSerializer0; + + if ($runnersSerializer0 === null) { + $runnersSerializer0 = new SerializeArrayItems(...[]); + } + + $runners = $runnersSerializer0->serialize($runners, $this); + after_runners: $result['runners'] = $runners; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns.php index af1866940cf..b975938253c 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns.php @@ -4,13 +4,13 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\CheckRun; use ApiClients\Client\GitHub\Schema\CheckRun\CheckSuite; use ApiClients\Client\GitHub\Schema\CheckRun\Output; use ApiClients\Client\GitHub\Schema\DeploymentSimple; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; -use ApiClients\Client\GitHub\Schema\SimpleUser; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -50,7 +50,6 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\CheckRun\Output' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️Output($payload), 'ApiClients\Client\GitHub\Schema\CheckRun\CheckSuite' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️CheckSuite($payload), 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\DeploymentSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️DeploymentSimple($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), @@ -455,17 +454,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -627,267 +630,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser - { - $properties = []; - $missingFields = []; - try { - $value = $payload['name'] ?? null; - - if ($value === null) { - $properties['name'] = null; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['email'] ?? null; - - if ($value === null) { - $properties['email'] = null; - goto after_email; - } - - $properties['email'] = $value; - - after_email: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; - } - - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; - } - - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; - } - - $properties['gistsUrl'] = $value; - - after_gistsUrl: - - $value = $payload['starred_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; - } - - $properties['starredUrl'] = $value; - - after_starredUrl: - - $value = $payload['subscriptions_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; - } - - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_at'] ?? null; - - if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; - } - - $properties['starredAt'] = $value; - - after_starredAt: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; @@ -1179,7 +921,6 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\CheckRun\Output' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️Output($object), 'ApiClients\Client\GitHub\Schema\CheckRun\CheckSuite' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️CheckSuite($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\DeploymentSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️DeploymentSimple($object), default => throw new LogicException("No serialization defined for $className"), @@ -1436,12 +1177,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -1516,105 +1255,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns/CheckRunId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns/CheckRunId.php index 84b9c94a32d..6b94307f9ee 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns/CheckRunId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckRuns/CheckRunId.php @@ -4,13 +4,13 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\CheckRuns; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\CheckRun; use ApiClients\Client\GitHub\Schema\CheckRun\CheckSuite; use ApiClients\Client\GitHub\Schema\CheckRun\Output; use ApiClients\Client\GitHub\Schema\DeploymentSimple; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; -use ApiClients\Client\GitHub\Schema\SimpleUser; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -50,7 +50,6 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\CheckRun\Output' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️Output($payload), 'ApiClients\Client\GitHub\Schema\CheckRun\CheckSuite' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️CheckSuite($payload), 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\DeploymentSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️DeploymentSimple($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), @@ -455,17 +454,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -627,267 +630,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser - { - $properties = []; - $missingFields = []; - try { - $value = $payload['name'] ?? null; - - if ($value === null) { - $properties['name'] = null; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['email'] ?? null; - - if ($value === null) { - $properties['email'] = null; - goto after_email; - } - - $properties['email'] = $value; - - after_email: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; - } - - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; - } - - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; - } - - $properties['gistsUrl'] = $value; - - after_gistsUrl: - - $value = $payload['starred_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; - } - - $properties['starredUrl'] = $value; - - after_starredUrl: - - $value = $payload['subscriptions_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; - } - - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_at'] ?? null; - - if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; - } - - $properties['starredAt'] = $value; - - after_starredAt: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; @@ -1179,7 +921,6 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\CheckRun\Output' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️Output($object), 'ApiClients\Client\GitHub\Schema\CheckRun\CheckSuite' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRun⚡️CheckSuite($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\DeploymentSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️DeploymentSimple($object), default => throw new LogicException("No serialization defined for $className"), @@ -1436,12 +1177,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -1516,105 +1255,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites.php index 4d68e2006d0..2ab4593e07f 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\CheckSuite; use ApiClients\Client\GitHub\Schema\CodeOfConduct; use ApiClients\Client\GitHub\Schema\Integration; @@ -58,9 +59,9 @@ public function hydrateObject(string $className, array $payload): object return match ($className) { 'ApiClients\Client\GitHub\Schema\CheckSuite' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckSuite($payload), 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($payload), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\CodeOfConduct' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository\License' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($payload), @@ -385,17 +386,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -557,44 +562,85 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; $missingFields = []; try { - $value = $payload['name'] ?? null; + $value = $payload['issues'] ?? null; if ($value === null) { - $properties['name'] = null; - goto after_name; + $properties['issues'] = null; + goto after_issues; } - $properties['name'] = $value; + $properties['issues'] = $value; - after_name: + after_issues: - $value = $payload['email'] ?? null; + $value = $payload['checks'] ?? null; if ($value === null) { - $properties['email'] = null; - goto after_email; + $properties['checks'] = null; + goto after_checks; } - $properties['email'] = $value; + $properties['checks'] = $value; - after_email: + after_checks: - $value = $payload['login'] ?? null; + $value = $payload['metadata'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['metadata'] = null; + goto after_metadata; } - $properties['login'] = $value; + $properties['metadata'] = $value; - after_login: + after_metadata: + + $value = $payload['contents'] ?? null; + + if ($value === null) { + $properties['contents'] = null; + goto after_contents; + } + + $properties['contents'] = $value; + + after_contents: + + $value = $payload['deployments'] ?? null; + + if ($value === null) { + $properties['deployments'] = null; + goto after_deployments; + } + + $properties['deployments'] = $value; + + after_deployments: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository(array $payload): MinimalRepository + { + $properties = []; + $missingFields = []; + try { $value = $payload['id'] ?? null; if ($value === null) { @@ -617,38 +663,58 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Simp after_nodeId: - $value = $payload['avatar_url'] ?? null; + $value = $payload['name'] ?? null; if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; + $missingFields[] = 'name'; + goto after_name; } - $properties['avatarUrl'] = $value; + $properties['name'] = $value; - after_avatarUrl: + after_name: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['full_name'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'full_name'; + goto after_fullName; } - $properties['gravatarId'] = $value; + $properties['fullName'] = $value; - after_gravatarId: + after_fullName: - $value = $payload['url'] ?? null; + $value = $payload['owner'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'owner'; + goto after_owner; } - $properties['url'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_url: + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $missingFields[] = 'private'; + goto after_private; + } + + $properties['private'] = $value; + + after_private: $value = $payload['html_url'] ?? null; @@ -661,1255 +727,1194 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Simp after_htmlUrl: - $value = $payload['followers_url'] ?? null; + $value = $payload['description'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $properties['description'] = null; + goto after_description; } - $properties['followersUrl'] = $value; + $properties['description'] = $value; - after_followersUrl: + after_description: - $value = $payload['following_url'] ?? null; + $value = $payload['fork'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $missingFields[] = 'fork'; + goto after_fork; } - $properties['followingUrl'] = $value; + $properties['fork'] = $value; - after_followingUrl: + after_fork: - $value = $payload['gists_url'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $missingFields[] = 'url'; + goto after_url; } - $properties['gistsUrl'] = $value; + $properties['url'] = $value; - after_gistsUrl: + after_url: - $value = $payload['starred_url'] ?? null; + $value = $payload['archive_url'] ?? null; if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; + $missingFields[] = 'archive_url'; + goto after_archiveUrl; } - $properties['starredUrl'] = $value; + $properties['archiveUrl'] = $value; - after_starredUrl: + after_archiveUrl: - $value = $payload['subscriptions_url'] ?? null; + $value = $payload['assignees_url'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $missingFields[] = 'assignees_url'; + goto after_assigneesUrl; } - $properties['subscriptionsUrl'] = $value; + $properties['assigneesUrl'] = $value; - after_subscriptionsUrl: + after_assigneesUrl: - $value = $payload['organizations_url'] ?? null; + $value = $payload['blobs_url'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $missingFields[] = 'blobs_url'; + goto after_blobsUrl; } - $properties['organizationsUrl'] = $value; + $properties['blobsUrl'] = $value; - after_organizationsUrl: + after_blobsUrl: - $value = $payload['repos_url'] ?? null; + $value = $payload['branches_url'] ?? null; if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; + $missingFields[] = 'branches_url'; + goto after_branchesUrl; } - $properties['reposUrl'] = $value; + $properties['branchesUrl'] = $value; - after_reposUrl: + after_branchesUrl: - $value = $payload['events_url'] ?? null; + $value = $payload['collaborators_url'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $missingFields[] = 'collaborators_url'; + goto after_collaboratorsUrl; } - $properties['eventsUrl'] = $value; + $properties['collaboratorsUrl'] = $value; - after_eventsUrl: + after_collaboratorsUrl: - $value = $payload['received_events_url'] ?? null; + $value = $payload['comments_url'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $missingFields[] = 'comments_url'; + goto after_commentsUrl; } - $properties['receivedEventsUrl'] = $value; + $properties['commentsUrl'] = $value; - after_receivedEventsUrl: + after_commentsUrl: - $value = $payload['type'] ?? null; + $value = $payload['commits_url'] ?? null; if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + $missingFields[] = 'commits_url'; + goto after_commitsUrl; } - $properties['type'] = $value; + $properties['commitsUrl'] = $value; - after_type: + after_commitsUrl: - $value = $payload['site_admin'] ?? null; + $value = $payload['compare_url'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $missingFields[] = 'compare_url'; + goto after_compareUrl; } - $properties['siteAdmin'] = $value; + $properties['compareUrl'] = $value; - after_siteAdmin: + after_compareUrl: - $value = $payload['starred_at'] ?? null; + $value = $payload['contents_url'] ?? null; if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; + $missingFields[] = 'contents_url'; + goto after_contentsUrl; } - $properties['starredAt'] = $value; + $properties['contentsUrl'] = $value; - after_starredAt: + after_contentsUrl: - $value = $payload['user_view_type'] ?? null; + $value = $payload['contributors_url'] ?? null; if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; + $missingFields[] = 'contributors_url'; + goto after_contributorsUrl; } - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } + $properties['contributorsUrl'] = $value; - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } + after_contributorsUrl: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions - { - $properties = []; - $missingFields = []; - try { - $value = $payload['issues'] ?? null; + $value = $payload['deployments_url'] ?? null; if ($value === null) { - $properties['issues'] = null; - goto after_issues; + $missingFields[] = 'deployments_url'; + goto after_deploymentsUrl; } - $properties['issues'] = $value; + $properties['deploymentsUrl'] = $value; - after_issues: + after_deploymentsUrl: - $value = $payload['checks'] ?? null; + $value = $payload['downloads_url'] ?? null; if ($value === null) { - $properties['checks'] = null; - goto after_checks; + $missingFields[] = 'downloads_url'; + goto after_downloadsUrl; } - $properties['checks'] = $value; + $properties['downloadsUrl'] = $value; - after_checks: + after_downloadsUrl: - $value = $payload['metadata'] ?? null; + $value = $payload['events_url'] ?? null; if ($value === null) { - $properties['metadata'] = null; - goto after_metadata; + $missingFields[] = 'events_url'; + goto after_eventsUrl; } - $properties['metadata'] = $value; + $properties['eventsUrl'] = $value; - after_metadata: + after_eventsUrl: - $value = $payload['contents'] ?? null; + $value = $payload['forks_url'] ?? null; if ($value === null) { - $properties['contents'] = null; - goto after_contents; + $missingFields[] = 'forks_url'; + goto after_forksUrl; } - $properties['contents'] = $value; + $properties['forksUrl'] = $value; - after_contents: + after_forksUrl: - $value = $payload['deployments'] ?? null; + $value = $payload['git_commits_url'] ?? null; if ($value === null) { - $properties['deployments'] = null; - goto after_deployments; + $missingFields[] = 'git_commits_url'; + goto after_gitCommitsUrl; } - $properties['deployments'] = $value; - - after_deployments: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); - } + $properties['gitCommitsUrl'] = $value; - try { - return new Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } - } + after_gitCommitsUrl: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository(array $payload): MinimalRepository - { - $properties = []; - $missingFields = []; - try { - $value = $payload['id'] ?? null; + $value = $payload['git_refs_url'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $missingFields[] = 'git_refs_url'; + goto after_gitRefsUrl; } - $properties['id'] = $value; + $properties['gitRefsUrl'] = $value; - after_id: + after_gitRefsUrl: - $value = $payload['node_id'] ?? null; + $value = $payload['git_tags_url'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'git_tags_url'; + goto after_gitTagsUrl; } - $properties['nodeId'] = $value; + $properties['gitTagsUrl'] = $value; - after_nodeId: + after_gitTagsUrl: - $value = $payload['name'] ?? null; + $value = $payload['git_url'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; + $properties['gitUrl'] = null; + goto after_gitUrl; } - $properties['name'] = $value; + $properties['gitUrl'] = $value; - after_name: + after_gitUrl: - $value = $payload['full_name'] ?? null; + $value = $payload['issue_comment_url'] ?? null; if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; + $missingFields[] = 'issue_comment_url'; + goto after_issueCommentUrl; } - $properties['fullName'] = $value; + $properties['issueCommentUrl'] = $value; - after_fullName: + after_issueCommentUrl: - $value = $payload['owner'] ?? null; + $value = $payload['issue_events_url'] ?? null; if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'issue_events_url'; + goto after_issueEventsUrl; } - $properties['owner'] = $value; + $properties['issueEventsUrl'] = $value; - after_owner: + after_issueEventsUrl: - $value = $payload['private'] ?? null; + $value = $payload['issues_url'] ?? null; if ($value === null) { - $missingFields[] = 'private'; - goto after_private; + $missingFields[] = 'issues_url'; + goto after_issuesUrl; } - $properties['private'] = $value; + $properties['issuesUrl'] = $value; - after_private: + after_issuesUrl: - $value = $payload['html_url'] ?? null; + $value = $payload['keys_url'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + $missingFields[] = 'keys_url'; + goto after_keysUrl; } - $properties['htmlUrl'] = $value; + $properties['keysUrl'] = $value; - after_htmlUrl: + after_keysUrl: - $value = $payload['description'] ?? null; + $value = $payload['labels_url'] ?? null; if ($value === null) { - $properties['description'] = null; - goto after_description; + $missingFields[] = 'labels_url'; + goto after_labelsUrl; } - $properties['description'] = $value; + $properties['labelsUrl'] = $value; - after_description: + after_labelsUrl: - $value = $payload['fork'] ?? null; + $value = $payload['languages_url'] ?? null; if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; + $missingFields[] = 'languages_url'; + goto after_languagesUrl; } - $properties['fork'] = $value; + $properties['languagesUrl'] = $value; - after_fork: + after_languagesUrl: - $value = $payload['url'] ?? null; + $value = $payload['merges_url'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'merges_url'; + goto after_mergesUrl; } - $properties['url'] = $value; + $properties['mergesUrl'] = $value; - after_url: + after_mergesUrl: - $value = $payload['archive_url'] ?? null; + $value = $payload['milestones_url'] ?? null; if ($value === null) { - $missingFields[] = 'archive_url'; - goto after_archiveUrl; + $missingFields[] = 'milestones_url'; + goto after_milestonesUrl; } - $properties['archiveUrl'] = $value; + $properties['milestonesUrl'] = $value; - after_archiveUrl: + after_milestonesUrl: - $value = $payload['assignees_url'] ?? null; + $value = $payload['notifications_url'] ?? null; if ($value === null) { - $missingFields[] = 'assignees_url'; - goto after_assigneesUrl; + $missingFields[] = 'notifications_url'; + goto after_notificationsUrl; } - $properties['assigneesUrl'] = $value; + $properties['notificationsUrl'] = $value; - after_assigneesUrl: + after_notificationsUrl: - $value = $payload['blobs_url'] ?? null; + $value = $payload['pulls_url'] ?? null; if ($value === null) { - $missingFields[] = 'blobs_url'; - goto after_blobsUrl; + $missingFields[] = 'pulls_url'; + goto after_pullsUrl; } - $properties['blobsUrl'] = $value; + $properties['pullsUrl'] = $value; - after_blobsUrl: + after_pullsUrl: - $value = $payload['branches_url'] ?? null; + $value = $payload['releases_url'] ?? null; if ($value === null) { - $missingFields[] = 'branches_url'; - goto after_branchesUrl; + $missingFields[] = 'releases_url'; + goto after_releasesUrl; } - $properties['branchesUrl'] = $value; + $properties['releasesUrl'] = $value; - after_branchesUrl: + after_releasesUrl: - $value = $payload['collaborators_url'] ?? null; + $value = $payload['ssh_url'] ?? null; if ($value === null) { - $missingFields[] = 'collaborators_url'; - goto after_collaboratorsUrl; + $properties['sshUrl'] = null; + goto after_sshUrl; } - $properties['collaboratorsUrl'] = $value; + $properties['sshUrl'] = $value; - after_collaboratorsUrl: + after_sshUrl: - $value = $payload['comments_url'] ?? null; + $value = $payload['stargazers_url'] ?? null; if ($value === null) { - $missingFields[] = 'comments_url'; - goto after_commentsUrl; + $missingFields[] = 'stargazers_url'; + goto after_stargazersUrl; } - $properties['commentsUrl'] = $value; + $properties['stargazersUrl'] = $value; - after_commentsUrl: + after_stargazersUrl: - $value = $payload['commits_url'] ?? null; + $value = $payload['statuses_url'] ?? null; if ($value === null) { - $missingFields[] = 'commits_url'; - goto after_commitsUrl; + $missingFields[] = 'statuses_url'; + goto after_statusesUrl; } - $properties['commitsUrl'] = $value; + $properties['statusesUrl'] = $value; - after_commitsUrl: + after_statusesUrl: - $value = $payload['compare_url'] ?? null; + $value = $payload['subscribers_url'] ?? null; if ($value === null) { - $missingFields[] = 'compare_url'; - goto after_compareUrl; + $missingFields[] = 'subscribers_url'; + goto after_subscribersUrl; } - $properties['compareUrl'] = $value; + $properties['subscribersUrl'] = $value; - after_compareUrl: + after_subscribersUrl: - $value = $payload['contents_url'] ?? null; + $value = $payload['subscription_url'] ?? null; if ($value === null) { - $missingFields[] = 'contents_url'; - goto after_contentsUrl; + $missingFields[] = 'subscription_url'; + goto after_subscriptionUrl; } - $properties['contentsUrl'] = $value; + $properties['subscriptionUrl'] = $value; - after_contentsUrl: + after_subscriptionUrl: - $value = $payload['contributors_url'] ?? null; + $value = $payload['tags_url'] ?? null; if ($value === null) { - $missingFields[] = 'contributors_url'; - goto after_contributorsUrl; + $missingFields[] = 'tags_url'; + goto after_tagsUrl; } - $properties['contributorsUrl'] = $value; + $properties['tagsUrl'] = $value; - after_contributorsUrl: + after_tagsUrl: - $value = $payload['deployments_url'] ?? null; + $value = $payload['teams_url'] ?? null; if ($value === null) { - $missingFields[] = 'deployments_url'; - goto after_deploymentsUrl; + $missingFields[] = 'teams_url'; + goto after_teamsUrl; } - $properties['deploymentsUrl'] = $value; + $properties['teamsUrl'] = $value; - after_deploymentsUrl: + after_teamsUrl: - $value = $payload['downloads_url'] ?? null; + $value = $payload['trees_url'] ?? null; if ($value === null) { - $missingFields[] = 'downloads_url'; - goto after_downloadsUrl; + $missingFields[] = 'trees_url'; + goto after_treesUrl; } - $properties['downloadsUrl'] = $value; + $properties['treesUrl'] = $value; - after_downloadsUrl: + after_treesUrl: - $value = $payload['events_url'] ?? null; + $value = $payload['clone_url'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $properties['cloneUrl'] = null; + goto after_cloneUrl; } - $properties['eventsUrl'] = $value; + $properties['cloneUrl'] = $value; - after_eventsUrl: + after_cloneUrl: - $value = $payload['forks_url'] ?? null; + $value = $payload['mirror_url'] ?? null; if ($value === null) { - $missingFields[] = 'forks_url'; - goto after_forksUrl; + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; } - $properties['forksUrl'] = $value; + $properties['mirrorUrl'] = $value; - after_forksUrl: + after_mirrorUrl: - $value = $payload['git_commits_url'] ?? null; + $value = $payload['hooks_url'] ?? null; if ($value === null) { - $missingFields[] = 'git_commits_url'; - goto after_gitCommitsUrl; + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; } - $properties['gitCommitsUrl'] = $value; + $properties['hooksUrl'] = $value; - after_gitCommitsUrl: + after_hooksUrl: - $value = $payload['git_refs_url'] ?? null; + $value = $payload['svn_url'] ?? null; if ($value === null) { - $missingFields[] = 'git_refs_url'; - goto after_gitRefsUrl; + $properties['svnUrl'] = null; + goto after_svnUrl; } - $properties['gitRefsUrl'] = $value; + $properties['svnUrl'] = $value; - after_gitRefsUrl: + after_svnUrl: - $value = $payload['git_tags_url'] ?? null; + $value = $payload['homepage'] ?? null; if ($value === null) { - $missingFields[] = 'git_tags_url'; - goto after_gitTagsUrl; + $properties['homepage'] = null; + goto after_homepage; } - $properties['gitTagsUrl'] = $value; + $properties['homepage'] = $value; - after_gitTagsUrl: + after_homepage: - $value = $payload['git_url'] ?? null; + $value = $payload['language'] ?? null; if ($value === null) { - $properties['gitUrl'] = null; - goto after_gitUrl; + $properties['language'] = null; + goto after_language; } - $properties['gitUrl'] = $value; + $properties['language'] = $value; - after_gitUrl: + after_language: - $value = $payload['issue_comment_url'] ?? null; + $value = $payload['forks_count'] ?? null; if ($value === null) { - $missingFields[] = 'issue_comment_url'; - goto after_issueCommentUrl; + $properties['forksCount'] = null; + goto after_forksCount; } - $properties['issueCommentUrl'] = $value; + $properties['forksCount'] = $value; - after_issueCommentUrl: + after_forksCount: - $value = $payload['issue_events_url'] ?? null; + $value = $payload['stargazers_count'] ?? null; if ($value === null) { - $missingFields[] = 'issue_events_url'; - goto after_issueEventsUrl; + $properties['stargazersCount'] = null; + goto after_stargazersCount; } - $properties['issueEventsUrl'] = $value; + $properties['stargazersCount'] = $value; - after_issueEventsUrl: + after_stargazersCount: - $value = $payload['issues_url'] ?? null; + $value = $payload['watchers_count'] ?? null; if ($value === null) { - $missingFields[] = 'issues_url'; - goto after_issuesUrl; + $properties['watchersCount'] = null; + goto after_watchersCount; } - $properties['issuesUrl'] = $value; + $properties['watchersCount'] = $value; - after_issuesUrl: + after_watchersCount: - $value = $payload['keys_url'] ?? null; + $value = $payload['size'] ?? null; if ($value === null) { - $missingFields[] = 'keys_url'; - goto after_keysUrl; + $properties['size'] = null; + goto after_size; } - $properties['keysUrl'] = $value; + $properties['size'] = $value; - after_keysUrl: + after_size: - $value = $payload['labels_url'] ?? null; + $value = $payload['default_branch'] ?? null; if ($value === null) { - $missingFields[] = 'labels_url'; - goto after_labelsUrl; + $properties['defaultBranch'] = null; + goto after_defaultBranch; } - $properties['labelsUrl'] = $value; + $properties['defaultBranch'] = $value; - after_labelsUrl: + after_defaultBranch: - $value = $payload['languages_url'] ?? null; + $value = $payload['open_issues_count'] ?? null; if ($value === null) { - $missingFields[] = 'languages_url'; - goto after_languagesUrl; + $properties['openIssuesCount'] = null; + goto after_openIssuesCount; } - $properties['languagesUrl'] = $value; + $properties['openIssuesCount'] = $value; - after_languagesUrl: + after_openIssuesCount: - $value = $payload['merges_url'] ?? null; + $value = $payload['is_template'] ?? null; if ($value === null) { - $missingFields[] = 'merges_url'; - goto after_mergesUrl; + $properties['isTemplate'] = null; + goto after_isTemplate; } - $properties['mergesUrl'] = $value; + $properties['isTemplate'] = $value; - after_mergesUrl: + after_isTemplate: - $value = $payload['milestones_url'] ?? null; + $value = $payload['topics'] ?? null; if ($value === null) { - $missingFields[] = 'milestones_url'; - goto after_milestonesUrl; + $properties['topics'] = null; + goto after_topics; } - $properties['milestonesUrl'] = $value; + $properties['topics'] = $value; - after_milestonesUrl: + after_topics: - $value = $payload['notifications_url'] ?? null; + $value = $payload['has_issues'] ?? null; if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; + $properties['hasIssues'] = null; + goto after_hasIssues; } - $properties['notificationsUrl'] = $value; + $properties['hasIssues'] = $value; - after_notificationsUrl: + after_hasIssues: - $value = $payload['pulls_url'] ?? null; + $value = $payload['has_projects'] ?? null; if ($value === null) { - $missingFields[] = 'pulls_url'; - goto after_pullsUrl; + $properties['hasProjects'] = null; + goto after_hasProjects; } - $properties['pullsUrl'] = $value; + $properties['hasProjects'] = $value; - after_pullsUrl: + after_hasProjects: - $value = $payload['releases_url'] ?? null; + $value = $payload['has_wiki'] ?? null; if ($value === null) { - $missingFields[] = 'releases_url'; - goto after_releasesUrl; + $properties['hasWiki'] = null; + goto after_hasWiki; } - $properties['releasesUrl'] = $value; + $properties['hasWiki'] = $value; - after_releasesUrl: + after_hasWiki: - $value = $payload['ssh_url'] ?? null; + $value = $payload['has_pages'] ?? null; if ($value === null) { - $properties['sshUrl'] = null; - goto after_sshUrl; + $properties['hasPages'] = null; + goto after_hasPages; } - $properties['sshUrl'] = $value; + $properties['hasPages'] = $value; - after_sshUrl: + after_hasPages: - $value = $payload['stargazers_url'] ?? null; + $value = $payload['has_downloads'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_url'; - goto after_stargazersUrl; + $properties['hasDownloads'] = null; + goto after_hasDownloads; } - $properties['stargazersUrl'] = $value; + $properties['hasDownloads'] = $value; - after_stargazersUrl: + after_hasDownloads: - $value = $payload['statuses_url'] ?? null; + $value = $payload['has_discussions'] ?? null; if ($value === null) { - $missingFields[] = 'statuses_url'; - goto after_statusesUrl; + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; } - $properties['statusesUrl'] = $value; + $properties['hasDiscussions'] = $value; - after_statusesUrl: + after_hasDiscussions: - $value = $payload['subscribers_url'] ?? null; + $value = $payload['archived'] ?? null; if ($value === null) { - $missingFields[] = 'subscribers_url'; - goto after_subscribersUrl; + $properties['archived'] = null; + goto after_archived; } - $properties['subscribersUrl'] = $value; + $properties['archived'] = $value; - after_subscribersUrl: + after_archived: - $value = $payload['subscription_url'] ?? null; + $value = $payload['disabled'] ?? null; if ($value === null) { - $missingFields[] = 'subscription_url'; - goto after_subscriptionUrl; + $properties['disabled'] = null; + goto after_disabled; } - $properties['subscriptionUrl'] = $value; + $properties['disabled'] = $value; - after_subscriptionUrl: + after_disabled: - $value = $payload['tags_url'] ?? null; + $value = $payload['visibility'] ?? null; if ($value === null) { - $missingFields[] = 'tags_url'; - goto after_tagsUrl; + $properties['visibility'] = null; + goto after_visibility; } - $properties['tagsUrl'] = $value; + $properties['visibility'] = $value; - after_tagsUrl: + after_visibility: - $value = $payload['teams_url'] ?? null; + $value = $payload['pushed_at'] ?? null; if ($value === null) { - $missingFields[] = 'teams_url'; - goto after_teamsUrl; + $properties['pushedAt'] = null; + goto after_pushedAt; } - $properties['teamsUrl'] = $value; + $properties['pushedAt'] = $value; - after_teamsUrl: + after_pushedAt: - $value = $payload['trees_url'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'trees_url'; - goto after_treesUrl; + $properties['createdAt'] = null; + goto after_createdAt; } - $properties['treesUrl'] = $value; + $properties['createdAt'] = $value; - after_treesUrl: + after_createdAt: - $value = $payload['clone_url'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $properties['cloneUrl'] = null; - goto after_cloneUrl; + $properties['updatedAt'] = null; + goto after_updatedAt; } - $properties['cloneUrl'] = $value; + $properties['updatedAt'] = $value; - after_cloneUrl: + after_updatedAt: - $value = $payload['mirror_url'] ?? null; + $value = $payload['permissions'] ?? null; if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; + $properties['permissions'] = null; + goto after_permissions; } - $properties['mirrorUrl'] = $value; - - after_mirrorUrl: - - $value = $payload['hooks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['hooksUrl'] = $value; + $properties['permissions'] = $value; - after_hooksUrl: + after_permissions: - $value = $payload['svn_url'] ?? null; + $value = $payload['role_name'] ?? null; if ($value === null) { - $properties['svnUrl'] = null; - goto after_svnUrl; + $properties['roleName'] = null; + goto after_roleName; } - $properties['svnUrl'] = $value; + $properties['roleName'] = $value; - after_svnUrl: + after_roleName: - $value = $payload['homepage'] ?? null; + $value = $payload['temp_clone_token'] ?? null; if ($value === null) { - $properties['homepage'] = null; - goto after_homepage; + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; } - $properties['homepage'] = $value; + $properties['tempCloneToken'] = $value; - after_homepage: + after_tempCloneToken: - $value = $payload['language'] ?? null; + $value = $payload['delete_branch_on_merge'] ?? null; if ($value === null) { - $properties['language'] = null; - goto after_language; + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; } - $properties['language'] = $value; + $properties['deleteBranchOnMerge'] = $value; - after_language: + after_deleteBranchOnMerge: - $value = $payload['forks_count'] ?? null; + $value = $payload['subscribers_count'] ?? null; if ($value === null) { - $properties['forksCount'] = null; - goto after_forksCount; + $properties['subscribersCount'] = null; + goto after_subscribersCount; } - $properties['forksCount'] = $value; + $properties['subscribersCount'] = $value; - after_forksCount: + after_subscribersCount: - $value = $payload['stargazers_count'] ?? null; + $value = $payload['network_count'] ?? null; if ($value === null) { - $properties['stargazersCount'] = null; - goto after_stargazersCount; + $properties['networkCount'] = null; + goto after_networkCount; } - $properties['stargazersCount'] = $value; + $properties['networkCount'] = $value; - after_stargazersCount: + after_networkCount: - $value = $payload['watchers_count'] ?? null; + $value = $payload['code_of_conduct'] ?? null; if ($value === null) { - $properties['watchersCount'] = null; - goto after_watchersCount; + $properties['codeOfConduct'] = null; + goto after_codeOfConduct; } - $properties['watchersCount'] = $value; - - after_watchersCount: - - $value = $payload['size'] ?? null; - - if ($value === null) { - $properties['size'] = null; - goto after_size; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeOfConduct'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['size'] = $value; + $properties['codeOfConduct'] = $value; - after_size: + after_codeOfConduct: - $value = $payload['default_branch'] ?? null; + $value = $payload['license'] ?? null; if ($value === null) { - $properties['defaultBranch'] = null; - goto after_defaultBranch; + $properties['license'] = null; + goto after_license; } - $properties['defaultBranch'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_defaultBranch: + $properties['license'] = $value; - $value = $payload['open_issues_count'] ?? null; + after_license: + + $value = $payload['forks'] ?? null; if ($value === null) { - $properties['openIssuesCount'] = null; - goto after_openIssuesCount; + $properties['forks'] = null; + goto after_forks; } - $properties['openIssuesCount'] = $value; + $properties['forks'] = $value; - after_openIssuesCount: + after_forks: - $value = $payload['is_template'] ?? null; + $value = $payload['open_issues'] ?? null; if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; + $properties['openIssues'] = null; + goto after_openIssues; } - $properties['isTemplate'] = $value; + $properties['openIssues'] = $value; - after_isTemplate: + after_openIssues: - $value = $payload['topics'] ?? null; + $value = $payload['watchers'] ?? null; if ($value === null) { - $properties['topics'] = null; - goto after_topics; + $properties['watchers'] = null; + goto after_watchers; } - $properties['topics'] = $value; + $properties['watchers'] = $value; - after_topics: + after_watchers: - $value = $payload['has_issues'] ?? null; + $value = $payload['allow_forking'] ?? null; if ($value === null) { - $properties['hasIssues'] = null; - goto after_hasIssues; + $properties['allowForking'] = null; + goto after_allowForking; } - $properties['hasIssues'] = $value; + $properties['allowForking'] = $value; - after_hasIssues: + after_allowForking: - $value = $payload['has_projects'] ?? null; + $value = $payload['web_commit_signoff_required'] ?? null; if ($value === null) { - $properties['hasProjects'] = null; - goto after_hasProjects; + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; } - $properties['hasProjects'] = $value; + $properties['webCommitSignoffRequired'] = $value; - after_hasProjects: + after_webCommitSignoffRequired: - $value = $payload['has_wiki'] ?? null; + $value = $payload['security_and_analysis'] ?? null; if ($value === null) { - $properties['hasWiki'] = null; - goto after_hasWiki; + $properties['securityAndAnalysis'] = null; + goto after_securityAndAnalysis; } - $properties['hasWiki'] = $value; - - after_hasWiki: + if (is_array($value)) { + try { + $this->hydrationStack[] = 'securityAndAnalysis'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecurityAndAnalysis($value); + } finally { + array_pop($this->hydrationStack); + } + } - $value = $payload['has_pages'] ?? null; + $properties['securityAndAnalysis'] = $value; - if ($value === null) { - $properties['hasPages'] = null; - goto after_hasPages; - } + after_securityAndAnalysis: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + } - $properties['hasPages'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(MinimalRepository::class, $missingFields, stack: $this->hydrationStack); + } - after_hasPages: + try { + return new MinimalRepository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['has_downloads'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + { + $properties = []; + $missingFields = []; + try { + $value = $payload['name'] ?? null; if ($value === null) { - $properties['hasDownloads'] = null; - goto after_hasDownloads; + $properties['name'] = null; + goto after_name; } - $properties['hasDownloads'] = $value; + $properties['name'] = $value; - after_hasDownloads: + after_name: - $value = $payload['has_discussions'] ?? null; + $value = $payload['email'] ?? null; if ($value === null) { - $properties['hasDiscussions'] = null; - goto after_hasDiscussions; + $properties['email'] = null; + goto after_email; } - $properties['hasDiscussions'] = $value; + $properties['email'] = $value; - after_hasDiscussions: + after_email: - $value = $payload['archived'] ?? null; + $value = $payload['login'] ?? null; if ($value === null) { - $properties['archived'] = null; - goto after_archived; + $missingFields[] = 'login'; + goto after_login; } - $properties['archived'] = $value; + $properties['login'] = $value; - after_archived: + after_login: - $value = $payload['disabled'] ?? null; + $value = $payload['id'] ?? null; if ($value === null) { - $properties['disabled'] = null; - goto after_disabled; + $missingFields[] = 'id'; + goto after_id; } - $properties['disabled'] = $value; + $properties['id'] = $value; - after_disabled: + after_id: - $value = $payload['visibility'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $properties['visibility'] = null; - goto after_visibility; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['visibility'] = $value; + $properties['nodeId'] = $value; - after_visibility: + after_nodeId: - $value = $payload['pushed_at'] ?? null; + $value = $payload['avatar_url'] ?? null; if ($value === null) { - $properties['pushedAt'] = null; - goto after_pushedAt; + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; } - $properties['pushedAt'] = $value; + $properties['avatarUrl'] = $value; - after_pushedAt: + after_avatarUrl: - $value = $payload['created_at'] ?? null; + $value = $payload['gravatar_id'] ?? null; if ($value === null) { - $properties['createdAt'] = null; - goto after_createdAt; + $properties['gravatarId'] = null; + goto after_gravatarId; } - $properties['createdAt'] = $value; + $properties['gravatarId'] = $value; - after_createdAt: + after_gravatarId: - $value = $payload['updated_at'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $properties['updatedAt'] = null; - goto after_updatedAt; + $missingFields[] = 'url'; + goto after_url; } - $properties['updatedAt'] = $value; + $properties['url'] = $value; - after_updatedAt: + after_url: - $value = $payload['permissions'] ?? null; + $value = $payload['html_url'] ?? null; if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'html_url'; + goto after_htmlUrl; } - $properties['permissions'] = $value; + $properties['htmlUrl'] = $value; - after_permissions: + after_htmlUrl: - $value = $payload['role_name'] ?? null; + $value = $payload['followers_url'] ?? null; if ($value === null) { - $properties['roleName'] = null; - goto after_roleName; + $missingFields[] = 'followers_url'; + goto after_followersUrl; } - $properties['roleName'] = $value; + $properties['followersUrl'] = $value; - after_roleName: + after_followersUrl: - $value = $payload['temp_clone_token'] ?? null; + $value = $payload['following_url'] ?? null; if ($value === null) { - $properties['tempCloneToken'] = null; - goto after_tempCloneToken; + $missingFields[] = 'following_url'; + goto after_followingUrl; } - $properties['tempCloneToken'] = $value; + $properties['followingUrl'] = $value; - after_tempCloneToken: + after_followingUrl: - $value = $payload['delete_branch_on_merge'] ?? null; + $value = $payload['gists_url'] ?? null; if ($value === null) { - $properties['deleteBranchOnMerge'] = null; - goto after_deleteBranchOnMerge; + $missingFields[] = 'gists_url'; + goto after_gistsUrl; } - $properties['deleteBranchOnMerge'] = $value; + $properties['gistsUrl'] = $value; - after_deleteBranchOnMerge: + after_gistsUrl: - $value = $payload['subscribers_count'] ?? null; + $value = $payload['starred_url'] ?? null; if ($value === null) { - $properties['subscribersCount'] = null; - goto after_subscribersCount; + $missingFields[] = 'starred_url'; + goto after_starredUrl; } - $properties['subscribersCount'] = $value; + $properties['starredUrl'] = $value; - after_subscribersCount: + after_starredUrl: - $value = $payload['network_count'] ?? null; + $value = $payload['subscriptions_url'] ?? null; if ($value === null) { - $properties['networkCount'] = null; - goto after_networkCount; + $missingFields[] = 'subscriptions_url'; + goto after_subscriptionsUrl; } - $properties['networkCount'] = $value; + $properties['subscriptionsUrl'] = $value; - after_networkCount: + after_subscriptionsUrl: - $value = $payload['code_of_conduct'] ?? null; + $value = $payload['organizations_url'] ?? null; if ($value === null) { - $properties['codeOfConduct'] = null; - goto after_codeOfConduct; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'codeOfConduct'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'organizations_url'; + goto after_organizationsUrl; } - $properties['codeOfConduct'] = $value; + $properties['organizationsUrl'] = $value; - after_codeOfConduct: + after_organizationsUrl: - $value = $payload['license'] ?? null; + $value = $payload['repos_url'] ?? null; if ($value === null) { - $properties['license'] = null; - goto after_license; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'repos_url'; + goto after_reposUrl; } - $properties['license'] = $value; + $properties['reposUrl'] = $value; - after_license: + after_reposUrl: - $value = $payload['forks'] ?? null; + $value = $payload['events_url'] ?? null; if ($value === null) { - $properties['forks'] = null; - goto after_forks; + $missingFields[] = 'events_url'; + goto after_eventsUrl; } - $properties['forks'] = $value; + $properties['eventsUrl'] = $value; - after_forks: + after_eventsUrl: - $value = $payload['open_issues'] ?? null; + $value = $payload['received_events_url'] ?? null; if ($value === null) { - $properties['openIssues'] = null; - goto after_openIssues; + $missingFields[] = 'received_events_url'; + goto after_receivedEventsUrl; } - $properties['openIssues'] = $value; + $properties['receivedEventsUrl'] = $value; - after_openIssues: + after_receivedEventsUrl: - $value = $payload['watchers'] ?? null; + $value = $payload['type'] ?? null; if ($value === null) { - $properties['watchers'] = null; - goto after_watchers; + $missingFields[] = 'type'; + goto after_type; } - $properties['watchers'] = $value; + $properties['type'] = $value; - after_watchers: + after_type: - $value = $payload['allow_forking'] ?? null; + $value = $payload['site_admin'] ?? null; if ($value === null) { - $properties['allowForking'] = null; - goto after_allowForking; + $missingFields[] = 'site_admin'; + goto after_siteAdmin; } - $properties['allowForking'] = $value; + $properties['siteAdmin'] = $value; - after_allowForking: + after_siteAdmin: - $value = $payload['web_commit_signoff_required'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $properties['webCommitSignoffRequired'] = null; - goto after_webCommitSignoffRequired; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['webCommitSignoffRequired'] = $value; + $properties['starredAt'] = $value; - after_webCommitSignoffRequired: + after_starredAt: - $value = $payload['security_and_analysis'] ?? null; + $value = $payload['user_view_type'] ?? null; if ($value === null) { - $properties['securityAndAnalysis'] = null; - goto after_securityAndAnalysis; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'securityAndAnalysis'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecurityAndAnalysis($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['userViewType'] = null; + goto after_userViewType; } - $properties['securityAndAnalysis'] = $value; + $properties['userViewType'] = $value; - after_securityAndAnalysis: + after_userViewType: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(MinimalRepository::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); } try { - return new MinimalRepository(...$properties); + return new SimpleUser(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } } @@ -2672,9 +2677,9 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\CheckSuite' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckSuite($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\CodeOfConduct' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository\License' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($object), @@ -2913,12 +2918,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -2993,105 +2996,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); @@ -3631,6 +3535,105 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $userViewType = $object->userViewType; + + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions(mixed $object): mixed { assert($object instanceof \ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites/CheckSuiteId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites/CheckSuiteId.php index 97606e60805..4ab067235f8 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites/CheckSuiteId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CheckSuites/CheckSuiteId.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\CheckSuites; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\CheckSuite; use ApiClients\Client\GitHub\Schema\CodeOfConduct; use ApiClients\Client\GitHub\Schema\Integration; @@ -58,9 +59,9 @@ public function hydrateObject(string $className, array $payload): object return match ($className) { 'ApiClients\Client\GitHub\Schema\CheckSuite' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckSuite($payload), 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($payload), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\CodeOfConduct' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository\License' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($payload), @@ -385,17 +386,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -557,44 +562,85 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; $missingFields = []; try { - $value = $payload['name'] ?? null; + $value = $payload['issues'] ?? null; if ($value === null) { - $properties['name'] = null; - goto after_name; + $properties['issues'] = null; + goto after_issues; } - $properties['name'] = $value; + $properties['issues'] = $value; - after_name: + after_issues: - $value = $payload['email'] ?? null; + $value = $payload['checks'] ?? null; if ($value === null) { - $properties['email'] = null; - goto after_email; + $properties['checks'] = null; + goto after_checks; } - $properties['email'] = $value; + $properties['checks'] = $value; - after_email: + after_checks: - $value = $payload['login'] ?? null; + $value = $payload['metadata'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['metadata'] = null; + goto after_metadata; } - $properties['login'] = $value; + $properties['metadata'] = $value; - after_login: + after_metadata: + + $value = $payload['contents'] ?? null; + + if ($value === null) { + $properties['contents'] = null; + goto after_contents; + } + + $properties['contents'] = $value; + + after_contents: + + $value = $payload['deployments'] ?? null; + + if ($value === null) { + $properties['deployments'] = null; + goto after_deployments; + } + + $properties['deployments'] = $value; + + after_deployments: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository(array $payload): MinimalRepository + { + $properties = []; + $missingFields = []; + try { $value = $payload['id'] ?? null; if ($value === null) { @@ -617,38 +663,58 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Simp after_nodeId: - $value = $payload['avatar_url'] ?? null; + $value = $payload['name'] ?? null; if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; + $missingFields[] = 'name'; + goto after_name; } - $properties['avatarUrl'] = $value; + $properties['name'] = $value; - after_avatarUrl: + after_name: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['full_name'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'full_name'; + goto after_fullName; } - $properties['gravatarId'] = $value; + $properties['fullName'] = $value; - after_gravatarId: + after_fullName: - $value = $payload['url'] ?? null; + $value = $payload['owner'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'owner'; + goto after_owner; } - $properties['url'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_url: + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $missingFields[] = 'private'; + goto after_private; + } + + $properties['private'] = $value; + + after_private: $value = $payload['html_url'] ?? null; @@ -661,1255 +727,1194 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Simp after_htmlUrl: - $value = $payload['followers_url'] ?? null; + $value = $payload['description'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $properties['description'] = null; + goto after_description; } - $properties['followersUrl'] = $value; + $properties['description'] = $value; - after_followersUrl: + after_description: - $value = $payload['following_url'] ?? null; + $value = $payload['fork'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $missingFields[] = 'fork'; + goto after_fork; } - $properties['followingUrl'] = $value; + $properties['fork'] = $value; - after_followingUrl: + after_fork: - $value = $payload['gists_url'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $missingFields[] = 'url'; + goto after_url; } - $properties['gistsUrl'] = $value; + $properties['url'] = $value; - after_gistsUrl: + after_url: - $value = $payload['starred_url'] ?? null; + $value = $payload['archive_url'] ?? null; if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; + $missingFields[] = 'archive_url'; + goto after_archiveUrl; } - $properties['starredUrl'] = $value; + $properties['archiveUrl'] = $value; - after_starredUrl: + after_archiveUrl: - $value = $payload['subscriptions_url'] ?? null; + $value = $payload['assignees_url'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $missingFields[] = 'assignees_url'; + goto after_assigneesUrl; } - $properties['subscriptionsUrl'] = $value; + $properties['assigneesUrl'] = $value; - after_subscriptionsUrl: + after_assigneesUrl: - $value = $payload['organizations_url'] ?? null; + $value = $payload['blobs_url'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $missingFields[] = 'blobs_url'; + goto after_blobsUrl; } - $properties['organizationsUrl'] = $value; + $properties['blobsUrl'] = $value; - after_organizationsUrl: + after_blobsUrl: - $value = $payload['repos_url'] ?? null; + $value = $payload['branches_url'] ?? null; if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; + $missingFields[] = 'branches_url'; + goto after_branchesUrl; } - $properties['reposUrl'] = $value; + $properties['branchesUrl'] = $value; - after_reposUrl: + after_branchesUrl: - $value = $payload['events_url'] ?? null; + $value = $payload['collaborators_url'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $missingFields[] = 'collaborators_url'; + goto after_collaboratorsUrl; } - $properties['eventsUrl'] = $value; + $properties['collaboratorsUrl'] = $value; - after_eventsUrl: + after_collaboratorsUrl: - $value = $payload['received_events_url'] ?? null; + $value = $payload['comments_url'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $missingFields[] = 'comments_url'; + goto after_commentsUrl; } - $properties['receivedEventsUrl'] = $value; + $properties['commentsUrl'] = $value; - after_receivedEventsUrl: + after_commentsUrl: - $value = $payload['type'] ?? null; + $value = $payload['commits_url'] ?? null; if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + $missingFields[] = 'commits_url'; + goto after_commitsUrl; } - $properties['type'] = $value; + $properties['commitsUrl'] = $value; - after_type: + after_commitsUrl: - $value = $payload['site_admin'] ?? null; + $value = $payload['compare_url'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $missingFields[] = 'compare_url'; + goto after_compareUrl; } - $properties['siteAdmin'] = $value; + $properties['compareUrl'] = $value; - after_siteAdmin: + after_compareUrl: - $value = $payload['starred_at'] ?? null; + $value = $payload['contents_url'] ?? null; if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; + $missingFields[] = 'contents_url'; + goto after_contentsUrl; } - $properties['starredAt'] = $value; + $properties['contentsUrl'] = $value; - after_starredAt: + after_contentsUrl: - $value = $payload['user_view_type'] ?? null; + $value = $payload['contributors_url'] ?? null; if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; + $missingFields[] = 'contributors_url'; + goto after_contributorsUrl; } - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } + $properties['contributorsUrl'] = $value; - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } + after_contributorsUrl: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions - { - $properties = []; - $missingFields = []; - try { - $value = $payload['issues'] ?? null; + $value = $payload['deployments_url'] ?? null; if ($value === null) { - $properties['issues'] = null; - goto after_issues; + $missingFields[] = 'deployments_url'; + goto after_deploymentsUrl; } - $properties['issues'] = $value; + $properties['deploymentsUrl'] = $value; - after_issues: + after_deploymentsUrl: - $value = $payload['checks'] ?? null; + $value = $payload['downloads_url'] ?? null; if ($value === null) { - $properties['checks'] = null; - goto after_checks; + $missingFields[] = 'downloads_url'; + goto after_downloadsUrl; } - $properties['checks'] = $value; + $properties['downloadsUrl'] = $value; - after_checks: + after_downloadsUrl: - $value = $payload['metadata'] ?? null; + $value = $payload['events_url'] ?? null; if ($value === null) { - $properties['metadata'] = null; - goto after_metadata; + $missingFields[] = 'events_url'; + goto after_eventsUrl; } - $properties['metadata'] = $value; + $properties['eventsUrl'] = $value; - after_metadata: + after_eventsUrl: - $value = $payload['contents'] ?? null; + $value = $payload['forks_url'] ?? null; if ($value === null) { - $properties['contents'] = null; - goto after_contents; + $missingFields[] = 'forks_url'; + goto after_forksUrl; } - $properties['contents'] = $value; + $properties['forksUrl'] = $value; - after_contents: + after_forksUrl: - $value = $payload['deployments'] ?? null; + $value = $payload['git_commits_url'] ?? null; if ($value === null) { - $properties['deployments'] = null; - goto after_deployments; + $missingFields[] = 'git_commits_url'; + goto after_gitCommitsUrl; } - $properties['deployments'] = $value; - - after_deployments: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); - } + $properties['gitCommitsUrl'] = $value; - try { - return new Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } - } + after_gitCommitsUrl: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository(array $payload): MinimalRepository - { - $properties = []; - $missingFields = []; - try { - $value = $payload['id'] ?? null; + $value = $payload['git_refs_url'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $missingFields[] = 'git_refs_url'; + goto after_gitRefsUrl; } - $properties['id'] = $value; + $properties['gitRefsUrl'] = $value; - after_id: + after_gitRefsUrl: - $value = $payload['node_id'] ?? null; + $value = $payload['git_tags_url'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'git_tags_url'; + goto after_gitTagsUrl; } - $properties['nodeId'] = $value; + $properties['gitTagsUrl'] = $value; - after_nodeId: + after_gitTagsUrl: - $value = $payload['name'] ?? null; + $value = $payload['git_url'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; + $properties['gitUrl'] = null; + goto after_gitUrl; } - $properties['name'] = $value; + $properties['gitUrl'] = $value; - after_name: + after_gitUrl: - $value = $payload['full_name'] ?? null; + $value = $payload['issue_comment_url'] ?? null; if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; + $missingFields[] = 'issue_comment_url'; + goto after_issueCommentUrl; } - $properties['fullName'] = $value; + $properties['issueCommentUrl'] = $value; - after_fullName: + after_issueCommentUrl: - $value = $payload['owner'] ?? null; + $value = $payload['issue_events_url'] ?? null; if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'issue_events_url'; + goto after_issueEventsUrl; } - $properties['owner'] = $value; + $properties['issueEventsUrl'] = $value; - after_owner: + after_issueEventsUrl: - $value = $payload['private'] ?? null; + $value = $payload['issues_url'] ?? null; if ($value === null) { - $missingFields[] = 'private'; - goto after_private; + $missingFields[] = 'issues_url'; + goto after_issuesUrl; } - $properties['private'] = $value; + $properties['issuesUrl'] = $value; - after_private: + after_issuesUrl: - $value = $payload['html_url'] ?? null; + $value = $payload['keys_url'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + $missingFields[] = 'keys_url'; + goto after_keysUrl; } - $properties['htmlUrl'] = $value; + $properties['keysUrl'] = $value; - after_htmlUrl: + after_keysUrl: - $value = $payload['description'] ?? null; + $value = $payload['labels_url'] ?? null; if ($value === null) { - $properties['description'] = null; - goto after_description; + $missingFields[] = 'labels_url'; + goto after_labelsUrl; } - $properties['description'] = $value; + $properties['labelsUrl'] = $value; - after_description: + after_labelsUrl: - $value = $payload['fork'] ?? null; + $value = $payload['languages_url'] ?? null; if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; + $missingFields[] = 'languages_url'; + goto after_languagesUrl; } - $properties['fork'] = $value; + $properties['languagesUrl'] = $value; - after_fork: + after_languagesUrl: - $value = $payload['url'] ?? null; + $value = $payload['merges_url'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'merges_url'; + goto after_mergesUrl; } - $properties['url'] = $value; + $properties['mergesUrl'] = $value; - after_url: + after_mergesUrl: - $value = $payload['archive_url'] ?? null; + $value = $payload['milestones_url'] ?? null; if ($value === null) { - $missingFields[] = 'archive_url'; - goto after_archiveUrl; + $missingFields[] = 'milestones_url'; + goto after_milestonesUrl; } - $properties['archiveUrl'] = $value; + $properties['milestonesUrl'] = $value; - after_archiveUrl: + after_milestonesUrl: - $value = $payload['assignees_url'] ?? null; + $value = $payload['notifications_url'] ?? null; if ($value === null) { - $missingFields[] = 'assignees_url'; - goto after_assigneesUrl; + $missingFields[] = 'notifications_url'; + goto after_notificationsUrl; } - $properties['assigneesUrl'] = $value; + $properties['notificationsUrl'] = $value; - after_assigneesUrl: + after_notificationsUrl: - $value = $payload['blobs_url'] ?? null; + $value = $payload['pulls_url'] ?? null; if ($value === null) { - $missingFields[] = 'blobs_url'; - goto after_blobsUrl; + $missingFields[] = 'pulls_url'; + goto after_pullsUrl; } - $properties['blobsUrl'] = $value; + $properties['pullsUrl'] = $value; - after_blobsUrl: + after_pullsUrl: - $value = $payload['branches_url'] ?? null; + $value = $payload['releases_url'] ?? null; if ($value === null) { - $missingFields[] = 'branches_url'; - goto after_branchesUrl; + $missingFields[] = 'releases_url'; + goto after_releasesUrl; } - $properties['branchesUrl'] = $value; + $properties['releasesUrl'] = $value; - after_branchesUrl: + after_releasesUrl: - $value = $payload['collaborators_url'] ?? null; + $value = $payload['ssh_url'] ?? null; if ($value === null) { - $missingFields[] = 'collaborators_url'; - goto after_collaboratorsUrl; + $properties['sshUrl'] = null; + goto after_sshUrl; } - $properties['collaboratorsUrl'] = $value; + $properties['sshUrl'] = $value; - after_collaboratorsUrl: + after_sshUrl: - $value = $payload['comments_url'] ?? null; + $value = $payload['stargazers_url'] ?? null; if ($value === null) { - $missingFields[] = 'comments_url'; - goto after_commentsUrl; + $missingFields[] = 'stargazers_url'; + goto after_stargazersUrl; } - $properties['commentsUrl'] = $value; + $properties['stargazersUrl'] = $value; - after_commentsUrl: + after_stargazersUrl: - $value = $payload['commits_url'] ?? null; + $value = $payload['statuses_url'] ?? null; if ($value === null) { - $missingFields[] = 'commits_url'; - goto after_commitsUrl; + $missingFields[] = 'statuses_url'; + goto after_statusesUrl; } - $properties['commitsUrl'] = $value; + $properties['statusesUrl'] = $value; - after_commitsUrl: + after_statusesUrl: - $value = $payload['compare_url'] ?? null; + $value = $payload['subscribers_url'] ?? null; if ($value === null) { - $missingFields[] = 'compare_url'; - goto after_compareUrl; + $missingFields[] = 'subscribers_url'; + goto after_subscribersUrl; } - $properties['compareUrl'] = $value; + $properties['subscribersUrl'] = $value; - after_compareUrl: + after_subscribersUrl: - $value = $payload['contents_url'] ?? null; + $value = $payload['subscription_url'] ?? null; if ($value === null) { - $missingFields[] = 'contents_url'; - goto after_contentsUrl; + $missingFields[] = 'subscription_url'; + goto after_subscriptionUrl; } - $properties['contentsUrl'] = $value; + $properties['subscriptionUrl'] = $value; - after_contentsUrl: + after_subscriptionUrl: - $value = $payload['contributors_url'] ?? null; + $value = $payload['tags_url'] ?? null; if ($value === null) { - $missingFields[] = 'contributors_url'; - goto after_contributorsUrl; + $missingFields[] = 'tags_url'; + goto after_tagsUrl; } - $properties['contributorsUrl'] = $value; + $properties['tagsUrl'] = $value; - after_contributorsUrl: + after_tagsUrl: - $value = $payload['deployments_url'] ?? null; + $value = $payload['teams_url'] ?? null; if ($value === null) { - $missingFields[] = 'deployments_url'; - goto after_deploymentsUrl; + $missingFields[] = 'teams_url'; + goto after_teamsUrl; } - $properties['deploymentsUrl'] = $value; + $properties['teamsUrl'] = $value; - after_deploymentsUrl: + after_teamsUrl: - $value = $payload['downloads_url'] ?? null; + $value = $payload['trees_url'] ?? null; if ($value === null) { - $missingFields[] = 'downloads_url'; - goto after_downloadsUrl; + $missingFields[] = 'trees_url'; + goto after_treesUrl; } - $properties['downloadsUrl'] = $value; + $properties['treesUrl'] = $value; - after_downloadsUrl: + after_treesUrl: - $value = $payload['events_url'] ?? null; + $value = $payload['clone_url'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $properties['cloneUrl'] = null; + goto after_cloneUrl; } - $properties['eventsUrl'] = $value; + $properties['cloneUrl'] = $value; - after_eventsUrl: + after_cloneUrl: - $value = $payload['forks_url'] ?? null; + $value = $payload['mirror_url'] ?? null; if ($value === null) { - $missingFields[] = 'forks_url'; - goto after_forksUrl; + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; } - $properties['forksUrl'] = $value; + $properties['mirrorUrl'] = $value; - after_forksUrl: + after_mirrorUrl: - $value = $payload['git_commits_url'] ?? null; + $value = $payload['hooks_url'] ?? null; if ($value === null) { - $missingFields[] = 'git_commits_url'; - goto after_gitCommitsUrl; + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; } - $properties['gitCommitsUrl'] = $value; + $properties['hooksUrl'] = $value; - after_gitCommitsUrl: + after_hooksUrl: - $value = $payload['git_refs_url'] ?? null; + $value = $payload['svn_url'] ?? null; if ($value === null) { - $missingFields[] = 'git_refs_url'; - goto after_gitRefsUrl; + $properties['svnUrl'] = null; + goto after_svnUrl; } - $properties['gitRefsUrl'] = $value; + $properties['svnUrl'] = $value; - after_gitRefsUrl: + after_svnUrl: - $value = $payload['git_tags_url'] ?? null; + $value = $payload['homepage'] ?? null; if ($value === null) { - $missingFields[] = 'git_tags_url'; - goto after_gitTagsUrl; + $properties['homepage'] = null; + goto after_homepage; } - $properties['gitTagsUrl'] = $value; + $properties['homepage'] = $value; - after_gitTagsUrl: + after_homepage: - $value = $payload['git_url'] ?? null; + $value = $payload['language'] ?? null; if ($value === null) { - $properties['gitUrl'] = null; - goto after_gitUrl; + $properties['language'] = null; + goto after_language; } - $properties['gitUrl'] = $value; + $properties['language'] = $value; - after_gitUrl: + after_language: - $value = $payload['issue_comment_url'] ?? null; + $value = $payload['forks_count'] ?? null; if ($value === null) { - $missingFields[] = 'issue_comment_url'; - goto after_issueCommentUrl; + $properties['forksCount'] = null; + goto after_forksCount; } - $properties['issueCommentUrl'] = $value; + $properties['forksCount'] = $value; - after_issueCommentUrl: + after_forksCount: - $value = $payload['issue_events_url'] ?? null; + $value = $payload['stargazers_count'] ?? null; if ($value === null) { - $missingFields[] = 'issue_events_url'; - goto after_issueEventsUrl; + $properties['stargazersCount'] = null; + goto after_stargazersCount; } - $properties['issueEventsUrl'] = $value; + $properties['stargazersCount'] = $value; - after_issueEventsUrl: + after_stargazersCount: - $value = $payload['issues_url'] ?? null; + $value = $payload['watchers_count'] ?? null; if ($value === null) { - $missingFields[] = 'issues_url'; - goto after_issuesUrl; + $properties['watchersCount'] = null; + goto after_watchersCount; } - $properties['issuesUrl'] = $value; + $properties['watchersCount'] = $value; - after_issuesUrl: + after_watchersCount: - $value = $payload['keys_url'] ?? null; + $value = $payload['size'] ?? null; if ($value === null) { - $missingFields[] = 'keys_url'; - goto after_keysUrl; + $properties['size'] = null; + goto after_size; } - $properties['keysUrl'] = $value; + $properties['size'] = $value; - after_keysUrl: + after_size: - $value = $payload['labels_url'] ?? null; + $value = $payload['default_branch'] ?? null; if ($value === null) { - $missingFields[] = 'labels_url'; - goto after_labelsUrl; + $properties['defaultBranch'] = null; + goto after_defaultBranch; } - $properties['labelsUrl'] = $value; + $properties['defaultBranch'] = $value; - after_labelsUrl: + after_defaultBranch: - $value = $payload['languages_url'] ?? null; + $value = $payload['open_issues_count'] ?? null; if ($value === null) { - $missingFields[] = 'languages_url'; - goto after_languagesUrl; + $properties['openIssuesCount'] = null; + goto after_openIssuesCount; } - $properties['languagesUrl'] = $value; + $properties['openIssuesCount'] = $value; - after_languagesUrl: + after_openIssuesCount: - $value = $payload['merges_url'] ?? null; + $value = $payload['is_template'] ?? null; if ($value === null) { - $missingFields[] = 'merges_url'; - goto after_mergesUrl; + $properties['isTemplate'] = null; + goto after_isTemplate; } - $properties['mergesUrl'] = $value; + $properties['isTemplate'] = $value; - after_mergesUrl: + after_isTemplate: - $value = $payload['milestones_url'] ?? null; + $value = $payload['topics'] ?? null; if ($value === null) { - $missingFields[] = 'milestones_url'; - goto after_milestonesUrl; + $properties['topics'] = null; + goto after_topics; } - $properties['milestonesUrl'] = $value; + $properties['topics'] = $value; - after_milestonesUrl: + after_topics: - $value = $payload['notifications_url'] ?? null; + $value = $payload['has_issues'] ?? null; if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; + $properties['hasIssues'] = null; + goto after_hasIssues; } - $properties['notificationsUrl'] = $value; + $properties['hasIssues'] = $value; - after_notificationsUrl: + after_hasIssues: - $value = $payload['pulls_url'] ?? null; + $value = $payload['has_projects'] ?? null; if ($value === null) { - $missingFields[] = 'pulls_url'; - goto after_pullsUrl; + $properties['hasProjects'] = null; + goto after_hasProjects; } - $properties['pullsUrl'] = $value; + $properties['hasProjects'] = $value; - after_pullsUrl: + after_hasProjects: - $value = $payload['releases_url'] ?? null; + $value = $payload['has_wiki'] ?? null; if ($value === null) { - $missingFields[] = 'releases_url'; - goto after_releasesUrl; + $properties['hasWiki'] = null; + goto after_hasWiki; } - $properties['releasesUrl'] = $value; + $properties['hasWiki'] = $value; - after_releasesUrl: + after_hasWiki: - $value = $payload['ssh_url'] ?? null; + $value = $payload['has_pages'] ?? null; if ($value === null) { - $properties['sshUrl'] = null; - goto after_sshUrl; + $properties['hasPages'] = null; + goto after_hasPages; } - $properties['sshUrl'] = $value; + $properties['hasPages'] = $value; - after_sshUrl: + after_hasPages: - $value = $payload['stargazers_url'] ?? null; + $value = $payload['has_downloads'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_url'; - goto after_stargazersUrl; + $properties['hasDownloads'] = null; + goto after_hasDownloads; } - $properties['stargazersUrl'] = $value; + $properties['hasDownloads'] = $value; - after_stargazersUrl: + after_hasDownloads: - $value = $payload['statuses_url'] ?? null; + $value = $payload['has_discussions'] ?? null; if ($value === null) { - $missingFields[] = 'statuses_url'; - goto after_statusesUrl; + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; } - $properties['statusesUrl'] = $value; + $properties['hasDiscussions'] = $value; - after_statusesUrl: + after_hasDiscussions: - $value = $payload['subscribers_url'] ?? null; + $value = $payload['archived'] ?? null; if ($value === null) { - $missingFields[] = 'subscribers_url'; - goto after_subscribersUrl; + $properties['archived'] = null; + goto after_archived; } - $properties['subscribersUrl'] = $value; + $properties['archived'] = $value; - after_subscribersUrl: + after_archived: - $value = $payload['subscription_url'] ?? null; + $value = $payload['disabled'] ?? null; if ($value === null) { - $missingFields[] = 'subscription_url'; - goto after_subscriptionUrl; + $properties['disabled'] = null; + goto after_disabled; } - $properties['subscriptionUrl'] = $value; + $properties['disabled'] = $value; - after_subscriptionUrl: + after_disabled: - $value = $payload['tags_url'] ?? null; + $value = $payload['visibility'] ?? null; if ($value === null) { - $missingFields[] = 'tags_url'; - goto after_tagsUrl; + $properties['visibility'] = null; + goto after_visibility; } - $properties['tagsUrl'] = $value; + $properties['visibility'] = $value; - after_tagsUrl: + after_visibility: - $value = $payload['teams_url'] ?? null; + $value = $payload['pushed_at'] ?? null; if ($value === null) { - $missingFields[] = 'teams_url'; - goto after_teamsUrl; + $properties['pushedAt'] = null; + goto after_pushedAt; } - $properties['teamsUrl'] = $value; + $properties['pushedAt'] = $value; - after_teamsUrl: + after_pushedAt: - $value = $payload['trees_url'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'trees_url'; - goto after_treesUrl; + $properties['createdAt'] = null; + goto after_createdAt; } - $properties['treesUrl'] = $value; + $properties['createdAt'] = $value; - after_treesUrl: + after_createdAt: - $value = $payload['clone_url'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $properties['cloneUrl'] = null; - goto after_cloneUrl; + $properties['updatedAt'] = null; + goto after_updatedAt; } - $properties['cloneUrl'] = $value; + $properties['updatedAt'] = $value; - after_cloneUrl: + after_updatedAt: - $value = $payload['mirror_url'] ?? null; + $value = $payload['permissions'] ?? null; if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; + $properties['permissions'] = null; + goto after_permissions; } - $properties['mirrorUrl'] = $value; - - after_mirrorUrl: - - $value = $payload['hooks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['hooksUrl'] = $value; + $properties['permissions'] = $value; - after_hooksUrl: + after_permissions: - $value = $payload['svn_url'] ?? null; + $value = $payload['role_name'] ?? null; if ($value === null) { - $properties['svnUrl'] = null; - goto after_svnUrl; + $properties['roleName'] = null; + goto after_roleName; } - $properties['svnUrl'] = $value; + $properties['roleName'] = $value; - after_svnUrl: + after_roleName: - $value = $payload['homepage'] ?? null; + $value = $payload['temp_clone_token'] ?? null; if ($value === null) { - $properties['homepage'] = null; - goto after_homepage; + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; } - $properties['homepage'] = $value; + $properties['tempCloneToken'] = $value; - after_homepage: + after_tempCloneToken: - $value = $payload['language'] ?? null; + $value = $payload['delete_branch_on_merge'] ?? null; if ($value === null) { - $properties['language'] = null; - goto after_language; + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; } - $properties['language'] = $value; + $properties['deleteBranchOnMerge'] = $value; - after_language: + after_deleteBranchOnMerge: - $value = $payload['forks_count'] ?? null; + $value = $payload['subscribers_count'] ?? null; if ($value === null) { - $properties['forksCount'] = null; - goto after_forksCount; + $properties['subscribersCount'] = null; + goto after_subscribersCount; } - $properties['forksCount'] = $value; + $properties['subscribersCount'] = $value; - after_forksCount: + after_subscribersCount: - $value = $payload['stargazers_count'] ?? null; + $value = $payload['network_count'] ?? null; if ($value === null) { - $properties['stargazersCount'] = null; - goto after_stargazersCount; + $properties['networkCount'] = null; + goto after_networkCount; } - $properties['stargazersCount'] = $value; + $properties['networkCount'] = $value; - after_stargazersCount: + after_networkCount: - $value = $payload['watchers_count'] ?? null; + $value = $payload['code_of_conduct'] ?? null; if ($value === null) { - $properties['watchersCount'] = null; - goto after_watchersCount; + $properties['codeOfConduct'] = null; + goto after_codeOfConduct; } - $properties['watchersCount'] = $value; - - after_watchersCount: - - $value = $payload['size'] ?? null; - - if ($value === null) { - $properties['size'] = null; - goto after_size; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeOfConduct'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['size'] = $value; + $properties['codeOfConduct'] = $value; - after_size: + after_codeOfConduct: - $value = $payload['default_branch'] ?? null; + $value = $payload['license'] ?? null; if ($value === null) { - $properties['defaultBranch'] = null; - goto after_defaultBranch; + $properties['license'] = null; + goto after_license; } - $properties['defaultBranch'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_defaultBranch: + $properties['license'] = $value; - $value = $payload['open_issues_count'] ?? null; + after_license: + + $value = $payload['forks'] ?? null; if ($value === null) { - $properties['openIssuesCount'] = null; - goto after_openIssuesCount; + $properties['forks'] = null; + goto after_forks; } - $properties['openIssuesCount'] = $value; + $properties['forks'] = $value; - after_openIssuesCount: + after_forks: - $value = $payload['is_template'] ?? null; + $value = $payload['open_issues'] ?? null; if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; + $properties['openIssues'] = null; + goto after_openIssues; } - $properties['isTemplate'] = $value; + $properties['openIssues'] = $value; - after_isTemplate: + after_openIssues: - $value = $payload['topics'] ?? null; + $value = $payload['watchers'] ?? null; if ($value === null) { - $properties['topics'] = null; - goto after_topics; + $properties['watchers'] = null; + goto after_watchers; } - $properties['topics'] = $value; + $properties['watchers'] = $value; - after_topics: + after_watchers: - $value = $payload['has_issues'] ?? null; + $value = $payload['allow_forking'] ?? null; if ($value === null) { - $properties['hasIssues'] = null; - goto after_hasIssues; + $properties['allowForking'] = null; + goto after_allowForking; } - $properties['hasIssues'] = $value; + $properties['allowForking'] = $value; - after_hasIssues: + after_allowForking: - $value = $payload['has_projects'] ?? null; + $value = $payload['web_commit_signoff_required'] ?? null; if ($value === null) { - $properties['hasProjects'] = null; - goto after_hasProjects; + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; } - $properties['hasProjects'] = $value; + $properties['webCommitSignoffRequired'] = $value; - after_hasProjects: + after_webCommitSignoffRequired: - $value = $payload['has_wiki'] ?? null; + $value = $payload['security_and_analysis'] ?? null; if ($value === null) { - $properties['hasWiki'] = null; - goto after_hasWiki; + $properties['securityAndAnalysis'] = null; + goto after_securityAndAnalysis; } - $properties['hasWiki'] = $value; - - after_hasWiki: + if (is_array($value)) { + try { + $this->hydrationStack[] = 'securityAndAnalysis'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecurityAndAnalysis($value); + } finally { + array_pop($this->hydrationStack); + } + } - $value = $payload['has_pages'] ?? null; + $properties['securityAndAnalysis'] = $value; - if ($value === null) { - $properties['hasPages'] = null; - goto after_hasPages; - } + after_securityAndAnalysis: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + } - $properties['hasPages'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(MinimalRepository::class, $missingFields, stack: $this->hydrationStack); + } - after_hasPages: + try { + return new MinimalRepository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['has_downloads'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + { + $properties = []; + $missingFields = []; + try { + $value = $payload['name'] ?? null; if ($value === null) { - $properties['hasDownloads'] = null; - goto after_hasDownloads; + $properties['name'] = null; + goto after_name; } - $properties['hasDownloads'] = $value; + $properties['name'] = $value; - after_hasDownloads: + after_name: - $value = $payload['has_discussions'] ?? null; + $value = $payload['email'] ?? null; if ($value === null) { - $properties['hasDiscussions'] = null; - goto after_hasDiscussions; + $properties['email'] = null; + goto after_email; } - $properties['hasDiscussions'] = $value; + $properties['email'] = $value; - after_hasDiscussions: + after_email: - $value = $payload['archived'] ?? null; + $value = $payload['login'] ?? null; if ($value === null) { - $properties['archived'] = null; - goto after_archived; + $missingFields[] = 'login'; + goto after_login; } - $properties['archived'] = $value; + $properties['login'] = $value; - after_archived: + after_login: - $value = $payload['disabled'] ?? null; + $value = $payload['id'] ?? null; if ($value === null) { - $properties['disabled'] = null; - goto after_disabled; + $missingFields[] = 'id'; + goto after_id; } - $properties['disabled'] = $value; + $properties['id'] = $value; - after_disabled: + after_id: - $value = $payload['visibility'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $properties['visibility'] = null; - goto after_visibility; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['visibility'] = $value; + $properties['nodeId'] = $value; - after_visibility: + after_nodeId: - $value = $payload['pushed_at'] ?? null; + $value = $payload['avatar_url'] ?? null; if ($value === null) { - $properties['pushedAt'] = null; - goto after_pushedAt; + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; } - $properties['pushedAt'] = $value; + $properties['avatarUrl'] = $value; - after_pushedAt: + after_avatarUrl: - $value = $payload['created_at'] ?? null; + $value = $payload['gravatar_id'] ?? null; if ($value === null) { - $properties['createdAt'] = null; - goto after_createdAt; + $properties['gravatarId'] = null; + goto after_gravatarId; } - $properties['createdAt'] = $value; + $properties['gravatarId'] = $value; - after_createdAt: + after_gravatarId: - $value = $payload['updated_at'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $properties['updatedAt'] = null; - goto after_updatedAt; + $missingFields[] = 'url'; + goto after_url; } - $properties['updatedAt'] = $value; + $properties['url'] = $value; - after_updatedAt: + after_url: - $value = $payload['permissions'] ?? null; + $value = $payload['html_url'] ?? null; if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'html_url'; + goto after_htmlUrl; } - $properties['permissions'] = $value; + $properties['htmlUrl'] = $value; - after_permissions: + after_htmlUrl: - $value = $payload['role_name'] ?? null; + $value = $payload['followers_url'] ?? null; if ($value === null) { - $properties['roleName'] = null; - goto after_roleName; + $missingFields[] = 'followers_url'; + goto after_followersUrl; } - $properties['roleName'] = $value; + $properties['followersUrl'] = $value; - after_roleName: + after_followersUrl: - $value = $payload['temp_clone_token'] ?? null; + $value = $payload['following_url'] ?? null; if ($value === null) { - $properties['tempCloneToken'] = null; - goto after_tempCloneToken; + $missingFields[] = 'following_url'; + goto after_followingUrl; } - $properties['tempCloneToken'] = $value; + $properties['followingUrl'] = $value; - after_tempCloneToken: + after_followingUrl: - $value = $payload['delete_branch_on_merge'] ?? null; + $value = $payload['gists_url'] ?? null; if ($value === null) { - $properties['deleteBranchOnMerge'] = null; - goto after_deleteBranchOnMerge; + $missingFields[] = 'gists_url'; + goto after_gistsUrl; } - $properties['deleteBranchOnMerge'] = $value; + $properties['gistsUrl'] = $value; - after_deleteBranchOnMerge: + after_gistsUrl: - $value = $payload['subscribers_count'] ?? null; + $value = $payload['starred_url'] ?? null; if ($value === null) { - $properties['subscribersCount'] = null; - goto after_subscribersCount; + $missingFields[] = 'starred_url'; + goto after_starredUrl; } - $properties['subscribersCount'] = $value; + $properties['starredUrl'] = $value; - after_subscribersCount: + after_starredUrl: - $value = $payload['network_count'] ?? null; + $value = $payload['subscriptions_url'] ?? null; if ($value === null) { - $properties['networkCount'] = null; - goto after_networkCount; + $missingFields[] = 'subscriptions_url'; + goto after_subscriptionsUrl; } - $properties['networkCount'] = $value; + $properties['subscriptionsUrl'] = $value; - after_networkCount: + after_subscriptionsUrl: - $value = $payload['code_of_conduct'] ?? null; + $value = $payload['organizations_url'] ?? null; if ($value === null) { - $properties['codeOfConduct'] = null; - goto after_codeOfConduct; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'codeOfConduct'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'organizations_url'; + goto after_organizationsUrl; } - $properties['codeOfConduct'] = $value; + $properties['organizationsUrl'] = $value; - after_codeOfConduct: + after_organizationsUrl: - $value = $payload['license'] ?? null; + $value = $payload['repos_url'] ?? null; if ($value === null) { - $properties['license'] = null; - goto after_license; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'repos_url'; + goto after_reposUrl; } - $properties['license'] = $value; + $properties['reposUrl'] = $value; - after_license: + after_reposUrl: - $value = $payload['forks'] ?? null; + $value = $payload['events_url'] ?? null; if ($value === null) { - $properties['forks'] = null; - goto after_forks; + $missingFields[] = 'events_url'; + goto after_eventsUrl; } - $properties['forks'] = $value; + $properties['eventsUrl'] = $value; - after_forks: + after_eventsUrl: - $value = $payload['open_issues'] ?? null; + $value = $payload['received_events_url'] ?? null; if ($value === null) { - $properties['openIssues'] = null; - goto after_openIssues; + $missingFields[] = 'received_events_url'; + goto after_receivedEventsUrl; } - $properties['openIssues'] = $value; + $properties['receivedEventsUrl'] = $value; - after_openIssues: + after_receivedEventsUrl: - $value = $payload['watchers'] ?? null; + $value = $payload['type'] ?? null; if ($value === null) { - $properties['watchers'] = null; - goto after_watchers; + $missingFields[] = 'type'; + goto after_type; } - $properties['watchers'] = $value; + $properties['type'] = $value; - after_watchers: + after_type: - $value = $payload['allow_forking'] ?? null; + $value = $payload['site_admin'] ?? null; if ($value === null) { - $properties['allowForking'] = null; - goto after_allowForking; + $missingFields[] = 'site_admin'; + goto after_siteAdmin; } - $properties['allowForking'] = $value; + $properties['siteAdmin'] = $value; - after_allowForking: + after_siteAdmin: - $value = $payload['web_commit_signoff_required'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $properties['webCommitSignoffRequired'] = null; - goto after_webCommitSignoffRequired; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['webCommitSignoffRequired'] = $value; + $properties['starredAt'] = $value; - after_webCommitSignoffRequired: + after_starredAt: - $value = $payload['security_and_analysis'] ?? null; + $value = $payload['user_view_type'] ?? null; if ($value === null) { - $properties['securityAndAnalysis'] = null; - goto after_securityAndAnalysis; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'securityAndAnalysis'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecurityAndAnalysis($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['userViewType'] = null; + goto after_userViewType; } - $properties['securityAndAnalysis'] = $value; + $properties['userViewType'] = $value; - after_securityAndAnalysis: + after_userViewType: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(MinimalRepository::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); } try { - return new MinimalRepository(...$properties); + return new SimpleUser(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } } @@ -2672,9 +2677,9 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\CheckSuite' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckSuite($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\CodeOfConduct' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository\License' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($object), @@ -2913,12 +2918,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -2993,105 +2996,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); @@ -3631,6 +3535,105 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $userViewType = $object->userViewType; + + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions(mixed $object): mixed { assert($object instanceof \ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments.php index 1af6026cb9c..fad017303af 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo; use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Deployment\Payload; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\Deployment; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; @@ -618,17 +619,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -1270,12 +1275,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId.php index f86179cc7a9..811cce72665 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Deployments; use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Deployment\Payload; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Deployment; use ApiClients\Client\GitHub\Schema\Integration; @@ -618,17 +619,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -1303,12 +1308,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses.php index 70861236c04..0684f65cd66 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Deployments\DeploymentId; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\DeploymentStatus; use ApiClients\Client\GitHub\Schema\Integration; @@ -633,17 +634,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -1277,12 +1282,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses/StatusId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses/StatusId.php index 3c1ff877e3c..ba2ab1b2b9e 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses/StatusId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId/Statuses/StatusId.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Deployments\DeploymentId\Statuses; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\DeploymentStatus; use ApiClients\Client\GitHub\Schema\Integration; @@ -568,17 +569,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -1182,12 +1187,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues.php index 7bfc37b9894..87247e2b550 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; @@ -2513,17 +2514,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -4259,12 +4264,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Comments/CommentId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Comments/CommentId.php index 9a5e5fa6e34..3b51e600551 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Comments/CommentId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Comments/CommentId.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues\Comments; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; @@ -570,17 +571,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -1370,12 +1375,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Events/EventId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Events/EventId.php index 2ff96667f23..b21ca444728 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Events/EventId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/Events/EventId.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues\Events; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; @@ -2787,17 +2788,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -5255,12 +5260,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber.php index b530f10f608..cb9b89ddc50 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; @@ -2396,17 +2397,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -4102,12 +4107,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Assignees.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Assignees.php index e9dd3e2d082..f043e668591 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Assignees.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Assignees.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues\IssueNumber; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; use ApiClients\Client\GitHub\Schema\Issue\PullRequest; @@ -2390,17 +2391,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -3926,12 +3931,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Comments.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Comments.php index ecc56dc1b43..ce78ccb720d 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Comments.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/Comments.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues\IssueNumber; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; @@ -633,17 +634,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -1410,12 +1415,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssue.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssue.php index f3fd8236504..3f0bdf088aa 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssue.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssue.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues\IssueNumber; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; @@ -2394,17 +2395,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -4080,12 +4085,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues.php index 21463533ddf..4798f9c04a3 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues\IssueNumber; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; @@ -2457,17 +2458,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -4087,12 +4092,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues/Priority.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues/Priority.php index 85adad397b8..5ec8686afad 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues/Priority.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Issues/IssueNumber/SubIssues/Priority.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo\Issues\IssueNumber\SubIssues; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; @@ -2396,17 +2397,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -4102,12 +4107,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/CheckRun.php b/clients/GitHub/src/Internal/Hydrator/WebHook/CheckRun.php index ea6be36fde2..1cdf4be938e 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/CheckRun.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/CheckRun.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\WebHook; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\CheckRunWithSimpleCheckSuite; use ApiClients\Client\GitHub\Schema\CheckRunWithSimpleCheckSuite\Output; use ApiClients\Client\GitHub\Schema\CodeOfConduct; @@ -17,7 +18,6 @@ use ApiClients\Client\GitHub\Schema\RepositoryWebhooks; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository; -use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner; use ApiClients\Client\GitHub\Schema\SecurityAndAnalysis; use ApiClients\Client\GitHub\Schema\SecurityAndAnalysis\AdvancedSecurity; use ApiClients\Client\GitHub\Schema\SecurityAndAnalysis\DependabotSecurityUpdates; @@ -75,10 +75,10 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\WebhookCheckRunCompleted' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCheckRunCompleted($payload), 'ApiClients\Client\GitHub\Schema\CheckRunWithSimpleCheckSuite' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRunWithSimpleCheckSuite($payload), 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\SimpleCheckSuite' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleCheckSuite($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($payload), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\CodeOfConduct' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($payload), 'ApiClients\Client\GitHub\Schema\MinimalRepository\License' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($payload), @@ -536,17 +536,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -708,749 +712,488 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; $missingFields = []; try { - $value = $payload['name'] ?? null; + $value = $payload['issues'] ?? null; if ($value === null) { - $properties['name'] = null; - goto after_name; + $properties['issues'] = null; + goto after_issues; } - $properties['name'] = $value; + $properties['issues'] = $value; - after_name: + after_issues: - $value = $payload['email'] ?? null; + $value = $payload['checks'] ?? null; if ($value === null) { - $properties['email'] = null; - goto after_email; + $properties['checks'] = null; + goto after_checks; } - $properties['email'] = $value; + $properties['checks'] = $value; - after_email: + after_checks: - $value = $payload['login'] ?? null; + $value = $payload['metadata'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['metadata'] = null; + goto after_metadata; } - $properties['login'] = $value; + $properties['metadata'] = $value; - after_login: + after_metadata: - $value = $payload['id'] ?? null; + $value = $payload['contents'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $properties['contents'] = null; + goto after_contents; } - $properties['id'] = $value; + $properties['contents'] = $value; - after_id: + after_contents: - $value = $payload['node_id'] ?? null; + $value = $payload['deployments'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $properties['deployments'] = null; + goto after_deployments; } - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['avatar_url'] ?? null; + $properties['deployments'] = $value; - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } + after_deployments: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } - $properties['avatarUrl'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); + } - after_avatarUrl: + try { + return new Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['gravatar_id'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleCheckSuite(array $payload): SimpleCheckSuite + { + $properties = []; + $missingFields = []; + try { + $value = $payload['after'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $properties['after'] = null; + goto after_after; } - $properties['gravatarId'] = $value; + $properties['after'] = $value; - after_gravatarId: + after_after: - $value = $payload['url'] ?? null; + $value = $payload['app'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $properties['app'] = null; + goto after_app; } - $properties['url'] = $value; - - after_url: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'app'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['htmlUrl'] = $value; + $properties['app'] = $value; - after_htmlUrl: + after_app: - $value = $payload['followers_url'] ?? null; + $value = $payload['before'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $properties['before'] = null; + goto after_before; } - $properties['followersUrl'] = $value; + $properties['before'] = $value; - after_followersUrl: + after_before: - $value = $payload['following_url'] ?? null; + $value = $payload['conclusion'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $properties['conclusion'] = null; + goto after_conclusion; } - $properties['followingUrl'] = $value; + $properties['conclusion'] = $value; - after_followingUrl: + after_conclusion: - $value = $payload['gists_url'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $properties['createdAt'] = null; + goto after_createdAt; } - $properties['gistsUrl'] = $value; + $properties['createdAt'] = $value; - after_gistsUrl: + after_createdAt: - $value = $payload['starred_url'] ?? null; + $value = $payload['head_branch'] ?? null; if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; + $properties['headBranch'] = null; + goto after_headBranch; } - $properties['starredUrl'] = $value; + $properties['headBranch'] = $value; - after_starredUrl: + after_headBranch: - $value = $payload['subscriptions_url'] ?? null; + $value = $payload['head_sha'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $properties['headSha'] = null; + goto after_headSha; } - $properties['subscriptionsUrl'] = $value; + $properties['headSha'] = $value; - after_subscriptionsUrl: + after_headSha: - $value = $payload['organizations_url'] ?? null; + $value = $payload['id'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $properties['id'] = null; + goto after_id; } - $properties['organizationsUrl'] = $value; + $properties['id'] = $value; - after_organizationsUrl: + after_id: - $value = $payload['repos_url'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; + $properties['nodeId'] = null; + goto after_nodeId; } - $properties['reposUrl'] = $value; + $properties['nodeId'] = $value; - after_reposUrl: + after_nodeId: - $value = $payload['events_url'] ?? null; + $value = $payload['pull_requests'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $properties['pullRequests'] = null; + goto after_pullRequests; } - $properties['eventsUrl'] = $value; + $properties['pullRequests'] = $value; - after_eventsUrl: + after_pullRequests: - $value = $payload['received_events_url'] ?? null; + $value = $payload['repository'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $properties['repository'] = null; + goto after_repository; } - $properties['receivedEventsUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_receivedEventsUrl: + $properties['repository'] = $value; - $value = $payload['type'] ?? null; + after_repository: + + $value = $payload['status'] ?? null; if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + $properties['status'] = null; + goto after_status; } - $properties['type'] = $value; + $properties['status'] = $value; - after_type: + after_status: - $value = $payload['site_admin'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $properties['updatedAt'] = null; + goto after_updatedAt; } - $properties['siteAdmin'] = $value; + $properties['updatedAt'] = $value; - after_siteAdmin: + after_updatedAt: - $value = $payload['starred_at'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; + $properties['url'] = null; + goto after_url; } - $properties['starredAt'] = $value; - - after_starredAt: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; + $properties['url'] = $value; - after_userViewType: + after_url: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleCheckSuite', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(SimpleCheckSuite::class, $missingFields, stack: $this->hydrationStack); } try { - return new SimpleUser(...$properties); + return new SimpleCheckSuite(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleCheckSuite', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository(array $payload): MinimalRepository { $properties = []; $missingFields = []; try { - $value = $payload['issues'] ?? null; + $value = $payload['id'] ?? null; if ($value === null) { - $properties['issues'] = null; - goto after_issues; + $missingFields[] = 'id'; + goto after_id; } - $properties['issues'] = $value; + $properties['id'] = $value; - after_issues: + after_id: - $value = $payload['checks'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $properties['checks'] = null; - goto after_checks; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['checks'] = $value; + $properties['nodeId'] = $value; - after_checks: + after_nodeId: - $value = $payload['metadata'] ?? null; + $value = $payload['name'] ?? null; if ($value === null) { - $properties['metadata'] = null; - goto after_metadata; + $missingFields[] = 'name'; + goto after_name; } - $properties['metadata'] = $value; + $properties['name'] = $value; - after_metadata: + after_name: - $value = $payload['contents'] ?? null; + $value = $payload['full_name'] ?? null; if ($value === null) { - $properties['contents'] = null; - goto after_contents; + $missingFields[] = 'full_name'; + goto after_fullName; } - $properties['contents'] = $value; + $properties['fullName'] = $value; - after_contents: + after_fullName: - $value = $payload['deployments'] ?? null; + $value = $payload['owner'] ?? null; if ($value === null) { - $properties['deployments'] = null; - goto after_deployments; + $missingFields[] = 'owner'; + goto after_owner; } - $properties['deployments'] = $value; - - after_deployments: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); - } + $properties['owner'] = $value; - try { - return new Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } - } + after_owner: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleCheckSuite(array $payload): SimpleCheckSuite - { - $properties = []; - $missingFields = []; - try { - $value = $payload['after'] ?? null; + $value = $payload['private'] ?? null; if ($value === null) { - $properties['after'] = null; - goto after_after; + $missingFields[] = 'private'; + goto after_private; } - $properties['after'] = $value; + $properties['private'] = $value; - after_after: + after_private: - $value = $payload['app'] ?? null; + $value = $payload['html_url'] ?? null; if ($value === null) { - $properties['app'] = null; - goto after_app; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'app'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'html_url'; + goto after_htmlUrl; } - $properties['app'] = $value; + $properties['htmlUrl'] = $value; - after_app: + after_htmlUrl: - $value = $payload['before'] ?? null; + $value = $payload['description'] ?? null; if ($value === null) { - $properties['before'] = null; - goto after_before; + $properties['description'] = null; + goto after_description; } - $properties['before'] = $value; + $properties['description'] = $value; - after_before: + after_description: - $value = $payload['conclusion'] ?? null; + $value = $payload['fork'] ?? null; if ($value === null) { - $properties['conclusion'] = null; - goto after_conclusion; + $missingFields[] = 'fork'; + goto after_fork; } - $properties['conclusion'] = $value; + $properties['fork'] = $value; - after_conclusion: + after_fork: - $value = $payload['created_at'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $properties['createdAt'] = null; - goto after_createdAt; + $missingFields[] = 'url'; + goto after_url; } - $properties['createdAt'] = $value; + $properties['url'] = $value; - after_createdAt: + after_url: - $value = $payload['head_branch'] ?? null; + $value = $payload['archive_url'] ?? null; if ($value === null) { - $properties['headBranch'] = null; - goto after_headBranch; + $missingFields[] = 'archive_url'; + goto after_archiveUrl; } - $properties['headBranch'] = $value; + $properties['archiveUrl'] = $value; - after_headBranch: + after_archiveUrl: - $value = $payload['head_sha'] ?? null; + $value = $payload['assignees_url'] ?? null; if ($value === null) { - $properties['headSha'] = null; - goto after_headSha; + $missingFields[] = 'assignees_url'; + goto after_assigneesUrl; } - $properties['headSha'] = $value; + $properties['assigneesUrl'] = $value; - after_headSha: + after_assigneesUrl: - $value = $payload['id'] ?? null; + $value = $payload['blobs_url'] ?? null; if ($value === null) { - $properties['id'] = null; - goto after_id; + $missingFields[] = 'blobs_url'; + goto after_blobsUrl; } - $properties['id'] = $value; + $properties['blobsUrl'] = $value; - after_id: + after_blobsUrl: - $value = $payload['node_id'] ?? null; + $value = $payload['branches_url'] ?? null; if ($value === null) { - $properties['nodeId'] = null; - goto after_nodeId; + $missingFields[] = 'branches_url'; + goto after_branchesUrl; } - $properties['nodeId'] = $value; + $properties['branchesUrl'] = $value; - after_nodeId: + after_branchesUrl: - $value = $payload['pull_requests'] ?? null; + $value = $payload['collaborators_url'] ?? null; if ($value === null) { - $properties['pullRequests'] = null; - goto after_pullRequests; + $missingFields[] = 'collaborators_url'; + goto after_collaboratorsUrl; } - $properties['pullRequests'] = $value; + $properties['collaboratorsUrl'] = $value; - after_pullRequests: + after_collaboratorsUrl: - $value = $payload['repository'] ?? null; + $value = $payload['comments_url'] ?? null; if ($value === null) { - $properties['repository'] = null; - goto after_repository; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'repository'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'comments_url'; + goto after_commentsUrl; } - $properties['repository'] = $value; + $properties['commentsUrl'] = $value; - after_repository: + after_commentsUrl: - $value = $payload['status'] ?? null; + $value = $payload['commits_url'] ?? null; if ($value === null) { - $properties['status'] = null; - goto after_status; + $missingFields[] = 'commits_url'; + goto after_commitsUrl; } - $properties['status'] = $value; + $properties['commitsUrl'] = $value; - after_status: + after_commitsUrl: - $value = $payload['updated_at'] ?? null; + $value = $payload['compare_url'] ?? null; if ($value === null) { - $properties['updatedAt'] = null; - goto after_updatedAt; + $missingFields[] = 'compare_url'; + goto after_compareUrl; } - $properties['updatedAt'] = $value; + $properties['compareUrl'] = $value; - after_updatedAt: + after_compareUrl: - $value = $payload['url'] ?? null; + $value = $payload['contents_url'] ?? null; if ($value === null) { - $properties['url'] = null; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleCheckSuite', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleCheckSuite::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new SimpleCheckSuite(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleCheckSuite', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository(array $payload): MinimalRepository - { - $properties = []; - $missingFields = []; - try { - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['full_name'] ?? null; - - if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; - } - - $properties['fullName'] = $value; - - after_fullName: - - $value = $payload['owner'] ?? null; - - if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['owner'] = $value; - - after_owner: - - $value = $payload['private'] ?? null; - - if ($value === null) { - $missingFields[] = 'private'; - goto after_private; - } - - $properties['private'] = $value; - - after_private: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - - $value = $payload['fork'] ?? null; - - if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; - } - - $properties['fork'] = $value; - - after_fork: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['archive_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'archive_url'; - goto after_archiveUrl; - } - - $properties['archiveUrl'] = $value; - - after_archiveUrl: - - $value = $payload['assignees_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'assignees_url'; - goto after_assigneesUrl; - } - - $properties['assigneesUrl'] = $value; - - after_assigneesUrl: - - $value = $payload['blobs_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'blobs_url'; - goto after_blobsUrl; - } - - $properties['blobsUrl'] = $value; - - after_blobsUrl: - - $value = $payload['branches_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'branches_url'; - goto after_branchesUrl; - } - - $properties['branchesUrl'] = $value; - - after_branchesUrl: - - $value = $payload['collaborators_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'collaborators_url'; - goto after_collaboratorsUrl; - } - - $properties['collaboratorsUrl'] = $value; - - after_collaboratorsUrl: - - $value = $payload['comments_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'comments_url'; - goto after_commentsUrl; - } - - $properties['commentsUrl'] = $value; - - after_commentsUrl: - - $value = $payload['commits_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'commits_url'; - goto after_commitsUrl; - } - - $properties['commitsUrl'] = $value; - - after_commitsUrl: - - $value = $payload['compare_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'compare_url'; - goto after_compareUrl; - } - - $properties['compareUrl'] = $value; - - after_compareUrl: - - $value = $payload['contents_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'contents_url'; - goto after_contentsUrl; + $missingFields[] = 'contents_url'; + goto after_contentsUrl; } $properties['contentsUrl'] = $value; @@ -2197,61 +1940,322 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Mini $properties['watchers'] = $value; - after_watchers: + after_watchers: + + $value = $payload['allow_forking'] ?? null; + + if ($value === null) { + $properties['allowForking'] = null; + goto after_allowForking; + } + + $properties['allowForking'] = $value; + + after_allowForking: + + $value = $payload['web_commit_signoff_required'] ?? null; + + if ($value === null) { + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; + } + + $properties['webCommitSignoffRequired'] = $value; + + after_webCommitSignoffRequired: + + $value = $payload['security_and_analysis'] ?? null; + + if ($value === null) { + $properties['securityAndAnalysis'] = null; + goto after_securityAndAnalysis; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'securityAndAnalysis'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecurityAndAnalysis($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['securityAndAnalysis'] = $value; + + after_securityAndAnalysis: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(MinimalRepository::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new MinimalRepository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + { + $properties = []; + $missingFields = []; + try { + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['email'] ?? null; + + if ($value === null) { + $properties['email'] = null; + goto after_email; + } + + $properties['email'] = $value; + + after_email: + + $value = $payload['login'] ?? null; + + if ($value === null) { + $missingFields[] = 'login'; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['gravatar_id'] ?? null; + + if ($value === null) { + $properties['gravatarId'] = null; + goto after_gravatarId; + } + + $properties['gravatarId'] = $value; + + after_gravatarId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['followers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'followers_url'; + goto after_followersUrl; + } + + $properties['followersUrl'] = $value; + + after_followersUrl: + + $value = $payload['following_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'following_url'; + goto after_followingUrl; + } + + $properties['followingUrl'] = $value; + + after_followingUrl: + + $value = $payload['gists_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'gists_url'; + goto after_gistsUrl; + } + + $properties['gistsUrl'] = $value; + + after_gistsUrl: + + $value = $payload['starred_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'starred_url'; + goto after_starredUrl; + } + + $properties['starredUrl'] = $value; + + after_starredUrl: + + $value = $payload['subscriptions_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscriptions_url'; + goto after_subscriptionsUrl; + } + + $properties['subscriptionsUrl'] = $value; + + after_subscriptionsUrl: + + $value = $payload['organizations_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'organizations_url'; + goto after_organizationsUrl; + } + + $properties['organizationsUrl'] = $value; + + after_organizationsUrl: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'repos_url'; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['received_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'received_events_url'; + goto after_receivedEventsUrl; + } + + $properties['receivedEventsUrl'] = $value; + + after_receivedEventsUrl: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $missingFields[] = 'type'; + goto after_type; + } + + $properties['type'] = $value; + + after_type: - $value = $payload['allow_forking'] ?? null; + $value = $payload['site_admin'] ?? null; if ($value === null) { - $properties['allowForking'] = null; - goto after_allowForking; + $missingFields[] = 'site_admin'; + goto after_siteAdmin; } - $properties['allowForking'] = $value; + $properties['siteAdmin'] = $value; - after_allowForking: + after_siteAdmin: - $value = $payload['web_commit_signoff_required'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $properties['webCommitSignoffRequired'] = null; - goto after_webCommitSignoffRequired; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['webCommitSignoffRequired'] = $value; + $properties['starredAt'] = $value; - after_webCommitSignoffRequired: + after_starredAt: - $value = $payload['security_and_analysis'] ?? null; + $value = $payload['user_view_type'] ?? null; if ($value === null) { - $properties['securityAndAnalysis'] = null; - goto after_securityAndAnalysis; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'securityAndAnalysis'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecurityAndAnalysis($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['userViewType'] = null; + goto after_userViewType; } - $properties['securityAndAnalysis'] = $value; + $properties['userViewType'] = $value; - after_securityAndAnalysis: + after_userViewType: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(MinimalRepository::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); } try { - return new MinimalRepository(...$properties); + return new SimpleUser(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\MinimalRepository', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } } @@ -5570,7 +5574,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repo } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): Owner + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner { $properties = []; $missingFields = []; @@ -5777,11 +5781,11 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repo } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner::class, $missingFields, stack: $this->hydrationStack); } try { - return new Owner(...$properties); + return new \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner(...$properties); } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); } @@ -6475,10 +6479,10 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\WebhookCheckRunCompleted' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCheckRunCompleted($object), 'ApiClients\Client\GitHub\Schema\CheckRunWithSimpleCheckSuite' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CheckRunWithSimpleCheckSuite($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\SimpleCheckSuite' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleCheckSuite($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\CodeOfConduct' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeOfConduct($object), 'ApiClients\Client\GitHub\Schema\MinimalRepository\License' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️License($object), @@ -6733,12 +6737,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -6813,105 +6815,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); @@ -7580,6 +7483,105 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $userViewType = $object->userViewType; + + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️MinimalRepository⚡️Permissions(mixed $object): mixed { assert($object instanceof \ApiClients\Client\GitHub\Schema\MinimalRepository\Permissions); @@ -9329,7 +9331,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(mixed $object): mixed { - assert($object instanceof Owner); + assert($object instanceof \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner); $result = []; $login = $object->login; diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/DeploymentProtectionRule.php b/clients/GitHub/src/Internal/Hydrator/WebHook/DeploymentProtectionRule.php index 86846a9a444..3e1976b9a91 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/DeploymentProtectionRule.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/DeploymentProtectionRule.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\WebHook; use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Deployment\Payload; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\Deployment; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; @@ -13,7 +14,6 @@ use ApiClients\Client\GitHub\Schema\RepositoryWebhooks; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository; -use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner; use ApiClients\Client\GitHub\Schema\SimpleInstallation; use ApiClients\Client\GitHub\Schema\SimpleUser; use ApiClients\Client\GitHub\Schema\WebhookDeploymentProtectionRuleRequested; @@ -806,17 +806,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -3378,7 +3382,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repo } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): Owner + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner { $properties = []; $missingFields = []; @@ -3585,11 +3589,11 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repo } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner::class, $missingFields, stack: $this->hydrationStack); } try { - return new Owner(...$properties); + return new \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner(...$properties); } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); } @@ -4312,12 +4316,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -5725,7 +5727,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(mixed $object): mixed { - assert($object instanceof Owner); + assert($object instanceof \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner); $result = []; $login = $object->login; diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/IssueComment.php b/clients/GitHub/src/Internal/Hydrator/WebHook/IssueComment.php index 58357019076..a397382f809 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/IssueComment.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/IssueComment.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\WebHook; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\EnterpriseWebhooks; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Integration\Permissions; @@ -23,7 +24,6 @@ use ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\Milestone; use ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\Milestone\Creator; use ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PerformedViaGithubApp; -use ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PerformedViaGithubApp\Owner; use ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PullRequest; use ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\SubIssuesSummary; use ApiClients\Client\GitHub\Schema\WebhookIssueCommentDeleted; @@ -69,7 +69,6 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated($payload), 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment($payload), 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\Reactions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️Reactions($payload), 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\User' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️User($payload), @@ -89,6 +88,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($payload), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($payload), 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($payload), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($payload), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($payload), @@ -539,17 +539,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -711,774 +715,513 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions { $properties = []; $missingFields = []; try { - $value = $payload['name'] ?? null; + $value = $payload['issues'] ?? null; if ($value === null) { - $properties['name'] = null; - goto after_name; + $properties['issues'] = null; + goto after_issues; } - $properties['name'] = $value; + $properties['issues'] = $value; - after_name: + after_issues: - $value = $payload['email'] ?? null; + $value = $payload['checks'] ?? null; if ($value === null) { - $properties['email'] = null; - goto after_email; + $properties['checks'] = null; + goto after_checks; } - $properties['email'] = $value; + $properties['checks'] = $value; - after_email: + after_checks: - $value = $payload['login'] ?? null; + $value = $payload['metadata'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['metadata'] = null; + goto after_metadata; } - $properties['login'] = $value; + $properties['metadata'] = $value; - after_login: + after_metadata: - $value = $payload['id'] ?? null; + $value = $payload['contents'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $properties['contents'] = null; + goto after_contents; } - $properties['id'] = $value; + $properties['contents'] = $value; - after_id: + after_contents: - $value = $payload['node_id'] ?? null; + $value = $payload['deployments'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $properties['deployments'] = null; + goto after_deployments; } - $properties['nodeId'] = $value; + $properties['deployments'] = $value; - after_nodeId: + after_deployments: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } - $value = $payload['avatar_url'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️Reactions(array $payload): Reactions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['+1'] ?? null; if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; + $missingFields[] = '+1'; + goto after_plusOne; } - $properties['avatarUrl'] = $value; + $properties['plusOne'] = $value; - after_avatarUrl: + after_plusOne: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['-1'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = '-1'; + goto after_minOne; } - $properties['gravatarId'] = $value; + $properties['minOne'] = $value; - after_gravatarId: + after_minOne: - $value = $payload['url'] ?? null; + $value = $payload['confused'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'confused'; + goto after_confused; } - $properties['url'] = $value; + $properties['confused'] = $value; - after_url: + after_confused: - $value = $payload['html_url'] ?? null; + $value = $payload['eyes'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + $missingFields[] = 'eyes'; + goto after_eyes; } - $properties['htmlUrl'] = $value; + $properties['eyes'] = $value; - after_htmlUrl: + after_eyes: - $value = $payload['followers_url'] ?? null; + $value = $payload['heart'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $missingFields[] = 'heart'; + goto after_heart; } - $properties['followersUrl'] = $value; + $properties['heart'] = $value; - after_followersUrl: + after_heart: - $value = $payload['following_url'] ?? null; + $value = $payload['hooray'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $missingFields[] = 'hooray'; + goto after_hooray; } - $properties['followingUrl'] = $value; + $properties['hooray'] = $value; - after_followingUrl: + after_hooray: - $value = $payload['gists_url'] ?? null; + $value = $payload['laugh'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $missingFields[] = 'laugh'; + goto after_laugh; } - $properties['gistsUrl'] = $value; + $properties['laugh'] = $value; - after_gistsUrl: + after_laugh: - $value = $payload['starred_url'] ?? null; + $value = $payload['rocket'] ?? null; if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; + $missingFields[] = 'rocket'; + goto after_rocket; } - $properties['starredUrl'] = $value; + $properties['rocket'] = $value; - after_starredUrl: + after_rocket: - $value = $payload['subscriptions_url'] ?? null; + $value = $payload['total_count'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $missingFields[] = 'total_count'; + goto after_totalCount; } - $properties['subscriptionsUrl'] = $value; + $properties['totalCount'] = $value; - after_subscriptionsUrl: + after_totalCount: - $value = $payload['organizations_url'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $missingFields[] = 'url'; + goto after_url; } - $properties['organizationsUrl'] = $value; + $properties['url'] = $value; - after_organizationsUrl: + after_url: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\Reactions', $exception, stack: $this->hydrationStack); + } - $value = $payload['repos_url'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Reactions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Reactions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\Reactions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️User(array $payload): User + { + $properties = []; + $missingFields = []; + try { + $value = $payload['avatar_url'] ?? null; if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; + $properties['avatarUrl'] = null; + goto after_avatarUrl; } - $properties['reposUrl'] = $value; + $properties['avatarUrl'] = $value; - after_reposUrl: + after_avatarUrl: - $value = $payload['events_url'] ?? null; + $value = $payload['deleted'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $properties['deleted'] = null; + goto after_deleted; } - $properties['eventsUrl'] = $value; + $properties['deleted'] = $value; - after_eventsUrl: + after_deleted: - $value = $payload['received_events_url'] ?? null; + $value = $payload['email'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $properties['email'] = null; + goto after_email; } - $properties['receivedEventsUrl'] = $value; + $properties['email'] = $value; - after_receivedEventsUrl: + after_email: - $value = $payload['type'] ?? null; + $value = $payload['events_url'] ?? null; if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + $properties['eventsUrl'] = null; + goto after_eventsUrl; } - $properties['type'] = $value; + $properties['eventsUrl'] = $value; - after_type: + after_eventsUrl: - $value = $payload['site_admin'] ?? null; + $value = $payload['followers_url'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $properties['followersUrl'] = null; + goto after_followersUrl; } - $properties['siteAdmin'] = $value; + $properties['followersUrl'] = $value; - after_siteAdmin: + after_followersUrl: - $value = $payload['starred_at'] ?? null; + $value = $payload['following_url'] ?? null; if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; + $properties['followingUrl'] = null; + goto after_followingUrl; } - $properties['starredAt'] = $value; + $properties['followingUrl'] = $value; - after_starredAt: + after_followingUrl: - $value = $payload['user_view_type'] ?? null; + $value = $payload['gists_url'] ?? null; if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; + $properties['gistsUrl'] = null; + goto after_gistsUrl; } - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } + $properties['gistsUrl'] = $value; - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } + after_gistsUrl: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): Permissions - { - $properties = []; - $missingFields = []; - try { - $value = $payload['issues'] ?? null; + $value = $payload['gravatar_id'] ?? null; if ($value === null) { - $properties['issues'] = null; - goto after_issues; + $properties['gravatarId'] = null; + goto after_gravatarId; } - $properties['issues'] = $value; + $properties['gravatarId'] = $value; - after_issues: + after_gravatarId: - $value = $payload['checks'] ?? null; + $value = $payload['html_url'] ?? null; if ($value === null) { - $properties['checks'] = null; - goto after_checks; + $properties['htmlUrl'] = null; + goto after_htmlUrl; } - $properties['checks'] = $value; + $properties['htmlUrl'] = $value; - after_checks: + after_htmlUrl: - $value = $payload['metadata'] ?? null; + $value = $payload['id'] ?? null; if ($value === null) { - $properties['metadata'] = null; - goto after_metadata; + $missingFields[] = 'id'; + goto after_id; } - $properties['metadata'] = $value; + $properties['id'] = $value; - after_metadata: + after_id: - $value = $payload['contents'] ?? null; + $value = $payload['login'] ?? null; if ($value === null) { - $properties['contents'] = null; - goto after_contents; + $missingFields[] = 'login'; + goto after_login; } - $properties['contents'] = $value; + $properties['login'] = $value; - after_contents: + after_login: - $value = $payload['deployments'] ?? null; + $value = $payload['name'] ?? null; if ($value === null) { - $properties['deployments'] = null; - goto after_deployments; + $properties['name'] = null; + goto after_name; } - $properties['deployments'] = $value; - - after_deployments: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); - } + $properties['name'] = $value; - try { - return new Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); - } - } + after_name: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️Reactions(array $payload): Reactions - { - $properties = []; - $missingFields = []; - try { - $value = $payload['+1'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $missingFields[] = '+1'; - goto after_plusOne; + $properties['nodeId'] = null; + goto after_nodeId; } - $properties['plusOne'] = $value; + $properties['nodeId'] = $value; - after_plusOne: + after_nodeId: - $value = $payload['-1'] ?? null; + $value = $payload['organizations_url'] ?? null; if ($value === null) { - $missingFields[] = '-1'; - goto after_minOne; + $properties['organizationsUrl'] = null; + goto after_organizationsUrl; } - $properties['minOne'] = $value; + $properties['organizationsUrl'] = $value; - after_minOne: + after_organizationsUrl: - $value = $payload['confused'] ?? null; + $value = $payload['received_events_url'] ?? null; if ($value === null) { - $missingFields[] = 'confused'; - goto after_confused; + $properties['receivedEventsUrl'] = null; + goto after_receivedEventsUrl; } - $properties['confused'] = $value; + $properties['receivedEventsUrl'] = $value; - after_confused: + after_receivedEventsUrl: - $value = $payload['eyes'] ?? null; + $value = $payload['repos_url'] ?? null; if ($value === null) { - $missingFields[] = 'eyes'; - goto after_eyes; + $properties['reposUrl'] = null; + goto after_reposUrl; } - $properties['eyes'] = $value; + $properties['reposUrl'] = $value; - after_eyes: + after_reposUrl: - $value = $payload['heart'] ?? null; + $value = $payload['site_admin'] ?? null; if ($value === null) { - $missingFields[] = 'heart'; - goto after_heart; + $properties['siteAdmin'] = null; + goto after_siteAdmin; } - $properties['heart'] = $value; + $properties['siteAdmin'] = $value; - after_heart: + after_siteAdmin: - $value = $payload['hooray'] ?? null; + $value = $payload['starred_url'] ?? null; if ($value === null) { - $missingFields[] = 'hooray'; - goto after_hooray; + $properties['starredUrl'] = null; + goto after_starredUrl; } - $properties['hooray'] = $value; + $properties['starredUrl'] = $value; - after_hooray: + after_starredUrl: - $value = $payload['laugh'] ?? null; + $value = $payload['subscriptions_url'] ?? null; if ($value === null) { - $missingFields[] = 'laugh'; - goto after_laugh; + $properties['subscriptionsUrl'] = null; + goto after_subscriptionsUrl; } - $properties['laugh'] = $value; + $properties['subscriptionsUrl'] = $value; - after_laugh: + after_subscriptionsUrl: - $value = $payload['rocket'] ?? null; + $value = $payload['type'] ?? null; if ($value === null) { - $missingFields[] = 'rocket'; - goto after_rocket; + $properties['type'] = null; + goto after_type; } - $properties['rocket'] = $value; + $properties['type'] = $value; - after_rocket: + after_type: - $value = $payload['total_count'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'total_count'; - goto after_totalCount; + $properties['url'] = null; + goto after_url; } - $properties['totalCount'] = $value; + $properties['url'] = $value; - after_totalCount: + after_url: - $value = $payload['url'] ?? null; + $value = $payload['user_view_type'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $properties['userViewType'] = null; + goto after_userViewType; } - $properties['url'] = $value; + $properties['userViewType'] = $value; - after_url: + after_userViewType: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\Reactions', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\User', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Reactions::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(User::class, $missingFields, stack: $this->hydrationStack); } try { - return new Reactions(...$properties); + return new User(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\Reactions', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\User', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️User(array $payload): User + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks(array $payload): EnterpriseWebhooks { $properties = []; $missingFields = []; try { - $value = $payload['avatar_url'] ?? null; + $value = $payload['description'] ?? null; if ($value === null) { - $properties['avatarUrl'] = null; - goto after_avatarUrl; + $properties['description'] = null; + goto after_description; } - $properties['avatarUrl'] = $value; + $properties['description'] = $value; - after_avatarUrl: + after_description: - $value = $payload['deleted'] ?? null; + $value = $payload['html_url'] ?? null; if ($value === null) { - $properties['deleted'] = null; - goto after_deleted; + $missingFields[] = 'html_url'; + goto after_htmlUrl; } - $properties['deleted'] = $value; + $properties['htmlUrl'] = $value; - after_deleted: + after_htmlUrl: - $value = $payload['email'] ?? null; + $value = $payload['website_url'] ?? null; if ($value === null) { - $properties['email'] = null; - goto after_email; + $properties['websiteUrl'] = null; + goto after_websiteUrl; } - $properties['email'] = $value; + $properties['websiteUrl'] = $value; - after_email: + after_websiteUrl: - $value = $payload['events_url'] ?? null; + $value = $payload['id'] ?? null; if ($value === null) { - $properties['eventsUrl'] = null; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $properties['followersUrl'] = null; - goto after_followersUrl; - } - - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $properties['followingUrl'] = null; - goto after_followingUrl; - } - - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $properties['gistsUrl'] = null; - goto after_gistsUrl; - } - - $properties['gistsUrl'] = $value; - - after_gistsUrl: - - $value = $payload['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $properties['htmlUrl'] = null; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['name'] ?? null; - - if ($value === null) { - $properties['name'] = null; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $properties['nodeId'] = null; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $properties['organizationsUrl'] = null; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $properties['receivedEventsUrl'] = null; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $properties['reposUrl'] = null; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $properties['siteAdmin'] = null; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_url'] ?? null; - - if ($value === null) { - $properties['starredUrl'] = null; - goto after_starredUrl; - } - - $properties['starredUrl'] = $value; - - after_starredUrl: - - $value = $payload['subscriptions_url'] ?? null; - - if ($value === null) { - $properties['subscriptionsUrl'] = null; - goto after_subscriptionsUrl; - } - - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $properties['type'] = null; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $properties['url'] = null; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\User', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(User::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new User(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\User', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks(array $payload): EnterpriseWebhooks - { - $properties = []; - $missingFields = []; - try { - $value = $payload['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['website_url'] ?? null; - - if ($value === null) { - $properties['websiteUrl'] = null; - goto after_websiteUrl; - } - - $properties['websiteUrl'] = $value; - - after_websiteUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $missingFields[] = 'id'; + goto after_id; } $properties['id'] = $value; @@ -2924,7 +2667,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Issue⚡️PerformedViaGithubApp⚡️Owner(array $payload): Owner + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Issue⚡️PerformedViaGithubApp⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PerformedViaGithubApp\Owner { $properties = []; $missingFields = []; @@ -3175,11 +2918,11 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PerformedViaGithubApp\Owner::class, $missingFields, stack: $this->hydrationStack); } try { - return new Owner(...$properties); + return new \ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PerformedViaGithubApp\Owner(...$properties); } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PerformedViaGithubApp\Owner', $exception, stack: $this->hydrationStack); } @@ -4678,839 +4421,1100 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repo goto after_issuesUrl; } - $properties['issuesUrl'] = $value; + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['keys_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'keys_url'; + goto after_keysUrl; + } + + $properties['keysUrl'] = $value; + + after_keysUrl: + + $value = $payload['labels_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'labels_url'; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $value = $payload['languages_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'languages_url'; + goto after_languagesUrl; + } + + $properties['languagesUrl'] = $value; + + after_languagesUrl: + + $value = $payload['merges_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'merges_url'; + goto after_mergesUrl; + } + + $properties['mergesUrl'] = $value; + + after_mergesUrl: + + $value = $payload['milestones_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'milestones_url'; + goto after_milestonesUrl; + } + + $properties['milestonesUrl'] = $value; + + after_milestonesUrl: + + $value = $payload['notifications_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'notifications_url'; + goto after_notificationsUrl; + } + + $properties['notificationsUrl'] = $value; + + after_notificationsUrl: + + $value = $payload['pulls_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'pulls_url'; + goto after_pullsUrl; + } + + $properties['pullsUrl'] = $value; + + after_pullsUrl: + + $value = $payload['releases_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'releases_url'; + goto after_releasesUrl; + } + + $properties['releasesUrl'] = $value; + + after_releasesUrl: + + $value = $payload['ssh_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'ssh_url'; + goto after_sshUrl; + } + + $properties['sshUrl'] = $value; + + after_sshUrl: + + $value = $payload['stargazers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'stargazers_url'; + goto after_stargazersUrl; + } + + $properties['stargazersUrl'] = $value; + + after_stargazersUrl: + + $value = $payload['statuses_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'statuses_url'; + goto after_statusesUrl; + } + + $properties['statusesUrl'] = $value; + + after_statusesUrl: + + $value = $payload['subscribers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscribers_url'; + goto after_subscribersUrl; + } + + $properties['subscribersUrl'] = $value; + + after_subscribersUrl: + + $value = $payload['subscription_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscription_url'; + goto after_subscriptionUrl; + } + + $properties['subscriptionUrl'] = $value; + + after_subscriptionUrl: + + $value = $payload['tags_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'tags_url'; + goto after_tagsUrl; + } + + $properties['tagsUrl'] = $value; + + after_tagsUrl: + + $value = $payload['teams_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'teams_url'; + goto after_teamsUrl; + } + + $properties['teamsUrl'] = $value; + + after_teamsUrl: + + $value = $payload['trees_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'trees_url'; + goto after_treesUrl; + } + + $properties['treesUrl'] = $value; + + after_treesUrl: + + $value = $payload['clone_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'clone_url'; + goto after_cloneUrl; + } + + $properties['cloneUrl'] = $value; + + after_cloneUrl: + + $value = $payload['mirror_url'] ?? null; + + if ($value === null) { + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; + } + + $properties['mirrorUrl'] = $value; + + after_mirrorUrl: + + $value = $payload['hooks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['svn_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'svn_url'; + goto after_svnUrl; + } + + $properties['svnUrl'] = $value; + + after_svnUrl: + + $value = $payload['homepage'] ?? null; + + if ($value === null) { + $properties['homepage'] = null; + goto after_homepage; + } + + $properties['homepage'] = $value; + + after_homepage: + + $value = $payload['language'] ?? null; + + if ($value === null) { + $properties['language'] = null; + goto after_language; + } + + $properties['language'] = $value; - after_issuesUrl: + after_language: - $value = $payload['keys_url'] ?? null; + $value = $payload['forks_count'] ?? null; if ($value === null) { - $missingFields[] = 'keys_url'; - goto after_keysUrl; + $missingFields[] = 'forks_count'; + goto after_forksCount; } - $properties['keysUrl'] = $value; + $properties['forksCount'] = $value; - after_keysUrl: + after_forksCount: - $value = $payload['labels_url'] ?? null; + $value = $payload['stargazers_count'] ?? null; if ($value === null) { - $missingFields[] = 'labels_url'; - goto after_labelsUrl; + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; } - $properties['labelsUrl'] = $value; + $properties['stargazersCount'] = $value; - after_labelsUrl: + after_stargazersCount: - $value = $payload['languages_url'] ?? null; + $value = $payload['watchers_count'] ?? null; if ($value === null) { - $missingFields[] = 'languages_url'; - goto after_languagesUrl; + $missingFields[] = 'watchers_count'; + goto after_watchersCount; } - $properties['languagesUrl'] = $value; + $properties['watchersCount'] = $value; - after_languagesUrl: + after_watchersCount: - $value = $payload['merges_url'] ?? null; + $value = $payload['size'] ?? null; if ($value === null) { - $missingFields[] = 'merges_url'; - goto after_mergesUrl; + $missingFields[] = 'size'; + goto after_size; } - $properties['mergesUrl'] = $value; + $properties['size'] = $value; - after_mergesUrl: + after_size: - $value = $payload['milestones_url'] ?? null; + $value = $payload['default_branch'] ?? null; if ($value === null) { - $missingFields[] = 'milestones_url'; - goto after_milestonesUrl; + $missingFields[] = 'default_branch'; + goto after_defaultBranch; } - $properties['milestonesUrl'] = $value; + $properties['defaultBranch'] = $value; - after_milestonesUrl: + after_defaultBranch: - $value = $payload['notifications_url'] ?? null; + $value = $payload['open_issues_count'] ?? null; if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; } - $properties['notificationsUrl'] = $value; + $properties['openIssuesCount'] = $value; - after_notificationsUrl: + after_openIssuesCount: - $value = $payload['pulls_url'] ?? null; + $value = $payload['is_template'] ?? null; if ($value === null) { - $missingFields[] = 'pulls_url'; - goto after_pullsUrl; + $properties['isTemplate'] = null; + goto after_isTemplate; } - $properties['pullsUrl'] = $value; + $properties['isTemplate'] = $value; - after_pullsUrl: + after_isTemplate: - $value = $payload['releases_url'] ?? null; + $value = $payload['topics'] ?? null; if ($value === null) { - $missingFields[] = 'releases_url'; - goto after_releasesUrl; + $properties['topics'] = null; + goto after_topics; } - $properties['releasesUrl'] = $value; + $properties['topics'] = $value; - after_releasesUrl: + after_topics: - $value = $payload['ssh_url'] ?? null; + $value = $payload['custom_properties'] ?? null; if ($value === null) { - $missingFields[] = 'ssh_url'; - goto after_sshUrl; + $properties['customProperties'] = null; + goto after_customProperties; } - $properties['sshUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'customProperties'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_sshUrl: + $properties['customProperties'] = $value; - $value = $payload['stargazers_url'] ?? null; + after_customProperties: + + $value = $payload['has_issues'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_url'; - goto after_stargazersUrl; + $missingFields[] = 'has_issues'; + goto after_hasIssues; } - $properties['stargazersUrl'] = $value; + $properties['hasIssues'] = $value; - after_stargazersUrl: + after_hasIssues: - $value = $payload['statuses_url'] ?? null; + $value = $payload['has_projects'] ?? null; if ($value === null) { - $missingFields[] = 'statuses_url'; - goto after_statusesUrl; + $missingFields[] = 'has_projects'; + goto after_hasProjects; } - $properties['statusesUrl'] = $value; + $properties['hasProjects'] = $value; - after_statusesUrl: + after_hasProjects: - $value = $payload['subscribers_url'] ?? null; + $value = $payload['has_wiki'] ?? null; if ($value === null) { - $missingFields[] = 'subscribers_url'; - goto after_subscribersUrl; + $missingFields[] = 'has_wiki'; + goto after_hasWiki; } - $properties['subscribersUrl'] = $value; + $properties['hasWiki'] = $value; - after_subscribersUrl: + after_hasWiki: - $value = $payload['subscription_url'] ?? null; + $value = $payload['has_pages'] ?? null; if ($value === null) { - $missingFields[] = 'subscription_url'; - goto after_subscriptionUrl; + $missingFields[] = 'has_pages'; + goto after_hasPages; } - $properties['subscriptionUrl'] = $value; + $properties['hasPages'] = $value; - after_subscriptionUrl: + after_hasPages: - $value = $payload['tags_url'] ?? null; + $value = $payload['has_downloads'] ?? null; if ($value === null) { - $missingFields[] = 'tags_url'; - goto after_tagsUrl; + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; } - $properties['tagsUrl'] = $value; + $properties['hasDownloads'] = $value; - after_tagsUrl: + after_hasDownloads: - $value = $payload['teams_url'] ?? null; + $value = $payload['has_discussions'] ?? null; if ($value === null) { - $missingFields[] = 'teams_url'; - goto after_teamsUrl; + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; } - $properties['teamsUrl'] = $value; + $properties['hasDiscussions'] = $value; - after_teamsUrl: + after_hasDiscussions: - $value = $payload['trees_url'] ?? null; + $value = $payload['archived'] ?? null; if ($value === null) { - $missingFields[] = 'trees_url'; - goto after_treesUrl; + $missingFields[] = 'archived'; + goto after_archived; } - $properties['treesUrl'] = $value; + $properties['archived'] = $value; - after_treesUrl: + after_archived: - $value = $payload['clone_url'] ?? null; + $value = $payload['disabled'] ?? null; if ($value === null) { - $missingFields[] = 'clone_url'; - goto after_cloneUrl; + $missingFields[] = 'disabled'; + goto after_disabled; } - $properties['cloneUrl'] = $value; + $properties['disabled'] = $value; - after_cloneUrl: + after_disabled: - $value = $payload['mirror_url'] ?? null; + $value = $payload['visibility'] ?? null; if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; + $properties['visibility'] = null; + goto after_visibility; } - $properties['mirrorUrl'] = $value; + $properties['visibility'] = $value; - after_mirrorUrl: + after_visibility: - $value = $payload['hooks_url'] ?? null; + $value = $payload['pushed_at'] ?? null; if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; + $properties['pushedAt'] = null; + goto after_pushedAt; } - $properties['hooksUrl'] = $value; + $properties['pushedAt'] = $value; - after_hooksUrl: + after_pushedAt: - $value = $payload['svn_url'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'svn_url'; - goto after_svnUrl; + $properties['createdAt'] = null; + goto after_createdAt; } - $properties['svnUrl'] = $value; + $properties['createdAt'] = $value; - after_svnUrl: + after_createdAt: - $value = $payload['homepage'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $properties['homepage'] = null; - goto after_homepage; + $properties['updatedAt'] = null; + goto after_updatedAt; } - $properties['homepage'] = $value; + $properties['updatedAt'] = $value; - after_homepage: + after_updatedAt: - $value = $payload['language'] ?? null; + $value = $payload['allow_rebase_merge'] ?? null; if ($value === null) { - $properties['language'] = null; - goto after_language; + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; } - $properties['language'] = $value; + $properties['allowRebaseMerge'] = $value; - after_language: + after_allowRebaseMerge: - $value = $payload['forks_count'] ?? null; + $value = $payload['template_repository'] ?? null; if ($value === null) { - $missingFields[] = 'forks_count'; - goto after_forksCount; + $properties['templateRepository'] = null; + goto after_templateRepository; } - $properties['forksCount'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'templateRepository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_forksCount: + $properties['templateRepository'] = $value; - $value = $payload['stargazers_count'] ?? null; + after_templateRepository: + + $value = $payload['temp_clone_token'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_count'; - goto after_stargazersCount; + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; } - $properties['stargazersCount'] = $value; + $properties['tempCloneToken'] = $value; - after_stargazersCount: + after_tempCloneToken: - $value = $payload['watchers_count'] ?? null; + $value = $payload['allow_squash_merge'] ?? null; if ($value === null) { - $missingFields[] = 'watchers_count'; - goto after_watchersCount; + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; } - $properties['watchersCount'] = $value; + $properties['allowSquashMerge'] = $value; - after_watchersCount: + after_allowSquashMerge: - $value = $payload['size'] ?? null; + $value = $payload['allow_auto_merge'] ?? null; if ($value === null) { - $missingFields[] = 'size'; - goto after_size; + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; } - $properties['size'] = $value; + $properties['allowAutoMerge'] = $value; - after_size: + after_allowAutoMerge: - $value = $payload['default_branch'] ?? null; + $value = $payload['delete_branch_on_merge'] ?? null; if ($value === null) { - $missingFields[] = 'default_branch'; - goto after_defaultBranch; + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; } - $properties['defaultBranch'] = $value; + $properties['deleteBranchOnMerge'] = $value; - after_defaultBranch: + after_deleteBranchOnMerge: - $value = $payload['open_issues_count'] ?? null; + $value = $payload['allow_update_branch'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues_count'; - goto after_openIssuesCount; + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; } - $properties['openIssuesCount'] = $value; + $properties['allowUpdateBranch'] = $value; - after_openIssuesCount: + after_allowUpdateBranch: - $value = $payload['is_template'] ?? null; + $value = $payload['use_squash_pr_title_as_default'] ?? null; if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; } - $properties['isTemplate'] = $value; + $properties['useSquashPrTitleAsDefault'] = $value; - after_isTemplate: + after_useSquashPrTitleAsDefault: - $value = $payload['topics'] ?? null; + $value = $payload['squash_merge_commit_title'] ?? null; if ($value === null) { - $properties['topics'] = null; - goto after_topics; + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; } - $properties['topics'] = $value; + $properties['squashMergeCommitTitle'] = $value; - after_topics: + after_squashMergeCommitTitle: - $value = $payload['custom_properties'] ?? null; + $value = $payload['squash_merge_commit_message'] ?? null; if ($value === null) { - $properties['customProperties'] = null; - goto after_customProperties; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'customProperties'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; } - $properties['customProperties'] = $value; + $properties['squashMergeCommitMessage'] = $value; - after_customProperties: + after_squashMergeCommitMessage: - $value = $payload['has_issues'] ?? null; + $value = $payload['merge_commit_title'] ?? null; if ($value === null) { - $missingFields[] = 'has_issues'; - goto after_hasIssues; + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; } - $properties['hasIssues'] = $value; + $properties['mergeCommitTitle'] = $value; - after_hasIssues: + after_mergeCommitTitle: - $value = $payload['has_projects'] ?? null; + $value = $payload['merge_commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'has_projects'; - goto after_hasProjects; + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; } - $properties['hasProjects'] = $value; + $properties['mergeCommitMessage'] = $value; - after_hasProjects: + after_mergeCommitMessage: - $value = $payload['has_wiki'] ?? null; + $value = $payload['allow_merge_commit'] ?? null; if ($value === null) { - $missingFields[] = 'has_wiki'; - goto after_hasWiki; + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; } - $properties['hasWiki'] = $value; + $properties['allowMergeCommit'] = $value; - after_hasWiki: + after_allowMergeCommit: - $value = $payload['has_pages'] ?? null; + $value = $payload['allow_forking'] ?? null; if ($value === null) { - $missingFields[] = 'has_pages'; - goto after_hasPages; + $properties['allowForking'] = null; + goto after_allowForking; } - $properties['hasPages'] = $value; + $properties['allowForking'] = $value; - after_hasPages: + after_allowForking: - $value = $payload['has_downloads'] ?? null; + $value = $payload['web_commit_signoff_required'] ?? null; if ($value === null) { - $missingFields[] = 'has_downloads'; - goto after_hasDownloads; + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; } - $properties['hasDownloads'] = $value; + $properties['webCommitSignoffRequired'] = $value; - after_hasDownloads: + after_webCommitSignoffRequired: - $value = $payload['has_discussions'] ?? null; + $value = $payload['subscribers_count'] ?? null; if ($value === null) { - $properties['hasDiscussions'] = null; - goto after_hasDiscussions; + $properties['subscribersCount'] = null; + goto after_subscribersCount; } - $properties['hasDiscussions'] = $value; + $properties['subscribersCount'] = $value; - after_hasDiscussions: + after_subscribersCount: - $value = $payload['archived'] ?? null; + $value = $payload['network_count'] ?? null; if ($value === null) { - $missingFields[] = 'archived'; - goto after_archived; + $properties['networkCount'] = null; + goto after_networkCount; } - $properties['archived'] = $value; + $properties['networkCount'] = $value; - after_archived: + after_networkCount: - $value = $payload['disabled'] ?? null; + $value = $payload['open_issues'] ?? null; if ($value === null) { - $missingFields[] = 'disabled'; - goto after_disabled; + $missingFields[] = 'open_issues'; + goto after_openIssues; } - $properties['disabled'] = $value; + $properties['openIssues'] = $value; - after_disabled: + after_openIssues: - $value = $payload['visibility'] ?? null; + $value = $payload['watchers'] ?? null; if ($value === null) { - $properties['visibility'] = null; - goto after_visibility; + $missingFields[] = 'watchers'; + goto after_watchers; } - $properties['visibility'] = $value; + $properties['watchers'] = $value; - after_visibility: + after_watchers: - $value = $payload['pushed_at'] ?? null; + $value = $payload['master_branch'] ?? null; if ($value === null) { - $properties['pushedAt'] = null; - goto after_pushedAt; + $properties['masterBranch'] = null; + goto after_masterBranch; } - $properties['pushedAt'] = $value; + $properties['masterBranch'] = $value; - after_pushedAt: + after_masterBranch: - $value = $payload['created_at'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $properties['createdAt'] = null; - goto after_createdAt; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['createdAt'] = $value; + $properties['starredAt'] = $value; - after_createdAt: + after_starredAt: - $value = $payload['updated_at'] ?? null; + $value = $payload['anonymous_access_enabled'] ?? null; if ($value === null) { - $properties['updatedAt'] = null; - goto after_updatedAt; + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; } - $properties['updatedAt'] = $value; + $properties['anonymousAccessEnabled'] = $value; - after_updatedAt: + after_anonymousAccessEnabled: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); + } - $value = $payload['allow_rebase_merge'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(RepositoryWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new RepositoryWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple + { + $properties = []; + $missingFields = []; + try { + $value = $payload['key'] ?? null; if ($value === null) { - $properties['allowRebaseMerge'] = null; - goto after_allowRebaseMerge; + $missingFields[] = 'key'; + goto after_key; } - $properties['allowRebaseMerge'] = $value; + $properties['key'] = $value; - after_allowRebaseMerge: + after_key: - $value = $payload['template_repository'] ?? null; + $value = $payload['name'] ?? null; if ($value === null) { - $properties['templateRepository'] = null; - goto after_templateRepository; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'templateRepository'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'name'; + goto after_name; } - $properties['templateRepository'] = $value; + $properties['name'] = $value; - after_templateRepository: + after_name: - $value = $payload['temp_clone_token'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $properties['tempCloneToken'] = null; - goto after_tempCloneToken; + $properties['url'] = null; + goto after_url; } - $properties['tempCloneToken'] = $value; + $properties['url'] = $value; - after_tempCloneToken: + after_url: - $value = $payload['allow_squash_merge'] ?? null; + $value = $payload['spdx_id'] ?? null; if ($value === null) { - $properties['allowSquashMerge'] = null; - goto after_allowSquashMerge; + $properties['spdxId'] = null; + goto after_spdxId; } - $properties['allowSquashMerge'] = $value; + $properties['spdxId'] = $value; - after_allowSquashMerge: + after_spdxId: - $value = $payload['allow_auto_merge'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $properties['allowAutoMerge'] = null; - goto after_allowAutoMerge; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['allowAutoMerge'] = $value; + $properties['nodeId'] = $value; - after_allowAutoMerge: + after_nodeId: - $value = $payload['delete_branch_on_merge'] ?? null; + $value = $payload['html_url'] ?? null; if ($value === null) { - $properties['deleteBranchOnMerge'] = null; - goto after_deleteBranchOnMerge; + $properties['htmlUrl'] = null; + goto after_htmlUrl; } - $properties['deleteBranchOnMerge'] = $value; + $properties['htmlUrl'] = $value; - after_deleteBranchOnMerge: + after_htmlUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } - $value = $payload['allow_update_branch'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new LicenseSimple(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + { + $properties = []; + $missingFields = []; + try { + $value = $payload['name'] ?? null; if ($value === null) { - $properties['allowUpdateBranch'] = null; - goto after_allowUpdateBranch; + $properties['name'] = null; + goto after_name; } - $properties['allowUpdateBranch'] = $value; + $properties['name'] = $value; - after_allowUpdateBranch: + after_name: - $value = $payload['use_squash_pr_title_as_default'] ?? null; + $value = $payload['email'] ?? null; if ($value === null) { - $properties['useSquashPrTitleAsDefault'] = null; - goto after_useSquashPrTitleAsDefault; + $properties['email'] = null; + goto after_email; } - $properties['useSquashPrTitleAsDefault'] = $value; + $properties['email'] = $value; - after_useSquashPrTitleAsDefault: + after_email: - $value = $payload['squash_merge_commit_title'] ?? null; + $value = $payload['login'] ?? null; if ($value === null) { - $properties['squashMergeCommitTitle'] = null; - goto after_squashMergeCommitTitle; + $missingFields[] = 'login'; + goto after_login; } - $properties['squashMergeCommitTitle'] = $value; + $properties['login'] = $value; - after_squashMergeCommitTitle: + after_login: - $value = $payload['squash_merge_commit_message'] ?? null; + $value = $payload['id'] ?? null; if ($value === null) { - $properties['squashMergeCommitMessage'] = null; - goto after_squashMergeCommitMessage; + $missingFields[] = 'id'; + goto after_id; } - $properties['squashMergeCommitMessage'] = $value; + $properties['id'] = $value; - after_squashMergeCommitMessage: + after_id: - $value = $payload['merge_commit_title'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $properties['mergeCommitTitle'] = null; - goto after_mergeCommitTitle; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['mergeCommitTitle'] = $value; + $properties['nodeId'] = $value; - after_mergeCommitTitle: + after_nodeId: - $value = $payload['merge_commit_message'] ?? null; + $value = $payload['avatar_url'] ?? null; if ($value === null) { - $properties['mergeCommitMessage'] = null; - goto after_mergeCommitMessage; + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; } - $properties['mergeCommitMessage'] = $value; + $properties['avatarUrl'] = $value; - after_mergeCommitMessage: + after_avatarUrl: - $value = $payload['allow_merge_commit'] ?? null; + $value = $payload['gravatar_id'] ?? null; if ($value === null) { - $properties['allowMergeCommit'] = null; - goto after_allowMergeCommit; + $properties['gravatarId'] = null; + goto after_gravatarId; } - $properties['allowMergeCommit'] = $value; + $properties['gravatarId'] = $value; - after_allowMergeCommit: + after_gravatarId: - $value = $payload['allow_forking'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $properties['allowForking'] = null; - goto after_allowForking; + $missingFields[] = 'url'; + goto after_url; } - $properties['allowForking'] = $value; + $properties['url'] = $value; - after_allowForking: + after_url: - $value = $payload['web_commit_signoff_required'] ?? null; + $value = $payload['html_url'] ?? null; if ($value === null) { - $properties['webCommitSignoffRequired'] = null; - goto after_webCommitSignoffRequired; + $missingFields[] = 'html_url'; + goto after_htmlUrl; } - $properties['webCommitSignoffRequired'] = $value; + $properties['htmlUrl'] = $value; - after_webCommitSignoffRequired: + after_htmlUrl: - $value = $payload['subscribers_count'] ?? null; + $value = $payload['followers_url'] ?? null; if ($value === null) { - $properties['subscribersCount'] = null; - goto after_subscribersCount; + $missingFields[] = 'followers_url'; + goto after_followersUrl; } - $properties['subscribersCount'] = $value; + $properties['followersUrl'] = $value; - after_subscribersCount: + after_followersUrl: - $value = $payload['network_count'] ?? null; + $value = $payload['following_url'] ?? null; if ($value === null) { - $properties['networkCount'] = null; - goto after_networkCount; + $missingFields[] = 'following_url'; + goto after_followingUrl; } - $properties['networkCount'] = $value; + $properties['followingUrl'] = $value; - after_networkCount: + after_followingUrl: - $value = $payload['open_issues'] ?? null; + $value = $payload['gists_url'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues'; - goto after_openIssues; + $missingFields[] = 'gists_url'; + goto after_gistsUrl; } - $properties['openIssues'] = $value; + $properties['gistsUrl'] = $value; - after_openIssues: + after_gistsUrl: - $value = $payload['watchers'] ?? null; + $value = $payload['starred_url'] ?? null; if ($value === null) { - $missingFields[] = 'watchers'; - goto after_watchers; + $missingFields[] = 'starred_url'; + goto after_starredUrl; } - $properties['watchers'] = $value; + $properties['starredUrl'] = $value; - after_watchers: + after_starredUrl: - $value = $payload['master_branch'] ?? null; + $value = $payload['subscriptions_url'] ?? null; if ($value === null) { - $properties['masterBranch'] = null; - goto after_masterBranch; + $missingFields[] = 'subscriptions_url'; + goto after_subscriptionsUrl; } - $properties['masterBranch'] = $value; + $properties['subscriptionsUrl'] = $value; - after_masterBranch: + after_subscriptionsUrl: - $value = $payload['starred_at'] ?? null; + $value = $payload['organizations_url'] ?? null; if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; + $missingFields[] = 'organizations_url'; + goto after_organizationsUrl; } - $properties['starredAt'] = $value; + $properties['organizationsUrl'] = $value; - after_starredAt: + after_organizationsUrl: - $value = $payload['anonymous_access_enabled'] ?? null; + $value = $payload['repos_url'] ?? null; if ($value === null) { - $properties['anonymousAccessEnabled'] = null; - goto after_anonymousAccessEnabled; + $missingFields[] = 'repos_url'; + goto after_reposUrl; } - $properties['anonymousAccessEnabled'] = $value; - - after_anonymousAccessEnabled: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(RepositoryWebhooks::class, $missingFields, stack: $this->hydrationStack); - } + $properties['reposUrl'] = $value; - try { - return new RepositoryWebhooks(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); - } - } + after_reposUrl: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple - { - $properties = []; - $missingFields = []; - try { - $value = $payload['key'] ?? null; + $value = $payload['events_url'] ?? null; if ($value === null) { - $missingFields[] = 'key'; - goto after_key; + $missingFields[] = 'events_url'; + goto after_eventsUrl; } - $properties['key'] = $value; + $properties['eventsUrl'] = $value; - after_key: + after_eventsUrl: - $value = $payload['name'] ?? null; + $value = $payload['received_events_url'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; + $missingFields[] = 'received_events_url'; + goto after_receivedEventsUrl; } - $properties['name'] = $value; + $properties['receivedEventsUrl'] = $value; - after_name: + after_receivedEventsUrl: - $value = $payload['url'] ?? null; + $value = $payload['type'] ?? null; if ($value === null) { - $properties['url'] = null; - goto after_url; + $missingFields[] = 'type'; + goto after_type; } - $properties['url'] = $value; + $properties['type'] = $value; - after_url: + after_type: - $value = $payload['spdx_id'] ?? null; + $value = $payload['site_admin'] ?? null; if ($value === null) { - $properties['spdxId'] = null; - goto after_spdxId; + $missingFields[] = 'site_admin'; + goto after_siteAdmin; } - $properties['spdxId'] = $value; + $properties['siteAdmin'] = $value; - after_spdxId: + after_siteAdmin: - $value = $payload['node_id'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['nodeId'] = $value; + $properties['starredAt'] = $value; - after_nodeId: + after_starredAt: - $value = $payload['html_url'] ?? null; + $value = $payload['user_view_type'] ?? null; if ($value === null) { - $properties['htmlUrl'] = null; - goto after_htmlUrl; + $properties['userViewType'] = null; + goto after_userViewType; } - $properties['htmlUrl'] = $value; + $properties['userViewType'] = $value; - after_htmlUrl: + after_userViewType: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); } try { - return new LicenseSimple(...$properties); + return new SimpleUser(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); } } @@ -15663,7 +15667,6 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated($object), 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment($object), 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\Reactions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️Reactions($object), 'ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Comment\User' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Comment⚡️User($object), @@ -15683,6 +15686,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($object), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($object), 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($object), 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($object), @@ -15917,12 +15921,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -15997,105 +15999,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed { assert($object instanceof Permissions); @@ -17150,7 +17053,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookIssueCommentCreated⚡️Issue⚡️PerformedViaGithubApp⚡️Owner(mixed $object): mixed { - assert($object instanceof Owner); + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookIssueCommentCreated\Issue\PerformedViaGithubApp\Owner); $result = []; $avatarUrl = $object->avatarUrl; @@ -18473,6 +18376,105 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $userViewType = $object->userViewType; + + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions(mixed $object): mixed { assert($object instanceof \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions); diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php b/clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php index 59aa268d8ec..21aac4778d5 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php @@ -4,6 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\WebHook; +use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner; use ApiClients\Client\GitHub\Schema\Integration; use ApiClients\Client\GitHub\Schema\Issue; use ApiClients\Client\GitHub\Schema\Issue\PullRequest; @@ -16,7 +17,6 @@ use ApiClients\Client\GitHub\Schema\RepositoryWebhooks; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository; -use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner; use ApiClients\Client\GitHub\Schema\SimpleInstallation; use ApiClients\Client\GitHub\Schema\SimpleUser; use ApiClients\Client\GitHub\Schema\SubIssuesSummary; @@ -2604,17 +2604,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -5464,7 +5468,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repo } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): Owner + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner { $properties = []; $missingFields = []; @@ -5671,11 +5675,11 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repo } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner::class, $missingFields, stack: $this->hydrationStack); } try { - return new Owner(...$properties); + return new \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner(...$properties); } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); } @@ -7536,12 +7540,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; @@ -9026,7 +9028,7 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(mixed $object): mixed { - assert($object instanceof Owner); + assert($object instanceof \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner); $result = []; $login = $object->login; diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/WorkflowJob.php b/clients/GitHub/src/Internal/Hydrator/WebHook/WorkflowJob.php index a02e3e14171..489a11c8a0a 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/WorkflowJob.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/WorkflowJob.php @@ -4024,17 +4024,21 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Inte $value = $payload['owner'] ?? null; if ($value === null) { - $properties['owner'] = null; + $missingFields[] = 'owner'; goto after_owner; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } + static $ownerCaster1; + + if ($ownerCaster1 === null) { + $ownerCaster1 = new \ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\Integration\Owner(...[]); + } + + $value = $ownerCaster1->cast($value, $this); + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; } $properties['owner'] = $value; @@ -7749,12 +7753,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_clientId: $result['client_id'] = $clientId; $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + $owner = match ($owner::class) { + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner), + 'ApiClients\Client\GitHub\Schema\Enterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Enterprise($owner), + }; after_owner: $result['owner'] = $owner; $name = $object->name; diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index dfdaf94d2ab..e0b299befe0 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -84,6 +84,13 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Orgs\Org|null $operation🌀Orgs🌀Org = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\Cache\Usage|null $operation🌀Orgs🌀Org🌀Actions🌀Cache🌀Usage = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\Cache\UsageByRepository|null $operation🌀Orgs🌀Org🌀Actions🌀Cache🌀UsageByRepository = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners|null $operation🌀Orgs🌀Org🌀Actions🌀HostedRunners = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\GithubOwned|null $operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\Partner|null $operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Limits|null $operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\MachineSizes|null $operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Platforms|null $operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\HostedRunnerId|null $operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\Oidc\Customization\Sub|null $operation🌀Orgs🌀Org🌀Actions🌀Oidc🌀Customization🌀Sub = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\Permissions|null $operation🌀Orgs🌀Org🌀Actions🌀Permissions = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\Permissions\Repositories|null $operation🌀Orgs🌀Org🌀Actions🌀Permissions🌀Repositories = null; @@ -92,6 +99,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Orgs\Org\Actions\Permissions\Workflow|null $operation🌀Orgs🌀Org🌀Actions🌀Permissions🌀Workflow = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups|null $operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId|null $operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId = null; + private Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\HostedRunners|null $operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\Repositories|null $operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Repositories = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\Repositories\RepositoryId|null $operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Repositories🌀RepositoryId = null; private Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\Runners|null $operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Runners = null; @@ -754,12 +762,12 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\Root' => $this->getObjectMapperOperation🌀Root()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\BasicError', '\\ApiClients\\Client\\GitHub\\Schema\\ValidationErrorSimple' => $this->getObjectMapperOperation🌀Advisories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory\\Cvss', '\\ApiClients\\Client\\GitHub\\Schema\\CvssSeverities', '\\ApiClients\\Client\\GitHub\\Schema\\CvssSeverities\\CvssVThree', '\\ApiClients\\Client\\GitHub\\Schema\\CvssSeverities\\CvssVFour', '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory\\Epss' => $this->getObjectMapperOperation🌀Advisories🌀GhsaId()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\Integration', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleUser', '\\ApiClients\\Client\\GitHub\\Schema\\Integration\\Permissions' => $this->getObjectMapperOperation🌀App()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Integration', '\\ApiClients\\Client\\GitHub\\Schema\\Integration\\Permissions' => $this->getObjectMapperOperation🌀App()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookConfig' => $this->getObjectMapperOperation🌀App🌀Hook🌀Config()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ScimError', '\\ApiClients\\Client\\GitHub\\Schema\\ValidationError' => $this->getObjectMapperOperation🌀App🌀Hook🌀Deliveries()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Request', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Request\\Headers', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Request\\Payload', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Response', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Response\\Headers' => $this->getObjectMapperOperation🌀App🌀Hook🌀Deliveries🌀DeliveryId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Apps\\RedeliverWebhookDelivery\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀App🌀Hook🌀Deliveries🌀DeliveryId🌀Attempts()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\Installation', '\\ApiClients\\Client\\GitHub\\Schema\\AppPermissions' => $this->getObjectMapperOperation🌀App🌀Installations🌀InstallationId()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Installation', '\\ApiClients\\Client\\GitHub\\Schema\\AppPermissions', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleUser' => $this->getObjectMapperOperation🌀App🌀Installations🌀InstallationId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\InstallationToken' => $this->getObjectMapperOperation🌀App🌀Installations🌀InstallationId🌀AccessTokens()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Authorization', '\\ApiClients\\Client\\GitHub\\Schema\\Authorization\\App', '\\ApiClients\\Client\\GitHub\\Schema\\ScopedInstallation' => $this->getObjectMapperOperation🌀Applications🌀ClientId🌀Token()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ClassroomAssignment', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleClassroomRepository', '\\ApiClients\\Client\\GitHub\\Schema\\Classroom', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleClassroomOrganization' => $this->getObjectMapperOperation🌀Assignments🌀AssignmentId()->hydrateObject($className, $payload), @@ -787,12 +795,19 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationFull', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationFull\\Plan', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\Delete\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsCacheUsageOrgEnterprise' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Cache🌀Usage()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetActionsCacheUsageByRepoForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Cache🌀UsageByRepository()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListHostedRunnersForOrg\\Response\\ApplicationJson\\Ok', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunner', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerPoolImage', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerMachineSpec' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersGithubOwnedImagesForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersPartnerImagesForOrg\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerLimits', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerLimits\\PublicIps' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersMachineSpecsForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersPlatformsForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\OidcCustomSub', '\\ApiClients\\Client\\GitHub\\Schema\\EmptyObject' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Oidc🌀Customization🌀Sub()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsOrganizationPermissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelectedRepositoriesEnabledGithubActionsOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions🌀Repositories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\SelectedActions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions🌀SelectedActions()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsGetDefaultWorkflowPermissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions🌀Workflow()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelfHostedRunnerGroupsForOrg\\Response\\ApplicationJson\\Ok', '\\ApiClients\\Client\\GitHub\\Schema\\RunnerGroupsOrg' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListGithubHostedRunnersInGroupForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListRepoAccessToSelfHostedRunnerGroupInOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Repositories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelfHostedRunnersInGroupForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Runners()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelfHostedRunnersForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Runners()->hydrateObject($className, $payload), @@ -1122,12 +1137,12 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\Root' => $this->getObjectMapperOperation🌀Root()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\BasicError', '\\ApiClients\\Client\\GitHub\\Schema\\ValidationErrorSimple' => $this->getObjectMapperOperation🌀Advisories()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory\\Cvss', '\\ApiClients\\Client\\GitHub\\Schema\\CvssSeverities', '\\ApiClients\\Client\\GitHub\\Schema\\CvssSeverities\\CvssVThree', '\\ApiClients\\Client\\GitHub\\Schema\\CvssSeverities\\CvssVFour', '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory\\Epss' => $this->getObjectMapperOperation🌀Advisories🌀GhsaId()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\Integration', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleUser', '\\ApiClients\\Client\\GitHub\\Schema\\Integration\\Permissions' => $this->getObjectMapperOperation🌀App()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Integration', '\\ApiClients\\Client\\GitHub\\Schema\\Integration\\Permissions' => $this->getObjectMapperOperation🌀App()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookConfig' => $this->getObjectMapperOperation🌀App🌀Hook🌀Config()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ScimError', '\\ApiClients\\Client\\GitHub\\Schema\\ValidationError' => $this->getObjectMapperOperation🌀App🌀Hook🌀Deliveries()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Request', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Request\\Headers', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Request\\Payload', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Response', '\\ApiClients\\Client\\GitHub\\Schema\\HookDelivery\\Response\\Headers' => $this->getObjectMapperOperation🌀App🌀Hook🌀Deliveries🌀DeliveryId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Apps\\RedeliverWebhookDelivery\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀App🌀Hook🌀Deliveries🌀DeliveryId🌀Attempts()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\Installation', '\\ApiClients\\Client\\GitHub\\Schema\\AppPermissions' => $this->getObjectMapperOperation🌀App🌀Installations🌀InstallationId()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Installation', '\\ApiClients\\Client\\GitHub\\Schema\\AppPermissions', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleUser' => $this->getObjectMapperOperation🌀App🌀Installations🌀InstallationId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\InstallationToken' => $this->getObjectMapperOperation🌀App🌀Installations🌀InstallationId🌀AccessTokens()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Authorization', '\\ApiClients\\Client\\GitHub\\Schema\\Authorization\\App', '\\ApiClients\\Client\\GitHub\\Schema\\ScopedInstallation' => $this->getObjectMapperOperation🌀Applications🌀ClientId🌀Token()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ClassroomAssignment', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleClassroomRepository', '\\ApiClients\\Client\\GitHub\\Schema\\Classroom', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleClassroomOrganization' => $this->getObjectMapperOperation🌀Assignments🌀AssignmentId()->serializeObject($object), @@ -1155,12 +1170,19 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationFull', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationFull\\Plan', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\Delete\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsCacheUsageOrgEnterprise' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Cache🌀Usage()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetActionsCacheUsageByRepoForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Cache🌀UsageByRepository()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListHostedRunnersForOrg\\Response\\ApplicationJson\\Ok', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunner', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerPoolImage', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerMachineSpec' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersGithubOwnedImagesForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersPartnerImagesForOrg\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerLimits', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsHostedRunnerLimits\\PublicIps' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersMachineSpecsForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\GetHostedRunnersPlatformsForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\OidcCustomSub', '\\ApiClients\\Client\\GitHub\\Schema\\EmptyObject' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Oidc🌀Customization🌀Sub()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsOrganizationPermissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelectedRepositoriesEnabledGithubActionsOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions🌀Repositories()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\SelectedActions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions🌀SelectedActions()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsGetDefaultWorkflowPermissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Permissions🌀Workflow()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelfHostedRunnerGroupsForOrg\\Response\\ApplicationJson\\Ok', '\\ApiClients\\Client\\GitHub\\Schema\\RunnerGroupsOrg' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListGithubHostedRunnersInGroupForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListRepoAccessToSelfHostedRunnerGroupInOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Repositories()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelfHostedRunnersInGroupForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Runners()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelfHostedRunnersForOrg\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Runners()->serializeObject($object), @@ -2136,6 +2158,69 @@ public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Cache🌀U return $this->operation🌀Orgs🌀Org🌀Actions🌀Cache🌀UsageByRepository; } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners(): Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners = new Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned(): Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\GithubOwned + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\GithubOwned === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned = new Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\GithubOwned(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner(): Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\Partner + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\Partner === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner = new Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Images\Partner(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits(): Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Limits + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Limits === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits = new Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Limits(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes(): Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\MachineSizes + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\MachineSizes === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes = new Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\MachineSizes(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms(): Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Platforms + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Platforms === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms = new Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\Platforms(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId(): Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\HostedRunnerId + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\HostedRunnerId === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId = new Internal\Hydrator\Operation\Orgs\Org\Actions\HostedRunners\HostedRunnerId(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId; + } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Oidc🌀Customization🌀Sub(): Internal\Hydrator\Operation\Orgs\Org\Actions\Oidc\Customization\Sub { if ($this->operation🌀Orgs🌀Org🌀Actions🌀Oidc🌀Customization🌀Sub instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\Oidc\Customization\Sub === false) { @@ -2208,6 +2293,15 @@ public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGrou return $this->operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId; } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners(): Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\HostedRunners + { + if ($this->operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\HostedRunners === false) { + $this->operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners = new Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\HostedRunners(); + } + + return $this->operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners; + } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Repositories(): Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\Repositories { if ($this->operation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀Repositories instanceof Internal\Hydrator\Operation\Orgs\Org\Actions\RunnerGroups\RunnerGroupId\Repositories === false) { diff --git a/clients/GitHub/src/Internal/Operation/Actions/CreateHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/CreateHostedRunnerForOrg.php new file mode 100644 index 00000000000..9c0501ab15f --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/CreateHostedRunnerForOrg.php @@ -0,0 +1,62 @@ +org = $org; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\Actions\CreateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', str_replace(['{org}'], [$this->org], '/orgs/{org}/actions/hosted-runners'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\ActionsHostedRunner + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 201: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ActionsHostedRunner::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\ActionsHostedRunner::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/DeleteHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/DeleteHostedRunnerForOrg.php new file mode 100644 index 00000000000..10cf0171ca8 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/DeleteHostedRunnerForOrg.php @@ -0,0 +1,62 @@ +org = $org; + $this->hostedRunnerId = $hostedRunnerId; + } + + public function createRequest(): RequestInterface + { + return new Request('DELETE', str_replace(['{org}', '{hosted_runner_id}'], [$this->org, $this->hostedRunnerId], '/orgs/{org}/actions/hosted-runners/{hosted_runner_id}')); + } + + public function createResponse(ResponseInterface $response): Schema\ActionsHostedRunner + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 202: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ActionsHostedRunner::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\ActionsHostedRunner::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnerForOrg.php new file mode 100644 index 00000000000..1967813d0e7 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnerForOrg.php @@ -0,0 +1,62 @@ +org = $org; + $this->hostedRunnerId = $hostedRunnerId; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{hosted_runner_id}'], [$this->org, $this->hostedRunnerId], '/orgs/{org}/actions/hosted-runners/{hosted_runner_id}')); + } + + public function createResponse(ResponseInterface $response): Schema\ActionsHostedRunner + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ActionsHostedRunner::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\ActionsHostedRunner::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersGithubOwnedImagesForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersGithubOwnedImagesForOrg.php new file mode 100644 index 00000000000..ffe17d568f0 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersGithubOwnedImagesForOrg.php @@ -0,0 +1,59 @@ +org = $org; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/actions/hosted-runners/images/github-owned')); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersLimitsForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersLimitsForOrg.php new file mode 100644 index 00000000000..138230a83f3 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersLimitsForOrg.php @@ -0,0 +1,59 @@ +org = $org; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/actions/hosted-runners/limits')); + } + + public function createResponse(ResponseInterface $response): Schema\ActionsHostedRunnerLimits + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ActionsHostedRunnerLimits::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\ActionsHostedRunnerLimits::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersMachineSpecsForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersMachineSpecsForOrg.php new file mode 100644 index 00000000000..0314f35f587 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersMachineSpecsForOrg.php @@ -0,0 +1,59 @@ +org = $org; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/actions/hosted-runners/machine-sizes')); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersPartnerImagesForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersPartnerImagesForOrg.php new file mode 100644 index 00000000000..04d8020a94e --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersPartnerImagesForOrg.php @@ -0,0 +1,59 @@ +org = $org; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/actions/hosted-runners/images/partner')); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersPlatformsForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersPlatformsForOrg.php new file mode 100644 index 00000000000..2aa9a2e958f --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/GetHostedRunnersPlatformsForOrg.php @@ -0,0 +1,59 @@ +org = $org; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/actions/hosted-runners/platforms')); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/ListGithubHostedRunnersInGroupForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/ListGithubHostedRunnersInGroupForOrg.php new file mode 100644 index 00000000000..caa099813c7 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/ListGithubHostedRunnersInGroupForOrg.php @@ -0,0 +1,68 @@ +org = $org; + $this->runnerGroupId = $runnerGroupId; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{runner_group_id}', '{per_page}', '{page}'], [$this->org, $this->runnerGroupId, $this->perPage, $this->page], '/orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners' . '?per_page={per_page}&page={page}')); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/ListHostedRunnersForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/ListHostedRunnersForOrg.php new file mode 100644 index 00000000000..660d37ebe76 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/ListHostedRunnersForOrg.php @@ -0,0 +1,65 @@ +org = $org; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{per_page}', '{page}'], [$this->org, $this->perPage, $this->page], '/orgs/{org}/actions/hosted-runners' . '?per_page={per_page}&page={page}')); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Actions/UpdateHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/UpdateHostedRunnerForOrg.php new file mode 100644 index 00000000000..7e8b0124abc --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Actions/UpdateHostedRunnerForOrg.php @@ -0,0 +1,65 @@ +org = $org; + $this->hostedRunnerId = $hostedRunnerId; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\Actions\UpdateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('PATCH', str_replace(['{org}', '{hosted_runner_id}'], [$this->org, $this->hostedRunnerId], '/orgs/{org}/actions/hosted-runners/{hosted_runner_id}'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\ActionsHostedRunner + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ActionsHostedRunner::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\ActionsHostedRunner::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/CreateHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/CreateHostedRunnerForOrg.php new file mode 100644 index 00000000000..15a3dedefc8 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/CreateHostedRunnerForOrg.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); + $request = $operation->createRequest($params); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): ActionsHostedRunner { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/DeleteHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/DeleteHostedRunnerForOrg.php new file mode 100644 index 00000000000..6933405b702 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/DeleteHostedRunnerForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org, $hostedRunnerId); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): ActionsHostedRunner { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnerForOrg.php new file mode 100644 index 00000000000..9773c93cbcb --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnerForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org, $hostedRunnerId); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): ActionsHostedRunner { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersGithubOwnedImagesForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersGithubOwnedImagesForOrg.php new file mode 100644 index 00000000000..2c000bf9a79 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersGithubOwnedImagesForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Ok { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersLimitsForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersLimitsForOrg.php new file mode 100644 index 00000000000..bcbcc60fbd4 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersLimitsForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): ActionsHostedRunnerLimits { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersMachineSpecsForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersMachineSpecsForOrg.php new file mode 100644 index 00000000000..20aaf54ed53 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersMachineSpecsForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Ok { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersPartnerImagesForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersPartnerImagesForOrg.php new file mode 100644 index 00000000000..90c920dc53c --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersPartnerImagesForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Json { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersPlatformsForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersPlatformsForOrg.php new file mode 100644 index 00000000000..b84d61d1a71 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/GetHostedRunnersPlatformsForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Ok { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/ListGithubHostedRunnersInGroupForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/ListGithubHostedRunnersInGroupForOrg.php new file mode 100644 index 00000000000..b4867d3018b --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/ListGithubHostedRunnersInGroupForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org, $runnerGroupId, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Ok { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/ListHostedRunnersForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/ListHostedRunnersForOrg.php new file mode 100644 index 00000000000..6d80279e6c6 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/ListHostedRunnersForOrg.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Ok { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Actions/UpdateHostedRunnerForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/UpdateHostedRunnerForOrg.php new file mode 100644 index 00000000000..8bcafae0f42 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Actions/UpdateHostedRunnerForOrg.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $hostedRunnerId); + $request = $operation->createRequest($params); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): ActionsHostedRunner { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForEnterprise.php b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForEnterprise.php index 53df033d283..eafab91b02f 100644 --- a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForEnterprise.php +++ b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForEnterprise.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $enterprise, string $state, string $severity, string $ecosystem, string $package, string $scope, string $before, string $after, int $last, string $sort = 'created', string $direction = 'desc', int $first = 30, int $perPage = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Dependabot\ListAlertsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $state, $severity, $ecosystem, $package, $scope, $before, $after, $last, $sort, $direction, $first, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForOrg.php b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForOrg.php index d58f6ec5dc7..33491723516 100644 --- a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForOrg.php +++ b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForOrg.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $org, string $state, string $severity, string $ecosystem, string $package, string $scope, string $before, string $after, int $last, string $sort = 'created', string $direction = 'desc', int $first = 30, int $perPage = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Dependabot\ListAlertsForOrg($this->responseSchemaValidator, $this->hydrator, $org, $state, $severity, $ecosystem, $package, $scope, $before, $after, $last, $sort, $direction, $first, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepo.php b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepo.php index bf21e5432bf..d68da5c5061 100644 --- a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepo.php +++ b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepo.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $owner, string $repo, string $state, string $severity, string $ecosystem, string $package, string $manifest, string $scope, string $before, string $after, int $last, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30, int $first = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Dependabot\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $severity, $ecosystem, $package, $manifest, $scope, $before, $after, $last, $sort, $direction, $page, $perPage, $first); diff --git a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepoListing.php b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepoListing.php index 00ec0b1e741..12636d84c98 100644 --- a/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepoListing.php +++ b/clients/GitHub/src/Internal/Operator/Dependabot/ListAlertsForRepoListing.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $owner, string $repo, string $state, string $severity, string $ecosystem, string $package, string $manifest, string $scope, string $before, string $after, int $last, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30, int $first = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Dependabot\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $severity, $ecosystem, $package, $manifest, $scope, $before, $after, $last, $sort, $direction, $page, $perPage, $first); diff --git a/clients/GitHub/src/Internal/Operators.php b/clients/GitHub/src/Internal/Operators.php index 568293357fe..df9c56283c7 100644 --- a/clients/GitHub/src/Internal/Operators.php +++ b/clients/GitHub/src/Internal/Operators.php @@ -128,6 +128,16 @@ final class Operators private Internal\Operator\Orgs\Update|null $orgs👷Update = null; private Internal\Operator\Actions\GetActionsCacheUsageForOrg|null $actions👷GetActionsCacheUsageForOrg = null; private Internal\Operator\Actions\GetActionsCacheUsageByRepoForOrg|null $actions👷GetActionsCacheUsageByRepoForOrg = null; + private Internal\Operator\Actions\ListHostedRunnersForOrg|null $actions👷ListHostedRunnersForOrg = null; + private Internal\Operator\Actions\CreateHostedRunnerForOrg|null $actions👷CreateHostedRunnerForOrg = null; + private Internal\Operator\Actions\GetHostedRunnersGithubOwnedImagesForOrg|null $actions👷GetHostedRunnersGithubOwnedImagesForOrg = null; + private Internal\Operator\Actions\GetHostedRunnersPartnerImagesForOrg|null $actions👷GetHostedRunnersPartnerImagesForOrg = null; + private Internal\Operator\Actions\GetHostedRunnersLimitsForOrg|null $actions👷GetHostedRunnersLimitsForOrg = null; + private Internal\Operator\Actions\GetHostedRunnersMachineSpecsForOrg|null $actions👷GetHostedRunnersMachineSpecsForOrg = null; + private Internal\Operator\Actions\GetHostedRunnersPlatformsForOrg|null $actions👷GetHostedRunnersPlatformsForOrg = null; + private Internal\Operator\Actions\GetHostedRunnerForOrg|null $actions👷GetHostedRunnerForOrg = null; + private Internal\Operator\Actions\DeleteHostedRunnerForOrg|null $actions👷DeleteHostedRunnerForOrg = null; + private Internal\Operator\Actions\UpdateHostedRunnerForOrg|null $actions👷UpdateHostedRunnerForOrg = null; private Internal\Operator\Oidc\GetOidcCustomSubTemplateForOrg|null $oidc👷GetOidcCustomSubTemplateForOrg = null; private Internal\Operator\Oidc\UpdateOidcCustomSubTemplateForOrg|null $oidc👷UpdateOidcCustomSubTemplateForOrg = null; private Internal\Operator\Actions\GetGithubActionsPermissionsOrganization|null $actions👷GetGithubActionsPermissionsOrganization = null; @@ -145,6 +155,7 @@ final class Operators private Internal\Operator\Actions\GetSelfHostedRunnerGroupForOrg|null $actions👷GetSelfHostedRunnerGroupForOrg = null; private Internal\Operator\Actions\DeleteSelfHostedRunnerGroupFromOrg|null $actions👷DeleteSelfHostedRunnerGroupFromOrg = null; private Internal\Operator\Actions\UpdateSelfHostedRunnerGroupForOrg|null $actions👷UpdateSelfHostedRunnerGroupForOrg = null; + private Internal\Operator\Actions\ListGithubHostedRunnersInGroupForOrg|null $actions👷ListGithubHostedRunnersInGroupForOrg = null; private Internal\Operator\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg|null $actions👷ListRepoAccessToSelfHostedRunnerGroupInOrg = null; private Internal\Operator\Actions\SetRepoAccessToSelfHostedRunnerGroupInOrg|null $actions👷SetRepoAccessToSelfHostedRunnerGroupInOrg = null; private Internal\Operator\Actions\AddRepoAccessToSelfHostedRunnerGroupInOrg|null $actions👷AddRepoAccessToSelfHostedRunnerGroupInOrg = null; @@ -2247,6 +2258,96 @@ public function actions👷GetActionsCacheUsageByRepoForOrg(): Internal\Operator return $this->actions👷GetActionsCacheUsageByRepoForOrg; } + public function actions👷ListHostedRunnersForOrg(): Internal\Operator\Actions\ListHostedRunnersForOrg + { + if ($this->actions👷ListHostedRunnersForOrg instanceof Internal\Operator\Actions\ListHostedRunnersForOrg === false) { + $this->actions👷ListHostedRunnersForOrg = new Internal\Operator\Actions\ListHostedRunnersForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners()); + } + + return $this->actions👷ListHostedRunnersForOrg; + } + + public function actions👷CreateHostedRunnerForOrg(): Internal\Operator\Actions\CreateHostedRunnerForOrg + { + if ($this->actions👷CreateHostedRunnerForOrg instanceof Internal\Operator\Actions\CreateHostedRunnerForOrg === false) { + $this->actions👷CreateHostedRunnerForOrg = new Internal\Operator\Actions\CreateHostedRunnerForOrg($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners()); + } + + return $this->actions👷CreateHostedRunnerForOrg; + } + + public function actions👷GetHostedRunnersGithubOwnedImagesForOrg(): Internal\Operator\Actions\GetHostedRunnersGithubOwnedImagesForOrg + { + if ($this->actions👷GetHostedRunnersGithubOwnedImagesForOrg instanceof Internal\Operator\Actions\GetHostedRunnersGithubOwnedImagesForOrg === false) { + $this->actions👷GetHostedRunnersGithubOwnedImagesForOrg = new Internal\Operator\Actions\GetHostedRunnersGithubOwnedImagesForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned()); + } + + return $this->actions👷GetHostedRunnersGithubOwnedImagesForOrg; + } + + public function actions👷GetHostedRunnersPartnerImagesForOrg(): Internal\Operator\Actions\GetHostedRunnersPartnerImagesForOrg + { + if ($this->actions👷GetHostedRunnersPartnerImagesForOrg instanceof Internal\Operator\Actions\GetHostedRunnersPartnerImagesForOrg === false) { + $this->actions👷GetHostedRunnersPartnerImagesForOrg = new Internal\Operator\Actions\GetHostedRunnersPartnerImagesForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner()); + } + + return $this->actions👷GetHostedRunnersPartnerImagesForOrg; + } + + public function actions👷GetHostedRunnersLimitsForOrg(): Internal\Operator\Actions\GetHostedRunnersLimitsForOrg + { + if ($this->actions👷GetHostedRunnersLimitsForOrg instanceof Internal\Operator\Actions\GetHostedRunnersLimitsForOrg === false) { + $this->actions👷GetHostedRunnersLimitsForOrg = new Internal\Operator\Actions\GetHostedRunnersLimitsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits()); + } + + return $this->actions👷GetHostedRunnersLimitsForOrg; + } + + public function actions👷GetHostedRunnersMachineSpecsForOrg(): Internal\Operator\Actions\GetHostedRunnersMachineSpecsForOrg + { + if ($this->actions👷GetHostedRunnersMachineSpecsForOrg instanceof Internal\Operator\Actions\GetHostedRunnersMachineSpecsForOrg === false) { + $this->actions👷GetHostedRunnersMachineSpecsForOrg = new Internal\Operator\Actions\GetHostedRunnersMachineSpecsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes()); + } + + return $this->actions👷GetHostedRunnersMachineSpecsForOrg; + } + + public function actions👷GetHostedRunnersPlatformsForOrg(): Internal\Operator\Actions\GetHostedRunnersPlatformsForOrg + { + if ($this->actions👷GetHostedRunnersPlatformsForOrg instanceof Internal\Operator\Actions\GetHostedRunnersPlatformsForOrg === false) { + $this->actions👷GetHostedRunnersPlatformsForOrg = new Internal\Operator\Actions\GetHostedRunnersPlatformsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms()); + } + + return $this->actions👷GetHostedRunnersPlatformsForOrg; + } + + public function actions👷GetHostedRunnerForOrg(): Internal\Operator\Actions\GetHostedRunnerForOrg + { + if ($this->actions👷GetHostedRunnerForOrg instanceof Internal\Operator\Actions\GetHostedRunnerForOrg === false) { + $this->actions👷GetHostedRunnerForOrg = new Internal\Operator\Actions\GetHostedRunnerForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId()); + } + + return $this->actions👷GetHostedRunnerForOrg; + } + + public function actions👷DeleteHostedRunnerForOrg(): Internal\Operator\Actions\DeleteHostedRunnerForOrg + { + if ($this->actions👷DeleteHostedRunnerForOrg instanceof Internal\Operator\Actions\DeleteHostedRunnerForOrg === false) { + $this->actions👷DeleteHostedRunnerForOrg = new Internal\Operator\Actions\DeleteHostedRunnerForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId()); + } + + return $this->actions👷DeleteHostedRunnerForOrg; + } + + public function actions👷UpdateHostedRunnerForOrg(): Internal\Operator\Actions\UpdateHostedRunnerForOrg + { + if ($this->actions👷UpdateHostedRunnerForOrg instanceof Internal\Operator\Actions\UpdateHostedRunnerForOrg === false) { + $this->actions👷UpdateHostedRunnerForOrg = new Internal\Operator\Actions\UpdateHostedRunnerForOrg($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId()); + } + + return $this->actions👷UpdateHostedRunnerForOrg; + } + public function oidc👷GetOidcCustomSubTemplateForOrg(): Internal\Operator\Oidc\GetOidcCustomSubTemplateForOrg { if ($this->oidc👷GetOidcCustomSubTemplateForOrg instanceof Internal\Operator\Oidc\GetOidcCustomSubTemplateForOrg === false) { @@ -2400,6 +2501,15 @@ public function actions👷UpdateSelfHostedRunnerGroupForOrg(): Internal\Operato return $this->actions👷UpdateSelfHostedRunnerGroupForOrg; } + public function actions👷ListGithubHostedRunnersInGroupForOrg(): Internal\Operator\Actions\ListGithubHostedRunnersInGroupForOrg + { + if ($this->actions👷ListGithubHostedRunnersInGroupForOrg instanceof Internal\Operator\Actions\ListGithubHostedRunnersInGroupForOrg === false) { + $this->actions👷ListGithubHostedRunnersInGroupForOrg = new Internal\Operator\Actions\ListGithubHostedRunnersInGroupForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners()); + } + + return $this->actions👷ListGithubHostedRunnersInGroupForOrg; + } + public function actions👷ListRepoAccessToSelfHostedRunnerGroupInOrg(): Internal\Operator\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg { if ($this->actions👷ListRepoAccessToSelfHostedRunnerGroupInOrg instanceof Internal\Operator\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg === false) { diff --git a/clients/GitHub/src/Internal/Router/Delete/Actions.php b/clients/GitHub/src/Internal/Router/Delete/Actions.php index 018fd6707e1..82e531a6ae0 100644 --- a/clients/GitHub/src/Internal/Router/Delete/Actions.php +++ b/clients/GitHub/src/Internal/Router/Delete/Actions.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Internal; use ApiClients\Client\GitHub\Schema\ActionsCacheList; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; use ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok; use ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; @@ -22,6 +23,26 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + public function deleteHostedRunnerForOrg(array $params): ActionsHostedRunner + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('hosted_runner_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: hosted_runner_id'); + } + + $arguments['hosted_runner_id'] = $params['hosted_runner_id']; + unset($params['hosted_runner_id']); + $operator = new Internal\Operator\Actions\DeleteHostedRunnerForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId()); + + return $operator->call($arguments['org'], $arguments['hosted_runner_id']); + } + /** @return */ public function deleteSelfHostedRunnerGroupFromOrg(array $params): WithoutBody { diff --git a/clients/GitHub/src/Internal/Router/Delete/Six.php b/clients/GitHub/src/Internal/Router/Delete/Six.php index 36e71629bd2..2f5bd6ca53b 100644 --- a/clients/GitHub/src/Internal/Router/Delete/Six.php +++ b/clients/GitHub/src/Internal/Router/Delete/Six.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Internal\Routers; use ApiClients\Client\GitHub\Schema\ActionsCacheList; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; use ApiClients\Client\GitHub\Schema\FileCommit; use ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; @@ -17,7 +18,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): WithoutBody|Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|ActionsCacheList|FileCommit + /** @return |Schema\ActionsHostedRunner */ + public function call(string $call, array $params, array $pathChunks): WithoutBody|ActionsHostedRunner|Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|ActionsCacheList|FileCommit { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -35,7 +37,13 @@ public function call(string $call, array $params, array $pathChunks): WithoutBod } elseif ($pathChunks[1] === 'orgs') { if ($pathChunks[2] === '{org}') { if ($pathChunks[3] === 'actions') { - if ($pathChunks[4] === 'runner-groups') { + if ($pathChunks[4] === 'hosted-runners') { + if ($pathChunks[5] === '{hosted_runner_id}') { + if ($call === 'DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}') { + return $this->routers->internal🔀Router🔀Delete🔀Actions()->deleteHostedRunnerForOrg($params); + } + } + } elseif ($pathChunks[4] === 'runner-groups') { if ($pathChunks[5] === '{runner_group_id}') { if ($call === 'DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}') { return $this->routers->internal🔀Router🔀Delete🔀Actions()->deleteSelfHostedRunnerGroupFromOrg($params); diff --git a/clients/GitHub/src/Internal/Router/Get/Actions.php b/clients/GitHub/src/Internal/Router/Get/Actions.php index e44cb366f9f..a8596f9124e 100644 --- a/clients/GitHub/src/Internal/Router/Get/Actions.php +++ b/clients/GitHub/src/Internal/Router/Get/Actions.php @@ -10,6 +10,8 @@ use ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository; use ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise; use ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits; use ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions; use ApiClients\Client\GitHub\Schema\ActionsPublicKey; use ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions; @@ -19,7 +21,7 @@ use ApiClients\Client\GitHub\Schema\Artifact; use ApiClients\Client\GitHub\Schema\Job; use ApiClients\Client\GitHub\Schema\OidcCustomSubRepo; -use ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok; +use ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok; use ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json; use ApiClients\Client\GitHub\Schema\OrganizationActionsSecret; use ApiClients\Client\GitHub\Schema\OrganizationActionsVariable; @@ -44,6 +46,32 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + public function listHostedRunnersForOrg(array $params): Ok + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $operator = new Internal\Operator\Actions\ListHostedRunnersForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners()); + + return $operator->call($arguments['org'], $arguments['per_page'], $arguments['page']); + } + /** @return */ public function getGithubActionsPermissionsOrganization(array $params): ActionsOrganizationPermissions { @@ -60,7 +88,7 @@ public function getGithubActionsPermissionsOrganization(array $params): ActionsO } /** @return */ - public function listSelfHostedRunnerGroupsForOrg(array $params): Ok + public function listSelfHostedRunnerGroupsForOrg(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok { $arguments = []; if (array_key_exists('org', $params) === false) { @@ -221,6 +249,68 @@ public function getActionsCacheUsageByRepoForOrg(array $params): \ApiClients\Cli return $operator->call($arguments['org'], $arguments['per_page'], $arguments['page']); } + public function getHostedRunnersLimitsForOrg(array $params): ActionsHostedRunnerLimits + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + $operator = new Internal\Operator\Actions\GetHostedRunnersLimitsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Limits()); + + return $operator->call($arguments['org']); + } + + public function getHostedRunnersMachineSpecsForOrg(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + $operator = new Internal\Operator\Actions\GetHostedRunnersMachineSpecsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀MachineSizes()); + + return $operator->call($arguments['org']); + } + + public function getHostedRunnersPlatformsForOrg(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + $operator = new Internal\Operator\Actions\GetHostedRunnersPlatformsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Platforms()); + + return $operator->call($arguments['org']); + } + + public function getHostedRunnerForOrg(array $params): ActionsHostedRunner + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('hosted_runner_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: hosted_runner_id'); + } + + $arguments['hosted_runner_id'] = $params['hosted_runner_id']; + unset($params['hosted_runner_id']); + $operator = new Internal\Operator\Actions\GetHostedRunnerForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId()); + + return $operator->call($arguments['org'], $arguments['hosted_runner_id']); + } + /** @return */ public function listSelectedRepositoriesEnabledGithubActionsOrganization(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok { @@ -794,6 +884,66 @@ public function listRepoWorkflows(array $params): \ApiClients\Client\GitHub\Sche return $operator->call($arguments['owner'], $arguments['repo'], $arguments['per_page'], $arguments['page']); } + public function getHostedRunnersGithubOwnedImagesForOrg(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + $operator = new Internal\Operator\Actions\GetHostedRunnersGithubOwnedImagesForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀GithubOwned()); + + return $operator->call($arguments['org']); + } + + public function getHostedRunnersPartnerImagesForOrg(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + $operator = new Internal\Operator\Actions\GetHostedRunnersPartnerImagesForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀Images🌀Partner()); + + return $operator->call($arguments['org']); + } + + public function listGithubHostedRunnersInGroupForOrg(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('runner_group_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: runner_group_id'); + } + + $arguments['runner_group_id'] = $params['runner_group_id']; + unset($params['runner_group_id']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $operator = new Internal\Operator\Actions\ListGithubHostedRunnersInGroupForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀RunnerGroups🌀RunnerGroupId🌀HostedRunners()); + + return $operator->call($arguments['org'], $arguments['runner_group_id'], $arguments['per_page'], $arguments['page']); + } + /** @return */ public function listRepoAccessToSelfHostedRunnerGroupInOrg(array $params): \ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok { diff --git a/clients/GitHub/src/Internal/Router/Get/Dependabot.php b/clients/GitHub/src/Internal/Router/Get/Dependabot.php index fd46f811afd..bc0b43b98da 100644 --- a/clients/GitHub/src/Internal/Router/Get/Dependabot.php +++ b/clients/GitHub/src/Internal/Router/Get/Dependabot.php @@ -26,7 +26,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForEnterprise(array $params): iterable|WithoutBody { $arguments = []; @@ -113,7 +113,7 @@ public function listAlertsForEnterprise(array $params): iterable|WithoutBody return $operator->call($arguments['enterprise'], $arguments['state'], $arguments['severity'], $arguments['ecosystem'], $arguments['package'], $arguments['scope'], $arguments['before'], $arguments['after'], $arguments['last'], $arguments['sort'], $arguments['direction'], $arguments['first'], $arguments['per_page']); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForOrg(array $params): iterable|WithoutBody { $arguments = []; @@ -263,7 +263,7 @@ public function getOrgSecret(array $params): OrganizationDependabotSecret return $operator->call($arguments['org'], $arguments['secret_name']); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/Five.php b/clients/GitHub/src/Internal/Router/Get/Five.php index 31f1ba73237..fb40b408479 100644 --- a/clients/GitHub/src/Internal/Router/Get/Five.php +++ b/clients/GitHub/src/Internal/Router/Get/Five.php @@ -23,7 +23,7 @@ use ApiClients\Client\GitHub\Schema\LicenseContent; use ApiClients\Client\GitHub\Schema\MarketplacePurchase; use ApiClients\Client\GitHub\Schema\Migration; -use ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok; +use ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok; use ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json; use ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One; use ApiClients\Client\GitHub\Schema\OrganizationRole; @@ -52,8 +52,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ - public function call(string $call, array $params, array $pathChunks): HookDelivery|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|ActionsOrganizationPermissions|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|OrgHook|OrgMembership|Migration|OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|OrgPrivateRegistryConfiguration|RepositoryRuleset|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject + /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + public function call(string $call, array $params, array $pathChunks): HookDelivery|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|Ok|ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|OrgHook|OrgMembership|Migration|OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|OrgPrivateRegistryConfiguration|RepositoryRuleset|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'app') { @@ -139,7 +139,11 @@ public function call(string $call, array $params, array $pathChunks): HookDelive } elseif ($pathChunks[1] === 'orgs') { if ($pathChunks[2] === '{org}') { if ($pathChunks[3] === 'actions') { - if ($pathChunks[4] === 'permissions') { + if ($pathChunks[4] === 'hosted-runners') { + if ($call === 'GET /orgs/{org}/actions/hosted-runners') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->listHostedRunnersForOrg($params); + } + } elseif ($pathChunks[4] === 'permissions') { if ($call === 'GET /orgs/{org}/actions/permissions') { return $this->routers->internal🔀Router🔀Get🔀Actions()->getGithubActionsPermissionsOrganization($params); } diff --git a/clients/GitHub/src/Internal/Router/Get/Seven.php b/clients/GitHub/src/Internal/Router/Get/Seven.php index 79d4166d2e1..bc390389d14 100644 --- a/clients/GitHub/src/Internal/Router/Get/Seven.php +++ b/clients/GitHub/src/Internal/Router/Get/Seven.php @@ -32,8 +32,8 @@ use ApiClients\Client\GitHub\Schema\IssueEvent; use ApiClients\Client\GitHub\Schema\Job; use ApiClients\Client\GitHub\Schema\OidcCustomSub; -use ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok; -use ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json; +use ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok; +use ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json; use ApiClients\Client\GitHub\Schema\PackageVersion; use ApiClients\Client\GitHub\Schema\PageBuild; use ApiClients\Client\GitHub\Schema\PagesDeploymentStatus; @@ -63,8 +63,8 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ - public function call(string $call, array $params, array $pathChunks): iterable|OidcCustomSub|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|Json|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|TeamDiscussion|TeamMembership|TeamProject|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|Blob|GitCommit|GitRef|GitTag|GitTree|WebhookConfig|IssueComment|IssueEvent|PageBuild|PagesDeploymentStatus|PullRequestReviewComment|PullRequestReviewRequest|ReleaseAsset|Release|RuleSuite|SecretScanningAlert|TeamDiscussionComment|PackageVersion + /** @return Observable|Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok|Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json||Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + public function call(string $call, array $params, array $pathChunks): iterable|Ok|Json|OidcCustomSub|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|TeamDiscussion|TeamMembership|TeamProject|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|Blob|GitCommit|GitRef|GitTag|GitTree|WebhookConfig|IssueComment|IssueEvent|PageBuild|PagesDeploymentStatus|PullRequestReviewComment|PullRequestReviewRequest|ReleaseAsset|Release|RuleSuite|SecretScanningAlert|TeamDiscussionComment|PackageVersion { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -84,7 +84,19 @@ public function call(string $call, array $params, array $pathChunks): iterable|O } elseif ($pathChunks[1] === 'orgs') { if ($pathChunks[2] === '{org}') { if ($pathChunks[3] === 'actions') { - if ($pathChunks[4] === 'oidc') { + if ($pathChunks[4] === 'hosted-runners') { + if ($pathChunks[5] === 'images') { + if ($pathChunks[6] === 'github-owned') { + if ($call === 'GET /orgs/{org}/actions/hosted-runners/images/github-owned') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->getHostedRunnersGithubOwnedImagesForOrg($params); + } + } elseif ($pathChunks[6] === 'partner') { + if ($call === 'GET /orgs/{org}/actions/hosted-runners/images/partner') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->getHostedRunnersPartnerImagesForOrg($params); + } + } + } + } elseif ($pathChunks[4] === 'oidc') { if ($pathChunks[5] === 'customization') { if ($pathChunks[6] === 'sub') { if ($call === 'GET /orgs/{org}/actions/oidc/customization/sub') { @@ -94,7 +106,11 @@ public function call(string $call, array $params, array $pathChunks): iterable|O } } elseif ($pathChunks[4] === 'runner-groups') { if ($pathChunks[5] === '{runner_group_id}') { - if ($pathChunks[6] === 'repositories') { + if ($pathChunks[6] === 'hosted-runners') { + if ($call === 'GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->listGithubHostedRunnersInGroupForOrg($params); + } + } elseif ($pathChunks[6] === 'repositories') { if ($call === 'GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories') { return $this->routers->internal🔀Router🔀Get🔀Actions()->listRepoAccessToSelfHostedRunnerGroupInOrg($params); } diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index 16d764c87cc..9d48bd4416e 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -9,6 +9,8 @@ use ApiClients\Client\GitHub\Schema\ActionsCacheList; use ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise; use ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits; use ApiClients\Client\GitHub\Schema\ActionsPublicKey; use ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions; use ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats; @@ -78,8 +80,8 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ - public function call(string $call, array $params, array $pathChunks): iterable|CodeSecurityConfiguration|WithoutBody|BillingUsageReport|ActionsCacheUsageOrgEnterprise|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsOrg|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails + /** @return Observable||Observable|Schema\ActionsHostedRunnerLimits|Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|Schema\ActionsHostedRunner|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + public function call(string $call, array $params, array $pathChunks): iterable|CodeSecurityConfiguration|WithoutBody|BillingUsageReport|ActionsCacheUsageOrgEnterprise|Ok|ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsOrg|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -135,6 +137,24 @@ public function call(string $call, array $params, array $pathChunks): iterable|C return $this->routers->internal🔀Router🔀Get🔀Actions()->getActionsCacheUsageByRepoForOrg($params); } } + } elseif ($pathChunks[4] === 'hosted-runners') { + if ($pathChunks[5] === 'limits') { + if ($call === 'GET /orgs/{org}/actions/hosted-runners/limits') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->getHostedRunnersLimitsForOrg($params); + } + } elseif ($pathChunks[5] === 'machine-sizes') { + if ($call === 'GET /orgs/{org}/actions/hosted-runners/machine-sizes') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->getHostedRunnersMachineSpecsForOrg($params); + } + } elseif ($pathChunks[5] === 'platforms') { + if ($call === 'GET /orgs/{org}/actions/hosted-runners/platforms') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->getHostedRunnersPlatformsForOrg($params); + } + } elseif ($pathChunks[5] === '{hosted_runner_id}') { + if ($call === 'GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}') { + return $this->routers->internal🔀Router🔀Get🔀Actions()->getHostedRunnerForOrg($params); + } + } } elseif ($pathChunks[4] === 'permissions') { if ($pathChunks[5] === 'repositories') { if ($call === 'GET /orgs/{org}/actions/permissions/repositories') { diff --git a/clients/GitHub/src/Internal/Router/List/Dependabot.php b/clients/GitHub/src/Internal/Router/List/Dependabot.php index 3401dc2bb07..788ae8bf6dd 100644 --- a/clients/GitHub/src/Internal/Router/List/Dependabot.php +++ b/clients/GitHub/src/Internal/Router/List/Dependabot.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepoListing(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/List/Six.php b/clients/GitHub/src/Internal/Router/List/Six.php index 8392293978d..15771a2e3fb 100644 --- a/clients/GitHub/src/Internal/Router/List/Six.php +++ b/clients/GitHub/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Patch/Actions.php b/clients/GitHub/src/Internal/Router/Patch/Actions.php index 697307ef794..dd6fa9c18ca 100644 --- a/clients/GitHub/src/Internal/Router/Patch/Actions.php +++ b/clients/GitHub/src/Internal/Router/Patch/Actions.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Router\Patch; use ApiClients\Client\GitHub\Internal; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; use ApiClients\Client\GitHub\Schema\RunnerGroupsOrg; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; @@ -20,6 +21,26 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + public function updateHostedRunnerForOrg(array $params): ActionsHostedRunner + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('hosted_runner_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: hosted_runner_id'); + } + + $arguments['hosted_runner_id'] = $params['hosted_runner_id']; + unset($params['hosted_runner_id']); + $operator = new Internal\Operator\Actions\UpdateHostedRunnerForOrg($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners🌀HostedRunnerId()); + + return $operator->call($arguments['org'], $arguments['hosted_runner_id'], $params); + } + /** @return */ public function updateSelfHostedRunnerGroupForOrg(array $params): RunnerGroupsOrg { diff --git a/clients/GitHub/src/Internal/Router/Patch/Six.php b/clients/GitHub/src/Internal/Router/Patch/Six.php index 1163fceaf93..e560f98c32a 100644 --- a/clients/GitHub/src/Internal/Router/Patch/Six.php +++ b/clients/GitHub/src/Internal/Router/Patch/Six.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Router\Patch; use ApiClients\Client\GitHub\Internal\Routers; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CheckRun; use ApiClients\Client\GitHub\Schema\CheckSuitePreference; @@ -32,7 +33,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): CodeSecurityConfiguration|WithoutBody|RunnerGroupsOrg|WebhookConfig|CheckRun|CheckSuitePreference|EmptyObject|CodeScanningDefaultSetupUpdateResponse|CommitComment|Hook|Import|RepositoryInvitation|Issue|BasicError|Label|Milestone|PullRequest|Release|RepositoryAdvisory + /** @return |Schema\ActionsHostedRunner */ + public function call(string $call, array $params, array $pathChunks): CodeSecurityConfiguration|WithoutBody|ActionsHostedRunner|RunnerGroupsOrg|WebhookConfig|CheckRun|CheckSuitePreference|EmptyObject|CodeScanningDefaultSetupUpdateResponse|CommitComment|Hook|Import|RepositoryInvitation|Issue|BasicError|Label|Milestone|PullRequest|Release|RepositoryAdvisory { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -50,7 +52,13 @@ public function call(string $call, array $params, array $pathChunks): CodeSecuri } elseif ($pathChunks[1] === 'orgs') { if ($pathChunks[2] === '{org}') { if ($pathChunks[3] === 'actions') { - if ($pathChunks[4] === 'runner-groups') { + if ($pathChunks[4] === 'hosted-runners') { + if ($pathChunks[5] === '{hosted_runner_id}') { + if ($call === 'PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}') { + return $this->routers->internal🔀Router🔀Patch🔀Actions()->updateHostedRunnerForOrg($params); + } + } + } elseif ($pathChunks[4] === 'runner-groups') { if ($pathChunks[5] === '{runner_group_id}') { if ($call === 'PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}') { return $this->routers->internal🔀Router🔀Patch🔀Actions()->updateSelfHostedRunnerGroupForOrg($params); diff --git a/clients/GitHub/src/Internal/Router/Post/Actions.php b/clients/GitHub/src/Internal/Router/Post/Actions.php index cd04c58942f..f93a099e32c 100644 --- a/clients/GitHub/src/Internal/Router/Post/Actions.php +++ b/clients/GitHub/src/Internal/Router/Post/Actions.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Internal; use ApiClients\Client\GitHub\Schema; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; use ApiClients\Client\GitHub\Schema\AuthenticationToken; use ApiClients\Client\GitHub\Schema\EmptyObject; use ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created; @@ -91,6 +92,20 @@ public function createRepoVariable(array $params): EmptyObject return $operator->call($arguments['owner'], $arguments['repo'], $params); } + public function createHostedRunnerForOrg(array $params): ActionsHostedRunner + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + $operator = new Internal\Operator\Actions\CreateHostedRunnerForOrg($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀HostedRunners()); + + return $operator->call($arguments['org'], $params); + } + /** @return */ public function createSelfHostedRunnerGroupForOrg(array $params): RunnerGroupsOrg { diff --git a/clients/GitHub/src/Internal/Router/Post/Five.php b/clients/GitHub/src/Internal/Router/Post/Five.php index a212d04bf00..66829655024 100644 --- a/clients/GitHub/src/Internal/Router/Post/Five.php +++ b/clients/GitHub/src/Internal/Router/Post/Five.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Router\Post; use ApiClients\Client\GitHub\Internal\Routers; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; use ApiClients\Client\GitHub\Schema\Authorization; use ApiClients\Client\GitHub\Schema\Autolink; use ApiClients\Client\GitHub\Schema\CheckRun; @@ -44,7 +45,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): InstallationToken|Authorization|CodeSecurityConfiguration|RunnerGroupsOrg|EmptyObject|WithoutBody|ProjectCard|Json|Created|Autolink|CheckRun|CheckSuite|Codespace|Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|FullRepository|Hook|Issue|DeployKey|Label|MergedUpstream|Commit|Milestone|Page|Project|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|MinimalRepository|CodespaceExportDetails|CodespaceWithFullRepository + /** @return |Schema\ActionsHostedRunner */ + public function call(string $call, array $params, array $pathChunks): InstallationToken|Authorization|CodeSecurityConfiguration|ActionsHostedRunner|RunnerGroupsOrg|EmptyObject|WithoutBody|ProjectCard|Json|Created|Autolink|CheckRun|CheckSuite|Codespace|Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|FullRepository|Hook|Issue|DeployKey|Label|MergedUpstream|Commit|Milestone|Page|Project|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|MinimalRepository|CodespaceExportDetails|CodespaceWithFullRepository { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'app') { @@ -80,7 +82,11 @@ public function call(string $call, array $params, array $pathChunks): Installati } elseif ($pathChunks[1] === 'orgs') { if ($pathChunks[2] === '{org}') { if ($pathChunks[3] === 'actions') { - if ($pathChunks[4] === 'runner-groups') { + if ($pathChunks[4] === 'hosted-runners') { + if ($call === 'POST /orgs/{org}/actions/hosted-runners') { + return $this->routers->internal🔀Router🔀Post🔀Actions()->createHostedRunnerForOrg($params); + } + } elseif ($pathChunks[4] === 'runner-groups') { if ($call === 'POST /orgs/{org}/actions/runner-groups') { return $this->routers->internal🔀Router🔀Post🔀Actions()->createSelfHostedRunnerGroupForOrg($params); } diff --git a/clients/GitHub/src/Operation/Actions.php b/clients/GitHub/src/Operation/Actions.php index 254d08df9df..fd96416f457 100644 --- a/clients/GitHub/src/Operation/Actions.php +++ b/clients/GitHub/src/Operation/Actions.php @@ -10,6 +10,8 @@ use ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository; use ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise; use ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunner; +use ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits; use ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions; use ApiClients\Client\GitHub\Schema\ActionsPublicKey; use ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions; @@ -23,7 +25,7 @@ use ApiClients\Client\GitHub\Schema\OidcCustomSubRepo; use ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created; use ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok; -use ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json; +use ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json; use ApiClients\Client\GitHub\Schema\OrganizationActionsSecret; use ApiClients\Client\GitHub\Schema\OrganizationActionsVariable; use ApiClients\Client\GitHub\Schema\Runner; @@ -53,6 +55,56 @@ public function getActionsCacheUsageByRepoForOrg(string $org, int $perPage, int return $this->operators->actions👷GetActionsCacheUsageByRepoForOrg()->call($org, $perPage, $page); } + public function listHostedRunnersForOrg(string $org, int $perPage, int $page): \ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok + { + return $this->operators->actions👷ListHostedRunnersForOrg()->call($org, $perPage, $page); + } + + public function createHostedRunnerForOrg(string $org, array $params): ActionsHostedRunner + { + return $this->operators->actions👷CreateHostedRunnerForOrg()->call($org, $params); + } + + public function getHostedRunnersGithubOwnedImagesForOrg(string $org): \ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok + { + return $this->operators->actions👷GetHostedRunnersGithubOwnedImagesForOrg()->call($org); + } + + public function getHostedRunnersPartnerImagesForOrg(string $org): Json + { + return $this->operators->actions👷GetHostedRunnersPartnerImagesForOrg()->call($org); + } + + public function getHostedRunnersLimitsForOrg(string $org): ActionsHostedRunnerLimits + { + return $this->operators->actions👷GetHostedRunnersLimitsForOrg()->call($org); + } + + public function getHostedRunnersMachineSpecsForOrg(string $org): \ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok + { + return $this->operators->actions👷GetHostedRunnersMachineSpecsForOrg()->call($org); + } + + public function getHostedRunnersPlatformsForOrg(string $org): \ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok + { + return $this->operators->actions👷GetHostedRunnersPlatformsForOrg()->call($org); + } + + public function getHostedRunnerForOrg(string $org, int $hostedRunnerId): ActionsHostedRunner + { + return $this->operators->actions👷GetHostedRunnerForOrg()->call($org, $hostedRunnerId); + } + + public function deleteHostedRunnerForOrg(string $org, int $hostedRunnerId): ActionsHostedRunner + { + return $this->operators->actions👷DeleteHostedRunnerForOrg()->call($org, $hostedRunnerId); + } + + public function updateHostedRunnerForOrg(string $org, int $hostedRunnerId, array $params): ActionsHostedRunner + { + return $this->operators->actions👷UpdateHostedRunnerForOrg()->call($org, $hostedRunnerId, $params); + } + /** @return */ public function getGithubActionsPermissionsOrganization(string $org): ActionsOrganizationPermissions { @@ -143,6 +195,11 @@ public function updateSelfHostedRunnerGroupForOrg(string $org, int $runnerGroupI return $this->operators->actions👷UpdateSelfHostedRunnerGroupForOrg()->call($org, $runnerGroupId, $params); } + public function listGithubHostedRunnersInGroupForOrg(string $org, int $runnerGroupId, int $perPage, int $page): \ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok + { + return $this->operators->actions👷ListGithubHostedRunnersInGroupForOrg()->call($org, $runnerGroupId, $perPage, $page); + } + /** @return */ public function listRepoAccessToSelfHostedRunnerGroupInOrg(string $org, int $runnerGroupId, int $page, int $perPage): \ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok { @@ -252,7 +309,7 @@ public function addCustomLabelsToSelfHostedRunnerForOrg(string $org, int $runner } /** @return */ - public function removeAllCustomLabelsFromSelfHostedRunnerForOrg(string $org, int $runnerId): Json + public function removeAllCustomLabelsFromSelfHostedRunnerForOrg(string $org, int $runnerId): \ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json { return $this->operators->actions👷RemoveAllCustomLabelsFromSelfHostedRunnerForOrg()->call($org, $runnerId); } diff --git a/clients/GitHub/src/Operation/Dependabot.php b/clients/GitHub/src/Operation/Dependabot.php index 141cbc209e8..50cd7d2189c 100644 --- a/clients/GitHub/src/Operation/Dependabot.php +++ b/clients/GitHub/src/Operation/Dependabot.php @@ -21,13 +21,13 @@ public function __construct(private Internal\Operators $operators) { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForEnterprise(string $enterprise, string $state, string $severity, string $ecosystem, string $package, string $scope, string $before, string $after, int $last, string $sort, string $direction, int $first, int $perPage): iterable|WithoutBody { return $this->operators->dependabot👷ListAlertsForEnterprise()->call($enterprise, $state, $severity, $ecosystem, $package, $scope, $before, $after, $last, $sort, $direction, $first, $perPage); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForOrg(string $org, string $state, string $severity, string $ecosystem, string $package, string $scope, string $before, string $after, int $last, string $sort, string $direction, int $first, int $perPage): iterable|WithoutBody { return $this->operators->dependabot👷ListAlertsForOrg()->call($org, $state, $severity, $ecosystem, $package, $scope, $before, $after, $last, $sort, $direction, $first, $perPage); @@ -87,13 +87,13 @@ public function removeSelectedRepoFromOrgSecret(string $org, string $secretName, return $this->operators->dependabot👷RemoveSelectedRepoFromOrgSecret()->call($org, $secretName, $repositoryId); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(string $owner, string $repo, string $state, string $severity, string $ecosystem, string $package, string $manifest, string $scope, string $before, string $after, int $last, string $sort, string $direction, int $page, int $perPage, int $first): iterable|WithoutBody { return $this->operators->dependabot👷ListAlertsForRepo()->call($owner, $repo, $state, $severity, $ecosystem, $package, $manifest, $scope, $before, $after, $last, $sort, $direction, $page, $perPage, $first); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepoListing(string $owner, string $repo, string $state, string $severity, string $ecosystem, string $package, string $manifest, string $scope, string $before, string $after, int $last, string $sort, string $direction, int $page, int $perPage, int $first): iterable|WithoutBody { return $this->operators->dependabot👷ListAlertsForRepoListing()->call($owner, $repo, $state, $severity, $ecosystem, $package, $manifest, $scope, $before, $after, $last, $sort, $direction, $page, $perPage, $first); diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index a3e3c48d0fa..02b7f260def 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -228,7 +228,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /enterprises/{enterprise}/dependabot/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'GET /enterprises/{enterprise}/secret-scanning/alerts') { @@ -511,6 +511,46 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /orgs/{org}/actions/hosted-runners') { + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\ListHostedRunnersForOrg\\Response\\ApplicationJson\\Ok'); + } + + if ($call === 'POST /orgs/{org}/actions/hosted-runners') { + return $this->typeResolver->resolve('Schema\\ActionsHostedRunner'); + } + + if ($call === 'GET /orgs/{org}/actions/hosted-runners/images/github-owned') { + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GetHostedRunnersGithubOwnedImagesForOrg\\Response\\ApplicationJson\\Ok'); + } + + if ($call === 'GET /orgs/{org}/actions/hosted-runners/images/partner') { + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GetHostedRunnersPartnerImagesForOrg\\Response\\ApplicationJson\\Ok\\Application\\Json'); + } + + if ($call === 'GET /orgs/{org}/actions/hosted-runners/limits') { + return $this->typeResolver->resolve('Schema\\ActionsHostedRunnerLimits'); + } + + if ($call === 'GET /orgs/{org}/actions/hosted-runners/machine-sizes') { + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GetHostedRunnersMachineSpecsForOrg\\Response\\ApplicationJson\\Ok'); + } + + if ($call === 'GET /orgs/{org}/actions/hosted-runners/platforms') { + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GetHostedRunnersPlatformsForOrg\\Response\\ApplicationJson\\Ok'); + } + + if ($call === 'GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}') { + return $this->typeResolver->resolve('Schema\\ActionsHostedRunner'); + } + + if ($call === 'DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}') { + return $this->typeResolver->resolve('Schema\\ActionsHostedRunner'); + } + + if ($call === 'PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}') { + return $this->typeResolver->resolve('Schema\\ActionsHostedRunner'); + } + if ($call === 'GET /orgs/{org}/actions/oidc/customization/sub') { return $this->typeResolver->resolve(''); } @@ -579,6 +619,10 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners') { + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\ListGithubHostedRunnersInGroupForOrg\\Response\\ApplicationJson\\Ok'); + } + if ($call === 'GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories') { return $this->typeResolver->resolve(''); } @@ -896,7 +940,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/dependabot/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'GET /orgs/{org}/dependabot/secrets') { @@ -2652,11 +2696,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/dependabot/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'LIST /repos/{owner}/{repo}/dependabot/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}') { diff --git a/clients/GitHub/src/Schema/Actions/CreateHostedRunnerForOrg/Request/ApplicationJson.php b/clients/GitHub/src/Schema/Actions/CreateHostedRunnerForOrg/Request/ApplicationJson.php new file mode 100644 index 00000000000..04cd9ff3cb1 --- /dev/null +++ b/clients/GitHub/src/Schema/Actions/CreateHostedRunnerForOrg/Request/ApplicationJson.php @@ -0,0 +1,98 @@ + 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/actions/hosted-runners', Argument::type('array'), json_encode(json_decode(Schema\Actions\CreateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\CreateHostedRunnerForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })(json_decode(Schema\Actions\CreateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_201_requestContentType_application_json_responseContentType_application_json_zero(): void + { + $response = new Response(201, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/actions/hosted-runners', Argument::type('array'), json_encode(json_decode(Schema\Actions\CreateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->createHostedRunnerForOrg('generated', json_decode(Schema\Actions\CreateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/DeleteHostedRunnerForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/DeleteHostedRunnerForOrgTest.php new file mode 100644 index 00000000000..9084458ec50 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/DeleteHostedRunnerForOrgTest.php @@ -0,0 +1,55 @@ + 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/actions/hosted-runners/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\DeleteHostedRunnerForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['hosted_runner_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_202_responseContentType_application_json_zero(): void + { + $response = new Response(202, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/actions/hosted-runners/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->deleteHostedRunnerForOrg('generated', 16); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnerForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnerForOrgTest.php new file mode 100644 index 00000000000..3983c0298e7 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnerForOrgTest.php @@ -0,0 +1,55 @@ + 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GetHostedRunnerForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['hosted_runner_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->getHostedRunnerForOrg('generated', 16); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersGithubOwnedImagesForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersGithubOwnedImagesForOrgTest.php new file mode 100644 index 00000000000..0d2043f82a8 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersGithubOwnedImagesForOrgTest.php @@ -0,0 +1,54 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/images/github-owned', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GetHostedRunnersGithubOwnedImagesForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/images/github-owned', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->getHostedRunnersGithubOwnedImagesForOrg('generated'); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersLimitsForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersLimitsForOrgTest.php new file mode 100644 index 00000000000..fb4e11f82cb --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersLimitsForOrgTest.php @@ -0,0 +1,54 @@ + 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunnerLimits::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/limits', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GetHostedRunnersLimitsForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunnerLimits::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/limits', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->getHostedRunnersLimitsForOrg('generated'); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersMachineSpecsForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersMachineSpecsForOrgTest.php new file mode 100644 index 00000000000..d0223d603e9 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersMachineSpecsForOrgTest.php @@ -0,0 +1,54 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/machine-sizes', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GetHostedRunnersMachineSpecsForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/machine-sizes', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->getHostedRunnersMachineSpecsForOrg('generated'); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersPartnerImagesForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersPartnerImagesForOrgTest.php new file mode 100644 index 00000000000..bb9e60368a5 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersPartnerImagesForOrgTest.php @@ -0,0 +1,54 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/images/partner', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GetHostedRunnersPartnerImagesForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/images/partner', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->getHostedRunnersPartnerImagesForOrg('generated'); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersPlatformsForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersPlatformsForOrgTest.php new file mode 100644 index 00000000000..8e3dd725fb9 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/GetHostedRunnersPlatformsForOrgTest.php @@ -0,0 +1,54 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/platforms', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GetHostedRunnersPlatformsForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners/platforms', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->getHostedRunnersPlatformsForOrg('generated'); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/ListGithubHostedRunnersInGroupForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/ListGithubHostedRunnersInGroupForOrgTest.php new file mode 100644 index 00000000000..2c00a904ecc --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/ListGithubHostedRunnersInGroupForOrgTest.php @@ -0,0 +1,57 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/runner-groups/15/hosted-runners?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\ListGithubHostedRunnersInGroupForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['runner_group_id'] = 15; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/runner-groups/15/hosted-runners?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->listGithubHostedRunnersInGroupForOrg('generated', 15, 8, 1); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/ListHostedRunnersForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/ListHostedRunnersForOrgTest.php new file mode 100644 index 00000000000..8949fef50c2 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/ListHostedRunnersForOrgTest.php @@ -0,0 +1,56 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\ListHostedRunnersForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/actions/hosted-runners?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->listHostedRunnersForOrg('generated', 8, 1); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Actions/UpdateHostedRunnerForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/UpdateHostedRunnerForOrgTest.php new file mode 100644 index 00000000000..f40072260bc --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Actions/UpdateHostedRunnerForOrgTest.php @@ -0,0 +1,55 @@ + 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/orgs/generated/actions/hosted-runners/16', Argument::type('array'), json_encode(json_decode(Schema\Actions\UpdateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\UpdateHostedRunnerForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['hosted_runner_id'] = 16; + + return $data; + })(json_decode(Schema\Actions\UpdateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_200_requestContentType_application_json_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ActionsHostedRunner::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/orgs/generated/actions/hosted-runners/16', Argument::type('array'), json_encode(json_decode(Schema\Actions\UpdateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->updateHostedRunnerForOrg('generated', 16, json_decode(Schema\Actions\UpdateHostedRunnerForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 577d9d5f309..fbd1a6feb43 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -63,7 +63,7 @@ function authHeader(): string assertType('', $client->call('POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach')); assertType('', $client->call('PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /enterprises/{enterprise}/dependabot/alerts')); +assertType('Observable|WithoutBody', $client->call('GET /enterprises/{enterprise}/dependabot/alerts')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); assertType('Observable|WithoutBody', $client->call('GET /events')); assertType('Observable|WithoutBody', $client->call('LIST /events')); @@ -134,6 +134,16 @@ function authHeader(): string assertType('', $client->call('PATCH /orgs/{org}')); assertType('', $client->call('GET /orgs/{org}/actions/cache/usage')); assertType('', $client->call('GET /orgs/{org}/actions/cache/usage-by-repository')); +assertType('Schema\\Operations\\Actions\\ListHostedRunnersForOrg\\Response\\ApplicationJson\\Ok', $client->call('GET /orgs/{org}/actions/hosted-runners')); +assertType('Schema\\ActionsHostedRunner', $client->call('POST /orgs/{org}/actions/hosted-runners')); +assertType('Schema\\Operations\\Actions\\GetHostedRunnersGithubOwnedImagesForOrg\\Response\\ApplicationJson\\Ok', $client->call('GET /orgs/{org}/actions/hosted-runners/images/github-owned')); +assertType('Schema\\Operations\\Actions\\GetHostedRunnersPartnerImagesForOrg\\Response\\ApplicationJson\\Ok\\Application\\Json', $client->call('GET /orgs/{org}/actions/hosted-runners/images/partner')); +assertType('Schema\\ActionsHostedRunnerLimits', $client->call('GET /orgs/{org}/actions/hosted-runners/limits')); +assertType('Schema\\Operations\\Actions\\GetHostedRunnersMachineSpecsForOrg\\Response\\ApplicationJson\\Ok', $client->call('GET /orgs/{org}/actions/hosted-runners/machine-sizes')); +assertType('Schema\\Operations\\Actions\\GetHostedRunnersPlatformsForOrg\\Response\\ApplicationJson\\Ok', $client->call('GET /orgs/{org}/actions/hosted-runners/platforms')); +assertType('Schema\\ActionsHostedRunner', $client->call('GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}')); +assertType('Schema\\ActionsHostedRunner', $client->call('DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}')); +assertType('Schema\\ActionsHostedRunner', $client->call('PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}')); assertType('', $client->call('GET /orgs/{org}/actions/oidc/customization/sub')); assertType('', $client->call('PUT /orgs/{org}/actions/oidc/customization/sub')); assertType('', $client->call('GET /orgs/{org}/actions/permissions')); @@ -151,6 +161,7 @@ function authHeader(): string assertType('', $client->call('GET /orgs/{org}/actions/runner-groups/{runner_group_id}')); assertType('', $client->call('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}')); assertType('', $client->call('PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}')); +assertType('Schema\\Operations\\Actions\\ListGithubHostedRunnersInGroupForOrg\\Response\\ApplicationJson\\Ok', $client->call('GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners')); assertType('', $client->call('GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories')); assertType('', $client->call('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories')); assertType('', $client->call('PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}')); @@ -230,7 +241,7 @@ function authHeader(): string assertType('Observable', $client->call('LIST /orgs/{org}/copilot/metrics')); assertType('Observable', $client->call('GET /orgs/{org}/copilot/usage')); assertType('Observable', $client->call('LIST /orgs/{org}/copilot/usage')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /orgs/{org}/dependabot/alerts')); +assertType('Observable|WithoutBody', $client->call('GET /orgs/{org}/dependabot/alerts')); assertType('', $client->call('GET /orgs/{org}/dependabot/secrets')); assertType('', $client->call('GET /orgs/{org}/dependabot/secrets/public-key')); assertType('', $client->call('GET /orgs/{org}/dependabot/secrets/{secret_name}')); @@ -669,8 +680,8 @@ function authHeader(): string assertType('', $client->call('DELETE /repos/{owner}/{repo}/contents/{path}')); assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/contributors')); assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/contributors')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /repos/{owner}/{repo}/dependabot/alerts')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('LIST /repos/{owner}/{repo}/dependabot/alerts')); +assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/dependabot/alerts')); +assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/dependabot/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}')); assertType('', $client->call('GET /repos/{owner}/{repo}/dependabot/secrets')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 9336b2313a2..b6745d5d465 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -4781,6 +4781,459 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/orgs/{org}/actions/hosted-runners": + get: + summary: List GitHub-hosted runners for an organization + description: |- + Lists all GitHub-hosted runners configured in an organization. + + OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint. + tags: + - actions + operationId: actions/list-hosted-runners-for-org + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#list-github-hosted-runners-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - runners + properties: + total_count: + type: integer + runners: + type: array + items: + "$ref": "#/components/schemas/actions-hosted-runner" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner-paginated" + headers: + Link: + "$ref": "#/components/headers/link" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: hosted-runners + post: + summary: Create a GitHub-hosted runner for an organization + description: |- + Creates a GitHub-hosted runner for an organization. + OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + operationId: actions/create-hosted-runner-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#create-a-github-hosted-runner-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + description: Name of the runner. Must be between 1 and 64 characters + and may only contain upper and lowercase letters a-z, numbers + 0-9, '.', '-', and '_'. + type: string + image: + description: The image of runner. To list all available images, + use `GET /actions/hosted-runners/images/github-owned` or `GET + /actions/hosted-runners/images/partner`. + type: object + properties: + id: + description: The unique identifier of the runner image. + type: string + source: + description: The source of the runner image. + type: string + enum: + - github + - partner + - custom + version: + description: The version of the runner image to deploy. This + is relevant only for runners using custom images. + type: + - string + - 'null' + size: + description: The machine size of the runner. To list available sizes, + use `GET actions/hosted-runners/machine-sizes` + type: string + runner_group_id: + description: The existing runner group to add this runner to. + type: integer + maximum_runners: + description: The maximum amount of runners to scale up to. Runners + will not auto-scale above this number. Use this setting to limit + your cost. + type: integer + enable_static_ip: + description: Whether this runner should be created with a static + public IP. Note limit on account. To list limits on account, use + `GET actions/hosted-runners/limits` + type: boolean + required: + - name + - image + - size + - runner_group_id + examples: + default: + value: + name: My Hosted runner + image: + id: ubuntu-latest + source: github + version: latest + runner_group_id: 1 + size: 4-core + maximum_runners: 50 + enable_static_ip: false + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-hosted-runner" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner" + x-github: + enabledForGitHubApps: true + githubCloudOnly: false + category: actions + subcategory: hosted-runners + "/orgs/{org}/actions/hosted-runners/images/github-owned": + get: + summary: Get GitHub-owned images for GitHub-hosted runners in an organization + description: Get the list of GitHub-owned images available for GitHub-hosted + runners for an organization. + operationId: actions/get-hosted-runners-github-owned-images-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#get-github-owned-images-for-github-hosted-runners-in-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - images + properties: + total_count: + type: integer + images: + type: array + items: + "$ref": "#/components/schemas/actions-hosted-runner-image" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner-image" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: hosted-runners + "/orgs/{org}/actions/hosted-runners/images/partner": + get: + summary: Get partner images for GitHub-hosted runners in an organization + description: Get the list of partner images available for GitHub-hosted runners + for an organization. + operationId: actions/get-hosted-runners-partner-images-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#get-partner-images-for-github-hosted-runners-in-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - images + properties: + total_count: + type: integer + images: + type: array + items: + "$ref": "#/components/schemas/actions-hosted-runner-image" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner-image" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: hosted-runners + "/orgs/{org}/actions/hosted-runners/limits": + get: + summary: Get limits on GitHub-hosted runners for an organization + description: Get the GitHub-hosted runners limits for an organization. + operationId: actions/get-hosted-runners-limits-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#get-limits-on-github-hosted-runners-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-hosted-runner-limits" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner-limits-default" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: hosted-runners + "/orgs/{org}/actions/hosted-runners/machine-sizes": + get: + summary: Get GitHub-hosted runners machine specs for an organization + description: Get the list of machine specs available for GitHub-hosted runners + for an organization. + operationId: actions/get-hosted-runners-machine-specs-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#get-github-hosted-runners-machine-specs-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - machine_specs + properties: + total_count: + type: integer + machine_specs: + type: array + items: + "$ref": "#/components/schemas/actions-hosted-runner-machine-spec" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner-machine-spec" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: hosted-runners + "/orgs/{org}/actions/hosted-runners/platforms": + get: + summary: Get platforms for GitHub-hosted runners in an organization + description: Get the list of platforms available for GitHub-hosted runners for + an organization. + operationId: actions/get-hosted-runners-platforms-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#get-platforms-for-github-hosted-runners-in-an-organization + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - platforms + properties: + total_count: + type: integer + platforms: + type: array + items: + type: string + examples: + default: + value: + total_count: 1 + platforms: + - linux-x64 + - win-x64 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: hosted-runners + "/orgs/{org}/actions/hosted-runners/{hosted_runner_id}": + get: + summary: Get a GitHub-hosted runner for an organization + description: |- + Gets a GitHub-hosted runner configured in an organization. + + OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + tags: + - actions + operationId: actions/get-hosted-runner-for-org + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#get-a-github-hosted-runner-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/hosted-runner-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-hosted-runner" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner" + headers: + Link: + "$ref": "#/components/headers/link" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: hosted-runners + patch: + summary: Update a GitHub-hosted runner for an organization + description: |- + Updates a GitHub-hosted runner for an organization. + OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint. + operationId: actions/update-hosted-runner-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#update-a-github-hosted-runner-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/hosted-runner-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + description: Name of the runner. Must be between 1 and 64 characters + and may only contain upper and lowercase letters a-z, numbers + 0-9, '.', '-', and '_'. + type: string + runner_group_id: + description: The existing runner group to add this runner to. + type: integer + maximum_runners: + description: The maximum amount of runners to scale up to. Runners + will not auto-scale above this number. Use this setting to limit + your cost. + type: integer + enable_static_ip: + description: Whether this runner should be updated with a static + public IP. Note limit on account. To list limits on account, use + `GET actions/hosted-runners/limits` + type: boolean + image_version: + description: The version of the runner image to deploy. This is + relevant only for runners using custom images. + type: + - string + - 'null' + examples: + default: + value: + name: My larger runner + runner_group_id: 1 + maximum_runners: 50 + enable_static_ip: false + image_version: 1.0.0 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-hosted-runner" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner" + x-github: + enabledForGitHubApps: true + githubCloudOnly: false + category: actions + subcategory: hosted-runners + delete: + summary: Delete a GitHub-hosted runner for an organization + description: Deletes a GitHub-hosted runner for an organization. + operationId: actions/delete-hosted-runner-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/hosted-runners#delete-a-github-hosted-runner-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/hosted-runner-id" + responses: + '202': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-hosted-runner" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: actions + subcategory: hosted-runners "/orgs/{org}/actions/oidc/customization/sub": get: summary: Get the customization template for an OIDC subject claim for an organization @@ -5289,6 +5742,9 @@ paths: to run. Note that a ref, tag, or long SHA is required. examples: - octo-org/octo-repo/.github/workflows/deploy.yaml@main + network_configuration_id: + description: The identifier of a hosted compute network configuration. + type: string required: - name examples: @@ -5401,6 +5857,11 @@ paths: to run. Note that a ref, tag, or long SHA is required. examples: - octo-org/octo-repo/.github/workflows/deploy.yaml@main + network_configuration_id: + description: The identifier of a hosted compute network configuration. + type: + - string + - 'null' required: - name examples: @@ -5446,6 +5907,52 @@ paths: githubCloudOnly: false category: actions subcategory: self-hosted-runner-groups + "/orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners": + get: + summary: List GitHub-hosted runners in a group for an organization + description: |- + Lists the GitHub-hosted runners in an organization group. + + OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + operationId: actions/list-github-hosted-runners-in-group-for-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/self-hosted-runner-groups#list-github-hosted-runners-in-a-group-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - runners + properties: + total_count: + type: number + runners: + type: array + items: + "$ref": "#/components/schemas/actions-hosted-runner" + examples: + default: + "$ref": "#/components/examples/actions-hosted-runner-paginated" + headers: + Link: + "$ref": "#/components/headers/link" + x-github: + enabledForGitHubApps: true + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": get: summary: List repository access to a self-hosted runner group in an organization @@ -67413,6 +67920,72 @@ components: type: array items: type: string + enterprise: + title: Enterprise + description: An enterprise on GitHub. + type: object + properties: + description: + description: A short description of the enterprise. + type: + - string + - 'null' + html_url: + type: string + format: uri + examples: + - https://github.com/enterprises/octo-business + website_url: + description: The enterprise's website URL. + type: + - string + - 'null' + format: uri + id: + description: Unique identifier of the enterprise + type: integer + examples: + - 42 + node_id: + type: string + examples: + - MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: + description: The name of the enterprise. + type: string + examples: + - Octo Business + slug: + description: The slug url identifier for the enterprise. + type: string + examples: + - octo-business + created_at: + type: + - string + - 'null' + format: date-time + examples: + - '2019-01-26T19:01:12Z' + updated_at: + type: + - string + - 'null' + format: date-time + examples: + - '2019-01-26T19:14:43Z' + avatar_url: + type: string + format: uri + required: + - id + - node_id + - name + - slug + - html_url + - created_at + - updated_at + - avatar_url integration: title: GitHub app description: GitHub apps are a new way to extend GitHub. They can be installed @@ -67442,9 +68015,9 @@ components: examples: - '"Iv1.25b5d1e65ffc4022"' owner: - anyOf: - - type: 'null' + oneOf: - "$ref": "#/components/schemas/simple-user" + - "$ref": "#/components/schemas/enterprise" name: description: The name of the GitHub app type: string @@ -67867,72 +68440,6 @@ components: - repository_id - request - response - enterprise: - title: Enterprise - description: An enterprise on GitHub. - type: object - properties: - description: - description: A short description of the enterprise. - type: - - string - - 'null' - html_url: - type: string - format: uri - examples: - - https://github.com/enterprises/octo-business - website_url: - description: The enterprise's website URL. - type: - - string - - 'null' - format: uri - id: - description: Unique identifier of the enterprise - type: integer - examples: - - 42 - node_id: - type: string - examples: - - MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: - description: The name of the enterprise. - type: string - examples: - - Octo Business - slug: - description: The slug url identifier for the enterprise. - type: string - examples: - - octo-business - created_at: - type: - - string - - 'null' - format: date-time - examples: - - '2019-01-26T19:01:12Z' - updated_at: - type: - - string - - 'null' - format: date-time - examples: - - '2019-01-26T19:14:43Z' - avatar_url: - type: string - format: uri - required: - - id - - node_id - - name - - slug - - html_url - - created_at - - updated_at - - avatar_url integration-installation-request: title: Integration Installation Request description: Request to install an integration on a target @@ -73557,6 +74064,237 @@ components: - full_name - active_caches_size_in_bytes - active_caches_count + actions-hosted-runner-pool-image: + title: GitHub-hosted runner image details. + description: Provides details of a hosted runner image + type: object + properties: + id: + description: The ID of the image. Use this ID for the `image` parameter + when creating a new larger runner. + type: string + examples: + - ubuntu-20.04 + size_gb: + description: Image size in GB. + type: integer + examples: + - 86 + display_name: + description: Display name for this image. + type: string + examples: + - 20.04 + source: + description: The image provider. + type: string + enum: + - github + - partner + - custom + version: + description: The image version of the hosted runner pool. + type: string + examples: + - latest + required: + - id + - size_gb + - display_name + - source + - version + actions-hosted-runner-machine-spec: + title: Github-owned VM details. + description: Provides details of a particular machine spec. + type: object + properties: + id: + description: The ID used for the `size` parameter when creating a new runner. + type: string + examples: + - 8-core + cpu_cores: + description: The number of cores. + type: integer + examples: + - 8 + memory_gb: + description: The available RAM for the machine spec. + type: integer + examples: + - 32 + storage_gb: + description: The available SSD storage for the machine spec. + type: integer + examples: + - 300 + required: + - id + - cpu_cores + - memory_gb + - storage_gb + public-ip: + title: Public IP for a GitHub-hosted larger runners. + description: Provides details of Public IP for a GitHub-hosted larger runners + type: object + properties: + enabled: + description: Whether public IP is enabled. + type: boolean + examples: + - true + prefix: + description: The prefix for the public IP. + type: string + examples: + - 20.80.208.150 + length: + description: The length of the IP prefix. + type: integer + examples: + - 28 + actions-hosted-runner: + title: GitHub-hosted hosted runner + description: A Github-hosted hosted runner. + type: object + properties: + id: + description: The unique identifier of the hosted runner. + type: integer + examples: + - 5 + name: + description: The name of the hosted runner. + type: string + examples: + - my-github-hosted-runner + runner_group_id: + description: The unique identifier of the group that the hosted runner belongs + to. + type: integer + examples: + - 2 + image_details: + anyOf: + - type: 'null' + - "$ref": "#/components/schemas/actions-hosted-runner-pool-image" + machine_size_details: + "$ref": "#/components/schemas/actions-hosted-runner-machine-spec" + status: + description: The status of the runner. + type: string + enum: + - Ready + - Provisioning + - Shutdown + - Deleting + - Stuck + examples: + - Ready + platform: + description: The operating system of the image. + type: string + examples: + - linux-x64 + maximum_runners: + description: The maximum amount of hosted runners. Runners will not scale + automatically above this number. Use this setting to limit your cost. + type: integer + default: 10 + examples: + - 5 + public_ip_enabled: + description: Whether public IP is enabled for the hosted runners. + type: boolean + examples: + - true + public_ips: + description: The public IP ranges when public IP is enabled for the hosted + runners. + type: array + items: + "$ref": "#/components/schemas/public-ip" + last_active_on: + description: The time at which the runner was last used, in ISO 8601 format. + type: + - string + - 'null' + format: date-time + examples: + - '2022-10-09T23:39:01Z' + required: + - id + - name + - image_details + - machine_size_details + - status + - public_ip_enabled + - platform + actions-hosted-runner-image: + title: GitHub-hosted runner image details. + description: Provides details of a hosted runner image + type: object + properties: + id: + description: The ID of the image. Use this ID for the `image` parameter + when creating a new larger runner. + type: string + examples: + - ubuntu-20.04 + platform: + description: The operating system of the image. + type: string + examples: + - linux-x64 + size_gb: + description: Image size in GB. + type: integer + examples: + - 86 + display_name: + description: Display name for this image. + type: string + examples: + - 20.04 + source: + description: The image provider. + type: string + enum: + - github + - partner + - custom + required: + - id + - platform + - size_gb + - display_name + - source + actions-hosted-runner-limits: + type: object + properties: + public_ips: + title: Static public IP Limits for GitHub-hosted Hosted Runners. + description: Provides details of static public IP limits for GitHub-hosted + Hosted Runners + type: object + properties: + maximum: + type: integer + description: The maximum number of static public IP addresses that can + be used for Hosted Runners. + examples: + - 50 + current_usage: + type: integer + description: The current number of static public IP addresses in use + by Hosted Runners. + examples: + - 17 + required: + - maximum + - current_usage + required: + - public_ips oidc-custom-sub: title: Actions OIDC Subject customization description: Actions OIDC Subject customization @@ -73680,6 +74418,9 @@ components: type: string hosted_runners_url: type: string + network_configuration_id: + description: The identifier of a hosted compute network configuration. + type: string inherited: type: boolean inherited_allows_public_repositories: @@ -205733,6 +206474,87 @@ components: - full_name: octo-org/server active_caches_size_in_bytes: 1022142 active_caches_count: 2 + actions-hosted-runner-paginated: + value: + total_count: 2 + runners: + - id: 5 + name: My hosted ubuntu runner + runner_group_id: 2 + platform: linux-x64 + image: + id: ubuntu-20.04 + size: 86 + machine_size_details: + id: 4-core + cpu_cores: 4 + memory_gb: 16 + storage_gb: 150 + status: Ready + maximum_runners: 10 + public_ip_enabled: true + public_ips: + - enabled: true + prefix: 20.80.208.150 + length: 31 + last_active_on: '2022-10-09T23:39:01Z' + - id: 7 + name: My hosted Windows runner + runner_group_id: 2 + platform: win-x64 + image: + id: windows-latest + size: 256 + machine_size_details: + id: 8-core + cpu_cores: 8 + memory_gb: 32 + storage_gb: 300 + status: Ready + maximum_runners: 20 + public_ip_enabled: false + public_ips: [] + last_active_on: '2023-04-26T15:23:37Z' + actions-hosted-runner: + value: + id: 5 + name: My hosted ubuntu runner + runner_group_id: 2 + platform: linux-x64 + image: + id: ubuntu-20.04 + size: 86 + machine_size_details: + id: 4-core + cpu_cores: 4 + memory_gb: 16 + storage_gb: 150 + status: Ready + maximum_runners: 10 + public_ip_enabled: true + public_ips: + - enabled: true + prefix: 20.80.208.150 + length: 31 + last_active_on: '2022-10-09T23:39:01Z' + actions-hosted-runner-image: + value: + id: ubuntu-20.04 + platform: linux-x64 + size_gb: 86 + display_name: '20.04' + source: github + actions-hosted-runner-limits-default: + value: + public_ips: + current_usage: 17 + maximum: 50 + actions-hosted-runner-machine-spec: + value: + id: 4-core + cpu_cores: 4 + memory_gb: 16 + storage_gb: 150 oidc-custom-sub: value: include_claim_keys: @@ -228192,6 +229014,13 @@ components: required: false schema: type: integer + hosted-runner-id: + name: hosted_runner_id + description: Unique identifier of the GitHub-hosted runner. + in: path + required: true + schema: + type: integer repository-id: name: repository_id description: The unique identifier of the repository.