From 609bf302e81464b9d76b4518802f817d9dbbdf79 Mon Sep 17 00:00:00 2001 From: WyriHaximus <147145+WyriHaximus@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:59:46 +0000 Subject: [PATCH] =?UTF-8?q?[GitHubEnterpriseCloud]=20Update=20to=201.1.4-3?= =?UTF-8?q?69141ccf82ff71f710ebff5458b7b5a=20from=201.1.4-306d5b5d8ae10d84?= =?UTF-8?q?736da59c5abf628f=20Detected=20Schema=20changes:=202024-12-13=20?= =?UTF-8?q?17:30:19=20ERROR=20unable=20to=20open=20the=20rolodex=20file,?= =?UTF-8?q?=20check=20specification=20references=20and=20base=20path=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=9C=20file:=20/=5F=5Fw/github-root/github-root/server-sta?= =?UTF-8?q?tistics-actions.yaml=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=E2=94=94=20error:=20open=20/=5F=5Fw?= =?UTF-8?q?/github-root/github-root/server-statistics-actions.yaml:=20no?= =?UTF-8?q?=20such=20file=20or=20directory=202024-12-13=2017:30:19=20ERROR?= =?UTF-8?q?=20unable=20to=20open=20the=20rolodex=20file,=20check=20specifi?= =?UTF-8?q?cation=20references=20and=20base=20path=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20error:?= =?UTF-8?q?=20open=20/=5F=5Fw/github-root/github-root/server-statistics-pa?= =?UTF-8?q?ckages.yaml:=20no=20such=20file=20or=20directory=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=94?= =?UTF-8?q?=20file:=20/=5F=5Fw/github-root/github-root/server-statistics-p?= =?UTF-8?q?ackages.yaml=202024-12-13=2017:30:19=20ERROR=20unable=20to=20op?= =?UTF-8?q?en=20the=20rolodex=20file,=20check=20specification=20references?= =?UTF-8?q?=20and=20base=20path=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=E2=94=9C=20file:=20/=5F=5Fw/github-?= =?UTF-8?q?root/github-root/server-statistics-advisory-db.yaml=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=94=20error:=20open=20/=5F=5Fw/github-root/github-root/se?= =?UTF-8?q?rver-statistics-advisory-db.yaml:=20no=20such=20file=20or=20dir?= =?UTF-8?q?ectory=202024-12-13=2017:30:21=20ERROR=20unable=20to=20open=20t?= =?UTF-8?q?he=20rolodex=20file,=20check=20specification=20references=20and?= =?UTF-8?q?=20base=20path=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=E2=94=9C=20file:=20/=5F=5Fw/github-root/g?= =?UTF-8?q?ithub-root/server-statistics-actions.yaml=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=94=20err?= =?UTF-8?q?or:=20open=20/=5F=5Fw/github-root/github-root/server-statistics?= =?UTF-8?q?-actions.yaml:=20no=20such=20file=20or=20directory=202024-12-13?= =?UTF-8?q?=2017:30:21=20ERROR=20unable=20to=20open=20the=20rolodex=20file?= =?UTF-8?q?,=20check=20specification=20references=20and=20base=20path=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=E2=94=9C=20file:=20/=5F=5Fw/github-root/github-root/server-?= =?UTF-8?q?statistics-packages.yaml=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=E2=94=94=20error:=20open=20/=5F?= =?UTF-8?q?=5Fw/github-root/github-root/server-statistics-packages.yaml:?= =?UTF-8?q?=20no=20such=20file=20or=20directory=202024-12-13=2017:30:21=20?= =?UTF-8?q?ERROR=20unable=20to=20open=20the=20rolodex=20file,=20check=20sp?= =?UTF-8?q?ecification=20references=20and=20base=20path=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20?= =?UTF-8?q?error:=20open=20/=5F=5Fw/github-root/github-root/server-statist?= =?UTF-8?q?ics-advisory-db.yaml:=20no=20such=20file=20or=20directory=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=94=20file:=20/=5F=5Fw/github-root/github-root/server-sta?= =?UTF-8?q?tistics-advisory-db.yaml=20ERROR:=20component=20`server-statist?= =?UTF-8?q?ics-actions.yaml`=20does=20not=20exist=20in=20the=20specificati?= =?UTF-8?q?on=20ERROR:=20component=20`server-statistics-packages.yaml`=20d?= =?UTF-8?q?oes=20not=20exist=20in=20the=20specification=20ERROR:=20compone?= =?UTF-8?q?nt=20`server-statistics-advisory-db.yaml`=20does=20not=20exist?= =?UTF-8?q?=20in=20the=20specification=20ERROR:=20cannot=20resolve=20refer?= =?UTF-8?q?ence=20`server-statistics-actions.yaml`,=20it's=20missing:=20?= =?UTF-8?q?=20[211350:11]=20ERROR:=20cannot=20resolve=20reference=20`serve?= =?UTF-8?q?r-statistics-packages.yaml`,=20it's=20missing:=20=20[211352:11]?= =?UTF-8?q?=20ERROR:=20cannot=20resolve=20reference=20`server-statistics-a?= =?UTF-8?q?dvisory-db.yaml`,=20it's=20missing:=20=20[211354:11]=20ERROR:?= =?UTF-8?q?=20component=20`server-statistics-actions.yaml`=20does=20not=20?= =?UTF-8?q?exist=20in=20the=20specification=20ERROR:=20component=20`server?= =?UTF-8?q?-statistics-packages.yaml`=20does=20not=20exist=20in=20the=20sp?= =?UTF-8?q?ecification=20ERROR:=20component=20`server-statistics-advisory-?= =?UTF-8?q?db.yaml`=20does=20not=20exist=20in=20the=20specification=20ERRO?= =?UTF-8?q?R:=20cannot=20resolve=20reference=20`server-statistics-actions.?= =?UTF-8?q?yaml`,=20it's=20missing:=20=20[211210:11]=20ERROR:=20cannot=20r?= =?UTF-8?q?esolve=20reference=20`server-statistics-packages.yaml`,=20it's?= =?UTF-8?q?=20missing:=20=20[211212:11]=20ERROR:=20cannot=20resolve=20refe?= =?UTF-8?q?rence=20`server-statistics-advisory-db.yaml`,=20it's=20missing:?= =?UTF-8?q?=20=20[211214:11]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../etc/openapi-client-generator.state | 94 +- .../Hydrator/WebHook/SecretScanningScan.php | 5444 +++++++++++++++++ .../src/Internal/Hydrators.php | 12 + .../ListAlertsForEnterprise.php | 4 +- .../SecretScanning/ListAlertsForOrg.php | 4 +- .../ListAlertsForOrgListing.php | 4 +- .../SecretScanning/ListAlertsForRepo.php | 4 +- .../ListAlertsForRepoListing.php | 4 +- ...CreateOrUpdateEnterpriseCustomProperty.php | 1 + .../Orgs/CreateOrUpdateCustomProperty.php | 1 + .../Repos/CreateEnterpriseRuleset.php | 1 + .../Repos/DeleteEnterpriseRuleset.php | 1 + .../Operator/Repos/GetEnterpriseRuleset.php | 1 + .../Repos/UpdateEnterpriseRuleset.php | 1 + .../ListAlertsForEnterprise.php | 2 +- .../SecretScanning/ListAlertsForOrg.php | 2 +- .../ListAlertsForOrgListing.php | 2 +- .../SecretScanning/ListAlertsForRepo.php | 2 +- .../ListAlertsForRepoListing.php | 2 +- .../src/Internal/Router/Delete/Five.php | 1 - .../src/Internal/Router/Delete/Repos.php | 1 + .../src/Internal/Router/Get/Five.php | 2 +- .../src/Internal/Router/Get/Repos.php | 1 + .../Internal/Router/Get/SecretScanning.php | 6 +- .../src/Internal/Router/Get/Six.php | 2 +- .../src/Internal/Router/List/Five.php | 2 +- .../Internal/Router/List/SecretScanning.php | 4 +- .../src/Internal/Router/List/Six.php | 2 +- .../src/Internal/Router/Post/Four.php | 1 - .../src/Internal/Router/Post/Repos.php | 1 + .../Internal/Router/Put/EnterpriseAdmin.php | 1 + .../src/Internal/Router/Put/Five.php | 1 - .../src/Internal/Router/Put/Orgs.php | 1 + .../src/Internal/Router/Put/Repos.php | 1 + .../src/Internal/Router/Put/Six.php | 1 - .../Internal/WebHook/SecretScanningScan.php | 45 + .../src/Operation/EnterpriseAdmin.php | 1 + .../src/Operation/Orgs.php | 1 + .../src/Operation/Repos.php | 4 + .../src/Operation/SecretScanning.php | 10 +- .../src/PHPStan/ClientCallReturnTypes.php | 22 +- .../WebhookSecretScanningScanCompleted.php | 2337 +++++++ .../GitHubEnterpriseCloud/src/WebHooks.php | 62 +- .../tests/Types/ClientCallReturnTypes.php | 22 +- .../GitHubEnterpriseCloud/current.spec.yaml | 146 +- 45 files changed, 8135 insertions(+), 129 deletions(-) create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/WebHook/SecretScanningScan.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/WebHook/SecretScanningScan.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/WebhookSecretScanningScanCompleted.php diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index dfa625353e4..d092d8dac0c 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "306d5b5d8ae10d84736da59c5abf628f", + "specHash": "369141ccf82ff71f710ebff5458b7b5a", "generatedFiles": { "files": [ { @@ -5880,7 +5880,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php", - "hash": "83a9fa839e7e493395cd823ac2e4600b" + "hash": "c9315d28c4c880c6d2db09dc9de4959d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Actions.php", @@ -5896,7 +5896,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "94da37f210f9fc8d7220b2d7e525770e" + "hash": "12fde549ee1123c67e4d37eb24621ee4" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Dependabot.php", @@ -5932,7 +5932,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "0127c8ebae27751585ef17f2c5d1989b" + "hash": "41235c3fe28c6f8292d2871959ad7362" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Oidc.php", @@ -5964,7 +5964,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "617cdc2a981c0f671accae1aff4a8fcc" + "hash": "de1fdc0841ff179beaa57b543034805e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php", @@ -6012,7 +6012,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/WebHooks.php", - "hash": "581f1743c0a8d009f2d5fbb815078ee5" + "hash": "2253302da4f37578945bf074782082ff" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php", @@ -13336,11 +13336,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "63c1afe48e9330b0fbec30f1ec95462e" + "hash": "fc5544ceb5d08902b0fd19d9927ec155" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "150f6ef3b96d53a9e35bd9084d31efdc" + "hash": "30942aff10500ad3dd8b9b6ddfebbebe" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterpriseTest.php", @@ -16504,11 +16504,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrg.php", - "hash": "dc5d2e697c6c4eae857455c7c92c6ee8" + "hash": "f1971160eec08b7f6fd28da789cba7bb" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrg.php", - "hash": "771fbd1f9bbdc2913e4b992d625ac6aa" + "hash": "cceb42686f63d6c8a21fc2a58deb7a4c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgTest.php", @@ -16516,11 +16516,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "6ae1fb64f3d6f181f403fb3d6c0c6d42" + "hash": "e7076162ec6613408f0b1ebbaa00659a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "6c401d2fd1f1777374cc1ec3252d48d4" + "hash": "1e66ef766fac93cbb93ddbcea6df56e7" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListingTest.php", @@ -22500,11 +22500,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepo.php", - "hash": "900cc52b39095cd3447f3f363b03c636" + "hash": "5d3cbf0e9737dd7bc7af68ceb6f4ca53" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepo.php", - "hash": "e45ab01d261c117cfc75fe10c2236876" + "hash": "8406c3269cb8a80c68eb9e53bc07d1b8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoTest.php", @@ -22512,11 +22512,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "6252f8668caee61c6c9f9f431016ffb3" + "hash": "ea5a0172191b8a8df0a629efc53a9243" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "6cd5fefdadc604e643ccfec6f8d1fd95" + "hash": "01b63ea8880e465e839535ea846ff6b0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListingTest.php", @@ -25988,7 +25988,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php", - "hash": "3512da7db91f0fc651a1e61d61afcd06" + "hash": "624905488b2eb06782e02645c2960a43" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php", @@ -26036,7 +26036,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecretScanning.php", - "hash": "615f39c0e3b2fa9baabfed35ed5cd4d4" + "hash": "3a22d8512f4aa9113e489842740ca144" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeScanning.php", @@ -26108,7 +26108,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Repos.php", - "hash": "e6c72a7c76a6fc5e12601cdb26a841d4" + "hash": "be014e9d1515ee6e93891913240a72f5" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Teams.php", @@ -26324,7 +26324,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/SecretScanning.php", - "hash": "f8f5cbefa604d03ab66b4de6c29ebf09" + "hash": "12171f613b92df34e675e13ab8a7df41" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Pulls.php", @@ -26368,7 +26368,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Repos.php", - "hash": "f8d525ce711ee7edd2e4daa16c43f29a" + "hash": "52e5d33dde7119b6833338b6efcb4f0f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Users.php", @@ -26444,7 +26444,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/EnterpriseAdmin.php", - "hash": "2e9489ae111ec80ffd7bc4b04d1e9d10" + "hash": "69392866bdbb02704ec0d6cd7dbb47e6" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Activity.php", @@ -26456,7 +26456,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Orgs.php", - "hash": "3f119eb3ddcb244a1e0d6c05c54176ab" + "hash": "c4c6e36ecaf672e3b257dd0d85204bd8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Codespaces.php", @@ -26464,7 +26464,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Repos.php", - "hash": "8cac537be80dd620b7e38e935ba98378" + "hash": "ba93bcfb6a490ae953c7d6cd4f6687be" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Projects.php", @@ -26540,11 +26540,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "3b5626569af7a8da9ee4150b83990676" + "hash": "60942fc64eb0f5380ff461eabc9e05d8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "634fc2d288401a367fcf45a077e838a8" + "hash": "6769a15d7dc089ed219e4bc14175e5d7" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -26564,7 +26564,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Four.php", - "hash": "fbb7e1b86a5a79acbeb8fad110784192" + "hash": "f0e0190e81cc6c15a3ee9dbf6e60983c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Six.php", @@ -26640,7 +26640,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "381b412abe49fd76e8e7e3fabc5978d8" + "hash": "79f2d9849e460c73920249c971dc1934" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Two.php", @@ -26648,7 +26648,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "fe00f124d0b03577835808f3c34eb6fd" + "hash": "06ce8de01c236e4f4fe77936470de48d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -26672,7 +26672,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Five.php", - "hash": "b1d2d8e43f89a8d6bc2de63d21f1d881" + "hash": "3a72c2f858e72938a60aef7d0d6f59c9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Seven.php", @@ -26700,7 +26700,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Five.php", - "hash": "b40b3b356fa71a1c08e01b97607b5dcd" + "hash": "3e1dee7a6822aaf79bae4ee09ed0ca8c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Seven.php", @@ -26708,7 +26708,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Six.php", - "hash": "d5607f5f916b91c6f46c9854641267be" + "hash": "e5aa282e5a2e28e298b739b408f36a5a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Eight.php", @@ -28920,7 +28920,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "a513529dea77698727116fa4800602f6" + "hash": "f362cf4fd37f55c10375ea54bb3f0775" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php", @@ -29524,7 +29524,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/CreateOrUpdateCustomProperty.php", - "hash": "263b863e28cdf2940c41737b6c2732c9" + "hash": "1849ff9d1ed3ebd66d2afefaac6c7c53" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/CreateOrUpdateCustomPropertyTest.php", @@ -29716,11 +29716,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "0d42ea441806f350e3a27b26e91ebe07" + "hash": "f6f17214908d2d306ab902fc96142829" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "4b0d41f23ab46cdf31616e0448a80ec5" + "hash": "3fd31199ef4c9dae08159e08cd2472c4" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -33560,7 +33560,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/EnterpriseAdmin\/CreateOrUpdateEnterpriseCustomProperty.php", - "hash": "566acb8a5e462e7d2f828ff7432f732b" + "hash": "ab2cfcba63b955f1eef8aaefb74f609c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/EnterpriseAdmin\/CreateOrUpdateEnterpriseCustomPropertyTest.php", @@ -33608,7 +33608,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/CreateEnterpriseRuleset.php", - "hash": "c3e0fee4cd1ef9a4a06f532c0b8b310d" + "hash": "011f54d0feebfc3aa3baf00d060950be" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/CreateEnterpriseRulesetTest.php", @@ -33620,7 +33620,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetEnterpriseRuleset.php", - "hash": "1ed007c4a68032e7968d4874d89b7b33" + "hash": "c9b5cd71b55007977889f1fa435b53dd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetEnterpriseRulesetTest.php", @@ -33632,7 +33632,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/UpdateEnterpriseRuleset.php", - "hash": "fba72d8ad99842b6b7c9c5665ab68f77" + "hash": "d29be8f7fe881735675e481204c086b1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/UpdateEnterpriseRulesetTest.php", @@ -33644,7 +33644,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/DeleteEnterpriseRuleset.php", - "hash": "37f19cc6a51e11a31f5ca950ec82ecd7" + "hash": "bf30c514340e8e1ee24474c489acb947" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/DeleteEnterpriseRulesetTest.php", @@ -33705,6 +33705,18 @@ { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Rulesets\/RulesetId.php", "hash": "720f34c010a314597906089c8b311502" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningScanCompleted.php", + "hash": "a485c8c3e2a4dc4b747eac8b8cda72d4" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/WebHook\/SecretScanningScan.php", + "hash": "2abf43a80142f62a3b21185e1ee6c7a2" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecretScanningScan.php", + "hash": "5d3c4be98252bd189197d3bce1896b8b" } ] }, diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/WebHook/SecretScanningScan.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/WebHook/SecretScanningScan.php new file mode 100644 index 00000000000..4ef3862e85e --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/WebHook/SecretScanningScan.php @@ -0,0 +1,5444 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookSecretScanningScanCompleted' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookSecretScanningScanCompleted($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleInstallation' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationSimpleWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookSecretScanningScanCompleted(array $payload): WebhookSecretScanningScanCompleted + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $missingFields[] = 'type'; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + + $value = $payload['source'] ?? null; + + if ($value === null) { + $missingFields[] = 'source'; + goto after_source; + } + + $properties['source'] = $value; + + after_source: + + $value = $payload['started_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'started_at'; + goto after_startedAt; + } + + $properties['startedAt'] = $value; + + after_startedAt: + + $value = $payload['completed_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'completed_at'; + goto after_completedAt; + } + + $properties['completedAt'] = $value; + + after_completedAt: + + $value = $payload['secret_types'] ?? null; + + if ($value === null) { + $properties['secretTypes'] = null; + goto after_secretTypes; + } + + $properties['secretTypes'] = $value; + + after_secretTypes: + + $value = $payload['custom_pattern_name'] ?? null; + + if ($value === null) { + $properties['customPatternName'] = null; + goto after_customPatternName; + } + + $properties['customPatternName'] = $value; + + after_customPatternName: + + $value = $payload['custom_pattern_scope'] ?? null; + + if ($value === null) { + $properties['customPatternScope'] = null; + goto after_customPatternScope; + } + + $properties['customPatternScope'] = $value; + + after_customPatternScope: + + $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⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['enterprise'] ?? null; + + if ($value === null) { + $properties['enterprise'] = null; + goto after_enterprise; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enterprise'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['enterprise'] = $value; + + after_enterprise: + + $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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $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⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookSecretScanningScanCompleted', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookSecretScanningScanCompleted::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookSecretScanningScanCompleted(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookSecretScanningScanCompleted', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + { + $properties = []; + $missingFields = []; + try { + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['email'] ?? null; + + if ($value === null) { + $properties['email'] = null; + goto after_email; + } + + $properties['email'] = $value; + + after_email: + + $value = $payload['login'] ?? null; + + if ($value === null) { + $missingFields[] = 'login'; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['gravatar_id'] ?? null; + + if ($value === null) { + $properties['gravatarId'] = null; + goto after_gravatarId; + } + + $properties['gravatarId'] = $value; + + after_gravatarId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['followers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'followers_url'; + goto after_followersUrl; + } + + $properties['followersUrl'] = $value; + + after_followersUrl: + + $value = $payload['following_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'following_url'; + goto after_followingUrl; + } + + $properties['followingUrl'] = $value; + + after_followingUrl: + + $value = $payload['gists_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'gists_url'; + goto after_gistsUrl; + } + + $properties['gistsUrl'] = $value; + + after_gistsUrl: + + $value = $payload['starred_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'starred_url'; + goto after_starredUrl; + } + + $properties['starredUrl'] = $value; + + after_starredUrl: + + $value = $payload['subscriptions_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscriptions_url'; + goto after_subscriptionsUrl; + } + + $properties['subscriptionsUrl'] = $value; + + after_subscriptionsUrl: + + $value = $payload['organizations_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'organizations_url'; + goto after_organizationsUrl; + } + + $properties['organizationsUrl'] = $value; + + after_organizationsUrl: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'repos_url'; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['received_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'received_events_url'; + goto after_receivedEventsUrl; + } + + $properties['receivedEventsUrl'] = $value; + + after_receivedEventsUrl: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $missingFields[] = 'type'; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + + $value = $payload['site_admin'] ?? null; + + if ($value === null) { + $missingFields[] = 'site_admin'; + goto after_siteAdmin; + } + + $properties['siteAdmin'] = $value; + + after_siteAdmin: + + $value = $payload['starred_at'] ?? null; + + if ($value === null) { + $properties['starredAt'] = null; + goto after_starredAt; + } + + $properties['starredAt'] = $value; + + after_starredAt: + + $value = $payload['user_view_type'] ?? null; + + if ($value === null) { + $properties['userViewType'] = null; + goto after_userViewType; + } + + $properties['userViewType'] = $value; + + after_userViewType: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\SimpleUser', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️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\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\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\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(array $payload): \ApiClients\Client\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new \ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks(array $payload): EnterpriseWebhooks + { + $properties = []; + $missingFields = []; + try { + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['website_url'] ?? null; + + if ($value === null) { + $properties['websiteUrl'] = null; + goto after_websiteUrl; + } + + $properties['websiteUrl'] = $value; + + after_websiteUrl: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $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['slug'] ?? null; + + if ($value === null) { + $missingFields[] = 'slug'; + goto after_slug; + } + + $properties['slug'] = $value; + + after_slug: + + $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['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(EnterpriseWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new EnterpriseWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\SimpleInstallation', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\OrganizationSimpleWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties(array $payload): CustomProperties + { + $properties = []; + $missingFields = []; + try { + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\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\GitHubEnterpriseCloud\Schema\WebhookSecretScanningScanCompleted' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookSecretScanningScanCompleted($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleInstallation' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationSimpleWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($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⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookSecretScanningScanCompleted(mixed $object): mixed + { + assert($object instanceof WebhookSecretScanningScanCompleted); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $type = $object->type; + after_type: $result['type'] = $type; + + $source = $object->source; + after_source: $result['source'] = $source; + + $startedAt = $object->startedAt; + after_startedAt: $result['started_at'] = $startedAt; + + $completedAt = $object->completedAt; + after_completedAt: $result['completed_at'] = $completedAt; + + $secretTypes = $object->secretTypes; + + if ($secretTypes === null) { + goto after_secretTypes; + } + + static $secretTypesSerializer0; + + if ($secretTypesSerializer0 === null) { + $secretTypesSerializer0 = new SerializeArrayItems(...[]); + } + + $secretTypes = $secretTypesSerializer0->serialize($secretTypes, $this); + after_secretTypes: $result['secret_types'] = $secretTypes; + + $customPatternName = $object->customPatternName; + + if ($customPatternName === null) { + goto after_customPatternName; + } + + after_customPatternName: $result['custom_pattern_name'] = $customPatternName; + + $customPatternScope = $object->customPatternScope; + + if ($customPatternScope === null) { + goto after_customPatternScope; + } + + after_customPatternScope: $result['custom_pattern_scope'] = $customPatternScope; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $enterprise = $object->enterprise; + + if ($enterprise === null) { + goto after_enterprise; + } + + $enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($enterprise); + after_enterprise: $result['enterprise'] = $enterprise; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $sender = $object->sender; + + if ($sender === null) { + goto after_sender; + } + + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $userViewType = $object->userViewType; + + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHubEnterpriseCloud\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⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks(mixed $object): mixed + { + assert($object instanceof EnterpriseWebhooks); + $result = []; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $websiteUrl = $object->websiteUrl; + + if ($websiteUrl === null) { + goto after_websiteUrl; + } + + after_websiteUrl: $result['website_url'] = $websiteUrl; + + $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; + + $slug = $object->slug; + after_slug: $result['slug'] = $slug; + + $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; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️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⚡️GitHubEnterpriseCloud⚡️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; + } + + /** + * @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/GitHubEnterpriseCloud/src/Internal/Hydrators.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php index 67e89a0e072..6f80f9b8a4d 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php @@ -799,6 +799,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\WebHook\RepositoryVulnerabilityAlert|null $webHook🪝RepositoryVulnerabilityAlert = null; private Internal\Hydrator\WebHook\SecretScanningAlert|null $webHook🪝SecretScanningAlert = null; private Internal\Hydrator\WebHook\SecretScanningAlertLocation|null $webHook🪝SecretScanningAlertLocation = null; + private Internal\Hydrator\WebHook\SecretScanningScan|null $webHook🪝SecretScanningScan = null; private Internal\Hydrator\WebHook\SecurityAdvisory|null $webHook🪝SecurityAdvisory = null; private Internal\Hydrator\WebHook\SecurityAndAnalysis|null $webHook🪝SecurityAndAnalysis = null; private Internal\Hydrator\WebHook\Sponsorship|null $webHook🪝Sponsorship = null; @@ -1165,6 +1166,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertCreate', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksAlert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksAlert\\Dismisser', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert\\Dismisser', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertReopen', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertResolve', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert\\Dismisser' => $this->getObjectMapperWebHook🪝RepositoryVulnerabilityAlert()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecretScanningAlertWebhook', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertPubliclyLeaked', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertReopened', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertResolved', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertValidated' => $this->getObjectMapperWebHook🪝SecretScanningAlert()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertLocationCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecretScanningLocation', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertLocationCreatedFormEncoded' => $this->getObjectMapperWebHook🪝SecretScanningAlertLocation()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningScanCompleted' => $this->getObjectMapperWebHook🪝SecretScanningScan()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryPublished', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSecurityAdvisory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSecurityAdvisory\\Cvss', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryUpdated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryWithdrawn', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory\\Cvss' => $this->getObjectMapperWebHook🪝SecurityAdvisory()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAndAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAndAnalysis\\Changes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAndAnalysis\\Changes\\From' => $this->getObjectMapperWebHook🪝SecurityAndAnalysis()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipCancelled', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Maintainer', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Sponsor', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Sponsorable', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Tier', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipEdited', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipEdited\\Changes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipEdited\\Changes\\PrivacyLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipPendingCancellation', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipPendingTierChange', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksChanges8', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksChanges8\\Tier', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksChanges8\\Tier\\From', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipTierChanged' => $this->getObjectMapperWebHook🪝Sponsorship()->hydrateObject($className, $payload), @@ -1550,6 +1552,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertCreate', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksAlert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksAlert\\Dismisser', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert\\Dismisser', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertReopen', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertResolve', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert\\Dismisser' => $this->getObjectMapperWebHook🪝RepositoryVulnerabilityAlert()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecretScanningAlertWebhook', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertPubliclyLeaked', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertReopened', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertResolved', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertValidated' => $this->getObjectMapperWebHook🪝SecretScanningAlert()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertLocationCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecretScanningLocation', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningAlertLocationCreatedFormEncoded' => $this->getObjectMapperWebHook🪝SecretScanningAlertLocation()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecretScanningScanCompleted' => $this->getObjectMapperWebHook🪝SecretScanningScan()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryPublished', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSecurityAdvisory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSecurityAdvisory\\Cvss', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryUpdated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryWithdrawn', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory\\Cvss' => $this->getObjectMapperWebHook🪝SecurityAdvisory()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAndAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAndAnalysis\\Changes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSecurityAndAnalysis\\Changes\\From' => $this->getObjectMapperWebHook🪝SecurityAndAnalysis()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipCancelled', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Maintainer', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Sponsor', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Sponsorable', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksSponsorship\\Tier', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipEdited', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipEdited\\Changes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipEdited\\Changes\\PrivacyLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipPendingCancellation', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipPendingTierChange', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksChanges8', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksChanges8\\Tier', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksChanges8\\Tier\\From', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookSponsorshipTierChanged' => $this->getObjectMapperWebHook🪝Sponsorship()->serializeObject($object), @@ -8669,6 +8672,15 @@ public function getObjectMapperWebHook🪝SecretScanningAlertLocation(): Interna return $this->webHook🪝SecretScanningAlertLocation; } + public function getObjectMapperWebHook🪝SecretScanningScan(): Internal\Hydrator\WebHook\SecretScanningScan + { + if ($this->webHook🪝SecretScanningScan instanceof Internal\Hydrator\WebHook\SecretScanningScan === false) { + $this->webHook🪝SecretScanningScan = new Internal\Hydrator\WebHook\SecretScanningScan(); + } + + return $this->webHook🪝SecretScanningScan; + } + public function getObjectMapperWebHook🪝SecurityAdvisory(): Internal\Hydrator\WebHook\SecurityAdvisory { if ($this->webHook🪝SecurityAdvisory instanceof Internal\Hydrator\WebHook\SecurityAdvisory === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php index 03a4208eded..d259340b5f2 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php @@ -29,9 +29,7 @@ final class ListAlertsForEnterprise private string $enterprise; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. By default all secret types are returned. - See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" - for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php index 682066eb602..761dfe7eee6 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php @@ -29,9 +29,7 @@ final class ListAlertsForOrg private string $org; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. By default all secret types are returned. - See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" - for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php index 598859e951d..14660f93f31 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php @@ -29,9 +29,7 @@ final class ListAlertsForOrgListing private string $org; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. By default all secret types are returned. - See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" - for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php index e982797ba49..da9918b3b91 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php @@ -32,9 +32,7 @@ final class ListAlertsForRepo private string $repo; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. By default all secret types are returned. - See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" - for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php index f49da4d575d..f9e45dcdadf 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php @@ -32,9 +32,7 @@ final class ListAlertsForRepoListing private string $repo; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. By default all secret types are returned. - See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" - for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/CreateOrUpdateEnterpriseCustomProperty.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/CreateOrUpdateEnterpriseCustomProperty.php index 1491cce84a0..fa47dfb9196 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/CreateOrUpdateEnterpriseCustomProperty.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/CreateOrUpdateEnterpriseCustomProperty.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $enterprise, string $customPropertyName, array $params): CustomProperty { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\EnterpriseAdmin\CreateOrUpdateEnterpriseCustomProperty($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise, $customPropertyName); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php index df7219d39c1..850fd588df3 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, string $customPropertyName, array $params): CustomProperty { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\CreateOrUpdateCustomProperty($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $customPropertyName); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/CreateEnterpriseRuleset.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/CreateEnterpriseRuleset.php index 16b97e570a8..615921adee1 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/CreateEnterpriseRuleset.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/CreateEnterpriseRuleset.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $enterprise, array $params): RepositoryRuleset { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\CreateEnterpriseRuleset($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/DeleteEnterpriseRuleset.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/DeleteEnterpriseRuleset.php index a0748bf92dd..0785034cfde 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/DeleteEnterpriseRuleset.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/DeleteEnterpriseRuleset.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $enterprise, int $rulesetId): WithoutBody { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\DeleteEnterpriseRuleset($this->responseSchemaValidator, $this->hydrator, $enterprise, $rulesetId); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetEnterpriseRuleset.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetEnterpriseRuleset.php index c304fd6b6e2..79d3a746348 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetEnterpriseRuleset.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetEnterpriseRuleset.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $enterprise, int $rulesetId): RepositoryRuleset { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\GetEnterpriseRuleset($this->responseSchemaValidator, $this->hydrator, $enterprise, $rulesetId); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/UpdateEnterpriseRuleset.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/UpdateEnterpriseRuleset.php index 6b44be7d5a8..e19648d45cb 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/UpdateEnterpriseRuleset.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/UpdateEnterpriseRuleset.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $enterprise, int $rulesetId, array $params): RepositoryRuleset { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\UpdateEnterpriseRuleset($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise, $rulesetId); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php index c0e72b972b0..f2bc53d0af0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ 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, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php index fd5ccdfa547..96fb0bcfd15 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ 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, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForOrg($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php index 414583357bd..84d5caba325 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ 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, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForOrgListing($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php index eeaf4409cb0..fb48c9c4c32 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable|WithoutBody */ + /** @return iterable|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, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php index a4a217ea1c6..184219dca50 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable|WithoutBody */ + /** @return iterable|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, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Five.php index 4fc8d57c5ba..21b44ebe4d2 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Five.php @@ -14,7 +14,6 @@ public function __construct(private Routers $routers) { } - /** @return |\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ public function call(string $call, array $params, array $pathChunks): WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Repos.php index 16d961757ed..97822831cd4 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Repos.php @@ -58,6 +58,7 @@ public function declineInvitationForAuthenticatedUser(array $params): WithoutBod return $operator->call($arguments['invitation_id']); } + /** @return */ public function deleteEnterpriseRuleset(array $params): WithoutBody { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php index 0e87d840e2b..455ace467b6 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php @@ -56,7 +56,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Schema\RepositoryRuleset|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 */ + /** @return |Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|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 */ public function call(string $call, array $params, array $pathChunks): HookDelivery|ActionsEnterprisePermissions|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|AuditLogStreamKey|iterable|WithoutBody|RepositoryRuleset|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|ExternalGroup|OrgHook|OrgMembership|Migration|OrganizationRole|GroupMapping|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php index 480674c792d..81fca68d2bc 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php @@ -309,6 +309,7 @@ public function listForUser(array $params): iterable return $operator->call($arguments['username'], $arguments['direction'], $arguments['type'], $arguments['sort'], $arguments['per_page'], $arguments['page']); } + /** @return */ public function getEnterpriseRuleset(array $params): RepositoryRuleset { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php index 12908e81155..1ad5509191c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php @@ -38,7 +38,7 @@ public function getSecurityAnalysisSettingsForEnterprise(array $params): Enterpr return $operator->call($arguments['enterprise']); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForEnterprise(array $params): iterable { $arguments = []; @@ -119,7 +119,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'], $arguments['is_publicly_leaked'], $arguments['is_multi_repo']); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForOrg(array $params): iterable { $arguments = []; @@ -206,7 +206,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'], $arguments['is_publicly_leaked'], $arguments['is_multi_repo']); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepo(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php index 50d2f6ca192..b2cb773fd57 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php @@ -86,7 +86,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|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 */ + /** @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|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 */ public function call(string $call, array $params, array $pathChunks): ActionsCacheUsageOrgEnterprise|Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|GetAuditLogStreamConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|CustomProperty|ActionsBillingUsage|AdvancedSecurityActiveCommitters|GetAllCostCenters|PackagesBillingUsage|CombinedBillingUsage|BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|RunnerGroupsOrg|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|RuleSuite|ExternalGroups|ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|ScimEnterpriseGroupList|ScimEnterpriseUserList|ScimUserList|TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php index 83c51755a6d..2f6d010bc54 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|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 */ + /** @return Observable|Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|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 */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php index 51929256cde..1182ff1cc51 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return Observable */ + /** @return iterable */ public function listAlertsForOrgListing(array $params): iterable { $arguments = []; @@ -114,7 +114,7 @@ public function listAlertsForOrgListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepoListing(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php index be9aeeda656..5f165d2f2cb 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|WithoutBody|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php index 909226c3de3..c7c5f3c2254 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php @@ -30,7 +30,6 @@ public function __construct(private Routers $routers) { } - /** @return |Schema\RepositoryRuleset */ public function call(string $call, array $params, array $pathChunks): Integration|Authorization|RepositoryRuleset|GistComment|WithoutBody|BaseGist|OrganizationCustomRepositoryRole|OrgHook|OrganizationInvitation|Migration|OrganizationRole|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|Project|FullRepository|TeamFull|ProjectColumn|TeamDiscussion { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Repos.php index 7699865fdf2..78a64b34d96 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Repos.php @@ -45,6 +45,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + /** @return */ public function createEnterpriseRuleset(array $params): RepositoryRuleset { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/EnterpriseAdmin.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/EnterpriseAdmin.php index 76806c85c94..3955f70742c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/EnterpriseAdmin.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/EnterpriseAdmin.php @@ -216,6 +216,7 @@ public function updateAuditLogStream(array $params): GetAuditLogStreamConfig return $operator->call($arguments['enterprise'], $arguments['stream_id'], $params); } + /** @return */ public function createOrUpdateEnterpriseCustomProperty(array $params): CustomProperty { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Five.php index 396dd1d5bb9..58b1cab3be9 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Five.php @@ -25,7 +25,6 @@ public function __construct(private Routers $routers) { } - /** @return |Schema\RepositoryRuleset */ public function call(string $call, array $params, array $pathChunks): WithoutBody|RepositoryRuleset|ThreadSubscription|OrgMembership|Json|Import|InteractionLimitResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\EnableLfsForRepo\Response\ApplicationJson\Accepted\Application\Json|Accepted|RepositorySubscription|Topic|TeamMembership|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Orgs.php index b3bf53958d6..5af585084c0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Orgs.php @@ -160,6 +160,7 @@ public function assignUserToOrgRole(array $params): WithoutBody return $operator->call($arguments['org'], $arguments['username'], $arguments['role_id']); } + /** @return */ public function createOrUpdateCustomProperty(array $params): CustomProperty { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Repos.php index 2d771262fe9..6da83911edc 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Repos.php @@ -28,6 +28,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + /** @return */ public function updateEnterpriseRuleset(array $params): RepositoryRuleset { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Six.php index c433cf64ec3..666abb9ee1e 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Six.php @@ -21,7 +21,6 @@ public function __construct(private Routers $routers) { } - /** @return |Schema\CustomProperty */ public function call(string $call, array $params, array $pathChunks): WithoutBody|GetAuditLogStreamConfig|CustomProperty|EmptyObject|RepositoryInvitation|FileCommit|Environment|RepositoryRuleset { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/WebHook/SecretScanningScan.php b/clients/GitHubEnterpriseCloud/src/Internal/WebHook/SecretScanningScan.php new file mode 100644 index 00000000000..846977f1e1b --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/WebHook/SecretScanningScan.php @@ -0,0 +1,45 @@ +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\WebhookSecretScanningScanCompleted::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookSecretScanningScanCompleted::class, $data); + } catch (Throwable) { + goto actions_aaaaa; + } + } + + actions_aaaaa: + throw $error; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php b/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php index 19384cc3521..976ce8671d3 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php @@ -304,6 +304,7 @@ public function getEnterpriseCustomProperty(string $enterprise, string $customPr return $this->operators->enterpriseAdmin👷GetEnterpriseCustomProperty()->call($enterprise, $customPropertyName); } + /** @return */ public function createOrUpdateEnterpriseCustomProperty(string $enterprise, string $customPropertyName, array $params): CustomProperty { return $this->operators->enterpriseAdmin👷CreateOrUpdateEnterpriseCustomProperty()->call($enterprise, $customPropertyName, $params); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php index 87148d94615..2eb0f9241f3 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php @@ -553,6 +553,7 @@ public function getCustomProperty(string $org, string $customPropertyName): Cust return $this->operators->orgs👷GetCustomProperty()->call($org, $customPropertyName); } + /** @return */ public function createOrUpdateCustomProperty(string $org, string $customPropertyName, array $params): CustomProperty { return $this->operators->orgs👷CreateOrUpdateCustomProperty()->call($org, $customPropertyName, $params); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php index a2a9157c9a9..2e6611a776b 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php @@ -71,21 +71,25 @@ public function __construct(private Internal\Operators $operators) { } + /** @return */ public function createEnterpriseRuleset(string $enterprise, array $params): RepositoryRuleset { return $this->operators->repos👷CreateEnterpriseRuleset()->call($enterprise, $params); } + /** @return */ public function getEnterpriseRuleset(string $enterprise, int $rulesetId): RepositoryRuleset { return $this->operators->repos👷GetEnterpriseRuleset()->call($enterprise, $rulesetId); } + /** @return */ public function updateEnterpriseRuleset(string $enterprise, int $rulesetId, array $params): RepositoryRuleset { return $this->operators->repos👷UpdateEnterpriseRuleset()->call($enterprise, $rulesetId, $params); } + /** @return */ public function deleteEnterpriseRuleset(string $enterprise, int $rulesetId): WithoutBody { return $this->operators->repos👷DeleteEnterpriseRuleset()->call($enterprise, $rulesetId); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php b/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php index c1fb9c317fd..3ea594570e7 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php @@ -30,7 +30,7 @@ public function patchSecurityAnalysisSettingsForEnterprise(string $enterprise, a return $this->operators->secretScanning👷PatchSecurityAnalysisSettingsForEnterprise()->call($enterprise, $params); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForEnterprise(string $enterprise, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $perPage, bool $isPubliclyLeaked, bool $isMultiRepo): iterable { return $this->operators->secretScanning👷ListAlertsForEnterprise()->call($enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage, $isPubliclyLeaked, $isMultiRepo); @@ -42,25 +42,25 @@ public function postSecurityProductEnablementForEnterprise(string $enterprise, s return $this->operators->secretScanning👷PostSecurityProductEnablementForEnterprise()->call($enterprise, $securityProduct, $enablement); } - /** @return Observable */ + /** @return iterable */ 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, bool $isPubliclyLeaked, bool $isMultiRepo): iterable { return $this->operators->secretScanning👷ListAlertsForOrg()->call($org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); } - /** @return Observable */ + /** @return iterable */ 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, bool $isPubliclyLeaked, bool $isMultiRepo): iterable { return $this->operators->secretScanning👷ListAlertsForOrgListing()->call($org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); } - /** @return Observable|WithoutBody */ + /** @return iterable|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, bool $isPubliclyLeaked, bool $isMultiRepo): iterable|WithoutBody { return $this->operators->secretScanning👷ListAlertsForRepo()->call($owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); } - /** @return Observable|WithoutBody */ + /** @return iterable|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, bool $isPubliclyLeaked, bool $isMultiRepo): iterable|WithoutBody { return $this->operators->secretScanning👷ListAlertsForRepoListing()->call($owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php index f45bc53785a..b22f442fc49 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -448,7 +448,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PUT /enterprises/{enterprise}/properties/schema/{custom_property_name}') { - return $this->typeResolver->resolve('Schema\\CustomProperty'); + return $this->typeResolver->resolve(''); } if ($call === 'DELETE /enterprises/{enterprise}/properties/schema/{custom_property_name}') { @@ -456,23 +456,23 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /enterprises/{enterprise}/rulesets') { - return $this->typeResolver->resolve('Schema\\RepositoryRuleset'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /enterprises/{enterprise}/rulesets/{ruleset_id}') { - return $this->typeResolver->resolve('Schema\\RepositoryRuleset'); + return $this->typeResolver->resolve(''); } if ($call === 'PUT /enterprises/{enterprise}/rulesets/{ruleset_id}') { - return $this->typeResolver->resolve('Schema\\RepositoryRuleset'); + return $this->typeResolver->resolve(''); } if ($call === 'DELETE /enterprises/{enterprise}/rulesets/{ruleset_id}') { - return $this->typeResolver->resolve('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /enterprises/{enterprise}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /enterprises/{enterprise}/settings/billing/actions') { @@ -1752,7 +1752,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PUT /orgs/{org}/properties/schema/{custom_property_name}') { - return $this->typeResolver->resolve('Schema\\CustomProperty'); + return $this->typeResolver->resolve(''); } if ($call === 'DELETE /orgs/{org}/properties/schema/{custom_property_name}') { @@ -1844,11 +1844,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /orgs/{org}/security-advisories') { @@ -4064,11 +4064,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable|WithoutBody'); + return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'LIST /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable|WithoutBody'); + return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}') { diff --git a/clients/GitHubEnterpriseCloud/src/Schema/WebhookSecretScanningScanCompleted.php b/clients/GitHubEnterpriseCloud/src/Schema/WebhookSecretScanningScanCompleted.php new file mode 100644 index 00000000000..ac9aa169f3e --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Schema/WebhookSecretScanningScanCompleted.php @@ -0,0 +1,2337 @@ + $object::class, 'data' => $this->hydrator->serializeObject($object)]; } - /** @return Schema\WebhookBranchProtectionConfigurationDisabled|Schema\WebhookBranchProtectionConfigurationEnabled|Schema\WebhookBranchProtectionRuleCreated|Schema\WebhookBranchProtectionRuleDeleted|Schema\WebhookBranchProtectionRuleEdited|Schema\WebhookExemptionRequestCancelled|Schema\WebhookExemptionRequestCompleted|Schema\WebhookExemptionRequestCreated|Schema\WebhookExemptionRequestResponseDismissed|Schema\WebhookExemptionRequestResponseSubmitted|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\WebhookSecretScanningAlertPubliclyLeaked|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 */ + /** @return Schema\WebhookBranchProtectionConfigurationDisabled|Schema\WebhookBranchProtectionConfigurationEnabled|Schema\WebhookBranchProtectionRuleCreated|Schema\WebhookBranchProtectionRuleDeleted|Schema\WebhookBranchProtectionRuleEdited|Schema\WebhookExemptionRequestCancelled|Schema\WebhookExemptionRequestCompleted|Schema\WebhookExemptionRequestCreated|Schema\WebhookExemptionRequestResponseDismissed|Schema\WebhookExemptionRequestResponseSubmitted|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\WebhookSecretScanningAlertPubliclyLeaked|Schema\WebhookSecretScanningAlertReopened|Schema\WebhookSecretScanningAlertResolved|Schema\WebhookSecretScanningAlertValidated|Schema\WebhookSecretScanningAlertLocationCreated|Schema\WebhookSecretScanningAlertLocationCreatedFormEncoded|Schema\WebhookSecretScanningScanCompleted|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 { @@ -816,6 +817,17 @@ public function resolve(array $headers, array $data): object } webhooks_aaack: + try { + if ($this->secretScanningScan instanceof Internal\WebHook\SecretScanningScan === false) { + $this->secretScanningScan = new Internal\WebHook\SecretScanningScan($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecretScanningScan()); + } + + return $this->secretScanningScan->resolve($headers, $data); + } catch (Throwable $error) { + goto webhooks_aaacl; + } + + webhooks_aaacl: try { if ($this->securityAdvisory instanceof Internal\WebHook\SecurityAdvisory === false) { $this->securityAdvisory = new Internal\WebHook\SecurityAdvisory($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecurityAdvisory()); @@ -823,10 +835,10 @@ public function resolve(array $headers, array $data): object return $this->securityAdvisory->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacl; + goto webhooks_aaacm; } - webhooks_aaacl: + webhooks_aaacm: try { if ($this->securityAndAnalysis instanceof Internal\WebHook\SecurityAndAnalysis === false) { $this->securityAndAnalysis = new Internal\WebHook\SecurityAndAnalysis($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecurityAndAnalysis()); @@ -834,10 +846,10 @@ public function resolve(array $headers, array $data): object return $this->securityAndAnalysis->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacm; + goto webhooks_aaacn; } - webhooks_aaacm: + webhooks_aaacn: try { if ($this->sponsorship instanceof Internal\WebHook\Sponsorship === false) { $this->sponsorship = new Internal\WebHook\Sponsorship($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Sponsorship()); @@ -845,10 +857,10 @@ public function resolve(array $headers, array $data): object return $this->sponsorship->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacn; + goto webhooks_aaaco; } - webhooks_aaacn: + webhooks_aaaco: try { if ($this->star instanceof Internal\WebHook\Star === false) { $this->star = new Internal\WebHook\Star($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Star()); @@ -856,10 +868,10 @@ public function resolve(array $headers, array $data): object return $this->star->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaco; + goto webhooks_aaacp; } - webhooks_aaaco: + webhooks_aaacp: try { if ($this->status instanceof Internal\WebHook\Status === false) { $this->status = new Internal\WebHook\Status($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Status()); @@ -867,10 +879,10 @@ public function resolve(array $headers, array $data): object return $this->status->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacp; + goto webhooks_aaacq; } - webhooks_aaacp: + webhooks_aaacq: try { if ($this->subIssues instanceof Internal\WebHook\SubIssues === false) { $this->subIssues = new Internal\WebHook\SubIssues($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SubIssues()); @@ -878,10 +890,10 @@ public function resolve(array $headers, array $data): object return $this->subIssues->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacq; + goto webhooks_aaacr; } - webhooks_aaacq: + webhooks_aaacr: try { if ($this->teamAdd instanceof Internal\WebHook\TeamAdd === false) { $this->teamAdd = new Internal\WebHook\TeamAdd($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝TeamAdd()); @@ -889,10 +901,10 @@ public function resolve(array $headers, array $data): object return $this->teamAdd->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacr; + goto webhooks_aaacs; } - webhooks_aaacr: + webhooks_aaacs: try { if ($this->team instanceof Internal\WebHook\Team === false) { $this->team = new Internal\WebHook\Team($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Team()); @@ -900,10 +912,10 @@ public function resolve(array $headers, array $data): object return $this->team->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacs; + goto webhooks_aaact; } - webhooks_aaacs: + webhooks_aaact: try { if ($this->watch instanceof Internal\WebHook\Watch === false) { $this->watch = new Internal\WebHook\Watch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Watch()); @@ -911,10 +923,10 @@ public function resolve(array $headers, array $data): object return $this->watch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaact; + goto webhooks_aaacu; } - webhooks_aaact: + webhooks_aaacu: try { if ($this->workflowDispatch instanceof Internal\WebHook\WorkflowDispatch === false) { $this->workflowDispatch = new Internal\WebHook\WorkflowDispatch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowDispatch()); @@ -922,10 +934,10 @@ public function resolve(array $headers, array $data): object return $this->workflowDispatch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacu; + goto webhooks_aaacv; } - webhooks_aaacu: + webhooks_aaacv: try { if ($this->workflowJob instanceof Internal\WebHook\WorkflowJob === false) { $this->workflowJob = new Internal\WebHook\WorkflowJob($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowJob()); @@ -933,10 +945,10 @@ public function resolve(array $headers, array $data): object return $this->workflowJob->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacv; + goto webhooks_aaacw; } - webhooks_aaacv: + webhooks_aaacw: try { if ($this->workflowRun instanceof Internal\WebHook\WorkflowRun === false) { $this->workflowRun = new Internal\WebHook\WorkflowRun($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowRun()); @@ -944,10 +956,10 @@ public function resolve(array $headers, array $data): object return $this->workflowRun->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacw; + goto webhooks_aaacx; } - webhooks_aaacw: + webhooks_aaacx: throw $error; } } diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index dd3f7751372..f07a1aa082c 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -118,13 +118,13 @@ function authHeader(): string assertType('Observable', $client->call('GET /enterprises/{enterprise}/properties/schema')); assertType('Observable', $client->call('PATCH /enterprises/{enterprise}/properties/schema')); assertType('', $client->call('GET /enterprises/{enterprise}/properties/schema/{custom_property_name}')); -assertType('Schema\\CustomProperty', $client->call('PUT /enterprises/{enterprise}/properties/schema/{custom_property_name}')); +assertType('', $client->call('PUT /enterprises/{enterprise}/properties/schema/{custom_property_name}')); assertType('', $client->call('DELETE /enterprises/{enterprise}/properties/schema/{custom_property_name}')); -assertType('Schema\\RepositoryRuleset', $client->call('POST /enterprises/{enterprise}/rulesets')); -assertType('Schema\\RepositoryRuleset', $client->call('GET /enterprises/{enterprise}/rulesets/{ruleset_id}')); -assertType('Schema\\RepositoryRuleset', $client->call('PUT /enterprises/{enterprise}/rulesets/{ruleset_id}')); -assertType('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('DELETE /enterprises/{enterprise}/rulesets/{ruleset_id}')); -assertType('Observable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); +assertType('', $client->call('POST /enterprises/{enterprise}/rulesets')); +assertType('', $client->call('GET /enterprises/{enterprise}/rulesets/{ruleset_id}')); +assertType('', $client->call('PUT /enterprises/{enterprise}/rulesets/{ruleset_id}')); +assertType('', $client->call('DELETE /enterprises/{enterprise}/rulesets/{ruleset_id}')); +assertType('iterable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/actions')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/advanced-security')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/cost-centers')); @@ -444,7 +444,7 @@ function authHeader(): string assertType('Observable', $client->call('GET /orgs/{org}/properties/schema')); assertType('Observable', $client->call('PATCH /orgs/{org}/properties/schema')); assertType('', $client->call('GET /orgs/{org}/properties/schema/{custom_property_name}')); -assertType('Schema\\CustomProperty', $client->call('PUT /orgs/{org}/properties/schema/{custom_property_name}')); +assertType('', $client->call('PUT /orgs/{org}/properties/schema/{custom_property_name}')); assertType('', $client->call('DELETE /orgs/{org}/properties/schema/{custom_property_name}')); assertType('Observable', $client->call('GET /orgs/{org}/properties/values')); assertType('Observable', $client->call('LIST /orgs/{org}/properties/values')); @@ -467,8 +467,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('Observable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); -assertType('Observable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); +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}/security-advisories')); assertType('Observable', $client->call('GET /orgs/{org}/security-managers')); assertType('', $client->call('PUT /orgs/{org}/security-managers/teams/{team_slug}')); @@ -1022,8 +1022,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('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); -assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); +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('', $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/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index 5a1f692b725..66ded8167f4 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -70157,6 +70157,73 @@ webhooks: - repository - organization - app + secret-scanning-scan-completed: + post: + summary: |- + This event occurs when secret scanning completes certain scans on a repository. For more information about secret scanning, see "[About secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/about-secret-scanning)." + + Scans can originate from multiple events such as updates to a custom pattern, a push to a repository, or updates + to patterns from partners. For more information on custom patterns, see "[About custom patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns)." + + To subscribe to this event, a GitHub App must have at least read-level access for the "Secret scanning alerts" repository permission. + description: A secret scanning scan was completed. + operationId: secret-scanning-scan/completed + externalDocs: + url: https://docs.github.com/enterprise-cloud@latest//webhooks/webhook-events-and-payloads#secret_scanning_scan + 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-secret-scanning-scan-completed" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: secret_scanning_scan + supported-webhook-types: + - repository + - organization + - app security-advisory-published: post: summary: |- @@ -201000,6 +201067,79 @@ components: - action - alert - repository + webhook-secret-scanning-scan-completed: + title: secret_scanning_scan completed event + type: object + properties: + action: + type: string + enum: + - completed + type: + type: string + description: What type of scan was completed + enum: + - backfill + - custom-pattern-backfill + - pattern-version-backfill + source: + type: string + description: What type of content was scanned + enum: + - git + - issues + - pull-requests + - discussions + - wiki + started_at: + type: string + format: date-time + description: 'The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' + completed_at: + type: string + format: date-time + description: 'The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' + secret_types: + type: + - array + - 'null' + description: List of patterns that were updated. This will be empty for + normal backfill scans or custom pattern updates + items: + type: string + custom_pattern_name: + type: + - string + - 'null' + description: If the scan was triggered by a custom pattern update, this + will be the name of the pattern that was updated + custom_pattern_scope: + type: + - string + - 'null' + description: If the scan was triggered by a custom pattern update, this + will be the scope of the pattern that was updated + enum: + - repository + - organization + - enterprise + - + repository: + "$ref": "#/components/schemas/repository-webhooks" + enterprise: + "$ref": "#/components/schemas/enterprise-webhooks" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + sender: + "$ref": "#/components/schemas/simple-user" + required: + - action + - source + - type + - started_at + - completed_at webhook-security-advisory-published: title: security_advisory published event type: object @@ -236496,9 +236636,9 @@ components: secret-scanning-alert-secret-type: name: secret_type in: query - description: |- - A comma-separated list of secret types to return. By default all secret types are returned. - See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" + description: A comma-separated list of secret types to return. All default secret + patterns are returned. To return experimental patterns, pass the token name(s) + in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. required: false schema: