diff --git a/clients/GitHubEnterpriseCloud/README.md b/clients/GitHubEnterpriseCloud/README.md index 11a63fc760f..9ed1b5bc649 100644 --- a/clients/GitHubEnterpriseCloud/README.md +++ b/clients/GitHubEnterpriseCloud/README.md @@ -10711,6 +10711,7 @@ $client->call('GET /orgs/{org}/personal-access-token-requests', [ 'permission' => 'generated', 'last_used_before' => '1970-01-01T00:00:00+00:00', 'last_used_after' => '1970-01-01T00:00:00+00:00', + 'token_id' => , 'per_page' => 8, 'page' => 1, 'sort' => 'generated', @@ -10726,6 +10727,7 @@ $client->operations()->orgs()->listPatGrantRequests( org: 'generated', permission: 'generated', last_used_before: '1970-01-01T00:00:00+00:00', last_used_after: '1970-01-01T00:00:00+00:00', + token_id: , per_page: 8, page: 1, sort: 'generated', @@ -10749,6 +10751,7 @@ $client->call('LIST /orgs/{org}/personal-access-token-requests', [ 'permission' => 'generated', 'last_used_before' => '1970-01-01T00:00:00+00:00', 'last_used_after' => '1970-01-01T00:00:00+00:00', + 'token_id' => , 'per_page' => 8, 'page' => 1, 'sort' => 'generated', @@ -10764,6 +10767,7 @@ $client->operations()->orgs()->listPatGrantRequestsListing( org: 'generat permission: 'generated', last_used_before: '1970-01-01T00:00:00+00:00', last_used_after: '1970-01-01T00:00:00+00:00', + token_id: , per_page: 8, page: 1, sort: 'generated', @@ -10881,6 +10885,7 @@ $client->call('GET /orgs/{org}/personal-access-tokens', [ 'permission' => 'generated', 'last_used_before' => '1970-01-01T00:00:00+00:00', 'last_used_after' => '1970-01-01T00:00:00+00:00', + 'token_id' => , 'per_page' => 8, 'page' => 1, 'sort' => 'generated', @@ -10896,6 +10901,7 @@ $client->operations()->orgs()->listPatGrants( org: 'generated', permission: 'generated', last_used_before: '1970-01-01T00:00:00+00:00', last_used_after: '1970-01-01T00:00:00+00:00', + token_id: , per_page: 8, page: 1, sort: 'generated', @@ -10919,6 +10925,7 @@ $client->call('LIST /orgs/{org}/personal-access-tokens', [ 'permission' => 'generated', 'last_used_before' => '1970-01-01T00:00:00+00:00', 'last_used_after' => '1970-01-01T00:00:00+00:00', + 'token_id' => , 'per_page' => 8, 'page' => 1, 'sort' => 'generated', @@ -10934,6 +10941,7 @@ $client->operations()->orgs()->listPatGrantsListing( org: 'generated', permission: 'generated', last_used_before: '1970-01-01T00:00:00+00:00', last_used_after: '1970-01-01T00:00:00+00:00', + token_id: , per_page: 8, page: 1, sort: 'generated', diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index ae6519b3855..18f3ce1ab72 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "7adb0053077410f1b1c872d9cf17b27d", + "specHash": "f4435e8f9fc01b5ac4711efd22f2b783", "generatedFiles": { "files": [ { @@ -52,7 +52,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/HookDeliveryItem.php", - "hash": "b2613c3f77da7c9551e96c47342fcc71" + "hash": "419d046315fce48cf12efc528443634a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ScimError.php", @@ -5892,11 +5892,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodeScanning.php", - "hash": "0f64956750d544894ce4f175da47bf7e" + "hash": "4449c0065b0738e0d1d50035c66c97c1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "67fb14de51f432868daa174075e30517" + "hash": "51ef9350f1cf6663c601bef2705f7aa6" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Dependabot.php", @@ -5932,7 +5932,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "b3f15f630c7b75c52149e4861ee03724" + "hash": "3327f07512dae80e0e27a59b602f2973" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Oidc.php", @@ -6012,7 +6012,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/WebHooks.php", - "hash": "be592e380ba161ffb35324c39ace4edd" + "hash": "c27a546535e688144c70d63e8dee5845" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php", @@ -13316,7 +13316,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "30942aff10500ad3dd8b9b6ddfebbebe" + "hash": "150f6ef3b96d53a9e35bd9084d31efdc" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterpriseTest.php", @@ -16128,27 +16128,27 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListPatGrantRequests.php", - "hash": "5c4ea9bdf76d459eb0fab166f0bc903e" + "hash": "7450bedae043642eeafbe45ad27abf47" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListPatGrantRequests.php", - "hash": "6ff500b3175684a33ef45b4482940b27" + "hash": "f2927aaa3616103dab9fd851efe961e0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListPatGrantRequestsTest.php", - "hash": "9db4b4628f8f540225b9cb3cfa453e77" + "hash": "71cc48eb1c2e80a34db51f12df83f912" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListPatGrantRequestsListing.php", - "hash": "9f39785ffc7071b04115962c479a4cab" + "hash": "807c052f3f1bff9b1036cc4eb2b3f149" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListPatGrantRequestsListing.php", - "hash": "8a0449b2fd923f897534ed263e1129f1" + "hash": "49a97514a97f5b913e22b0d78ef799e7" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListPatGrantRequestsListingTest.php", - "hash": "fe8781da428179175815f5c35a72f16b" + "hash": "5e59943de09aa7976a4519213b0b02fd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ReviewPatGrantRequestsInBulk.php", @@ -16200,27 +16200,27 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListPatGrants.php", - "hash": "2409c5fbb53604e13694fbb14881b50d" + "hash": "997df4a4c6638b7eae02d1a016f3277f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListPatGrants.php", - "hash": "f0b140166bcc4a796334c21d7910c78a" + "hash": "fb754fe92263a129d0a3b6f75eee1f7e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListPatGrantsTest.php", - "hash": "a26627fdc776a3d02a57a0e88f81c102" + "hash": "f3a6771a9595dfd16f4894434ac5d150" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListPatGrantsListing.php", - "hash": "7073f7f2837cf45f0e0346ab1be0afda" + "hash": "c84d9d59e43e2d35718f14b2e5c78bb8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListPatGrantsListing.php", - "hash": "7340c4c925ed95a7898608db0eaf127e" + "hash": "addef0f356d763b6a8095c2b887ab188" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListPatGrantsListingTest.php", - "hash": "92facd4d8259abc9f94a71aa723dfd59" + "hash": "483009c03840d2ce4ea07867294168a5" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/UpdatePatAccesses.php", @@ -16484,7 +16484,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrg.php", - "hash": "cceb42686f63d6c8a21fc2a58deb7a4c" + "hash": "771fbd1f9bbdc2913e4b992d625ac6aa" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgTest.php", @@ -16496,7 +16496,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "1e66ef766fac93cbb93ddbcea6df56e7" + "hash": "6c401d2fd1f1777374cc1ec3252d48d4" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListingTest.php", @@ -19032,7 +19032,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/UpdateAlert.php", - "hash": "7a9978f02216fb604ecd87718fd8d024" + "hash": "2a76de57b9cd599cce72446cb39fdaf8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/UpdateAlertTest.php", @@ -22480,7 +22480,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepo.php", - "hash": "8406c3269cb8a80c68eb9e53bc07d1b8" + "hash": "e45ab01d261c117cfc75fe10c2236876" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoTest.php", @@ -22492,7 +22492,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "01b63ea8880e465e839535ea846ff6b0" + "hash": "6cd5fefdadc604e643ccfec6f8d1fd95" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListingTest.php", @@ -25956,7 +25956,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php", - "hash": "954ffe57382c10e3d616781de2c8e222" + "hash": "e5b0d823ac7afb3493a03c1d63eb8917" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/RateLimit.php", @@ -26012,7 +26012,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecretScanning.php", - "hash": "8bf2e3debe72cfa44d6a2fd01075da74" + "hash": "b61a180c324da9b113176dc651f7ed8e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeScanning.php", @@ -26212,7 +26212,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeScanning.php", - "hash": "1d7396f7514fb11288def3056abe1708" + "hash": "309b124d0e8397581e7f114352154bc2" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Migrations.php", @@ -26268,7 +26268,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Orgs.php", - "hash": "602ca7c19beb95ee9d85a6bd3f3bf9ef" + "hash": "ef5a22dccc43a8503406327f24012de6" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Packages.php", @@ -26300,7 +26300,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/SecretScanning.php", - "hash": "6d4cf0916b9ee5028ade238212393a34" + "hash": "b413fea999cb254d539b7eaf1df62f57" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Pulls.php", @@ -26512,15 +26512,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php", - "hash": "d6567804fd9446c5594a3a7bb2be0cfb" + "hash": "ea9e502f26d8e2dcec931cbb92236ded" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "1956e6da07cf2d35a0a077268930c79a" + "hash": "f328c04c40d6e52bb27564ad7e5fe4dd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "6fce670148902bf101d15b2a1d257744" + "hash": "1424d863a1dce5abb286f7860c544c2d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -26592,7 +26592,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php", - "hash": "a27935540f8b02d7d2be089565c98ca6" + "hash": "dae52c8f1437069d40758bf20a061589" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Nine.php", @@ -26612,11 +26612,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Four.php", - "hash": "603ef2017db782aa7bb02ff55436588f" + "hash": "282491e805536c973566e1b7d2970f44" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "3fa24834914487068b4e560d8340242d" + "hash": "cffa6649a4dfdaae443d62e1167029b3" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Two.php", @@ -26624,7 +26624,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "9ab5f0e384521f6cabad4e794dd83f7d" + "hash": "3917cbae554e409f85fae3248cc860cb" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -28896,7 +28896,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "18b7de7685a0f30e24370f286cbd6686" + "hash": "9ecae9b18242cdbfb18a96b77bfe6688" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php", @@ -29692,11 +29692,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "6583039f1752704bfe99ace0ae50a364" + "hash": "ee29996b6d8d187d079cb6ed220e5f9e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "cd43286060cdcaddeaa05d4577694a30" + "hash": "216ac90bc1c1ebf45ccf5018d0bf857c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -31684,35 +31684,35 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/ExemptionRequestData.php", - "hash": "fcda825359a403bff44f8dea1543eab7" + "hash": "9f9a0e4830e574cb0255f71033a0acfd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/Metadata.php", - "hash": "5b79b44f2f2621357be906751ec47864" + "hash": "baf5c8be8b1e42fb226502f401069bd8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequest.php", - "hash": "403b1a9c553904edc5316f9c629efd90" + "hash": "d0bb2cc71ea211ec1ef67c58534d8ed0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCancelled.php", - "hash": "05172178d2eb423cc26643fbce1f92e7" + "hash": "c61229fdee9c1f58790641d12503f8b6" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCompleted.php", - "hash": "418fcdcb8c58d5aa7d565c381778ec29" + "hash": "1eb0e5a06e2a72fd68d74ac9a4f1c050" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCreated.php", - "hash": "eaa174bcbb189616789825bf28bcf529" + "hash": "c6338287fa73f76c068a8d0b0879411b" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseDismissed.php", - "hash": "6e5ba82bf7edbd634a1d3187d46f064b" + "hash": "96c6d7a13524bca4c479faec52b073ca" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseSubmitted.php", - "hash": "a6e943bf9d24fa2a066064a41ca0399c" + "hash": "60919da073cbb1138b4b08ddba82c01d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequestPushRulesetBypass\/Data.php", @@ -35217,6 +35217,26 @@ { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/DismissalRequestSecretScanning.php", "hash": "ce137ad879bd993f1bacf71bec0a74d1" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/DismissalRequestCodeScanning.php", + "hash": "e70903b8c836e90de739d24883faee4f" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/DismissalRequestCodeScanningMetadata.php", + "hash": "a2a7d0602e2df22058fee8afbb1c481c" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/DismissalRequestCodeScanning\/Data.php", + "hash": "26f571cd2a9da9420e390f5e01b732c9" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/WebHook\/DismissalRequestCodeScanning.php", + "hash": "dac99318cae47d026907327c35443fde" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/DismissalRequestCodeScanning.php", + "hash": "21655473762ec5b49ec970a82d78990c" } ] }, diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php b/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php index fdf8fef0eb0..b372f28b156 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php @@ -45,6 +45,13 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed } catch (Throwable) { } } + + if ($signature === 'data|type' && $value['type'] === 'code_scanning_alert_dismissal') { + try { + return $hydrator->hydrateObject(Schema\DismissalRequestCodeScanning::class, $value); + } catch (Throwable) { + } + } } return $value; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php b/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php index 8ebc23f2f36..59bbf017416 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php @@ -38,6 +38,13 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed } catch (Throwable) { } } + + if ($signature === 'alert_title|reason' && ($value['reason'] === 'false positive' || $value['reason'] === 'won\'t fix' || $value['reason'] === 'used in tests')) { + try { + return $hydrator->hydrateObject(Schema\DismissalRequestCodeScanningMetadata::class, $value); + } catch (Throwable) { + } + } } return $value; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/WebHook/DismissalRequestCodeScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/WebHook/DismissalRequestCodeScanning.php new file mode 100644 index 00000000000..89614158ef1 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/WebHook/DismissalRequestCodeScanning.php @@ -0,0 +1,6078 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestCreated' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestCreated($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleInstallation' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationSimpleWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionRequest' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestResponseSubmitted' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestResponseSubmitted($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionResponse' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionResponse($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestCreated(array $payload): WebhookExemptionRequestCreated + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['enterprise'] ?? null; + + if ($value === null) { + $properties['enterprise'] = null; + goto after_enterprise; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enterprise'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['enterprise'] = $value; + + after_enterprise: + + $value = $payload['installation'] ?? null; + + if ($value === null) { + $properties['installation'] = null; + goto after_installation; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['exemption_request'] ?? null; + + if ($value === null) { + $missingFields[] = 'exemption_request'; + goto after_exemptionRequest; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'exemptionRequest'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['exemptionRequest'] = $value; + + after_exemptionRequest: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $missingFields[] = 'sender'; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestCreated', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookExemptionRequestCreated::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookExemptionRequestCreated(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestCreated', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks(array $payload): EnterpriseWebhooks + { + $properties = []; + $missingFields = []; + try { + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['website_url'] ?? null; + + if ($value === null) { + $properties['websiteUrl'] = null; + goto after_websiteUrl; + } + + $properties['websiteUrl'] = $value; + + after_websiteUrl: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['slug'] ?? null; + + if ($value === null) { + $missingFields[] = 'slug'; + goto after_slug; + } + + $properties['slug'] = $value; + + after_slug: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(EnterpriseWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new EnterpriseWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation(array $payload): SimpleInstallation + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleInstallation', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SimpleInstallation::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SimpleInstallation(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleInstallation', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks(array $payload): OrganizationSimpleWebhooks + { + $properties = []; + $missingFields = []; + try { + $value = $payload['login'] ?? null; + + if ($value === null) { + $missingFields[] = 'login'; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'repos_url'; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['hooks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issues_url'; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['members_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'members_url'; + goto after_membersUrl; + } + + $properties['membersUrl'] = $value; + + after_membersUrl: + + $value = $payload['public_members_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'public_members_url'; + goto after_publicMembersUrl; + } + + $properties['publicMembersUrl'] = $value; + + after_publicMembersUrl: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationSimpleWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(OrganizationSimpleWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new OrganizationSimpleWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationSimpleWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks(array $payload): RepositoryWebhooks + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $missingFields[] = 'full_name'; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['license'] ?? null; + + if ($value === null) { + $properties['license'] = null; + goto after_license; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['license'] = $value; + + after_license: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['forks'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks'; + goto after_forks; + } + + $properties['forks'] = $value; + + after_forks: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $missingFields[] = 'private'; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['fork'] ?? null; + + if ($value === null) { + $missingFields[] = 'fork'; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['archive_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'archive_url'; + goto after_archiveUrl; + } + + $properties['archiveUrl'] = $value; + + after_archiveUrl: + + $value = $payload['assignees_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'assignees_url'; + goto after_assigneesUrl; + } + + $properties['assigneesUrl'] = $value; + + after_assigneesUrl: + + $value = $payload['blobs_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'blobs_url'; + goto after_blobsUrl; + } + + $properties['blobsUrl'] = $value; + + after_blobsUrl: + + $value = $payload['branches_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'branches_url'; + goto after_branchesUrl; + } + + $properties['branchesUrl'] = $value; + + after_branchesUrl: + + $value = $payload['collaborators_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'collaborators_url'; + goto after_collaboratorsUrl; + } + + $properties['collaboratorsUrl'] = $value; + + after_collaboratorsUrl: + + $value = $payload['comments_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'comments_url'; + goto after_commentsUrl; + } + + $properties['commentsUrl'] = $value; + + after_commentsUrl: + + $value = $payload['commits_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'commits_url'; + goto after_commitsUrl; + } + + $properties['commitsUrl'] = $value; + + after_commitsUrl: + + $value = $payload['compare_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'compare_url'; + goto after_compareUrl; + } + + $properties['compareUrl'] = $value; + + after_compareUrl: + + $value = $payload['contents_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'contents_url'; + goto after_contentsUrl; + } + + $properties['contentsUrl'] = $value; + + after_contentsUrl: + + $value = $payload['contributors_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'contributors_url'; + goto after_contributorsUrl; + } + + $properties['contributorsUrl'] = $value; + + after_contributorsUrl: + + $value = $payload['deployments_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'deployments_url'; + goto after_deploymentsUrl; + } + + $properties['deploymentsUrl'] = $value; + + after_deploymentsUrl: + + $value = $payload['downloads_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'downloads_url'; + goto after_downloadsUrl; + } + + $properties['downloadsUrl'] = $value; + + after_downloadsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['forks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_url'; + goto after_forksUrl; + } + + $properties['forksUrl'] = $value; + + after_forksUrl: + + $value = $payload['git_commits_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_commits_url'; + goto after_gitCommitsUrl; + } + + $properties['gitCommitsUrl'] = $value; + + after_gitCommitsUrl: + + $value = $payload['git_refs_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_refs_url'; + goto after_gitRefsUrl; + } + + $properties['gitRefsUrl'] = $value; + + after_gitRefsUrl: + + $value = $payload['git_tags_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_tags_url'; + goto after_gitTagsUrl; + } + + $properties['gitTagsUrl'] = $value; + + after_gitTagsUrl: + + $value = $payload['git_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'git_url'; + goto after_gitUrl; + } + + $properties['gitUrl'] = $value; + + after_gitUrl: + + $value = $payload['issue_comment_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_comment_url'; + goto after_issueCommentUrl; + } + + $properties['issueCommentUrl'] = $value; + + after_issueCommentUrl: + + $value = $payload['issue_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issue_events_url'; + goto after_issueEventsUrl; + } + + $properties['issueEventsUrl'] = $value; + + after_issueEventsUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'issues_url'; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['keys_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'keys_url'; + goto after_keysUrl; + } + + $properties['keysUrl'] = $value; + + after_keysUrl: + + $value = $payload['labels_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'labels_url'; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $value = $payload['languages_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'languages_url'; + goto after_languagesUrl; + } + + $properties['languagesUrl'] = $value; + + after_languagesUrl: + + $value = $payload['merges_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'merges_url'; + goto after_mergesUrl; + } + + $properties['mergesUrl'] = $value; + + after_mergesUrl: + + $value = $payload['milestones_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'milestones_url'; + goto after_milestonesUrl; + } + + $properties['milestonesUrl'] = $value; + + after_milestonesUrl: + + $value = $payload['notifications_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'notifications_url'; + goto after_notificationsUrl; + } + + $properties['notificationsUrl'] = $value; + + after_notificationsUrl: + + $value = $payload['pulls_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'pulls_url'; + goto after_pullsUrl; + } + + $properties['pullsUrl'] = $value; + + after_pullsUrl: + + $value = $payload['releases_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'releases_url'; + goto after_releasesUrl; + } + + $properties['releasesUrl'] = $value; + + after_releasesUrl: + + $value = $payload['ssh_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'ssh_url'; + goto after_sshUrl; + } + + $properties['sshUrl'] = $value; + + after_sshUrl: + + $value = $payload['stargazers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'stargazers_url'; + goto after_stargazersUrl; + } + + $properties['stargazersUrl'] = $value; + + after_stargazersUrl: + + $value = $payload['statuses_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'statuses_url'; + goto after_statusesUrl; + } + + $properties['statusesUrl'] = $value; + + after_statusesUrl: + + $value = $payload['subscribers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscribers_url'; + goto after_subscribersUrl; + } + + $properties['subscribersUrl'] = $value; + + after_subscribersUrl: + + $value = $payload['subscription_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscription_url'; + goto after_subscriptionUrl; + } + + $properties['subscriptionUrl'] = $value; + + after_subscriptionUrl: + + $value = $payload['tags_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'tags_url'; + goto after_tagsUrl; + } + + $properties['tagsUrl'] = $value; + + after_tagsUrl: + + $value = $payload['teams_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'teams_url'; + goto after_teamsUrl; + } + + $properties['teamsUrl'] = $value; + + after_teamsUrl: + + $value = $payload['trees_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'trees_url'; + goto after_treesUrl; + } + + $properties['treesUrl'] = $value; + + after_treesUrl: + + $value = $payload['clone_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'clone_url'; + goto after_cloneUrl; + } + + $properties['cloneUrl'] = $value; + + after_cloneUrl: + + $value = $payload['mirror_url'] ?? null; + + if ($value === null) { + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; + } + + $properties['mirrorUrl'] = $value; + + after_mirrorUrl: + + $value = $payload['hooks_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['svn_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'svn_url'; + goto after_svnUrl; + } + + $properties['svnUrl'] = $value; + + after_svnUrl: + + $value = $payload['homepage'] ?? null; + + if ($value === null) { + $properties['homepage'] = null; + goto after_homepage; + } + + $properties['homepage'] = $value; + + after_homepage: + + $value = $payload['language'] ?? null; + + if ($value === null) { + $properties['language'] = null; + goto after_language; + } + + $properties['language'] = $value; + + after_language: + + $value = $payload['forks_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks_count'; + goto after_forksCount; + } + + $properties['forksCount'] = $value; + + after_forksCount: + + $value = $payload['stargazers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; + } + + $properties['stargazersCount'] = $value; + + after_stargazersCount: + + $value = $payload['watchers_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers_count'; + goto after_watchersCount; + } + + $properties['watchersCount'] = $value; + + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $missingFields[] = 'size'; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $missingFields[] = 'default_branch'; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: + + $value = $payload['custom_properties'] ?? null; + + if ($value === null) { + $properties['customProperties'] = null; + goto after_customProperties; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'customProperties'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['customProperties'] = $value; + + after_customProperties: + + $value = $payload['has_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_issues'; + goto after_hasIssues; + } + + $properties['hasIssues'] = $value; + + after_hasIssues: + + $value = $payload['has_projects'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_projects'; + goto after_hasProjects; + } + + $properties['hasProjects'] = $value; + + after_hasProjects: + + $value = $payload['has_wiki'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_wiki'; + goto after_hasWiki; + } + + $properties['hasWiki'] = $value; + + after_hasWiki: + + $value = $payload['has_pages'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_pages'; + goto after_hasPages; + } + + $properties['hasPages'] = $value; + + after_hasPages: + + $value = $payload['has_downloads'] ?? null; + + if ($value === null) { + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; + } + + $properties['hasDownloads'] = $value; + + after_hasDownloads: + + $value = $payload['has_discussions'] ?? null; + + if ($value === null) { + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; + } + + $properties['hasDiscussions'] = $value; + + after_hasDiscussions: + + $value = $payload['archived'] ?? null; + + if ($value === null) { + $missingFields[] = 'archived'; + goto after_archived; + } + + $properties['archived'] = $value; + + after_archived: + + $value = $payload['disabled'] ?? null; + + if ($value === null) { + $missingFields[] = 'disabled'; + goto after_disabled; + } + + $properties['disabled'] = $value; + + after_disabled: + + $value = $payload['visibility'] ?? null; + + if ($value === null) { + $properties['visibility'] = null; + goto after_visibility; + } + + $properties['visibility'] = $value; + + after_visibility: + + $value = $payload['pushed_at'] ?? null; + + if ($value === null) { + $properties['pushedAt'] = null; + goto after_pushedAt; + } + + $properties['pushedAt'] = $value; + + after_pushedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['allow_rebase_merge'] ?? null; + + if ($value === null) { + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; + } + + $properties['allowRebaseMerge'] = $value; + + after_allowRebaseMerge: + + $value = $payload['template_repository'] ?? null; + + if ($value === null) { + $properties['templateRepository'] = null; + goto after_templateRepository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'templateRepository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['templateRepository'] = $value; + + after_templateRepository: + + $value = $payload['temp_clone_token'] ?? null; + + if ($value === null) { + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; + } + + $properties['tempCloneToken'] = $value; + + after_tempCloneToken: + + $value = $payload['allow_squash_merge'] ?? null; + + if ($value === null) { + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; + } + + $properties['allowSquashMerge'] = $value; + + after_allowSquashMerge: + + $value = $payload['allow_auto_merge'] ?? null; + + if ($value === null) { + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; + } + + $properties['allowAutoMerge'] = $value; + + after_allowAutoMerge: + + $value = $payload['delete_branch_on_merge'] ?? null; + + if ($value === null) { + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; + } + + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; + } + + $properties['allowUpdateBranch'] = $value; + + after_allowUpdateBranch: + + $value = $payload['use_squash_pr_title_as_default'] ?? null; + + if ($value === null) { + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; + } + + $properties['useSquashPrTitleAsDefault'] = $value; + + after_useSquashPrTitleAsDefault: + + $value = $payload['squash_merge_commit_title'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; + } + + $properties['squashMergeCommitTitle'] = $value; + + after_squashMergeCommitTitle: + + $value = $payload['squash_merge_commit_message'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; + } + + $properties['squashMergeCommitMessage'] = $value; + + after_squashMergeCommitMessage: + + $value = $payload['merge_commit_title'] ?? null; + + if ($value === null) { + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; + } + + $properties['mergeCommitTitle'] = $value; + + after_mergeCommitTitle: + + $value = $payload['merge_commit_message'] ?? null; + + if ($value === null) { + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; + } + + $properties['mergeCommitMessage'] = $value; + + after_mergeCommitMessage: + + $value = $payload['allow_merge_commit'] ?? null; + + if ($value === null) { + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; + } + + $properties['allowMergeCommit'] = $value; + + after_allowMergeCommit: + + $value = $payload['allow_forking'] ?? null; + + if ($value === null) { + $properties['allowForking'] = null; + goto after_allowForking; + } + + $properties['allowForking'] = $value; + + after_allowForking: + + $value = $payload['web_commit_signoff_required'] ?? null; + + if ($value === null) { + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; + } + + $properties['webCommitSignoffRequired'] = $value; + + after_webCommitSignoffRequired: + + $value = $payload['subscribers_count'] ?? null; + + if ($value === null) { + $properties['subscribersCount'] = null; + goto after_subscribersCount; + } + + $properties['subscribersCount'] = $value; + + after_subscribersCount: + + $value = $payload['network_count'] ?? null; + + if ($value === null) { + $properties['networkCount'] = null; + goto after_networkCount; + } + + $properties['networkCount'] = $value; + + after_networkCount: + + $value = $payload['open_issues'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues'; + goto after_openIssues; + } + + $properties['openIssues'] = $value; + + after_openIssues: + + $value = $payload['watchers'] ?? null; + + if ($value === null) { + $missingFields[] = 'watchers'; + goto after_watchers; + } + + $properties['watchers'] = $value; + + after_watchers: + + $value = $payload['master_branch'] ?? null; + + if ($value === null) { + $properties['masterBranch'] = null; + goto after_masterBranch; + } + + $properties['masterBranch'] = $value; + + after_masterBranch: + + $value = $payload['starred_at'] ?? null; + + if ($value === null) { + $properties['starredAt'] = null; + goto after_starredAt; + } + + $properties['starredAt'] = $value; + + after_starredAt: + + $value = $payload['anonymous_access_enabled'] ?? null; + + if ($value === null) { + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; + } + + $properties['anonymousAccessEnabled'] = $value; + + after_anonymousAccessEnabled: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(RepositoryWebhooks::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new RepositoryWebhooks(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple + { + $properties = []; + $missingFields = []; + try { + $value = $payload['key'] ?? null; + + if ($value === null) { + $missingFields[] = 'key'; + goto after_key; + } + + $properties['key'] = $value; + + after_key: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['spdx_id'] ?? null; + + if ($value === null) { + $properties['spdxId'] = null; + goto after_spdxId; + } + + $properties['spdxId'] = $value; + + after_spdxId: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new LicenseSimple(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser(array $payload): SimpleUser + { + $properties = []; + $missingFields = []; + try { + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['email'] ?? null; + + if ($value === null) { + $properties['email'] = null; + goto after_email; + } + + $properties['email'] = $value; + + after_email: + + $value = $payload['login'] ?? null; + + if ($value === null) { + $missingFields[] = 'login'; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'avatar_url'; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['gravatar_id'] ?? null; + + if ($value === null) { + $properties['gravatarId'] = null; + goto after_gravatarId; + } + + $properties['gravatarId'] = $value; + + after_gravatarId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['followers_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'followers_url'; + goto after_followersUrl; + } + + $properties['followersUrl'] = $value; + + after_followersUrl: + + $value = $payload['following_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'following_url'; + goto after_followingUrl; + } + + $properties['followingUrl'] = $value; + + after_followingUrl: + + $value = $payload['gists_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'gists_url'; + goto after_gistsUrl; + } + + $properties['gistsUrl'] = $value; + + after_gistsUrl: + + $value = $payload['starred_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'starred_url'; + goto after_starredUrl; + } + + $properties['starredUrl'] = $value; + + after_starredUrl: + + $value = $payload['subscriptions_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'subscriptions_url'; + goto after_subscriptionsUrl; + } + + $properties['subscriptionsUrl'] = $value; + + after_subscriptionsUrl: + + $value = $payload['organizations_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'organizations_url'; + goto after_organizationsUrl; + } + + $properties['organizationsUrl'] = $value; + + after_organizationsUrl: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'repos_url'; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'events_url'; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['received_events_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'received_events_url'; + goto after_receivedEventsUrl; + } + + $properties['receivedEventsUrl'] = $value; + + after_receivedEventsUrl: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $missingFields[] = 'type'; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + + $value = $payload['site_admin'] ?? null; + + if ($value === null) { + $missingFields[] = 'site_admin'; + goto after_siteAdmin; + } + + $properties['siteAdmin'] = $value; + + after_siteAdmin: + + $value = $payload['starred_at'] ?? null; + + if ($value === null) { + $properties['starredAt'] = null; + goto after_starredAt; + } + + $properties['starredAt'] = $value; + + after_starredAt: + + $value = $payload['user_view_type'] ?? null; + + if ($value === null) { + $properties['userViewType'] = null; + goto after_userViewType; + } + + $properties['userViewType'] = $value; + + after_userViewType: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SimpleUser(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions(array $payload): Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; + + if ($value === null) { + $missingFields[] = 'admin'; + goto after_admin; + } + + $properties['admin'] = $value; + + after_admin: + + $value = $payload['pull'] ?? null; + + if ($value === null) { + $missingFields[] = 'pull'; + goto after_pull; + } + + $properties['pull'] = $value; + + after_pull: + + $value = $payload['triage'] ?? null; + + if ($value === null) { + $properties['triage'] = null; + goto after_triage; + } + + $properties['triage'] = $value; + + after_triage: + + $value = $payload['push'] ?? null; + + if ($value === null) { + $missingFields[] = 'push'; + goto after_push; + } + + $properties['push'] = $value; + + after_push: + + $value = $payload['maintain'] ?? null; + + if ($value === null) { + $properties['maintain'] = null; + goto after_maintain; + } + + $properties['maintain'] = $value; + + after_maintain: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository(array $payload): TemplateRepository + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $properties['nodeId'] = null; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $properties['fullName'] = null; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $properties['owner'] = null; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $properties['private'] = null; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['fork'] ?? null; + + if ($value === null) { + $properties['fork'] = null; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['archive_url'] ?? null; + + if ($value === null) { + $properties['archiveUrl'] = null; + goto after_archiveUrl; + } + + $properties['archiveUrl'] = $value; + + after_archiveUrl: + + $value = $payload['assignees_url'] ?? null; + + if ($value === null) { + $properties['assigneesUrl'] = null; + goto after_assigneesUrl; + } + + $properties['assigneesUrl'] = $value; + + after_assigneesUrl: + + $value = $payload['blobs_url'] ?? null; + + if ($value === null) { + $properties['blobsUrl'] = null; + goto after_blobsUrl; + } + + $properties['blobsUrl'] = $value; + + after_blobsUrl: + + $value = $payload['branches_url'] ?? null; + + if ($value === null) { + $properties['branchesUrl'] = null; + goto after_branchesUrl; + } + + $properties['branchesUrl'] = $value; + + after_branchesUrl: + + $value = $payload['collaborators_url'] ?? null; + + if ($value === null) { + $properties['collaboratorsUrl'] = null; + goto after_collaboratorsUrl; + } + + $properties['collaboratorsUrl'] = $value; + + after_collaboratorsUrl: + + $value = $payload['comments_url'] ?? null; + + if ($value === null) { + $properties['commentsUrl'] = null; + goto after_commentsUrl; + } + + $properties['commentsUrl'] = $value; + + after_commentsUrl: + + $value = $payload['commits_url'] ?? null; + + if ($value === null) { + $properties['commitsUrl'] = null; + goto after_commitsUrl; + } + + $properties['commitsUrl'] = $value; + + after_commitsUrl: + + $value = $payload['compare_url'] ?? null; + + if ($value === null) { + $properties['compareUrl'] = null; + goto after_compareUrl; + } + + $properties['compareUrl'] = $value; + + after_compareUrl: + + $value = $payload['contents_url'] ?? null; + + if ($value === null) { + $properties['contentsUrl'] = null; + goto after_contentsUrl; + } + + $properties['contentsUrl'] = $value; + + after_contentsUrl: + + $value = $payload['contributors_url'] ?? null; + + if ($value === null) { + $properties['contributorsUrl'] = null; + goto after_contributorsUrl; + } + + $properties['contributorsUrl'] = $value; + + after_contributorsUrl: + + $value = $payload['deployments_url'] ?? null; + + if ($value === null) { + $properties['deploymentsUrl'] = null; + goto after_deploymentsUrl; + } + + $properties['deploymentsUrl'] = $value; + + after_deploymentsUrl: + + $value = $payload['downloads_url'] ?? null; + + if ($value === null) { + $properties['downloadsUrl'] = null; + goto after_downloadsUrl; + } + + $properties['downloadsUrl'] = $value; + + after_downloadsUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $properties['eventsUrl'] = null; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['forks_url'] ?? null; + + if ($value === null) { + $properties['forksUrl'] = null; + goto after_forksUrl; + } + + $properties['forksUrl'] = $value; + + after_forksUrl: + + $value = $payload['git_commits_url'] ?? null; + + if ($value === null) { + $properties['gitCommitsUrl'] = null; + goto after_gitCommitsUrl; + } + + $properties['gitCommitsUrl'] = $value; + + after_gitCommitsUrl: + + $value = $payload['git_refs_url'] ?? null; + + if ($value === null) { + $properties['gitRefsUrl'] = null; + goto after_gitRefsUrl; + } + + $properties['gitRefsUrl'] = $value; + + after_gitRefsUrl: + + $value = $payload['git_tags_url'] ?? null; + + if ($value === null) { + $properties['gitTagsUrl'] = null; + goto after_gitTagsUrl; + } + + $properties['gitTagsUrl'] = $value; + + after_gitTagsUrl: + + $value = $payload['git_url'] ?? null; + + if ($value === null) { + $properties['gitUrl'] = null; + goto after_gitUrl; + } + + $properties['gitUrl'] = $value; + + after_gitUrl: + + $value = $payload['issue_comment_url'] ?? null; + + if ($value === null) { + $properties['issueCommentUrl'] = null; + goto after_issueCommentUrl; + } + + $properties['issueCommentUrl'] = $value; + + after_issueCommentUrl: + + $value = $payload['issue_events_url'] ?? null; + + if ($value === null) { + $properties['issueEventsUrl'] = null; + goto after_issueEventsUrl; + } + + $properties['issueEventsUrl'] = $value; + + after_issueEventsUrl: + + $value = $payload['issues_url'] ?? null; + + if ($value === null) { + $properties['issuesUrl'] = null; + goto after_issuesUrl; + } + + $properties['issuesUrl'] = $value; + + after_issuesUrl: + + $value = $payload['keys_url'] ?? null; + + if ($value === null) { + $properties['keysUrl'] = null; + goto after_keysUrl; + } + + $properties['keysUrl'] = $value; + + after_keysUrl: + + $value = $payload['labels_url'] ?? null; + + if ($value === null) { + $properties['labelsUrl'] = null; + goto after_labelsUrl; + } + + $properties['labelsUrl'] = $value; + + after_labelsUrl: + + $value = $payload['languages_url'] ?? null; + + if ($value === null) { + $properties['languagesUrl'] = null; + goto after_languagesUrl; + } + + $properties['languagesUrl'] = $value; + + after_languagesUrl: + + $value = $payload['merges_url'] ?? null; + + if ($value === null) { + $properties['mergesUrl'] = null; + goto after_mergesUrl; + } + + $properties['mergesUrl'] = $value; + + after_mergesUrl: + + $value = $payload['milestones_url'] ?? null; + + if ($value === null) { + $properties['milestonesUrl'] = null; + goto after_milestonesUrl; + } + + $properties['milestonesUrl'] = $value; + + after_milestonesUrl: + + $value = $payload['notifications_url'] ?? null; + + if ($value === null) { + $properties['notificationsUrl'] = null; + goto after_notificationsUrl; + } + + $properties['notificationsUrl'] = $value; + + after_notificationsUrl: + + $value = $payload['pulls_url'] ?? null; + + if ($value === null) { + $properties['pullsUrl'] = null; + goto after_pullsUrl; + } + + $properties['pullsUrl'] = $value; + + after_pullsUrl: + + $value = $payload['releases_url'] ?? null; + + if ($value === null) { + $properties['releasesUrl'] = null; + goto after_releasesUrl; + } + + $properties['releasesUrl'] = $value; + + after_releasesUrl: + + $value = $payload['ssh_url'] ?? null; + + if ($value === null) { + $properties['sshUrl'] = null; + goto after_sshUrl; + } + + $properties['sshUrl'] = $value; + + after_sshUrl: + + $value = $payload['stargazers_url'] ?? null; + + if ($value === null) { + $properties['stargazersUrl'] = null; + goto after_stargazersUrl; + } + + $properties['stargazersUrl'] = $value; + + after_stargazersUrl: + + $value = $payload['statuses_url'] ?? null; + + if ($value === null) { + $properties['statusesUrl'] = null; + goto after_statusesUrl; + } + + $properties['statusesUrl'] = $value; + + after_statusesUrl: + + $value = $payload['subscribers_url'] ?? null; + + if ($value === null) { + $properties['subscribersUrl'] = null; + goto after_subscribersUrl; + } + + $properties['subscribersUrl'] = $value; + + after_subscribersUrl: + + $value = $payload['subscription_url'] ?? null; + + if ($value === null) { + $properties['subscriptionUrl'] = null; + goto after_subscriptionUrl; + } + + $properties['subscriptionUrl'] = $value; + + after_subscriptionUrl: + + $value = $payload['tags_url'] ?? null; + + if ($value === null) { + $properties['tagsUrl'] = null; + goto after_tagsUrl; + } + + $properties['tagsUrl'] = $value; + + after_tagsUrl: + + $value = $payload['teams_url'] ?? null; + + if ($value === null) { + $properties['teamsUrl'] = null; + goto after_teamsUrl; + } + + $properties['teamsUrl'] = $value; + + after_teamsUrl: + + $value = $payload['trees_url'] ?? null; + + if ($value === null) { + $properties['treesUrl'] = null; + goto after_treesUrl; + } + + $properties['treesUrl'] = $value; + + after_treesUrl: + + $value = $payload['clone_url'] ?? null; + + if ($value === null) { + $properties['cloneUrl'] = null; + goto after_cloneUrl; + } + + $properties['cloneUrl'] = $value; + + after_cloneUrl: + + $value = $payload['mirror_url'] ?? null; + + if ($value === null) { + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; + } + + $properties['mirrorUrl'] = $value; + + after_mirrorUrl: + + $value = $payload['hooks_url'] ?? null; + + if ($value === null) { + $properties['hooksUrl'] = null; + goto after_hooksUrl; + } + + $properties['hooksUrl'] = $value; + + after_hooksUrl: + + $value = $payload['svn_url'] ?? null; + + if ($value === null) { + $properties['svnUrl'] = null; + goto after_svnUrl; + } + + $properties['svnUrl'] = $value; + + after_svnUrl: + + $value = $payload['homepage'] ?? null; + + if ($value === null) { + $properties['homepage'] = null; + goto after_homepage; + } + + $properties['homepage'] = $value; + + after_homepage: + + $value = $payload['language'] ?? null; + + if ($value === null) { + $properties['language'] = null; + goto after_language; + } + + $properties['language'] = $value; + + after_language: + + $value = $payload['forks_count'] ?? null; + + if ($value === null) { + $properties['forksCount'] = null; + goto after_forksCount; + } + + $properties['forksCount'] = $value; + + after_forksCount: + + $value = $payload['stargazers_count'] ?? null; + + if ($value === null) { + $properties['stargazersCount'] = null; + goto after_stargazersCount; + } + + $properties['stargazersCount'] = $value; + + after_stargazersCount: + + $value = $payload['watchers_count'] ?? null; + + if ($value === null) { + $properties['watchersCount'] = null; + goto after_watchersCount; + } + + $properties['watchersCount'] = $value; + + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $properties['size'] = null; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $properties['defaultBranch'] = null; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $properties['openIssuesCount'] = null; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: + + $value = $payload['has_issues'] ?? null; + + if ($value === null) { + $properties['hasIssues'] = null; + goto after_hasIssues; + } + + $properties['hasIssues'] = $value; + + after_hasIssues: + + $value = $payload['has_projects'] ?? null; + + if ($value === null) { + $properties['hasProjects'] = null; + goto after_hasProjects; + } + + $properties['hasProjects'] = $value; + + after_hasProjects: + + $value = $payload['has_wiki'] ?? null; + + if ($value === null) { + $properties['hasWiki'] = null; + goto after_hasWiki; + } + + $properties['hasWiki'] = $value; + + after_hasWiki: + + $value = $payload['has_pages'] ?? null; + + if ($value === null) { + $properties['hasPages'] = null; + goto after_hasPages; + } + + $properties['hasPages'] = $value; + + after_hasPages: + + $value = $payload['has_downloads'] ?? null; + + if ($value === null) { + $properties['hasDownloads'] = null; + goto after_hasDownloads; + } + + $properties['hasDownloads'] = $value; + + after_hasDownloads: + + $value = $payload['archived'] ?? null; + + if ($value === null) { + $properties['archived'] = null; + goto after_archived; + } + + $properties['archived'] = $value; + + after_archived: + + $value = $payload['disabled'] ?? null; + + if ($value === null) { + $properties['disabled'] = null; + goto after_disabled; + } + + $properties['disabled'] = $value; + + after_disabled: + + $value = $payload['visibility'] ?? null; + + if ($value === null) { + $properties['visibility'] = null; + goto after_visibility; + } + + $properties['visibility'] = $value; + + after_visibility: + + $value = $payload['pushed_at'] ?? null; + + if ($value === null) { + $properties['pushedAt'] = null; + goto after_pushedAt; + } + + $properties['pushedAt'] = $value; + + after_pushedAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['allow_rebase_merge'] ?? null; + + if ($value === null) { + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; + } + + $properties['allowRebaseMerge'] = $value; + + after_allowRebaseMerge: + + $value = $payload['temp_clone_token'] ?? null; + + if ($value === null) { + $properties['tempCloneToken'] = null; + goto after_tempCloneToken; + } + + $properties['tempCloneToken'] = $value; + + after_tempCloneToken: + + $value = $payload['allow_squash_merge'] ?? null; + + if ($value === null) { + $properties['allowSquashMerge'] = null; + goto after_allowSquashMerge; + } + + $properties['allowSquashMerge'] = $value; + + after_allowSquashMerge: + + $value = $payload['allow_auto_merge'] ?? null; + + if ($value === null) { + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; + } + + $properties['allowAutoMerge'] = $value; + + after_allowAutoMerge: + + $value = $payload['delete_branch_on_merge'] ?? null; + + if ($value === null) { + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; + } + + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; + } + + $properties['allowUpdateBranch'] = $value; + + after_allowUpdateBranch: + + $value = $payload['use_squash_pr_title_as_default'] ?? null; + + if ($value === null) { + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; + } + + $properties['useSquashPrTitleAsDefault'] = $value; + + after_useSquashPrTitleAsDefault: + + $value = $payload['squash_merge_commit_title'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; + } + + $properties['squashMergeCommitTitle'] = $value; + + after_squashMergeCommitTitle: + + $value = $payload['squash_merge_commit_message'] ?? null; + + if ($value === null) { + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; + } + + $properties['squashMergeCommitMessage'] = $value; + + after_squashMergeCommitMessage: + + $value = $payload['merge_commit_title'] ?? null; + + if ($value === null) { + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; + } + + $properties['mergeCommitTitle'] = $value; + + after_mergeCommitTitle: + + $value = $payload['merge_commit_message'] ?? null; + + if ($value === null) { + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; + } + + $properties['mergeCommitMessage'] = $value; + + after_mergeCommitMessage: + + $value = $payload['allow_merge_commit'] ?? null; + + if ($value === null) { + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; + } + + $properties['allowMergeCommit'] = $value; + + after_allowMergeCommit: + + $value = $payload['subscribers_count'] ?? null; + + if ($value === null) { + $properties['subscribersCount'] = null; + goto after_subscribersCount; + } + + $properties['subscribersCount'] = $value; + + after_subscribersCount: + + $value = $payload['network_count'] ?? null; + + if ($value === null) { + $properties['networkCount'] = null; + goto after_networkCount; + } + + $properties['networkCount'] = $value; + + after_networkCount: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(TemplateRepository::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new TemplateRepository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(array $payload): Owner + { + $properties = []; + $missingFields = []; + try { + $value = $payload['login'] ?? null; + + if ($value === null) { + $properties['login'] = null; + goto after_login; + } + + $properties['login'] = $value; + + after_login: + + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $properties['nodeId'] = null; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['avatar_url'] ?? null; + + if ($value === null) { + $properties['avatarUrl'] = null; + goto after_avatarUrl; + } + + $properties['avatarUrl'] = $value; + + after_avatarUrl: + + $value = $payload['gravatar_id'] ?? null; + + if ($value === null) { + $properties['gravatarId'] = null; + goto after_gravatarId; + } + + $properties['gravatarId'] = $value; + + after_gravatarId: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['followers_url'] ?? null; + + if ($value === null) { + $properties['followersUrl'] = null; + goto after_followersUrl; + } + + $properties['followersUrl'] = $value; + + after_followersUrl: + + $value = $payload['following_url'] ?? null; + + if ($value === null) { + $properties['followingUrl'] = null; + goto after_followingUrl; + } + + $properties['followingUrl'] = $value; + + after_followingUrl: + + $value = $payload['gists_url'] ?? null; + + if ($value === null) { + $properties['gistsUrl'] = null; + goto after_gistsUrl; + } + + $properties['gistsUrl'] = $value; + + after_gistsUrl: + + $value = $payload['starred_url'] ?? null; + + if ($value === null) { + $properties['starredUrl'] = null; + goto after_starredUrl; + } + + $properties['starredUrl'] = $value; + + after_starredUrl: + + $value = $payload['subscriptions_url'] ?? null; + + if ($value === null) { + $properties['subscriptionsUrl'] = null; + goto after_subscriptionsUrl; + } + + $properties['subscriptionsUrl'] = $value; + + after_subscriptionsUrl: + + $value = $payload['organizations_url'] ?? null; + + if ($value === null) { + $properties['organizationsUrl'] = null; + goto after_organizationsUrl; + } + + $properties['organizationsUrl'] = $value; + + after_organizationsUrl: + + $value = $payload['repos_url'] ?? null; + + if ($value === null) { + $properties['reposUrl'] = null; + goto after_reposUrl; + } + + $properties['reposUrl'] = $value; + + after_reposUrl: + + $value = $payload['events_url'] ?? null; + + if ($value === null) { + $properties['eventsUrl'] = null; + goto after_eventsUrl; + } + + $properties['eventsUrl'] = $value; + + after_eventsUrl: + + $value = $payload['received_events_url'] ?? null; + + if ($value === null) { + $properties['receivedEventsUrl'] = null; + goto after_receivedEventsUrl; + } + + $properties['receivedEventsUrl'] = $value; + + after_receivedEventsUrl: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $properties['type'] = null; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + + $value = $payload['site_admin'] ?? null; + + if ($value === null) { + $properties['siteAdmin'] = null; + goto after_siteAdmin; + } + + $properties['siteAdmin'] = $value; + + after_siteAdmin: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Owner(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Owner', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(array $payload): \ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; + + if ($value === null) { + $properties['admin'] = null; + goto after_admin; + } + + $properties['admin'] = $value; + + after_admin: + + $value = $payload['maintain'] ?? null; + + if ($value === null) { + $properties['maintain'] = null; + goto after_maintain; + } + + $properties['maintain'] = $value; + + after_maintain: + + $value = $payload['push'] ?? null; + + if ($value === null) { + $properties['push'] = null; + goto after_push; + } + + $properties['push'] = $value; + + after_push: + + $value = $payload['triage'] ?? null; + + if ($value === null) { + $properties['triage'] = null; + goto after_triage; + } + + $properties['triage'] = $value; + + after_triage: + + $value = $payload['pull'] ?? null; + + if ($value === null) { + $properties['pull'] = null; + goto after_pull; + } + + $properties['pull'] = $value; + + after_pull: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new \ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest(array $payload): ExemptionRequest + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['number'] ?? null; + + if ($value === null) { + $properties['number'] = null; + goto after_number; + } + + $properties['number'] = $value; + + after_number: + + $value = $payload['repository_id'] ?? null; + + if ($value === null) { + $properties['repositoryId'] = null; + goto after_repositoryId; + } + + $properties['repositoryId'] = $value; + + after_repositoryId: + + $value = $payload['requester_id'] ?? null; + + if ($value === null) { + $properties['requesterId'] = null; + goto after_requesterId; + } + + $properties['requesterId'] = $value; + + after_requesterId: + + $value = $payload['requester_login'] ?? null; + + if ($value === null) { + $properties['requesterLogin'] = null; + goto after_requesterLogin; + } + + $properties['requesterLogin'] = $value; + + after_requesterLogin: + + $value = $payload['request_type'] ?? null; + + if ($value === null) { + $properties['requestType'] = null; + goto after_requestType; + } + + $properties['requestType'] = $value; + + after_requestType: + + $value = $payload['exemption_request_data'] ?? null; + + if ($value === null) { + $properties['exemptionRequestData'] = null; + goto after_exemptionRequestData; + } + + static $exemptionRequestDataCaster1; + + if ($exemptionRequestDataCaster1 === null) { + $exemptionRequestDataCaster1 = new ExemptionRequestData(...[]); + } + + $value = $exemptionRequestDataCaster1->cast($value, $this); + + if ($value === null) { + $properties['exemptionRequestData'] = null; + goto after_exemptionRequestData; + } + + $properties['exemptionRequestData'] = $value; + + after_exemptionRequestData: + + $value = $payload['resource_identifier'] ?? null; + + if ($value === null) { + $properties['resourceIdentifier'] = null; + goto after_resourceIdentifier; + } + + $properties['resourceIdentifier'] = $value; + + after_resourceIdentifier: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['requester_comment'] ?? null; + + if ($value === null) { + $properties['requesterComment'] = null; + goto after_requesterComment; + } + + $properties['requesterComment'] = $value; + + after_requesterComment: + + $value = $payload['metadata'] ?? null; + + if ($value === null) { + $properties['metadata'] = null; + goto after_metadata; + } + + static $metadataCaster1; + + if ($metadataCaster1 === null) { + $metadataCaster1 = new Metadata(...[]); + } + + $value = $metadataCaster1->cast($value, $this); + + if ($value === null) { + $properties['metadata'] = null; + goto after_metadata; + } + + $properties['metadata'] = $value; + + after_metadata: + + $value = $payload['expires_at'] ?? null; + + if ($value === null) { + $properties['expiresAt'] = null; + goto after_expiresAt; + } + + $properties['expiresAt'] = $value; + + after_expiresAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['responses'] ?? null; + + if ($value === null) { + $properties['responses'] = null; + goto after_responses; + } + + $properties['responses'] = $value; + + after_responses: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionRequest', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ExemptionRequest::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ExemptionRequest(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionRequest', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestResponseSubmitted(array $payload): WebhookExemptionRequestResponseSubmitted + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['enterprise'] ?? null; + + if ($value === null) { + $properties['enterprise'] = null; + goto after_enterprise; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enterprise'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['enterprise'] = $value; + + after_enterprise: + + $value = $payload['installation'] ?? null; + + if ($value === null) { + $properties['installation'] = null; + goto after_installation; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['exemption_request'] ?? null; + + if ($value === null) { + $missingFields[] = 'exemption_request'; + goto after_exemptionRequest; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'exemptionRequest'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['exemptionRequest'] = $value; + + after_exemptionRequest: + + $value = $payload['exemption_response'] ?? null; + + if ($value === null) { + $missingFields[] = 'exemption_response'; + goto after_exemptionResponse; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'exemptionResponse'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionResponse($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['exemptionResponse'] = $value; + + after_exemptionResponse: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $missingFields[] = 'sender'; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestResponseSubmitted', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookExemptionRequestResponseSubmitted::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookExemptionRequestResponseSubmitted(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestResponseSubmitted', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionResponse(array $payload): ExemptionResponse + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['reviewer_id'] ?? null; + + if ($value === null) { + $properties['reviewerId'] = null; + goto after_reviewerId; + } + + $properties['reviewerId'] = $value; + + after_reviewerId: + + $value = $payload['reviewer_login'] ?? null; + + if ($value === null) { + $properties['reviewerLogin'] = null; + goto after_reviewerLogin; + } + + $properties['reviewerLogin'] = $value; + + after_reviewerLogin: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['reviewer_comment'] ?? null; + + if ($value === null) { + $properties['reviewerComment'] = null; + goto after_reviewerComment; + } + + $properties['reviewerComment'] = $value; + + after_reviewerComment: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionResponse', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ExemptionResponse::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ExemptionResponse(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionResponse', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties(array $payload): CustomProperties + { + $properties = []; + $missingFields = []; + try { + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CustomProperties::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CustomProperties(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestCreated' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestCreated($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleInstallation' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationSimpleWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookExemptionRequestResponseSubmitted' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestResponseSubmitted($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ExemptionResponse' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionResponse($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestCreated(mixed $object): mixed + { + assert($object instanceof WebhookExemptionRequestCreated); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $enterprise = $object->enterprise; + + if ($enterprise === null) { + goto after_enterprise; + } + + $enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($enterprise); + after_enterprise: $result['enterprise'] = $enterprise; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $exemptionRequest = $object->exemptionRequest; + $exemptionRequest = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest($exemptionRequest); + after_exemptionRequest: $result['exemption_request'] = $exemptionRequest; + + $sender = $object->sender; + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks(mixed $object): mixed + { + assert($object instanceof EnterpriseWebhooks); + $result = []; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $websiteUrl = $object->websiteUrl; + + if ($websiteUrl === null) { + goto after_websiteUrl; + } + + after_websiteUrl: $result['website_url'] = $websiteUrl; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $slug = $object->slug; + after_slug: $result['slug'] = $slug; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation(mixed $object): mixed + { + assert($object instanceof SimpleInstallation); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks(mixed $object): mixed + { + assert($object instanceof OrganizationSimpleWebhooks); + $result = []; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $membersUrl = $object->membersUrl; + after_membersUrl: $result['members_url'] = $membersUrl; + + $publicMembersUrl = $object->publicMembersUrl; + after_publicMembersUrl: $result['public_members_url'] = $publicMembersUrl; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks(mixed $object): mixed + { + assert($object instanceof RepositoryWebhooks); + $result = []; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + after_fullName: $result['full_name'] = $fullName; + + $license = $object->license; + + if ($license === null) { + goto after_license; + } + + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($organization); + after_organization: $result['organization'] = $organization; + + $forks = $object->forks; + after_forks: $result['forks'] = $forks; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + after_fork: $result['fork'] = $fork; + + $url = $object->url; + after_url: $result['url'] = $url; + + $archiveUrl = $object->archiveUrl; + after_archiveUrl: $result['archive_url'] = $archiveUrl; + + $assigneesUrl = $object->assigneesUrl; + after_assigneesUrl: $result['assignees_url'] = $assigneesUrl; + + $blobsUrl = $object->blobsUrl; + after_blobsUrl: $result['blobs_url'] = $blobsUrl; + + $branchesUrl = $object->branchesUrl; + after_branchesUrl: $result['branches_url'] = $branchesUrl; + + $collaboratorsUrl = $object->collaboratorsUrl; + after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $commitsUrl = $object->commitsUrl; + after_commitsUrl: $result['commits_url'] = $commitsUrl; + + $compareUrl = $object->compareUrl; + after_compareUrl: $result['compare_url'] = $compareUrl; + + $contentsUrl = $object->contentsUrl; + after_contentsUrl: $result['contents_url'] = $contentsUrl; + + $contributorsUrl = $object->contributorsUrl; + after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + + $deploymentsUrl = $object->deploymentsUrl; + after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + + $downloadsUrl = $object->downloadsUrl; + after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $forksUrl = $object->forksUrl; + after_forksUrl: $result['forks_url'] = $forksUrl; + + $gitCommitsUrl = $object->gitCommitsUrl; + after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + + $gitRefsUrl = $object->gitRefsUrl; + after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + + $gitTagsUrl = $object->gitTagsUrl; + after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + + $gitUrl = $object->gitUrl; + after_gitUrl: $result['git_url'] = $gitUrl; + + $issueCommentUrl = $object->issueCommentUrl; + after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + + $issueEventsUrl = $object->issueEventsUrl; + after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $keysUrl = $object->keysUrl; + after_keysUrl: $result['keys_url'] = $keysUrl; + + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $languagesUrl = $object->languagesUrl; + after_languagesUrl: $result['languages_url'] = $languagesUrl; + + $mergesUrl = $object->mergesUrl; + after_mergesUrl: $result['merges_url'] = $mergesUrl; + + $milestonesUrl = $object->milestonesUrl; + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + + $notificationsUrl = $object->notificationsUrl; + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + + $pullsUrl = $object->pullsUrl; + after_pullsUrl: $result['pulls_url'] = $pullsUrl; + + $releasesUrl = $object->releasesUrl; + after_releasesUrl: $result['releases_url'] = $releasesUrl; + + $sshUrl = $object->sshUrl; + after_sshUrl: $result['ssh_url'] = $sshUrl; + + $stargazersUrl = $object->stargazersUrl; + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + + $statusesUrl = $object->statusesUrl; + after_statusesUrl: $result['statuses_url'] = $statusesUrl; + + $subscribersUrl = $object->subscribersUrl; + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + + $subscriptionUrl = $object->subscriptionUrl; + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + + $tagsUrl = $object->tagsUrl; + after_tagsUrl: $result['tags_url'] = $tagsUrl; + + $teamsUrl = $object->teamsUrl; + after_teamsUrl: $result['teams_url'] = $teamsUrl; + + $treesUrl = $object->treesUrl; + after_treesUrl: $result['trees_url'] = $treesUrl; + + $cloneUrl = $object->cloneUrl; + after_cloneUrl: $result['clone_url'] = $cloneUrl; + + $mirrorUrl = $object->mirrorUrl; + + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } + + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; + + $homepage = $object->homepage; + + if ($homepage === null) { + goto after_homepage; + } + + after_homepage: $result['homepage'] = $homepage; + + $language = $object->language; + + if ($language === null) { + goto after_language; + } + + after_language: $result['language'] = $language; + + $forksCount = $object->forksCount; + after_forksCount: $result['forks_count'] = $forksCount; + + $stargazersCount = $object->stargazersCount; + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + + $watchersCount = $object->watchersCount; + after_watchersCount: $result['watchers_count'] = $watchersCount; + + $size = $object->size; + after_size: $result['size'] = $size; + + $defaultBranch = $object->defaultBranch; + after_defaultBranch: $result['default_branch'] = $defaultBranch; + + $openIssuesCount = $object->openIssuesCount; + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + + $isTemplate = $object->isTemplate; + + if ($isTemplate === null) { + goto after_isTemplate; + } + + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $customProperties = $object->customProperties; + + if ($customProperties === null) { + goto after_customProperties; + } + + $customProperties = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($customProperties); + after_customProperties: $result['custom_properties'] = $customProperties; + + $hasIssues = $object->hasIssues; + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $hasDiscussions = $object->hasDiscussions; + + if ($hasDiscussions === null) { + goto after_hasDiscussions; + } + + after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + + $archived = $object->archived; + after_archived: $result['archived'] = $archived; + + $disabled = $object->disabled; + after_disabled: $result['disabled'] = $disabled; + + $visibility = $object->visibility; + + if ($visibility === null) { + goto after_visibility; + } + + after_visibility: $result['visibility'] = $visibility; + + $pushedAt = $object->pushedAt; + + if ($pushedAt === null) { + goto after_pushedAt; + } + + after_pushedAt: $result['pushed_at'] = $pushedAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $allowRebaseMerge = $object->allowRebaseMerge; + + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; + } + + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + + $templateRepository = $object->templateRepository; + + if ($templateRepository === null) { + goto after_templateRepository; + } + + $templateRepository = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository($templateRepository); + after_templateRepository: $result['template_repository'] = $templateRepository; + + $tempCloneToken = $object->tempCloneToken; + + if ($tempCloneToken === null) { + goto after_tempCloneToken; + } + + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + + $allowSquashMerge = $object->allowSquashMerge; + + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } + + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + + $allowAutoMerge = $object->allowAutoMerge; + + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; + } + + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; + + $deleteBranchOnMerge = $object->deleteBranchOnMerge; + + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } + + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; + + $allowUpdateBranch = $object->allowUpdateBranch; + + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } + + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; + + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; + + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } + + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; + + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; + } + + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; + + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } + + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; + + $mergeCommitTitle = $object->mergeCommitTitle; + + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } + + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; + + $mergeCommitMessage = $object->mergeCommitMessage; + + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; + } + + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; + + $allowMergeCommit = $object->allowMergeCommit; + + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } + + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + + $allowForking = $object->allowForking; + + if ($allowForking === null) { + goto after_allowForking; + } + + after_allowForking: $result['allow_forking'] = $allowForking; + + $webCommitSignoffRequired = $object->webCommitSignoffRequired; + + if ($webCommitSignoffRequired === null) { + goto after_webCommitSignoffRequired; + } + + after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; + + $subscribersCount = $object->subscribersCount; + + if ($subscribersCount === null) { + goto after_subscribersCount; + } + + after_subscribersCount: $result['subscribers_count'] = $subscribersCount; + + $networkCount = $object->networkCount; + + if ($networkCount === null) { + goto after_networkCount; + } + + after_networkCount: $result['network_count'] = $networkCount; + + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; + + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; + + $masterBranch = $object->masterBranch; + + if ($masterBranch === null) { + goto after_masterBranch; + } + + after_masterBranch: $result['master_branch'] = $masterBranch; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $anonymousAccessEnabled = $object->anonymousAccessEnabled; + + if ($anonymousAccessEnabled === null) { + goto after_anonymousAccessEnabled; + } + + after_anonymousAccessEnabled: $result['anonymous_access_enabled'] = $anonymousAccessEnabled; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️LicenseSimple(mixed $object): mixed + { + assert($object instanceof LicenseSimple); + $result = []; + + $key = $object->key; + after_key: $result['key'] = $key; + + $name = $object->name; + after_name: $result['name'] = $name; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $spdxId = $object->spdxId; + + if ($spdxId === null) { + goto after_spdxId; + } + + after_spdxId: $result['spdx_id'] = $spdxId; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + $userViewType = $object->userViewType; + + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️Permissions(mixed $object): mixed + { + assert($object instanceof Permissions); + $result = []; + + $admin = $object->admin; + after_admin: $result['admin'] = $admin; + + $pull = $object->pull; + after_pull: $result['pull'] = $pull; + + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; + } + + after_triage: $result['triage'] = $triage; + + $push = $object->push; + after_push: $result['push'] = $push; + + $maintain = $object->maintain; + + if ($maintain === null) { + goto after_maintain; + } + + after_maintain: $result['maintain'] = $maintain; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository(mixed $object): mixed + { + assert($object instanceof TemplateRepository); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + + if ($nodeId === null) { + goto after_nodeId; + } + + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + + if ($fullName === null) { + goto after_fullName; + } + + after_fullName: $result['full_name'] = $fullName; + + $owner = $object->owner; + + if ($owner === null) { + goto after_owner; + } + + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + + if ($private === null) { + goto after_private; + } + + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + + if ($fork === null) { + goto after_fork; + } + + after_fork: $result['fork'] = $fork; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $archiveUrl = $object->archiveUrl; + + if ($archiveUrl === null) { + goto after_archiveUrl; + } + + after_archiveUrl: $result['archive_url'] = $archiveUrl; + + $assigneesUrl = $object->assigneesUrl; + + if ($assigneesUrl === null) { + goto after_assigneesUrl; + } + + after_assigneesUrl: $result['assignees_url'] = $assigneesUrl; + + $blobsUrl = $object->blobsUrl; + + if ($blobsUrl === null) { + goto after_blobsUrl; + } + + after_blobsUrl: $result['blobs_url'] = $blobsUrl; + + $branchesUrl = $object->branchesUrl; + + if ($branchesUrl === null) { + goto after_branchesUrl; + } + + after_branchesUrl: $result['branches_url'] = $branchesUrl; + + $collaboratorsUrl = $object->collaboratorsUrl; + + if ($collaboratorsUrl === null) { + goto after_collaboratorsUrl; + } + + after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + + $commentsUrl = $object->commentsUrl; + + if ($commentsUrl === null) { + goto after_commentsUrl; + } + + after_commentsUrl: $result['comments_url'] = $commentsUrl; + + $commitsUrl = $object->commitsUrl; + + if ($commitsUrl === null) { + goto after_commitsUrl; + } + + after_commitsUrl: $result['commits_url'] = $commitsUrl; + + $compareUrl = $object->compareUrl; + + if ($compareUrl === null) { + goto after_compareUrl; + } + + after_compareUrl: $result['compare_url'] = $compareUrl; + + $contentsUrl = $object->contentsUrl; + + if ($contentsUrl === null) { + goto after_contentsUrl; + } + + after_contentsUrl: $result['contents_url'] = $contentsUrl; + + $contributorsUrl = $object->contributorsUrl; + + if ($contributorsUrl === null) { + goto after_contributorsUrl; + } + + after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + + $deploymentsUrl = $object->deploymentsUrl; + + if ($deploymentsUrl === null) { + goto after_deploymentsUrl; + } + + after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + + $downloadsUrl = $object->downloadsUrl; + + if ($downloadsUrl === null) { + goto after_downloadsUrl; + } + + after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; + + $eventsUrl = $object->eventsUrl; + + if ($eventsUrl === null) { + goto after_eventsUrl; + } + + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $forksUrl = $object->forksUrl; + + if ($forksUrl === null) { + goto after_forksUrl; + } + + after_forksUrl: $result['forks_url'] = $forksUrl; + + $gitCommitsUrl = $object->gitCommitsUrl; + + if ($gitCommitsUrl === null) { + goto after_gitCommitsUrl; + } + + after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + + $gitRefsUrl = $object->gitRefsUrl; + + if ($gitRefsUrl === null) { + goto after_gitRefsUrl; + } + + after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + + $gitTagsUrl = $object->gitTagsUrl; + + if ($gitTagsUrl === null) { + goto after_gitTagsUrl; + } + + after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + + $gitUrl = $object->gitUrl; + + if ($gitUrl === null) { + goto after_gitUrl; + } + + after_gitUrl: $result['git_url'] = $gitUrl; + + $issueCommentUrl = $object->issueCommentUrl; + + if ($issueCommentUrl === null) { + goto after_issueCommentUrl; + } + + after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + + $issueEventsUrl = $object->issueEventsUrl; + + if ($issueEventsUrl === null) { + goto after_issueEventsUrl; + } + + after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + + $issuesUrl = $object->issuesUrl; + + if ($issuesUrl === null) { + goto after_issuesUrl; + } + + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $keysUrl = $object->keysUrl; + + if ($keysUrl === null) { + goto after_keysUrl; + } + + after_keysUrl: $result['keys_url'] = $keysUrl; + + $labelsUrl = $object->labelsUrl; + + if ($labelsUrl === null) { + goto after_labelsUrl; + } + + after_labelsUrl: $result['labels_url'] = $labelsUrl; + + $languagesUrl = $object->languagesUrl; + + if ($languagesUrl === null) { + goto after_languagesUrl; + } + + after_languagesUrl: $result['languages_url'] = $languagesUrl; + + $mergesUrl = $object->mergesUrl; + + if ($mergesUrl === null) { + goto after_mergesUrl; + } + + after_mergesUrl: $result['merges_url'] = $mergesUrl; + + $milestonesUrl = $object->milestonesUrl; + + if ($milestonesUrl === null) { + goto after_milestonesUrl; + } + + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + + $notificationsUrl = $object->notificationsUrl; + + if ($notificationsUrl === null) { + goto after_notificationsUrl; + } + + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + + $pullsUrl = $object->pullsUrl; + + if ($pullsUrl === null) { + goto after_pullsUrl; + } + + after_pullsUrl: $result['pulls_url'] = $pullsUrl; + + $releasesUrl = $object->releasesUrl; + + if ($releasesUrl === null) { + goto after_releasesUrl; + } + + after_releasesUrl: $result['releases_url'] = $releasesUrl; + + $sshUrl = $object->sshUrl; + + if ($sshUrl === null) { + goto after_sshUrl; + } + + after_sshUrl: $result['ssh_url'] = $sshUrl; + + $stargazersUrl = $object->stargazersUrl; + + if ($stargazersUrl === null) { + goto after_stargazersUrl; + } + + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + + $statusesUrl = $object->statusesUrl; + + if ($statusesUrl === null) { + goto after_statusesUrl; + } + + after_statusesUrl: $result['statuses_url'] = $statusesUrl; + + $subscribersUrl = $object->subscribersUrl; + + if ($subscribersUrl === null) { + goto after_subscribersUrl; + } + + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + + $subscriptionUrl = $object->subscriptionUrl; + + if ($subscriptionUrl === null) { + goto after_subscriptionUrl; + } + + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + + $tagsUrl = $object->tagsUrl; + + if ($tagsUrl === null) { + goto after_tagsUrl; + } + + after_tagsUrl: $result['tags_url'] = $tagsUrl; + + $teamsUrl = $object->teamsUrl; + + if ($teamsUrl === null) { + goto after_teamsUrl; + } + + after_teamsUrl: $result['teams_url'] = $teamsUrl; + + $treesUrl = $object->treesUrl; + + if ($treesUrl === null) { + goto after_treesUrl; + } + + after_treesUrl: $result['trees_url'] = $treesUrl; + + $cloneUrl = $object->cloneUrl; + + if ($cloneUrl === null) { + goto after_cloneUrl; + } + + after_cloneUrl: $result['clone_url'] = $cloneUrl; + + $mirrorUrl = $object->mirrorUrl; + + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } + + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + + $hooksUrl = $object->hooksUrl; + + if ($hooksUrl === null) { + goto after_hooksUrl; + } + + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $svnUrl = $object->svnUrl; + + if ($svnUrl === null) { + goto after_svnUrl; + } + + after_svnUrl: $result['svn_url'] = $svnUrl; + + $homepage = $object->homepage; + + if ($homepage === null) { + goto after_homepage; + } + + after_homepage: $result['homepage'] = $homepage; + + $language = $object->language; + + if ($language === null) { + goto after_language; + } + + after_language: $result['language'] = $language; + + $forksCount = $object->forksCount; + + if ($forksCount === null) { + goto after_forksCount; + } + + after_forksCount: $result['forks_count'] = $forksCount; + + $stargazersCount = $object->stargazersCount; + + if ($stargazersCount === null) { + goto after_stargazersCount; + } + + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + + $watchersCount = $object->watchersCount; + + if ($watchersCount === null) { + goto after_watchersCount; + } + + after_watchersCount: $result['watchers_count'] = $watchersCount; + + $size = $object->size; + + if ($size === null) { + goto after_size; + } + + after_size: $result['size'] = $size; + + $defaultBranch = $object->defaultBranch; + + if ($defaultBranch === null) { + goto after_defaultBranch; + } + + after_defaultBranch: $result['default_branch'] = $defaultBranch; + + $openIssuesCount = $object->openIssuesCount; + + if ($openIssuesCount === null) { + goto after_openIssuesCount; + } + + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + + $isTemplate = $object->isTemplate; + + if ($isTemplate === null) { + goto after_isTemplate; + } + + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $hasIssues = $object->hasIssues; + + if ($hasIssues === null) { + goto after_hasIssues; + } + + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + + if ($hasProjects === null) { + goto after_hasProjects; + } + + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + + if ($hasWiki === null) { + goto after_hasWiki; + } + + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + + if ($hasPages === null) { + goto after_hasPages; + } + + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + + if ($hasDownloads === null) { + goto after_hasDownloads; + } + + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $archived = $object->archived; + + if ($archived === null) { + goto after_archived; + } + + after_archived: $result['archived'] = $archived; + + $disabled = $object->disabled; + + if ($disabled === null) { + goto after_disabled; + } + + after_disabled: $result['disabled'] = $disabled; + + $visibility = $object->visibility; + + if ($visibility === null) { + goto after_visibility; + } + + after_visibility: $result['visibility'] = $visibility; + + $pushedAt = $object->pushedAt; + + if ($pushedAt === null) { + goto after_pushedAt; + } + + after_pushedAt: $result['pushed_at'] = $pushedAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $allowRebaseMerge = $object->allowRebaseMerge; + + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; + } + + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + + $tempCloneToken = $object->tempCloneToken; + + if ($tempCloneToken === null) { + goto after_tempCloneToken; + } + + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + + $allowSquashMerge = $object->allowSquashMerge; + + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } + + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + + $allowAutoMerge = $object->allowAutoMerge; + + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; + } + + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; + + $deleteBranchOnMerge = $object->deleteBranchOnMerge; + + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } + + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; + + $allowUpdateBranch = $object->allowUpdateBranch; + + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } + + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; + + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; + + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } + + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; + + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; + } + + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; + + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } + + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; + + $mergeCommitTitle = $object->mergeCommitTitle; + + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } + + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; + + $mergeCommitMessage = $object->mergeCommitMessage; + + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; + } + + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; + + $allowMergeCommit = $object->allowMergeCommit; + + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } + + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + + $subscribersCount = $object->subscribersCount; + + if ($subscribersCount === null) { + goto after_subscribersCount; + } + + after_subscribersCount: $result['subscribers_count'] = $subscribersCount; + + $networkCount = $object->networkCount; + + if ($networkCount === null) { + goto after_networkCount; + } + + after_networkCount: $result['network_count'] = $networkCount; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner(mixed $object): mixed + { + assert($object instanceof Owner); + $result = []; + + $login = $object->login; + + if ($login === null) { + goto after_login; + } + + after_login: $result['login'] = $login; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + + if ($nodeId === null) { + goto after_nodeId; + } + + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + + if ($avatarUrl === null) { + goto after_avatarUrl; + } + + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + + if ($followersUrl === null) { + goto after_followersUrl; + } + + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + + if ($followingUrl === null) { + goto after_followingUrl; + } + + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + + if ($gistsUrl === null) { + goto after_gistsUrl; + } + + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + + if ($starredUrl === null) { + goto after_starredUrl; + } + + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + + if ($subscriptionsUrl === null) { + goto after_subscriptionsUrl; + } + + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + + if ($organizationsUrl === null) { + goto after_organizationsUrl; + } + + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + + if ($reposUrl === null) { + goto after_reposUrl; + } + + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + + if ($eventsUrl === null) { + goto after_eventsUrl; + } + + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + + if ($receivedEventsUrl === null) { + goto after_receivedEventsUrl; + } + + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + + if ($type === null) { + goto after_type; + } + + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + + if ($siteAdmin === null) { + goto after_siteAdmin; + } + + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryWebhooks\TemplateRepository\Permissions); + $result = []; + + $admin = $object->admin; + + if ($admin === null) { + goto after_admin; + } + + after_admin: $result['admin'] = $admin; + + $maintain = $object->maintain; + + if ($maintain === null) { + goto after_maintain; + } + + after_maintain: $result['maintain'] = $maintain; + + $push = $object->push; + + if ($push === null) { + goto after_push; + } + + after_push: $result['push'] = $push; + + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; + } + + after_triage: $result['triage'] = $triage; + + $pull = $object->pull; + + if ($pull === null) { + goto after_pull; + } + + after_pull: $result['pull'] = $pull; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest(mixed $object): mixed + { + assert($object instanceof ExemptionRequest); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $number = $object->number; + + if ($number === null) { + goto after_number; + } + + after_number: $result['number'] = $number; + + $repositoryId = $object->repositoryId; + + if ($repositoryId === null) { + goto after_repositoryId; + } + + after_repositoryId: $result['repository_id'] = $repositoryId; + + $requesterId = $object->requesterId; + + if ($requesterId === null) { + goto after_requesterId; + } + + after_requesterId: $result['requester_id'] = $requesterId; + + $requesterLogin = $object->requesterLogin; + + if ($requesterLogin === null) { + goto after_requesterLogin; + } + + after_requesterLogin: $result['requester_login'] = $requesterLogin; + + $requestType = $object->requestType; + + if ($requestType === null) { + goto after_requestType; + } + + after_requestType: $result['request_type'] = $requestType; + + $exemptionRequestData = $object->exemptionRequestData; + + if ($exemptionRequestData === null) { + goto after_exemptionRequestData; + } + + if (is_object($exemptionRequestData)) { + $exemptionRequestData = $this->serializeObject($exemptionRequestData); + } + + after_exemptionRequestData: $result['exemption_request_data'] = $exemptionRequestData; + + $resourceIdentifier = $object->resourceIdentifier; + + if ($resourceIdentifier === null) { + goto after_resourceIdentifier; + } + + after_resourceIdentifier: $result['resource_identifier'] = $resourceIdentifier; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + $requesterComment = $object->requesterComment; + + if ($requesterComment === null) { + goto after_requesterComment; + } + + after_requesterComment: $result['requester_comment'] = $requesterComment; + + $metadata = $object->metadata; + + if ($metadata === null) { + goto after_metadata; + } + + if (is_object($metadata)) { + $metadata = $this->serializeObject($metadata); + } + + after_metadata: $result['metadata'] = $metadata; + + $expiresAt = $object->expiresAt; + + if ($expiresAt === null) { + goto after_expiresAt; + } + + after_expiresAt: $result['expires_at'] = $expiresAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $responses = $object->responses; + + if ($responses === null) { + goto after_responses; + } + + static $responsesSerializer0; + + if ($responsesSerializer0 === null) { + $responsesSerializer0 = new SerializeArrayItems(...[]); + } + + $responses = $responsesSerializer0->serialize($responses, $this); + after_responses: $result['responses'] = $responses; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️WebhookExemptionRequestResponseSubmitted(mixed $object): mixed + { + assert($object instanceof WebhookExemptionRequestResponseSubmitted); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $enterprise = $object->enterprise; + + if ($enterprise === null) { + goto after_enterprise; + } + + $enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️EnterpriseWebhooks($enterprise); + after_enterprise: $result['enterprise'] = $enterprise; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; + + $exemptionRequest = $object->exemptionRequest; + $exemptionRequest = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionRequest($exemptionRequest); + after_exemptionRequest: $result['exemption_request'] = $exemptionRequest; + + $exemptionResponse = $object->exemptionResponse; + $exemptionResponse = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionResponse($exemptionResponse); + after_exemptionResponse: $result['exemption_response'] = $exemptionResponse; + + $sender = $object->sender; + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleUser($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ExemptionResponse(mixed $object): mixed + { + assert($object instanceof ExemptionResponse); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $reviewerId = $object->reviewerId; + + if ($reviewerId === null) { + goto after_reviewerId; + } + + after_reviewerId: $result['reviewer_id'] = $reviewerId; + + $reviewerLogin = $object->reviewerLogin; + + if ($reviewerLogin === null) { + goto after_reviewerLogin; + } + + after_reviewerLogin: $result['reviewer_login'] = $reviewerLogin; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + $reviewerComment = $object->reviewerComment; + + if ($reviewerComment === null) { + goto after_reviewerComment; + } + + after_reviewerComment: $result['reviewer_comment'] = $reviewerComment; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php index c0a2bf8ebb6..f815decd206 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php @@ -803,6 +803,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\WebHook\DeploymentStatus|null $webHook🪝DeploymentStatus = null; private Internal\Hydrator\WebHook\Discussion|null $webHook🪝Discussion = null; private Internal\Hydrator\WebHook\DiscussionComment|null $webHook🪝DiscussionComment = null; + private Internal\Hydrator\WebHook\DismissalRequestCodeScanning|null $webHook🪝DismissalRequestCodeScanning = null; private Internal\Hydrator\WebHook\DismissalRequestSecretScanning|null $webHook🪝DismissalRequestSecretScanning = null; private Internal\Hydrator\WebHook\Fork|null $webHook🪝Fork = null; private Internal\Hydrator\WebHook\GithubAppAuthorization|null $webHook🪝GithubAppAuthorization = null; @@ -8806,6 +8807,15 @@ public function getObjectMapperWebHook🪝DiscussionComment(): Internal\Hydrator return $this->webHook🪝DiscussionComment; } + public function getObjectMapperWebHook🪝DismissalRequestCodeScanning(): Internal\Hydrator\WebHook\DismissalRequestCodeScanning + { + if ($this->webHook🪝DismissalRequestCodeScanning instanceof Internal\Hydrator\WebHook\DismissalRequestCodeScanning === false) { + $this->webHook🪝DismissalRequestCodeScanning = new Internal\Hydrator\WebHook\DismissalRequestCodeScanning(); + } + + return $this->webHook🪝DismissalRequestCodeScanning; + } + public function getObjectMapperWebHook🪝DismissalRequestSecretScanning(): Internal\Hydrator\WebHook\DismissalRequestSecretScanning { if ($this->webHook🪝DismissalRequestSecretScanning instanceof Internal\Hydrator\WebHook\DismissalRequestSecretScanning === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequests.php index 37ab5dae235..f0c5141e476 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequests.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequests.php @@ -37,6 +37,8 @@ final class ListPatGrantRequests private string $lastUsedBefore; /**Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. **/ private string $lastUsedAfter; + /**The ID of the token **/ + private array $tokenId; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $perPage; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -46,7 +48,7 @@ final class ListPatGrantRequests /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokenRequests $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokenRequests $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') { $this->org = $org; $this->owner = $owner; @@ -54,6 +56,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali $this->permission = $permission; $this->lastUsedBefore = $lastUsedBefore; $this->lastUsedAfter = $lastUsedAfter; + $this->tokenId = $tokenId; $this->perPage = $perPage; $this->page = $page; $this->sort = $sort; @@ -62,7 +65,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-token-requests' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{token_id}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->tokenId, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-token-requests' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&token_id={token_id}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequestsListing.php index e669d48c2b7..efd78fa3188 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequestsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantRequestsListing.php @@ -37,6 +37,8 @@ final class ListPatGrantRequestsListing private string $lastUsedBefore; /**Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. **/ private string $lastUsedAfter; + /**The ID of the token **/ + private array $tokenId; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $perPage; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -46,7 +48,7 @@ final class ListPatGrantRequestsListing /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokenRequests $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokenRequests $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') { $this->org = $org; $this->owner = $owner; @@ -54,6 +56,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali $this->permission = $permission; $this->lastUsedBefore = $lastUsedBefore; $this->lastUsedAfter = $lastUsedAfter; + $this->tokenId = $tokenId; $this->perPage = $perPage; $this->page = $page; $this->sort = $sort; @@ -62,7 +65,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-token-requests' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{token_id}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->tokenId, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-token-requests' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&token_id={token_id}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrants.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrants.php index e97141a960d..c9f091c5e7f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrants.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrants.php @@ -37,6 +37,8 @@ final class ListPatGrants private string $lastUsedBefore; /**Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. **/ private string $lastUsedAfter; + /**The ID of the token **/ + private array $tokenId; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $perPage; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -46,7 +48,7 @@ final class ListPatGrants /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokens $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokens $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') { $this->org = $org; $this->owner = $owner; @@ -54,6 +56,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali $this->permission = $permission; $this->lastUsedBefore = $lastUsedBefore; $this->lastUsedAfter = $lastUsedAfter; + $this->tokenId = $tokenId; $this->perPage = $perPage; $this->page = $page; $this->sort = $sort; @@ -62,7 +65,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-tokens' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{token_id}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->tokenId, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-tokens' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&token_id={token_id}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantsListing.php index efccd49be23..19019da57b0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPatGrantsListing.php @@ -37,6 +37,8 @@ final class ListPatGrantsListing private string $lastUsedBefore; /**Only show fine-grained personal access tokens used after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. **/ private string $lastUsedAfter; + /**The ID of the token **/ + private array $tokenId; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $perPage; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -46,7 +48,7 @@ final class ListPatGrantsListing /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokens $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\PersonalAccessTokens $hydrator, string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc') { $this->org = $org; $this->owner = $owner; @@ -54,6 +56,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali $this->permission = $permission; $this->lastUsedBefore = $lastUsedBefore; $this->lastUsedAfter = $lastUsedAfter; + $this->tokenId = $tokenId; $this->perPage = $perPage; $this->page = $page; $this->sort = $sort; @@ -62,7 +65,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-tokens' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{owner}', '{repository}', '{permission}', '{last_used_before}', '{last_used_after}', '{token_id}', '{per_page}', '{page}', '{sort}', '{direction}'], [$this->org, $this->owner, $this->repository, $this->permission, $this->lastUsedBefore, $this->lastUsedAfter, $this->tokenId, $this->perPage, $this->page, $this->sort, $this->direction], '/orgs/{org}/personal-access-tokens' . '?owner={owner}&repository={repository}&permission={permission}&last_used_before={last_used_before}&last_used_after={last_used_after}&token_id={token_id}&per_page={per_page}&page={page}&sort={sort}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/UpdateAlert.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/UpdateAlert.php index 734ae5c7c81..8072098ac41 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/UpdateAlert.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/UpdateAlert.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $owner, string $repo, int $alertNumber, array $params): CodeScanningAlert { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeScanning\UpdateAlert($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo, $alertNumber); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequests.php index 5da198357a1..0dd7aa238e1 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequests.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequests.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrantRequests($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrantRequests($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequestsListing.php index bcf60c60ccd..9b8ede8e6f8 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequestsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantRequestsListing.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrantRequestsListing($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrantRequestsListing($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrants.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrants.php index 6580c5ce655..cb2d794854d 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrants.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrants.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrants($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrants($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantsListing.php index 81f03de49aa..c313ef6d90b 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantsListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPatGrantsListing.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage = 30, int $page = 1, string $sort = 'created_at', string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrantsListing($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPatGrantsListing($this->responseSchemaValidator, $this->hydrator, $org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php index f2bc53d0af0..c0e72b972b0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $enterprise, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $perPage = 30, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php index 96fb0bcfd15..fd5ccdfa547 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForOrg($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php index 84d5caba325..414583357bd 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForOrgListing($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php index fb48c9c4c32..eeaf4409cb0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php index 184219dca50..a4a217ea1c6 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30, bool $isPubliclyLeaked = false, bool $isMultiRepo = false): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecretScanning\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php index 98c0cdb8a6a..7b9584ff7b0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php @@ -59,7 +59,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|iterable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|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 */ public function call(string $call, array $params, array $pathChunks): HookDelivery|Ok|ActionsEnterprisePermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnerGroupsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|AuditLogStreamKey|iterable|WithoutBody|NetworkConfiguration|NetworkSettings|RepositoryRuleset|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|Json|ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|ExternalGroup|OrgHook|OrgMembership|Migration|OrganizationRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\HostedCompute\ListNetworkConfigurationsForOrg\Response\ApplicationJson\Ok\Application\Json|GroupMapping|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php index e324625257a..6a69c463293 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Four.php @@ -38,7 +38,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|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|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|iterable|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): WebhookConfig|iterable|Installation|AnnouncementBanner|EnterpriseSecurityAnalysisSettings|string|Ok|WithoutBody|GistSimple|GitignoreTemplate|MarketplacePurchase|Thread|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|Json|ExternalGroups|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|InteractionLimitResponse|One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|ProjectColumn|FullRepository|BasicError|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|Codespace|GpgKey|Key|Migration|SshSigningKey|Hovercard|StarredRepository|Repository { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php index 432ab983219..f60232a82c9 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php @@ -466,7 +466,7 @@ public function listOutsideCollaborators(array $params): iterable return $operator->call($arguments['org'], $arguments['filter'], $arguments['per_page'], $arguments['page']); } - /** @return Observable */ + /** @return iterable */ public function listPatGrantRequests(array $params): iterable { $arguments = []; @@ -506,6 +506,12 @@ public function listPatGrantRequests(array $params): iterable $arguments['last_used_after'] = $params['last_used_after']; unset($params['last_used_after']); + if (array_key_exists('token_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: token_id'); + } + + $arguments['token_id'] = $params['token_id']; + unset($params['token_id']); if (array_key_exists('per_page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: per_page'); } @@ -532,10 +538,10 @@ public function listPatGrantRequests(array $params): iterable unset($params['direction']); $operator = new Internal\Operator\Orgs\ListPatGrantRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokenRequests()); - return $operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction']); + return $operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['token_id'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction']); } - /** @return Observable */ + /** @return iterable */ public function listPatGrants(array $params): iterable { $arguments = []; @@ -575,6 +581,12 @@ public function listPatGrants(array $params): iterable $arguments['last_used_after'] = $params['last_used_after']; unset($params['last_used_after']); + if (array_key_exists('token_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: token_id'); + } + + $arguments['token_id'] = $params['token_id']; + unset($params['token_id']); if (array_key_exists('per_page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: per_page'); } @@ -601,7 +613,7 @@ public function listPatGrants(array $params): iterable unset($params['direction']); $operator = new Internal\Operator\Orgs\ListPatGrants($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokens()); - return $operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction']); + return $operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['token_id'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction']); } /** @return Observable */ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php index 93f1698ba89..bd958f992aa 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecretScanning.php @@ -39,7 +39,7 @@ public function getSecurityAnalysisSettingsForEnterprise(array $params): Enterpr return $operator->call($arguments['enterprise']); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForEnterprise(array $params): iterable { $arguments = []; @@ -177,7 +177,7 @@ public function listOrgBypassRequests(array $params): iterable return $operator->call($arguments['org'], $arguments['repository_name'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page']); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForOrg(array $params): iterable { $arguments = []; @@ -321,7 +321,7 @@ public function listRepoBypassRequests(array $params): iterable return $operator->call($arguments['owner'], $arguments['repo'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page']); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php index 2eb918da784..2927bbc5ccc 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php @@ -90,7 +90,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|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|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): ActionsCacheUsageOrgEnterprise|ActionsHostedRunnerLimits|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetHostedRunnersPlatformsForEnterprise\Response\ApplicationJson\Ok|ActionsHostedRunner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelectedOrganizationsEnabledGithubActionsEnterprise\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|GetAuditLogStreamConfig|CodeSecurityConfiguration|WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|CustomProperty|ActionsBillingUsage|AdvancedSecurityActiveCommitters|GetAllCostCenters|PackagesBillingUsage|CombinedBillingUsage|BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|RunnerGroupsOrg|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|CopilotSeatDetails|Package|RuleSuite|NetworkConfiguration|NetworkSettings|ExternalGroups|ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|ScimEnterpriseGroupList|ScimEnterpriseUserList|ScimUserList|TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php index 0e2e4740882..153516eac9c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php index a3a50dea675..680b398974e 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Four.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php index 13b0b6b5df1..5748f565792 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php @@ -315,7 +315,7 @@ public function listOutsideCollaboratorsListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable */ + /** @return iterable */ public function listPatGrantRequestsListing(array $params): iterable { $arguments = []; @@ -355,6 +355,12 @@ public function listPatGrantRequestsListing(array $params): iterable $arguments['last_used_after'] = $params['last_used_after']; unset($params['last_used_after']); + if (array_key_exists('token_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: token_id'); + } + + $arguments['token_id'] = $params['token_id']; + unset($params['token_id']); if (array_key_exists('per_page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: per_page'); } @@ -382,7 +388,7 @@ public function listPatGrantRequestsListing(array $params): iterable $arguments['page'] = 1; do { $operator = new Internal\Operator\Orgs\ListPatGrantRequestsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokenRequests()); - $items = [...$operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction'])]; + $items = [...$operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['token_id'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction'])]; yield from $items; @@ -390,7 +396,7 @@ public function listPatGrantRequestsListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable */ + /** @return iterable */ public function listPatGrantsListing(array $params): iterable { $arguments = []; @@ -430,6 +436,12 @@ public function listPatGrantsListing(array $params): iterable $arguments['last_used_after'] = $params['last_used_after']; unset($params['last_used_after']); + if (array_key_exists('token_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: token_id'); + } + + $arguments['token_id'] = $params['token_id']; + unset($params['token_id']); if (array_key_exists('per_page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: per_page'); } @@ -457,7 +469,7 @@ public function listPatGrantsListing(array $params): iterable $arguments['page'] = 1; do { $operator = new Internal\Operator\Orgs\ListPatGrantsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀PersonalAccessTokens()); - $items = [...$operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction'])]; + $items = [...$operator->call($arguments['org'], $arguments['owner'], $arguments['repository'], $arguments['permission'], $arguments['last_used_before'], $arguments['last_used_after'], $arguments['token_id'], $arguments['per_page'], $arguments['page'], $arguments['sort'], $arguments['direction'])]; yield from $items; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php index 0fe7de74f9c..c59551e3578 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/SecretScanning.php @@ -84,7 +84,7 @@ public function listOrgBypassRequestsListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForOrgListing(array $params): iterable { $arguments = []; @@ -240,7 +240,7 @@ public function listRepoBypassRequestsListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepoListing(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php index d80ccf600b1..1da20bd9fe4 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|WithoutBody|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|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|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeScanning.php index 9ef47ea7e70..ffcdf2c55ef 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeScanning.php @@ -42,6 +42,7 @@ public function updateDefaultSetup(array $params): EmptyObject|CodeScanningDefau return $operator->call($arguments['owner'], $arguments['repo'], $params); } + /** @return */ public function updateAlert(array $params): CodeScanningAlert { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Seven.php index afa4c2b7640..ec5b6625f56 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Seven.php @@ -30,7 +30,6 @@ public function __construct(private Routers $routers) { } - /** @return |Schema\CodeScanningAlert */ public function call(string $call, array $params, array $pathChunks): TeamDiscussion|GroupMapping|WithoutBody|Ok|CodeScanningAlert|DependabotAlert|GitRef|WebhookConfig|PorterAuthor|IssueComment|PullRequestReviewComment|ReleaseAsset|SecretScanningAlert|GroupResponse|UserResponse|ScimUser|TeamDiscussionComment { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/WebHook/DismissalRequestCodeScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/WebHook/DismissalRequestCodeScanning.php new file mode 100644 index 00000000000..118b910bc66 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/WebHook/DismissalRequestCodeScanning.php @@ -0,0 +1,63 @@ +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\WebhookExemptionRequestCreated::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookExemptionRequestCreated::class, $data); + } catch (Throwable) { + goto actions_aaaaa; + } + } + + actions_aaaaa: + if ($headers['content-type'] === 'application/json') { + try { + $this->requestSchemaValidator->validate($headers['user-agent'], Reader::readFromJson(Schema\WebHookHeader\UserAgent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-event'], Reader::readFromJson(Schema\WebHookHeader\XGithubEvent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-type'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetType::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-delivery'], Reader::readFromJson(Schema\WebHookHeader\XGitHubDelivery::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-hub-signature-256'], Reader::readFromJson(Schema\WebHookHeader\XHubSignature::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookExemptionRequestResponseSubmitted::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookExemptionRequestResponseSubmitted::class, $data); + } catch (Throwable) { + goto actions_aaaab; + } + } + + actions_aaaab: + throw $error; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php index 193e202ca32..3b054fdf324 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php @@ -69,6 +69,7 @@ public function getAlert(string $owner, string $repo, int $alertNumber): CodeSca return $this->operators->codeScanning👷GetAlert()->call($owner, $repo, $alertNumber); } + /** @return */ public function updateAlert(string $owner, string $repo, int $alertNumber, array $params): CodeScanningAlert { return $this->operators->codeScanning👷UpdateAlert()->call($owner, $repo, $alertNumber, $params); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php index 88d829e350d..e678db23b2d 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php @@ -476,16 +476,16 @@ public function removeOutsideCollaborator(string $org, string $username): Withou return $this->operators->orgs👷RemoveOutsideCollaborator()->call($org, $username); } - /** @return Observable */ - public function listPatGrantRequests(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage, int $page, string $sort, string $direction): iterable + /** @return iterable */ + public function listPatGrantRequests(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage, int $page, string $sort, string $direction): iterable { - return $this->operators->orgs👷ListPatGrantRequests()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + return $this->operators->orgs👷ListPatGrantRequests()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); } - /** @return Observable */ - public function listPatGrantRequestsListing(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage, int $page, string $sort, string $direction): iterable + /** @return iterable */ + public function listPatGrantRequestsListing(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage, int $page, string $sort, string $direction): iterable { - return $this->operators->orgs👷ListPatGrantRequestsListing()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + return $this->operators->orgs👷ListPatGrantRequestsListing()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); } /** @return */ @@ -512,16 +512,16 @@ public function listPatGrantRequestRepositoriesListing(string $org, int $patRequ return $this->operators->orgs👷ListPatGrantRequestRepositoriesListing()->call($org, $patRequestId, $perPage, $page); } - /** @return Observable */ - public function listPatGrants(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage, int $page, string $sort, string $direction): iterable + /** @return iterable */ + public function listPatGrants(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage, int $page, string $sort, string $direction): iterable { - return $this->operators->orgs👷ListPatGrants()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + return $this->operators->orgs👷ListPatGrants()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); } - /** @return Observable */ - public function listPatGrantsListing(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, int $perPage, int $page, string $sort, string $direction): iterable + /** @return iterable */ + public function listPatGrantsListing(string $org, array $owner, string $repository, string $permission, string $lastUsedBefore, string $lastUsedAfter, array $tokenId, int $perPage, int $page, string $sort, string $direction): iterable { - return $this->operators->orgs👷ListPatGrantsListing()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $perPage, $page, $sort, $direction); + return $this->operators->orgs👷ListPatGrantsListing()->call($org, $owner, $repository, $permission, $lastUsedBefore, $lastUsedAfter, $tokenId, $perPage, $page, $sort, $direction); } /** @return */ diff --git a/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php b/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php index 1ae8e9a4592..f733e7e900e 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/SecretScanning.php @@ -32,7 +32,7 @@ public function patchSecurityAnalysisSettingsForEnterprise(string $enterprise, a return $this->operators->secretScanning👷PatchSecurityAnalysisSettingsForEnterprise()->call($enterprise, $params); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForEnterprise(string $enterprise, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $perPage, bool $isPubliclyLeaked, bool $isMultiRepo): iterable { return $this->operators->secretScanning👷ListAlertsForEnterprise()->call($enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage, $isPubliclyLeaked, $isMultiRepo); @@ -56,13 +56,13 @@ public function listOrgBypassRequestsListing(string $org, string $repositoryName return $this->operators->secretScanning👷ListOrgBypassRequestsListing()->call($org, $repositoryName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); } - /** @return iterable */ + /** @return Observable */ public function listAlertsForOrg(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage, 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 iterable */ + /** @return Observable */ public function listAlertsForOrgListing(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage, bool $isPubliclyLeaked, bool $isMultiRepo): iterable { return $this->operators->secretScanning👷ListAlertsForOrgListing()->call($org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); @@ -98,13 +98,13 @@ public function dismissBypassResponse(string $owner, string $repo, int $bypassRe return $this->operators->secretScanning👷DismissBypassResponse()->call($owner, $repo, $bypassResponseId); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage, 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 iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepoListing(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage, bool $isPubliclyLeaked, bool $isMultiRepo): iterable|WithoutBody { return $this->operators->secretScanning👷ListAlertsForRepoListing()->call($owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage, $isPubliclyLeaked, $isMultiRepo); diff --git a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php index 10907ad00cf..bdda8a0b7fd 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -596,7 +596,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /enterprises/{enterprise}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /enterprises/{enterprise}/settings/billing/actions') { @@ -1864,11 +1864,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/personal-access-token-requests') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/personal-access-token-requests') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'POST /orgs/{org}/personal-access-token-requests') { @@ -1888,11 +1888,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/personal-access-tokens') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/personal-access-tokens') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'POST /orgs/{org}/personal-access-tokens') { @@ -2064,11 +2064,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /orgs/{org}/security-advisories') { @@ -3048,7 +3048,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}') { - return $this->typeResolver->resolve('Schema\\CodeScanningAlert'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix') { @@ -4364,11 +4364,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'LIST /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}') { diff --git a/clients/GitHubEnterpriseCloud/src/Schema/DismissalRequestCodeScanning.php b/clients/GitHubEnterpriseCloud/src/Schema/DismissalRequestCodeScanning.php new file mode 100644 index 00000000000..aa9ed42b6f4 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Schema/DismissalRequestCodeScanning.php @@ -0,0 +1,57 @@ +dismissalRequestCodeScanning instanceof Internal\WebHook\DismissalRequestCodeScanning === false) { + $this->dismissalRequestCodeScanning = new Internal\WebHook\DismissalRequestCodeScanning($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝DismissalRequestCodeScanning()); + } + + return $this->dismissalRequestCodeScanning->resolve($headers, $data); + } catch (Throwable $error) { + goto webhooks_aaaau; + } + + webhooks_aaaau: try { if ($this->dismissalRequestSecretScanning instanceof Internal\WebHook\DismissalRequestSecretScanning === false) { $this->dismissalRequestSecretScanning = new Internal\WebHook\DismissalRequestSecretScanning($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝DismissalRequestSecretScanning()); @@ -352,10 +364,10 @@ public function resolve(array $headers, array $data): object return $this->dismissalRequestSecretScanning->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaau; + goto webhooks_aaaav; } - webhooks_aaaau: + webhooks_aaaav: try { if ($this->fork instanceof Internal\WebHook\Fork === false) { $this->fork = new Internal\WebHook\Fork($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Fork()); @@ -363,10 +375,10 @@ public function resolve(array $headers, array $data): object return $this->fork->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaav; + goto webhooks_aaaaw; } - webhooks_aaaav: + webhooks_aaaaw: try { if ($this->githubAppAuthorization instanceof Internal\WebHook\GithubAppAuthorization === false) { $this->githubAppAuthorization = new Internal\WebHook\GithubAppAuthorization($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝GithubAppAuthorization()); @@ -374,10 +386,10 @@ public function resolve(array $headers, array $data): object return $this->githubAppAuthorization->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaaw; + goto webhooks_aaaax; } - webhooks_aaaaw: + webhooks_aaaax: try { if ($this->gollum instanceof Internal\WebHook\Gollum === false) { $this->gollum = new Internal\WebHook\Gollum($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Gollum()); @@ -385,10 +397,10 @@ public function resolve(array $headers, array $data): object return $this->gollum->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaax; + goto webhooks_aaaay; } - webhooks_aaaax: + webhooks_aaaay: try { if ($this->installation instanceof Internal\WebHook\Installation === false) { $this->installation = new Internal\WebHook\Installation($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Installation()); @@ -396,10 +408,10 @@ public function resolve(array $headers, array $data): object return $this->installation->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaay; + goto webhooks_aaaaz; } - webhooks_aaaay: + webhooks_aaaaz: try { if ($this->installationRepositories instanceof Internal\WebHook\InstallationRepositories === false) { $this->installationRepositories = new Internal\WebHook\InstallationRepositories($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝InstallationRepositories()); @@ -407,10 +419,10 @@ public function resolve(array $headers, array $data): object return $this->installationRepositories->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaaz; + goto webhooks_aaaba; } - webhooks_aaaaz: + webhooks_aaaba: try { if ($this->installationTarget instanceof Internal\WebHook\InstallationTarget === false) { $this->installationTarget = new Internal\WebHook\InstallationTarget($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝InstallationTarget()); @@ -418,10 +430,10 @@ public function resolve(array $headers, array $data): object return $this->installationTarget->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaba; + goto webhooks_aaabb; } - webhooks_aaaba: + webhooks_aaabb: try { if ($this->issueComment instanceof Internal\WebHook\IssueComment === false) { $this->issueComment = new Internal\WebHook\IssueComment($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝IssueComment()); @@ -429,10 +441,10 @@ public function resolve(array $headers, array $data): object return $this->issueComment->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabb; + goto webhooks_aaabc; } - webhooks_aaabb: + webhooks_aaabc: try { if ($this->issues instanceof Internal\WebHook\Issues === false) { $this->issues = new Internal\WebHook\Issues($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Issues()); @@ -440,10 +452,10 @@ public function resolve(array $headers, array $data): object return $this->issues->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabc; + goto webhooks_aaabd; } - webhooks_aaabc: + webhooks_aaabd: try { if ($this->label instanceof Internal\WebHook\Label === false) { $this->label = new Internal\WebHook\Label($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Label()); @@ -451,10 +463,10 @@ public function resolve(array $headers, array $data): object return $this->label->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabd; + goto webhooks_aaabe; } - webhooks_aaabd: + webhooks_aaabe: try { if ($this->marketplacePurchase instanceof Internal\WebHook\MarketplacePurchase === false) { $this->marketplacePurchase = new Internal\WebHook\MarketplacePurchase($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝MarketplacePurchase()); @@ -462,10 +474,10 @@ public function resolve(array $headers, array $data): object return $this->marketplacePurchase->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabe; + goto webhooks_aaabf; } - webhooks_aaabe: + webhooks_aaabf: try { if ($this->member instanceof Internal\WebHook\Member === false) { $this->member = new Internal\WebHook\Member($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Member()); @@ -473,10 +485,10 @@ public function resolve(array $headers, array $data): object return $this->member->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabf; + goto webhooks_aaabg; } - webhooks_aaabf: + webhooks_aaabg: try { if ($this->membership instanceof Internal\WebHook\Membership === false) { $this->membership = new Internal\WebHook\Membership($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Membership()); @@ -484,10 +496,10 @@ public function resolve(array $headers, array $data): object return $this->membership->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabg; + goto webhooks_aaabh; } - webhooks_aaabg: + webhooks_aaabh: try { if ($this->mergeGroup instanceof Internal\WebHook\MergeGroup === false) { $this->mergeGroup = new Internal\WebHook\MergeGroup($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝MergeGroup()); @@ -495,10 +507,10 @@ public function resolve(array $headers, array $data): object return $this->mergeGroup->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabh; + goto webhooks_aaabi; } - webhooks_aaabh: + webhooks_aaabi: try { if ($this->meta instanceof Internal\WebHook\Meta === false) { $this->meta = new Internal\WebHook\Meta($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Meta()); @@ -506,10 +518,10 @@ public function resolve(array $headers, array $data): object return $this->meta->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabi; + goto webhooks_aaabj; } - webhooks_aaabi: + webhooks_aaabj: try { if ($this->milestone instanceof Internal\WebHook\Milestone === false) { $this->milestone = new Internal\WebHook\Milestone($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Milestone()); @@ -517,10 +529,10 @@ public function resolve(array $headers, array $data): object return $this->milestone->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabj; + goto webhooks_aaabk; } - webhooks_aaabj: + webhooks_aaabk: try { if ($this->orgBlock instanceof Internal\WebHook\OrgBlock === false) { $this->orgBlock = new Internal\WebHook\OrgBlock($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝OrgBlock()); @@ -528,10 +540,10 @@ public function resolve(array $headers, array $data): object return $this->orgBlock->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabk; + goto webhooks_aaabl; } - webhooks_aaabk: + webhooks_aaabl: try { if ($this->organization instanceof Internal\WebHook\Organization === false) { $this->organization = new Internal\WebHook\Organization($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Organization()); @@ -539,10 +551,10 @@ public function resolve(array $headers, array $data): object return $this->organization->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabl; + goto webhooks_aaabm; } - webhooks_aaabl: + webhooks_aaabm: try { if ($this->package instanceof Internal\WebHook\Package === false) { $this->package = new Internal\WebHook\Package($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Package()); @@ -550,10 +562,10 @@ public function resolve(array $headers, array $data): object return $this->package->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabm; + goto webhooks_aaabn; } - webhooks_aaabm: + webhooks_aaabn: try { if ($this->pageBuild instanceof Internal\WebHook\PageBuild === false) { $this->pageBuild = new Internal\WebHook\PageBuild($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝PageBuild()); @@ -561,10 +573,10 @@ public function resolve(array $headers, array $data): object return $this->pageBuild->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabn; + goto webhooks_aaabo; } - webhooks_aaabn: + webhooks_aaabo: try { if ($this->personalAccessTokenRequest instanceof Internal\WebHook\PersonalAccessTokenRequest === false) { $this->personalAccessTokenRequest = new Internal\WebHook\PersonalAccessTokenRequest($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝PersonalAccessTokenRequest()); @@ -572,10 +584,10 @@ public function resolve(array $headers, array $data): object return $this->personalAccessTokenRequest->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabo; + goto webhooks_aaabp; } - webhooks_aaabo: + webhooks_aaabp: try { if ($this->ping instanceof Internal\WebHook\Ping === false) { $this->ping = new Internal\WebHook\Ping($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Ping()); @@ -583,10 +595,10 @@ public function resolve(array $headers, array $data): object return $this->ping->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabp; + goto webhooks_aaabq; } - webhooks_aaabp: + webhooks_aaabq: try { if ($this->projectCard instanceof Internal\WebHook\ProjectCard === false) { $this->projectCard = new Internal\WebHook\ProjectCard($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝ProjectCard()); @@ -594,10 +606,10 @@ public function resolve(array $headers, array $data): object return $this->projectCard->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabq; + goto webhooks_aaabr; } - webhooks_aaabq: + webhooks_aaabr: try { if ($this->project instanceof Internal\WebHook\Project === false) { $this->project = new Internal\WebHook\Project($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Project()); @@ -605,10 +617,10 @@ public function resolve(array $headers, array $data): object return $this->project->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabr; + goto webhooks_aaabs; } - webhooks_aaabr: + webhooks_aaabs: try { if ($this->projectColumn instanceof Internal\WebHook\ProjectColumn === false) { $this->projectColumn = new Internal\WebHook\ProjectColumn($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝ProjectColumn()); @@ -616,10 +628,10 @@ public function resolve(array $headers, array $data): object return $this->projectColumn->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabs; + goto webhooks_aaabt; } - webhooks_aaabs: + webhooks_aaabt: try { if ($this->projectsV2 instanceof Internal\WebHook\ProjectsV2 === false) { $this->projectsV2 = new Internal\WebHook\ProjectsV2($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝ProjectsV2()); @@ -627,10 +639,10 @@ public function resolve(array $headers, array $data): object return $this->projectsV2->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabt; + goto webhooks_aaabu; } - webhooks_aaabt: + webhooks_aaabu: try { if ($this->projectsV2Item instanceof Internal\WebHook\ProjectsV2Item === false) { $this->projectsV2Item = new Internal\WebHook\ProjectsV2Item($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝ProjectsV2Item()); @@ -638,10 +650,10 @@ public function resolve(array $headers, array $data): object return $this->projectsV2Item->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabu; + goto webhooks_aaabv; } - webhooks_aaabu: + webhooks_aaabv: try { if ($this->projectsV2StatusUpdate instanceof Internal\WebHook\ProjectsV2StatusUpdate === false) { $this->projectsV2StatusUpdate = new Internal\WebHook\ProjectsV2StatusUpdate($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝ProjectsV2StatusUpdate()); @@ -649,10 +661,10 @@ public function resolve(array $headers, array $data): object return $this->projectsV2StatusUpdate->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabv; + goto webhooks_aaabw; } - webhooks_aaabv: + webhooks_aaabw: try { if ($this->public instanceof Internal\WebHook\Public_ === false) { $this->public = new Internal\WebHook\Public_($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Public_()); @@ -660,10 +672,10 @@ public function resolve(array $headers, array $data): object return $this->public->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabw; + goto webhooks_aaabx; } - webhooks_aaabw: + webhooks_aaabx: try { if ($this->pullRequest instanceof Internal\WebHook\PullRequest === false) { $this->pullRequest = new Internal\WebHook\PullRequest($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝PullRequest()); @@ -671,10 +683,10 @@ public function resolve(array $headers, array $data): object return $this->pullRequest->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabx; + goto webhooks_aaaby; } - webhooks_aaabx: + webhooks_aaaby: try { if ($this->pullRequestReviewComment instanceof Internal\WebHook\PullRequestReviewComment === false) { $this->pullRequestReviewComment = new Internal\WebHook\PullRequestReviewComment($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝PullRequestReviewComment()); @@ -682,10 +694,10 @@ public function resolve(array $headers, array $data): object return $this->pullRequestReviewComment->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaby; + goto webhooks_aaabz; } - webhooks_aaaby: + webhooks_aaabz: try { if ($this->pullRequestReview instanceof Internal\WebHook\PullRequestReview === false) { $this->pullRequestReview = new Internal\WebHook\PullRequestReview($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝PullRequestReview()); @@ -693,10 +705,10 @@ public function resolve(array $headers, array $data): object return $this->pullRequestReview->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaabz; + goto webhooks_aaaca; } - webhooks_aaabz: + webhooks_aaaca: try { if ($this->pullRequestReviewThread instanceof Internal\WebHook\PullRequestReviewThread === false) { $this->pullRequestReviewThread = new Internal\WebHook\PullRequestReviewThread($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝PullRequestReviewThread()); @@ -704,10 +716,10 @@ public function resolve(array $headers, array $data): object return $this->pullRequestReviewThread->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaca; + goto webhooks_aaacb; } - webhooks_aaaca: + webhooks_aaacb: try { if ($this->push instanceof Internal\WebHook\Push === false) { $this->push = new Internal\WebHook\Push($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Push()); @@ -715,10 +727,10 @@ public function resolve(array $headers, array $data): object return $this->push->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacb; + goto webhooks_aaacc; } - webhooks_aaacb: + webhooks_aaacc: try { if ($this->registryPackage instanceof Internal\WebHook\RegistryPackage === false) { $this->registryPackage = new Internal\WebHook\RegistryPackage($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝RegistryPackage()); @@ -726,10 +738,10 @@ public function resolve(array $headers, array $data): object return $this->registryPackage->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacc; + goto webhooks_aaacd; } - webhooks_aaacc: + webhooks_aaacd: try { if ($this->release instanceof Internal\WebHook\Release === false) { $this->release = new Internal\WebHook\Release($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Release()); @@ -737,10 +749,10 @@ public function resolve(array $headers, array $data): object return $this->release->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacd; + goto webhooks_aaace; } - webhooks_aaacd: + webhooks_aaace: try { if ($this->repositoryAdvisory instanceof Internal\WebHook\RepositoryAdvisory === false) { $this->repositoryAdvisory = new Internal\WebHook\RepositoryAdvisory($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝RepositoryAdvisory()); @@ -748,10 +760,10 @@ public function resolve(array $headers, array $data): object return $this->repositoryAdvisory->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaace; + goto webhooks_aaacf; } - webhooks_aaace: + webhooks_aaacf: try { if ($this->repository instanceof Internal\WebHook\Repository === false) { $this->repository = new Internal\WebHook\Repository($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Repository()); @@ -759,10 +771,10 @@ public function resolve(array $headers, array $data): object return $this->repository->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacf; + goto webhooks_aaacg; } - webhooks_aaacf: + webhooks_aaacg: try { if ($this->repositoryDispatch instanceof Internal\WebHook\RepositoryDispatch === false) { $this->repositoryDispatch = new Internal\WebHook\RepositoryDispatch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝RepositoryDispatch()); @@ -770,10 +782,10 @@ public function resolve(array $headers, array $data): object return $this->repositoryDispatch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacg; + goto webhooks_aaach; } - webhooks_aaacg: + webhooks_aaach: try { if ($this->repositoryImport instanceof Internal\WebHook\RepositoryImport === false) { $this->repositoryImport = new Internal\WebHook\RepositoryImport($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝RepositoryImport()); @@ -781,10 +793,10 @@ public function resolve(array $headers, array $data): object return $this->repositoryImport->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaach; + goto webhooks_aaaci; } - webhooks_aaach: + webhooks_aaaci: try { if ($this->repositoryRuleset instanceof Internal\WebHook\RepositoryRuleset === false) { $this->repositoryRuleset = new Internal\WebHook\RepositoryRuleset($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝RepositoryRuleset()); @@ -792,10 +804,10 @@ public function resolve(array $headers, array $data): object return $this->repositoryRuleset->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaci; + goto webhooks_aaacj; } - webhooks_aaaci: + webhooks_aaacj: try { if ($this->repositoryVulnerabilityAlert instanceof Internal\WebHook\RepositoryVulnerabilityAlert === false) { $this->repositoryVulnerabilityAlert = new Internal\WebHook\RepositoryVulnerabilityAlert($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝RepositoryVulnerabilityAlert()); @@ -803,10 +815,10 @@ public function resolve(array $headers, array $data): object return $this->repositoryVulnerabilityAlert->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacj; + goto webhooks_aaack; } - webhooks_aaacj: + webhooks_aaack: try { if ($this->secretScanningAlert instanceof Internal\WebHook\SecretScanningAlert === false) { $this->secretScanningAlert = new Internal\WebHook\SecretScanningAlert($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecretScanningAlert()); @@ -814,10 +826,10 @@ public function resolve(array $headers, array $data): object return $this->secretScanningAlert->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaack; + goto webhooks_aaacl; } - webhooks_aaack: + webhooks_aaacl: try { if ($this->secretScanningAlertLocation instanceof Internal\WebHook\SecretScanningAlertLocation === false) { $this->secretScanningAlertLocation = new Internal\WebHook\SecretScanningAlertLocation($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecretScanningAlertLocation()); @@ -825,10 +837,10 @@ public function resolve(array $headers, array $data): object return $this->secretScanningAlertLocation->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacl; + goto webhooks_aaacm; } - webhooks_aaacl: + webhooks_aaacm: try { if ($this->secretScanningScan instanceof Internal\WebHook\SecretScanningScan === false) { $this->secretScanningScan = new Internal\WebHook\SecretScanningScan($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecretScanningScan()); @@ -836,10 +848,10 @@ public function resolve(array $headers, array $data): object return $this->secretScanningScan->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacm; + goto webhooks_aaacn; } - webhooks_aaacm: + webhooks_aaacn: try { if ($this->securityAdvisory instanceof Internal\WebHook\SecurityAdvisory === false) { $this->securityAdvisory = new Internal\WebHook\SecurityAdvisory($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecurityAdvisory()); @@ -847,10 +859,10 @@ public function resolve(array $headers, array $data): object return $this->securityAdvisory->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacn; + goto webhooks_aaaco; } - webhooks_aaacn: + webhooks_aaaco: try { if ($this->securityAndAnalysis instanceof Internal\WebHook\SecurityAndAnalysis === false) { $this->securityAndAnalysis = new Internal\WebHook\SecurityAndAnalysis($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SecurityAndAnalysis()); @@ -858,10 +870,10 @@ public function resolve(array $headers, array $data): object return $this->securityAndAnalysis->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaaco; + goto webhooks_aaacp; } - webhooks_aaaco: + webhooks_aaacp: try { if ($this->sponsorship instanceof Internal\WebHook\Sponsorship === false) { $this->sponsorship = new Internal\WebHook\Sponsorship($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Sponsorship()); @@ -869,10 +881,10 @@ public function resolve(array $headers, array $data): object return $this->sponsorship->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacp; + goto webhooks_aaacq; } - webhooks_aaacp: + webhooks_aaacq: try { if ($this->star instanceof Internal\WebHook\Star === false) { $this->star = new Internal\WebHook\Star($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Star()); @@ -880,10 +892,10 @@ public function resolve(array $headers, array $data): object return $this->star->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacq; + goto webhooks_aaacr; } - webhooks_aaacq: + webhooks_aaacr: try { if ($this->status instanceof Internal\WebHook\Status === false) { $this->status = new Internal\WebHook\Status($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Status()); @@ -891,10 +903,10 @@ public function resolve(array $headers, array $data): object return $this->status->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacr; + goto webhooks_aaacs; } - webhooks_aaacr: + webhooks_aaacs: try { if ($this->subIssues instanceof Internal\WebHook\SubIssues === false) { $this->subIssues = new Internal\WebHook\SubIssues($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝SubIssues()); @@ -902,10 +914,10 @@ public function resolve(array $headers, array $data): object return $this->subIssues->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacs; + goto webhooks_aaact; } - webhooks_aaacs: + webhooks_aaact: try { if ($this->teamAdd instanceof Internal\WebHook\TeamAdd === false) { $this->teamAdd = new Internal\WebHook\TeamAdd($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝TeamAdd()); @@ -913,10 +925,10 @@ public function resolve(array $headers, array $data): object return $this->teamAdd->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaact; + goto webhooks_aaacu; } - webhooks_aaact: + webhooks_aaacu: try { if ($this->team instanceof Internal\WebHook\Team === false) { $this->team = new Internal\WebHook\Team($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Team()); @@ -924,10 +936,10 @@ public function resolve(array $headers, array $data): object return $this->team->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacu; + goto webhooks_aaacv; } - webhooks_aaacu: + webhooks_aaacv: try { if ($this->watch instanceof Internal\WebHook\Watch === false) { $this->watch = new Internal\WebHook\Watch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝Watch()); @@ -935,10 +947,10 @@ public function resolve(array $headers, array $data): object return $this->watch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacv; + goto webhooks_aaacw; } - webhooks_aaacv: + webhooks_aaacw: try { if ($this->workflowDispatch instanceof Internal\WebHook\WorkflowDispatch === false) { $this->workflowDispatch = new Internal\WebHook\WorkflowDispatch($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowDispatch()); @@ -946,10 +958,10 @@ public function resolve(array $headers, array $data): object return $this->workflowDispatch->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacw; + goto webhooks_aaacx; } - webhooks_aaacw: + webhooks_aaacx: try { if ($this->workflowJob instanceof Internal\WebHook\WorkflowJob === false) { $this->workflowJob = new Internal\WebHook\WorkflowJob($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowJob()); @@ -957,10 +969,10 @@ public function resolve(array $headers, array $data): object return $this->workflowJob->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacx; + goto webhooks_aaacy; } - webhooks_aaacx: + webhooks_aaacy: try { if ($this->workflowRun instanceof Internal\WebHook\WorkflowRun === false) { $this->workflowRun = new Internal\WebHook\WorkflowRun($this->requestSchemaValidator, $this->hydrator->getObjectMapperWebHook🪝WorkflowRun()); @@ -968,10 +980,10 @@ public function resolve(array $headers, array $data): object return $this->workflowRun->resolve($headers, $data); } catch (Throwable $error) { - goto webhooks_aaacy; + goto webhooks_aaacz; } - webhooks_aaacy: + webhooks_aaacz: throw $error; } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsListingTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsListingTest.php index 74f7780996b..df7e6d0fda5 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsListingTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsListingTest.php @@ -31,7 +31,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequestsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -40,6 +40,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -61,9 +62,9 @@ public function operations_httpCode_500_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } @@ -78,7 +79,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequestsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -87,6 +88,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -108,9 +110,9 @@ public function operations_httpCode_422_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } @@ -125,7 +127,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequestsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -134,6 +136,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -155,9 +158,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } @@ -172,7 +175,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequestsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -181,6 +184,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -202,9 +206,9 @@ public function operations_httpCode_403_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequestsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsTest.php index 5ebde60d14c..5e298285c3c 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantRequestsTest.php @@ -31,7 +31,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequests::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -40,6 +40,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -59,9 +60,9 @@ public function operations_httpCode_500_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } /** @test */ @@ -74,7 +75,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequests::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -83,6 +84,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -102,9 +104,9 @@ public function operations_httpCode_422_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } /** @test */ @@ -117,7 +119,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequests::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -126,6 +128,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -145,9 +148,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } /** @test */ @@ -160,7 +163,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantRequests::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -169,6 +172,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -188,8 +192,8 @@ public function operations_httpCode_403_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-token-requests?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantRequests('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsListingTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsListingTest.php index 21287df1210..37839cf292b 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsListingTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsListingTest.php @@ -31,7 +31,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -40,6 +40,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -61,9 +62,9 @@ public function operations_httpCode_500_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } @@ -78,7 +79,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -87,6 +88,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -108,9 +110,9 @@ public function operations_httpCode_422_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } @@ -125,7 +127,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -134,6 +136,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -155,9 +158,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } @@ -172,7 +175,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrantsListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -181,6 +184,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -202,9 +206,9 @@ public function operations_httpCode_403_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrantsListing('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); foreach ($result as $item) { } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsTest.php index 48c92063f27..ff88105efea 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPatGrantsTest.php @@ -31,7 +31,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrants::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -40,6 +40,7 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -59,9 +60,9 @@ public function operations_httpCode_500_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } /** @test */ @@ -74,7 +75,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrants::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -83,6 +84,7 @@ public function call_httpCode_422_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -102,9 +104,9 @@ public function operations_httpCode_422_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } /** @test */ @@ -117,7 +119,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrants::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -126,6 +128,7 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -145,9 +148,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } /** @test */ @@ -160,7 +163,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->call(Internal\Operation\Orgs\ListPatGrants::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; @@ -169,6 +172,7 @@ public function call_httpCode_403_responseContentType_application_json_zero(): v $data['permission'] = 'generated'; $data['last_used_before'] = '1970-01-01T00:00:00+00:00'; $data['last_used_after'] = '1970-01-01T00:00:00+00:00'; + $data['token_id'] = null; $data['per_page'] = 8; $data['page'] = 1; $data['sort'] = 'generated'; @@ -188,8 +192,8 @@ public function operations_httpCode_403_responseContentType_application_json_zer $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/personal-access-tokens?owner=&repository=generated&permission=generated&last_used_before=1970-01-01T00:00:00+00:00&last_used_after=1970-01-01T00:00:00+00:00&token_id=&per_page=8&page=1&sort=generated&direction=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', 8, 1, 'generated', 'generated'); + $result = $client->operations()->orgs()->listPatGrants('generated', null, 'generated', 'generated', '1970-01-01T00:00:00+00:00', '1970-01-01T00:00:00+00:00', null, 8, 1, 'generated', 'generated'); } } diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index 8510543f416..a1d9036ae68 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -155,7 +155,7 @@ function authHeader(): string assertType('Observable', $client->call('GET /enterprises/{enterprise}/rulesets/{ruleset_id}/history')); assertType('Observable', $client->call('LIST /enterprises/{enterprise}/rulesets/{ruleset_id}/history')); assertType('', $client->call('GET /enterprises/{enterprise}/rulesets/{ruleset_id}/history/{version_id}')); -assertType('iterable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); +assertType('Observable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/actions')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/advanced-security')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/cost-centers')); @@ -472,14 +472,14 @@ function authHeader(): string assertType('', $client->call('GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}')); assertType('', $client->call('DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}')); assertType('', $client->call('POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore')); -assertType('Observable', $client->call('GET /orgs/{org}/personal-access-token-requests')); -assertType('Observable', $client->call('LIST /orgs/{org}/personal-access-token-requests')); +assertType('iterable', $client->call('GET /orgs/{org}/personal-access-token-requests')); +assertType('iterable', $client->call('LIST /orgs/{org}/personal-access-token-requests')); assertType('', $client->call('POST /orgs/{org}/personal-access-token-requests')); assertType('', $client->call('POST /orgs/{org}/personal-access-token-requests/{pat_request_id}')); assertType('Observable', $client->call('GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories')); assertType('Observable', $client->call('LIST /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories')); -assertType('Observable', $client->call('GET /orgs/{org}/personal-access-tokens')); -assertType('Observable', $client->call('LIST /orgs/{org}/personal-access-tokens')); +assertType('iterable', $client->call('GET /orgs/{org}/personal-access-tokens')); +assertType('iterable', $client->call('LIST /orgs/{org}/personal-access-tokens')); assertType('', $client->call('POST /orgs/{org}/personal-access-tokens')); assertType('', $client->call('POST /orgs/{org}/personal-access-tokens/{pat_id}')); assertType('Observable', $client->call('GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories')); @@ -522,8 +522,8 @@ function authHeader(): string assertType('Observable', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}/history')); assertType('Observable', $client->call('LIST /orgs/{org}/rulesets/{ruleset_id}/history')); assertType('', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}')); -assertType('iterable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); -assertType('iterable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); +assertType('Observable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); +assertType('Observable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); assertType('Observable', $client->call('GET /orgs/{org}/security-advisories')); assertType('Observable', $client->call('GET /orgs/{org}/security-managers')); assertType('', $client->call('PUT /orgs/{org}/security-managers/teams/{team_slug}')); @@ -768,7 +768,7 @@ function authHeader(): string assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts')); assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); -assertType('Schema\\CodeScanningAlert', $client->call('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); +assertType('', $client->call('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); assertType('', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix')); assertType('', $client->call('POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix')); assertType('', $client->call('POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits')); @@ -1097,8 +1097,8 @@ function authHeader(): string assertType('Observable', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history')); assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/rulesets/{ruleset_id}/history')); assertType('', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); +assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); +assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations')); diff --git a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index ff1b0c52a08..14fc16ec8c5 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -18571,6 +18571,7 @@ paths: - "$ref": "#/components/parameters/personal-access-token-permission" - "$ref": "#/components/parameters/personal-access-token-before" - "$ref": "#/components/parameters/personal-access-token-after" + - "$ref": "#/components/parameters/personal-access-token-token-id" responses: '500': "$ref": "#/components/responses/internal_error" @@ -18813,6 +18814,7 @@ paths: - "$ref": "#/components/parameters/personal-access-token-permission" - "$ref": "#/components/parameters/personal-access-token-before" - "$ref": "#/components/parameters/personal-access-token-after" + - "$ref": "#/components/parameters/personal-access-token-token-id" responses: '500': "$ref": "#/components/responses/internal_error" @@ -33560,7 +33562,7 @@ paths: Creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/encrypting-secrets-for-the-rest-api)." - OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin. tags: - codespaces operationId: codespaces/create-or-update-repo-secret @@ -33615,7 +33617,7 @@ paths: description: |- Deletes a development environment secret in a repository using the secret name. - OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin. tags: - codespaces operationId: codespaces/delete-repo-secret @@ -36903,7 +36905,7 @@ paths: The authenticated user must have admin or owner permissions to the repository to use this endpoint. - For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app). + For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/enterprise-cloud@latest//rest/apps/apps#get-an-app), as well as the [guide to creating custom deployment protection rules](https://docs.github.com/enterprise-cloud@latest//actions/managing-workflow-runs-and-deployments/managing-deployments/creating-custom-deployment-protection-rules). OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. tags: @@ -63163,6 +63165,140 @@ webhooks: - repository - organization - app + dismissal-request-code-scanning-created: + post: + summary: |- + This event occurs when there is activity related to a user's request to dismiss a code scanning alert. + + To subscribe to this event, a GitHub App must have at least read-level access for the "code scanning alerts" repository permission. + + > [!NOTE] + > Delegated alert dismissal for code scanning is currently in public preview and subject to change. + description: A code scanning alert dismissal request was created. + operationId: dismissal-request-code-scanning/created + externalDocs: + url: https://docs.github.com/enterprise-cloud@latest//webhooks/webhook-events-and-payloads#dismissal_request_code_scanning + 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-exemption-request-created" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: true + category: webhooks + subcategory: dismissal_request_code_scanning + supported-webhook-types: + - repository + - organization + - app + dismissal-request-code-scanning-response-submitted: + post: + summary: |- + This event occurs when there is activity related to a user's request to dismiss a code scanning alert. + + To subscribe to this event, a GitHub App must have at least read-level access for the "code scanning alerts" repository permission. + + > [!NOTE] + > Delegated alert dismissal for code scanning is currently in public preview and subject to change. + description: A code scanning alert dismissal response was submitted. + operationId: dismissal-request-code-scanning/response-submitted + externalDocs: + url: https://docs.github.com/enterprise-cloud@latest//webhooks/webhook-events-and-payloads#dismissal_request_code_scanning + 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-exemption-request-response-submitted" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: true + category: webhooks + subcategory: dismissal_request_code_scanning + supported-webhook-types: + - repository + - organization + - app dismissal-request-secret-scanning-cancelled: post: summary: |- @@ -77173,6 +77309,7 @@ components: id: description: Unique identifier of the webhook delivery. type: integer + format: int64 examples: - 42 guid: @@ -77225,6 +77362,7 @@ components: type: - integer - 'null' + format: int64 examples: - 123 repository_id: @@ -77232,6 +77370,7 @@ components: type: - integer - 'null' + format: int64 examples: - 123 throttled_at: @@ -107160,6 +107299,26 @@ components: alert_number: type: string description: The number of the alert that was detected + dismissal-request-code-scanning: + title: Code scanning alert dismissal request data + description: Code scanning alerts that have dismissal requests. + type: object + properties: + type: + type: string + description: The type of request + enum: + - code_scanning_alert_dismissal + data: + type: array + description: The data related to the code scanning alerts that have dismissal + requests. + items: + type: object + properties: + alert_number: + type: string + description: The number of the alert to be dismissed exemption-request-secret-scanning-metadata: title: Secret Scanning Push Protection Exemption Request Metadata description: Metadata for a secret scanning push protection exemption request. @@ -107191,6 +107350,21 @@ components: - false_positive - tests - revoked + dismissal-request-code-scanning-metadata: + title: Code scanning alert dismissal request metadata + description: Metadata for a code scanning alert dismissal request. + type: object + properties: + alert_title: + type: string + description: The title of the code scanning alert + reason: + type: string + description: The reason for the dismissal request + enum: + - false positive + - won't fix + - used in tests exemption-response: title: Exemption response description: A response to an exemption request by a delegated bypasser. @@ -107252,11 +107426,13 @@ components: - push_ruleset_bypass - secret_scanning - secret_scanning_closure + - code_scanning_alert_dismissal exemption_request_data: oneOf: - "$ref": "#/components/schemas/exemption-request-push-ruleset-bypass" - "$ref": "#/components/schemas/exemption-request-secret-scanning" - "$ref": "#/components/schemas/dismissal-request-secret-scanning" + - "$ref": "#/components/schemas/dismissal-request-code-scanning" resource_identifier: type: string description: The unique identifier for the request type of the exemption @@ -107282,9 +107458,10 @@ components: - object - 'null' description: Metadata about the exemption request. - oneOf: + anyOf: - "$ref": "#/components/schemas/exemption-request-secret-scanning-metadata" - "$ref": "#/components/schemas/dismissal-request-secret-scanning-metadata" + - "$ref": "#/components/schemas/dismissal-request-code-scanning-metadata" expires_at: type: string format: date-time @@ -242990,6 +243167,18 @@ components: schema: type: string format: date-time + personal-access-token-token-id: + name: token_id + description: The ID of the token + in: query + required: false + schema: + type: array + maxItems: 50 + items: + type: string + examples: + - token_id[]=1,token_id[]=2 fine-grained-personal-access-token-id: name: pat_id description: The unique identifier of the fine-grained personal access token.