From c8df3c2a3bac846748158b3c3fd9801c88ecaeff Mon Sep 17 00:00:00 2001 From: WyriHaximus <147145+WyriHaximus@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:08:30 +0000 Subject: [PATCH] [GitHub] Update to 1.1.4-4443d2c21890f0b754f9e632d191bd85 from 1.1.4-758801dbed7c532f009e5f428e0454a9 Detected Schema changes: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` ├──[➖] webhooks (63440:5)❌ ├─┬Paths │ ├─┬/orgs/{org}/secret-scanning/alerts │ │ └─┬GET │ │ └─┬Parameters │ │ └──[🔀] description (226261:20) │ ├─┬/enterprises/{enterprise}/secret-scanning/alerts │ │ └─┬GET │ │ └─┬Parameters │ │ └──[🔀] description (226261:20) │ └─┬/repos/{owner}/{repo}/secret-scanning/alerts │ └─┬GET │ └─┬Parameters │ └──[🔀] description (226261:20) └─┬Components └──[➖] schemas (191790:7)❌ ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | paths | 3 | 0 | | components | 1 | 1 | Date: 12/13/24 | Commit: New: etc/specs/GitHub/previous.spec.yaml, Original: etc/specs/GitHub/current.spec.yaml - ❌ **BREAKING Changes**: _1_ out of _4_ - **Modifications**: _3_ - **Removals**: _2_ - **Breaking Removals**: _2_ ERROR: breaking changes discovered --- .../GitHub/etc/openapi-client-generator.state | 64 +- .../Hydrator/WebHook/SecretScanningScan.php | 5444 +++++++++++++++++ clients/GitHub/src/Internal/Hydrators.php | 12 + .../ListAlertsForEnterprise.php | 4 +- .../SecretScanning/ListAlertsForOrg.php | 4 +- .../ListAlertsForOrgListing.php | 4 +- .../SecretScanning/ListAlertsForRepo.php | 4 +- .../ListAlertsForRepoListing.php | 4 +- .../Orgs/CreateOrUpdateCustomProperty.php | 1 + .../ListAlertsForEnterprise.php | 2 +- .../SecretScanning/ListAlertsForOrg.php | 2 +- .../ListAlertsForOrgListing.php | 2 +- .../SecretScanning/ListAlertsForRepo.php | 2 +- .../ListAlertsForRepoListing.php | 2 +- .../GitHub/src/Internal/Router/Get/Five.php | 2 +- .../Internal/Router/Get/SecretScanning.php | 6 +- .../GitHub/src/Internal/Router/Get/Six.php | 2 +- .../GitHub/src/Internal/Router/List/Five.php | 2 +- .../Internal/Router/List/SecretScanning.php | 4 +- .../GitHub/src/Internal/Router/List/Six.php | 2 +- .../GitHub/src/Internal/Router/Put/Orgs.php | 1 + .../GitHub/src/Internal/Router/Put/Six.php | 1 - .../Internal/WebHook/SecretScanningScan.php | 45 + clients/GitHub/src/Operation/Orgs.php | 1 + .../GitHub/src/Operation/SecretScanning.php | 10 +- .../src/PHPStan/ClientCallReturnTypes.php | 12 +- .../WebhookSecretScanningScanCompleted.php | 2337 +++++++ clients/GitHub/src/WebHooks.php | 62 +- .../tests/Types/ClientCallReturnTypes.php | 12 +- etc/specs/GitHub/current.spec.yaml | 146 +- 30 files changed, 8095 insertions(+), 101 deletions(-) create mode 100644 clients/GitHub/src/Internal/Hydrator/WebHook/SecretScanningScan.php create mode 100644 clients/GitHub/src/Internal/WebHook/SecretScanningScan.php create mode 100644 clients/GitHub/src/Schema/WebhookSecretScanningScanCompleted.php diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index 202783b73ce..3bea0dee9df 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "758801dbed7c532f009e5f428e0454a9", + "specHash": "4443d2c21890f0b754f9e632d191bd85", "generatedFiles": { "files": [ { @@ -5532,7 +5532,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "9bb033435eaa98d866efe71eb1e4ddbd" + "hash": "7f50cc5ea564fc5d7844ba24209d3e63" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Activity.php", @@ -5560,7 +5560,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "90c1d602b0a3eaf126a21d0fb7acd48e" + "hash": "03d877ced99e54e4460a3cb9cbefc83d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", @@ -5648,7 +5648,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/WebHooks.php", - "hash": "b5787a9e45d42df3de2e13c8043d9b0f" + "hash": "f410ea53774e8b7e0b1e7500abe52b96" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php", @@ -12348,11 +12348,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "5ef32367f5f96fe04d071d97d5cf25a8" + "hash": "af66fb7841bb4e907081073aafb9b3ba" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "6ff1f101a2fc2ce58e347d095c27a591" + "hash": "41c927430ffa2540ebe7f835cdc98cc1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterpriseTest.php", @@ -15088,11 +15088,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrg.php", - "hash": "4e058a501d1589b785d57266e55afb10" + "hash": "e12e7df947efaa5143b80633dc732691" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrg.php", - "hash": "5055095bcefa6d8312f2b28a20b22686" + "hash": "616f754cc16989b17a971e7ece5f94b8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgTest.php", @@ -15100,11 +15100,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "35e21ddc44e09ae6b38060c33cf05351" + "hash": "2c037d4bd513cd1ca96a6823618bbc60" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "5d481946b23b0bacfcd8a582de4047cd" + "hash": "5c95a871bce5ad2b98fbf050cf1f528e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListingTest.php", @@ -20984,11 +20984,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepo.php", - "hash": "ebada9f9156f57826a192bbbc787a5ff" + "hash": "f7fc73b0f53290772f790be58df20312" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepo.php", - "hash": "fd02451b5ef91af3c0ae767a378e9c63" + "hash": "3aac065ae25320bd3a6bf79d75ee4d36" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoTest.php", @@ -20996,11 +20996,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "c109354602c188bce6a739c5426c9b6a" + "hash": "5b4871445b736c8d332aa0947b005f78" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "f2fbe0a1dbdad5a5a36888c369afed43" + "hash": "a17f9b8afc868944a6a494b8caeaaf3b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListingTest.php", @@ -24404,7 +24404,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecretScanning.php", - "hash": "dffa3ec1289d153acc0a8324215d4ec5" + "hash": "8e825afdbf25f991a93494a8fa7289ac" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Actions.php", @@ -24660,7 +24660,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/SecretScanning.php", - "hash": "972ff5051c257536310f274406ba0ec1" + "hash": "d6748a3281d1140c626e6f4f1858de30" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Pulls.php", @@ -24772,7 +24772,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Orgs.php", - "hash": "b7064f19fd6b2132fea4c2076dc726d0" + "hash": "f216337da6ea505b2938bd94df3bda5c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Codespaces.php", @@ -24852,11 +24852,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "2ce20ded007385c2c29e4b1324a69efa" + "hash": "c8e917cadb1e7661b7a11c581d808697" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "962ecbf39f794f3b916ab75b7349566f" + "hash": "1c7c34b9bf24636a4082b73c6e44ae24" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -24956,11 +24956,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "7516af6b41f8a9d3b475684f306347be" + "hash": "c41274c51f0be3c276a995d5583aeceb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "71625fca086e278619781593e380e8fb" + "hash": "d9873974ed59d288468b121deddd4980" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -25028,7 +25028,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Six.php", - "hash": "005f520b7747dbc03aca2290b99d7037" + "hash": "9f3dc75023548d3071b5b9a37ecfcf6b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Eight.php", @@ -27052,7 +27052,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "bbe3a818a57a0e6c4cb35058dd7c7a58" + "hash": "fdb38d7539d02602100cbb730efce40d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27440,7 +27440,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/CreateOrUpdateCustomProperty.php", - "hash": "e503ca6aa384e7f5366d52af6a340c75" + "hash": "0014f81ebf2c18215cdff0f91368e995" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/CreateOrUpdateCustomPropertyTest.php", @@ -27632,11 +27632,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "5ef44da46879f81f567a2e5f83aeba94" + "hash": "ddcba91e13599b74dbf8662aba1f62bc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "5cb480b9e80a6495a655321cbaa7d118" + "hash": "91477cc31a21c0535e2f269d5ccd45c7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -31089,6 +31089,18 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietE2314769\/Tiet2BBD4166\/Tiet71BBCC18\/TietF732B93A.php", "hash": "7f4dd2de7fbb297710571fe54d3dd79b" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningScanCompleted.php", + "hash": "9d36ab5a3a6bb89fdd5d3b56d0635fb0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/WebHook\/SecretScanningScan.php", + "hash": "a77dd1628b0a93860b18792585fc7f48" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecretScanningScan.php", + "hash": "1fa72263a892895d9058feb2b83d8ed7" } ] }, diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/SecretScanningScan.php b/clients/GitHub/src/Internal/Hydrator/WebHook/SecretScanningScan.php new file mode 100644 index 00000000000..d036dae1bb1 --- /dev/null +++ b/clients/GitHub/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\GitHub\Schema\WebhookSecretScanningScanCompleted' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningScanCompleted($payload), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($payload), + 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($payload), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($payload), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($payload), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\EnterpriseWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($payload), + 'ApiClients\Client\GitHub\Schema\SimpleInstallation' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($payload), + 'ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($payload), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️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⚡️GitHub⚡️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⚡️GitHub⚡️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⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $properties['sender'] = null; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\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\GitHub\Schema\WebhookSecretScanningScanCompleted', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks(array $payload): RepositoryWebhooks + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $missingFields[] = 'full_name'; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['license'] ?? null; + + if ($value === null) { + $properties['license'] = null; + goto after_license; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['license'] = $value; + + after_license: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['forks'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks'; + goto after_forks; + } + + $properties['forks'] = $value; + + after_forks: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $missingFields[] = 'private'; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['fork'] ?? null; + + if ($value === null) { + $missingFields[] = 'fork'; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['archive_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'archive_url'; + goto after_archiveUrl; + } + + $properties['archiveUrl'] = $value; + + after_archiveUrl: + + $value = $payload['assignees_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'assignees_url'; + goto after_assigneesUrl; + } + + $properties['assigneesUrl'] = $value; + + after_assigneesUrl: + + $value = $payload['blobs_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'blobs_url'; + goto after_blobsUrl; + } + + $properties['blobsUrl'] = $value; + + after_blobsUrl: + + $value = $payload['branches_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'branches_url'; + goto after_branchesUrl; + } + + $properties['branchesUrl'] = $value; + + after_branchesUrl: + + $value = $payload['collaborators_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'collaborators_url'; + goto after_collaboratorsUrl; + } + + $properties['collaboratorsUrl'] = $value; + + after_collaboratorsUrl: + + $value = $payload['comments_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'comments_url'; + goto after_commentsUrl; + } + + $properties['commentsUrl'] = $value; + + after_commentsUrl: + + $value = $payload['commits_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'commits_url'; + goto after_commitsUrl; + } + + $properties['commitsUrl'] = $value; + + after_commitsUrl: + + $value = $payload['compare_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'compare_url'; + goto after_compareUrl; + } + + $properties['compareUrl'] = $value; + + after_compareUrl: + + $value = $payload['contents_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'contents_url'; + goto after_contentsUrl; + } + + $properties['contentsUrl'] = $value; + + after_contentsUrl: + + $value = $payload['contributors_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'contributors_url'; + goto after_contributorsUrl; + } + + $properties['contributorsUrl'] = $value; + + after_contributorsUrl: + + $value = $payload['deployments_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'deployments_url'; + goto after_deploymentsUrl; + } + + $properties['deploymentsUrl'] = $value; + + after_deploymentsUrl: + + $value = $payload['downloads_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'downloads_url'; + goto after_downloadsUrl; + } + + $properties['downloadsUrl'] = $value; + + after_downloadsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['forks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_url'; + goto after_forksUrl; + } + + $properties['forksUrl'] = $value; + + after_forksUrl: + + $value = $payload['git_commits_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_commits_url'; + goto after_gitCommitsUrl; + } + + $properties['gitCommitsUrl'] = $value; + + after_gitCommitsUrl: + + $value = $payload['git_refs_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_refs_url'; + goto after_gitRefsUrl; + } + + $properties['gitRefsUrl'] = $value; + + after_gitRefsUrl: + + $value = $payload['git_tags_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_tags_url'; + goto after_gitTagsUrl; + } + + $properties['gitTagsUrl'] = $value; + + after_gitTagsUrl: + + $value = $payload['git_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_url'; + goto after_gitUrl; + } + + $properties['gitUrl'] = $value; + + after_gitUrl: + + $value = $payload['issue_comment_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_comment_url'; + goto after_issueCommentUrl; + } + + $properties['issueCommentUrl'] = $value; + + after_issueCommentUrl: + + $value = $payload['issue_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_events_url'; + goto after_issueEventsUrl; + } + + $properties['issueEventsUrl'] = $value; + + after_issueEventsUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issues_url'; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['keys_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'keys_url'; + goto after_keysUrl; + } + + $properties['keysUrl'] = $value; + + after_keysUrl: + + $value = $payload['labels_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'labels_url'; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $value = $payload['languages_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'languages_url'; + goto after_languagesUrl; + } + + $properties['languagesUrl'] = $value; + + after_languagesUrl: + + $value = $payload['merges_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'merges_url'; + goto after_mergesUrl; + } + + $properties['mergesUrl'] = $value; + + after_mergesUrl: + + $value = $payload['milestones_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'milestones_url'; + goto after_milestonesUrl; + } + + $properties['milestonesUrl'] = $value; + + after_milestonesUrl: + + $value = $payload['notifications_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'notifications_url'; + goto after_notificationsUrl; + } + + $properties['notificationsUrl'] = $value; + + after_notificationsUrl: + + $value = $payload['pulls_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'pulls_url'; + goto after_pullsUrl; + } + + $properties['pullsUrl'] = $value; + + after_pullsUrl: + + $value = $payload['releases_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'releases_url'; + goto after_releasesUrl; + } + + $properties['releasesUrl'] = $value; + + after_releasesUrl: + + $value = $payload['ssh_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'ssh_url'; + goto after_sshUrl; + } + + $properties['sshUrl'] = $value; + + after_sshUrl: + + $value = $payload['stargazers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'stargazers_url'; + goto after_stargazersUrl; + } + + $properties['stargazersUrl'] = $value; + + after_stargazersUrl: + + $value = $payload['statuses_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'statuses_url'; + goto after_statusesUrl; + } + + $properties['statusesUrl'] = $value; + + after_statusesUrl: + + $value = $payload['subscribers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscribers_url'; + goto after_subscribersUrl; + } + + $properties['subscribersUrl'] = $value; + + after_subscribersUrl: + + $value = $payload['subscription_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscription_url'; + goto after_subscriptionUrl; + } + + $properties['subscriptionUrl'] = $value; + + after_subscriptionUrl: + + $value = $payload['tags_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'tags_url'; + goto after_tagsUrl; + } + + $properties['tagsUrl'] = $value; + + after_tagsUrl: + + $value = $payload['teams_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'teams_url'; + goto after_teamsUrl; + } + + $properties['teamsUrl'] = $value; + + after_teamsUrl: + + $value = $payload['trees_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'trees_url'; + goto after_treesUrl; + } + + $properties['treesUrl'] = $value; + + after_treesUrl: + + $value = $payload['clone_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'clone_url'; + goto after_cloneUrl; + } + + $properties['cloneUrl'] = $value; + + after_cloneUrl: + + $value = $payload['mirror_url'] ?? null; + + if ($value === null) { + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; + } + + $properties['mirrorUrl'] = $value; + + after_mirrorUrl: + + $value = $payload['hooks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['svn_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'svn_url'; + goto after_svnUrl; + } + + $properties['svnUrl'] = $value; + + after_svnUrl: + + $value = $payload['homepage'] ?? null; + + if ($value === null) { + $properties['homepage'] = null; + goto after_homepage; + } + + $properties['homepage'] = $value; + + after_homepage: + + $value = $payload['language'] ?? null; + + if ($value === null) { + $properties['language'] = null; + goto after_language; + } + + $properties['language'] = $value; + + after_language: + + $value = $payload['forks_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_count'; + goto after_forksCount; + } + + $properties['forksCount'] = $value; + + after_forksCount: + + $value = $payload['stargazers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; + } + + $properties['stargazersCount'] = $value; + + after_stargazersCount: + + $value = $payload['watchers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers_count'; + goto after_watchersCount; + } + + $properties['watchersCount'] = $value; + + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $missingFields[] = 'size'; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $missingFields[] = 'default_branch'; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: + + $value = $payload['custom_properties'] ?? null; + + if ($value === null) { + $properties['customProperties'] = null; + goto after_customProperties; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'customProperties'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['customProperties'] = $value; + + after_customProperties: + + $value = $payload['has_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_issues'; + goto after_hasIssues; + } + + $properties['hasIssues'] = $value; + + after_hasIssues: + + $value = $payload['has_projects'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_projects'; + goto after_hasProjects; + } + + $properties['hasProjects'] = $value; + + after_hasProjects: + + $value = $payload['has_wiki'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_wiki'; + goto after_hasWiki; + } + + $properties['hasWiki'] = $value; + + after_hasWiki: + + $value = $payload['has_pages'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_pages'; + goto after_hasPages; + } + + $properties['hasPages'] = $value; + + after_hasPages: + + $value = $payload['has_downloads'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; + } + + $properties['hasDownloads'] = $value; + + after_hasDownloads: + + $value = $payload['has_discussions'] ?? null; + + if ($value === null) { + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; + } + + $properties['hasDiscussions'] = $value; + + after_hasDiscussions: + + $value = $payload['archived'] ?? null; + + if ($value === null) { + $missingFields[] = 'archived'; + goto after_archived; + } + + $properties['archived'] = $value; + + after_archived: + + $value = $payload['disabled'] ?? null; + + if ($value === null) { + $missingFields[] = 'disabled'; + goto after_disabled; + } + + $properties['disabled'] = $value; + + after_disabled: + + $value = $payload['visibility'] ?? null; + + if ($value === null) { + $properties['visibility'] = null; + goto after_visibility; + } + + $properties['visibility'] = $value; + + after_visibility: + + $value = $payload['pushed_at'] ?? null; + + if ($value === null) { + $properties['pushedAt'] = null; + goto after_pushedAt; + } + + $properties['pushedAt'] = $value; + + after_pushedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['allow_rebase_merge'] ?? null; + + if ($value === null) { + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; + } + + $properties['allowRebaseMerge'] = $value; + + after_allowRebaseMerge: + + $value = $payload['template_repository'] ?? null; + + if ($value === null) { + $properties['templateRepository'] = null; + goto after_templateRepository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'templateRepository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['templateRepository'] = $value; + + after_templateRepository: + + $value = $payload['temp_clone_token'] ?? null; + + if ($value === null) { + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; + } + + $properties['tempCloneToken'] = $value; + + after_tempCloneToken: + + $value = $payload['allow_squash_merge'] ?? null; + + if ($value === null) { + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; + } + + $properties['allowSquashMerge'] = $value; + + after_allowSquashMerge: + + $value = $payload['allow_auto_merge'] ?? null; + + if ($value === null) { + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; + } + + $properties['allowAutoMerge'] = $value; + + after_allowAutoMerge: + + $value = $payload['delete_branch_on_merge'] ?? null; + + if ($value === null) { + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; + } + + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; + } + + $properties['allowUpdateBranch'] = $value; + + after_allowUpdateBranch: + + $value = $payload['use_squash_pr_title_as_default'] ?? null; + + if ($value === null) { + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; + } + + $properties['useSquashPrTitleAsDefault'] = $value; + + after_useSquashPrTitleAsDefault: + + $value = $payload['squash_merge_commit_title'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; + } + + $properties['squashMergeCommitTitle'] = $value; + + after_squashMergeCommitTitle: + + $value = $payload['squash_merge_commit_message'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; + } + + $properties['squashMergeCommitMessage'] = $value; + + after_squashMergeCommitMessage: + + $value = $payload['merge_commit_title'] ?? null; + + if ($value === null) { + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; + } + + $properties['mergeCommitTitle'] = $value; + + after_mergeCommitTitle: + + $value = $payload['merge_commit_message'] ?? null; + + if ($value === null) { + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; + } + + $properties['mergeCommitMessage'] = $value; + + after_mergeCommitMessage: + + $value = $payload['allow_merge_commit'] ?? null; + + if ($value === null) { + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; + } + + $properties['allowMergeCommit'] = $value; + + after_allowMergeCommit: + + $value = $payload['allow_forking'] ?? null; + + if ($value === null) { + $properties['allowForking'] = null; + goto after_allowForking; + } + + $properties['allowForking'] = $value; + + after_allowForking: + + $value = $payload['web_commit_signoff_required'] ?? null; + + if ($value === null) { + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; + } + + $properties['webCommitSignoffRequired'] = $value; + + after_webCommitSignoffRequired: + + $value = $payload['subscribers_count'] ?? null; + + if ($value === null) { + $properties['subscribersCount'] = null; + goto after_subscribersCount; + } + + $properties['subscribersCount'] = $value; + + after_subscribersCount: + + $value = $payload['network_count'] ?? null; + + if ($value === null) { + $properties['networkCount'] = null; + goto after_networkCount; + } + + $properties['networkCount'] = $value; + + after_networkCount: + + $value = $payload['open_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues'; + goto after_openIssues; + } + + $properties['openIssues'] = $value; + + after_openIssues: + + $value = $payload['watchers'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers'; + goto after_watchers; + } + + $properties['watchers'] = $value; + + after_watchers: + + $value = $payload['master_branch'] ?? null; + + if ($value === null) { + $properties['masterBranch'] = null; + goto after_masterBranch; + } + + $properties['masterBranch'] = $value; + + after_masterBranch: + + $value = $payload['starred_at'] ?? null; + + if ($value === null) { + $properties['starredAt'] = null; + goto after_starredAt; + } + + $properties['starredAt'] = $value; + + after_starredAt: + + $value = $payload['anonymous_access_enabled'] ?? null; + + if ($value === null) { + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; + } + + $properties['anonymousAccessEnabled'] = $value; + + after_anonymousAccessEnabled: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(RepositoryWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new RepositoryWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple + { + $properties = []; + $missingFields = []; + try { + $value = $payload['key'] ?? null; + + if ($value === null) { + $missingFields[] = 'key'; + goto after_key; + } + + $properties['key'] = $value; + + after_key: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['spdx_id'] ?? null; + + if ($value === null) { + $properties['spdxId'] = null; + goto after_spdxId; + } + + $properties['spdxId'] = $value; + + after_spdxId: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new LicenseSimple(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + { + $properties = []; + $missingFields = []; + try { + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['email'] ?? null; + + if ($value === null) { + $properties['email'] = null; + goto after_email; + } + + $properties['email'] = $value; + + after_email: + + $value = $payload['login'] ?? null; + + if ($value === null) { + $missingFields[] = 'login'; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['gravatar_id'] ?? null; + + if ($value === null) { + $properties['gravatarId'] = null; + goto after_gravatarId; + } + + $properties['gravatarId'] = $value; + + after_gravatarId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['followers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'followers_url'; + goto after_followersUrl; + } + + $properties['followersUrl'] = $value; + + after_followersUrl: + + $value = $payload['following_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'following_url'; + goto after_followingUrl; + } + + $properties['followingUrl'] = $value; + + after_followingUrl: + + $value = $payload['gists_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'gists_url'; + goto after_gistsUrl; + } + + $properties['gistsUrl'] = $value; + + after_gistsUrl: + + $value = $payload['starred_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'starred_url'; + goto after_starredUrl; + } + + $properties['starredUrl'] = $value; + + after_starredUrl: + + $value = $payload['subscriptions_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscriptions_url'; + goto after_subscriptionsUrl; + } + + $properties['subscriptionsUrl'] = $value; + + after_subscriptionsUrl: + + $value = $payload['organizations_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'organizations_url'; + goto after_organizationsUrl; + } + + $properties['organizationsUrl'] = $value; + + after_organizationsUrl: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'repos_url'; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['received_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'received_events_url'; + goto after_receivedEventsUrl; + } + + $properties['receivedEventsUrl'] = $value; + + after_receivedEventsUrl: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $missingFields[] = 'type'; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + + $value = $payload['site_admin'] ?? null; + + if ($value === null) { + $missingFields[] = 'site_admin'; + goto after_siteAdmin; + } + + $properties['siteAdmin'] = $value; + + after_siteAdmin: + + $value = $payload['starred_at'] ?? null; + + if ($value === null) { + $properties['starredAt'] = null; + goto after_starredAt; + } + + $properties['starredAt'] = $value; + + after_starredAt: + + $value = $payload['user_view_type'] ?? null; + + if ($value === null) { + $properties['userViewType'] = null; + goto after_userViewType; + } + + $properties['userViewType'] = $value; + + after_userViewType: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SimpleUser(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️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\GitHub\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\GitHub\Schema\RepositoryWebhooks\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository(array $payload): TemplateRepository + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $properties['nodeId'] = null; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $properties['fullName'] = null; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $properties['owner'] = null; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $properties['private'] = null; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['fork'] ?? null; + + if ($value === null) { + $properties['fork'] = null; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['archive_url'] ?? null; + + if ($value === null) { + $properties['archiveUrl'] = null; + goto after_archiveUrl; + } + + $properties['archiveUrl'] = $value; + + after_archiveUrl: + + $value = $payload['assignees_url'] ?? null; + + if ($value === null) { + $properties['assigneesUrl'] = null; + goto after_assigneesUrl; + } + + $properties['assigneesUrl'] = $value; + + after_assigneesUrl: + + $value = $payload['blobs_url'] ?? null; + + if ($value === null) { + $properties['blobsUrl'] = null; + goto after_blobsUrl; + } + + $properties['blobsUrl'] = $value; + + after_blobsUrl: + + $value = $payload['branches_url'] ?? null; + + if ($value === null) { + $properties['branchesUrl'] = null; + goto after_branchesUrl; + } + + $properties['branchesUrl'] = $value; + + after_branchesUrl: + + $value = $payload['collaborators_url'] ?? null; + + if ($value === null) { + $properties['collaboratorsUrl'] = null; + goto after_collaboratorsUrl; + } + + $properties['collaboratorsUrl'] = $value; + + after_collaboratorsUrl: + + $value = $payload['comments_url'] ?? null; + + if ($value === null) { + $properties['commentsUrl'] = null; + goto after_commentsUrl; + } + + $properties['commentsUrl'] = $value; + + after_commentsUrl: + + $value = $payload['commits_url'] ?? null; + + if ($value === null) { + $properties['commitsUrl'] = null; + goto after_commitsUrl; + } + + $properties['commitsUrl'] = $value; + + after_commitsUrl: + + $value = $payload['compare_url'] ?? null; + + if ($value === null) { + $properties['compareUrl'] = null; + goto after_compareUrl; + } + + $properties['compareUrl'] = $value; + + after_compareUrl: + + $value = $payload['contents_url'] ?? null; + + if ($value === null) { + $properties['contentsUrl'] = null; + goto after_contentsUrl; + } + + $properties['contentsUrl'] = $value; + + after_contentsUrl: + + $value = $payload['contributors_url'] ?? null; + + if ($value === null) { + $properties['contributorsUrl'] = null; + goto after_contributorsUrl; + } + + $properties['contributorsUrl'] = $value; + + after_contributorsUrl: + + $value = $payload['deployments_url'] ?? null; + + if ($value === null) { + $properties['deploymentsUrl'] = null; + goto after_deploymentsUrl; + } + + $properties['deploymentsUrl'] = $value; + + after_deploymentsUrl: + + $value = $payload['downloads_url'] ?? null; + + if ($value === null) { + $properties['downloadsUrl'] = null; + goto after_downloadsUrl; + } + + $properties['downloadsUrl'] = $value; + + after_downloadsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $properties['eventsUrl'] = null; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['forks_url'] ?? null; + + if ($value === null) { + $properties['forksUrl'] = null; + goto after_forksUrl; + } + + $properties['forksUrl'] = $value; + + after_forksUrl: + + $value = $payload['git_commits_url'] ?? null; + + if ($value === null) { + $properties['gitCommitsUrl'] = null; + goto after_gitCommitsUrl; + } + + $properties['gitCommitsUrl'] = $value; + + after_gitCommitsUrl: + + $value = $payload['git_refs_url'] ?? null; + + if ($value === null) { + $properties['gitRefsUrl'] = null; + goto after_gitRefsUrl; + } + + $properties['gitRefsUrl'] = $value; + + after_gitRefsUrl: + + $value = $payload['git_tags_url'] ?? null; + + if ($value === null) { + $properties['gitTagsUrl'] = null; + goto after_gitTagsUrl; + } + + $properties['gitTagsUrl'] = $value; + + after_gitTagsUrl: + + $value = $payload['git_url'] ?? null; + + if ($value === null) { + $properties['gitUrl'] = null; + goto after_gitUrl; + } + + $properties['gitUrl'] = $value; + + after_gitUrl: + + $value = $payload['issue_comment_url'] ?? null; + + if ($value === null) { + $properties['issueCommentUrl'] = null; + goto after_issueCommentUrl; + } + + $properties['issueCommentUrl'] = $value; + + after_issueCommentUrl: + + $value = $payload['issue_events_url'] ?? null; + + if ($value === null) { + $properties['issueEventsUrl'] = null; + goto after_issueEventsUrl; + } + + $properties['issueEventsUrl'] = $value; + + after_issueEventsUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $properties['issuesUrl'] = null; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['keys_url'] ?? null; + + if ($value === null) { + $properties['keysUrl'] = null; + goto after_keysUrl; + } + + $properties['keysUrl'] = $value; + + after_keysUrl: + + $value = $payload['labels_url'] ?? null; + + if ($value === null) { + $properties['labelsUrl'] = null; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $value = $payload['languages_url'] ?? null; + + if ($value === null) { + $properties['languagesUrl'] = null; + goto after_languagesUrl; + } + + $properties['languagesUrl'] = $value; + + after_languagesUrl: + + $value = $payload['merges_url'] ?? null; + + if ($value === null) { + $properties['mergesUrl'] = null; + goto after_mergesUrl; + } + + $properties['mergesUrl'] = $value; + + after_mergesUrl: + + $value = $payload['milestones_url'] ?? null; + + if ($value === null) { + $properties['milestonesUrl'] = null; + goto after_milestonesUrl; + } + + $properties['milestonesUrl'] = $value; + + after_milestonesUrl: + + $value = $payload['notifications_url'] ?? null; + + if ($value === null) { + $properties['notificationsUrl'] = null; + goto after_notificationsUrl; + } + + $properties['notificationsUrl'] = $value; + + after_notificationsUrl: + + $value = $payload['pulls_url'] ?? null; + + if ($value === null) { + $properties['pullsUrl'] = null; + goto after_pullsUrl; + } + + $properties['pullsUrl'] = $value; + + after_pullsUrl: + + $value = $payload['releases_url'] ?? null; + + if ($value === null) { + $properties['releasesUrl'] = null; + goto after_releasesUrl; + } + + $properties['releasesUrl'] = $value; + + after_releasesUrl: + + $value = $payload['ssh_url'] ?? null; + + if ($value === null) { + $properties['sshUrl'] = null; + goto after_sshUrl; + } + + $properties['sshUrl'] = $value; + + after_sshUrl: + + $value = $payload['stargazers_url'] ?? null; + + if ($value === null) { + $properties['stargazersUrl'] = null; + goto after_stargazersUrl; + } + + $properties['stargazersUrl'] = $value; + + after_stargazersUrl: + + $value = $payload['statuses_url'] ?? null; + + if ($value === null) { + $properties['statusesUrl'] = null; + goto after_statusesUrl; + } + + $properties['statusesUrl'] = $value; + + after_statusesUrl: + + $value = $payload['subscribers_url'] ?? null; + + if ($value === null) { + $properties['subscribersUrl'] = null; + goto after_subscribersUrl; + } + + $properties['subscribersUrl'] = $value; + + after_subscribersUrl: + + $value = $payload['subscription_url'] ?? null; + + if ($value === null) { + $properties['subscriptionUrl'] = null; + goto after_subscriptionUrl; + } + + $properties['subscriptionUrl'] = $value; + + after_subscriptionUrl: + + $value = $payload['tags_url'] ?? null; + + if ($value === null) { + $properties['tagsUrl'] = null; + goto after_tagsUrl; + } + + $properties['tagsUrl'] = $value; + + after_tagsUrl: + + $value = $payload['teams_url'] ?? null; + + if ($value === null) { + $properties['teamsUrl'] = null; + goto after_teamsUrl; + } + + $properties['teamsUrl'] = $value; + + after_teamsUrl: + + $value = $payload['trees_url'] ?? null; + + if ($value === null) { + $properties['treesUrl'] = null; + goto after_treesUrl; + } + + $properties['treesUrl'] = $value; + + after_treesUrl: + + $value = $payload['clone_url'] ?? null; + + if ($value === null) { + $properties['cloneUrl'] = null; + goto after_cloneUrl; + } + + $properties['cloneUrl'] = $value; + + after_cloneUrl: + + $value = $payload['mirror_url'] ?? null; + + if ($value === null) { + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; + } + + $properties['mirrorUrl'] = $value; + + after_mirrorUrl: + + $value = $payload['hooks_url'] ?? null; + + if ($value === null) { + $properties['hooksUrl'] = null; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['svn_url'] ?? null; + + if ($value === null) { + $properties['svnUrl'] = null; + goto after_svnUrl; + } + + $properties['svnUrl'] = $value; + + after_svnUrl: + + $value = $payload['homepage'] ?? null; + + if ($value === null) { + $properties['homepage'] = null; + goto after_homepage; + } + + $properties['homepage'] = $value; + + after_homepage: + + $value = $payload['language'] ?? null; + + if ($value === null) { + $properties['language'] = null; + goto after_language; + } + + $properties['language'] = $value; + + after_language: + + $value = $payload['forks_count'] ?? null; + + if ($value === null) { + $properties['forksCount'] = null; + goto after_forksCount; + } + + $properties['forksCount'] = $value; + + after_forksCount: + + $value = $payload['stargazers_count'] ?? null; + + if ($value === null) { + $properties['stargazersCount'] = null; + goto after_stargazersCount; + } + + $properties['stargazersCount'] = $value; + + after_stargazersCount: + + $value = $payload['watchers_count'] ?? null; + + if ($value === null) { + $properties['watchersCount'] = null; + goto after_watchersCount; + } + + $properties['watchersCount'] = $value; + + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $properties['size'] = null; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $properties['defaultBranch'] = null; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $properties['openIssuesCount'] = null; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: + + $value = $payload['has_issues'] ?? null; + + if ($value === null) { + $properties['hasIssues'] = null; + goto after_hasIssues; + } + + $properties['hasIssues'] = $value; + + after_hasIssues: + + $value = $payload['has_projects'] ?? null; + + if ($value === null) { + $properties['hasProjects'] = null; + goto after_hasProjects; + } + + $properties['hasProjects'] = $value; + + after_hasProjects: + + $value = $payload['has_wiki'] ?? null; + + if ($value === null) { + $properties['hasWiki'] = null; + goto after_hasWiki; + } + + $properties['hasWiki'] = $value; + + after_hasWiki: + + $value = $payload['has_pages'] ?? null; + + if ($value === null) { + $properties['hasPages'] = null; + goto after_hasPages; + } + + $properties['hasPages'] = $value; + + after_hasPages: + + $value = $payload['has_downloads'] ?? null; + + if ($value === null) { + $properties['hasDownloads'] = null; + goto after_hasDownloads; + } + + $properties['hasDownloads'] = $value; + + after_hasDownloads: + + $value = $payload['archived'] ?? null; + + if ($value === null) { + $properties['archived'] = null; + goto after_archived; + } + + $properties['archived'] = $value; + + after_archived: + + $value = $payload['disabled'] ?? null; + + if ($value === null) { + $properties['disabled'] = null; + goto after_disabled; + } + + $properties['disabled'] = $value; + + after_disabled: + + $value = $payload['visibility'] ?? null; + + if ($value === null) { + $properties['visibility'] = null; + goto after_visibility; + } + + $properties['visibility'] = $value; + + after_visibility: + + $value = $payload['pushed_at'] ?? null; + + if ($value === null) { + $properties['pushedAt'] = null; + goto after_pushedAt; + } + + $properties['pushedAt'] = $value; + + after_pushedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['allow_rebase_merge'] ?? null; + + if ($value === null) { + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; + } + + $properties['allowRebaseMerge'] = $value; + + after_allowRebaseMerge: + + $value = $payload['temp_clone_token'] ?? null; + + if ($value === null) { + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; + } + + $properties['tempCloneToken'] = $value; + + after_tempCloneToken: + + $value = $payload['allow_squash_merge'] ?? null; + + if ($value === null) { + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; + } + + $properties['allowSquashMerge'] = $value; + + after_allowSquashMerge: + + $value = $payload['allow_auto_merge'] ?? null; + + if ($value === null) { + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; + } + + $properties['allowAutoMerge'] = $value; + + after_allowAutoMerge: + + $value = $payload['delete_branch_on_merge'] ?? null; + + if ($value === null) { + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; + } + + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; + } + + $properties['allowUpdateBranch'] = $value; + + after_allowUpdateBranch: + + $value = $payload['use_squash_pr_title_as_default'] ?? null; + + if ($value === null) { + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; + } + + $properties['useSquashPrTitleAsDefault'] = $value; + + after_useSquashPrTitleAsDefault: + + $value = $payload['squash_merge_commit_title'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; + } + + $properties['squashMergeCommitTitle'] = $value; + + after_squashMergeCommitTitle: + + $value = $payload['squash_merge_commit_message'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; + } + + $properties['squashMergeCommitMessage'] = $value; + + after_squashMergeCommitMessage: + + $value = $payload['merge_commit_title'] ?? null; + + if ($value === null) { + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; + } + + $properties['mergeCommitTitle'] = $value; + + after_mergeCommitTitle: + + $value = $payload['merge_commit_message'] ?? null; + + if ($value === null) { + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; + } + + $properties['mergeCommitMessage'] = $value; + + after_mergeCommitMessage: + + $value = $payload['allow_merge_commit'] ?? null; + + if ($value === null) { + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; + } + + $properties['allowMergeCommit'] = $value; + + after_allowMergeCommit: + + $value = $payload['subscribers_count'] ?? null; + + if ($value === null) { + $properties['subscribersCount'] = null; + goto after_subscribersCount; + } + + $properties['subscribersCount'] = $value; + + after_subscribersCount: + + $value = $payload['network_count'] ?? null; + + if ($value === null) { + $properties['networkCount'] = null; + goto after_networkCount; + } + + $properties['networkCount'] = $value; + + after_networkCount: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(TemplateRepository::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new TemplateRepository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): Owner + { + $properties = []; + $missingFields = []; + try { + $value = $payload['login'] ?? null; + + if ($value === null) { + $properties['login'] = null; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $properties['nodeId'] = null; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $properties['avatarUrl'] = null; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['gravatar_id'] ?? null; + + if ($value === null) { + $properties['gravatarId'] = null; + goto after_gravatarId; + } + + $properties['gravatarId'] = $value; + + after_gravatarId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['followers_url'] ?? null; + + if ($value === null) { + $properties['followersUrl'] = null; + goto after_followersUrl; + } + + $properties['followersUrl'] = $value; + + after_followersUrl: + + $value = $payload['following_url'] ?? null; + + if ($value === null) { + $properties['followingUrl'] = null; + goto after_followingUrl; + } + + $properties['followingUrl'] = $value; + + after_followingUrl: + + $value = $payload['gists_url'] ?? null; + + if ($value === null) { + $properties['gistsUrl'] = null; + goto after_gistsUrl; + } + + $properties['gistsUrl'] = $value; + + after_gistsUrl: + + $value = $payload['starred_url'] ?? null; + + if ($value === null) { + $properties['starredUrl'] = null; + goto after_starredUrl; + } + + $properties['starredUrl'] = $value; + + after_starredUrl: + + $value = $payload['subscriptions_url'] ?? null; + + if ($value === null) { + $properties['subscriptionsUrl'] = null; + goto after_subscriptionsUrl; + } + + $properties['subscriptionsUrl'] = $value; + + after_subscriptionsUrl: + + $value = $payload['organizations_url'] ?? null; + + if ($value === null) { + $properties['organizationsUrl'] = null; + goto after_organizationsUrl; + } + + $properties['organizationsUrl'] = $value; + + after_organizationsUrl: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $properties['reposUrl'] = null; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $properties['eventsUrl'] = null; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['received_events_url'] ?? null; + + if ($value === null) { + $properties['receivedEventsUrl'] = null; + goto after_receivedEventsUrl; + } + + $properties['receivedEventsUrl'] = $value; + + after_receivedEventsUrl: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $properties['type'] = null; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + + $value = $payload['site_admin'] ?? null; + + if ($value === null) { + $properties['siteAdmin'] = null; + goto after_siteAdmin; + } + + $properties['siteAdmin'] = $value; + + after_siteAdmin: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Owner(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; + + if ($value === null) { + $properties['admin'] = null; + goto after_admin; + } + + $properties['admin'] = $value; + + after_admin: + + $value = $payload['maintain'] ?? null; + + if ($value === null) { + $properties['maintain'] = null; + goto after_maintain; + } + + $properties['maintain'] = $value; + + after_maintain: + + $value = $payload['push'] ?? null; + + if ($value === null) { + $properties['push'] = null; + goto after_push; + } + + $properties['push'] = $value; + + after_push: + + $value = $payload['triage'] ?? null; + + if ($value === null) { + $properties['triage'] = null; + goto after_triage; + } + + $properties['triage'] = $value; + + after_triage: + + $value = $payload['pull'] ?? null; + + if ($value === null) { + $properties['pull'] = null; + goto after_pull; + } + + $properties['pull'] = $value; + + after_pull: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️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\GitHub\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\GitHub\Schema\EnterpriseWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation(array $payload): SimpleInstallation + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleInstallation', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SimpleInstallation::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SimpleInstallation(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleInstallation', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks(array $payload): OrganizationSimpleWebhooks + { + $properties = []; + $missingFields = []; + try { + $value = $payload['login'] ?? null; + + if ($value === null) { + $missingFields[] = 'login'; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'repos_url'; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['hooks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issues_url'; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['members_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'members_url'; + goto after_membersUrl; + } + + $properties['membersUrl'] = $value; + + after_membersUrl: + + $value = $payload['public_members_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'public_members_url'; + goto after_publicMembersUrl; + } + + $properties['publicMembersUrl'] = $value; + + after_publicMembersUrl: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(OrganizationSimpleWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new OrganizationSimpleWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties(array $payload): CustomProperties + { + $properties = []; + $missingFields = []; + try { + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CustomProperties::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CustomProperties(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\WebhookSecretScanningScanCompleted' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningScanCompleted($object), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($object), + 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($object), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($object), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($object), + 'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($object), + 'ApiClients\Client\GitHub\Schema\EnterpriseWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($object), + 'ApiClients\Client\GitHub\Schema\SimpleInstallation' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($object), + 'ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️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⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $enterprise = $object->enterprise; + + if ($enterprise === null) { + goto after_enterprise; + } + + $enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($enterprise); + after_enterprise: $result['enterprise'] = $enterprise; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $sender = $object->sender; + + if ($sender === null) { + goto after_sender; + } + + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks(mixed $object): mixed + { + assert($object instanceof RepositoryWebhooks); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + after_fullName: $result['full_name'] = $fullName; + + $license = $object->license; + + if ($license === null) { + goto after_license; + } + + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($organization); + after_organization: $result['organization'] = $organization; + + $forks = $object->forks; + after_forks: $result['forks'] = $forks; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + after_fork: $result['fork'] = $fork; + + $url = $object->url; + after_url: $result['url'] = $url; + + $archiveUrl = $object->archiveUrl; + after_archiveUrl: $result['archive_url'] = $archiveUrl; + + $assigneesUrl = $object->assigneesUrl; + after_assigneesUrl: $result['assignees_url'] = $assigneesUrl; + + $blobsUrl = $object->blobsUrl; + after_blobsUrl: $result['blobs_url'] = $blobsUrl; + + $branchesUrl = $object->branchesUrl; + after_branchesUrl: $result['branches_url'] = $branchesUrl; + + $collaboratorsUrl = $object->collaboratorsUrl; + after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $commitsUrl = $object->commitsUrl; + after_commitsUrl: $result['commits_url'] = $commitsUrl; + + $compareUrl = $object->compareUrl; + after_compareUrl: $result['compare_url'] = $compareUrl; + + $contentsUrl = $object->contentsUrl; + after_contentsUrl: $result['contents_url'] = $contentsUrl; + + $contributorsUrl = $object->contributorsUrl; + after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + + $deploymentsUrl = $object->deploymentsUrl; + after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + + $downloadsUrl = $object->downloadsUrl; + after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $forksUrl = $object->forksUrl; + after_forksUrl: $result['forks_url'] = $forksUrl; + + $gitCommitsUrl = $object->gitCommitsUrl; + after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + + $gitRefsUrl = $object->gitRefsUrl; + after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + + $gitTagsUrl = $object->gitTagsUrl; + after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + + $gitUrl = $object->gitUrl; + after_gitUrl: $result['git_url'] = $gitUrl; + + $issueCommentUrl = $object->issueCommentUrl; + after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + + $issueEventsUrl = $object->issueEventsUrl; + after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $keysUrl = $object->keysUrl; + after_keysUrl: $result['keys_url'] = $keysUrl; + + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $languagesUrl = $object->languagesUrl; + after_languagesUrl: $result['languages_url'] = $languagesUrl; + + $mergesUrl = $object->mergesUrl; + after_mergesUrl: $result['merges_url'] = $mergesUrl; + + $milestonesUrl = $object->milestonesUrl; + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + + $notificationsUrl = $object->notificationsUrl; + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + + $pullsUrl = $object->pullsUrl; + after_pullsUrl: $result['pulls_url'] = $pullsUrl; + + $releasesUrl = $object->releasesUrl; + after_releasesUrl: $result['releases_url'] = $releasesUrl; + + $sshUrl = $object->sshUrl; + after_sshUrl: $result['ssh_url'] = $sshUrl; + + $stargazersUrl = $object->stargazersUrl; + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + + $statusesUrl = $object->statusesUrl; + after_statusesUrl: $result['statuses_url'] = $statusesUrl; + + $subscribersUrl = $object->subscribersUrl; + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + + $subscriptionUrl = $object->subscriptionUrl; + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + + $tagsUrl = $object->tagsUrl; + after_tagsUrl: $result['tags_url'] = $tagsUrl; + + $teamsUrl = $object->teamsUrl; + after_teamsUrl: $result['teams_url'] = $teamsUrl; + + $treesUrl = $object->treesUrl; + after_treesUrl: $result['trees_url'] = $treesUrl; + + $cloneUrl = $object->cloneUrl; + after_cloneUrl: $result['clone_url'] = $cloneUrl; + + $mirrorUrl = $object->mirrorUrl; + + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } + + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; + + $homepage = $object->homepage; + + if ($homepage === null) { + goto after_homepage; + } + + after_homepage: $result['homepage'] = $homepage; + + $language = $object->language; + + if ($language === null) { + goto after_language; + } + + after_language: $result['language'] = $language; + + $forksCount = $object->forksCount; + after_forksCount: $result['forks_count'] = $forksCount; + + $stargazersCount = $object->stargazersCount; + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + + $watchersCount = $object->watchersCount; + after_watchersCount: $result['watchers_count'] = $watchersCount; + + $size = $object->size; + after_size: $result['size'] = $size; + + $defaultBranch = $object->defaultBranch; + after_defaultBranch: $result['default_branch'] = $defaultBranch; + + $openIssuesCount = $object->openIssuesCount; + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + + $isTemplate = $object->isTemplate; + + if ($isTemplate === null) { + goto after_isTemplate; + } + + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $customProperties = $object->customProperties; + + if ($customProperties === null) { + goto after_customProperties; + } + + $customProperties = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($customProperties); + after_customProperties: $result['custom_properties'] = $customProperties; + + $hasIssues = $object->hasIssues; + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $hasDiscussions = $object->hasDiscussions; + + if ($hasDiscussions === null) { + goto after_hasDiscussions; + } + + after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + + $archived = $object->archived; + after_archived: $result['archived'] = $archived; + + $disabled = $object->disabled; + after_disabled: $result['disabled'] = $disabled; + + $visibility = $object->visibility; + + if ($visibility === null) { + goto after_visibility; + } + + after_visibility: $result['visibility'] = $visibility; + + $pushedAt = $object->pushedAt; + + if ($pushedAt === null) { + goto after_pushedAt; + } + + after_pushedAt: $result['pushed_at'] = $pushedAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $allowRebaseMerge = $object->allowRebaseMerge; + + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; + } + + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + + $templateRepository = $object->templateRepository; + + if ($templateRepository === null) { + goto after_templateRepository; + } + + $templateRepository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($templateRepository); + after_templateRepository: $result['template_repository'] = $templateRepository; + + $tempCloneToken = $object->tempCloneToken; + + if ($tempCloneToken === null) { + goto after_tempCloneToken; + } + + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + + $allowSquashMerge = $object->allowSquashMerge; + + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } + + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + + $allowAutoMerge = $object->allowAutoMerge; + + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; + } + + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; + + $deleteBranchOnMerge = $object->deleteBranchOnMerge; + + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } + + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; + + $allowUpdateBranch = $object->allowUpdateBranch; + + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } + + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; + + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; + + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } + + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; + + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; + } + + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; + + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } + + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; + + $mergeCommitTitle = $object->mergeCommitTitle; + + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } + + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; + + $mergeCommitMessage = $object->mergeCommitMessage; + + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; + } + + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; + + $allowMergeCommit = $object->allowMergeCommit; + + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } + + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + + $allowForking = $object->allowForking; + + if ($allowForking === null) { + goto after_allowForking; + } + + after_allowForking: $result['allow_forking'] = $allowForking; + + $webCommitSignoffRequired = $object->webCommitSignoffRequired; + + if ($webCommitSignoffRequired === null) { + goto after_webCommitSignoffRequired; + } + + after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; + + $subscribersCount = $object->subscribersCount; + + if ($subscribersCount === null) { + goto after_subscribersCount; + } + + after_subscribersCount: $result['subscribers_count'] = $subscribersCount; + + $networkCount = $object->networkCount; + + if ($networkCount === null) { + goto after_networkCount; + } + + after_networkCount: $result['network_count'] = $networkCount; + + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; + + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; + + $masterBranch = $object->masterBranch; + + if ($masterBranch === null) { + goto after_masterBranch; + } + + after_masterBranch: $result['master_branch'] = $masterBranch; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $anonymousAccessEnabled = $object->anonymousAccessEnabled; + + if ($anonymousAccessEnabled === null) { + goto after_anonymousAccessEnabled; + } + + after_anonymousAccessEnabled: $result['anonymous_access_enabled'] = $anonymousAccessEnabled; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(mixed $object): mixed + { + assert($object instanceof LicenseSimple); + $result = []; + + $key = $object->key; + after_key: $result['key'] = $key; + + $name = $object->name; + after_name: $result['name'] = $name; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $spdxId = $object->spdxId; + + if ($spdxId === null) { + goto after_spdxId; + } + + after_spdxId: $result['spdx_id'] = $spdxId; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $userViewType = $object->userViewType; + + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️Permissions(mixed $object): mixed + { + assert($object instanceof Permissions); + $result = []; + + $admin = $object->admin; + after_admin: $result['admin'] = $admin; + + $pull = $object->pull; + after_pull: $result['pull'] = $pull; + + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; + } + + after_triage: $result['triage'] = $triage; + + $push = $object->push; + after_push: $result['push'] = $push; + + $maintain = $object->maintain; + + if ($maintain === null) { + goto after_maintain; + } + + after_maintain: $result['maintain'] = $maintain; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository(mixed $object): mixed + { + assert($object instanceof TemplateRepository); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + + if ($nodeId === null) { + goto after_nodeId; + } + + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + + if ($fullName === null) { + goto after_fullName; + } + + after_fullName: $result['full_name'] = $fullName; + + $owner = $object->owner; + + if ($owner === null) { + goto after_owner; + } + + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + + if ($private === null) { + goto after_private; + } + + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + + if ($fork === null) { + goto after_fork; + } + + after_fork: $result['fork'] = $fork; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $archiveUrl = $object->archiveUrl; + + if ($archiveUrl === null) { + goto after_archiveUrl; + } + + after_archiveUrl: $result['archive_url'] = $archiveUrl; + + $assigneesUrl = $object->assigneesUrl; + + if ($assigneesUrl === null) { + goto after_assigneesUrl; + } + + after_assigneesUrl: $result['assignees_url'] = $assigneesUrl; + + $blobsUrl = $object->blobsUrl; + + if ($blobsUrl === null) { + goto after_blobsUrl; + } + + after_blobsUrl: $result['blobs_url'] = $blobsUrl; + + $branchesUrl = $object->branchesUrl; + + if ($branchesUrl === null) { + goto after_branchesUrl; + } + + after_branchesUrl: $result['branches_url'] = $branchesUrl; + + $collaboratorsUrl = $object->collaboratorsUrl; + + if ($collaboratorsUrl === null) { + goto after_collaboratorsUrl; + } + + after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + + $commentsUrl = $object->commentsUrl; + + if ($commentsUrl === null) { + goto after_commentsUrl; + } + + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $commitsUrl = $object->commitsUrl; + + if ($commitsUrl === null) { + goto after_commitsUrl; + } + + after_commitsUrl: $result['commits_url'] = $commitsUrl; + + $compareUrl = $object->compareUrl; + + if ($compareUrl === null) { + goto after_compareUrl; + } + + after_compareUrl: $result['compare_url'] = $compareUrl; + + $contentsUrl = $object->contentsUrl; + + if ($contentsUrl === null) { + goto after_contentsUrl; + } + + after_contentsUrl: $result['contents_url'] = $contentsUrl; + + $contributorsUrl = $object->contributorsUrl; + + if ($contributorsUrl === null) { + goto after_contributorsUrl; + } + + after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + + $deploymentsUrl = $object->deploymentsUrl; + + if ($deploymentsUrl === null) { + goto after_deploymentsUrl; + } + + after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + + $downloadsUrl = $object->downloadsUrl; + + if ($downloadsUrl === null) { + goto after_downloadsUrl; + } + + after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; + + $eventsUrl = $object->eventsUrl; + + if ($eventsUrl === null) { + goto after_eventsUrl; + } + + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $forksUrl = $object->forksUrl; + + if ($forksUrl === null) { + goto after_forksUrl; + } + + after_forksUrl: $result['forks_url'] = $forksUrl; + + $gitCommitsUrl = $object->gitCommitsUrl; + + if ($gitCommitsUrl === null) { + goto after_gitCommitsUrl; + } + + after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + + $gitRefsUrl = $object->gitRefsUrl; + + if ($gitRefsUrl === null) { + goto after_gitRefsUrl; + } + + after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + + $gitTagsUrl = $object->gitTagsUrl; + + if ($gitTagsUrl === null) { + goto after_gitTagsUrl; + } + + after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + + $gitUrl = $object->gitUrl; + + if ($gitUrl === null) { + goto after_gitUrl; + } + + after_gitUrl: $result['git_url'] = $gitUrl; + + $issueCommentUrl = $object->issueCommentUrl; + + if ($issueCommentUrl === null) { + goto after_issueCommentUrl; + } + + after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + + $issueEventsUrl = $object->issueEventsUrl; + + if ($issueEventsUrl === null) { + goto after_issueEventsUrl; + } + + after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + + $issuesUrl = $object->issuesUrl; + + if ($issuesUrl === null) { + goto after_issuesUrl; + } + + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $keysUrl = $object->keysUrl; + + if ($keysUrl === null) { + goto after_keysUrl; + } + + after_keysUrl: $result['keys_url'] = $keysUrl; + + $labelsUrl = $object->labelsUrl; + + if ($labelsUrl === null) { + goto after_labelsUrl; + } + + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $languagesUrl = $object->languagesUrl; + + if ($languagesUrl === null) { + goto after_languagesUrl; + } + + after_languagesUrl: $result['languages_url'] = $languagesUrl; + + $mergesUrl = $object->mergesUrl; + + if ($mergesUrl === null) { + goto after_mergesUrl; + } + + after_mergesUrl: $result['merges_url'] = $mergesUrl; + + $milestonesUrl = $object->milestonesUrl; + + if ($milestonesUrl === null) { + goto after_milestonesUrl; + } + + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + + $notificationsUrl = $object->notificationsUrl; + + if ($notificationsUrl === null) { + goto after_notificationsUrl; + } + + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + + $pullsUrl = $object->pullsUrl; + + if ($pullsUrl === null) { + goto after_pullsUrl; + } + + after_pullsUrl: $result['pulls_url'] = $pullsUrl; + + $releasesUrl = $object->releasesUrl; + + if ($releasesUrl === null) { + goto after_releasesUrl; + } + + after_releasesUrl: $result['releases_url'] = $releasesUrl; + + $sshUrl = $object->sshUrl; + + if ($sshUrl === null) { + goto after_sshUrl; + } + + after_sshUrl: $result['ssh_url'] = $sshUrl; + + $stargazersUrl = $object->stargazersUrl; + + if ($stargazersUrl === null) { + goto after_stargazersUrl; + } + + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + + $statusesUrl = $object->statusesUrl; + + if ($statusesUrl === null) { + goto after_statusesUrl; + } + + after_statusesUrl: $result['statuses_url'] = $statusesUrl; + + $subscribersUrl = $object->subscribersUrl; + + if ($subscribersUrl === null) { + goto after_subscribersUrl; + } + + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + + $subscriptionUrl = $object->subscriptionUrl; + + if ($subscriptionUrl === null) { + goto after_subscriptionUrl; + } + + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + + $tagsUrl = $object->tagsUrl; + + if ($tagsUrl === null) { + goto after_tagsUrl; + } + + after_tagsUrl: $result['tags_url'] = $tagsUrl; + + $teamsUrl = $object->teamsUrl; + + if ($teamsUrl === null) { + goto after_teamsUrl; + } + + after_teamsUrl: $result['teams_url'] = $teamsUrl; + + $treesUrl = $object->treesUrl; + + if ($treesUrl === null) { + goto after_treesUrl; + } + + after_treesUrl: $result['trees_url'] = $treesUrl; + + $cloneUrl = $object->cloneUrl; + + if ($cloneUrl === null) { + goto after_cloneUrl; + } + + after_cloneUrl: $result['clone_url'] = $cloneUrl; + + $mirrorUrl = $object->mirrorUrl; + + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } + + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + + $hooksUrl = $object->hooksUrl; + + if ($hooksUrl === null) { + goto after_hooksUrl; + } + + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $svnUrl = $object->svnUrl; + + if ($svnUrl === null) { + goto after_svnUrl; + } + + after_svnUrl: $result['svn_url'] = $svnUrl; + + $homepage = $object->homepage; + + if ($homepage === null) { + goto after_homepage; + } + + after_homepage: $result['homepage'] = $homepage; + + $language = $object->language; + + if ($language === null) { + goto after_language; + } + + after_language: $result['language'] = $language; + + $forksCount = $object->forksCount; + + if ($forksCount === null) { + goto after_forksCount; + } + + after_forksCount: $result['forks_count'] = $forksCount; + + $stargazersCount = $object->stargazersCount; + + if ($stargazersCount === null) { + goto after_stargazersCount; + } + + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + + $watchersCount = $object->watchersCount; + + if ($watchersCount === null) { + goto after_watchersCount; + } + + after_watchersCount: $result['watchers_count'] = $watchersCount; + + $size = $object->size; + + if ($size === null) { + goto after_size; + } + + after_size: $result['size'] = $size; + + $defaultBranch = $object->defaultBranch; + + if ($defaultBranch === null) { + goto after_defaultBranch; + } + + after_defaultBranch: $result['default_branch'] = $defaultBranch; + + $openIssuesCount = $object->openIssuesCount; + + if ($openIssuesCount === null) { + goto after_openIssuesCount; + } + + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + + $isTemplate = $object->isTemplate; + + if ($isTemplate === null) { + goto after_isTemplate; + } + + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $hasIssues = $object->hasIssues; + + if ($hasIssues === null) { + goto after_hasIssues; + } + + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + + if ($hasProjects === null) { + goto after_hasProjects; + } + + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + + if ($hasWiki === null) { + goto after_hasWiki; + } + + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + + if ($hasPages === null) { + goto after_hasPages; + } + + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + + if ($hasDownloads === null) { + goto after_hasDownloads; + } + + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $archived = $object->archived; + + if ($archived === null) { + goto after_archived; + } + + after_archived: $result['archived'] = $archived; + + $disabled = $object->disabled; + + if ($disabled === null) { + goto after_disabled; + } + + after_disabled: $result['disabled'] = $disabled; + + $visibility = $object->visibility; + + if ($visibility === null) { + goto after_visibility; + } + + after_visibility: $result['visibility'] = $visibility; + + $pushedAt = $object->pushedAt; + + if ($pushedAt === null) { + goto after_pushedAt; + } + + after_pushedAt: $result['pushed_at'] = $pushedAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $allowRebaseMerge = $object->allowRebaseMerge; + + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; + } + + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + + $tempCloneToken = $object->tempCloneToken; + + if ($tempCloneToken === null) { + goto after_tempCloneToken; + } + + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + + $allowSquashMerge = $object->allowSquashMerge; + + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } + + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + + $allowAutoMerge = $object->allowAutoMerge; + + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; + } + + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; + + $deleteBranchOnMerge = $object->deleteBranchOnMerge; + + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } + + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; + + $allowUpdateBranch = $object->allowUpdateBranch; + + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } + + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; + + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; + + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } + + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; + + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; + } + + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; + + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } + + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; + + $mergeCommitTitle = $object->mergeCommitTitle; + + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } + + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; + + $mergeCommitMessage = $object->mergeCommitMessage; + + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; + } + + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; + + $allowMergeCommit = $object->allowMergeCommit; + + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } + + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + + $subscribersCount = $object->subscribersCount; + + if ($subscribersCount === null) { + goto after_subscribersCount; + } + + after_subscribersCount: $result['subscribers_count'] = $subscribersCount; + + $networkCount = $object->networkCount; + + if ($networkCount === null) { + goto after_networkCount; + } + + after_networkCount: $result['network_count'] = $networkCount; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(mixed $object): mixed + { + assert($object instanceof Owner); + $result = []; + + $login = $object->login; + + if ($login === null) { + goto after_login; + } + + after_login: $result['login'] = $login; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + + if ($nodeId === null) { + goto after_nodeId; + } + + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + + if ($avatarUrl === null) { + goto after_avatarUrl; + } + + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + + if ($followersUrl === null) { + goto after_followersUrl; + } + + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + + if ($followingUrl === null) { + goto after_followingUrl; + } + + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + + if ($gistsUrl === null) { + goto after_gistsUrl; + } + + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + + if ($starredUrl === null) { + goto after_starredUrl; + } + + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + + if ($subscriptionsUrl === null) { + goto after_subscriptionsUrl; + } + + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + + if ($organizationsUrl === null) { + goto after_organizationsUrl; + } + + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + + if ($reposUrl === null) { + goto after_reposUrl; + } + + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + + if ($eventsUrl === null) { + goto after_eventsUrl; + } + + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + + if ($receivedEventsUrl === null) { + goto after_receivedEventsUrl; + } + + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + + if ($type === null) { + goto after_type; + } + + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + + if ($siteAdmin === null) { + goto after_siteAdmin; + } + + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions); + $result = []; + + $admin = $object->admin; + + if ($admin === null) { + goto after_admin; + } + + after_admin: $result['admin'] = $admin; + + $maintain = $object->maintain; + + if ($maintain === null) { + goto after_maintain; + } + + after_maintain: $result['maintain'] = $maintain; + + $push = $object->push; + + if ($push === null) { + goto after_push; + } + + after_push: $result['push'] = $push; + + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; + } + + after_triage: $result['triage'] = $triage; + + $pull = $object->pull; + + if ($pull === null) { + goto after_pull; + } + + after_pull: $result['pull'] = $pull; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️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⚡️GitHub⚡️Schema⚡️SimpleInstallation(mixed $object): mixed + { + assert($object instanceof SimpleInstallation); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks(mixed $object): mixed + { + assert($object instanceof OrganizationSimpleWebhooks); + $result = []; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $membersUrl = $object->membersUrl; + after_membersUrl: $result['members_url'] = $membersUrl; + + $publicMembersUrl = $object->publicMembersUrl; + after_publicMembersUrl: $result['public_members_url'] = $publicMembersUrl; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index 88af7e021cd..69f15110e50 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -723,6 +723,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; @@ -1064,6 +1065,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertCreate', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksAlert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksAlert\\Dismisser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert\\Dismisser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertReopen', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertResolve', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert\\Dismisser' => $this->getObjectMapperWebHook🪝RepositoryVulnerabilityAlert()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertCreated', '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningAlertWebhook', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertPubliclyLeaked', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertReopened', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertResolved', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertValidated' => $this->getObjectMapperWebHook🪝SecretScanningAlert()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertLocationCreated', '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningLocation', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertLocationCreatedFormEncoded' => $this->getObjectMapperWebHook🪝SecretScanningAlertLocation()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningScanCompleted' => $this->getObjectMapperWebHook🪝SecretScanningScan()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryPublished', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSecurityAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSecurityAdvisory\\Cvss', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryUpdated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryWithdrawn', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory\\Cvss' => $this->getObjectMapperWebHook🪝SecurityAdvisory()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAndAnalysis', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAndAnalysis\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAndAnalysis\\Changes\\From' => $this->getObjectMapperWebHook🪝SecurityAndAnalysis()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCancelled', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Maintainer', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsor', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsorable', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes\\PrivacyLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingCancellation', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingTierChange', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier\\From', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipTierChanged' => $this->getObjectMapperWebHook🪝Sponsorship()->hydrateObject($className, $payload), @@ -1424,6 +1426,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertCreate', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksAlert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksAlert\\Dismisser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertDismiss\\Alert\\Dismisser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertReopen', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertResolve', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookRepositoryVulnerabilityAlertResolve\\Alert\\Dismisser' => $this->getObjectMapperWebHook🪝RepositoryVulnerabilityAlert()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertCreated', '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningAlertWebhook', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertPubliclyLeaked', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertReopened', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertResolved', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertValidated' => $this->getObjectMapperWebHook🪝SecretScanningAlert()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertLocationCreated', '\\ApiClients\\Client\\GitHub\\Schema\\SecretScanningLocation', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningAlertLocationCreatedFormEncoded' => $this->getObjectMapperWebHook🪝SecretScanningAlertLocation()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecretScanningScanCompleted' => $this->getObjectMapperWebHook🪝SecretScanningScan()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryPublished', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSecurityAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSecurityAdvisory\\Cvss', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryUpdated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryWithdrawn', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAdvisoryWithdrawn\\SecurityAdvisory\\Cvss' => $this->getObjectMapperWebHook🪝SecurityAdvisory()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAndAnalysis', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAndAnalysis\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSecurityAndAnalysis\\Changes\\From' => $this->getObjectMapperWebHook🪝SecurityAndAnalysis()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCancelled', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Maintainer', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsor', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Sponsorable', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksSponsorship\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipEdited\\Changes\\PrivacyLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingCancellation', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipPendingTierChange', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksChanges8\\Tier\\From', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookSponsorshipTierChanged' => $this->getObjectMapperWebHook🪝Sponsorship()->serializeObject($object), @@ -7859,6 +7862,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/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php index 60728afcc3c..b4a59f1c777 100644 --- a/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHub/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/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/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/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php b/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php index 099027481e0..c07b3991cc8 100644 --- a/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHub/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/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/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/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php index cddeed06898..4a278d7724b 100644 --- a/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHub/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/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/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/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php b/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php index 5a17007bb53..0997549e8c2 100644 --- a/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHub/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/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/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/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php index 77ce070d4ff..20f1c5da2b8 100644 --- a/clients/GitHub/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHub/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/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/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/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php b/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php index 99d6f4adbcf..823a782717f 100644 --- a/clients/GitHub/src/Internal/Operator/Orgs/CreateOrUpdateCustomProperty.php +++ b/clients/GitHub/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\GitHub\Internal\Operation\Orgs\CreateOrUpdateCustomProperty($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $customPropertyName); diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php index b6ec6c98ca0..2f2ca81b1be 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return 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\GitHub\Internal\Operation\SecretScanning\ListAlertsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php index c31b1ebfaeb..12b10d3523a 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return 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\GitHub\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/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php index 9b08aaf7f16..88cac738b96 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return 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\GitHub\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/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php index 4feda3e89cd..811d14759ef 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return 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\GitHub\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/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php index a851502c2cf..bd74b38cde8 100644 --- a/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHub/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return 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\GitHub\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/GitHub/src/Internal/Router/Get/Five.php b/clients/GitHub/src/Internal/Router/Get/Five.php index ca9fc5426b3..728e0f1a7aa 100644 --- a/clients/GitHub/src/Internal/Router/Get/Five.php +++ b/clients/GitHub/src/Internal/Router/Get/Five.php @@ -51,7 +51,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|WithoutBody|iterable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): HookDelivery|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|ActionsOrganizationPermissions|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|OrgHook|OrgMembership|Migration|OrganizationRole|RepositoryRuleset|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/SecretScanning.php b/clients/GitHub/src/Internal/Router/Get/SecretScanning.php index c6abaf69736..db61c452f06 100644 --- a/clients/GitHub/src/Internal/Router/Get/SecretScanning.php +++ b/clients/GitHub/src/Internal/Router/Get/SecretScanning.php @@ -22,7 +22,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return Observable */ + /** @return iterable */ public function listAlertsForEnterprise(array $params): iterable { $arguments = []; @@ -103,7 +103,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 = []; @@ -190,7 +190,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/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index b01d6f5e2a0..78029bf5a4c 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -78,7 +78,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): iterable|BillingUsageReport|ActionsCacheUsageOrgEnterprise|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsOrg|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/Five.php b/clients/GitHub/src/Internal/Router/List/Five.php index 8da240fa0c8..ab3a78b2407 100644 --- a/clients/GitHub/src/Internal/Router/List/Five.php +++ b/clients/GitHub/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/SecretScanning.php b/clients/GitHub/src/Internal/Router/List/SecretScanning.php index b75c466b2ef..7064bf8e9f7 100644 --- a/clients/GitHub/src/Internal/Router/List/SecretScanning.php +++ b/clients/GitHub/src/Internal/Router/List/SecretScanning.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return 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/GitHub/src/Internal/Router/List/Six.php b/clients/GitHub/src/Internal/Router/List/Six.php index 15771a2e3fb..b661979501d 100644 --- a/clients/GitHub/src/Internal/Router/List/Six.php +++ b/clients/GitHub/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|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/GitHub/src/Internal/Router/Put/Orgs.php b/clients/GitHub/src/Internal/Router/Put/Orgs.php index 97815d09b79..046e1e77af8 100644 --- a/clients/GitHub/src/Internal/Router/Put/Orgs.php +++ b/clients/GitHub/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/GitHub/src/Internal/Router/Put/Six.php b/clients/GitHub/src/Internal/Router/Put/Six.php index 3305f95faaf..af284384afe 100644 --- a/clients/GitHub/src/Internal/Router/Put/Six.php +++ b/clients/GitHub/src/Internal/Router/Put/Six.php @@ -20,7 +20,6 @@ public function __construct(private Routers $routers) { } - /** @return |Schema\CustomProperty */ public function call(string $call, array $params, array $pathChunks): WithoutBody|EmptyObject|CustomProperty|RepositoryInvitation|FileCommit|Environment|RepositoryRuleset { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/WebHook/SecretScanningScan.php b/clients/GitHub/src/Internal/WebHook/SecretScanningScan.php new file mode 100644 index 00000000000..6bdcbd81b45 --- /dev/null +++ b/clients/GitHub/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/GitHub/src/Operation/Orgs.php b/clients/GitHub/src/Operation/Orgs.php index 08a4a69f6a2..b525b619030 100644 --- a/clients/GitHub/src/Operation/Orgs.php +++ b/clients/GitHub/src/Operation/Orgs.php @@ -438,6 +438,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/GitHub/src/Operation/SecretScanning.php b/clients/GitHub/src/Operation/SecretScanning.php index fe593fd18b0..c2b3776417c 100644 --- a/clients/GitHub/src/Operation/SecretScanning.php +++ b/clients/GitHub/src/Operation/SecretScanning.php @@ -17,31 +17,31 @@ public function __construct(private Internal\Operators $operators) { } - /** @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); } - /** @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/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 8a036509b1c..e982fe81790 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -196,7 +196,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /enterprises/{enterprise}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /events') { @@ -1328,7 +1328,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}') { @@ -1416,11 +1416,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') { @@ -3600,11 +3600,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/GitHub/src/Schema/WebhookSecretScanningScanCompleted.php b/clients/GitHub/src/Schema/WebhookSecretScanningScanCompleted.php new file mode 100644 index 00000000000..bd12f48a470 --- /dev/null +++ b/clients/GitHub/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\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\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 { @@ -792,6 +793,17 @@ public function resolve(array $headers, array $data): object } webhooks_aaaci: + 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_aaacj; + } + + webhooks_aaacj: try { if ($this->securityAdvisory instanceof Internal\WebHook\SecurityAdvisory === false) { $this->securityAdvisory = new Internal\WebHook\SecurityAdvisory($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecurityAdvisory()); @@ -799,10 +811,10 @@ public function resolve(array $headers, array $data): object return $this->securityAdvisory->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacj; + goto webhooks_aaack; } - webhooks_aaacj: + webhooks_aaack: try { if ($this->securityAndAnalysis instanceof Internal\WebHook\SecurityAndAnalysis === false) { $this->securityAndAnalysis = new Internal\WebHook\SecurityAndAnalysis($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecurityAndAnalysis()); @@ -810,10 +822,10 @@ public function resolve(array $headers, array $data): object return $this->securityAndAnalysis->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaack; + goto webhooks_aaacl; } - webhooks_aaack: + webhooks_aaacl: try { if ($this->sponsorship instanceof Internal\WebHook\Sponsorship === false) { $this->sponsorship = new Internal\WebHook\Sponsorship($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Sponsorship()); @@ -821,10 +833,10 @@ public function resolve(array $headers, array $data): object return $this->sponsorship->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacl; + goto webhooks_aaacm; } - webhooks_aaacl: + webhooks_aaacm: try { if ($this->star instanceof Internal\WebHook\Star === false) { $this->star = new Internal\WebHook\Star($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Star()); @@ -832,10 +844,10 @@ public function resolve(array $headers, array $data): object return $this->star->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacm; + goto webhooks_aaacn; } - webhooks_aaacm: + webhooks_aaacn: try { if ($this->status instanceof Internal\WebHook\Status === false) { $this->status = new Internal\WebHook\Status($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Status()); @@ -843,10 +855,10 @@ public function resolve(array $headers, array $data): object return $this->status->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacn; + goto webhooks_aaaco; } - webhooks_aaacn: + webhooks_aaaco: try { if ($this->subIssues instanceof Internal\WebHook\SubIssues === false) { $this->subIssues = new Internal\WebHook\SubIssues($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SubIssues()); @@ -854,10 +866,10 @@ public function resolve(array $headers, array $data): object return $this->subIssues->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaco; + goto webhooks_aaacp; } - webhooks_aaaco: + webhooks_aaacp: try { if ($this->teamAdd instanceof Internal\WebHook\TeamAdd === false) { $this->teamAdd = new Internal\WebHook\TeamAdd($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝TeamAdd()); @@ -865,10 +877,10 @@ public function resolve(array $headers, array $data): object return $this->teamAdd->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacp; + goto webhooks_aaacq; } - webhooks_aaacp: + webhooks_aaacq: try { if ($this->team instanceof Internal\WebHook\Team === false) { $this->team = new Internal\WebHook\Team($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Team()); @@ -876,10 +888,10 @@ public function resolve(array $headers, array $data): object return $this->team->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacq; + goto webhooks_aaacr; } - webhooks_aaacq: + webhooks_aaacr: try { if ($this->watch instanceof Internal\WebHook\Watch === false) { $this->watch = new Internal\WebHook\Watch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Watch()); @@ -887,10 +899,10 @@ public function resolve(array $headers, array $data): object return $this->watch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacr; + goto webhooks_aaacs; } - webhooks_aaacr: + webhooks_aaacs: try { if ($this->workflowDispatch instanceof Internal\WebHook\WorkflowDispatch === false) { $this->workflowDispatch = new Internal\WebHook\WorkflowDispatch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowDispatch()); @@ -898,10 +910,10 @@ public function resolve(array $headers, array $data): object return $this->workflowDispatch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacs; + goto webhooks_aaact; } - webhooks_aaacs: + webhooks_aaact: try { if ($this->workflowJob instanceof Internal\WebHook\WorkflowJob === false) { $this->workflowJob = new Internal\WebHook\WorkflowJob($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowJob()); @@ -909,10 +921,10 @@ public function resolve(array $headers, array $data): object return $this->workflowJob->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaact; + goto webhooks_aaacu; } - webhooks_aaact: + webhooks_aaacu: try { if ($this->workflowRun instanceof Internal\WebHook\WorkflowRun === false) { $this->workflowRun = new Internal\WebHook\WorkflowRun($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowRun()); @@ -920,10 +932,10 @@ public function resolve(array $headers, array $data): object return $this->workflowRun->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacu; + goto webhooks_aaacv; } - webhooks_aaacu: + webhooks_aaacv: throw $error; } } diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index acbe958e36d..879932d6566 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -55,7 +55,7 @@ function authHeader(): string assertType('', $client->call('GET /codes_of_conduct/{key}')); assertType('', $client->call('GET /emojis')); assertType('Observable|WithoutBody', $client->call('GET /enterprises/{enterprise}/dependabot/alerts')); -assertType('Observable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); +assertType('iterable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); assertType('Observable|WithoutBody', $client->call('GET /events')); assertType('Observable|WithoutBody', $client->call('LIST /events')); assertType('', $client->call('GET /feeds')); @@ -338,7 +338,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')); @@ -360,8 +360,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}')); @@ -906,8 +906,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/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 08bc536b31f..4c5e494e3ee 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -63436,6 +63436,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/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/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/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: |- @@ -191719,6 +191786,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 @@ -226258,9 +226398,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/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/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. required: false schema: