From f7a126844edcdb47cc20528a198a8eba926f3780 Mon Sep 17 00:00:00 2001 From: WyriHaximus <147145+WyriHaximus@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:04:53 +0000 Subject: [PATCH] [GitHub] Update to 1.1.4-a937c40b238be216f274ad4de79f6216 from 1.1.4-5f0efa5b768ca4017b3104dc35554b9b Detected Schema changes: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` ├──[➖] webhooks (63135:5)❌ ├──[➖] webhooks (63069:5)❌ ├──[➖] webhooks (63201:5)❌ ├──[➖] webhooks (63003:5)❌ ├─┬Paths │ └─┬/advisories │ └─┬GET │ ├──[➖] parameters (234:15)❌ │ ├──[➖] parameters (241:15)❌ │ └─┬Responses │ └─┬200 │ └─┬application/json │ └─┬default │ └──[🔀] value (196188:7) └─┬Components ├──[➖] schemas (190204:7)❌ ├──[➖] schemas (190134:7)❌ ├──[➖] schemas (190099:7)❌ ├──[➖] schemas (190169:7)❌ ├─┬api-overview │ └─┬domains │ └──[➖] properties (70016:13)❌ └─┬global-advisory └──[➖] properties (64758:9)❌ ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | paths | 3 | 2 | | components | 6 | 6 | Date: 08/27/24 | Commit: New: etc/specs/GitHub/previous.spec.yaml, Original: etc/specs/GitHub/current.spec.yaml - ❌ **BREAKING Changes**: _8_ out of _9_ - **Modifications**: _1_ - **Removals**: _12_ - **Breaking Removals**: _12_ ERROR: breaking changes discovered --- clients/GitHub/README.md | 4 + .../GitHub/etc/openapi-client-generator.state | 104 +- .../Hydrator/Operation/Advisories/GhsaId.php | 97 + .../src/Internal/Hydrator/Operation/Meta.php | 104 + .../Internal/Hydrator/WebHook/SubIssues.php | 9689 +++++++++++++++++ clients/GitHub/src/Internal/Hydrators.php | 20 +- .../ListGlobalAdvisories.php | 44 +- .../src/Internal/Operator/Git/CreateBlob.php | 1 + .../Repos/CreateOrUpdateFileContents.php | 1 + .../ListAlertsForEnterprise.php | 2 +- .../SecretScanning/ListAlertsForOrg.php | 2 +- .../ListAlertsForOrgListing.php | 2 +- .../SecretScanning/ListAlertsForRepo.php | 2 +- .../ListAlertsForRepoListing.php | 2 +- .../ListGlobalAdvisories.php | 6 +- .../GitHub/src/Internal/Router/Get/Five.php | 2 +- .../Internal/Router/Get/SecretScanning.php | 6 +- .../Router/Get/SecurityAdvisories.php | 16 +- .../GitHub/src/Internal/Router/Get/Six.php | 2 +- .../GitHub/src/Internal/Router/Get/Two.php | 2 +- .../GitHub/src/Internal/Router/List/Five.php | 2 +- .../Internal/Router/List/SecretScanning.php | 4 +- .../GitHub/src/Internal/Router/List/Six.php | 2 +- .../GitHub/src/Internal/Router/Post/Git.php | 1 + .../GitHub/src/Internal/Router/Post/Six.php | 1 - .../GitHub/src/Internal/Router/Put/Repos.php | 1 + .../GitHub/src/Internal/Router/Put/Six.php | 1 - .../GitHub/src/Internal/WebHook/SubIssues.php | 99 + clients/GitHub/src/Operation/Git.php | 1 + clients/GitHub/src/Operation/Repos.php | 1 + .../GitHub/src/Operation/SecretScanning.php | 10 +- .../src/Operation/SecurityAdvisories.php | 6 +- .../src/PHPStan/ClientCallReturnTypes.php | 16 +- clients/GitHub/src/Schema/ApiOverview.php | 29 +- .../GitHub/src/Schema/ApiOverview/Domains.php | 35 +- .../Domains/ArtifactAttestations.php | 45 + clients/GitHub/src/Schema/GlobalAdvisory.php | 20 +- .../GitHub/src/Schema/GlobalAdvisory/Epss.php | 33 + .../WebhookSubIssuesParentIssueAdded.php | 9046 +++++++++++++++ .../WebhookSubIssuesParentIssueRemoved.php | 9046 +++++++++++++++ .../Schema/WebhookSubIssuesSubIssueAdded.php | 9046 +++++++++++++++ .../WebhookSubIssuesSubIssueRemoved.php | 9046 +++++++++++++++ clients/GitHub/src/WebHooks.php | 38 +- .../ListGlobalAdvisoriesTest.php | 80 +- .../tests/Types/ClientCallReturnTypes.php | 16 +- etc/specs/GitHub/current.spec.yaml | 443 + 46 files changed, 47017 insertions(+), 159 deletions(-) create mode 100644 clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php create mode 100644 clients/GitHub/src/Internal/WebHook/SubIssues.php create mode 100644 clients/GitHub/src/Schema/ApiOverview/Domains/ArtifactAttestations.php create mode 100644 clients/GitHub/src/Schema/GlobalAdvisory/Epss.php create mode 100644 clients/GitHub/src/Schema/WebhookSubIssuesParentIssueAdded.php create mode 100644 clients/GitHub/src/Schema/WebhookSubIssuesParentIssueRemoved.php create mode 100644 clients/GitHub/src/Schema/WebhookSubIssuesSubIssueAdded.php create mode 100644 clients/GitHub/src/Schema/WebhookSubIssuesSubIssueRemoved.php diff --git a/clients/GitHub/README.md b/clients/GitHub/README.md index 738ca3960b6..b511de2b243 100644 --- a/clients/GitHub/README.md +++ b/clients/GitHub/README.md @@ -70,6 +70,8 @@ $client->call('GET /advisories', [ 'published' => 'generated', 'updated' => 'generated', 'modified' => 'generated', + 'epss_percentage' => 'generated', + 'epss_percentile' => 'generated', 'before' => 'generated', 'after' => 'generated', 'type' => 'generated', @@ -91,6 +93,8 @@ $client->operations()->securityAdvisories()->listGlobalAdvisories( ghsa_i published: 'generated', updated: 'generated', modified: 'generated', + epss_percentage: 'generated', + epss_percentile: 'generated', before: 'generated', after: 'generated', type: 'generated', diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index 2527c4c4582..fc65cd38967 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "5f0efa5b768ca4017b3104dc35554b9b", + "specHash": "a937c40b238be216f274ad4de79f6216", "generatedFiles": { "files": [ { @@ -256,7 +256,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ApiOverview.php", - "hash": "5f7b17c0f0bb6b1d3af818db9f1faabb" + "hash": "7ad5d2dd671b62f325c28959a796495f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecurityAndAnalysis.php", @@ -5548,7 +5548,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "c5b126fa75c6fd827ef6e3c321ba2ea9" + "hash": "e611c024166589048031495933a8698f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Activity.php", @@ -5612,7 +5612,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "556e747b2e48a196956b904c11a56b80" + "hash": "4d3790eabc151160cd5dede3363231ae" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", @@ -5640,7 +5640,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Git.php", - "hash": "e80b9c6bea247bdb7e6dad7f05f4ea7f" + "hash": "dc01fd7566d7ce87c7c04128bdf0abf2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Pulls.php", @@ -5648,7 +5648,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/SecurityAdvisories.php", - "hash": "59bf7b111313aad9d0a4cb337715ea3d" + "hash": "2aa5aeec88bf8febfdc6534579bd98cc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Search.php", @@ -5664,7 +5664,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/WebHooks.php", - "hash": "eeb63730af8bb991fcd1fb695b40cb76" + "hash": "d8216eca1a69ae1838b882aabce33d85" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php", @@ -11624,7 +11624,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains.php", - "hash": "b47f1e7951f382b582381640810ec119" + "hash": "500e3d6534a046fb369b494a6ac5b316" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecurityAndAnalysis\/DependabotSecurityUpdates.php", @@ -11732,7 +11732,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory.php", - "hash": "095fe7a5c99ad29857cca805cb3506b5" + "hash": "04d18bbfd15a3cf0b0c174d083ff477c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanningAlertResolutionWebhook.php", @@ -12120,15 +12120,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecurityAdvisories\/ListGlobalAdvisories.php", - "hash": "19e0877149993eac6357bd2483b63e74" + "hash": "19d203021bb39cb9bb24d840a865e70f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecurityAdvisories\/ListGlobalAdvisories.php", - "hash": "00dd1a8d9c78a89765af2079474e7ce4" + "hash": "22ecc864eef12dfd0665e266cb5082df" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecurityAdvisories\/ListGlobalAdvisoriesTest.php", - "hash": "5c7358c8fad5697ceb8a4f872a340d2d" + "hash": "202d38fae654a7c7b91f967a40c1fded" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecurityAdvisories\/GetGlobalAdvisory.php", @@ -12460,7 +12460,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "6c57ef2029d83337c814f6ff745d0d9c" + "hash": "9105c25f9ba292818bfa3de63fa079be" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterpriseTest.php", @@ -15200,7 +15200,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrg.php", - "hash": "adc9cecb27f8fabde127c0eec632e5f4" + "hash": "c01fc3f85172072b147f962f857723d1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgTest.php", @@ -15212,7 +15212,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "1c5b182266a0af9eeabb080300e9836c" + "hash": "d0a0df95736f20737fb05220b9b860c8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListingTest.php", @@ -18328,7 +18328,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/CreateOrUpdateFileContents.php", - "hash": "0814a841af8dd6b10d23f2beb4274488" + "hash": "61624d404d63e8d5c8f0c2c51bc0d63d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/CreateOrUpdateFileContentsTest.php", @@ -18852,7 +18852,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Git\/CreateBlob.php", - "hash": "3e0d09ecc20ca4ea08b2b5ede5e3fbdf" + "hash": "bd83653d020a189726eae58ad7d55919" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Git\/CreateBlobTest.php", @@ -21096,7 +21096,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepo.php", - "hash": "fd17093ea510a22d05a762adadc098cb" + "hash": "46f6f7bfa72b537cb8665b611bc97b11" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoTest.php", @@ -21108,7 +21108,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "dd523327297dfb5eb0bf5481fe010832" + "hash": "82dbcda80b3b5785ef6938d0f0df7826" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListingTest.php", @@ -24428,7 +24428,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecurityAdvisories.php", - "hash": "eb2dbdcf14b93a66ee3671d0a09e72d7" + "hash": "b835dbebbc02db726cee0166e6e4b2b5" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Apps.php", @@ -24512,7 +24512,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecretScanning.php", - "hash": "90e9a02cc3320fe21b5b21012f960ecf" + "hash": "155f09d600a39493f25eb5a13dd703d4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Actions.php", @@ -24604,7 +24604,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Git.php", - "hash": "0feab2bb13a9f54d39644468f749ac28" + "hash": "7feb9f49cf89189d52cfd3df806e1743" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/SecurityAdvisories.php", @@ -24768,7 +24768,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/SecretScanning.php", - "hash": "05f1ea05cd04cd150d618b60a827ff8d" + "hash": "4bd1cc44b63e584a86b666fa80e75bfb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Pulls.php", @@ -24888,7 +24888,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Repos.php", - "hash": "9a373e77153801abdeb4909d71090430" + "hash": "5c39922ce0c018e5911a1eecc75af410" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Projects.php", @@ -24948,7 +24948,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php", - "hash": "3eeaba9defd38317f28edc94eec69799" + "hash": "589274e4f834a3a056adcad981a7ab4a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Three.php", @@ -24960,11 +24960,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "2ac3f88515bc534915d0915c7ad24d47" + "hash": "0846a936eb0a3e31a24ddb21a9bf9124" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "2240e217ce6475e840def09426d828e5" + "hash": "b2a28a4c2a159a5554c4694f89317cfd" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -24988,7 +24988,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Six.php", - "hash": "946798d0019357db47e90e7681ea7135" + "hash": "53e66debd3ada04b4530d02d634ee70c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Five.php", @@ -25064,11 +25064,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "36e3d3e022b5601fb9403d06851f8d22" + "hash": "847f3fb360c2b185cfe50d6fb2ad225b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "9ffe656e47091ffd81871e5416205325" + "hash": "308c392e37c1750ea31302f83f39951f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -25136,7 +25136,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Six.php", - "hash": "6a239d8dd8882592a87dc0058926c7b3" + "hash": "9f3dc75023548d3071b5b9a37ecfcf6b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Eight.php", @@ -25180,7 +25180,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Advisories\/GhsaId.php", - "hash": "cb2b7601eb3f3dbd3ee368c6cef24ea7" + "hash": "567be42e3069172d2aa43821913a98e6" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App.php", @@ -25344,7 +25344,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Meta.php", - "hash": "ec16765fb07a81e334a9669a7b3b4b2b" + "hash": "7b714fd2c0e6d0e01dadab4a498abfe8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Networks\/Owner\/Repo\/Events.php", @@ -27160,7 +27160,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "78c5da178f567251d89ad60e0154e2be" + "hash": "ea9661b72eedc9f741ad9bc671d2bd66" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27776,11 +27776,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "4cb9ccc618d70c3ab97c21b7d62b3701" + "hash": "2e22a66b2be765d7ac4ab913343d6f6d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "1ce8dec01d8db0008ecc0f8bfd605cf4" + "hash": "8a8d801112f2c02eb6abab83fef30757" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -30421,6 +30421,38 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Error\/Operations\/Git\/CreateBlob\/Response\/ApplicationJson\/UnprocessableEntity.php", "hash": "28e12fee1781d5b07d6ee2d4a8392a63" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesParentIssueAdded.php", + "hash": "5077613a4028982a9173bea3be0b57e8" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesParentIssueRemoved.php", + "hash": "d80721ab7131a91ab4c89e2f567e95eb" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesSubIssueAdded.php", + "hash": "84ecfc59742f47acc55ce885c8449947" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSubIssuesSubIssueRemoved.php", + "hash": "7ad0e26ede2e366ecba9a3977d352431" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Epss.php", + "hash": "3e2f91d87e3438caffb7a7947f6d0974" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains\/ArtifactAttestations.php", + "hash": "73d8a39eb0d9799839abdca6d96d248a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/WebHook\/SubIssues.php", + "hash": "af00583a490c6bfdc25d5998c06b857a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SubIssues.php", + "hash": "dc3202c1602121aa5d0d8e06aace1545" } ] }, diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Advisories/GhsaId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Advisories/GhsaId.php index 6dc0ff9c441..96b8934cc04 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Advisories/GhsaId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Advisories/GhsaId.php @@ -7,6 +7,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\GlobalAdvisory; use ApiClients\Client\GitHub\Schema\GlobalAdvisory\Cvss; +use ApiClients\Client\GitHub\Schema\GlobalAdvisory\Epss; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -44,6 +45,7 @@ public function hydrateObject(string $className, array $payload): object return match ($className) { 'ApiClients\Client\GitHub\Schema\GlobalAdvisory' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory($payload), 'ApiClients\Client\GitHub\Schema\GlobalAdvisory\Cvss' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Cvss($payload), + 'ApiClients\Client\GitHub\Schema\GlobalAdvisory\Epss' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Epss($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; @@ -283,6 +285,26 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Glob after_cwes: + $value = $payload['epss'] ?? null; + + if ($value === null) { + $properties['epss'] = null; + goto after_epss; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'epss'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Epss($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['epss'] = $value; + + after_epss: + $value = $payload['credits'] ?? null; if ($value === null) { @@ -349,6 +371,47 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Glob } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Epss(array $payload): Epss + { + $properties = []; + $missingFields = []; + try { + $value = $payload['percentage'] ?? null; + + if ($value === null) { + $properties['percentage'] = null; + goto after_percentage; + } + + $properties['percentage'] = $value; + + after_percentage: + + $value = $payload['percentile'] ?? null; + + if ($value === null) { + $properties['percentile'] = null; + goto after_percentile; + } + + $properties['percentile'] = $value; + + after_percentile: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\GlobalAdvisory\Epss', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Epss::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Epss(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\GlobalAdvisory\Epss', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError { $properties = []; @@ -445,6 +508,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\GlobalAdvisory' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory($object), 'ApiClients\Client\GitHub\Schema\GlobalAdvisory\Cvss' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Cvss($object), + 'ApiClients\Client\GitHub\Schema\GlobalAdvisory\Epss' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Epss($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException("No serialization defined for $className"), }; @@ -662,6 +726,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $cwes = $cwesSerializer0->serialize($cwes, $this); after_cwes: $result['cwes'] = $cwes; + $epss = $object->epss; + + if ($epss === null) { + goto after_epss; + } + + $epss = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Epss($epss); + after_epss: $result['epss'] = $epss; + $credits = $object->credits; if ($credits === null) { @@ -704,6 +777,30 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️GlobalAdvisory⚡️Epss(mixed $object): mixed + { + assert($object instanceof Epss); + $result = []; + + $percentage = $object->percentage; + + if ($percentage === null) { + goto after_percentage; + } + + after_percentage: $result['percentage'] = $percentage; + + $percentile = $object->percentile; + + if ($percentile === null) { + goto after_percentile; + } + + after_percentile: $result['percentile'] = $percentile; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed { assert($object instanceof BasicError); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Meta.php b/clients/GitHub/src/Internal/Hydrator/Operation/Meta.php index aaed631294f..040830684a0 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Meta.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Meta.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Schema\ApiOverview; use ApiClients\Client\GitHub\Schema\ApiOverview\Domains; +use ApiClients\Client\GitHub\Schema\ApiOverview\Domains\ArtifactAttestations; use ApiClients\Client\GitHub\Schema\ApiOverview\SshKeyFingerprints; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; @@ -45,6 +46,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\ApiOverview' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview($payload), 'ApiClients\Client\GitHub\Schema\ApiOverview\SshKeyFingerprints' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️SshKeyFingerprints($payload), 'ApiClients\Client\GitHub\Schema\ApiOverview\Domains' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains($payload), + 'ApiClients\Client\GitHub\Schema\ApiOverview\Domains\ArtifactAttestations' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } @@ -384,6 +386,26 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiO $properties['actions'] = $value; after_actions: + + $value = $payload['artifact_attestations'] ?? null; + + if ($value === null) { + $properties['artifactAttestations'] = null; + goto after_artifactAttestations; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'artifactAttestations'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['artifactAttestations'] = $value; + + after_artifactAttestations: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ApiOverview\Domains', $exception, stack: $this->hydrationStack); } @@ -399,6 +421,47 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiO } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations(array $payload): ArtifactAttestations + { + $properties = []; + $missingFields = []; + try { + $value = $payload['trust_domain'] ?? null; + + if ($value === null) { + $properties['trustDomain'] = null; + goto after_trustDomain; + } + + $properties['trustDomain'] = $value; + + after_trustDomain: + + $value = $payload['services'] ?? null; + + if ($value === null) { + $properties['services'] = null; + goto after_services; + } + + $properties['services'] = $value; + + after_services: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ApiOverview\Domains\ArtifactAttestations', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ArtifactAttestations::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ArtifactAttestations(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ApiOverview\Domains\ArtifactAttestations', $exception, stack: $this->hydrationStack); + } + } + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { @@ -433,6 +496,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\ApiOverview' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview($object), 'ApiClients\Client\GitHub\Schema\ApiOverview\SshKeyFingerprints' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️SshKeyFingerprints($object), 'ApiClients\Client\GitHub\Schema\ApiOverview\Domains' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains($object), + 'ApiClients\Client\GitHub\Schema\ApiOverview\Domains\ArtifactAttestations' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations($object), default => throw new LogicException("No serialization defined for $className"), }; } catch (Throwable $exception) { @@ -839,6 +903,46 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $actions = $actionsSerializer0->serialize($actions, $this); after_actions: $result['actions'] = $actions; + $artifactAttestations = $object->artifactAttestations; + + if ($artifactAttestations === null) { + goto after_artifactAttestations; + } + + $artifactAttestations = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations($artifactAttestations); + after_artifactAttestations: $result['artifact_attestations'] = $artifactAttestations; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations(mixed $object): mixed + { + assert($object instanceof ArtifactAttestations); + $result = []; + + $trustDomain = $object->trustDomain; + + if ($trustDomain === null) { + goto after_trustDomain; + } + + after_trustDomain: $result['trust_domain'] = $trustDomain; + + $services = $object->services; + + if ($services === null) { + goto after_services; + } + + static $servicesSerializer0; + + if ($servicesSerializer0 === null) { + $servicesSerializer0 = new SerializeArrayItems(...[]); + } + + $services = $servicesSerializer0->serialize($services, $this); + after_services: $result['services'] = $services; + return $result; } diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php b/clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php new file mode 100644 index 00000000000..513f7b1f568 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/SubIssues.php @@ -0,0 +1,9689 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\WebhookSubIssuesParentIssueAdded' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesParentIssueAdded($payload), + 'ApiClients\Client\GitHub\Schema\Issue' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($payload), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), + 'ApiClients\Client\GitHub\Schema\Milestone' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($payload), + 'ApiClients\Client\GitHub\Schema\Issue\PullRequest' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue⚡️PullRequest($payload), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($payload), + 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($payload), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\Integration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($payload), + 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\ReactionRollup' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ReactionRollup($payload), + 'ApiClients\Client\GitHub\Schema\SimpleInstallation' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($payload), + '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\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), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\SimpleUserWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($payload), + 'ApiClients\Client\GitHub\Schema\WebhookSubIssuesParentIssueRemoved' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesParentIssueRemoved($payload), + 'ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueAdded' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueAdded($payload), + 'ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueRemoved' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueRemoved($payload), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesParentIssueAdded(array $payload): WebhookSubIssuesParentIssueAdded + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['parent_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue_id'; + goto after_parentIssueId; + } + + $properties['parentIssueId'] = $value; + + after_parentIssueId: + + $value = $payload['parent_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue'; + goto after_parentIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'parentIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['parentIssue'] = $value; + + after_parentIssue: + + $value = $payload['parent_issue_repo'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue_repo'; + goto after_parentIssueRepo; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'parentIssueRepo'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['parentIssueRepo'] = $value; + + after_parentIssueRepo: + + $value = $payload['sub_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue_id'; + goto after_subIssueId; + } + + $properties['subIssueId'] = $value; + + after_subIssueId: + + $value = $payload['sub_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue'; + goto after_subIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'subIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['subIssue'] = $value; + + after_subIssue: + + $value = $payload['installation'] ?? null; + + if ($value === null) { + $properties['installation'] = null; + goto after_installation; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $properties['sender'] = null; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesParentIssueAdded', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookSubIssuesParentIssueAdded::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookSubIssuesParentIssueAdded(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesParentIssueAdded', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue(array $payload): Issue + { + $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['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['repository_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'repository_url'; + goto after_repositoryUrl; + } + + $properties['repositoryUrl'] = $value; + + after_repositoryUrl: + + $value = $payload['labels_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'labels_url'; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $value = $payload['comments_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'comments_url'; + goto after_commentsUrl; + } + + $properties['commentsUrl'] = $value; + + after_commentsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['number'] ?? null; + + if ($value === null) { + $missingFields[] = 'number'; + goto after_number; + } + + $properties['number'] = $value; + + after_number: + + $value = $payload['state'] ?? null; + + if ($value === null) { + $missingFields[] = 'state'; + goto after_state; + } + + $properties['state'] = $value; + + after_state: + + $value = $payload['state_reason'] ?? null; + + if ($value === null) { + $properties['stateReason'] = null; + goto after_stateReason; + } + + $properties['stateReason'] = $value; + + after_stateReason: + + $value = $payload['title'] ?? null; + + if ($value === null) { + $missingFields[] = 'title'; + goto after_title; + } + + $properties['title'] = $value; + + after_title: + + $value = $payload['body'] ?? null; + + if ($value === null) { + $properties['body'] = null; + goto after_body; + } + + $properties['body'] = $value; + + after_body: + + $value = $payload['user'] ?? null; + + if ($value === null) { + $properties['user'] = null; + goto after_user; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'user'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['user'] = $value; + + after_user: + + $value = $payload['labels'] ?? null; + + if ($value === null) { + $missingFields[] = 'labels'; + goto after_labels; + } + + $properties['labels'] = $value; + + after_labels: + + $value = $payload['assignee'] ?? null; + + if ($value === null) { + $properties['assignee'] = null; + goto after_assignee; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'assignee'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['assignee'] = $value; + + after_assignee: + + $value = $payload['assignees'] ?? null; + + if ($value === null) { + $properties['assignees'] = null; + goto after_assignees; + } + + $properties['assignees'] = $value; + + after_assignees: + + $value = $payload['milestone'] ?? null; + + if ($value === null) { + $properties['milestone'] = null; + goto after_milestone; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'milestone'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['milestone'] = $value; + + after_milestone: + + $value = $payload['locked'] ?? null; + + if ($value === null) { + $missingFields[] = 'locked'; + goto after_locked; + } + + $properties['locked'] = $value; + + after_locked: + + $value = $payload['active_lock_reason'] ?? null; + + if ($value === null) { + $properties['activeLockReason'] = null; + goto after_activeLockReason; + } + + $properties['activeLockReason'] = $value; + + after_activeLockReason: + + $value = $payload['comments'] ?? null; + + if ($value === null) { + $missingFields[] = 'comments'; + goto after_comments; + } + + $properties['comments'] = $value; + + after_comments: + + $value = $payload['pull_request'] ?? null; + + if ($value === null) { + $properties['pullRequest'] = null; + goto after_pullRequest; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'pullRequest'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue⚡️PullRequest($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['pullRequest'] = $value; + + after_pullRequest: + + $value = $payload['closed_at'] ?? null; + + if ($value === null) { + $properties['closedAt'] = null; + goto after_closedAt; + } + + $properties['closedAt'] = $value; + + after_closedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'created_at'; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'updated_at'; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['draft'] ?? null; + + if ($value === null) { + $properties['draft'] = null; + goto after_draft; + } + + $properties['draft'] = $value; + + after_draft: + + $value = $payload['closed_by'] ?? null; + + if ($value === null) { + $properties['closedBy'] = null; + goto after_closedBy; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'closedBy'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['closedBy'] = $value; + + after_closedBy: + + $value = $payload['body_html'] ?? null; + + if ($value === null) { + $properties['bodyHtml'] = null; + goto after_bodyHtml; + } + + $properties['bodyHtml'] = $value; + + after_bodyHtml: + + $value = $payload['body_text'] ?? null; + + if ($value === null) { + $properties['bodyText'] = null; + goto after_bodyText; + } + + $properties['bodyText'] = $value; + + after_bodyText: + + $value = $payload['timeline_url'] ?? null; + + if ($value === null) { + $properties['timelineUrl'] = null; + goto after_timelineUrl; + } + + $properties['timelineUrl'] = $value; + + after_timelineUrl: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['performed_via_github_app'] ?? null; + + if ($value === null) { + $properties['performedViaGithubApp'] = null; + goto after_performedViaGithubApp; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'performedViaGithubApp'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['performedViaGithubApp'] = $value; + + after_performedViaGithubApp: + + $value = $payload['author_association'] ?? null; + + if ($value === null) { + $missingFields[] = 'author_association'; + goto after_authorAssociation; + } + + $properties['authorAssociation'] = $value; + + after_authorAssociation: + + $value = $payload['reactions'] ?? null; + + if ($value === null) { + $properties['reactions'] = null; + goto after_reactions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'reactions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ReactionRollup($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['reactions'] = $value; + + after_reactions: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Issue', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Issue::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Issue(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Issue', $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['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: + } 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⚡️Milestone(array $payload): Milestone + { + $properties = []; + $missingFields = []; + try { + $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['labels_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'labels_url'; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $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['number'] ?? null; + + if ($value === null) { + $missingFields[] = 'number'; + goto after_number; + } + + $properties['number'] = $value; + + after_number: + + $value = $payload['state'] ?? null; + + if ($value === null) { + $missingFields[] = 'state'; + goto after_state; + } + + $properties['state'] = $value; + + after_state: + + $value = $payload['title'] ?? null; + + if ($value === null) { + $missingFields[] = 'title'; + goto after_title; + } + + $properties['title'] = $value; + + after_title: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['creator'] ?? null; + + if ($value === null) { + $properties['creator'] = null; + goto after_creator; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'creator'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['creator'] = $value; + + after_creator: + + $value = $payload['open_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues'; + goto after_openIssues; + } + + $properties['openIssues'] = $value; + + after_openIssues: + + $value = $payload['closed_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'closed_issues'; + goto after_closedIssues; + } + + $properties['closedIssues'] = $value; + + after_closedIssues: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'created_at'; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'updated_at'; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['closed_at'] ?? null; + + if ($value === null) { + $properties['closedAt'] = null; + goto after_closedAt; + } + + $properties['closedAt'] = $value; + + after_closedAt: + + $value = $payload['due_on'] ?? null; + + if ($value === null) { + $properties['dueOn'] = null; + goto after_dueOn; + } + + $properties['dueOn'] = $value; + + after_dueOn: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Milestone', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Milestone::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Milestone(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Milestone', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue⚡️PullRequest(array $payload): PullRequest + { + $properties = []; + $missingFields = []; + try { + $value = $payload['merged_at'] ?? null; + + if ($value === null) { + $properties['mergedAt'] = null; + goto after_mergedAt; + } + + $properties['mergedAt'] = $value; + + after_mergedAt: + + $value = $payload['diff_url'] ?? null; + + if ($value === null) { + $properties['diffUrl'] = null; + goto after_diffUrl; + } + + $properties['diffUrl'] = $value; + + after_diffUrl: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['patch_url'] ?? null; + + if ($value === null) { + $properties['patchUrl'] = null; + goto after_patchUrl; + } + + $properties['patchUrl'] = $value; + + after_patchUrl: + + $value = $payload['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\Issue\PullRequest', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(PullRequest::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new PullRequest(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Issue\PullRequest', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(array $payload): Repository + { + $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['license'] ?? null; + + if ($value === null) { + $properties['license'] = null; + goto after_license; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['license'] = $value; + + after_license: + + $value = $payload['forks'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks'; + goto after_forks; + } + + $properties['forks'] = $value; + + after_forks: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $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; + } + + $properties['contentsUrl'] = $value; + + after_contentsUrl: + + $value = $payload['contributors_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'contributors_url'; + goto after_contributorsUrl; + } + + $properties['contributorsUrl'] = $value; + + after_contributorsUrl: + + $value = $payload['deployments_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'deployments_url'; + goto after_deploymentsUrl; + } + + $properties['deploymentsUrl'] = $value; + + after_deploymentsUrl: + + $value = $payload['downloads_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'downloads_url'; + goto after_downloadsUrl; + } + + $properties['downloadsUrl'] = $value; + + after_downloadsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['forks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_url'; + goto after_forksUrl; + } + + $properties['forksUrl'] = $value; + + after_forksUrl: + + $value = $payload['git_commits_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_commits_url'; + goto after_gitCommitsUrl; + } + + $properties['gitCommitsUrl'] = $value; + + after_gitCommitsUrl: + + $value = $payload['git_refs_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_refs_url'; + goto after_gitRefsUrl; + } + + $properties['gitRefsUrl'] = $value; + + after_gitRefsUrl: + + $value = $payload['git_tags_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_tags_url'; + goto after_gitTagsUrl; + } + + $properties['gitTagsUrl'] = $value; + + after_gitTagsUrl: + + $value = $payload['git_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_url'; + goto after_gitUrl; + } + + $properties['gitUrl'] = $value; + + after_gitUrl: + + $value = $payload['issue_comment_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_comment_url'; + goto after_issueCommentUrl; + } + + $properties['issueCommentUrl'] = $value; + + after_issueCommentUrl: + + $value = $payload['issue_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_events_url'; + goto after_issueEventsUrl; + } + + $properties['issueEventsUrl'] = $value; + + after_issueEventsUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issues_url'; + goto after_issuesUrl; + } + + $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_language: + + $value = $payload['forks_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_count'; + goto after_forksCount; + } + + $properties['forksCount'] = $value; + + after_forksCount: + + $value = $payload['stargazers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; + } + + $properties['stargazersCount'] = $value; + + after_stargazersCount: + + $value = $payload['watchers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers_count'; + goto after_watchersCount; + } + + $properties['watchersCount'] = $value; + + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $missingFields[] = 'size'; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $missingFields[] = 'default_branch'; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: + + $value = $payload['has_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_issues'; + goto after_hasIssues; + } + + $properties['hasIssues'] = $value; + + after_hasIssues: + + $value = $payload['has_projects'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_projects'; + goto after_hasProjects; + } + + $properties['hasProjects'] = $value; + + after_hasProjects: + + $value = $payload['has_wiki'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_wiki'; + goto after_hasWiki; + } + + $properties['hasWiki'] = $value; + + after_hasWiki: + + $value = $payload['has_pages'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_pages'; + goto after_hasPages; + } + + $properties['hasPages'] = $value; + + after_hasPages: + + $value = $payload['has_downloads'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; + } + + $properties['hasDownloads'] = $value; + + after_hasDownloads: + + $value = $payload['has_discussions'] ?? null; + + if ($value === null) { + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; + } + + $properties['hasDiscussions'] = $value; + + after_hasDiscussions: + + $value = $payload['archived'] ?? null; + + if ($value === null) { + $missingFields[] = 'archived'; + goto after_archived; + } + + $properties['archived'] = $value; + + after_archived: + + $value = $payload['disabled'] ?? null; + + if ($value === null) { + $missingFields[] = 'disabled'; + goto after_disabled; + } + + $properties['disabled'] = $value; + + after_disabled: + + $value = $payload['visibility'] ?? null; + + if ($value === null) { + $properties['visibility'] = null; + goto after_visibility; + } + + $properties['visibility'] = $value; + + after_visibility: + + $value = $payload['pushed_at'] ?? null; + + if ($value === null) { + $properties['pushedAt'] = null; + goto after_pushedAt; + } + + $properties['pushedAt'] = $value; + + after_pushedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['allow_rebase_merge'] ?? null; + + if ($value === null) { + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; + } + + $properties['allowRebaseMerge'] = $value; + + after_allowRebaseMerge: + + $value = $payload['temp_clone_token'] ?? null; + + if ($value === null) { + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; + } + + $properties['tempCloneToken'] = $value; + + after_tempCloneToken: + + $value = $payload['allow_squash_merge'] ?? null; + + if ($value === null) { + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; + } + + $properties['allowSquashMerge'] = $value; + + after_allowSquashMerge: + + $value = $payload['allow_auto_merge'] ?? null; + + if ($value === null) { + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; + } + + $properties['allowAutoMerge'] = $value; + + after_allowAutoMerge: + + $value = $payload['delete_branch_on_merge'] ?? null; + + if ($value === null) { + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; + } + + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; + } + + $properties['allowUpdateBranch'] = $value; + + after_allowUpdateBranch: + + $value = $payload['use_squash_pr_title_as_default'] ?? null; + + if ($value === null) { + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; + } + + $properties['useSquashPrTitleAsDefault'] = $value; + + after_useSquashPrTitleAsDefault: + + $value = $payload['squash_merge_commit_title'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; + } + + $properties['squashMergeCommitTitle'] = $value; + + after_squashMergeCommitTitle: + + $value = $payload['squash_merge_commit_message'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; + } + + $properties['squashMergeCommitMessage'] = $value; + + after_squashMergeCommitMessage: + + $value = $payload['merge_commit_title'] ?? null; + + if ($value === null) { + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; + } + + $properties['mergeCommitTitle'] = $value; + + after_mergeCommitTitle: + + $value = $payload['merge_commit_message'] ?? null; + + if ($value === null) { + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; + } + + $properties['mergeCommitMessage'] = $value; + + after_mergeCommitMessage: + + $value = $payload['allow_merge_commit'] ?? null; + + if ($value === null) { + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; + } + + $properties['allowMergeCommit'] = $value; + + after_allowMergeCommit: + + $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['open_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues'; + goto after_openIssues; + } + + $properties['openIssues'] = $value; + + after_openIssues: + + $value = $payload['watchers'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers'; + goto after_watchers; + } + + $properties['watchers'] = $value; + + after_watchers: + + $value = $payload['master_branch'] ?? null; + + if ($value === null) { + $properties['masterBranch'] = null; + goto after_masterBranch; + } + + $properties['masterBranch'] = $value; + + after_masterBranch: + + $value = $payload['starred_at'] ?? null; + + if ($value === null) { + $properties['starredAt'] = null; + goto after_starredAt; + } + + $properties['starredAt'] = $value; + + after_starredAt: + + $value = $payload['anonymous_access_enabled'] ?? null; + + if ($value === null) { + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; + } + + $properties['anonymousAccessEnabled'] = $value; + + after_anonymousAccessEnabled: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Repository::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Repository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple + { + $properties = []; + $missingFields = []; + try { + $value = $payload['key'] ?? null; + + if ($value === null) { + $missingFields[] = 'key'; + goto after_key; + } + + $properties['key'] = $value; + + after_key: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['spdx_id'] ?? null; + + if ($value === null) { + $properties['spdxId'] = null; + goto after_spdxId; + } + + $properties['spdxId'] = $value; + + after_spdxId: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + + 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⚡️Repository⚡️Permissions(array $payload): Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; + + if ($value === null) { + $missingFields[] = 'admin'; + goto after_admin; + } + + $properties['admin'] = $value; + + after_admin: + + $value = $payload['pull'] ?? null; + + if ($value === null) { + $missingFields[] = 'pull'; + goto after_pull; + } + + $properties['pull'] = $value; + + after_pull: + + $value = $payload['triage'] ?? null; + + if ($value === null) { + $properties['triage'] = null; + goto after_triage; + } + + $properties['triage'] = $value; + + after_triage: + + $value = $payload['push'] ?? null; + + if ($value === null) { + $missingFields[] = 'push'; + goto after_push; + } + + $properties['push'] = $value; + + after_push: + + $value = $payload['maintain'] ?? null; + + if ($value === null) { + $properties['maintain'] = null; + goto after_maintain; + } + + $properties['maintain'] = $value; + + after_maintain: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository\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\Repository\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration(array $payload): Integration + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['slug'] ?? null; + + if ($value === null) { + $properties['slug'] = null; + goto after_slug; + } + + $properties['slug'] = $value; + + after_slug: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['client_id'] ?? null; + + if ($value === null) { + $properties['clientId'] = null; + goto after_clientId; + } + + $properties['clientId'] = $value; + + after_clientId: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $properties['owner'] = null; + 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['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['external_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'external_url'; + goto after_externalUrl; + } + + $properties['externalUrl'] = $value; + + after_externalUrl: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'created_at'; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'updated_at'; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $missingFields[] = 'permissions'; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['events'] ?? null; + + if ($value === null) { + $missingFields[] = 'events'; + goto after_events; + } + + $properties['events'] = $value; + + after_events: + + $value = $payload['installations_count'] ?? null; + + if ($value === null) { + $properties['installationsCount'] = null; + goto after_installationsCount; + } + + $properties['installationsCount'] = $value; + + after_installationsCount: + + $value = $payload['client_secret'] ?? null; + + if ($value === null) { + $properties['clientSecret'] = null; + goto after_clientSecret; + } + + $properties['clientSecret'] = $value; + + after_clientSecret: + + $value = $payload['webhook_secret'] ?? null; + + if ($value === null) { + $properties['webhookSecret'] = null; + goto after_webhookSecret; + } + + $properties['webhookSecret'] = $value; + + after_webhookSecret: + + $value = $payload['pem'] ?? null; + + if ($value === null) { + $properties['pem'] = null; + goto after_pem; + } + + $properties['pem'] = $value; + + after_pem: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Integration::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Integration(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\Integration\Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['issues'] ?? null; + + if ($value === null) { + $properties['issues'] = null; + goto after_issues; + } + + $properties['issues'] = $value; + + after_issues: + + $value = $payload['checks'] ?? null; + + if ($value === null) { + $properties['checks'] = null; + goto after_checks; + } + + $properties['checks'] = $value; + + after_checks: + + $value = $payload['metadata'] ?? null; + + if ($value === null) { + $properties['metadata'] = null; + goto after_metadata; + } + + $properties['metadata'] = $value; + + 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(\ApiClients\Client\GitHub\Schema\Integration\Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new \ApiClients\Client\GitHub\Schema\Integration\Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Integration\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ReactionRollup(array $payload): ReactionRollup + { + $properties = []; + $missingFields = []; + try { + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['total_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'total_count'; + goto after_totalCount; + } + + $properties['totalCount'] = $value; + + after_totalCount: + + $value = $payload['+1'] ?? null; + + if ($value === null) { + $missingFields[] = '+1'; + goto after_plusOne; + } + + $properties['plusOne'] = $value; + + after_plusOne: + + $value = $payload['-1'] ?? null; + + if ($value === null) { + $missingFields[] = '-1'; + goto after_minOne; + } + + $properties['minOne'] = $value; + + after_minOne: + + $value = $payload['laugh'] ?? null; + + if ($value === null) { + $missingFields[] = 'laugh'; + goto after_laugh; + } + + $properties['laugh'] = $value; + + after_laugh: + + $value = $payload['confused'] ?? null; + + if ($value === null) { + $missingFields[] = 'confused'; + goto after_confused; + } + + $properties['confused'] = $value; + + after_confused: + + $value = $payload['heart'] ?? null; + + if ($value === null) { + $missingFields[] = 'heart'; + goto after_heart; + } + + $properties['heart'] = $value; + + after_heart: + + $value = $payload['hooray'] ?? null; + + if ($value === null) { + $missingFields[] = 'hooray'; + goto after_hooray; + } + + $properties['hooray'] = $value; + + after_hooray: + + $value = $payload['eyes'] ?? null; + + if ($value === null) { + $missingFields[] = 'eyes'; + goto after_eyes; + } + + $properties['eyes'] = $value; + + after_eyes: + + $value = $payload['rocket'] ?? null; + + if ($value === null) { + $missingFields[] = 'rocket'; + goto after_rocket; + } + + $properties['rocket'] = $value; + + after_rocket: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ReactionRollup', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ReactionRollup::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ReactionRollup(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ReactionRollup', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation(array $payload): SimpleInstallation + { + $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: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleInstallation', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SimpleInstallation::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SimpleInstallation(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleInstallation', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks(array $payload): OrganizationSimpleWebhooks + { + $properties = []; + $missingFields = []; + try { + $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['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $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['hooks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issues_url'; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['members_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'members_url'; + goto after_membersUrl; + } + + $properties['membersUrl'] = $value; + + after_membersUrl: + + $value = $payload['public_members_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'public_members_url'; + goto after_publicMembersUrl; + } + + $properties['publicMembersUrl'] = $value; + + after_publicMembersUrl: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(OrganizationSimpleWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new OrganizationSimpleWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks(array $payload): RepositoryWebhooks + { + $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['license'] ?? null; + + if ($value === null) { + $properties['license'] = null; + goto after_license; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['license'] = $value; + + after_license: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['forks'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks'; + goto after_forks; + } + + $properties['forks'] = $value; + + after_forks: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $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; + } + + $properties['contentsUrl'] = $value; + + after_contentsUrl: + + $value = $payload['contributors_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'contributors_url'; + goto after_contributorsUrl; + } + + $properties['contributorsUrl'] = $value; + + after_contributorsUrl: + + $value = $payload['deployments_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'deployments_url'; + goto after_deploymentsUrl; + } + + $properties['deploymentsUrl'] = $value; + + after_deploymentsUrl: + + $value = $payload['downloads_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'downloads_url'; + goto after_downloadsUrl; + } + + $properties['downloadsUrl'] = $value; + + after_downloadsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['forks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_url'; + goto after_forksUrl; + } + + $properties['forksUrl'] = $value; + + after_forksUrl: + + $value = $payload['git_commits_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_commits_url'; + goto after_gitCommitsUrl; + } + + $properties['gitCommitsUrl'] = $value; + + after_gitCommitsUrl: + + $value = $payload['git_refs_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_refs_url'; + goto after_gitRefsUrl; + } + + $properties['gitRefsUrl'] = $value; + + after_gitRefsUrl: + + $value = $payload['git_tags_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_tags_url'; + goto after_gitTagsUrl; + } + + $properties['gitTagsUrl'] = $value; + + after_gitTagsUrl: + + $value = $payload['git_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_url'; + goto after_gitUrl; + } + + $properties['gitUrl'] = $value; + + after_gitUrl: + + $value = $payload['issue_comment_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_comment_url'; + goto after_issueCommentUrl; + } + + $properties['issueCommentUrl'] = $value; + + after_issueCommentUrl: + + $value = $payload['issue_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_events_url'; + goto after_issueEventsUrl; + } + + $properties['issueEventsUrl'] = $value; + + after_issueEventsUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issues_url'; + goto after_issuesUrl; + } + + $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_language: + + $value = $payload['forks_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_count'; + goto after_forksCount; + } + + $properties['forksCount'] = $value; + + after_forksCount: + + $value = $payload['stargazers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; + } + + $properties['stargazersCount'] = $value; + + after_stargazersCount: + + $value = $payload['watchers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers_count'; + goto after_watchersCount; + } + + $properties['watchersCount'] = $value; + + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $missingFields[] = 'size'; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $missingFields[] = 'default_branch'; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: + + $value = $payload['custom_properties'] ?? 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['customProperties'] = $value; + + after_customProperties: + + $value = $payload['has_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_issues'; + goto after_hasIssues; + } + + $properties['hasIssues'] = $value; + + after_hasIssues: + + $value = $payload['has_projects'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_projects'; + goto after_hasProjects; + } + + $properties['hasProjects'] = $value; + + after_hasProjects: + + $value = $payload['has_wiki'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_wiki'; + goto after_hasWiki; + } + + $properties['hasWiki'] = $value; + + after_hasWiki: + + $value = $payload['has_pages'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_pages'; + goto after_hasPages; + } + + $properties['hasPages'] = $value; + + after_hasPages: + + $value = $payload['has_downloads'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; + } + + $properties['hasDownloads'] = $value; + + after_hasDownloads: + + $value = $payload['has_discussions'] ?? null; + + if ($value === null) { + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; + } + + $properties['hasDiscussions'] = $value; + + after_hasDiscussions: + + $value = $payload['archived'] ?? null; + + if ($value === null) { + $missingFields[] = 'archived'; + goto after_archived; + } + + $properties['archived'] = $value; + + after_archived: + + $value = $payload['disabled'] ?? null; + + if ($value === null) { + $missingFields[] = 'disabled'; + goto after_disabled; + } + + $properties['disabled'] = $value; + + after_disabled: + + $value = $payload['visibility'] ?? null; + + if ($value === null) { + $properties['visibility'] = null; + goto after_visibility; + } + + $properties['visibility'] = $value; + + after_visibility: + + $value = $payload['pushed_at'] ?? null; + + if ($value === null) { + $properties['pushedAt'] = null; + goto after_pushedAt; + } + + $properties['pushedAt'] = $value; + + after_pushedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['allow_rebase_merge'] ?? null; + + if ($value === null) { + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; + } + + $properties['allowRebaseMerge'] = $value; + + after_allowRebaseMerge: + + $value = $payload['template_repository'] ?? 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); + } + } + + $properties['templateRepository'] = $value; + + after_templateRepository: + + $value = $payload['temp_clone_token'] ?? null; + + if ($value === null) { + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; + } + + $properties['tempCloneToken'] = $value; + + after_tempCloneToken: + + $value = $payload['allow_squash_merge'] ?? null; + + if ($value === null) { + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; + } + + $properties['allowSquashMerge'] = $value; + + after_allowSquashMerge: + + $value = $payload['allow_auto_merge'] ?? null; + + if ($value === null) { + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; + } + + $properties['allowAutoMerge'] = $value; + + after_allowAutoMerge: + + $value = $payload['delete_branch_on_merge'] ?? null; + + if ($value === null) { + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; + } + + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; + } + + $properties['allowUpdateBranch'] = $value; + + after_allowUpdateBranch: + + $value = $payload['use_squash_pr_title_as_default'] ?? null; + + if ($value === null) { + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; + } + + $properties['useSquashPrTitleAsDefault'] = $value; + + after_useSquashPrTitleAsDefault: + + $value = $payload['squash_merge_commit_title'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; + } + + $properties['squashMergeCommitTitle'] = $value; + + after_squashMergeCommitTitle: + + $value = $payload['squash_merge_commit_message'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; + } + + $properties['squashMergeCommitMessage'] = $value; + + after_squashMergeCommitMessage: + + $value = $payload['merge_commit_title'] ?? null; + + if ($value === null) { + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; + } + + $properties['mergeCommitTitle'] = $value; + + after_mergeCommitTitle: + + $value = $payload['merge_commit_message'] ?? null; + + if ($value === null) { + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; + } + + $properties['mergeCommitMessage'] = $value; + + after_mergeCommitMessage: + + $value = $payload['allow_merge_commit'] ?? null; + + if ($value === null) { + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; + } + + $properties['allowMergeCommit'] = $value; + + after_allowMergeCommit: + + $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['subscribers_count'] ?? null; + + if ($value === null) { + $properties['subscribersCount'] = null; + goto after_subscribersCount; + } + + $properties['subscribersCount'] = $value; + + after_subscribersCount: + + $value = $payload['network_count'] ?? null; + + if ($value === null) { + $properties['networkCount'] = null; + goto after_networkCount; + } + + $properties['networkCount'] = $value; + + after_networkCount: + + $value = $payload['open_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues'; + goto after_openIssues; + } + + $properties['openIssues'] = $value; + + after_openIssues: + + $value = $payload['watchers'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers'; + goto after_watchers; + } + + $properties['watchers'] = $value; + + after_watchers: + + $value = $payload['master_branch'] ?? null; + + if ($value === null) { + $properties['masterBranch'] = null; + goto after_masterBranch; + } + + $properties['masterBranch'] = $value; + + after_masterBranch: + + $value = $payload['starred_at'] ?? null; + + if ($value === null) { + $properties['starredAt'] = null; + goto after_starredAt; + } + + $properties['starredAt'] = $value; + + after_starredAt: + + $value = $payload['anonymous_access_enabled'] ?? null; + + if ($value === null) { + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; + } + + $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); + } + + 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⚡️RepositoryWebhooks⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; + + if ($value === null) { + $missingFields[] = 'admin'; + goto after_admin; + } + + $properties['admin'] = $value; + + after_admin: + + $value = $payload['pull'] ?? null; + + if ($value === null) { + $missingFields[] = 'pull'; + goto after_pull; + } + + $properties['pull'] = $value; + + after_pull: + + $value = $payload['triage'] ?? null; + + if ($value === null) { + $properties['triage'] = null; + goto after_triage; + } + + $properties['triage'] = $value; + + after_triage: + + $value = $payload['push'] ?? null; + + if ($value === null) { + $missingFields[] = 'push'; + goto after_push; + } + + $properties['push'] = $value; + + after_push: + + $value = $payload['maintain'] ?? null; + + if ($value === null) { + $properties['maintain'] = null; + goto after_maintain; + } + + $properties['maintain'] = $value; + + after_maintain: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository(array $payload): TemplateRepository + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $properties['nodeId'] = null; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $properties['fullName'] = null; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $properties['owner'] = null; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $properties['private'] = null; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + 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) { + $properties['fork'] = null; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['archive_url'] ?? null; + + if ($value === null) { + $properties['archiveUrl'] = null; + goto after_archiveUrl; + } + + $properties['archiveUrl'] = $value; + + after_archiveUrl: + + $value = $payload['assignees_url'] ?? null; + + if ($value === null) { + $properties['assigneesUrl'] = null; + goto after_assigneesUrl; + } + + $properties['assigneesUrl'] = $value; + + after_assigneesUrl: + + $value = $payload['blobs_url'] ?? null; + + if ($value === null) { + $properties['blobsUrl'] = null; + goto after_blobsUrl; + } + + $properties['blobsUrl'] = $value; + + after_blobsUrl: + + $value = $payload['branches_url'] ?? null; + + if ($value === null) { + $properties['branchesUrl'] = null; + goto after_branchesUrl; + } + + $properties['branchesUrl'] = $value; + + after_branchesUrl: + + $value = $payload['collaborators_url'] ?? null; + + if ($value === null) { + $properties['collaboratorsUrl'] = null; + goto after_collaboratorsUrl; + } + + $properties['collaboratorsUrl'] = $value; + + after_collaboratorsUrl: + + $value = $payload['comments_url'] ?? null; + + if ($value === null) { + $properties['commentsUrl'] = null; + goto after_commentsUrl; + } + + $properties['commentsUrl'] = $value; + + after_commentsUrl: + + $value = $payload['commits_url'] ?? null; + + if ($value === null) { + $properties['commitsUrl'] = null; + goto after_commitsUrl; + } + + $properties['commitsUrl'] = $value; + + after_commitsUrl: + + $value = $payload['compare_url'] ?? null; + + if ($value === null) { + $properties['compareUrl'] = null; + goto after_compareUrl; + } + + $properties['compareUrl'] = $value; + + after_compareUrl: + + $value = $payload['contents_url'] ?? null; + + if ($value === null) { + $properties['contentsUrl'] = null; + goto after_contentsUrl; + } + + $properties['contentsUrl'] = $value; + + after_contentsUrl: + + $value = $payload['contributors_url'] ?? null; + + if ($value === null) { + $properties['contributorsUrl'] = null; + goto after_contributorsUrl; + } + + $properties['contributorsUrl'] = $value; + + after_contributorsUrl: + + $value = $payload['deployments_url'] ?? null; + + if ($value === null) { + $properties['deploymentsUrl'] = null; + goto after_deploymentsUrl; + } + + $properties['deploymentsUrl'] = $value; + + after_deploymentsUrl: + + $value = $payload['downloads_url'] ?? null; + + if ($value === null) { + $properties['downloadsUrl'] = null; + goto after_downloadsUrl; + } + + $properties['downloadsUrl'] = $value; + + after_downloadsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $properties['eventsUrl'] = null; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['forks_url'] ?? null; + + if ($value === null) { + $properties['forksUrl'] = null; + goto after_forksUrl; + } + + $properties['forksUrl'] = $value; + + after_forksUrl: + + $value = $payload['git_commits_url'] ?? null; + + if ($value === null) { + $properties['gitCommitsUrl'] = null; + goto after_gitCommitsUrl; + } + + $properties['gitCommitsUrl'] = $value; + + after_gitCommitsUrl: + + $value = $payload['git_refs_url'] ?? null; + + if ($value === null) { + $properties['gitRefsUrl'] = null; + goto after_gitRefsUrl; + } + + $properties['gitRefsUrl'] = $value; + + after_gitRefsUrl: + + $value = $payload['git_tags_url'] ?? null; + + if ($value === null) { + $properties['gitTagsUrl'] = null; + goto after_gitTagsUrl; + } + + $properties['gitTagsUrl'] = $value; + + after_gitTagsUrl: + + $value = $payload['git_url'] ?? null; + + if ($value === null) { + $properties['gitUrl'] = null; + goto after_gitUrl; + } + + $properties['gitUrl'] = $value; + + after_gitUrl: + + $value = $payload['issue_comment_url'] ?? null; + + if ($value === null) { + $properties['issueCommentUrl'] = null; + goto after_issueCommentUrl; + } + + $properties['issueCommentUrl'] = $value; + + after_issueCommentUrl: + + $value = $payload['issue_events_url'] ?? null; + + if ($value === null) { + $properties['issueEventsUrl'] = null; + goto after_issueEventsUrl; + } + + $properties['issueEventsUrl'] = $value; + + after_issueEventsUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $properties['issuesUrl'] = null; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['keys_url'] ?? null; + + if ($value === null) { + $properties['keysUrl'] = null; + goto after_keysUrl; + } + + $properties['keysUrl'] = $value; + + after_keysUrl: + + $value = $payload['labels_url'] ?? null; + + if ($value === null) { + $properties['labelsUrl'] = null; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $value = $payload['languages_url'] ?? null; + + if ($value === null) { + $properties['languagesUrl'] = null; + goto after_languagesUrl; + } + + $properties['languagesUrl'] = $value; + + after_languagesUrl: + + $value = $payload['merges_url'] ?? null; + + if ($value === null) { + $properties['mergesUrl'] = null; + goto after_mergesUrl; + } + + $properties['mergesUrl'] = $value; + + after_mergesUrl: + + $value = $payload['milestones_url'] ?? null; + + if ($value === null) { + $properties['milestonesUrl'] = null; + goto after_milestonesUrl; + } + + $properties['milestonesUrl'] = $value; + + after_milestonesUrl: + + $value = $payload['notifications_url'] ?? null; + + if ($value === null) { + $properties['notificationsUrl'] = null; + goto after_notificationsUrl; + } + + $properties['notificationsUrl'] = $value; + + after_notificationsUrl: + + $value = $payload['pulls_url'] ?? null; + + if ($value === null) { + $properties['pullsUrl'] = null; + goto after_pullsUrl; + } + + $properties['pullsUrl'] = $value; + + after_pullsUrl: + + $value = $payload['releases_url'] ?? null; + + if ($value === null) { + $properties['releasesUrl'] = null; + goto after_releasesUrl; + } + + $properties['releasesUrl'] = $value; + + after_releasesUrl: + + $value = $payload['ssh_url'] ?? null; + + if ($value === null) { + $properties['sshUrl'] = null; + goto after_sshUrl; + } + + $properties['sshUrl'] = $value; + + after_sshUrl: + + $value = $payload['stargazers_url'] ?? null; + + if ($value === null) { + $properties['stargazersUrl'] = null; + goto after_stargazersUrl; + } + + $properties['stargazersUrl'] = $value; + + after_stargazersUrl: + + $value = $payload['statuses_url'] ?? null; + + if ($value === null) { + $properties['statusesUrl'] = null; + goto after_statusesUrl; + } + + $properties['statusesUrl'] = $value; + + after_statusesUrl: + + $value = $payload['subscribers_url'] ?? null; + + if ($value === null) { + $properties['subscribersUrl'] = null; + goto after_subscribersUrl; + } + + $properties['subscribersUrl'] = $value; + + after_subscribersUrl: + + $value = $payload['subscription_url'] ?? null; + + if ($value === null) { + $properties['subscriptionUrl'] = null; + goto after_subscriptionUrl; + } + + $properties['subscriptionUrl'] = $value; + + after_subscriptionUrl: + + $value = $payload['tags_url'] ?? null; + + if ($value === null) { + $properties['tagsUrl'] = null; + goto after_tagsUrl; + } + + $properties['tagsUrl'] = $value; + + after_tagsUrl: + + $value = $payload['teams_url'] ?? null; + + if ($value === null) { + $properties['teamsUrl'] = null; + goto after_teamsUrl; + } + + $properties['teamsUrl'] = $value; + + after_teamsUrl: + + $value = $payload['trees_url'] ?? null; + + if ($value === null) { + $properties['treesUrl'] = null; + goto after_treesUrl; + } + + $properties['treesUrl'] = $value; + + after_treesUrl: + + $value = $payload['clone_url'] ?? null; + + if ($value === null) { + $properties['cloneUrl'] = null; + 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) { + $properties['hooksUrl'] = null; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['svn_url'] ?? null; + + if ($value === null) { + $properties['svnUrl'] = null; + 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_language: + + $value = $payload['forks_count'] ?? null; + + if ($value === null) { + $properties['forksCount'] = null; + goto after_forksCount; + } + + $properties['forksCount'] = $value; + + after_forksCount: + + $value = $payload['stargazers_count'] ?? null; + + if ($value === null) { + $properties['stargazersCount'] = null; + goto after_stargazersCount; + } + + $properties['stargazersCount'] = $value; + + after_stargazersCount: + + $value = $payload['watchers_count'] ?? null; + + if ($value === null) { + $properties['watchersCount'] = null; + goto after_watchersCount; + } + + $properties['watchersCount'] = $value; + + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $properties['size'] = null; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $properties['defaultBranch'] = null; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $properties['openIssuesCount'] = null; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: + + $value = $payload['has_issues'] ?? null; + + if ($value === null) { + $properties['hasIssues'] = null; + goto after_hasIssues; + } + + $properties['hasIssues'] = $value; + + after_hasIssues: + + $value = $payload['has_projects'] ?? null; + + if ($value === null) { + $properties['hasProjects'] = null; + goto after_hasProjects; + } + + $properties['hasProjects'] = $value; + + after_hasProjects: + + $value = $payload['has_wiki'] ?? null; + + if ($value === null) { + $properties['hasWiki'] = null; + goto after_hasWiki; + } + + $properties['hasWiki'] = $value; + + after_hasWiki: + + $value = $payload['has_pages'] ?? null; + + if ($value === null) { + $properties['hasPages'] = null; + goto after_hasPages; + } + + $properties['hasPages'] = $value; + + after_hasPages: + + $value = $payload['has_downloads'] ?? null; + + if ($value === null) { + $properties['hasDownloads'] = null; + goto after_hasDownloads; + } + + $properties['hasDownloads'] = $value; + + after_hasDownloads: + + $value = $payload['archived'] ?? null; + + if ($value === null) { + $properties['archived'] = null; + goto after_archived; + } + + $properties['archived'] = $value; + + after_archived: + + $value = $payload['disabled'] ?? null; + + if ($value === null) { + $properties['disabled'] = null; + goto after_disabled; + } + + $properties['disabled'] = $value; + + after_disabled: + + $value = $payload['visibility'] ?? null; + + if ($value === null) { + $properties['visibility'] = null; + goto after_visibility; + } + + $properties['visibility'] = $value; + + after_visibility: + + $value = $payload['pushed_at'] ?? null; + + if ($value === null) { + $properties['pushedAt'] = null; + goto after_pushedAt; + } + + $properties['pushedAt'] = $value; + + after_pushedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['allow_rebase_merge'] ?? null; + + if ($value === null) { + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; + } + + $properties['allowRebaseMerge'] = $value; + + after_allowRebaseMerge: + + $value = $payload['temp_clone_token'] ?? null; + + if ($value === null) { + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; + } + + $properties['tempCloneToken'] = $value; + + after_tempCloneToken: + + $value = $payload['allow_squash_merge'] ?? null; + + if ($value === null) { + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; + } + + $properties['allowSquashMerge'] = $value; + + after_allowSquashMerge: + + $value = $payload['allow_auto_merge'] ?? null; + + if ($value === null) { + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; + } + + $properties['allowAutoMerge'] = $value; + + after_allowAutoMerge: + + $value = $payload['delete_branch_on_merge'] ?? null; + + if ($value === null) { + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; + } + + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; + } + + $properties['allowUpdateBranch'] = $value; + + after_allowUpdateBranch: + + $value = $payload['use_squash_pr_title_as_default'] ?? null; + + if ($value === null) { + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; + } + + $properties['useSquashPrTitleAsDefault'] = $value; + + after_useSquashPrTitleAsDefault: + + $value = $payload['squash_merge_commit_title'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; + } + + $properties['squashMergeCommitTitle'] = $value; + + after_squashMergeCommitTitle: + + $value = $payload['squash_merge_commit_message'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; + } + + $properties['squashMergeCommitMessage'] = $value; + + after_squashMergeCommitMessage: + + $value = $payload['merge_commit_title'] ?? null; + + if ($value === null) { + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; + } + + $properties['mergeCommitTitle'] = $value; + + after_mergeCommitTitle: + + $value = $payload['merge_commit_message'] ?? null; + + if ($value === null) { + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; + } + + $properties['mergeCommitMessage'] = $value; + + after_mergeCommitMessage: + + $value = $payload['allow_merge_commit'] ?? null; + + if ($value === null) { + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; + } + + $properties['allowMergeCommit'] = $value; + + after_allowMergeCommit: + + $value = $payload['subscribers_count'] ?? null; + + if ($value === null) { + $properties['subscribersCount'] = null; + goto after_subscribersCount; + } + + $properties['subscribersCount'] = $value; + + after_subscribersCount: + + $value = $payload['network_count'] ?? null; + + if ($value === null) { + $properties['networkCount'] = null; + goto after_networkCount; + } + + $properties['networkCount'] = $value; + + after_networkCount: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(TemplateRepository::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new TemplateRepository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): Owner + { + $properties = []; + $missingFields = []; + try { + $value = $payload['login'] ?? null; + + if ($value === null) { + $properties['login'] = null; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $properties['nodeId'] = null; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $properties['avatarUrl'] = null; + 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) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $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['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['organizations_url'] ?? null; + + if ($value === null) { + $properties['organizationsUrl'] = null; + goto after_organizationsUrl; + } + + $properties['organizationsUrl'] = $value; + + after_organizationsUrl: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $properties['reposUrl'] = null; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $properties['eventsUrl'] = null; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['received_events_url'] ?? null; + + if ($value === null) { + $properties['receivedEventsUrl'] = null; + goto after_receivedEventsUrl; + } + + $properties['receivedEventsUrl'] = $value; + + after_receivedEventsUrl: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $properties['type'] = null; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + + $value = $payload['site_admin'] ?? null; + + if ($value === null) { + $properties['siteAdmin'] = null; + goto after_siteAdmin; + } + + $properties['siteAdmin'] = $value; + + after_siteAdmin: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Owner(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; + + if ($value === null) { + $properties['admin'] = null; + goto after_admin; + } + + $properties['admin'] = $value; + + after_admin: + + $value = $payload['maintain'] ?? null; + + if ($value === null) { + $properties['maintain'] = null; + goto after_maintain; + } + + $properties['maintain'] = $value; + + after_maintain: + + $value = $payload['push'] ?? null; + + if ($value === null) { + $properties['push'] = null; + goto after_push; + } + + $properties['push'] = $value; + + after_push: + + $value = $payload['triage'] ?? null; + + if ($value === null) { + $properties['triage'] = null; + goto after_triage; + } + + $properties['triage'] = $value; + + after_triage: + + $value = $payload['pull'] ?? null; + + if ($value === null) { + $properties['pull'] = null; + goto after_pull; + } + + $properties['pull'] = $value; + + after_pull: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks(array $payload): SimpleUserWebhooks + { + $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: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUserWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SimpleUserWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SimpleUserWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUserWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesParentIssueRemoved(array $payload): WebhookSubIssuesParentIssueRemoved + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['parent_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue_id'; + goto after_parentIssueId; + } + + $properties['parentIssueId'] = $value; + + after_parentIssueId: + + $value = $payload['parent_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue'; + goto after_parentIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'parentIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['parentIssue'] = $value; + + after_parentIssue: + + $value = $payload['parent_issue_repo'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue_repo'; + goto after_parentIssueRepo; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'parentIssueRepo'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['parentIssueRepo'] = $value; + + after_parentIssueRepo: + + $value = $payload['sub_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue_id'; + goto after_subIssueId; + } + + $properties['subIssueId'] = $value; + + after_subIssueId: + + $value = $payload['sub_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue'; + goto after_subIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'subIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['subIssue'] = $value; + + after_subIssue: + + $value = $payload['installation'] ?? null; + + if ($value === null) { + $properties['installation'] = null; + goto after_installation; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $properties['sender'] = null; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesParentIssueRemoved', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookSubIssuesParentIssueRemoved::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookSubIssuesParentIssueRemoved(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesParentIssueRemoved', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueAdded(array $payload): WebhookSubIssuesSubIssueAdded + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['sub_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue_id'; + goto after_subIssueId; + } + + $properties['subIssueId'] = $value; + + after_subIssueId: + + $value = $payload['sub_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue'; + goto after_subIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'subIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['subIssue'] = $value; + + after_subIssue: + + $value = $payload['sub_issue_repo'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue_repo'; + goto after_subIssueRepo; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'subIssueRepo'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['subIssueRepo'] = $value; + + after_subIssueRepo: + + $value = $payload['parent_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue_id'; + goto after_parentIssueId; + } + + $properties['parentIssueId'] = $value; + + after_parentIssueId: + + $value = $payload['parent_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue'; + goto after_parentIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'parentIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['parentIssue'] = $value; + + after_parentIssue: + + $value = $payload['installation'] ?? null; + + if ($value === null) { + $properties['installation'] = null; + goto after_installation; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $properties['sender'] = null; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueAdded', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookSubIssuesSubIssueAdded::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookSubIssuesSubIssueAdded(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueAdded', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueRemoved(array $payload): WebhookSubIssuesSubIssueRemoved + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['sub_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue_id'; + goto after_subIssueId; + } + + $properties['subIssueId'] = $value; + + after_subIssueId: + + $value = $payload['sub_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue'; + goto after_subIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'subIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['subIssue'] = $value; + + after_subIssue: + + $value = $payload['sub_issue_repo'] ?? null; + + if ($value === null) { + $missingFields[] = 'sub_issue_repo'; + goto after_subIssueRepo; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'subIssueRepo'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['subIssueRepo'] = $value; + + after_subIssueRepo: + + $value = $payload['parent_issue_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue_id'; + goto after_parentIssueId; + } + + $properties['parentIssueId'] = $value; + + after_parentIssueId: + + $value = $payload['parent_issue'] ?? null; + + if ($value === null) { + $missingFields[] = 'parent_issue'; + goto after_parentIssue; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'parentIssue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['parentIssue'] = $value; + + after_parentIssue: + + $value = $payload['installation'] ?? null; + + if ($value === null) { + $properties['installation'] = null; + goto after_installation; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $properties['sender'] = null; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueRemoved', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookSubIssuesSubIssueRemoved::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookSubIssuesSubIssueRemoved(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueRemoved', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties(array $payload): CustomProperties + { + $properties = []; + $missingFields = []; + try { + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CustomProperties::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CustomProperties(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties', $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\WebhookSubIssuesParentIssueAdded' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesParentIssueAdded($object), + 'ApiClients\Client\GitHub\Schema\Issue' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), + 'ApiClients\Client\GitHub\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($object), + 'ApiClients\Client\GitHub\Schema\Issue\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue⚡️PullRequest($object), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($object), + 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($object), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($object), + 'ApiClients\Client\GitHub\Schema\Integration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($object), + 'ApiClients\Client\GitHub\Schema\Integration\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($object), + 'ApiClients\Client\GitHub\Schema\ReactionRollup' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ReactionRollup($object), + 'ApiClients\Client\GitHub\Schema\SimpleInstallation' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($object), + '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\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), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($object), + 'ApiClients\Client\GitHub\Schema\SimpleUserWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($object), + 'ApiClients\Client\GitHub\Schema\WebhookSubIssuesParentIssueRemoved' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesParentIssueRemoved($object), + 'ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueAdded' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueAdded($object), + 'ApiClients\Client\GitHub\Schema\WebhookSubIssuesSubIssueRemoved' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueRemoved($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⚡️WebhookSubIssuesParentIssueAdded(mixed $object): mixed + { + assert($object instanceof WebhookSubIssuesParentIssueAdded); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $parentIssueId = $object->parentIssueId; + after_parentIssueId: $result['parent_issue_id'] = $parentIssueId; + + $parentIssue = $object->parentIssue; + $parentIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($parentIssue); + after_parentIssue: $result['parent_issue'] = $parentIssue; + + $parentIssueRepo = $object->parentIssueRepo; + $parentIssueRepo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($parentIssueRepo); + after_parentIssueRepo: $result['parent_issue_repo'] = $parentIssueRepo; + + $subIssueId = $object->subIssueId; + after_subIssueId: $result['sub_issue_id'] = $subIssueId; + + $subIssue = $object->subIssue; + $subIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($subIssue); + after_subIssue: $result['sub_issue'] = $subIssue; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $sender = $object->sender; + + if ($sender === null) { + goto after_sender; + } + + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue(mixed $object): mixed + { + assert($object instanceof Issue); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $repositoryUrl = $object->repositoryUrl; + after_repositoryUrl: $result['repository_url'] = $repositoryUrl; + + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $number = $object->number; + after_number: $result['number'] = $number; + + $state = $object->state; + after_state: $result['state'] = $state; + + $stateReason = $object->stateReason; + + if ($stateReason === null) { + goto after_stateReason; + } + + after_stateReason: $result['state_reason'] = $stateReason; + + $title = $object->title; + after_title: $result['title'] = $title; + + $body = $object->body; + + if ($body === null) { + goto after_body; + } + + after_body: $result['body'] = $body; + + $user = $object->user; + + if ($user === null) { + goto after_user; + } + + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); + after_user: $result['user'] = $user; + + $labels = $object->labels; + static $labelsSerializer0; + + if ($labelsSerializer0 === null) { + $labelsSerializer0 = new SerializeArrayItems(...[]); + } + + $labels = $labelsSerializer0->serialize($labels, $this); + after_labels: $result['labels'] = $labels; + + $assignee = $object->assignee; + + if ($assignee === null) { + goto after_assignee; + } + + $assignee = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($assignee); + after_assignee: $result['assignee'] = $assignee; + + $assignees = $object->assignees; + + if ($assignees === null) { + goto after_assignees; + } + + static $assigneesSerializer0; + + if ($assigneesSerializer0 === null) { + $assigneesSerializer0 = new SerializeArrayItems(...[]); + } + + $assignees = $assigneesSerializer0->serialize($assignees, $this); + after_assignees: $result['assignees'] = $assignees; + + $milestone = $object->milestone; + + if ($milestone === null) { + goto after_milestone; + } + + $milestone = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($milestone); + after_milestone: $result['milestone'] = $milestone; + + $locked = $object->locked; + after_locked: $result['locked'] = $locked; + + $activeLockReason = $object->activeLockReason; + + if ($activeLockReason === null) { + goto after_activeLockReason; + } + + after_activeLockReason: $result['active_lock_reason'] = $activeLockReason; + + $comments = $object->comments; + after_comments: $result['comments'] = $comments; + + $pullRequest = $object->pullRequest; + + if ($pullRequest === null) { + goto after_pullRequest; + } + + $pullRequest = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue⚡️PullRequest($pullRequest); + after_pullRequest: $result['pull_request'] = $pullRequest; + + $closedAt = $object->closedAt; + + if ($closedAt === null) { + goto after_closedAt; + } + + after_closedAt: $result['closed_at'] = $closedAt; + + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; + + $draft = $object->draft; + + if ($draft === null) { + goto after_draft; + } + + after_draft: $result['draft'] = $draft; + + $closedBy = $object->closedBy; + + if ($closedBy === null) { + goto after_closedBy; + } + + $closedBy = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($closedBy); + after_closedBy: $result['closed_by'] = $closedBy; + + $bodyHtml = $object->bodyHtml; + + if ($bodyHtml === null) { + goto after_bodyHtml; + } + + after_bodyHtml: $result['body_html'] = $bodyHtml; + + $bodyText = $object->bodyText; + + if ($bodyText === null) { + goto after_bodyText; + } + + after_bodyText: $result['body_text'] = $bodyText; + + $timelineUrl = $object->timelineUrl; + + if ($timelineUrl === null) { + goto after_timelineUrl; + } + + after_timelineUrl: $result['timeline_url'] = $timelineUrl; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($repository); + after_repository: $result['repository'] = $repository; + + $performedViaGithubApp = $object->performedViaGithubApp; + + if ($performedViaGithubApp === null) { + goto after_performedViaGithubApp; + } + + $performedViaGithubApp = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration($performedViaGithubApp); + after_performedViaGithubApp: $result['performed_via_github_app'] = $performedViaGithubApp; + + $authorAssociation = $object->authorAssociation; + after_authorAssociation: $result['author_association'] = $authorAssociation; + + $reactions = $object->reactions; + + if ($reactions === null) { + goto after_reactions; + } + + $reactions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ReactionRollup($reactions); + after_reactions: $result['reactions'] = $reactions; + + 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; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone(mixed $object): mixed + { + assert($object instanceof Milestone); + $result = []; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $number = $object->number; + after_number: $result['number'] = $number; + + $state = $object->state; + after_state: $result['state'] = $state; + + $title = $object->title; + after_title: $result['title'] = $title; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $creator = $object->creator; + + if ($creator === null) { + goto after_creator; + } + + $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($creator); + after_creator: $result['creator'] = $creator; + + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; + + $closedIssues = $object->closedIssues; + after_closedIssues: $result['closed_issues'] = $closedIssues; + + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; + + $closedAt = $object->closedAt; + + if ($closedAt === null) { + goto after_closedAt; + } + + after_closedAt: $result['closed_at'] = $closedAt; + + $dueOn = $object->dueOn; + + if ($dueOn === null) { + goto after_dueOn; + } + + after_dueOn: $result['due_on'] = $dueOn; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue⚡️PullRequest(mixed $object): mixed + { + assert($object instanceof PullRequest); + $result = []; + + $mergedAt = $object->mergedAt; + + if ($mergedAt === null) { + goto after_mergedAt; + } + + after_mergedAt: $result['merged_at'] = $mergedAt; + + $diffUrl = $object->diffUrl; + + if ($diffUrl === null) { + goto after_diffUrl; + } + + after_diffUrl: $result['diff_url'] = $diffUrl; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $patchUrl = $object->patchUrl; + + if ($patchUrl === null) { + goto after_patchUrl; + } + + after_patchUrl: $result['patch_url'] = $patchUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(mixed $object): mixed + { + assert($object instanceof Repository); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + after_fullName: $result['full_name'] = $fullName; + + $license = $object->license; + + if ($license === null) { + goto after_license; + } + + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $forks = $object->forks; + after_forks: $result['forks'] = $forks; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + after_fork: $result['fork'] = $fork; + + $url = $object->url; + after_url: $result['url'] = $url; + + $archiveUrl = $object->archiveUrl; + after_archiveUrl: $result['archive_url'] = $archiveUrl; + + $assigneesUrl = $object->assigneesUrl; + after_assigneesUrl: $result['assignees_url'] = $assigneesUrl; + + $blobsUrl = $object->blobsUrl; + after_blobsUrl: $result['blobs_url'] = $blobsUrl; + + $branchesUrl = $object->branchesUrl; + after_branchesUrl: $result['branches_url'] = $branchesUrl; + + $collaboratorsUrl = $object->collaboratorsUrl; + after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $commitsUrl = $object->commitsUrl; + after_commitsUrl: $result['commits_url'] = $commitsUrl; + + $compareUrl = $object->compareUrl; + after_compareUrl: $result['compare_url'] = $compareUrl; + + $contentsUrl = $object->contentsUrl; + after_contentsUrl: $result['contents_url'] = $contentsUrl; + + $contributorsUrl = $object->contributorsUrl; + after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + + $deploymentsUrl = $object->deploymentsUrl; + after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + + $downloadsUrl = $object->downloadsUrl; + after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $forksUrl = $object->forksUrl; + after_forksUrl: $result['forks_url'] = $forksUrl; + + $gitCommitsUrl = $object->gitCommitsUrl; + after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + + $gitRefsUrl = $object->gitRefsUrl; + after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + + $gitTagsUrl = $object->gitTagsUrl; + after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + + $gitUrl = $object->gitUrl; + after_gitUrl: $result['git_url'] = $gitUrl; + + $issueCommentUrl = $object->issueCommentUrl; + after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + + $issueEventsUrl = $object->issueEventsUrl; + after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $keysUrl = $object->keysUrl; + after_keysUrl: $result['keys_url'] = $keysUrl; + + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $languagesUrl = $object->languagesUrl; + after_languagesUrl: $result['languages_url'] = $languagesUrl; + + $mergesUrl = $object->mergesUrl; + after_mergesUrl: $result['merges_url'] = $mergesUrl; + + $milestonesUrl = $object->milestonesUrl; + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + + $notificationsUrl = $object->notificationsUrl; + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + + $pullsUrl = $object->pullsUrl; + after_pullsUrl: $result['pulls_url'] = $pullsUrl; + + $releasesUrl = $object->releasesUrl; + after_releasesUrl: $result['releases_url'] = $releasesUrl; + + $sshUrl = $object->sshUrl; + after_sshUrl: $result['ssh_url'] = $sshUrl; + + $stargazersUrl = $object->stargazersUrl; + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + + $statusesUrl = $object->statusesUrl; + after_statusesUrl: $result['statuses_url'] = $statusesUrl; + + $subscribersUrl = $object->subscribersUrl; + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + + $subscriptionUrl = $object->subscriptionUrl; + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + + $tagsUrl = $object->tagsUrl; + after_tagsUrl: $result['tags_url'] = $tagsUrl; + + $teamsUrl = $object->teamsUrl; + after_teamsUrl: $result['teams_url'] = $teamsUrl; + + $treesUrl = $object->treesUrl; + after_treesUrl: $result['trees_url'] = $treesUrl; + + $cloneUrl = $object->cloneUrl; + after_cloneUrl: $result['clone_url'] = $cloneUrl; + + $mirrorUrl = $object->mirrorUrl; + + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } + + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; + + $homepage = $object->homepage; + + if ($homepage === null) { + goto after_homepage; + } + + after_homepage: $result['homepage'] = $homepage; + + $language = $object->language; + + if ($language === null) { + goto after_language; + } + + after_language: $result['language'] = $language; + + $forksCount = $object->forksCount; + after_forksCount: $result['forks_count'] = $forksCount; + + $stargazersCount = $object->stargazersCount; + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + + $watchersCount = $object->watchersCount; + after_watchersCount: $result['watchers_count'] = $watchersCount; + + $size = $object->size; + after_size: $result['size'] = $size; + + $defaultBranch = $object->defaultBranch; + after_defaultBranch: $result['default_branch'] = $defaultBranch; + + $openIssuesCount = $object->openIssuesCount; + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + + $isTemplate = $object->isTemplate; + + if ($isTemplate === null) { + goto after_isTemplate; + } + + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $hasIssues = $object->hasIssues; + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $hasDiscussions = $object->hasDiscussions; + + if ($hasDiscussions === null) { + goto after_hasDiscussions; + } + + after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + + $archived = $object->archived; + after_archived: $result['archived'] = $archived; + + $disabled = $object->disabled; + after_disabled: $result['disabled'] = $disabled; + + $visibility = $object->visibility; + + if ($visibility === null) { + goto after_visibility; + } + + after_visibility: $result['visibility'] = $visibility; + + $pushedAt = $object->pushedAt; + + if ($pushedAt === null) { + goto after_pushedAt; + } + + after_pushedAt: $result['pushed_at'] = $pushedAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $allowRebaseMerge = $object->allowRebaseMerge; + + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; + } + + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + + $tempCloneToken = $object->tempCloneToken; + + if ($tempCloneToken === null) { + goto after_tempCloneToken; + } + + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + + $allowSquashMerge = $object->allowSquashMerge; + + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } + + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + + $allowAutoMerge = $object->allowAutoMerge; + + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; + } + + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; + + $deleteBranchOnMerge = $object->deleteBranchOnMerge; + + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } + + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; + + $allowUpdateBranch = $object->allowUpdateBranch; + + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } + + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; + + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; + + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } + + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; + + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; + } + + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; + + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } + + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; + + $mergeCommitTitle = $object->mergeCommitTitle; + + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } + + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; + + $mergeCommitMessage = $object->mergeCommitMessage; + + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; + } + + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; + + $allowMergeCommit = $object->allowMergeCommit; + + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } + + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + + $allowForking = $object->allowForking; + + if ($allowForking === null) { + goto after_allowForking; + } + + after_allowForking: $result['allow_forking'] = $allowForking; + + $webCommitSignoffRequired = $object->webCommitSignoffRequired; + + if ($webCommitSignoffRequired === null) { + goto after_webCommitSignoffRequired; + } + + after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; + + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; + + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; + + $masterBranch = $object->masterBranch; + + if ($masterBranch === null) { + goto after_masterBranch; + } + + after_masterBranch: $result['master_branch'] = $masterBranch; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $anonymousAccessEnabled = $object->anonymousAccessEnabled; + + if ($anonymousAccessEnabled === null) { + goto after_anonymousAccessEnabled; + } + + after_anonymousAccessEnabled: $result['anonymous_access_enabled'] = $anonymousAccessEnabled; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(mixed $object): mixed + { + assert($object instanceof LicenseSimple); + $result = []; + + $key = $object->key; + after_key: $result['key'] = $key; + + $name = $object->name; + after_name: $result['name'] = $name; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $spdxId = $object->spdxId; + + if ($spdxId === null) { + goto after_spdxId; + } + + after_spdxId: $result['spdx_id'] = $spdxId; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions(mixed $object): mixed + { + assert($object instanceof Permissions); + $result = []; + + $admin = $object->admin; + after_admin: $result['admin'] = $admin; + + $pull = $object->pull; + after_pull: $result['pull'] = $pull; + + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; + } + + after_triage: $result['triage'] = $triage; + + $push = $object->push; + after_push: $result['push'] = $push; + + $maintain = $object->maintain; + + if ($maintain === null) { + goto after_maintain; + } + + after_maintain: $result['maintain'] = $maintain; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration(mixed $object): mixed + { + assert($object instanceof Integration); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $slug = $object->slug; + + if ($slug === null) { + goto after_slug; + } + + after_slug: $result['slug'] = $slug; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $clientId = $object->clientId; + + if ($clientId === null) { + goto after_clientId; + } + + after_clientId: $result['client_id'] = $clientId; + + $owner = $object->owner; + + if ($owner === null) { + goto after_owner; + } + + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $name = $object->name; + after_name: $result['name'] = $name; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $externalUrl = $object->externalUrl; + after_externalUrl: $result['external_url'] = $externalUrl; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; + + $permissions = $object->permissions; + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $events = $object->events; + static $eventsSerializer0; + + if ($eventsSerializer0 === null) { + $eventsSerializer0 = new SerializeArrayItems(...[]); + } + + $events = $eventsSerializer0->serialize($events, $this); + after_events: $result['events'] = $events; + + $installationsCount = $object->installationsCount; + + if ($installationsCount === null) { + goto after_installationsCount; + } + + after_installationsCount: $result['installations_count'] = $installationsCount; + + $clientSecret = $object->clientSecret; + + if ($clientSecret === null) { + goto after_clientSecret; + } + + after_clientSecret: $result['client_secret'] = $clientSecret; + + $webhookSecret = $object->webhookSecret; + + if ($webhookSecret === null) { + goto after_webhookSecret; + } + + after_webhookSecret: $result['webhook_secret'] = $webhookSecret; + + $pem = $object->pem; + + if ($pem === null) { + goto after_pem; + } + + after_pem: $result['pem'] = $pem; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Integration⚡️Permissions(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\Integration\Permissions); + $result = []; + + $issues = $object->issues; + + if ($issues === null) { + goto after_issues; + } + + after_issues: $result['issues'] = $issues; + + $checks = $object->checks; + + if ($checks === null) { + goto after_checks; + } + + after_checks: $result['checks'] = $checks; + + $metadata = $object->metadata; + + if ($metadata === null) { + goto after_metadata; + } + + after_metadata: $result['metadata'] = $metadata; + + $contents = $object->contents; + + if ($contents === null) { + goto after_contents; + } + + after_contents: $result['contents'] = $contents; + + $deployments = $object->deployments; + + if ($deployments === null) { + goto after_deployments; + } + + after_deployments: $result['deployments'] = $deployments; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ReactionRollup(mixed $object): mixed + { + assert($object instanceof ReactionRollup); + $result = []; + + $url = $object->url; + after_url: $result['url'] = $url; + + $totalCount = $object->totalCount; + after_totalCount: $result['total_count'] = $totalCount; + + $plusOne = $object->plusOne; + after_plusOne: $result['+1'] = $plusOne; + + $minOne = $object->minOne; + after_minOne: $result['-1'] = $minOne; + + $laugh = $object->laugh; + after_laugh: $result['laugh'] = $laugh; + + $confused = $object->confused; + after_confused: $result['confused'] = $confused; + + $heart = $object->heart; + after_heart: $result['heart'] = $heart; + + $hooray = $object->hooray; + after_hooray: $result['hooray'] = $hooray; + + $eyes = $object->eyes; + after_eyes: $result['eyes'] = $eyes; + + $rocket = $object->rocket; + after_rocket: $result['rocket'] = $rocket; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation(mixed $object): mixed + { + assert($object instanceof SimpleInstallation); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks(mixed $object): mixed + { + assert($object instanceof OrganizationSimpleWebhooks); + $result = []; + + $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; + + $url = $object->url; + after_url: $result['url'] = $url; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $membersUrl = $object->membersUrl; + after_membersUrl: $result['members_url'] = $membersUrl; + + $publicMembersUrl = $object->publicMembersUrl; + after_publicMembersUrl: $result['public_members_url'] = $publicMembersUrl; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks(mixed $object): mixed + { + assert($object instanceof RepositoryWebhooks); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + after_fullName: $result['full_name'] = $fullName; + + $license = $object->license; + + if ($license === null) { + goto after_license; + } + + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($organization); + after_organization: $result['organization'] = $organization; + + $forks = $object->forks; + after_forks: $result['forks'] = $forks; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + after_fork: $result['fork'] = $fork; + + $url = $object->url; + after_url: $result['url'] = $url; + + $archiveUrl = $object->archiveUrl; + after_archiveUrl: $result['archive_url'] = $archiveUrl; + + $assigneesUrl = $object->assigneesUrl; + after_assigneesUrl: $result['assignees_url'] = $assigneesUrl; + + $blobsUrl = $object->blobsUrl; + after_blobsUrl: $result['blobs_url'] = $blobsUrl; + + $branchesUrl = $object->branchesUrl; + after_branchesUrl: $result['branches_url'] = $branchesUrl; + + $collaboratorsUrl = $object->collaboratorsUrl; + after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $commitsUrl = $object->commitsUrl; + after_commitsUrl: $result['commits_url'] = $commitsUrl; + + $compareUrl = $object->compareUrl; + after_compareUrl: $result['compare_url'] = $compareUrl; + + $contentsUrl = $object->contentsUrl; + after_contentsUrl: $result['contents_url'] = $contentsUrl; + + $contributorsUrl = $object->contributorsUrl; + after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + + $deploymentsUrl = $object->deploymentsUrl; + after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + + $downloadsUrl = $object->downloadsUrl; + after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $forksUrl = $object->forksUrl; + after_forksUrl: $result['forks_url'] = $forksUrl; + + $gitCommitsUrl = $object->gitCommitsUrl; + after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + + $gitRefsUrl = $object->gitRefsUrl; + after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + + $gitTagsUrl = $object->gitTagsUrl; + after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + + $gitUrl = $object->gitUrl; + after_gitUrl: $result['git_url'] = $gitUrl; + + $issueCommentUrl = $object->issueCommentUrl; + after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + + $issueEventsUrl = $object->issueEventsUrl; + after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $keysUrl = $object->keysUrl; + after_keysUrl: $result['keys_url'] = $keysUrl; + + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $languagesUrl = $object->languagesUrl; + after_languagesUrl: $result['languages_url'] = $languagesUrl; + + $mergesUrl = $object->mergesUrl; + after_mergesUrl: $result['merges_url'] = $mergesUrl; + + $milestonesUrl = $object->milestonesUrl; + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + + $notificationsUrl = $object->notificationsUrl; + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + + $pullsUrl = $object->pullsUrl; + after_pullsUrl: $result['pulls_url'] = $pullsUrl; + + $releasesUrl = $object->releasesUrl; + after_releasesUrl: $result['releases_url'] = $releasesUrl; + + $sshUrl = $object->sshUrl; + after_sshUrl: $result['ssh_url'] = $sshUrl; + + $stargazersUrl = $object->stargazersUrl; + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + + $statusesUrl = $object->statusesUrl; + after_statusesUrl: $result['statuses_url'] = $statusesUrl; + + $subscribersUrl = $object->subscribersUrl; + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + + $subscriptionUrl = $object->subscriptionUrl; + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + + $tagsUrl = $object->tagsUrl; + after_tagsUrl: $result['tags_url'] = $tagsUrl; + + $teamsUrl = $object->teamsUrl; + after_teamsUrl: $result['teams_url'] = $teamsUrl; + + $treesUrl = $object->treesUrl; + after_treesUrl: $result['trees_url'] = $treesUrl; + + $cloneUrl = $object->cloneUrl; + after_cloneUrl: $result['clone_url'] = $cloneUrl; + + $mirrorUrl = $object->mirrorUrl; + + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } + + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; + + $homepage = $object->homepage; + + if ($homepage === null) { + goto after_homepage; + } + + after_homepage: $result['homepage'] = $homepage; + + $language = $object->language; + + if ($language === null) { + goto after_language; + } + + after_language: $result['language'] = $language; + + $forksCount = $object->forksCount; + after_forksCount: $result['forks_count'] = $forksCount; + + $stargazersCount = $object->stargazersCount; + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + + $watchersCount = $object->watchersCount; + after_watchersCount: $result['watchers_count'] = $watchersCount; + + $size = $object->size; + after_size: $result['size'] = $size; + + $defaultBranch = $object->defaultBranch; + after_defaultBranch: $result['default_branch'] = $defaultBranch; + + $openIssuesCount = $object->openIssuesCount; + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + + $isTemplate = $object->isTemplate; + + if ($isTemplate === null) { + goto after_isTemplate; + } + + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $customProperties = $object->customProperties; + + if ($customProperties === null) { + goto after_customProperties; + } + + $customProperties = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($customProperties); + after_customProperties: $result['custom_properties'] = $customProperties; + + $hasIssues = $object->hasIssues; + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $hasDiscussions = $object->hasDiscussions; + + if ($hasDiscussions === null) { + goto after_hasDiscussions; + } + + after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + + $archived = $object->archived; + after_archived: $result['archived'] = $archived; + + $disabled = $object->disabled; + after_disabled: $result['disabled'] = $disabled; + + $visibility = $object->visibility; + + if ($visibility === null) { + goto after_visibility; + } + + after_visibility: $result['visibility'] = $visibility; + + $pushedAt = $object->pushedAt; + + if ($pushedAt === null) { + goto after_pushedAt; + } + + after_pushedAt: $result['pushed_at'] = $pushedAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $allowRebaseMerge = $object->allowRebaseMerge; + + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; + } + + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + + $templateRepository = $object->templateRepository; + + if ($templateRepository === null) { + goto after_templateRepository; + } + + $templateRepository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($templateRepository); + after_templateRepository: $result['template_repository'] = $templateRepository; + + $tempCloneToken = $object->tempCloneToken; + + if ($tempCloneToken === null) { + goto after_tempCloneToken; + } + + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + + $allowSquashMerge = $object->allowSquashMerge; + + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } + + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + + $allowAutoMerge = $object->allowAutoMerge; + + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; + } + + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; + + $deleteBranchOnMerge = $object->deleteBranchOnMerge; + + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } + + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; + + $allowUpdateBranch = $object->allowUpdateBranch; + + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } + + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; + + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; + + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } + + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; + + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; + } + + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; + + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } + + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; + + $mergeCommitTitle = $object->mergeCommitTitle; + + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } + + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; + + $mergeCommitMessage = $object->mergeCommitMessage; + + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; + } + + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; + + $allowMergeCommit = $object->allowMergeCommit; + + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } + + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + + $allowForking = $object->allowForking; + + if ($allowForking === null) { + goto after_allowForking; + } + + after_allowForking: $result['allow_forking'] = $allowForking; + + $webCommitSignoffRequired = $object->webCommitSignoffRequired; + + if ($webCommitSignoffRequired === null) { + goto after_webCommitSignoffRequired; + } + + after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; + + $subscribersCount = $object->subscribersCount; + + if ($subscribersCount === null) { + goto after_subscribersCount; + } + + after_subscribersCount: $result['subscribers_count'] = $subscribersCount; + + $networkCount = $object->networkCount; + + if ($networkCount === null) { + goto after_networkCount; + } + + after_networkCount: $result['network_count'] = $networkCount; + + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; + + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; + + $masterBranch = $object->masterBranch; + + if ($masterBranch === null) { + goto after_masterBranch; + } + + after_masterBranch: $result['master_branch'] = $masterBranch; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $anonymousAccessEnabled = $object->anonymousAccessEnabled; + + if ($anonymousAccessEnabled === null) { + goto after_anonymousAccessEnabled; + } + + after_anonymousAccessEnabled: $result['anonymous_access_enabled'] = $anonymousAccessEnabled; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions); + $result = []; + + $admin = $object->admin; + after_admin: $result['admin'] = $admin; + + $pull = $object->pull; + after_pull: $result['pull'] = $pull; + + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; + } + + after_triage: $result['triage'] = $triage; + + $push = $object->push; + after_push: $result['push'] = $push; + + $maintain = $object->maintain; + + if ($maintain === null) { + goto after_maintain; + } + + after_maintain: $result['maintain'] = $maintain; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository(mixed $object): mixed + { + assert($object instanceof TemplateRepository); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + + if ($nodeId === null) { + goto after_nodeId; + } + + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + + if ($fullName === null) { + goto after_fullName; + } + + after_fullName: $result['full_name'] = $fullName; + + $owner = $object->owner; + + if ($owner === null) { + goto after_owner; + } + + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + + if ($private === null) { + goto after_private; + } + + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + + if ($fork === null) { + goto after_fork; + } + + after_fork: $result['fork'] = $fork; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $archiveUrl = $object->archiveUrl; + + if ($archiveUrl === null) { + goto after_archiveUrl; + } + + after_archiveUrl: $result['archive_url'] = $archiveUrl; + + $assigneesUrl = $object->assigneesUrl; + + if ($assigneesUrl === null) { + goto after_assigneesUrl; + } + + after_assigneesUrl: $result['assignees_url'] = $assigneesUrl; + + $blobsUrl = $object->blobsUrl; + + if ($blobsUrl === null) { + goto after_blobsUrl; + } + + after_blobsUrl: $result['blobs_url'] = $blobsUrl; + + $branchesUrl = $object->branchesUrl; + + if ($branchesUrl === null) { + goto after_branchesUrl; + } + + after_branchesUrl: $result['branches_url'] = $branchesUrl; + + $collaboratorsUrl = $object->collaboratorsUrl; + + if ($collaboratorsUrl === null) { + goto after_collaboratorsUrl; + } + + after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + + $commentsUrl = $object->commentsUrl; + + if ($commentsUrl === null) { + goto after_commentsUrl; + } + + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $commitsUrl = $object->commitsUrl; + + if ($commitsUrl === null) { + goto after_commitsUrl; + } + + after_commitsUrl: $result['commits_url'] = $commitsUrl; + + $compareUrl = $object->compareUrl; + + if ($compareUrl === null) { + goto after_compareUrl; + } + + after_compareUrl: $result['compare_url'] = $compareUrl; + + $contentsUrl = $object->contentsUrl; + + if ($contentsUrl === null) { + goto after_contentsUrl; + } + + after_contentsUrl: $result['contents_url'] = $contentsUrl; + + $contributorsUrl = $object->contributorsUrl; + + if ($contributorsUrl === null) { + goto after_contributorsUrl; + } + + after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + + $deploymentsUrl = $object->deploymentsUrl; + + if ($deploymentsUrl === null) { + goto after_deploymentsUrl; + } + + after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + + $downloadsUrl = $object->downloadsUrl; + + if ($downloadsUrl === null) { + goto after_downloadsUrl; + } + + after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; + + $eventsUrl = $object->eventsUrl; + + if ($eventsUrl === null) { + goto after_eventsUrl; + } + + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $forksUrl = $object->forksUrl; + + if ($forksUrl === null) { + goto after_forksUrl; + } + + after_forksUrl: $result['forks_url'] = $forksUrl; + + $gitCommitsUrl = $object->gitCommitsUrl; + + if ($gitCommitsUrl === null) { + goto after_gitCommitsUrl; + } + + after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + + $gitRefsUrl = $object->gitRefsUrl; + + if ($gitRefsUrl === null) { + goto after_gitRefsUrl; + } + + after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + + $gitTagsUrl = $object->gitTagsUrl; + + if ($gitTagsUrl === null) { + goto after_gitTagsUrl; + } + + after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + + $gitUrl = $object->gitUrl; + + if ($gitUrl === null) { + goto after_gitUrl; + } + + after_gitUrl: $result['git_url'] = $gitUrl; + + $issueCommentUrl = $object->issueCommentUrl; + + if ($issueCommentUrl === null) { + goto after_issueCommentUrl; + } + + after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + + $issueEventsUrl = $object->issueEventsUrl; + + if ($issueEventsUrl === null) { + goto after_issueEventsUrl; + } + + after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + + $issuesUrl = $object->issuesUrl; + + if ($issuesUrl === null) { + goto after_issuesUrl; + } + + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $keysUrl = $object->keysUrl; + + if ($keysUrl === null) { + goto after_keysUrl; + } + + after_keysUrl: $result['keys_url'] = $keysUrl; + + $labelsUrl = $object->labelsUrl; + + if ($labelsUrl === null) { + goto after_labelsUrl; + } + + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $languagesUrl = $object->languagesUrl; + + if ($languagesUrl === null) { + goto after_languagesUrl; + } + + after_languagesUrl: $result['languages_url'] = $languagesUrl; + + $mergesUrl = $object->mergesUrl; + + if ($mergesUrl === null) { + goto after_mergesUrl; + } + + after_mergesUrl: $result['merges_url'] = $mergesUrl; + + $milestonesUrl = $object->milestonesUrl; + + if ($milestonesUrl === null) { + goto after_milestonesUrl; + } + + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + + $notificationsUrl = $object->notificationsUrl; + + if ($notificationsUrl === null) { + goto after_notificationsUrl; + } + + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + + $pullsUrl = $object->pullsUrl; + + if ($pullsUrl === null) { + goto after_pullsUrl; + } + + after_pullsUrl: $result['pulls_url'] = $pullsUrl; + + $releasesUrl = $object->releasesUrl; + + if ($releasesUrl === null) { + goto after_releasesUrl; + } + + after_releasesUrl: $result['releases_url'] = $releasesUrl; + + $sshUrl = $object->sshUrl; + + if ($sshUrl === null) { + goto after_sshUrl; + } + + after_sshUrl: $result['ssh_url'] = $sshUrl; + + $stargazersUrl = $object->stargazersUrl; + + if ($stargazersUrl === null) { + goto after_stargazersUrl; + } + + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + + $statusesUrl = $object->statusesUrl; + + if ($statusesUrl === null) { + goto after_statusesUrl; + } + + after_statusesUrl: $result['statuses_url'] = $statusesUrl; + + $subscribersUrl = $object->subscribersUrl; + + if ($subscribersUrl === null) { + goto after_subscribersUrl; + } + + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + + $subscriptionUrl = $object->subscriptionUrl; + + if ($subscriptionUrl === null) { + goto after_subscriptionUrl; + } + + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + + $tagsUrl = $object->tagsUrl; + + if ($tagsUrl === null) { + goto after_tagsUrl; + } + + after_tagsUrl: $result['tags_url'] = $tagsUrl; + + $teamsUrl = $object->teamsUrl; + + if ($teamsUrl === null) { + goto after_teamsUrl; + } + + after_teamsUrl: $result['teams_url'] = $teamsUrl; + + $treesUrl = $object->treesUrl; + + if ($treesUrl === null) { + goto after_treesUrl; + } + + after_treesUrl: $result['trees_url'] = $treesUrl; + + $cloneUrl = $object->cloneUrl; + + if ($cloneUrl === null) { + goto after_cloneUrl; + } + + after_cloneUrl: $result['clone_url'] = $cloneUrl; + + $mirrorUrl = $object->mirrorUrl; + + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } + + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + + $hooksUrl = $object->hooksUrl; + + if ($hooksUrl === null) { + goto after_hooksUrl; + } + + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $svnUrl = $object->svnUrl; + + if ($svnUrl === null) { + goto after_svnUrl; + } + + after_svnUrl: $result['svn_url'] = $svnUrl; + + $homepage = $object->homepage; + + if ($homepage === null) { + goto after_homepage; + } + + after_homepage: $result['homepage'] = $homepage; + + $language = $object->language; + + if ($language === null) { + goto after_language; + } + + after_language: $result['language'] = $language; + + $forksCount = $object->forksCount; + + if ($forksCount === null) { + goto after_forksCount; + } + + after_forksCount: $result['forks_count'] = $forksCount; + + $stargazersCount = $object->stargazersCount; + + if ($stargazersCount === null) { + goto after_stargazersCount; + } + + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + + $watchersCount = $object->watchersCount; + + if ($watchersCount === null) { + goto after_watchersCount; + } + + after_watchersCount: $result['watchers_count'] = $watchersCount; + + $size = $object->size; + + if ($size === null) { + goto after_size; + } + + after_size: $result['size'] = $size; + + $defaultBranch = $object->defaultBranch; + + if ($defaultBranch === null) { + goto after_defaultBranch; + } + + after_defaultBranch: $result['default_branch'] = $defaultBranch; + + $openIssuesCount = $object->openIssuesCount; + + if ($openIssuesCount === null) { + goto after_openIssuesCount; + } + + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + + $isTemplate = $object->isTemplate; + + if ($isTemplate === null) { + goto after_isTemplate; + } + + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $hasIssues = $object->hasIssues; + + if ($hasIssues === null) { + goto after_hasIssues; + } + + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + + if ($hasProjects === null) { + goto after_hasProjects; + } + + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + + if ($hasWiki === null) { + goto after_hasWiki; + } + + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + + if ($hasPages === null) { + goto after_hasPages; + } + + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + + if ($hasDownloads === null) { + goto after_hasDownloads; + } + + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $archived = $object->archived; + + if ($archived === null) { + goto after_archived; + } + + after_archived: $result['archived'] = $archived; + + $disabled = $object->disabled; + + if ($disabled === null) { + goto after_disabled; + } + + after_disabled: $result['disabled'] = $disabled; + + $visibility = $object->visibility; + + if ($visibility === null) { + goto after_visibility; + } + + after_visibility: $result['visibility'] = $visibility; + + $pushedAt = $object->pushedAt; + + if ($pushedAt === null) { + goto after_pushedAt; + } + + after_pushedAt: $result['pushed_at'] = $pushedAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $allowRebaseMerge = $object->allowRebaseMerge; + + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; + } + + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + + $tempCloneToken = $object->tempCloneToken; + + if ($tempCloneToken === null) { + goto after_tempCloneToken; + } + + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + + $allowSquashMerge = $object->allowSquashMerge; + + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } + + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + + $allowAutoMerge = $object->allowAutoMerge; + + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; + } + + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; + + $deleteBranchOnMerge = $object->deleteBranchOnMerge; + + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } + + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; + + $allowUpdateBranch = $object->allowUpdateBranch; + + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } + + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; + + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; + + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } + + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; + + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; + } + + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; + + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } + + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; + + $mergeCommitTitle = $object->mergeCommitTitle; + + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } + + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; + + $mergeCommitMessage = $object->mergeCommitMessage; + + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; + } + + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; + + $allowMergeCommit = $object->allowMergeCommit; + + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } + + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + + $subscribersCount = $object->subscribersCount; + + if ($subscribersCount === null) { + goto after_subscribersCount; + } + + after_subscribersCount: $result['subscribers_count'] = $subscribersCount; + + $networkCount = $object->networkCount; + + if ($networkCount === null) { + goto after_networkCount; + } + + after_networkCount: $result['network_count'] = $networkCount; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(mixed $object): mixed + { + assert($object instanceof Owner); + $result = []; + + $login = $object->login; + + if ($login === null) { + goto after_login; + } + + after_login: $result['login'] = $login; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + + if ($nodeId === null) { + goto after_nodeId; + } + + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + + if ($avatarUrl === null) { + goto after_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; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + + if ($followersUrl === null) { + goto after_followersUrl; + } + + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + + if ($followingUrl === null) { + goto after_followingUrl; + } + + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + + if ($gistsUrl === null) { + goto after_gistsUrl; + } + + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + + if ($starredUrl === null) { + goto after_starredUrl; + } + + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + + if ($subscriptionsUrl === null) { + goto after_subscriptionsUrl; + } + + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + + if ($organizationsUrl === null) { + goto after_organizationsUrl; + } + + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + + if ($reposUrl === null) { + goto after_reposUrl; + } + + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + + if ($eventsUrl === null) { + goto after_eventsUrl; + } + + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + + if ($receivedEventsUrl === null) { + goto after_receivedEventsUrl; + } + + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + + if ($type === null) { + goto after_type; + } + + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + + if ($siteAdmin === null) { + goto after_siteAdmin; + } + + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions); + $result = []; + + $admin = $object->admin; + + if ($admin === null) { + goto after_admin; + } + + after_admin: $result['admin'] = $admin; + + $maintain = $object->maintain; + + if ($maintain === null) { + goto after_maintain; + } + + after_maintain: $result['maintain'] = $maintain; + + $push = $object->push; + + if ($push === null) { + goto after_push; + } + + after_push: $result['push'] = $push; + + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; + } + + after_triage: $result['triage'] = $triage; + + $pull = $object->pull; + + if ($pull === null) { + goto after_pull; + } + + after_pull: $result['pull'] = $pull; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks(mixed $object): mixed + { + assert($object instanceof SimpleUserWebhooks); + $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; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesParentIssueRemoved(mixed $object): mixed + { + assert($object instanceof WebhookSubIssuesParentIssueRemoved); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $parentIssueId = $object->parentIssueId; + after_parentIssueId: $result['parent_issue_id'] = $parentIssueId; + + $parentIssue = $object->parentIssue; + $parentIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($parentIssue); + after_parentIssue: $result['parent_issue'] = $parentIssue; + + $parentIssueRepo = $object->parentIssueRepo; + $parentIssueRepo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($parentIssueRepo); + after_parentIssueRepo: $result['parent_issue_repo'] = $parentIssueRepo; + + $subIssueId = $object->subIssueId; + after_subIssueId: $result['sub_issue_id'] = $subIssueId; + + $subIssue = $object->subIssue; + $subIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($subIssue); + after_subIssue: $result['sub_issue'] = $subIssue; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $sender = $object->sender; + + if ($sender === null) { + goto after_sender; + } + + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueAdded(mixed $object): mixed + { + assert($object instanceof WebhookSubIssuesSubIssueAdded); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $subIssueId = $object->subIssueId; + after_subIssueId: $result['sub_issue_id'] = $subIssueId; + + $subIssue = $object->subIssue; + $subIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($subIssue); + after_subIssue: $result['sub_issue'] = $subIssue; + + $subIssueRepo = $object->subIssueRepo; + $subIssueRepo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($subIssueRepo); + after_subIssueRepo: $result['sub_issue_repo'] = $subIssueRepo; + + $parentIssueId = $object->parentIssueId; + after_parentIssueId: $result['parent_issue_id'] = $parentIssueId; + + $parentIssue = $object->parentIssue; + $parentIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($parentIssue); + after_parentIssue: $result['parent_issue'] = $parentIssue; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $sender = $object->sender; + + if ($sender === null) { + goto after_sender; + } + + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSubIssuesSubIssueRemoved(mixed $object): mixed + { + assert($object instanceof WebhookSubIssuesSubIssueRemoved); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $subIssueId = $object->subIssueId; + after_subIssueId: $result['sub_issue_id'] = $subIssueId; + + $subIssue = $object->subIssue; + $subIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($subIssue); + after_subIssue: $result['sub_issue'] = $subIssue; + + $subIssueRepo = $object->subIssueRepo; + $subIssueRepo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($subIssueRepo); + after_subIssueRepo: $result['sub_issue_repo'] = $subIssueRepo; + + $parentIssueId = $object->parentIssueId; + after_parentIssueId: $result['parent_issue_id'] = $parentIssueId; + + $parentIssue = $object->parentIssue; + $parentIssue = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Issue($parentIssue); + after_parentIssue: $result['parent_issue'] = $parentIssue; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $sender = $object->sender; + + if ($sender === null) { + goto after_sender; + } + + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($sender); + after_sender: $result['sender'] = $sender; + + 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/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index 27581827cf4..9a443287eb7 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -709,6 +709,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\WebHook\Sponsorship|null $webHook🪝Sponsorship = null; private Internal\Hydrator\WebHook\Star|null $webHook🪝Star = null; private Internal\Hydrator\WebHook\Status|null $webHook🪝Status = null; + private Internal\Hydrator\WebHook\SubIssues|null $webHook🪝SubIssues = null; private Internal\Hydrator\WebHook\TeamAdd|null $webHook🪝TeamAdd = null; private Internal\Hydrator\WebHook\Team|null $webHook🪝Team = null; private Internal\Hydrator\WebHook\Watch|null $webHook🪝Watch = null; @@ -721,7 +722,7 @@ public function hydrateObject(string $className, array $payload): object return match ($className) { '\\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' => $this->getObjectMapperOperation🌀Advisories🌀GhsaId()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory\\Cvss', '\\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\\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), @@ -745,7 +746,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Apps\\ListReposAccessibleToInstallation\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Installation🌀Repositories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\License' => $this->getObjectMapperOperation🌀Licenses🌀License()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\MarketplacePurchase', '\\ApiClients\\Client\\GitHub\\Schema\\MarketplacePurchase\\MarketplacePendingChange', '\\ApiClients\\Client\\GitHub\\Schema\\MarketplaceListingPlan', '\\ApiClients\\Client\\GitHub\\Schema\\MarketplacePurchase\\MarketplacePurchase' => $this->getObjectMapperOperation🌀MarketplaceListing🌀Accounts🌀AccountId()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\Domains' => $this->getObjectMapperOperation🌀Meta()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\Domains', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\Domains\\ArtifactAttestations' => $this->getObjectMapperOperation🌀Meta()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Activity\\MarkNotificationsAsRead\\Response\\ApplicationJson\\Accepted' => $this->getObjectMapperOperation🌀Notifications()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Thread', '\\ApiClients\\Client\\GitHub\\Schema\\MinimalRepository', '\\ApiClients\\Client\\GitHub\\Schema\\MinimalRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\MinimalRepository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\AdvancedSecurity', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\DependabotSecurityUpdates', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\SecretScanning', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\SecretScanningPushProtection', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\SecretScanningNonProviderPatterns', '\\ApiClients\\Client\\GitHub\\Schema\\Thread\\Subject' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ThreadSubscription' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId🌀Subscription()->hydrateObject($className, $payload), @@ -1044,6 +1045,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCancelled', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Maintainer', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsor', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsorable', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes\\PrivacyLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingCancellation', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingTierChange', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier\\From', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipTierChanged' => $this->getObjectMapperWebHook🪝Sponsorship()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStarCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStarDeleted' => $this->getObjectMapperWebHook🪝Star()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Author', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Author', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Committer', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Tree', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Verification', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Committer' => $this->getObjectMapperWebHook🪝Status()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesParentIssueAdded', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesParentIssueRemoved', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesSubIssueAdded', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesSubIssueRemoved' => $this->getObjectMapperWebHook🪝SubIssues()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAdd', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksTeam1', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksTeam1\\Parent_' => $this->getObjectMapperWebHook🪝TeamAdd()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Description', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Name', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Privacy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\NotificationSetting', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Repository\\Permissions\\From', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\Permissions' => $this->getObjectMapperWebHook🪝Team()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookWatchStarted' => $this->getObjectMapperWebHook🪝Watch()->hydrateObject($className, $payload), @@ -1075,7 +1077,7 @@ public function serializeObjectOfType(object $object, string $className): mixed return match ($className) { '\\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' => $this->getObjectMapperOperation🌀Advisories🌀GhsaId()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\GlobalAdvisory\\Cvss', '\\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\\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), @@ -1099,7 +1101,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Apps\\ListReposAccessibleToInstallation\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Installation🌀Repositories()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\License' => $this->getObjectMapperOperation🌀Licenses🌀License()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\MarketplacePurchase', '\\ApiClients\\Client\\GitHub\\Schema\\MarketplacePurchase\\MarketplacePendingChange', '\\ApiClients\\Client\\GitHub\\Schema\\MarketplaceListingPlan', '\\ApiClients\\Client\\GitHub\\Schema\\MarketplacePurchase\\MarketplacePurchase' => $this->getObjectMapperOperation🌀MarketplaceListing🌀Accounts🌀AccountId()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\Domains' => $this->getObjectMapperOperation🌀Meta()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\Domains', '\\ApiClients\\Client\\GitHub\\Schema\\ApiOverview\\Domains\\ArtifactAttestations' => $this->getObjectMapperOperation🌀Meta()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Activity\\MarkNotificationsAsRead\\Response\\ApplicationJson\\Accepted' => $this->getObjectMapperOperation🌀Notifications()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Thread', '\\ApiClients\\Client\\GitHub\\Schema\\MinimalRepository', '\\ApiClients\\Client\\GitHub\\Schema\\MinimalRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\MinimalRepository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\AdvancedSecurity', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\DependabotSecurityUpdates', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\SecretScanning', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\SecretScanningPushProtection', '\\ApiClients\\Client\\GitHub\\Schema\\SecurityAndAnalysis\\SecretScanningNonProviderPatterns', '\\ApiClients\\Client\\GitHub\\Schema\\Thread\\Subject' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ThreadSubscription' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId🌀Subscription()->serializeObject($object), @@ -1398,6 +1400,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCancelled', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Maintainer', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsor', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsorable', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes\\PrivacyLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingCancellation', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingTierChange', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier\\From', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipTierChanged' => $this->getObjectMapperWebHook🪝Sponsorship()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStarCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStarDeleted' => $this->getObjectMapperWebHook🪝Star()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Author', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Author', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Committer', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Tree', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Commit\\Verification', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookStatus\\Commit\\Committer' => $this->getObjectMapperWebHook🪝Status()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesParentIssueAdded', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesParentIssueRemoved', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesSubIssueAdded', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSubIssuesSubIssueRemoved' => $this->getObjectMapperWebHook🪝SubIssues()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAdd', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksTeam1', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksTeam1\\Parent_' => $this->getObjectMapperWebHook🪝TeamAdd()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamAddedToRepository\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamCreated\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamDeleted\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Description', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Name', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Privacy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\NotificationSetting', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Changes\\Repository\\Permissions\\From', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamEdited\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\License', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookTeamRemovedFromRepository\\Repository\\Permissions' => $this->getObjectMapperWebHook🪝Team()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookWatchStarted' => $this->getObjectMapperWebHook🪝Watch()->serializeObject($object), @@ -7701,6 +7704,15 @@ public function getObjectMapperWebHook🪝Status(): Internal\Hydrator\WebHook\St return $this->webHook🪝Status; } + public function getObjectMapperWebHook🪝SubIssues(): Internal\Hydrator\WebHook\SubIssues + { + if ($this->webHook🪝SubIssues instanceof Internal\Hydrator\WebHook\SubIssues === false) { + $this->webHook🪝SubIssues = new Internal\Hydrator\WebHook\SubIssues(); + } + + return $this->webHook🪝SubIssues; + } + public function getObjectMapperWebHook🪝TeamAdd(): Internal\Hydrator\WebHook\TeamAdd { if ($this->webHook🪝TeamAdd instanceof Internal\Hydrator\WebHook\TeamAdd === false) { diff --git a/clients/GitHub/src/Internal/Operation/SecurityAdvisories/ListGlobalAdvisories.php b/clients/GitHub/src/Internal/Operation/SecurityAdvisories/ListGlobalAdvisories.php index ffb8c3b449f..095fa14891d 100644 --- a/clients/GitHub/src/Internal/Operation/SecurityAdvisories/ListGlobalAdvisories.php +++ b/clients/GitHub/src/Internal/Operation/SecurityAdvisories/ListGlobalAdvisories.php @@ -56,6 +56,12 @@ final class ListGlobalAdvisories For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." **/ private string $modified; + /**If specified, only return advisories that have an EPSS percentage score that matches the provided value. + The EPSS percentage represents the likelihood of a CVE being exploited. **/ + private string $epssPercentage; + /**If specified, only return advisories that have an EPSS percentile score that matches the provided value. + The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs. **/ + private string $epssPercentile; /**A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private string $before; /**A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -69,29 +75,31 @@ final class ListGlobalAdvisories /**The property to sort the results by. **/ private string $sort; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Advisories $hydrator, string $ghsaId, string $cveId, string $ecosystem, string $severity, $cwes, bool $isWithdrawn, $affects, string $published, string $updated, string $modified, string $before, string $after, string $type = 'reviewed', string $direction = 'desc', int $perPage = 30, string $sort = 'published') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Advisories $hydrator, string $ghsaId, string $cveId, string $ecosystem, string $severity, $cwes, bool $isWithdrawn, $affects, string $published, string $updated, string $modified, string $epssPercentage, string $epssPercentile, string $before, string $after, string $type = 'reviewed', string $direction = 'desc', int $perPage = 30, string $sort = 'published') { - $this->ghsaId = $ghsaId; - $this->cveId = $cveId; - $this->ecosystem = $ecosystem; - $this->severity = $severity; - $this->cwes = $cwes; - $this->isWithdrawn = $isWithdrawn; - $this->affects = $affects; - $this->published = $published; - $this->updated = $updated; - $this->modified = $modified; - $this->before = $before; - $this->after = $after; - $this->type = $type; - $this->direction = $direction; - $this->perPage = $perPage; - $this->sort = $sort; + $this->ghsaId = $ghsaId; + $this->cveId = $cveId; + $this->ecosystem = $ecosystem; + $this->severity = $severity; + $this->cwes = $cwes; + $this->isWithdrawn = $isWithdrawn; + $this->affects = $affects; + $this->published = $published; + $this->updated = $updated; + $this->modified = $modified; + $this->epssPercentage = $epssPercentage; + $this->epssPercentile = $epssPercentile; + $this->before = $before; + $this->after = $after; + $this->type = $type; + $this->direction = $direction; + $this->perPage = $perPage; + $this->sort = $sort; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{ghsa_id}', '{cve_id}', '{ecosystem}', '{severity}', '{cwes}', '{is_withdrawn}', '{affects}', '{published}', '{updated}', '{modified}', '{before}', '{after}', '{type}', '{direction}', '{per_page}', '{sort}'], [$this->ghsaId, $this->cveId, $this->ecosystem, $this->severity, $this->cwes, $this->isWithdrawn, $this->affects, $this->published, $this->updated, $this->modified, $this->before, $this->after, $this->type, $this->direction, $this->perPage, $this->sort], '/advisories' . '?ghsa_id={ghsa_id}&cve_id={cve_id}&ecosystem={ecosystem}&severity={severity}&cwes={cwes}&is_withdrawn={is_withdrawn}&affects={affects}&published={published}&updated={updated}&modified={modified}&before={before}&after={after}&type={type}&direction={direction}&per_page={per_page}&sort={sort}')); + return new Request('GET', str_replace(['{ghsa_id}', '{cve_id}', '{ecosystem}', '{severity}', '{cwes}', '{is_withdrawn}', '{affects}', '{published}', '{updated}', '{modified}', '{epss_percentage}', '{epss_percentile}', '{before}', '{after}', '{type}', '{direction}', '{per_page}', '{sort}'], [$this->ghsaId, $this->cveId, $this->ecosystem, $this->severity, $this->cwes, $this->isWithdrawn, $this->affects, $this->published, $this->updated, $this->modified, $this->epssPercentage, $this->epssPercentile, $this->before, $this->after, $this->type, $this->direction, $this->perPage, $this->sort], '/advisories' . '?ghsa_id={ghsa_id}&cve_id={cve_id}&ecosystem={ecosystem}&severity={severity}&cwes={cwes}&is_withdrawn={is_withdrawn}&affects={affects}&published={published}&updated={updated}&modified={modified}&epss_percentage={epss_percentage}&epss_percentile={epss_percentile}&before={before}&after={after}&type={type}&direction={direction}&per_page={per_page}&sort={sort}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operator/Git/CreateBlob.php b/clients/GitHub/src/Internal/Operator/Git/CreateBlob.php index ab5f3cab756..d68b7560f9b 100644 --- a/clients/GitHub/src/Internal/Operator/Git/CreateBlob.php +++ b/clients/GitHub/src/Internal/Operator/Git/CreateBlob.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $owner, string $repo, array $params): ShortBlob { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Git\CreateBlob($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo); diff --git a/clients/GitHub/src/Internal/Operator/Repos/CreateOrUpdateFileContents.php b/clients/GitHub/src/Internal/Operator/Repos/CreateOrUpdateFileContents.php index d99d5fa1ced..66e5c9f949f 100644 --- a/clients/GitHub/src/Internal/Operator/Repos/CreateOrUpdateFileContents.php +++ b/clients/GitHub/src/Internal/Operator/Repos/CreateOrUpdateFileContents.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $owner, string $repo, string $path, array $params): FileCommit { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\CreateOrUpdateFileContents($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo, $path); diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php index 41a6988bc1b..ad1a2e838c6 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $enterprise, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\SecretScanning\ListAlertsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php index bbdcd4b2b52..4debcb447fd 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\SecretScanning\ListAlertsForOrg($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php index 66d885696e2..36132a93b12 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\SecretScanning\ListAlertsForOrgListing($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php index 2845e886776..0613105c624 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/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 $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\SecretScanning\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php index dc29b13e1f9..f3c5b044a0b 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/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 $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\SecretScanning\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php b/clients/GitHub/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php index 8f6cc77430a..f977b0c2b35 100644 --- a/clients/GitHub/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php +++ b/clients/GitHub/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $ghsaId, string $cveId, string $ecosystem, string $severity, $cwes, bool $isWithdrawn, $affects, string $published, string $updated, string $modified, string $before, string $after, string $type = 'reviewed', string $direction = 'desc', int $perPage = 30, string $sort = 'published'): iterable + /** @return iterable */ + public function call(string $ghsaId, string $cveId, string $ecosystem, string $severity, $cwes, bool $isWithdrawn, $affects, string $published, string $updated, string $modified, string $epssPercentage, string $epssPercentile, string $before, string $after, string $type = 'reviewed', string $direction = 'desc', int $perPage = 30, string $sort = 'published'): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\SecurityAdvisories\ListGlobalAdvisories($this->responseSchemaValidator, $this->hydrator, $ghsaId, $cveId, $ecosystem, $severity, $cwes, $isWithdrawn, $affects, $published, $updated, $modified, $before, $after, $type, $direction, $perPage, $sort); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\SecurityAdvisories\ListGlobalAdvisories($this->responseSchemaValidator, $this->hydrator, $ghsaId, $cveId, $ecosystem, $severity, $cwes, $isWithdrawn, $affects, $published, $updated, $modified, $epssPercentage, $epssPercentile, $before, $after, $type, $direction, $perPage, $sort); $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): Observable { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Router/Get/Five.php b/clients/GitHub/src/Internal/Router/Get/Five.php index c2269671e48..eb8ff68cb4f 100644 --- a/clients/GitHub/src/Internal/Router/Get/Five.php +++ b/clients/GitHub/src/Internal/Router/Get/Five.php @@ -51,7 +51,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|WithoutBody|iterable|Observable|Observable|Schema\BasicError|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 */ + /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|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\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|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] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/SecretScanning.php b/clients/GitHub/src/Internal/Router/Get/SecretScanning.php index d0d4eca5581..b2012483e9b 100644 --- a/clients/GitHub/src/Internal/Router/Get/SecretScanning.php +++ b/clients/GitHub/src/Internal/Router/Get/SecretScanning.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable */ + /** @return Observable */ public function listAlertsForEnterprise(array $params): iterable { $arguments = []; @@ -90,7 +90,7 @@ public function listAlertsForEnterprise(array $params): iterable return $operator->call($arguments['enterprise'], $arguments['state'], $arguments['secret_type'], $arguments['resolution'], $arguments['before'], $arguments['after'], $arguments['validity'], $arguments['sort'], $arguments['direction'], $arguments['per_page']); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForOrg(array $params): iterable { $arguments = []; @@ -165,7 +165,7 @@ public function listAlertsForOrg(array $params): iterable return $operator->call($arguments['org'], $arguments['state'], $arguments['secret_type'], $arguments['resolution'], $arguments['before'], $arguments['after'], $arguments['validity'], $arguments['sort'], $arguments['direction'], $arguments['page'], $arguments['per_page']); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/SecurityAdvisories.php b/clients/GitHub/src/Internal/Router/Get/SecurityAdvisories.php index 42ba54c52a2..557c1d546d0 100644 --- a/clients/GitHub/src/Internal/Router/Get/SecurityAdvisories.php +++ b/clients/GitHub/src/Internal/Router/Get/SecurityAdvisories.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return Observable */ + /** @return iterable */ public function listGlobalAdvisories(array $params): iterable { $arguments = []; @@ -85,6 +85,18 @@ public function listGlobalAdvisories(array $params): iterable $arguments['modified'] = $params['modified']; unset($params['modified']); + if (array_key_exists('epss_percentage', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: epss_percentage'); + } + + $arguments['epss_percentage'] = $params['epss_percentage']; + unset($params['epss_percentage']); + if (array_key_exists('epss_percentile', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: epss_percentile'); + } + + $arguments['epss_percentile'] = $params['epss_percentile']; + unset($params['epss_percentile']); if (array_key_exists('before', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: before'); } @@ -123,7 +135,7 @@ public function listGlobalAdvisories(array $params): iterable unset($params['sort']); $operator = new Internal\Operator\SecurityAdvisories\ListGlobalAdvisories($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Advisories()); - return $operator->call($arguments['ghsa_id'], $arguments['cve_id'], $arguments['ecosystem'], $arguments['severity'], $arguments['cwes'], $arguments['is_withdrawn'], $arguments['affects'], $arguments['published'], $arguments['updated'], $arguments['modified'], $arguments['before'], $arguments['after'], $arguments['type'], $arguments['direction'], $arguments['per_page'], $arguments['sort']); + return $operator->call($arguments['ghsa_id'], $arguments['cve_id'], $arguments['ecosystem'], $arguments['severity'], $arguments['cwes'], $arguments['is_withdrawn'], $arguments['affects'], $arguments['published'], $arguments['updated'], $arguments['modified'], $arguments['epss_percentage'], $arguments['epss_percentile'], $arguments['before'], $arguments['after'], $arguments['type'], $arguments['direction'], $arguments['per_page'], $arguments['sort']); } /** @return */ diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index 10a6e2db26a..e60a802fe22 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -74,7 +74,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|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 */ + /** @return |Observable|Observable|Observable|WithoutBody|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): Ok|iterable|ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|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|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] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Two.php b/clients/GitHub/src/Internal/Router/Get/Two.php index e177dd7d04e..a62657f2277 100644 --- a/clients/GitHub/src/Internal/Router/Get/Two.php +++ b/clients/GitHub/src/Internal/Router/Get/Two.php @@ -22,7 +22,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return iterable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|Integration|WithoutBody|Json|Feed|ApiOverview|ResponseInterface|RateLimitOverview|PrivateUser|PublicUser|string { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/Five.php b/clients/GitHub/src/Internal/Router/List/Five.php index 5d2b10b2243..54dd93858a9 100644 --- a/clients/GitHub/src/Internal/Router/List/Five.php +++ b/clients/GitHub/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return 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 */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/SecretScanning.php b/clients/GitHub/src/Internal/Router/List/SecretScanning.php index 156b6b23131..2211a787814 100644 --- a/clients/GitHub/src/Internal/Router/List/SecretScanning.php +++ b/clients/GitHub/src/Internal/Router/List/SecretScanning.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable */ + /** @return Observable */ public function listAlertsForOrgListing(array $params): iterable { $arguments = []; @@ -102,7 +102,7 @@ public function listAlertsForOrgListing(array $params): iterable } while (count($items) > 0); } - /** @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 17d22611e2e..e2afcb66c84 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|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|WithoutBody|Observable|Observable|Observable|Observable */ + /** @return 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/Post/Git.php b/clients/GitHub/src/Internal/Router/Post/Git.php index a503f39569d..ef22edbbfd7 100644 --- a/clients/GitHub/src/Internal/Router/Post/Git.php +++ b/clients/GitHub/src/Internal/Router/Post/Git.php @@ -23,6 +23,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + /** @return */ public function createBlob(array $params): ShortBlob { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Post/Six.php b/clients/GitHub/src/Internal/Router/Post/Six.php index 59201752012..0e5fe014569 100644 --- a/clients/GitHub/src/Internal/Router/Post/Six.php +++ b/clients/GitHub/src/Internal/Router/Post/Six.php @@ -34,7 +34,6 @@ public function __construct(private Routers $routers) { } - /** @return |Schema\ShortBlob */ public function call(string $call, array $params, array $pathChunks): Json|Created|AuthenticationToken|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|TeamDiscussion|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|EmptyObject|CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|ShortBlob|GitCommit|GitRef|GitTag|GitTree|PageBuildStatus|PageDeployment|ReleaseNotesContent|SecretScanningPushProtectionBypass|RepositoryAdvisory|Status|TagProtection|TeamDiscussionComment|Reaction { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Put/Repos.php b/clients/GitHub/src/Internal/Router/Put/Repos.php index f6b3bcac366..ce7aac4b55f 100644 --- a/clients/GitHub/src/Internal/Router/Put/Repos.php +++ b/clients/GitHub/src/Internal/Router/Put/Repos.php @@ -207,6 +207,7 @@ public function addCollaborator(array $params): RepositoryInvitation|WithoutBody return $operator->call($arguments['owner'], $arguments['repo'], $arguments['username'], $params); } + /** @return */ public function createOrUpdateFileContents(array $params): FileCommit { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Put/Six.php b/clients/GitHub/src/Internal/Router/Put/Six.php index 5ed3389f8f9..af284384afe 100644 --- a/clients/GitHub/src/Internal/Router/Put/Six.php +++ b/clients/GitHub/src/Internal/Router/Put/Six.php @@ -20,7 +20,6 @@ public function __construct(private Routers $routers) { } - /** @return |Schema\FileCommit */ public function call(string $call, array $params, array $pathChunks): WithoutBody|EmptyObject|CustomProperty|RepositoryInvitation|FileCommit|Environment|RepositoryRuleset { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/WebHook/SubIssues.php b/clients/GitHub/src/Internal/WebHook/SubIssues.php new file mode 100644 index 00000000000..830fb7a5536 --- /dev/null +++ b/clients/GitHub/src/Internal/WebHook/SubIssues.php @@ -0,0 +1,99 @@ +requestSchemaValidator->validate($headers['user-agent'], Reader::readFromJson(Schema\WebHookHeader\UserAgent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-event'], Reader::readFromJson(Schema\WebHookHeader\XGithubEvent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-type'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetType::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-delivery'], Reader::readFromJson(Schema\WebHookHeader\XGitHubDelivery::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-hub-signature-256'], Reader::readFromJson(Schema\WebHookHeader\XHubSignature::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookSubIssuesParentIssueAdded::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookSubIssuesParentIssueAdded::class, $data); + } catch (Throwable) { + goto actions_aaaaa; + } + } + + actions_aaaaa: + if ($headers['content-type'] === 'application/json') { + try { + $this->requestSchemaValidator->validate($headers['user-agent'], Reader::readFromJson(Schema\WebHookHeader\UserAgent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-event'], Reader::readFromJson(Schema\WebHookHeader\XGithubEvent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-type'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetType::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-delivery'], Reader::readFromJson(Schema\WebHookHeader\XGitHubDelivery::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-hub-signature-256'], Reader::readFromJson(Schema\WebHookHeader\XHubSignature::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookSubIssuesParentIssueRemoved::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookSubIssuesParentIssueRemoved::class, $data); + } catch (Throwable) { + goto actions_aaaab; + } + } + + actions_aaaab: + if ($headers['content-type'] === 'application/json') { + try { + $this->requestSchemaValidator->validate($headers['user-agent'], Reader::readFromJson(Schema\WebHookHeader\UserAgent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-event'], Reader::readFromJson(Schema\WebHookHeader\XGithubEvent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-type'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetType::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-delivery'], Reader::readFromJson(Schema\WebHookHeader\XGitHubDelivery::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-hub-signature-256'], Reader::readFromJson(Schema\WebHookHeader\XHubSignature::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookSubIssuesSubIssueAdded::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookSubIssuesSubIssueAdded::class, $data); + } catch (Throwable) { + goto actions_aaaac; + } + } + + actions_aaaac: + if ($headers['content-type'] === 'application/json') { + try { + $this->requestSchemaValidator->validate($headers['user-agent'], Reader::readFromJson(Schema\WebHookHeader\UserAgent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-event'], Reader::readFromJson(Schema\WebHookHeader\XGithubEvent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-type'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetType::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-delivery'], Reader::readFromJson(Schema\WebHookHeader\XGitHubDelivery::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-hub-signature-256'], Reader::readFromJson(Schema\WebHookHeader\XHubSignature::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookSubIssuesSubIssueRemoved::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookSubIssuesSubIssueRemoved::class, $data); + } catch (Throwable) { + goto actions_aaaad; + } + } + + actions_aaaad: + throw $error; + } +} diff --git a/clients/GitHub/src/Operation/Git.php b/clients/GitHub/src/Operation/Git.php index 2d5a525d952..27e84615772 100644 --- a/clients/GitHub/src/Operation/Git.php +++ b/clients/GitHub/src/Operation/Git.php @@ -20,6 +20,7 @@ public function __construct(private Internal\Operators $operators) { } + /** @return */ public function createBlob(string $owner, string $repo, array $params): ShortBlob { return $this->operators->git👷CreateBlob()->call($owner, $repo, $params); diff --git a/clients/GitHub/src/Operation/Repos.php b/clients/GitHub/src/Operation/Repos.php index 4607606db5f..26fa3f0f357 100644 --- a/clients/GitHub/src/Operation/Repos.php +++ b/clients/GitHub/src/Operation/Repos.php @@ -605,6 +605,7 @@ public function getContent(string $owner, string $repo, string $path, string $re return $this->operators->repos👷GetContent()->call($owner, $repo, $path, $ref); } + /** @return */ public function createOrUpdateFileContents(string $owner, string $repo, string $path, array $params): FileCommit { return $this->operators->repos👷CreateOrUpdateFileContents()->call($owner, $repo, $path, $params); diff --git a/clients/GitHub/src/Operation/SecretScanning.php b/clients/GitHub/src/Operation/SecretScanning.php index e528f884822..b850f11d51b 100644 --- a/clients/GitHub/src/Operation/SecretScanning.php +++ b/clients/GitHub/src/Operation/SecretScanning.php @@ -16,31 +16,31 @@ public function __construct(private Internal\Operators $operators) { } - /** @return iterable */ + /** @return Observable */ public function listAlertsForEnterprise(string $enterprise, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $perPage): iterable { return $this->operators->secretScanning👷ListAlertsForEnterprise()->call($enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForOrg(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable { return $this->operators->secretScanning👷ListAlertsForOrg()->call($org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForOrgListing(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable { return $this->operators->secretScanning👷ListAlertsForOrgListing()->call($org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable|WithoutBody { return $this->operators->secretScanning👷ListAlertsForRepo()->call($owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepoListing(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable|WithoutBody { return $this->operators->secretScanning👷ListAlertsForRepoListing()->call($owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHub/src/Operation/SecurityAdvisories.php b/clients/GitHub/src/Operation/SecurityAdvisories.php index 16c697e886e..a57b9e4df3b 100644 --- a/clients/GitHub/src/Operation/SecurityAdvisories.php +++ b/clients/GitHub/src/Operation/SecurityAdvisories.php @@ -17,10 +17,10 @@ public function __construct(private Internal\Operators $operators) { } - /** @return Observable */ - public function listGlobalAdvisories(string $ghsaId, string $cveId, string $ecosystem, string $severity, mixed $cwes, bool $isWithdrawn, mixed $affects, string $published, string $updated, string $modified, string $before, string $after, string $type, string $direction, int $perPage, string $sort): iterable + /** @return iterable */ + public function listGlobalAdvisories(string $ghsaId, string $cveId, string $ecosystem, string $severity, mixed $cwes, bool $isWithdrawn, mixed $affects, string $published, string $updated, string $modified, string $epssPercentage, string $epssPercentile, string $before, string $after, string $type, string $direction, int $perPage, string $sort): iterable { - return $this->operators->securityAdvisories👷ListGlobalAdvisories()->call($ghsaId, $cveId, $ecosystem, $severity, $cwes, $isWithdrawn, $affects, $published, $updated, $modified, $before, $after, $type, $direction, $perPage, $sort); + return $this->operators->securityAdvisories👷ListGlobalAdvisories()->call($ghsaId, $cveId, $ecosystem, $severity, $cwes, $isWithdrawn, $affects, $published, $updated, $modified, $epssPercentage, $epssPercentile, $before, $after, $type, $direction, $perPage, $sort); } /** @return */ diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 5a53c51fabc..7ec8c1b78fd 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -48,7 +48,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /advisories') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /advisories/{ghsa_id}') { @@ -208,7 +208,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /enterprises/{enterprise}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage') { @@ -1324,11 +1324,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/security-advisories') { @@ -2460,7 +2460,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PUT /repos/{owner}/{repo}/contents/{path}') { - return $this->typeResolver->resolve('Schema\\FileCommit'); + return $this->typeResolver->resolve(''); } if ($call === 'DELETE /repos/{owner}/{repo}/contents/{path}') { @@ -2680,7 +2680,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /repos/{owner}/{repo}/git/blobs') { - return $this->typeResolver->resolve('Schema\\ShortBlob'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /repos/{owner}/{repo}/git/blobs/{file_sha}') { @@ -3476,11 +3476,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'LIST /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}') { diff --git a/clients/GitHub/src/Schema/ApiOverview.php b/clients/GitHub/src/Schema/ApiOverview.php index 57d251dbb40..525d7d4e244 100644 --- a/clients/GitHub/src/Schema/ApiOverview.php +++ b/clients/GitHub/src/Schema/ApiOverview.php @@ -203,6 +203,26 @@ "example.com" ] } + }, + "artifact_attestations": { + "type": "object", + "properties": { + "trust_domain": { + "type": "string", + "examples": [ + "example" + ] + }, + "services": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "example.com" + ] + } + } + } } } } @@ -291,7 +311,14 @@ "actions": [ "generated", "generated" - ] + ], + "artifact_attestations": { + "trust_domain": "example", + "services": [ + "generated", + "generated" + ] + } } }'; diff --git a/clients/GitHub/src/Schema/ApiOverview/Domains.php b/clients/GitHub/src/Schema/ApiOverview/Domains.php index 36a04dbf775..635d1e99d37 100644 --- a/clients/GitHub/src/Schema/ApiOverview/Domains.php +++ b/clients/GitHub/src/Schema/ApiOverview/Domains.php @@ -4,6 +4,9 @@ namespace ApiClients\Client\GitHub\Schema\ApiOverview; +use ApiClients\Client\GitHub\Schema; +use EventSauce\ObjectHydrator\MapFrom; + final readonly class Domains { public const SCHEMA_JSON = '{ @@ -53,6 +56,26 @@ "example.com" ] } + }, + "artifact_attestations": { + "type": "object", + "properties": { + "trust_domain": { + "type": "string", + "examples": [ + "example" + ] + }, + "services": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "example.com" + ] + } + } + } } } }'; @@ -78,10 +101,18 @@ "actions": [ "generated", "generated" - ] + ], + "artifact_attestations": { + "trust_domain": "example", + "services": [ + "generated", + "generated" + ] + } }'; - public function __construct(public array|null $website, public array|null $codespaces, public array|null $copilot, public array|null $packages, public array|null $actions) + public function __construct(public array|null $website, public array|null $codespaces, public array|null $copilot, public array|null $packages, public array|null $actions, #[MapFrom('artifact_attestations')] + public Schema\ApiOverview\Domains\ArtifactAttestations|null $artifactAttestations,) { } } diff --git a/clients/GitHub/src/Schema/ApiOverview/Domains/ArtifactAttestations.php b/clients/GitHub/src/Schema/ApiOverview/Domains/ArtifactAttestations.php new file mode 100644 index 00000000000..30a69d0692d --- /dev/null +++ b/clients/GitHub/src/Schema/ApiOverview/Domains/ArtifactAttestations.php @@ -0,0 +1,45 @@ + $object::class, 'data' => $this->hydrator->serializeObject($object)]; } - /** @return Schema\WebhookBranchProtectionConfigurationDisabled|Schema\WebhookBranchProtectionConfigurationEnabled|Schema\WebhookBranchProtectionRuleCreated|Schema\WebhookBranchProtectionRuleDeleted|Schema\WebhookBranchProtectionRuleEdited|Schema\WebhookCheckRunCompleted|Schema\WebhookCheckRunCompletedFormEncoded|Schema\WebhookCheckRunCreated|Schema\WebhookCheckRunCreatedFormEncoded|Schema\WebhookCheckRunRequestedAction|Schema\WebhookCheckRunRequestedActionFormEncoded|Schema\WebhookCheckRunRerequested|Schema\WebhookCheckRunRerequestedFormEncoded|Schema\WebhookCheckSuiteCompleted|Schema\WebhookCheckSuiteRequested|Schema\WebhookCheckSuiteRerequested|Schema\WebhookCodeScanningAlertAppearedInBranch|Schema\WebhookCodeScanningAlertClosedByUser|Schema\WebhookCodeScanningAlertCreated|Schema\WebhookCodeScanningAlertFixed|Schema\WebhookCodeScanningAlertReopened|Schema\WebhookCodeScanningAlertReopenedByUser|Schema\WebhookCommitCommentCreated|Schema\WebhookCreate|Schema\WebhookCustomPropertyCreated|Schema\WebhookCustomPropertyDeleted|Schema\WebhookCustomPropertyUpdated|Schema\WebhookCustomPropertyValuesUpdated|Schema\WebhookDelete|Schema\WebhookDependabotAlertAutoDismissed|Schema\WebhookDependabotAlertAutoReopened|Schema\WebhookDependabotAlertCreated|Schema\WebhookDependabotAlertDismissed|Schema\WebhookDependabotAlertFixed|Schema\WebhookDependabotAlertReintroduced|Schema\WebhookDependabotAlertReopened|Schema\WebhookDeployKeyCreated|Schema\WebhookDeployKeyDeleted|Schema\WebhookDeploymentCreated|Schema\WebhookDeploymentProtectionRuleRequested|Schema\WebhookDeploymentReviewApproved|Schema\WebhookDeploymentReviewRejected|Schema\WebhookDeploymentReviewRequested|Schema\WebhookDeploymentStatusCreated|Schema\WebhookDiscussionAnswered|Schema\WebhookDiscussionCategoryChanged|Schema\WebhookDiscussionClosed|Schema\WebhookDiscussionCreated|Schema\WebhookDiscussionDeleted|Schema\WebhookDiscussionEdited|Schema\WebhookDiscussionLabeled|Schema\WebhookDiscussionLocked|Schema\WebhookDiscussionPinned|Schema\WebhookDiscussionReopened|Schema\WebhookDiscussionTransferred|Schema\WebhookDiscussionUnanswered|Schema\WebhookDiscussionUnlabeled|Schema\WebhookDiscussionUnlocked|Schema\WebhookDiscussionUnpinned|Schema\WebhookDiscussionCommentCreated|Schema\WebhookDiscussionCommentDeleted|Schema\WebhookDiscussionCommentEdited|Schema\WebhookFork|Schema\WebhookGithubAppAuthorizationRevoked|Schema\WebhookGollum|Schema\WebhookInstallationCreated|Schema\WebhookInstallationDeleted|Schema\WebhookInstallationNewPermissionsAccepted|Schema\WebhookInstallationSuspend|Schema\WebhookInstallationUnsuspend|Schema\WebhookInstallationRepositoriesAdded|Schema\WebhookInstallationRepositoriesRemoved|Schema\WebhookInstallationTargetRenamed|Schema\WebhookIssueCommentCreated|Schema\WebhookIssueCommentDeleted|Schema\WebhookIssueCommentEdited|Schema\WebhookIssuesAssigned|Schema\WebhookIssuesClosed|Schema\WebhookIssuesDeleted|Schema\WebhookIssuesDemilestoned|Schema\WebhookIssuesEdited|Schema\WebhookIssuesLabeled|Schema\WebhookIssuesLocked|Schema\WebhookIssuesMilestoned|Schema\WebhookIssuesOpened|Schema\WebhookIssuesPinned|Schema\WebhookIssuesReopened|Schema\WebhookIssuesTransferred|Schema\WebhookIssuesUnassigned|Schema\WebhookIssuesUnlabeled|Schema\WebhookIssuesUnlocked|Schema\WebhookIssuesUnpinned|Schema\WebhookLabelCreated|Schema\WebhookLabelDeleted|Schema\WebhookLabelEdited|Schema\WebhookMarketplacePurchaseCancelled|Schema\WebhookMarketplacePurchaseChanged|Schema\WebhookMarketplacePurchasePendingChange|Schema\WebhookMarketplacePurchasePendingChangeCancelled|Schema\WebhookMarketplacePurchasePurchased|Schema\WebhookMemberAdded|Schema\WebhookMemberEdited|Schema\WebhookMemberRemoved|Schema\WebhookMembershipAdded|Schema\WebhookMembershipRemoved|Schema\WebhookMergeGroupChecksRequested|Schema\WebhookMergeGroupDestroyed|Schema\WebhookMetaDeleted|Schema\WebhookMilestoneClosed|Schema\WebhookMilestoneCreated|Schema\WebhookMilestoneDeleted|Schema\WebhookMilestoneEdited|Schema\WebhookMilestoneOpened|Schema\WebhookOrgBlockBlocked|Schema\WebhookOrgBlockUnblocked|Schema\WebhookOrganizationDeleted|Schema\WebhookOrganizationMemberAdded|Schema\WebhookOrganizationMemberInvited|Schema\WebhookOrganizationMemberRemoved|Schema\WebhookOrganizationRenamed|Schema\WebhookPackagePublished|Schema\WebhookPackageUpdated|Schema\WebhookPageBuild|Schema\WebhookPersonalAccessTokenRequestApproved|Schema\WebhookPersonalAccessTokenRequestCancelled|Schema\WebhookPersonalAccessTokenRequestCreated|Schema\WebhookPersonalAccessTokenRequestDenied|Schema\WebhookPing|Schema\WebhookPingFormEncoded|Schema\WebhookProjectCardConverted|Schema\WebhookProjectCardCreated|Schema\WebhookProjectCardDeleted|Schema\WebhookProjectCardEdited|Schema\WebhookProjectCardMoved|Schema\WebhookProjectClosed|Schema\WebhookProjectCreated|Schema\WebhookProjectDeleted|Schema\WebhookProjectEdited|Schema\WebhookProjectReopened|Schema\WebhookProjectColumnCreated|Schema\WebhookProjectColumnDeleted|Schema\WebhookProjectColumnEdited|Schema\WebhookProjectColumnMoved|Schema\WebhookProjectsV2ProjectClosed|Schema\WebhookProjectsV2ProjectCreated|Schema\WebhookProjectsV2ProjectDeleted|Schema\WebhookProjectsV2ProjectEdited|Schema\WebhookProjectsV2ProjectReopened|Schema\WebhookProjectsV2ItemArchived|Schema\WebhookProjectsV2ItemConverted|Schema\WebhookProjectsV2ItemCreated|Schema\WebhookProjectsV2ItemDeleted|Schema\WebhookProjectsV2ItemEdited|Schema\WebhookProjectsV2ItemReordered|Schema\WebhookProjectsV2ItemRestored|Schema\WebhookProjectsV2StatusUpdateCreated|Schema\WebhookProjectsV2StatusUpdateDeleted|Schema\WebhookProjectsV2StatusUpdateEdited|Schema\WebhookPublic|Schema\WebhookPullRequestAssigned|Schema\WebhookPullRequestAutoMergeDisabled|Schema\WebhookPullRequestAutoMergeEnabled|Schema\WebhookPullRequestClosed|Schema\WebhookPullRequestConvertedToDraft|Schema\WebhookPullRequestDemilestoned|Schema\WebhookPullRequestDequeued|Schema\WebhookPullRequestEdited|Schema\WebhookPullRequestEnqueued|Schema\WebhookPullRequestLabeled|Schema\WebhookPullRequestLocked|Schema\WebhookPullRequestMilestoned|Schema\WebhookPullRequestOpened|Schema\WebhookPullRequestReadyForReview|Schema\WebhookPullRequestReopened|Schema\WebhookPullRequestReviewRequestRemoved|Schema\WebhookPullRequestReviewRequested|Schema\WebhookPullRequestSynchronize|Schema\WebhookPullRequestUnassigned|Schema\WebhookPullRequestUnlabeled|Schema\WebhookPullRequestUnlocked|Schema\WebhookPullRequestReviewCommentCreated|Schema\WebhookPullRequestReviewCommentDeleted|Schema\WebhookPullRequestReviewCommentEdited|Schema\WebhookPullRequestReviewDismissed|Schema\WebhookPullRequestReviewEdited|Schema\WebhookPullRequestReviewSubmitted|Schema\WebhookPullRequestReviewThreadResolved|Schema\WebhookPullRequestReviewThreadUnresolved|Schema\WebhookPush|Schema\WebhookRegistryPackagePublished|Schema\WebhookRegistryPackageUpdated|Schema\WebhookReleaseCreated|Schema\WebhookReleaseDeleted|Schema\WebhookReleaseEdited|Schema\WebhookReleasePrereleased|Schema\WebhookReleasePublished|Schema\WebhookReleaseReleased|Schema\WebhookReleaseUnpublished|Schema\WebhookRepositoryAdvisoryPublished|Schema\WebhookRepositoryAdvisoryReported|Schema\WebhookRepositoryArchived|Schema\WebhookRepositoryCreated|Schema\WebhookRepositoryDeleted|Schema\WebhookRepositoryEdited|Schema\WebhookRepositoryPrivatized|Schema\WebhookRepositoryPublicized|Schema\WebhookRepositoryRenamed|Schema\WebhookRepositoryTransferred|Schema\WebhookRepositoryUnarchived|Schema\WebhookRepositoryDispatchSample|Schema\WebhookRepositoryImport|Schema\WebhookRepositoryRulesetCreated|Schema\WebhookRepositoryRulesetDeleted|Schema\WebhookRepositoryRulesetEdited|Schema\WebhookRepositoryVulnerabilityAlertCreate|Schema\WebhookRepositoryVulnerabilityAlertDismiss|Schema\WebhookRepositoryVulnerabilityAlertReopen|Schema\WebhookRepositoryVulnerabilityAlertResolve|Schema\WebhookSecretScanningAlertCreated|Schema\WebhookSecretScanningAlertReopened|Schema\WebhookSecretScanningAlertResolved|Schema\WebhookSecretScanningAlertValidated|Schema\WebhookSecretScanningAlertLocationCreated|Schema\WebhookSecretScanningAlertLocationCreatedFormEncoded|Schema\WebhookSecurityAdvisoryPublished|Schema\WebhookSecurityAdvisoryUpdated|Schema\WebhookSecurityAdvisoryWithdrawn|Schema\WebhookSecurityAndAnalysis|Schema\WebhookSponsorshipCancelled|Schema\WebhookSponsorshipCreated|Schema\WebhookSponsorshipEdited|Schema\WebhookSponsorshipPendingCancellation|Schema\WebhookSponsorshipPendingTierChange|Schema\WebhookSponsorshipTierChanged|Schema\WebhookStarCreated|Schema\WebhookStarDeleted|Schema\WebhookStatus|Schema\WebhookTeamAdd|Schema\WebhookTeamAddedToRepository|Schema\WebhookTeamCreated|Schema\WebhookTeamDeleted|Schema\WebhookTeamEdited|Schema\WebhookTeamRemovedFromRepository|Schema\WebhookWatchStarted|Schema\WebhookWorkflowDispatch|Schema\WebhookWorkflowJobCompleted|Schema\WebhookWorkflowJobInProgress|Schema\WebhookWorkflowJobQueued|Schema\WebhookWorkflowJobWaiting|Schema\WebhookWorkflowRunCompleted|Schema\WebhookWorkflowRunInProgress|Schema\WebhookWorkflowRunRequested */ + /** @return Schema\WebhookBranchProtectionConfigurationDisabled|Schema\WebhookBranchProtectionConfigurationEnabled|Schema\WebhookBranchProtectionRuleCreated|Schema\WebhookBranchProtectionRuleDeleted|Schema\WebhookBranchProtectionRuleEdited|Schema\WebhookCheckRunCompleted|Schema\WebhookCheckRunCompletedFormEncoded|Schema\WebhookCheckRunCreated|Schema\WebhookCheckRunCreatedFormEncoded|Schema\WebhookCheckRunRequestedAction|Schema\WebhookCheckRunRequestedActionFormEncoded|Schema\WebhookCheckRunRerequested|Schema\WebhookCheckRunRerequestedFormEncoded|Schema\WebhookCheckSuiteCompleted|Schema\WebhookCheckSuiteRequested|Schema\WebhookCheckSuiteRerequested|Schema\WebhookCodeScanningAlertAppearedInBranch|Schema\WebhookCodeScanningAlertClosedByUser|Schema\WebhookCodeScanningAlertCreated|Schema\WebhookCodeScanningAlertFixed|Schema\WebhookCodeScanningAlertReopened|Schema\WebhookCodeScanningAlertReopenedByUser|Schema\WebhookCommitCommentCreated|Schema\WebhookCreate|Schema\WebhookCustomPropertyCreated|Schema\WebhookCustomPropertyDeleted|Schema\WebhookCustomPropertyUpdated|Schema\WebhookCustomPropertyValuesUpdated|Schema\WebhookDelete|Schema\WebhookDependabotAlertAutoDismissed|Schema\WebhookDependabotAlertAutoReopened|Schema\WebhookDependabotAlertCreated|Schema\WebhookDependabotAlertDismissed|Schema\WebhookDependabotAlertFixed|Schema\WebhookDependabotAlertReintroduced|Schema\WebhookDependabotAlertReopened|Schema\WebhookDeployKeyCreated|Schema\WebhookDeployKeyDeleted|Schema\WebhookDeploymentCreated|Schema\WebhookDeploymentProtectionRuleRequested|Schema\WebhookDeploymentReviewApproved|Schema\WebhookDeploymentReviewRejected|Schema\WebhookDeploymentReviewRequested|Schema\WebhookDeploymentStatusCreated|Schema\WebhookDiscussionAnswered|Schema\WebhookDiscussionCategoryChanged|Schema\WebhookDiscussionClosed|Schema\WebhookDiscussionCreated|Schema\WebhookDiscussionDeleted|Schema\WebhookDiscussionEdited|Schema\WebhookDiscussionLabeled|Schema\WebhookDiscussionLocked|Schema\WebhookDiscussionPinned|Schema\WebhookDiscussionReopened|Schema\WebhookDiscussionTransferred|Schema\WebhookDiscussionUnanswered|Schema\WebhookDiscussionUnlabeled|Schema\WebhookDiscussionUnlocked|Schema\WebhookDiscussionUnpinned|Schema\WebhookDiscussionCommentCreated|Schema\WebhookDiscussionCommentDeleted|Schema\WebhookDiscussionCommentEdited|Schema\WebhookFork|Schema\WebhookGithubAppAuthorizationRevoked|Schema\WebhookGollum|Schema\WebhookInstallationCreated|Schema\WebhookInstallationDeleted|Schema\WebhookInstallationNewPermissionsAccepted|Schema\WebhookInstallationSuspend|Schema\WebhookInstallationUnsuspend|Schema\WebhookInstallationRepositoriesAdded|Schema\WebhookInstallationRepositoriesRemoved|Schema\WebhookInstallationTargetRenamed|Schema\WebhookIssueCommentCreated|Schema\WebhookIssueCommentDeleted|Schema\WebhookIssueCommentEdited|Schema\WebhookIssuesAssigned|Schema\WebhookIssuesClosed|Schema\WebhookIssuesDeleted|Schema\WebhookIssuesDemilestoned|Schema\WebhookIssuesEdited|Schema\WebhookIssuesLabeled|Schema\WebhookIssuesLocked|Schema\WebhookIssuesMilestoned|Schema\WebhookIssuesOpened|Schema\WebhookIssuesPinned|Schema\WebhookIssuesReopened|Schema\WebhookIssuesTransferred|Schema\WebhookIssuesUnassigned|Schema\WebhookIssuesUnlabeled|Schema\WebhookIssuesUnlocked|Schema\WebhookIssuesUnpinned|Schema\WebhookLabelCreated|Schema\WebhookLabelDeleted|Schema\WebhookLabelEdited|Schema\WebhookMarketplacePurchaseCancelled|Schema\WebhookMarketplacePurchaseChanged|Schema\WebhookMarketplacePurchasePendingChange|Schema\WebhookMarketplacePurchasePendingChangeCancelled|Schema\WebhookMarketplacePurchasePurchased|Schema\WebhookMemberAdded|Schema\WebhookMemberEdited|Schema\WebhookMemberRemoved|Schema\WebhookMembershipAdded|Schema\WebhookMembershipRemoved|Schema\WebhookMergeGroupChecksRequested|Schema\WebhookMergeGroupDestroyed|Schema\WebhookMetaDeleted|Schema\WebhookMilestoneClosed|Schema\WebhookMilestoneCreated|Schema\WebhookMilestoneDeleted|Schema\WebhookMilestoneEdited|Schema\WebhookMilestoneOpened|Schema\WebhookOrgBlockBlocked|Schema\WebhookOrgBlockUnblocked|Schema\WebhookOrganizationDeleted|Schema\WebhookOrganizationMemberAdded|Schema\WebhookOrganizationMemberInvited|Schema\WebhookOrganizationMemberRemoved|Schema\WebhookOrganizationRenamed|Schema\WebhookPackagePublished|Schema\WebhookPackageUpdated|Schema\WebhookPageBuild|Schema\WebhookPersonalAccessTokenRequestApproved|Schema\WebhookPersonalAccessTokenRequestCancelled|Schema\WebhookPersonalAccessTokenRequestCreated|Schema\WebhookPersonalAccessTokenRequestDenied|Schema\WebhookPing|Schema\WebhookPingFormEncoded|Schema\WebhookProjectCardConverted|Schema\WebhookProjectCardCreated|Schema\WebhookProjectCardDeleted|Schema\WebhookProjectCardEdited|Schema\WebhookProjectCardMoved|Schema\WebhookProjectClosed|Schema\WebhookProjectCreated|Schema\WebhookProjectDeleted|Schema\WebhookProjectEdited|Schema\WebhookProjectReopened|Schema\WebhookProjectColumnCreated|Schema\WebhookProjectColumnDeleted|Schema\WebhookProjectColumnEdited|Schema\WebhookProjectColumnMoved|Schema\WebhookProjectsV2ProjectClosed|Schema\WebhookProjectsV2ProjectCreated|Schema\WebhookProjectsV2ProjectDeleted|Schema\WebhookProjectsV2ProjectEdited|Schema\WebhookProjectsV2ProjectReopened|Schema\WebhookProjectsV2ItemArchived|Schema\WebhookProjectsV2ItemConverted|Schema\WebhookProjectsV2ItemCreated|Schema\WebhookProjectsV2ItemDeleted|Schema\WebhookProjectsV2ItemEdited|Schema\WebhookProjectsV2ItemReordered|Schema\WebhookProjectsV2ItemRestored|Schema\WebhookProjectsV2StatusUpdateCreated|Schema\WebhookProjectsV2StatusUpdateDeleted|Schema\WebhookProjectsV2StatusUpdateEdited|Schema\WebhookPublic|Schema\WebhookPullRequestAssigned|Schema\WebhookPullRequestAutoMergeDisabled|Schema\WebhookPullRequestAutoMergeEnabled|Schema\WebhookPullRequestClosed|Schema\WebhookPullRequestConvertedToDraft|Schema\WebhookPullRequestDemilestoned|Schema\WebhookPullRequestDequeued|Schema\WebhookPullRequestEdited|Schema\WebhookPullRequestEnqueued|Schema\WebhookPullRequestLabeled|Schema\WebhookPullRequestLocked|Schema\WebhookPullRequestMilestoned|Schema\WebhookPullRequestOpened|Schema\WebhookPullRequestReadyForReview|Schema\WebhookPullRequestReopened|Schema\WebhookPullRequestReviewRequestRemoved|Schema\WebhookPullRequestReviewRequested|Schema\WebhookPullRequestSynchronize|Schema\WebhookPullRequestUnassigned|Schema\WebhookPullRequestUnlabeled|Schema\WebhookPullRequestUnlocked|Schema\WebhookPullRequestReviewCommentCreated|Schema\WebhookPullRequestReviewCommentDeleted|Schema\WebhookPullRequestReviewCommentEdited|Schema\WebhookPullRequestReviewDismissed|Schema\WebhookPullRequestReviewEdited|Schema\WebhookPullRequestReviewSubmitted|Schema\WebhookPullRequestReviewThreadResolved|Schema\WebhookPullRequestReviewThreadUnresolved|Schema\WebhookPush|Schema\WebhookRegistryPackagePublished|Schema\WebhookRegistryPackageUpdated|Schema\WebhookReleaseCreated|Schema\WebhookReleaseDeleted|Schema\WebhookReleaseEdited|Schema\WebhookReleasePrereleased|Schema\WebhookReleasePublished|Schema\WebhookReleaseReleased|Schema\WebhookReleaseUnpublished|Schema\WebhookRepositoryAdvisoryPublished|Schema\WebhookRepositoryAdvisoryReported|Schema\WebhookRepositoryArchived|Schema\WebhookRepositoryCreated|Schema\WebhookRepositoryDeleted|Schema\WebhookRepositoryEdited|Schema\WebhookRepositoryPrivatized|Schema\WebhookRepositoryPublicized|Schema\WebhookRepositoryRenamed|Schema\WebhookRepositoryTransferred|Schema\WebhookRepositoryUnarchived|Schema\WebhookRepositoryDispatchSample|Schema\WebhookRepositoryImport|Schema\WebhookRepositoryRulesetCreated|Schema\WebhookRepositoryRulesetDeleted|Schema\WebhookRepositoryRulesetEdited|Schema\WebhookRepositoryVulnerabilityAlertCreate|Schema\WebhookRepositoryVulnerabilityAlertDismiss|Schema\WebhookRepositoryVulnerabilityAlertReopen|Schema\WebhookRepositoryVulnerabilityAlertResolve|Schema\WebhookSecretScanningAlertCreated|Schema\WebhookSecretScanningAlertReopened|Schema\WebhookSecretScanningAlertResolved|Schema\WebhookSecretScanningAlertValidated|Schema\WebhookSecretScanningAlertLocationCreated|Schema\WebhookSecretScanningAlertLocationCreatedFormEncoded|Schema\WebhookSecurityAdvisoryPublished|Schema\WebhookSecurityAdvisoryUpdated|Schema\WebhookSecurityAdvisoryWithdrawn|Schema\WebhookSecurityAndAnalysis|Schema\WebhookSponsorshipCancelled|Schema\WebhookSponsorshipCreated|Schema\WebhookSponsorshipEdited|Schema\WebhookSponsorshipPendingCancellation|Schema\WebhookSponsorshipPendingTierChange|Schema\WebhookSponsorshipTierChanged|Schema\WebhookStarCreated|Schema\WebhookStarDeleted|Schema\WebhookStatus|Schema\WebhookSubIssuesParentIssueAdded|Schema\WebhookSubIssuesParentIssueRemoved|Schema\WebhookSubIssuesSubIssueAdded|Schema\WebhookSubIssuesSubIssueRemoved|Schema\WebhookTeamAdd|Schema\WebhookTeamAddedToRepository|Schema\WebhookTeamCreated|Schema\WebhookTeamDeleted|Schema\WebhookTeamEdited|Schema\WebhookTeamRemovedFromRepository|Schema\WebhookWatchStarted|Schema\WebhookWorkflowDispatch|Schema\WebhookWorkflowJobCompleted|Schema\WebhookWorkflowJobInProgress|Schema\WebhookWorkflowJobQueued|Schema\WebhookWorkflowJobWaiting|Schema\WebhookWorkflowRunCompleted|Schema\WebhookWorkflowRunInProgress|Schema\WebhookWorkflowRunRequested */ public function resolve(array $headers, array $data): object { $headers = (static function ($headers): array { @@ -846,6 +847,17 @@ public function resolve(array $headers, array $data): object } webhooks_aaacn: + try { + if ($this->subIssues instanceof Internal\WebHook\SubIssues === false) { + $this->subIssues = new Internal\WebHook\SubIssues($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SubIssues()); + } + + return $this->subIssues->resolve($headers, $data); + } catch (Throwable $error) { + goto webhooks_aaaco; + } + + webhooks_aaaco: try { if ($this->teamAdd instanceof Internal\WebHook\TeamAdd === false) { $this->teamAdd = new Internal\WebHook\TeamAdd($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝TeamAdd()); @@ -853,10 +865,10 @@ public function resolve(array $headers, array $data): object return $this->teamAdd->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaco; + goto webhooks_aaacp; } - webhooks_aaaco: + webhooks_aaacp: try { if ($this->team instanceof Internal\WebHook\Team === false) { $this->team = new Internal\WebHook\Team($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Team()); @@ -864,10 +876,10 @@ public function resolve(array $headers, array $data): object return $this->team->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacp; + goto webhooks_aaacq; } - webhooks_aaacp: + webhooks_aaacq: try { if ($this->watch instanceof Internal\WebHook\Watch === false) { $this->watch = new Internal\WebHook\Watch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Watch()); @@ -875,10 +887,10 @@ public function resolve(array $headers, array $data): object return $this->watch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacq; + goto webhooks_aaacr; } - webhooks_aaacq: + webhooks_aaacr: try { if ($this->workflowDispatch instanceof Internal\WebHook\WorkflowDispatch === false) { $this->workflowDispatch = new Internal\WebHook\WorkflowDispatch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowDispatch()); @@ -886,10 +898,10 @@ public function resolve(array $headers, array $data): object return $this->workflowDispatch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacr; + goto webhooks_aaacs; } - webhooks_aaacr: + webhooks_aaacs: try { if ($this->workflowJob instanceof Internal\WebHook\WorkflowJob === false) { $this->workflowJob = new Internal\WebHook\WorkflowJob($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowJob()); @@ -897,10 +909,10 @@ public function resolve(array $headers, array $data): object return $this->workflowJob->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacs; + goto webhooks_aaact; } - webhooks_aaacs: + webhooks_aaact: try { if ($this->workflowRun instanceof Internal\WebHook\WorkflowRun === false) { $this->workflowRun = new Internal\WebHook\WorkflowRun($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowRun()); @@ -908,10 +920,10 @@ public function resolve(array $headers, array $data): object return $this->workflowRun->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaact; + goto webhooks_aaacu; } - webhooks_aaact: + webhooks_aaacu: throw $error; } } diff --git a/clients/GitHub/tests/Internal/Operation/SecurityAdvisories/ListGlobalAdvisoriesTest.php b/clients/GitHub/tests/Internal/Operation/SecurityAdvisories/ListGlobalAdvisoriesTest.php index c68c7f1ce3b..de2abc69b0d 100644 --- a/clients/GitHub/tests/Internal/Operation/SecurityAdvisories/ListGlobalAdvisoriesTest.php +++ b/clients/GitHub/tests/Internal/Operation/SecurityAdvisories/ListGlobalAdvisoriesTest.php @@ -31,25 +31,27 @@ public function call_httpCode_429_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&epss_percentage=generated&epss_percentile=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\SecurityAdvisories\ListGlobalAdvisories::OPERATION_MATCH, (static function (array $data): array { - $data['ghsa_id'] = 'generated'; - $data['cve_id'] = 'generated'; - $data['ecosystem'] = 'generated'; - $data['severity'] = 'generated'; - $data['cwes'] = null; - $data['is_withdrawn'] = false; - $data['affects'] = null; - $data['published'] = 'generated'; - $data['updated'] = 'generated'; - $data['modified'] = 'generated'; - $data['before'] = 'generated'; - $data['after'] = 'generated'; - $data['type'] = 'generated'; - $data['direction'] = 'generated'; - $data['per_page'] = 8; - $data['sort'] = 'generated'; + $data['ghsa_id'] = 'generated'; + $data['cve_id'] = 'generated'; + $data['ecosystem'] = 'generated'; + $data['severity'] = 'generated'; + $data['cwes'] = null; + $data['is_withdrawn'] = false; + $data['affects'] = null; + $data['published'] = 'generated'; + $data['updated'] = 'generated'; + $data['modified'] = 'generated'; + $data['epss_percentage'] = 'generated'; + $data['epss_percentile'] = 'generated'; + $data['before'] = 'generated'; + $data['after'] = 'generated'; + $data['type'] = 'generated'; + $data['direction'] = 'generated'; + $data['per_page'] = 8; + $data['sort'] = 'generated'; return $data; })([])); @@ -65,9 +67,9 @@ public function operations_httpCode_429_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&epss_percentage=generated&epss_percentile=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->securityAdvisories()->listGlobalAdvisories('generated', 'generated', 'generated', 'generated', null, false, null, 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 'generated'); + $result = $client->operations()->securityAdvisories()->listGlobalAdvisories('generated', 'generated', 'generated', 'generated', null, false, null, 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 'generated'); } /** @test */ @@ -80,25 +82,27 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&epss_percentage=generated&epss_percentile=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\SecurityAdvisories\ListGlobalAdvisories::OPERATION_MATCH, (static function (array $data): array { - $data['ghsa_id'] = 'generated'; - $data['cve_id'] = 'generated'; - $data['ecosystem'] = 'generated'; - $data['severity'] = 'generated'; - $data['cwes'] = null; - $data['is_withdrawn'] = false; - $data['affects'] = null; - $data['published'] = 'generated'; - $data['updated'] = 'generated'; - $data['modified'] = 'generated'; - $data['before'] = 'generated'; - $data['after'] = 'generated'; - $data['type'] = 'generated'; - $data['direction'] = 'generated'; - $data['per_page'] = 8; - $data['sort'] = 'generated'; + $data['ghsa_id'] = 'generated'; + $data['cve_id'] = 'generated'; + $data['ecosystem'] = 'generated'; + $data['severity'] = 'generated'; + $data['cwes'] = null; + $data['is_withdrawn'] = false; + $data['affects'] = null; + $data['published'] = 'generated'; + $data['updated'] = 'generated'; + $data['modified'] = 'generated'; + $data['epss_percentage'] = 'generated'; + $data['epss_percentile'] = 'generated'; + $data['before'] = 'generated'; + $data['after'] = 'generated'; + $data['type'] = 'generated'; + $data['direction'] = 'generated'; + $data['per_page'] = 8; + $data['sort'] = 'generated'; return $data; })([])); @@ -114,8 +118,8 @@ public function operations_httpCode_422_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/advisories?ghsa_id=generated&cve_id=generated&ecosystem=generated&severity=generated&cwes=&is_withdrawn=&affects=&published=generated&updated=generated&modified=generated&epss_percentage=generated&epss_percentile=generated&before=generated&after=generated&type=generated&direction=generated&per_page=8&sort=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->securityAdvisories()->listGlobalAdvisories('generated', 'generated', 'generated', 'generated', null, false, null, 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 'generated'); + $result = $client->operations()->securityAdvisories()->listGlobalAdvisories('generated', 'generated', 'generated', 'generated', null, false, null, 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 'generated'); } } diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 98e4212842f..11d09a48a6e 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -18,7 +18,7 @@ function authHeader(): string } }, new Browser()); assertType('', $client->call('GET /')); -assertType('Observable', $client->call('GET /advisories')); +assertType('iterable', $client->call('GET /advisories')); assertType('', $client->call('GET /advisories/{ghsa_id}')); assertType('', $client->call('GET /app')); assertType('', $client->call('POST /app-manifests/{code}/conversions')); @@ -58,7 +58,7 @@ function authHeader(): string assertType('Observable', $client->call('GET /enterprises/{enterprise}/copilot/usage')); assertType('Observable', $client->call('LIST /enterprises/{enterprise}/copilot/usage')); assertType('Observable|WithoutBody', $client->call('GET /enterprises/{enterprise}/dependabot/alerts')); -assertType('iterable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); +assertType('Observable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage')); assertType('Observable', $client->call('LIST /enterprises/{enterprise}/team/{team_slug}/copilot/usage')); assertType('Observable|WithoutBody', $client->call('GET /events')); @@ -337,8 +337,8 @@ function authHeader(): string assertType('', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /orgs/{org}/rulesets/{ruleset_id}')); assertType('', $client->call('DELETE /orgs/{org}/rulesets/{ruleset_id}')); -assertType('iterable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); -assertType('iterable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); +assertType('Observable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); +assertType('Observable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); assertType('Observable', $client->call('GET /orgs/{org}/security-advisories')); assertType('Observable', $client->call('GET /orgs/{org}/security-managers')); assertType('', $client->call('PUT /orgs/{org}/security-managers/teams/{team_slug}')); @@ -621,7 +621,7 @@ function authHeader(): string assertType('', $client->call('GET /repos/{owner}/{repo}/community/profile')); assertType('', $client->call('GET /repos/{owner}/{repo}/compare/{basehead}')); assertType('', $client->call('GET /repos/{owner}/{repo}/contents/{path}')); -assertType('Schema\\FileCommit', $client->call('PUT /repos/{owner}/{repo}/contents/{path}')); +assertType('', $client->call('PUT /repos/{owner}/{repo}/contents/{path}')); 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')); @@ -676,7 +676,7 @@ function authHeader(): string assertType('Observable', $client->call('GET /repos/{owner}/{repo}/forks')); assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/forks')); assertType('', $client->call('POST /repos/{owner}/{repo}/forks')); -assertType('Schema\\ShortBlob', $client->call('POST /repos/{owner}/{repo}/git/blobs')); +assertType('', $client->call('POST /repos/{owner}/{repo}/git/blobs')); assertType('', $client->call('GET /repos/{owner}/{repo}/git/blobs/{file_sha}')); assertType('', $client->call('POST /repos/{owner}/{repo}/git/commits')); assertType('', $client->call('GET /repos/{owner}/{repo}/git/commits/{commit_sha}')); @@ -875,8 +875,8 @@ function authHeader(): string assertType('', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}')); assertType('', $client->call('DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); +assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); +assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index c22b376b306..c678f7bf206 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -231,6 +231,20 @@ paths: in: query schema: type: string + - name: epss_percentage + in: query + description: |- + If specified, only return advisories that have an EPSS percentage score that matches the provided value. + The EPSS percentage represents the likelihood of a CVE being exploited. + schema: + type: string + - name: epss_percentile + in: query + description: |- + If specified, only return advisories that have an EPSS percentile score that matches the provided value. + The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs. + schema: + type: string - "$ref": "#/components/parameters/pagination-before" - "$ref": "#/components/parameters/pagination-after" - "$ref": "#/components/parameters/direction" @@ -62985,6 +62999,270 @@ webhooks: - repository - organization - app + sub-issues-parent-issue-added: + post: + summary: |- + This event occurs when there is activity relating to sub-issues. + + For activity relating to issues more generally, use the `issues` event instead. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Issues" repository permissions. + description: A parent issue was added to an issue. + operationId: sub-issues/parent-issue-added + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#sub-issues + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-sub-issues-parent-issue-added" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: sub-issues + supported-webhook-types: + - repository + - organization + - app + sub-issues-parent-issue-removed: + post: + summary: |- + This event occurs when there is activity relating to sub-issues. + + For activity relating to issues more generally, use the `issues` event instead. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Issues" repository permissions. + description: A parent issue was removed from an issue. + operationId: sub-issues/parent-issue-removed + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#sub-issues + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-sub-issues-parent-issue-removed" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: sub-issues + supported-webhook-types: + - repository + - organization + - app + sub-issues-sub-issue-added: + post: + summary: |- + This event occurs when there is activity relating to sub-issues. + + For activity relating to issues more generally, use the `issues` event instead. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Issues" repository permissions. + description: A sub-issue was added to an issue. + operationId: sub-issues/sub-issue-added + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#sub-issues + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-sub-issues-sub-issue-added" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: sub-issues + supported-webhook-types: + - repository + - organization + - app + sub-issues-sub-issue-removed: + post: + summary: |- + This event occurs when there is activity relating to sub-issues. + + For activity relating to issues more generally, use the `issues` event instead. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Issues" repository permissions. + description: A sub-issue was removed from an issue. + operationId: sub-issues/sub-issue-removed + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#sub-issues + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-sub-issues-sub-issue-removed" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: sub-issues + supported-webhook-types: + - repository + - organization + - app team-add: post: summary: |- @@ -64477,6 +64755,15 @@ components: required: - cwe_id - name + epss: + type: + - object + - 'null' + properties: + percentage: + type: number + percentile: + type: number credits: type: - array @@ -69726,6 +70013,19 @@ components: type: string examples: - example.com + artifact_attestations: + type: object + properties: + trust_domain: + type: string + examples: + - example + services: + type: array + items: + type: string + examples: + - example.com required: - verifiable_password_authentication security-and-analysis: @@ -189795,6 +190095,146 @@ components: - updated_at - repository - sender + webhook-sub-issues-parent-issue-added: + title: parent issue added event + type: object + properties: + action: + type: string + enum: + - parent_issue_added + parent_issue_id: + description: The ID of the parent issue. + type: number + parent_issue: + "$ref": "#/components/schemas/issue" + parent_issue_repo: + "$ref": "#/components/schemas/repository" + sub_issue_id: + description: The ID of the sub-issue. + type: number + sub_issue: + "$ref": "#/components/schemas/issue" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + repository: + "$ref": "#/components/schemas/repository-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - parent_issue_id + - parent_issue + - parent_issue_repo + - sub_issue_id + - sub_issue + webhook-sub-issues-parent-issue-removed: + title: parent issue removed event + type: object + properties: + action: + type: string + enum: + - parent_issue_removed + parent_issue_id: + description: The ID of the parent issue. + type: number + parent_issue: + "$ref": "#/components/schemas/issue" + parent_issue_repo: + "$ref": "#/components/schemas/repository" + sub_issue_id: + description: The ID of the sub-issue. + type: number + sub_issue: + "$ref": "#/components/schemas/issue" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + repository: + "$ref": "#/components/schemas/repository-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - parent_issue_id + - parent_issue + - parent_issue_repo + - sub_issue_id + - sub_issue + webhook-sub-issues-sub-issue-added: + title: sub-issue added event + type: object + properties: + action: + type: string + enum: + - sub_issue_added + sub_issue_id: + description: The ID of the sub-issue. + type: number + sub_issue: + "$ref": "#/components/schemas/issue" + sub_issue_repo: + "$ref": "#/components/schemas/repository" + parent_issue_id: + description: The ID of the parent issue. + type: number + parent_issue: + "$ref": "#/components/schemas/issue" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + repository: + "$ref": "#/components/schemas/repository-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - sub_issue_id + - sub_issue + - sub_issue_repo + - parent_issue_id + - parent_issue + webhook-sub-issues-sub-issue-removed: + title: sub-issue removed event + type: object + properties: + action: + type: string + enum: + - sub_issue_removed + sub_issue_id: + description: The ID of the sub-issue. + type: number + sub_issue: + "$ref": "#/components/schemas/issue" + sub_issue_repo: + "$ref": "#/components/schemas/repository" + parent_issue_id: + description: The ID of the parent issue. + type: number + parent_issue: + "$ref": "#/components/schemas/issue" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + repository: + "$ref": "#/components/schemas/repository-webhooks" + sender: + "$ref": "#/components/schemas/simple-user-webhooks" + required: + - action + - sub_issue_id + - sub_issue + - sub_issue_repo + - parent_issue_id + - parent_issue webhook-team-add: title: team_add event type: object @@ -196223,6 +196663,9 @@ components: cwes: - cwe_id: CWE-400 name: Uncontrolled Resource Consumption + epss: + - percentage: 0.00045 + percentile: 0.16001e0 credits: - user: login: octocat