diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index eb3a24a523c..8df6688b10f 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "be512ecb1c6b444be7d7f1c231d0a921", + "specHash": "1c10fe67a44f2937ca5a0fff4ccffbbd", "generatedFiles": { "files": [ { @@ -380,7 +380,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertState.php", - "hash": "84eda8fa792f0dbd83cbd140dd3ef721" + "hash": "95539fa840acc8ef03a695582b72a2a2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertSeverity.php", @@ -436,11 +436,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertInstance.php", - "hash": "a8767dd89d63faf7e49e50003bde0173" + "hash": "40d9928837bb61ecbcf453db295c621c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningOrganizationAlertItems.php", - "hash": "f5135e11f8ec37bfd3ac418e6b652164" + "hash": "f9e47f362a94c6dde74f8c7ac403eab5" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodespaceMachine.php", @@ -848,11 +848,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertItems.php", - "hash": "7eccd9ebb2c28f524299766925009266" + "hash": "5b6e09e37ceaed376dc1ebd56d3c15b2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningAlert.php", - "hash": "c4d02c30803b0fb68fe0ad37a7b2d177" + "hash": "7cb087c5ce4eb62822fbde23a3badfac" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertSetState.php", @@ -1296,7 +1296,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest.php", - "hash": "306baf2bd9aae5726226f9c14017666e" + "hash": "dea9528ebf15e11c9ed43919f6bb6df1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequestMergeResult.php", @@ -1632,7 +1632,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCodeScanningAlertCreated.php", - "hash": "e331e9e9ed1918f56ffc0be3e9f3c0ba" + "hash": "55aeeccf1e283236c2831b6839d98e06" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCodeScanningAlertFixed.php", @@ -1700,7 +1700,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookDeploymentProtectionRuleRequested.php", - "hash": "9338f5adc8ad3355b060a9ad8516861a" + "hash": "66c74799ae79c7bd4ed1921525e9cb5c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookDeploymentStatusCreated.php", @@ -2168,11 +2168,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestClosed.php", - "hash": "c8124f1f30beade7f62950e8311c7d2d" + "hash": "c823e791f4bbdb5d2094df48ab70ce6c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestConvertedToDraft.php", - "hash": "50e8473a09266496391c734013e7a2ef" + "hash": "1b70219ea162d783e3c67bd40e3111c4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestDemilestoned.php", @@ -2184,7 +2184,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestEdited.php", - "hash": "1a8bfd05bddb3bfe089b22fdaa7dc4d6" + "hash": "511ab555bde28f29c2ab9a45d722a5f0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestEnqueued.php", @@ -2204,15 +2204,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestOpened.php", - "hash": "6c3f53d279a83b0657c211eb55c26696" + "hash": "1eee26491de2dd87db9537f1b36313db" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestReadyForReview.php", - "hash": "d11c21fa9892b9e6360372e730da2377" + "hash": "c61b610b02bb2ac1af3b17ede773649d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestReopened.php", - "hash": "724270ac47e0288d89810a65e310e0d2" + "hash": "1cf3f6e4f23f0180f20f646715177159" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPullRequestReviewCommentCreated.php", @@ -3144,27 +3144,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Head.php", - "hash": "b9f7efffb746d52949e933fed36e7374" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Head\/Repo.php", - "hash": "718a14853ebe725cde2cf17a6bdd15dc" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Head\/Repo\/Owner.php", - "hash": "8c71e4dcc9745fafa2bfebd37fec07c1" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Head\/Repo\/License.php", - "hash": "bc85f3affefb2a46e3a66d40d4c3ce1a" + "hash": "7b9974b3e7c03ca635535a8dd4dc0565" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Base.php", - "hash": "9fc10abb755bf73b30d9c394818d7d96" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Base\/Repo.php", - "hash": "ac6dfbfd3cfef6f2bfbbd2fe9a15f69b" + "hash": "cdbbe0ae51ada862b05a59950d6fb593" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ReviewComment\/Links.php", @@ -3380,7 +3364,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCodeScanningAlertCreated\/Alert.php", - "hash": "b12f1182ac37316ab400e7bbe4a644a7" + "hash": "10ddf4052d7f2518ed64c8545eb9641a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCodeScanningAlertCreated\/Alert\/Tool.php", @@ -5544,11 +5528,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Dependabot.php", - "hash": "e7fc82d806b6c8a8ced7cc9e0dc49020" + "hash": "ff3851915c45c72e4d418768664f8a29" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "a301125fe9dad26dc7f1897bc944c4db" + "hash": "df8efd6cbc5fb8acb4ff583a8c7fd841" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Activity.php", @@ -5652,7 +5636,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Search.php", - "hash": "2b13578c4932bef4a549bc02f1233f33" + "hash": "ce193ba85d9428d03c8e8bf1abc64370" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Users.php", @@ -5918,14 +5902,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet205818DE\/Tiet09BC5C97\/TietDE84B773\/TietBE223C26.php", "hash": "bbfff225b2edd41878b2b4f760cf2cce" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Head\/Repo\/Permissions.php", - "hash": "906d5246e02b4bbf0a27201c8eb6bfb5" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Base\/Repo\/Permissions.php", - "hash": "409138374dba0efffe9e9e9ab9d59e10" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepoSearchResultItem\/Permissions.php", "hash": "4fa45a991979c9617b8f9d580c59a3ba" @@ -6222,18 +6198,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookPageBuild\/Build\/Error.php", "hash": "4fbe05ffd58e56020ef5357df0d92a90" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Head\/User.php", - "hash": "3f46e38bddc096d4fd90dfc72eb7019b" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Base\/Repo\/Owner.php", - "hash": "bc91799fa65602319e7da5fd29bb18e9" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequest\/Base\/User.php", - "hash": "0808c5736d57178b7d37bffefef8f20c" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PrivateVulnerabilityReportCreate\/Vulnerabilities.php", "hash": "91d68f2bb9cbf32d38b31f58691b3215" @@ -26052,7 +26016,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber.php", - "hash": "998d7c69c3a3fc59f022f4036ecd5b42" + "hash": "582517257072505879a986b37f247563" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber\/Instances.php", @@ -26516,7 +26480,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Pulls.php", - "hash": "9d3716cee8e95636a46c19658bd940a0" + "hash": "7e94dfe3bae4ca2dd4acffa975e33a6e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Pulls\/Comments\/CommentId.php", @@ -26528,7 +26492,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Pulls\/PullNumber.php", - "hash": "1851726f3377026ba51406086e347646" + "hash": "d12215b5daad9833404b3b42155d33d7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Pulls\/PullNumber\/Codespaces.php", @@ -27108,7 +27072,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "07d59e979bff4f7ed07cf5e502a4d8eb" + "hash": "363bb9819bf820699d3018eb478c1271" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -28004,7 +27968,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CodeScanningAlert.php", - "hash": "d3125bfbdc2a9b1db8191a54ed57c974" + "hash": "809600e12c796fbd6001bd6ea64107fb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CommitComment.php", @@ -28168,7 +28132,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/PullRequest.php", - "hash": "263bc2b8d6489885c855f68f66162016" + "hash": "e7c20415df5af5424ab9475325acad7d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/PullRequestReviewComment.php", @@ -28652,7 +28616,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/PullRequestWebhook.php", - "hash": "6f80f41660e67ad72e84f748ab12af20" + "hash": "152349490307d1485b456eb12a0c8522" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietD0156E29\/Tiet718D0614\/Tiet1A091EF2\/TietD0F00D93.php", @@ -29692,7 +29656,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/AttachConfiguration\/Request\/ApplicationJson.php", - "hash": "d92db5db1f97627eb697358157264f07" + "hash": "6b2f495672dae31376f3a05d3f1fa8b9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/SetConfigurationAsDefault\/Request\/ApplicationJson.php", @@ -30530,14 +30494,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet33AB0ED9\/Tiet45DEC305\/TietCF9E75E5\/Tiet163E6BD8.php", "hash": "c149d05a39f6895533818db12a165c2e" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet51848752\/TietF5AFF89A\/Tiet1BF2E786\/Tiet3454ABD5.php", - "hash": "8162bda618aecf4ab4f9ce8514b512fc" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet74CB63F2\/Tiet418A3C81\/TietBF5296EB\/Tiet7F2EFE97.php", - "hash": "b3f55dc05d353455ba2de8116538e94a" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet43D49F44\/TietAE60624E\/Tiet6F859A9C\/Tiet1D52E2C1.php", "hash": "f1194f56d0383c70d6e002bf9ef48c6b" @@ -30685,6 +30641,10 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfiguration\/SecretScanningDelegatedBypassOptions\/Reviewers.php", "hash": "7ff32ae08ca51fc2ad28a1c135c51b2f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietF9118D54\/Tiet0348F141\/Tiet9D635D6C\/TietE7315EF1.php", + "hash": "3e4fdc80247873aa80d031284a7a4885" } ] }, diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php index f7883e6b798..ca8d2d428c5 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php @@ -135,7 +135,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code $value = $payload['state'] ?? null; if ($value === null) { - $missingFields[] = 'state'; + $properties['state'] = null; goto after_state; } @@ -1208,7 +1208,12 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $instancesUrl = $object->instancesUrl; after_instancesUrl: $result['instances_url'] = $instancesUrl; - $state = $object->state; + $state = $object->state; + + if ($state === null) { + goto after_state; + } + after_state: $result['state'] = $state; $fixedAt = $object->fixedAt; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls.php index f1e6860b618..13d1cf1fc4b 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls.php @@ -12,12 +12,9 @@ use ApiClients\Client\GitHub\Schema\PullRequest; use ApiClients\Client\GitHub\Schema\PullRequest\Base; use ApiClients\Client\GitHub\Schema\PullRequest\Head; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\User; use ApiClients\Client\GitHub\Schema\PullRequest\Links; +use ApiClients\Client\GitHub\Schema\Repository; +use ApiClients\Client\GitHub\Schema\Repository\Permissions; use ApiClients\Client\GitHub\Schema\SimpleUser; use ApiClients\Client\GitHub\Schema\ValidationError; use EventSauce\ObjectHydrator\IterableList; @@ -60,17 +57,10 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Milestone' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($payload), 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\User' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($payload), 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\User' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($payload), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($payload), 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($payload), 'ApiClients\Client\GitHub\Schema\Link' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($payload), 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($payload), @@ -1245,14 +1235,14 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull $value = $payload['repo'] ?? null; if ($value === null) { - $properties['repo'] = null; + $missingFields[] = 'repo'; goto after_repo; } if (is_array($value)) { try { $this->hydrationStack[] = 'repo'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); } finally { array_pop($this->hydrationStack); } @@ -1283,7 +1273,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull if (is_array($value)) { try { $this->hydrationStack[] = 'user'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); } finally { array_pop($this->hydrationStack); } @@ -1307,11 +1297,181 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo(array $payload): Repo + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(array $payload): Repository { $properties = []; $missingFields = []; try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $missingFields[] = 'full_name'; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['license'] ?? null; + + if ($value === null) { + $properties['license'] = null; + goto after_license; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['license'] = $value; + + after_license: + + $value = $payload['forks'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks'; + goto after_forks; + } + + $properties['forks'] = $value; + + after_forks: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $missingFields[] = 'private'; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['fork'] ?? null; + + if ($value === null) { + $missingFields[] = 'fork'; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + $value = $payload['archive_url'] ?? null; if ($value === null) { @@ -1433,17 +1593,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_deploymentsUrl: - $value = $payload['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - $value = $payload['downloads_url'] ?? null; if ($value === null) { @@ -1466,17 +1615,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_eventsUrl: - $value = $payload['fork'] ?? null; - - if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; - } - - $properties['fork'] = $value; - - after_fork: - $value = $payload['forks_url'] ?? null; if ($value === null) { @@ -1488,17 +1626,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_forksUrl: - $value = $payload['full_name'] ?? null; - - if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; - } - - $properties['fullName'] = $value; - - after_fullName: - $value = $payload['git_commits_url'] ?? null; if ($value === null) { @@ -1532,49 +1659,16 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_gitTagsUrl: - $value = $payload['hooks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; - } - - $properties['hooksUrl'] = $value; - - after_hooksUrl: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; + $value = $payload['git_url'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'git_url'; + goto after_gitUrl; } - $properties['nodeId'] = $value; + $properties['gitUrl'] = $value; - after_nodeId: + after_gitUrl: $value = $payload['issue_comment_url'] ?? null; @@ -1664,59 +1758,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_milestonesUrl: - $value = $payload['name'] ?? null; + $value = $payload['notifications_url'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['notifications_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; + $missingFields[] = 'notifications_url'; + goto after_notificationsUrl; } $properties['notificationsUrl'] = $value; after_notificationsUrl: - $value = $payload['owner'] ?? null; - - if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($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['pulls_url'] ?? null; if ($value === null) { @@ -1739,6 +1791,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull 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) { @@ -1816,49 +1879,71 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_treesUrl: - $value = $payload['url'] ?? null; + $value = $payload['clone_url'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'clone_url'; + goto after_cloneUrl; } - $properties['url'] = $value; + $properties['cloneUrl'] = $value; - after_url: + after_cloneUrl: - $value = $payload['clone_url'] ?? null; + $value = $payload['mirror_url'] ?? null; if ($value === null) { - $missingFields[] = 'clone_url'; - goto after_cloneUrl; + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; } - $properties['cloneUrl'] = $value; + $properties['mirrorUrl'] = $value; - after_cloneUrl: + after_mirrorUrl: - $value = $payload['default_branch'] ?? null; + $value = $payload['hooks_url'] ?? null; if ($value === null) { - $missingFields[] = 'default_branch'; - goto after_defaultBranch; + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; } - $properties['defaultBranch'] = $value; + $properties['hooksUrl'] = $value; - after_defaultBranch: + after_hooksUrl: - $value = $payload['forks'] ?? null; + $value = $payload['svn_url'] ?? null; if ($value === null) { - $missingFields[] = 'forks'; - goto after_forks; + $missingFields[] = 'svn_url'; + goto after_svnUrl; } - $properties['forks'] = $value; + $properties['svnUrl'] = $value; - after_forks: + 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; @@ -1871,27 +1956,82 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_forksCount: - $value = $payload['git_url'] ?? null; + $value = $payload['stargazers_count'] ?? null; if ($value === null) { - $missingFields[] = 'git_url'; - goto after_gitUrl; + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; } - $properties['gitUrl'] = $value; + $properties['stargazersCount'] = $value; - after_gitUrl: + after_stargazersCount: - $value = $payload['has_downloads'] ?? null; + $value = $payload['watchers_count'] ?? null; if ($value === null) { - $missingFields[] = 'has_downloads'; - goto after_hasDownloads; + $missingFields[] = 'watchers_count'; + goto after_watchersCount; } - $properties['hasDownloads'] = $value; + $properties['watchersCount'] = $value; - after_hasDownloads: + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $missingFields[] = 'size'; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $missingFields[] = 'default_branch'; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: $value = $payload['has_issues'] ?? null; @@ -1937,49 +2077,27 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_hasPages: - $value = $payload['has_discussions'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_discussions'; - goto after_hasDiscussions; - } - - $properties['hasDiscussions'] = $value; - - after_hasDiscussions: - - $value = $payload['homepage'] ?? null; - - if ($value === null) { - $properties['homepage'] = null; - goto after_homepage; - } - - $properties['homepage'] = $value; - - after_homepage: - - $value = $payload['language'] ?? null; + $value = $payload['has_downloads'] ?? null; if ($value === null) { - $properties['language'] = null; - goto after_language; + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; } - $properties['language'] = $value; + $properties['hasDownloads'] = $value; - after_language: + after_hasDownloads: - $value = $payload['master_branch'] ?? null; + $value = $payload['has_discussions'] ?? null; if ($value === null) { - $properties['masterBranch'] = null; - goto after_masterBranch; + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; } - $properties['masterBranch'] = $value; + $properties['hasDiscussions'] = $value; - after_masterBranch: + after_hasDiscussions: $value = $payload['archived'] ?? null; @@ -2014,58 +2132,49 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_visibility: - $value = $payload['mirror_url'] ?? null; + $value = $payload['pushed_at'] ?? null; if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; + $properties['pushedAt'] = null; + goto after_pushedAt; } - $properties['mirrorUrl'] = $value; + $properties['pushedAt'] = $value; - after_mirrorUrl: + after_pushedAt: - $value = $payload['open_issues'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues'; - goto after_openIssues; + $properties['createdAt'] = null; + goto after_createdAt; } - $properties['openIssues'] = $value; + $properties['createdAt'] = $value; - after_openIssues: + after_createdAt: - $value = $payload['open_issues_count'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues_count'; - goto after_openIssuesCount; + $properties['updatedAt'] = null; + goto after_updatedAt; } - $properties['openIssuesCount'] = $value; + $properties['updatedAt'] = $value; - after_openIssuesCount: + after_updatedAt: - $value = $payload['permissions'] ?? null; + $value = $payload['allow_rebase_merge'] ?? null; if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; } - $properties['permissions'] = $value; + $properties['allowRebaseMerge'] = $value; - after_permissions: + after_allowRebaseMerge: $value = $payload['temp_clone_token'] ?? null; @@ -2078,17 +2187,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_tempCloneToken: - $value = $payload['allow_merge_commit'] ?? null; - - if ($value === null) { - $properties['allowMergeCommit'] = null; - goto after_allowMergeCommit; - } - - $properties['allowMergeCommit'] = $value; - - after_allowMergeCommit: - $value = $payload['allow_squash_merge'] ?? null; if ($value === null) { @@ -2100,3516 +2198,933 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_allowSquashMerge: - $value = $payload['allow_rebase_merge'] ?? null; + $value = $payload['allow_auto_merge'] ?? null; if ($value === null) { - $properties['allowRebaseMerge'] = null; - goto after_allowRebaseMerge; + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; } - $properties['allowRebaseMerge'] = $value; + $properties['allowAutoMerge'] = $value; - after_allowRebaseMerge: + after_allowAutoMerge: - $value = $payload['license'] ?? null; + $value = $payload['delete_branch_on_merge'] ?? null; if ($value === null) { - $properties['license'] = null; - goto after_license; + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; } - $properties['license'] = $value; + $properties['allowUpdateBranch'] = $value; - after_license: + after_allowUpdateBranch: - $value = $payload['pushed_at'] ?? null; + $value = $payload['use_squash_pr_title_as_default'] ?? null; if ($value === null) { - $missingFields[] = 'pushed_at'; - goto after_pushedAt; + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; } - $properties['pushedAt'] = $value; + $properties['useSquashPrTitleAsDefault'] = $value; - after_pushedAt: + after_useSquashPrTitleAsDefault: - $value = $payload['size'] ?? null; + $value = $payload['squash_merge_commit_title'] ?? null; if ($value === null) { - $missingFields[] = 'size'; - goto after_size; + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; } - $properties['size'] = $value; + $properties['squashMergeCommitTitle'] = $value; - after_size: + after_squashMergeCommitTitle: - $value = $payload['ssh_url'] ?? null; + $value = $payload['squash_merge_commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'ssh_url'; - goto after_sshUrl; + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; } - $properties['sshUrl'] = $value; + $properties['squashMergeCommitMessage'] = $value; - after_sshUrl: + after_squashMergeCommitMessage: - $value = $payload['stargazers_count'] ?? null; + $value = $payload['merge_commit_title'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_count'; - goto after_stargazersCount; + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; } - $properties['stargazersCount'] = $value; + $properties['mergeCommitTitle'] = $value; - after_stargazersCount: + after_mergeCommitTitle: - $value = $payload['svn_url'] ?? null; + $value = $payload['merge_commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'svn_url'; - goto after_svnUrl; + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; } - $properties['svnUrl'] = $value; + $properties['mergeCommitMessage'] = $value; - after_svnUrl: + after_mergeCommitMessage: - $value = $payload['topics'] ?? null; + $value = $payload['allow_merge_commit'] ?? null; if ($value === null) { - $properties['topics'] = null; - goto after_topics; + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; } - $properties['topics'] = $value; + $properties['allowMergeCommit'] = $value; - after_topics: + after_allowMergeCommit: - $value = $payload['watchers'] ?? null; + $value = $payload['allow_forking'] ?? null; if ($value === null) { - $missingFields[] = 'watchers'; - goto after_watchers; + $properties['allowForking'] = null; + goto after_allowForking; } - $properties['watchers'] = $value; + $properties['allowForking'] = $value; - after_watchers: + after_allowForking: - $value = $payload['watchers_count'] ?? null; + $value = $payload['web_commit_signoff_required'] ?? null; if ($value === null) { - $missingFields[] = 'watchers_count'; - goto after_watchersCount; + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; } - $properties['watchersCount'] = $value; + $properties['webCommitSignoffRequired'] = $value; - after_watchersCount: + after_webCommitSignoffRequired: - $value = $payload['created_at'] ?? null; + $value = $payload['open_issues'] ?? null; if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; + $missingFields[] = 'open_issues'; + goto after_openIssues; } - $properties['createdAt'] = $value; + $properties['openIssues'] = $value; - after_createdAt: + after_openIssues: - $value = $payload['updated_at'] ?? null; + $value = $payload['watchers'] ?? null; if ($value === null) { - $missingFields[] = 'updated_at'; - goto after_updatedAt; + $missingFields[] = 'watchers'; + goto after_watchers; } - $properties['updatedAt'] = $value; + $properties['watchers'] = $value; - after_updatedAt: + after_watchers: - $value = $payload['allow_forking'] ?? null; + $value = $payload['master_branch'] ?? null; if ($value === null) { - $properties['allowForking'] = null; - goto after_allowForking; + $properties['masterBranch'] = null; + goto after_masterBranch; } - $properties['allowForking'] = $value; + $properties['masterBranch'] = $value; - after_allowForking: + after_masterBranch: - $value = $payload['is_template'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['isTemplate'] = $value; + $properties['starredAt'] = $value; - after_isTemplate: + after_starredAt: - $value = $payload['web_commit_signoff_required'] ?? null; + $value = $payload['anonymous_access_enabled'] ?? null; if ($value === null) { - $properties['webCommitSignoffRequired'] = null; - goto after_webCommitSignoffRequired; + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; } - $properties['webCommitSignoffRequired'] = $value; + $properties['anonymousAccessEnabled'] = $value; - after_webCommitSignoffRequired: + after_anonymousAccessEnabled: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Repo::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Repository::class, $missingFields, stack: $this->hydrationStack); } try { - return new Repo(...$properties); + return new Repository(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(array $payload): Owner + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple { $properties = []; $missingFields = []; try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; + $value = $payload['key'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $missingFields[] = 'key'; + goto after_key; } - $properties['eventsUrl'] = $value; + $properties['key'] = $value; - after_eventsUrl: + after_key: - $value = $payload['followers_url'] ?? null; + $value = $payload['name'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $missingFields[] = 'name'; + goto after_name; } - $properties['followersUrl'] = $value; + $properties['name'] = $value; - after_followersUrl: + after_name: - $value = $payload['following_url'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $properties['url'] = null; + goto after_url; } - $properties['followingUrl'] = $value; + $properties['url'] = $value; - after_followingUrl: + after_url: - $value = $payload['gists_url'] ?? null; + $value = $payload['spdx_id'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $properties['spdxId'] = null; + goto after_spdxId; } - $properties['gistsUrl'] = $value; + $properties['spdxId'] = $value; - after_gistsUrl: + after_spdxId: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['gravatarId'] = $value; + $properties['nodeId'] = $value; - after_gravatarId: + after_nodeId: $value = $payload['html_url'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; + $properties['htmlUrl'] = null; goto after_htmlUrl; } $properties['htmlUrl'] = $value; after_htmlUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } - $value = $payload['id'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new LicenseSimple(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions(array $payload): Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $missingFields[] = 'admin'; + goto after_admin; } - $properties['id'] = $value; + $properties['admin'] = $value; - after_id: + after_admin: - $value = $payload['node_id'] ?? null; + $value = $payload['pull'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'pull'; + goto after_pull; } - $properties['nodeId'] = $value; + $properties['pull'] = $value; - after_nodeId: + after_pull: - $value = $payload['login'] ?? null; + $value = $payload['triage'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['triage'] = null; + goto after_triage; } - $properties['login'] = $value; + $properties['triage'] = $value; - after_login: + after_triage: - $value = $payload['organizations_url'] ?? null; + $value = $payload['push'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $missingFields[] = 'push'; + goto after_push; } - $properties['organizationsUrl'] = $value; + $properties['push'] = $value; - after_organizationsUrl: + after_push: - $value = $payload['received_events_url'] ?? null; + $value = $payload['maintain'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $properties['maintain'] = null; + goto after_maintain; } - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; + $properties['maintain'] = $value; - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } + after_maintain: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository\Permissions', $exception, stack: $this->hydrationStack); + } - $properties['reposUrl'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); + } - after_reposUrl: + try { + return new Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository\Permissions', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['site_admin'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(array $payload): Base + { + $properties = []; + $missingFields = []; + try { + $value = $payload['label'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $missingFields[] = 'label'; + goto after_label; } - $properties['siteAdmin'] = $value; + $properties['label'] = $value; - after_siteAdmin: + after_label: - $value = $payload['starred_url'] ?? null; + $value = $payload['ref'] ?? null; if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; + $missingFields[] = 'ref'; + goto after_ref; } - $properties['starredUrl'] = $value; + $properties['ref'] = $value; - after_starredUrl: + after_ref: - $value = $payload['subscriptions_url'] ?? null; + $value = $payload['repo'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $missingFields[] = 'repo'; + goto after_repo; } - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repo'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['type'] = $value; + $properties['repo'] = $value; - after_type: + after_repo: - $value = $payload['url'] ?? null; + $value = $payload['sha'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'sha'; + goto after_sha; } - $properties['url'] = $value; + $properties['sha'] = $value; - after_url: + after_sha: - $value = $payload['user_view_type'] ?? null; + $value = $payload['user'] ?? null; if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; + $missingFields[] = 'user'; + goto after_user; } - $properties['userViewType'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'user'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_userViewType: + $properties['user'] = $value; + + after_user: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Base::class, $missingFields, stack: $this->hydrationStack); } try { - return new Owner(...$properties); + return new Base(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(array $payload): Permissions + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links(array $payload): Links { $properties = []; $missingFields = []; try { - $value = $payload['admin'] ?? null; + $value = $payload['comments'] ?? null; if ($value === null) { - $missingFields[] = 'admin'; - goto after_admin; + $missingFields[] = 'comments'; + goto after_comments; } - $properties['admin'] = $value; - - after_admin: - - $value = $payload['maintain'] ?? null; - - if ($value === null) { - $properties['maintain'] = null; - goto after_maintain; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'comments'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['maintain'] = $value; + $properties['comments'] = $value; - after_maintain: + after_comments: - $value = $payload['push'] ?? null; + $value = $payload['commits'] ?? null; if ($value === null) { - $missingFields[] = 'push'; - goto after_push; + $missingFields[] = 'commits'; + goto after_commits; } - $properties['push'] = $value; - - after_push: - - $value = $payload['triage'] ?? null; - - if ($value === null) { - $properties['triage'] = null; - goto after_triage; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'commits'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['triage'] = $value; + $properties['commits'] = $value; - after_triage: + after_commits: - $value = $payload['pull'] ?? null; + $value = $payload['statuses'] ?? null; if ($value === null) { - $missingFields[] = 'pull'; - goto after_pull; + $missingFields[] = 'statuses'; + goto after_statuses; } - $properties['pull'] = $value; - - after_pull: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions', $exception, stack: $this->hydrationStack); - } + if (is_array($value)) { + try { + $this->hydrationStack[] = 'statuses'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); - } + $properties['statuses'] = $value; - try { - return new Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - } + after_statuses: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License(array $payload): License - { - $properties = []; - $missingFields = []; - try { - $value = $payload['key'] ?? null; + $value = $payload['html'] ?? null; if ($value === null) { - $missingFields[] = 'key'; - goto after_key; + $missingFields[] = 'html'; + goto after_html; } - $properties['key'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'html'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_key: + $properties['html'] = $value; - $value = $payload['name'] ?? null; + after_html: + + $value = $payload['issue'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; + $missingFields[] = 'issue'; + goto after_issue; } - $properties['name'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'issue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_name: + $properties['issue'] = $value; - $value = $payload['url'] ?? null; + after_issue: + + $value = $payload['review_comments'] ?? null; if ($value === null) { - $properties['url'] = null; - goto after_url; + $missingFields[] = 'review_comments'; + goto after_reviewComments; } - $properties['url'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'reviewComments'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_url: + $properties['reviewComments'] = $value; - $value = $payload['spdx_id'] ?? null; + after_reviewComments: + + $value = $payload['review_comment'] ?? null; if ($value === null) { - $properties['spdxId'] = null; - goto after_spdxId; + $missingFields[] = 'review_comment'; + goto after_reviewComment; } - $properties['spdxId'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'reviewComment'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_spdxId: + $properties['reviewComment'] = $value; - $value = $payload['node_id'] ?? null; + after_reviewComment: + + $value = $payload['self'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'self'; + goto after_self; } - $properties['nodeId'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'self'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_nodeId: + $properties['self'] = $value; + + after_self: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(License::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Links::class, $missingFields, stack: $this->hydrationStack); } try { - return new License(...$properties); + return new Links(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User(array $payload): User + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link(array $payload): Link { $properties = []; $missingFields = []; try { - $value = $payload['avatar_url'] ?? null; + $value = $payload['href'] ?? null; if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; + $missingFields[] = 'href'; + goto after_href; } - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; + $properties['href'] = $value; - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } + after_href: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); + } - $properties['eventsUrl'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Link::class, $missingFields, stack: $this->hydrationStack); + } - after_eventsUrl: + try { + return new Link(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['followers_url'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge(array $payload): AutoMerge + { + $properties = []; + $missingFields = []; + try { + $value = $payload['enabled_by'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $missingFields[] = 'enabled_by'; + goto after_enabledBy; } - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enabledBy'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['followingUrl'] = $value; + $properties['enabledBy'] = $value; - after_followingUrl: + after_enabledBy: - $value = $payload['gists_url'] ?? null; + $value = $payload['merge_method'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $missingFields[] = 'merge_method'; + goto after_mergeMethod; } - $properties['gistsUrl'] = $value; + $properties['mergeMethod'] = $value; - after_gistsUrl: + after_mergeMethod: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['commit_title'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'commit_title'; + goto after_commitTitle; } - $properties['gravatarId'] = $value; + $properties['commitTitle'] = $value; - after_gravatarId: + after_commitTitle: - $value = $payload['html_url'] ?? null; + $value = $payload['commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + $missingFields[] = 'commit_message'; + goto after_commitMessage; } - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; + $properties['commitMessage'] = $value; - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } + after_commitMessage: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); + } - $properties['id'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(AutoMerge::class, $missingFields, stack: $this->hydrationStack); + } - after_id: + try { + return new AutoMerge(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['node_id'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $properties['message'] = null; + goto after_message; } - $properties['nodeId'] = $value; + $properties['message'] = $value; - after_nodeId: + after_message: - $value = $payload['login'] ?? null; + $value = $payload['documentation_url'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['documentationUrl'] = null; + goto after_documentationUrl; } - $properties['login'] = $value; + $properties['documentationUrl'] = $value; - after_login: + after_documentationUrl: - $value = $payload['organizations_url'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $properties['url'] = null; + goto after_url; } - $properties['organizationsUrl'] = $value; + $properties['url'] = $value; - after_organizationsUrl: + after_url: - $value = $payload['received_events_url'] ?? null; + $value = $payload['status'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $properties['status'] = null; + goto after_status; } - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } + $properties['status'] = $value; - $properties['reposUrl'] = $value; + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } - after_reposUrl: + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } - $value = $payload['site_admin'] ?? null; + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + 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); } + } - $properties['siteAdmin'] = $value; - - after_siteAdmin: + throw new LogicException('No type mapped for object of class: ' . $object::class); + } - $value = $payload['starred_url'] ?? null; + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } - 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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\User', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(User::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new User(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\User', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(array $payload): Base - { - $properties = []; - $missingFields = []; - try { - $value = $payload['label'] ?? null; - - if ($value === null) { - $missingFields[] = 'label'; - goto after_label; - } - - $properties['label'] = $value; - - after_label: - - $value = $payload['ref'] ?? null; - - if ($value === null) { - $missingFields[] = 'ref'; - goto after_ref; - } - - $properties['ref'] = $value; - - after_ref: - - $value = $payload['repo'] ?? null; - - if ($value === null) { - $missingFields[] = 'repo'; - goto after_repo; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'repo'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['repo'] = $value; - - after_repo: - - $value = $payload['sha'] ?? null; - - if ($value === null) { - $missingFields[] = 'sha'; - goto after_sha; - } - - $properties['sha'] = $value; - - after_sha: - - $value = $payload['user'] ?? null; - - if ($value === null) { - $missingFields[] = 'user'; - goto after_user; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'user'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['user'] = $value; - - after_user: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Base::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new Base(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo - { - $properties = []; - $missingFields = []; - try { - $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['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - - $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['fork'] ?? null; - - if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; - } - - $properties['fork'] = $value; - - after_fork: - - $value = $payload['forks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'forks_url'; - goto after_forksUrl; - } - - $properties['forksUrl'] = $value; - - after_forksUrl: - - $value = $payload['full_name'] ?? null; - - if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; - } - - $properties['fullName'] = $value; - - after_fullName: - - $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['hooks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; - } - - $properties['hooksUrl'] = $value; - - after_hooksUrl: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['is_template'] ?? null; - - if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; - } - - $properties['isTemplate'] = $value; - - after_isTemplate: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $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['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['notifications_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; - } - - $properties['notificationsUrl'] = $value; - - after_notificationsUrl: - - $value = $payload['owner'] ?? null; - - if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($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['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['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['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['clone_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'clone_url'; - goto after_cloneUrl; - } - - $properties['cloneUrl'] = $value; - - after_cloneUrl: - - $value = $payload['default_branch'] ?? null; - - if ($value === null) { - $missingFields[] = 'default_branch'; - goto after_defaultBranch; - } - - $properties['defaultBranch'] = $value; - - after_defaultBranch: - - $value = $payload['forks'] ?? null; - - if ($value === null) { - $missingFields[] = 'forks'; - goto after_forks; - } - - $properties['forks'] = $value; - - after_forks: - - $value = $payload['forks_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'forks_count'; - goto after_forksCount; - } - - $properties['forksCount'] = $value; - - after_forksCount: - - $value = $payload['git_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'git_url'; - goto after_gitUrl; - } - - $properties['gitUrl'] = $value; - - after_gitUrl: - - $value = $payload['has_downloads'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_downloads'; - goto after_hasDownloads; - } - - $properties['hasDownloads'] = $value; - - after_hasDownloads: - - $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_discussions'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_discussions'; - goto after_hasDiscussions; - } - - $properties['hasDiscussions'] = $value; - - after_hasDiscussions: - - $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['master_branch'] ?? null; - - if ($value === null) { - $properties['masterBranch'] = null; - goto after_masterBranch; - } - - $properties['masterBranch'] = $value; - - after_masterBranch: - - $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['mirror_url'] ?? null; - - if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; - } - - $properties['mirrorUrl'] = $value; - - after_mirrorUrl: - - $value = $payload['open_issues'] ?? null; - - if ($value === null) { - $missingFields[] = 'open_issues'; - goto after_openIssues; - } - - $properties['openIssues'] = $value; - - after_openIssues: - - $value = $payload['open_issues_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'open_issues_count'; - goto after_openIssuesCount; - } - - $properties['openIssuesCount'] = $value; - - after_openIssuesCount: - - $value = $payload['permissions'] ?? null; - - if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['permissions'] = $value; - - after_permissions: - - $value = $payload['temp_clone_token'] ?? null; - - if ($value === null) { - $properties['tempCloneToken'] = null; - goto after_tempCloneToken; - } - - $properties['tempCloneToken'] = $value; - - after_tempCloneToken: - - $value = $payload['allow_merge_commit'] ?? null; - - if ($value === null) { - $properties['allowMergeCommit'] = null; - goto after_allowMergeCommit; - } - - $properties['allowMergeCommit'] = $value; - - after_allowMergeCommit: - - $value = $payload['allow_squash_merge'] ?? null; - - if ($value === null) { - $properties['allowSquashMerge'] = null; - goto after_allowSquashMerge; - } - - $properties['allowSquashMerge'] = $value; - - after_allowSquashMerge: - - $value = $payload['allow_rebase_merge'] ?? null; - - if ($value === null) { - $properties['allowRebaseMerge'] = null; - goto after_allowRebaseMerge; - } - - $properties['allowRebaseMerge'] = $value; - - after_allowRebaseMerge: - - $value = $payload['license'] ?? null; - - if ($value === null) { - $properties['license'] = null; - goto after_license; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['license'] = $value; - - after_license: - - $value = $payload['pushed_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'pushed_at'; - goto after_pushedAt; - } - - $properties['pushedAt'] = $value; - - after_pushedAt: - - $value = $payload['size'] ?? null; - - if ($value === null) { - $missingFields[] = 'size'; - goto after_size; - } - - $properties['size'] = $value; - - after_size: - - $value = $payload['ssh_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'ssh_url'; - goto after_sshUrl; - } - - $properties['sshUrl'] = $value; - - after_sshUrl: - - $value = $payload['stargazers_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'stargazers_count'; - goto after_stargazersCount; - } - - $properties['stargazersCount'] = $value; - - after_stargazersCount: - - $value = $payload['svn_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'svn_url'; - goto after_svnUrl; - } - - $properties['svnUrl'] = $value; - - after_svnUrl: - - $value = $payload['topics'] ?? null; - - if ($value === null) { - $properties['topics'] = null; - goto after_topics; - } - - $properties['topics'] = $value; - - after_topics: - - $value = $payload['watchers'] ?? null; - - if ($value === null) { - $missingFields[] = 'watchers'; - goto after_watchers; - } - - $properties['watchers'] = $value; - - after_watchers: - - $value = $payload['watchers_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'watchers_count'; - goto after_watchersCount; - } - - $properties['watchersCount'] = $value; - - after_watchersCount: - - $value = $payload['created_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; - } - - $properties['createdAt'] = $value; - - after_createdAt: - - $value = $payload['updated_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'updated_at'; - goto after_updatedAt; - } - - $properties['updatedAt'] = $value; - - after_updatedAt: - - $value = $payload['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: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner - { - $properties = []; - $missingFields = []; - try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $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['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions - { - $properties = []; - $missingFields = []; - try { - $value = $payload['admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'admin'; - 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) { - $missingFields[] = 'push'; - 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) { - $missingFields[] = 'pull'; - goto after_pull; - } - - $properties['pull'] = $value; - - after_pull: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple - { - $properties = []; - $missingFields = []; - try { - $value = $payload['key'] ?? null; - - if ($value === null) { - $missingFields[] = 'key'; - goto after_key; - } - - $properties['key'] = $value; - - after_key: - - $value = $payload['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $properties['url'] = null; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['spdx_id'] ?? null; - - if ($value === null) { - $properties['spdxId'] = null; - goto after_spdxId; - } - - $properties['spdxId'] = $value; - - after_spdxId: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $properties['htmlUrl'] = null; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new LicenseSimple(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\User - { - $properties = []; - $missingFields = []; - try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $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['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\User', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\User::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\User(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\User', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links(array $payload): Links - { - $properties = []; - $missingFields = []; - try { - $value = $payload['comments'] ?? null; - - if ($value === null) { - $missingFields[] = 'comments'; - goto after_comments; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'comments'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['comments'] = $value; - - after_comments: - - $value = $payload['commits'] ?? null; - - if ($value === null) { - $missingFields[] = 'commits'; - goto after_commits; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'commits'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['commits'] = $value; - - after_commits: - - $value = $payload['statuses'] ?? null; - - if ($value === null) { - $missingFields[] = 'statuses'; - goto after_statuses; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'statuses'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['statuses'] = $value; - - after_statuses: - - $value = $payload['html'] ?? null; - - if ($value === null) { - $missingFields[] = 'html'; - goto after_html; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'html'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['html'] = $value; - - after_html: - - $value = $payload['issue'] ?? null; - - if ($value === null) { - $missingFields[] = 'issue'; - goto after_issue; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'issue'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['issue'] = $value; - - after_issue: - - $value = $payload['review_comments'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comments'; - goto after_reviewComments; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'reviewComments'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['reviewComments'] = $value; - - after_reviewComments: - - $value = $payload['review_comment'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comment'; - goto after_reviewComment; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'reviewComment'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['reviewComment'] = $value; - - after_reviewComment: - - $value = $payload['self'] ?? null; - - if ($value === null) { - $missingFields[] = 'self'; - goto after_self; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'self'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['self'] = $value; - - after_self: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Links::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new Links(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link(array $payload): Link - { - $properties = []; - $missingFields = []; - try { - $value = $payload['href'] ?? null; - - if ($value === null) { - $missingFields[] = 'href'; - goto after_href; - } - - $properties['href'] = $value; - - after_href: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Link::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new Link(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge(array $payload): AutoMerge - { - $properties = []; - $missingFields = []; - try { - $value = $payload['enabled_by'] ?? null; - - if ($value === null) { - $missingFields[] = 'enabled_by'; - goto after_enabledBy; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'enabledBy'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['enabledBy'] = $value; - - after_enabledBy: - - $value = $payload['merge_method'] ?? null; - - if ($value === null) { - $missingFields[] = 'merge_method'; - goto after_mergeMethod; - } - - $properties['mergeMethod'] = $value; - - after_mergeMethod: - - $value = $payload['commit_title'] ?? null; - - if ($value === null) { - $missingFields[] = 'commit_title'; - goto after_commitTitle; - } - - $properties['commitTitle'] = $value; - - after_commitTitle: - - $value = $payload['commit_message'] ?? null; - - if ($value === null) { - $missingFields[] = 'commit_message'; - goto after_commitMessage; - } - - $properties['commitMessage'] = $value; - - after_commitMessage: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(AutoMerge::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new AutoMerge(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError - { - $properties = []; - $missingFields = []; - try { - $value = $payload['message'] ?? null; - - if ($value === null) { - $properties['message'] = null; - goto after_message; - } - - $properties['message'] = $value; - - after_message: - - $value = $payload['documentation_url'] ?? null; - - if ($value === null) { - $properties['documentationUrl'] = null; - goto after_documentationUrl; - } - - $properties['documentationUrl'] = $value; - - after_documentationUrl: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $properties['url'] = null; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['status'] ?? null; - - if ($value === null) { - $properties['status'] = null; - goto after_status; - } - - $properties['status'] = $value; - - after_status: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new BasicError(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); - } - } - - private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array - { - foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { - return [$accessor => $payloadType] + $this->{$method}($object); - } - } - - throw new LogicException('No type mapped for object of class: ' . $object::class); - } - - public function serializeObject(object $object): mixed - { - return $this->serializeObjectOfType($object, $object::class); - } - - /** - * @param T $object - * @param class-string $className - * - * @template T - */ - public function serializeObjectOfType(object $object, string $className): mixed - { - try { - return match ($className) { - 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($object), - 'ApiClients\Client\GitHub\Schema\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), - 'ApiClients\Client\GitHub\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\User' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($object), - 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\User' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($object), - 'ApiClients\Client\GitHub\Schema\Link' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($object), - 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($object), - 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), - default => throw new LogicException("No serialization defined for $className"), - }; - } catch (Throwable $exception) { - throw UnableToSerializeObject::dueToError($className, $exception); - } - } - - private function serializeValuearray(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeArrayItems(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeUuidToString(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueDateTime(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeDateTime(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueDateTimeImmutable(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeDateTime(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueDateTimeInterface(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeDateTime(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError(mixed $object): mixed - { - assert($object instanceof ValidationError); - $result = []; - - $message = $object->message; - after_message: $result['message'] = $message; - - $documentationUrl = $object->documentationUrl; - after_documentationUrl: $result['documentation_url'] = $documentationUrl; - - $errors = $object->errors; - - if ($errors === null) { - goto after_errors; - } - - static $errorsSerializer0; - - if ($errorsSerializer0 === null) { - $errorsSerializer0 = new SerializeArrayItems(...[]); - } - - $errors = $errorsSerializer0->serialize($errors, $this); - after_errors: $result['errors'] = $errors; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest(mixed $object): mixed - { - assert($object instanceof PullRequest); - $result = []; - - $url = $object->url; - after_url: $result['url'] = $url; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $diffUrl = $object->diffUrl; - after_diffUrl: $result['diff_url'] = $diffUrl; - - $patchUrl = $object->patchUrl; - after_patchUrl: $result['patch_url'] = $patchUrl; - - $issueUrl = $object->issueUrl; - after_issueUrl: $result['issue_url'] = $issueUrl; - - $commitsUrl = $object->commitsUrl; - after_commitsUrl: $result['commits_url'] = $commitsUrl; - - $reviewCommentsUrl = $object->reviewCommentsUrl; - after_reviewCommentsUrl: $result['review_comments_url'] = $reviewCommentsUrl; - - $reviewCommentUrl = $object->reviewCommentUrl; - after_reviewCommentUrl: $result['review_comment_url'] = $reviewCommentUrl; - - $commentsUrl = $object->commentsUrl; - after_commentsUrl: $result['comments_url'] = $commentsUrl; - - $statusesUrl = $object->statusesUrl; - after_statusesUrl: $result['statuses_url'] = $statusesUrl; - - $number = $object->number; - after_number: $result['number'] = $number; - - $state = $object->state; - after_state: $result['state'] = $state; - - $locked = $object->locked; - after_locked: $result['locked'] = $locked; - - $title = $object->title; - after_title: $result['title'] = $title; - - $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); - after_user: $result['user'] = $user; - - $body = $object->body; - - if ($body === null) { - goto after_body; - } - - after_body: $result['body'] = $body; - - $labels = $object->labels; - static $labelsSerializer0; - - if ($labelsSerializer0 === null) { - $labelsSerializer0 = new SerializeArrayItems(...[]); - } - - $labels = $labelsSerializer0->serialize($labels, $this); - after_labels: $result['labels'] = $labels; - - $milestone = $object->milestone; - - if ($milestone === null) { - goto after_milestone; - } - - $milestone = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($milestone); - after_milestone: $result['milestone'] = $milestone; - - $activeLockReason = $object->activeLockReason; - - if ($activeLockReason === null) { - goto after_activeLockReason; - } - - after_activeLockReason: $result['active_lock_reason'] = $activeLockReason; - - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; - - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; - - $closedAt = $object->closedAt; - - if ($closedAt === null) { - goto after_closedAt; - } - - after_closedAt: $result['closed_at'] = $closedAt; - - $mergedAt = $object->mergedAt; - - if ($mergedAt === null) { - goto after_mergedAt; - } - - after_mergedAt: $result['merged_at'] = $mergedAt; - - $mergeCommitSha = $object->mergeCommitSha; - - if ($mergeCommitSha === null) { - goto after_mergeCommitSha; - } - - after_mergeCommitSha: $result['merge_commit_sha'] = $mergeCommitSha; - - $assignee = $object->assignee; - - if ($assignee === null) { - goto after_assignee; - } - - $assignee = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($assignee); - after_assignee: $result['assignee'] = $assignee; - - $assignees = $object->assignees; - - if ($assignees === null) { - goto after_assignees; - } - - static $assigneesSerializer0; - - if ($assigneesSerializer0 === null) { - $assigneesSerializer0 = new SerializeArrayItems(...[]); - } - - $assignees = $assigneesSerializer0->serialize($assignees, $this); - after_assignees: $result['assignees'] = $assignees; - - $requestedReviewers = $object->requestedReviewers; - - if ($requestedReviewers === null) { - goto after_requestedReviewers; - } - - static $requestedReviewersSerializer0; - - if ($requestedReviewersSerializer0 === null) { - $requestedReviewersSerializer0 = new SerializeArrayItems(...[]); - } - - $requestedReviewers = $requestedReviewersSerializer0->serialize($requestedReviewers, $this); - after_requestedReviewers: $result['requested_reviewers'] = $requestedReviewers; - - $requestedTeams = $object->requestedTeams; - - if ($requestedTeams === null) { - goto after_requestedTeams; - } - - static $requestedTeamsSerializer0; - - if ($requestedTeamsSerializer0 === null) { - $requestedTeamsSerializer0 = new SerializeArrayItems(...[]); - } - - $requestedTeams = $requestedTeamsSerializer0->serialize($requestedTeams, $this); - after_requestedTeams: $result['requested_teams'] = $requestedTeams; - - $head = $object->head; - $head = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($head); - after_head: $result['head'] = $head; - - $base = $object->base; - $base = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($base); - after_base: $result['base'] = $base; - - $links = $object->links; - $links = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($links); - after_links: $result['_links'] = $links; - - $authorAssociation = $object->authorAssociation; - after_authorAssociation: $result['author_association'] = $authorAssociation; - - $autoMerge = $object->autoMerge; - - if ($autoMerge === null) { - goto after_autoMerge; - } - - $autoMerge = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($autoMerge); - after_autoMerge: $result['auto_merge'] = $autoMerge; - - $draft = $object->draft; - - if ($draft === null) { - goto after_draft; - } - - after_draft: $result['draft'] = $draft; - - $merged = $object->merged; - after_merged: $result['merged'] = $merged; - - $mergeable = $object->mergeable; - - if ($mergeable === null) { - goto after_mergeable; - } - - after_mergeable: $result['mergeable'] = $mergeable; - - $rebaseable = $object->rebaseable; - - if ($rebaseable === null) { - goto after_rebaseable; - } - - after_rebaseable: $result['rebaseable'] = $rebaseable; - - $mergeableState = $object->mergeableState; - after_mergeableState: $result['mergeable_state'] = $mergeableState; - - $mergedBy = $object->mergedBy; - - if ($mergedBy === null) { - goto after_mergedBy; - } - - $mergedBy = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($mergedBy); - after_mergedBy: $result['merged_by'] = $mergedBy; - - $comments = $object->comments; - after_comments: $result['comments'] = $comments; - - $reviewComments = $object->reviewComments; - after_reviewComments: $result['review_comments'] = $reviewComments; - - $maintainerCanModify = $object->maintainerCanModify; - after_maintainerCanModify: $result['maintainer_can_modify'] = $maintainerCanModify; - - $commits = $object->commits; - after_commits: $result['commits'] = $commits; - - $additions = $object->additions; - after_additions: $result['additions'] = $additions; - - $deletions = $object->deletions; - after_deletions: $result['deletions'] = $deletions; - - $changedFiles = $object->changedFiles; - after_changedFiles: $result['changed_files'] = $changedFiles; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($object), + 'ApiClients\Client\GitHub\Schema\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), + 'ApiClients\Client\GitHub\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($object), + 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($object), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($object), + 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($object), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($object), + 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($object), + 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($object), + 'ApiClients\Client\GitHub\Schema\Link' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($object), + 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($object), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone(mixed $object): mixed + private function serializeValuearray(mixed $value): mixed { - assert($object instanceof Milestone); - $result = []; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $labelsUrl = $object->labelsUrl; - after_labelsUrl: $result['labels_url'] = $labelsUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $number = $object->number; - after_number: $result['number'] = $number; - - $state = $object->state; - after_state: $result['state'] = $state; - - $title = $object->title; - after_title: $result['title'] = $title; - - $description = $object->description; + static $serializer; - if ($description === null) { - goto after_description; + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); } - after_description: $result['description'] = $description; + return $serializer->serialize($value, $this); + } - $creator = $object->creator; + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; - if ($creator === null) { - goto after_creator; + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); } - $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($creator); - after_creator: $result['creator'] = $creator; - - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; - - $closedIssues = $object->closedIssues; - after_closedIssues: $result['closed_issues'] = $closedIssues; - - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; - - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + return $serializer->serialize($value, $this); + } - $closedAt = $object->closedAt; + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; - if ($closedAt === null) { - goto after_closedAt; + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); } - after_closedAt: $result['closed_at'] = $closedAt; + return $serializer->serialize($value, $this); + } - $dueOn = $object->dueOn; + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; - if ($dueOn === null) { - goto after_dueOn; + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); } - after_dueOn: $result['due_on'] = $dueOn; - - return $result; + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head(mixed $object): mixed + private function serializeValueDateTimeInterface(mixed $value): mixed { - assert($object instanceof Head); - $result = []; - - $label = $object->label; - after_label: $result['label'] = $label; - - $ref = $object->ref; - after_ref: $result['ref'] = $ref; - - $repo = $object->repo; + static $serializer; - if ($repo === null) { - goto after_repo; + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); } - $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($repo); - after_repo: $result['repo'] = $repo; - - $sha = $object->sha; - after_sha: $result['sha'] = $sha; - - $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($user); - after_user: $result['user'] = $user; - - return $result; + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError(mixed $object): mixed { - assert($object instanceof Repo); + assert($object instanceof ValidationError); $result = []; - $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; + $message = $object->message; + after_message: $result['message'] = $message; - $deploymentsUrl = $object->deploymentsUrl; - after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + $documentationUrl = $object->documentationUrl; + after_documentationUrl: $result['documentation_url'] = $documentationUrl; - $description = $object->description; + $errors = $object->errors; - if ($description === null) { - goto after_description; + if ($errors === null) { + goto after_errors; } - after_description: $result['description'] = $description; - - $downloadsUrl = $object->downloadsUrl; - after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $fork = $object->fork; - after_fork: $result['fork'] = $fork; - - $forksUrl = $object->forksUrl; - after_forksUrl: $result['forks_url'] = $forksUrl; - - $fullName = $object->fullName; - after_fullName: $result['full_name'] = $fullName; + static $errorsSerializer0; - $gitCommitsUrl = $object->gitCommitsUrl; - after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + if ($errorsSerializer0 === null) { + $errorsSerializer0 = new SerializeArrayItems(...[]); + } - $gitRefsUrl = $object->gitRefsUrl; - after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + $errors = $errorsSerializer0->serialize($errors, $this); + after_errors: $result['errors'] = $errors; - $gitTagsUrl = $object->gitTagsUrl; - after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + return $result; + } - $hooksUrl = $object->hooksUrl; - after_hooksUrl: $result['hooks_url'] = $hooksUrl; + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest(mixed $object): mixed + { + assert($object instanceof PullRequest); + $result = []; - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + $url = $object->url; + after_url: $result['url'] = $url; $id = $object->id; after_id: $result['id'] = $id; @@ -5617,296 +3132,287 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $nodeId = $object->nodeId; after_nodeId: $result['node_id'] = $nodeId; - $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; + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - $name = $object->name; - after_name: $result['name'] = $name; + $diffUrl = $object->diffUrl; + after_diffUrl: $result['diff_url'] = $diffUrl; - $notificationsUrl = $object->notificationsUrl; - after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + $patchUrl = $object->patchUrl; + after_patchUrl: $result['patch_url'] = $patchUrl; - $owner = $object->owner; - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($owner); - after_owner: $result['owner'] = $owner; + $issueUrl = $object->issueUrl; + after_issueUrl: $result['issue_url'] = $issueUrl; - $private = $object->private; - after_private: $result['private'] = $private; + $commitsUrl = $object->commitsUrl; + after_commitsUrl: $result['commits_url'] = $commitsUrl; - $pullsUrl = $object->pullsUrl; - after_pullsUrl: $result['pulls_url'] = $pullsUrl; + $reviewCommentsUrl = $object->reviewCommentsUrl; + after_reviewCommentsUrl: $result['review_comments_url'] = $reviewCommentsUrl; - $releasesUrl = $object->releasesUrl; - after_releasesUrl: $result['releases_url'] = $releasesUrl; + $reviewCommentUrl = $object->reviewCommentUrl; + after_reviewCommentUrl: $result['review_comment_url'] = $reviewCommentUrl; - $stargazersUrl = $object->stargazersUrl; - after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; $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; + $number = $object->number; + after_number: $result['number'] = $number; - $tagsUrl = $object->tagsUrl; - after_tagsUrl: $result['tags_url'] = $tagsUrl; + $state = $object->state; + after_state: $result['state'] = $state; - $teamsUrl = $object->teamsUrl; - after_teamsUrl: $result['teams_url'] = $teamsUrl; + $locked = $object->locked; + after_locked: $result['locked'] = $locked; - $treesUrl = $object->treesUrl; - after_treesUrl: $result['trees_url'] = $treesUrl; + $title = $object->title; + after_title: $result['title'] = $title; - $url = $object->url; - after_url: $result['url'] = $url; + $user = $object->user; + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); + after_user: $result['user'] = $user; - $cloneUrl = $object->cloneUrl; - after_cloneUrl: $result['clone_url'] = $cloneUrl; + $body = $object->body; - $defaultBranch = $object->defaultBranch; - after_defaultBranch: $result['default_branch'] = $defaultBranch; + if ($body === null) { + goto after_body; + } - $forks = $object->forks; - after_forks: $result['forks'] = $forks; + after_body: $result['body'] = $body; - $forksCount = $object->forksCount; - after_forksCount: $result['forks_count'] = $forksCount; + $labels = $object->labels; + static $labelsSerializer0; - $gitUrl = $object->gitUrl; - after_gitUrl: $result['git_url'] = $gitUrl; + if ($labelsSerializer0 === null) { + $labelsSerializer0 = new SerializeArrayItems(...[]); + } - $hasDownloads = $object->hasDownloads; - after_hasDownloads: $result['has_downloads'] = $hasDownloads; + $labels = $labelsSerializer0->serialize($labels, $this); + after_labels: $result['labels'] = $labels; - $hasIssues = $object->hasIssues; - after_hasIssues: $result['has_issues'] = $hasIssues; + $milestone = $object->milestone; - $hasProjects = $object->hasProjects; - after_hasProjects: $result['has_projects'] = $hasProjects; + if ($milestone === null) { + goto after_milestone; + } - $hasWiki = $object->hasWiki; - after_hasWiki: $result['has_wiki'] = $hasWiki; + $milestone = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($milestone); + after_milestone: $result['milestone'] = $milestone; - $hasPages = $object->hasPages; - after_hasPages: $result['has_pages'] = $hasPages; + $activeLockReason = $object->activeLockReason; - $hasDiscussions = $object->hasDiscussions; - after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + if ($activeLockReason === null) { + goto after_activeLockReason; + } - $homepage = $object->homepage; + after_activeLockReason: $result['active_lock_reason'] = $activeLockReason; - if ($homepage === null) { - goto after_homepage; - } + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; - after_homepage: $result['homepage'] = $homepage; + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; - $language = $object->language; + $closedAt = $object->closedAt; - if ($language === null) { - goto after_language; + if ($closedAt === null) { + goto after_closedAt; } - after_language: $result['language'] = $language; + after_closedAt: $result['closed_at'] = $closedAt; - $masterBranch = $object->masterBranch; + $mergedAt = $object->mergedAt; - if ($masterBranch === null) { - goto after_masterBranch; + if ($mergedAt === null) { + goto after_mergedAt; } - after_masterBranch: $result['master_branch'] = $masterBranch; - - $archived = $object->archived; - after_archived: $result['archived'] = $archived; - - $disabled = $object->disabled; - after_disabled: $result['disabled'] = $disabled; + after_mergedAt: $result['merged_at'] = $mergedAt; - $visibility = $object->visibility; + $mergeCommitSha = $object->mergeCommitSha; - if ($visibility === null) { - goto after_visibility; + if ($mergeCommitSha === null) { + goto after_mergeCommitSha; } - after_visibility: $result['visibility'] = $visibility; + after_mergeCommitSha: $result['merge_commit_sha'] = $mergeCommitSha; - $mirrorUrl = $object->mirrorUrl; + $assignee = $object->assignee; - if ($mirrorUrl === null) { - goto after_mirrorUrl; + if ($assignee === null) { + goto after_assignee; } - after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + $assignee = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($assignee); + after_assignee: $result['assignee'] = $assignee; - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; + $assignees = $object->assignees; - $openIssuesCount = $object->openIssuesCount; - after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + if ($assignees === null) { + goto after_assignees; + } - $permissions = $object->permissions; + static $assigneesSerializer0; - if ($permissions === null) { - goto after_permissions; + if ($assigneesSerializer0 === null) { + $assigneesSerializer0 = new SerializeArrayItems(...[]); } - $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($permissions); - after_permissions: $result['permissions'] = $permissions; + $assignees = $assigneesSerializer0->serialize($assignees, $this); + after_assignees: $result['assignees'] = $assignees; - $tempCloneToken = $object->tempCloneToken; + $requestedReviewers = $object->requestedReviewers; - if ($tempCloneToken === null) { - goto after_tempCloneToken; + if ($requestedReviewers === null) { + goto after_requestedReviewers; } - after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; - - $allowMergeCommit = $object->allowMergeCommit; + static $requestedReviewersSerializer0; - if ($allowMergeCommit === null) { - goto after_allowMergeCommit; + if ($requestedReviewersSerializer0 === null) { + $requestedReviewersSerializer0 = new SerializeArrayItems(...[]); } - after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + $requestedReviewers = $requestedReviewersSerializer0->serialize($requestedReviewers, $this); + after_requestedReviewers: $result['requested_reviewers'] = $requestedReviewers; - $allowSquashMerge = $object->allowSquashMerge; + $requestedTeams = $object->requestedTeams; - if ($allowSquashMerge === null) { - goto after_allowSquashMerge; + if ($requestedTeams === null) { + goto after_requestedTeams; } - after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; - - $allowRebaseMerge = $object->allowRebaseMerge; + static $requestedTeamsSerializer0; - if ($allowRebaseMerge === null) { - goto after_allowRebaseMerge; + if ($requestedTeamsSerializer0 === null) { + $requestedTeamsSerializer0 = new SerializeArrayItems(...[]); } - after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; - - $license = $object->license; + $requestedTeams = $requestedTeamsSerializer0->serialize($requestedTeams, $this); + after_requestedTeams: $result['requested_teams'] = $requestedTeams; - if ($license === null) { - goto after_license; - } + $head = $object->head; + $head = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($head); + after_head: $result['head'] = $head; - $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($license); - after_license: $result['license'] = $license; + $base = $object->base; + $base = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($base); + after_base: $result['base'] = $base; - $pushedAt = $object->pushedAt; - after_pushedAt: $result['pushed_at'] = $pushedAt; + $links = $object->links; + $links = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($links); + after_links: $result['_links'] = $links; - $size = $object->size; - after_size: $result['size'] = $size; + $authorAssociation = $object->authorAssociation; + after_authorAssociation: $result['author_association'] = $authorAssociation; - $sshUrl = $object->sshUrl; - after_sshUrl: $result['ssh_url'] = $sshUrl; + $autoMerge = $object->autoMerge; - $stargazersCount = $object->stargazersCount; - after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + if ($autoMerge === null) { + goto after_autoMerge; + } - $svnUrl = $object->svnUrl; - after_svnUrl: $result['svn_url'] = $svnUrl; + $autoMerge = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($autoMerge); + after_autoMerge: $result['auto_merge'] = $autoMerge; - $topics = $object->topics; + $draft = $object->draft; - if ($topics === null) { - goto after_topics; + if ($draft === null) { + goto after_draft; } - static $topicsSerializer0; + after_draft: $result['draft'] = $draft; - if ($topicsSerializer0 === null) { - $topicsSerializer0 = new SerializeArrayItems(...[]); + $merged = $object->merged; + after_merged: $result['merged'] = $merged; + + $mergeable = $object->mergeable; + + if ($mergeable === null) { + goto after_mergeable; } - $topics = $topicsSerializer0->serialize($topics, $this); - after_topics: $result['topics'] = $topics; + after_mergeable: $result['mergeable'] = $mergeable; - $watchers = $object->watchers; - after_watchers: $result['watchers'] = $watchers; + $rebaseable = $object->rebaseable; - $watchersCount = $object->watchersCount; - after_watchersCount: $result['watchers_count'] = $watchersCount; + if ($rebaseable === null) { + goto after_rebaseable; + } - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + after_rebaseable: $result['rebaseable'] = $rebaseable; - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + $mergeableState = $object->mergeableState; + after_mergeableState: $result['mergeable_state'] = $mergeableState; - $allowForking = $object->allowForking; + $mergedBy = $object->mergedBy; - if ($allowForking === null) { - goto after_allowForking; + if ($mergedBy === null) { + goto after_mergedBy; } - after_allowForking: $result['allow_forking'] = $allowForking; + $mergedBy = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($mergedBy); + after_mergedBy: $result['merged_by'] = $mergedBy; - $isTemplate = $object->isTemplate; + $comments = $object->comments; + after_comments: $result['comments'] = $comments; - if ($isTemplate === null) { - goto after_isTemplate; - } + $reviewComments = $object->reviewComments; + after_reviewComments: $result['review_comments'] = $reviewComments; - after_isTemplate: $result['is_template'] = $isTemplate; + $maintainerCanModify = $object->maintainerCanModify; + after_maintainerCanModify: $result['maintainer_can_modify'] = $maintainerCanModify; - $webCommitSignoffRequired = $object->webCommitSignoffRequired; + $commits = $object->commits; + after_commits: $result['commits'] = $commits; - if ($webCommitSignoffRequired === null) { - goto after_webCommitSignoffRequired; - } + $additions = $object->additions; + after_additions: $result['additions'] = $additions; - after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; + $deletions = $object->deletions; + after_deletions: $result['deletions'] = $deletions; + + $changedFiles = $object->changedFiles; + after_changedFiles: $result['changed_files'] = $changedFiles; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed { - assert($object instanceof Owner); + assert($object instanceof SimpleUser); $result = []; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; + $name = $object->name; - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; + if ($name === null) { + goto after_name; + } - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + after_name: $result['name'] = $name; - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $email = $object->email; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + 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; @@ -5916,41 +3422,52 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_gravatarId: $result['gravatar_id'] = $gravatarId; + $url = $object->url; + after_url: $result['url'] = $url; + $htmlUrl = $object->htmlUrl; after_htmlUrl: $result['html_url'] = $htmlUrl; - $id = $object->id; - after_id: $result['id'] = $id; + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; - $login = $object->login; - after_login: $result['login'] = $login; + $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; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + $type = $object->type; + after_type: $result['type'] = $type; $siteAdmin = $object->siteAdmin; after_siteAdmin: $result['site_admin'] = $siteAdmin; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $starredAt = $object->starredAt; - $type = $object->type; - after_type: $result['type'] = $type; + if ($starredAt === null) { + goto after_starredAt; + } - $url = $object->url; - after_url: $result['url'] = $url; + after_starredAt: $result['starred_at'] = $starredAt; $userViewType = $object->userViewType; @@ -5963,150 +3480,86 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(mixed $object): mixed - { - assert($object instanceof Permissions); - $result = []; - - $admin = $object->admin; - after_admin: $result['admin'] = $admin; - - $maintain = $object->maintain; - - if ($maintain === null) { - goto after_maintain; - } - - after_maintain: $result['maintain'] = $maintain; - - $push = $object->push; - after_push: $result['push'] = $push; - - $triage = $object->triage; - - if ($triage === null) { - goto after_triage; - } - - after_triage: $result['triage'] = $triage; - - $pull = $object->pull; - after_pull: $result['pull'] = $pull; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone(mixed $object): mixed { - assert($object instanceof License); + assert($object instanceof Milestone); $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; - } - + $url = $object->url; after_url: $result['url'] = $url; - $spdxId = $object->spdxId; + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - if ($spdxId === null) { - goto after_spdxId; - } + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; - after_spdxId: $result['spdx_id'] = $spdxId; + $id = $object->id; + after_id: $result['id'] = $id; $nodeId = $object->nodeId; after_nodeId: $result['node_id'] = $nodeId; - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User(mixed $object): mixed - { - assert($object instanceof User); - $result = []; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + $number = $object->number; + after_number: $result['number'] = $number; - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $state = $object->state; + after_state: $result['state'] = $state; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + $title = $object->title; + after_title: $result['title'] = $title; - $gravatarId = $object->gravatarId; + $description = $object->description; - if ($gravatarId === null) { - goto after_gravatarId; + if ($description === null) { + goto after_description; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; + after_description: $result['description'] = $description; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $creator = $object->creator; - $login = $object->login; - after_login: $result['login'] = $login; + if ($creator === null) { + goto after_creator; + } - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($creator); + after_creator: $result['creator'] = $creator; - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + $closedIssues = $object->closedIssues; + after_closedIssues: $result['closed_issues'] = $closedIssues; - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $closedAt = $object->closedAt; - $type = $object->type; - after_type: $result['type'] = $type; + if ($closedAt === null) { + goto after_closedAt; + } - $url = $object->url; - after_url: $result['url'] = $url; + after_closedAt: $result['closed_at'] = $closedAt; - $userViewType = $object->userViewType; + $dueOn = $object->dueOn; - if ($userViewType === null) { - goto after_userViewType; + if ($dueOn === null) { + goto after_dueOn; } - after_userViewType: $result['user_view_type'] = $userViewType; + after_dueOn: $result['due_on'] = $dueOn; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head(mixed $object): mixed { - assert($object instanceof Base); + assert($object instanceof Head); $result = []; $label = $object->label; @@ -6116,24 +3569,81 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_ref: $result['ref'] = $ref; $repo = $object->repo; - $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($repo); + $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($repo); after_repo: $result['repo'] = $repo; $sha = $object->sha; after_sha: $result['sha'] = $sha; $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($user); + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); after_user: $result['user'] = $user; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo); + assert($object instanceof Repository); $result = []; + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + after_fullName: $result['full_name'] = $fullName; + + $license = $object->license; + + if ($license === null) { + goto after_license; + } + + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $forks = $object->forks; + after_forks: $result['forks'] = $forks; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + after_fork: $result['fork'] = $fork; + + $url = $object->url; + after_url: $result['url'] = $url; + $archiveUrl = $object->archiveUrl; after_archiveUrl: $result['archive_url'] = $archiveUrl; @@ -6167,29 +3677,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $deploymentsUrl = $object->deploymentsUrl; after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; - $description = $object->description; - - if ($description === null) { - goto after_description; - } - - after_description: $result['description'] = $description; - $downloadsUrl = $object->downloadsUrl; after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; $eventsUrl = $object->eventsUrl; after_eventsUrl: $result['events_url'] = $eventsUrl; - $fork = $object->fork; - after_fork: $result['fork'] = $fork; - $forksUrl = $object->forksUrl; after_forksUrl: $result['forks_url'] = $forksUrl; - $fullName = $object->fullName; - after_fullName: $result['full_name'] = $fullName; - $gitCommitsUrl = $object->gitCommitsUrl; after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; @@ -6199,25 +3695,8 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $gitTagsUrl = $object->gitTagsUrl; after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; - $hooksUrl = $object->hooksUrl; - after_hooksUrl: $result['hooks_url'] = $hooksUrl; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $isTemplate = $object->isTemplate; - - if ($isTemplate === null) { - goto after_isTemplate; - } - - after_isTemplate: $result['is_template'] = $isTemplate; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $gitUrl = $object->gitUrl; + after_gitUrl: $result['git_url'] = $gitUrl; $issueCommentUrl = $object->issueCommentUrl; after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; @@ -6243,25 +3722,18 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $milestonesUrl = $object->milestonesUrl; after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; - $name = $object->name; - after_name: $result['name'] = $name; - $notificationsUrl = $object->notificationsUrl; after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; - $owner = $object->owner; - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($owner); - after_owner: $result['owner'] = $owner; - - $private = $object->private; - after_private: $result['private'] = $private; - $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; @@ -6283,41 +3755,22 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $treesUrl = $object->treesUrl; after_treesUrl: $result['trees_url'] = $treesUrl; - $url = $object->url; - after_url: $result['url'] = $url; - $cloneUrl = $object->cloneUrl; after_cloneUrl: $result['clone_url'] = $cloneUrl; - $defaultBranch = $object->defaultBranch; - after_defaultBranch: $result['default_branch'] = $defaultBranch; - - $forks = $object->forks; - after_forks: $result['forks'] = $forks; - - $forksCount = $object->forksCount; - after_forksCount: $result['forks_count'] = $forksCount; - - $gitUrl = $object->gitUrl; - after_gitUrl: $result['git_url'] = $gitUrl; - - $hasDownloads = $object->hasDownloads; - after_hasDownloads: $result['has_downloads'] = $hasDownloads; - - $hasIssues = $object->hasIssues; - after_hasIssues: $result['has_issues'] = $hasIssues; + $mirrorUrl = $object->mirrorUrl; - $hasProjects = $object->hasProjects; - after_hasProjects: $result['has_projects'] = $hasProjects; + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } - $hasWiki = $object->hasWiki; - after_hasWiki: $result['has_wiki'] = $hasWiki; + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; - $hasPages = $object->hasPages; - after_hasPages: $result['has_pages'] = $hasPages; + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; - $hasDiscussions = $object->hasDiscussions; - after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; $homepage = $object->homepage; @@ -6335,74 +3788,107 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_language: $result['language'] = $language; - $masterBranch = $object->masterBranch; + $forksCount = $object->forksCount; + after_forksCount: $result['forks_count'] = $forksCount; - if ($masterBranch === null) { - goto after_masterBranch; + $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_masterBranch: $result['master_branch'] = $masterBranch; + after_isTemplate: $result['is_template'] = $isTemplate; - $archived = $object->archived; - after_archived: $result['archived'] = $archived; + $topics = $object->topics; - $disabled = $object->disabled; - after_disabled: $result['disabled'] = $disabled; + if ($topics === null) { + goto after_topics; + } - $visibility = $object->visibility; + static $topicsSerializer0; - if ($visibility === null) { - goto after_visibility; + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); } - after_visibility: $result['visibility'] = $visibility; + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; - $mirrorUrl = $object->mirrorUrl; + $hasIssues = $object->hasIssues; + after_hasIssues: $result['has_issues'] = $hasIssues; - if ($mirrorUrl === null) { - goto after_mirrorUrl; + $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_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; + $archived = $object->archived; + after_archived: $result['archived'] = $archived; - $openIssuesCount = $object->openIssuesCount; - after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + $disabled = $object->disabled; + after_disabled: $result['disabled'] = $disabled; - $permissions = $object->permissions; + $visibility = $object->visibility; - if ($permissions === null) { - goto after_permissions; + if ($visibility === null) { + goto after_visibility; } - $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($permissions); - after_permissions: $result['permissions'] = $permissions; + after_visibility: $result['visibility'] = $visibility; - $tempCloneToken = $object->tempCloneToken; + $pushedAt = $object->pushedAt; - if ($tempCloneToken === null) { - goto after_tempCloneToken; + if ($pushedAt === null) { + goto after_pushedAt; } - after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + after_pushedAt: $result['pushed_at'] = $pushedAt; - $allowMergeCommit = $object->allowMergeCommit; + $createdAt = $object->createdAt; - if ($allowMergeCommit === null) { - goto after_allowMergeCommit; + if ($createdAt === null) { + goto after_createdAt; } - after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + after_createdAt: $result['created_at'] = $createdAt; - $allowSquashMerge = $object->allowSquashMerge; + $updatedAt = $object->updatedAt; - if ($allowSquashMerge === null) { - goto after_allowSquashMerge; + if ($updatedAt === null) { + goto after_updatedAt; } - after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + after_updatedAt: $result['updated_at'] = $updatedAt; $allowRebaseMerge = $object->allowRebaseMerge; @@ -6412,180 +3898,139 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; - $license = $object->license; + $tempCloneToken = $object->tempCloneToken; - if ($license === null) { - goto after_license; + if ($tempCloneToken === null) { + goto after_tempCloneToken; } - $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); - after_license: $result['license'] = $license; - - $pushedAt = $object->pushedAt; - after_pushedAt: $result['pushed_at'] = $pushedAt; - - $size = $object->size; - after_size: $result['size'] = $size; + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; - $sshUrl = $object->sshUrl; - after_sshUrl: $result['ssh_url'] = $sshUrl; + $allowSquashMerge = $object->allowSquashMerge; - $stargazersCount = $object->stargazersCount; - after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } - $svnUrl = $object->svnUrl; - after_svnUrl: $result['svn_url'] = $svnUrl; + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; - $topics = $object->topics; + $allowAutoMerge = $object->allowAutoMerge; - if ($topics === null) { - goto after_topics; + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; } - static $topicsSerializer0; + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; - if ($topicsSerializer0 === null) { - $topicsSerializer0 = new SerializeArrayItems(...[]); - } + $deleteBranchOnMerge = $object->deleteBranchOnMerge; - $topics = $topicsSerializer0->serialize($topics, $this); - after_topics: $result['topics'] = $topics; + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } - $watchers = $object->watchers; - after_watchers: $result['watchers'] = $watchers; + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; - $watchersCount = $object->watchersCount; - after_watchersCount: $result['watchers_count'] = $watchersCount; + $allowUpdateBranch = $object->allowUpdateBranch; - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; - $allowForking = $object->allowForking; + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; - if ($allowForking === null) { - goto after_allowForking; + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; } - after_allowForking: $result['allow_forking'] = $allowForking; + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; - $webCommitSignoffRequired = $object->webCommitSignoffRequired; + $squashMergeCommitTitle = $object->squashMergeCommitTitle; - if ($webCommitSignoffRequired === null) { - goto after_webCommitSignoffRequired; + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; } - after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; - - return $result; - } + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner); - $result = []; + $squashMergeCommitMessage = $object->squashMergeCommitMessage; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + $mergeCommitTitle = $object->mergeCommitTitle; - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; - $gravatarId = $object->gravatarId; + $mergeCommitMessage = $object->mergeCommitMessage; - if ($gravatarId === null) { - goto after_gravatarId; + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; - $id = $object->id; - after_id: $result['id'] = $id; + $allowMergeCommit = $object->allowMergeCommit; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } - $login = $object->login; - after_login: $result['login'] = $login; + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + $allowForking = $object->allowForking; - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + if ($allowForking === null) { + goto after_allowForking; + } - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + after_allowForking: $result['allow_forking'] = $allowForking; - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + $webCommitSignoffRequired = $object->webCommitSignoffRequired; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + if ($webCommitSignoffRequired === null) { + goto after_webCommitSignoffRequired; + } - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; - $type = $object->type; - after_type: $result['type'] = $type; + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - $url = $object->url; - after_url: $result['url'] = $url; + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; - $userViewType = $object->userViewType; + $masterBranch = $object->masterBranch; - if ($userViewType === null) { - goto after_userViewType; + if ($masterBranch === null) { + goto after_masterBranch; } - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions); - $result = []; - - $admin = $object->admin; - after_admin: $result['admin'] = $admin; + after_masterBranch: $result['master_branch'] = $masterBranch; - $maintain = $object->maintain; + $starredAt = $object->starredAt; - if ($maintain === null) { - goto after_maintain; + if ($starredAt === null) { + goto after_starredAt; } - after_maintain: $result['maintain'] = $maintain; - - $push = $object->push; - after_push: $result['push'] = $push; + after_starredAt: $result['starred_at'] = $starredAt; - $triage = $object->triage; + $anonymousAccessEnabled = $object->anonymousAccessEnabled; - if ($triage === null) { - goto after_triage; + if ($anonymousAccessEnabled === null) { + goto after_anonymousAccessEnabled; } - after_triage: $result['triage'] = $triage; - - $pull = $object->pull; - after_pull: $result['pull'] = $pull; + after_anonymousAccessEnabled: $result['anonymous_access_enabled'] = $anonymousAccessEnabled; return $result; } @@ -6631,77 +4076,60 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\User); + assert($object instanceof Permissions); $result = []; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $admin = $object->admin; + after_admin: $result['admin'] = $admin; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + $pull = $object->pull; + after_pull: $result['pull'] = $pull; - $gravatarId = $object->gravatarId; + $triage = $object->triage; - if ($gravatarId === null) { - goto after_gravatarId; + if ($triage === null) { + goto after_triage; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $login = $object->login; - after_login: $result['login'] = $login; + after_triage: $result['triage'] = $triage; - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + $push = $object->push; + after_push: $result['push'] = $push; - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + $maintain = $object->maintain; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + if ($maintain === null) { + goto after_maintain; + } - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + after_maintain: $result['maintain'] = $maintain; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + return $result; + } - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(mixed $object): mixed + { + assert($object instanceof Base); + $result = []; - $type = $object->type; - after_type: $result['type'] = $type; + $label = $object->label; + after_label: $result['label'] = $label; - $url = $object->url; - after_url: $result['url'] = $url; + $ref = $object->ref; + after_ref: $result['ref'] = $ref; - $userViewType = $object->userViewType; + $repo = $object->repo; + $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($repo); + after_repo: $result['repo'] = $repo; - if ($userViewType === null) { - goto after_userViewType; - } + $sha = $object->sha; + after_sha: $result['sha'] = $sha; - after_userViewType: $result['user_view_type'] = $userViewType; + $user = $object->user; + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); + after_user: $result['user'] = $user; return $result; } diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls/PullNumber.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls/PullNumber.php index 679f96729fe..d1e9195f7a0 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls/PullNumber.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Pulls/PullNumber.php @@ -13,12 +13,9 @@ use ApiClients\Client\GitHub\Schema\PullRequest; use ApiClients\Client\GitHub\Schema\PullRequest\Base; use ApiClients\Client\GitHub\Schema\PullRequest\Head; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions; -use ApiClients\Client\GitHub\Schema\PullRequest\Head\User; use ApiClients\Client\GitHub\Schema\PullRequest\Links; +use ApiClients\Client\GitHub\Schema\Repository; +use ApiClients\Client\GitHub\Schema\Repository\Permissions; use ApiClients\Client\GitHub\Schema\SimpleUser; use ApiClients\Client\GitHub\Schema\ValidationError; use EventSauce\ObjectHydrator\IterableList; @@ -60,17 +57,10 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\Milestone' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($payload), 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\User' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($payload), 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\User' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($payload), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($payload), + 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($payload), 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($payload), 'ApiClients\Client\GitHub\Schema\Link' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($payload), 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($payload), @@ -1195,14 +1185,14 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull $value = $payload['repo'] ?? null; if ($value === null) { - $properties['repo'] = null; + $missingFields[] = 'repo'; goto after_repo; } if (is_array($value)) { try { $this->hydrationStack[] = 'repo'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); } finally { array_pop($this->hydrationStack); } @@ -1233,7 +1223,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull if (is_array($value)) { try { $this->hydrationStack[] = 'user'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); } finally { array_pop($this->hydrationStack); } @@ -1257,11 +1247,181 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo(array $payload): Repo + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(array $payload): Repository { $properties = []; $missingFields = []; try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $missingFields[] = 'full_name'; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['license'] ?? null; + + if ($value === null) { + $properties['license'] = null; + goto after_license; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['license'] = $value; + + after_license: + + $value = $payload['forks'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks'; + goto after_forks; + } + + $properties['forks'] = $value; + + after_forks: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $missingFields[] = 'private'; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['fork'] ?? null; + + if ($value === null) { + $missingFields[] = 'fork'; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + $value = $payload['archive_url'] ?? null; if ($value === null) { @@ -1383,17 +1543,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_deploymentsUrl: - $value = $payload['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - $value = $payload['downloads_url'] ?? null; if ($value === null) { @@ -1416,17 +1565,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_eventsUrl: - $value = $payload['fork'] ?? null; - - if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; - } - - $properties['fork'] = $value; - - after_fork: - $value = $payload['forks_url'] ?? null; if ($value === null) { @@ -1438,17 +1576,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_forksUrl: - $value = $payload['full_name'] ?? null; - - if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; - } - - $properties['fullName'] = $value; - - after_fullName: - $value = $payload['git_commits_url'] ?? null; if ($value === null) { @@ -1482,49 +1609,16 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_gitTagsUrl: - $value = $payload['hooks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; - } - - $properties['hooksUrl'] = $value; - - after_hooksUrl: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; + $value = $payload['git_url'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'git_url'; + goto after_gitUrl; } - $properties['nodeId'] = $value; + $properties['gitUrl'] = $value; - after_nodeId: + after_gitUrl: $value = $payload['issue_comment_url'] ?? null; @@ -1614,59 +1708,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_milestonesUrl: - $value = $payload['name'] ?? null; + $value = $payload['notifications_url'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['notifications_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; + $missingFields[] = 'notifications_url'; + goto after_notificationsUrl; } $properties['notificationsUrl'] = $value; after_notificationsUrl: - $value = $payload['owner'] ?? null; - - if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($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['pulls_url'] ?? null; if ($value === null) { @@ -1689,6 +1741,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull 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) { @@ -1766,49 +1829,71 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_treesUrl: - $value = $payload['url'] ?? null; + $value = $payload['clone_url'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'clone_url'; + goto after_cloneUrl; } - $properties['url'] = $value; + $properties['cloneUrl'] = $value; - after_url: + after_cloneUrl: - $value = $payload['clone_url'] ?? null; + $value = $payload['mirror_url'] ?? null; if ($value === null) { - $missingFields[] = 'clone_url'; - goto after_cloneUrl; + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; } - $properties['cloneUrl'] = $value; + $properties['mirrorUrl'] = $value; - after_cloneUrl: + after_mirrorUrl: - $value = $payload['default_branch'] ?? null; + $value = $payload['hooks_url'] ?? null; if ($value === null) { - $missingFields[] = 'default_branch'; - goto after_defaultBranch; + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; } - $properties['defaultBranch'] = $value; + $properties['hooksUrl'] = $value; - after_defaultBranch: + after_hooksUrl: - $value = $payload['forks'] ?? null; + $value = $payload['svn_url'] ?? null; if ($value === null) { - $missingFields[] = 'forks'; - goto after_forks; + $missingFields[] = 'svn_url'; + goto after_svnUrl; } - $properties['forks'] = $value; + $properties['svnUrl'] = $value; - after_forks: + 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; @@ -1821,27 +1906,82 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_forksCount: - $value = $payload['git_url'] ?? null; + $value = $payload['stargazers_count'] ?? null; if ($value === null) { - $missingFields[] = 'git_url'; - goto after_gitUrl; + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; } - $properties['gitUrl'] = $value; + $properties['stargazersCount'] = $value; - after_gitUrl: + after_stargazersCount: - $value = $payload['has_downloads'] ?? null; + $value = $payload['watchers_count'] ?? null; if ($value === null) { - $missingFields[] = 'has_downloads'; - goto after_hasDownloads; + $missingFields[] = 'watchers_count'; + goto after_watchersCount; } - $properties['hasDownloads'] = $value; + $properties['watchersCount'] = $value; - after_hasDownloads: + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $missingFields[] = 'size'; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $missingFields[] = 'default_branch'; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: $value = $payload['has_issues'] ?? null; @@ -1887,49 +2027,27 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_hasPages: - $value = $payload['has_discussions'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_discussions'; - goto after_hasDiscussions; - } - - $properties['hasDiscussions'] = $value; - - after_hasDiscussions: - - $value = $payload['homepage'] ?? null; - - if ($value === null) { - $properties['homepage'] = null; - goto after_homepage; - } - - $properties['homepage'] = $value; - - after_homepage: - - $value = $payload['language'] ?? null; + $value = $payload['has_downloads'] ?? null; if ($value === null) { - $properties['language'] = null; - goto after_language; + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; } - $properties['language'] = $value; + $properties['hasDownloads'] = $value; - after_language: + after_hasDownloads: - $value = $payload['master_branch'] ?? null; + $value = $payload['has_discussions'] ?? null; if ($value === null) { - $properties['masterBranch'] = null; - goto after_masterBranch; + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; } - $properties['masterBranch'] = $value; + $properties['hasDiscussions'] = $value; - after_masterBranch: + after_hasDiscussions: $value = $payload['archived'] ?? null; @@ -1964,58 +2082,49 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_visibility: - $value = $payload['mirror_url'] ?? null; + $value = $payload['pushed_at'] ?? null; if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; + $properties['pushedAt'] = null; + goto after_pushedAt; } - $properties['mirrorUrl'] = $value; + $properties['pushedAt'] = $value; - after_mirrorUrl: + after_pushedAt: - $value = $payload['open_issues'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues'; - goto after_openIssues; + $properties['createdAt'] = null; + goto after_createdAt; } - $properties['openIssues'] = $value; + $properties['createdAt'] = $value; - after_openIssues: + after_createdAt: - $value = $payload['open_issues_count'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues_count'; - goto after_openIssuesCount; + $properties['updatedAt'] = null; + goto after_updatedAt; } - $properties['openIssuesCount'] = $value; + $properties['updatedAt'] = $value; - after_openIssuesCount: + after_updatedAt: - $value = $payload['permissions'] ?? null; + $value = $payload['allow_rebase_merge'] ?? null; if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; } - $properties['permissions'] = $value; + $properties['allowRebaseMerge'] = $value; - after_permissions: + after_allowRebaseMerge: $value = $payload['temp_clone_token'] ?? null; @@ -2028,17 +2137,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_tempCloneToken: - $value = $payload['allow_merge_commit'] ?? null; - - if ($value === null) { - $properties['allowMergeCommit'] = null; - goto after_allowMergeCommit; - } - - $properties['allowMergeCommit'] = $value; - - after_allowMergeCommit: - $value = $payload['allow_squash_merge'] ?? null; if ($value === null) { @@ -2050,3592 +2148,1009 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_allowSquashMerge: - $value = $payload['allow_rebase_merge'] ?? null; + $value = $payload['allow_auto_merge'] ?? null; if ($value === null) { - $properties['allowRebaseMerge'] = null; - goto after_allowRebaseMerge; + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; } - $properties['allowRebaseMerge'] = $value; + $properties['allowAutoMerge'] = $value; - after_allowRebaseMerge: + after_allowAutoMerge: - $value = $payload['license'] ?? null; + $value = $payload['delete_branch_on_merge'] ?? null; if ($value === null) { - $properties['license'] = null; - goto after_license; + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; } - $properties['license'] = $value; + $properties['allowUpdateBranch'] = $value; - after_license: + after_allowUpdateBranch: - $value = $payload['pushed_at'] ?? null; + $value = $payload['use_squash_pr_title_as_default'] ?? null; if ($value === null) { - $missingFields[] = 'pushed_at'; - goto after_pushedAt; + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; } - $properties['pushedAt'] = $value; + $properties['useSquashPrTitleAsDefault'] = $value; - after_pushedAt: + after_useSquashPrTitleAsDefault: - $value = $payload['size'] ?? null; + $value = $payload['squash_merge_commit_title'] ?? null; if ($value === null) { - $missingFields[] = 'size'; - goto after_size; + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; } - $properties['size'] = $value; + $properties['squashMergeCommitTitle'] = $value; - after_size: + after_squashMergeCommitTitle: - $value = $payload['ssh_url'] ?? null; + $value = $payload['squash_merge_commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'ssh_url'; - goto after_sshUrl; + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; } - $properties['sshUrl'] = $value; + $properties['squashMergeCommitMessage'] = $value; - after_sshUrl: + after_squashMergeCommitMessage: - $value = $payload['stargazers_count'] ?? null; + $value = $payload['merge_commit_title'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_count'; - goto after_stargazersCount; + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; } - $properties['stargazersCount'] = $value; + $properties['mergeCommitTitle'] = $value; - after_stargazersCount: + after_mergeCommitTitle: - $value = $payload['svn_url'] ?? null; + $value = $payload['merge_commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'svn_url'; - goto after_svnUrl; + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; } - $properties['svnUrl'] = $value; + $properties['mergeCommitMessage'] = $value; - after_svnUrl: + after_mergeCommitMessage: - $value = $payload['topics'] ?? null; + $value = $payload['allow_merge_commit'] ?? null; if ($value === null) { - $properties['topics'] = null; - goto after_topics; + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; } - $properties['topics'] = $value; + $properties['allowMergeCommit'] = $value; - after_topics: + after_allowMergeCommit: - $value = $payload['watchers'] ?? null; + $value = $payload['allow_forking'] ?? null; if ($value === null) { - $missingFields[] = 'watchers'; - goto after_watchers; + $properties['allowForking'] = null; + goto after_allowForking; } - $properties['watchers'] = $value; + $properties['allowForking'] = $value; - after_watchers: + after_allowForking: - $value = $payload['watchers_count'] ?? null; + $value = $payload['web_commit_signoff_required'] ?? null; if ($value === null) { - $missingFields[] = 'watchers_count'; - goto after_watchersCount; + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; } - $properties['watchersCount'] = $value; + $properties['webCommitSignoffRequired'] = $value; - after_watchersCount: + after_webCommitSignoffRequired: - $value = $payload['created_at'] ?? null; + $value = $payload['open_issues'] ?? null; if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; + $missingFields[] = 'open_issues'; + goto after_openIssues; } - $properties['createdAt'] = $value; + $properties['openIssues'] = $value; - after_createdAt: + after_openIssues: - $value = $payload['updated_at'] ?? null; + $value = $payload['watchers'] ?? null; if ($value === null) { - $missingFields[] = 'updated_at'; - goto after_updatedAt; + $missingFields[] = 'watchers'; + goto after_watchers; } - $properties['updatedAt'] = $value; + $properties['watchers'] = $value; - after_updatedAt: + after_watchers: - $value = $payload['allow_forking'] ?? null; + $value = $payload['master_branch'] ?? null; if ($value === null) { - $properties['allowForking'] = null; - goto after_allowForking; + $properties['masterBranch'] = null; + goto after_masterBranch; } - $properties['allowForking'] = $value; + $properties['masterBranch'] = $value; - after_allowForking: + after_masterBranch: - $value = $payload['is_template'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['isTemplate'] = $value; + $properties['starredAt'] = $value; - after_isTemplate: + after_starredAt: - $value = $payload['web_commit_signoff_required'] ?? null; + $value = $payload['anonymous_access_enabled'] ?? null; if ($value === null) { - $properties['webCommitSignoffRequired'] = null; - goto after_webCommitSignoffRequired; + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; } - $properties['webCommitSignoffRequired'] = $value; + $properties['anonymousAccessEnabled'] = $value; - after_webCommitSignoffRequired: + after_anonymousAccessEnabled: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Repo::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Repository::class, $missingFields, stack: $this->hydrationStack); } try { - return new Repo(...$properties); + return new Repository(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(array $payload): Owner + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple { $properties = []; $missingFields = []; try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; + $value = $payload['key'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $missingFields[] = 'key'; + goto after_key; } - $properties['eventsUrl'] = $value; + $properties['key'] = $value; - after_eventsUrl: + after_key: - $value = $payload['followers_url'] ?? null; + $value = $payload['name'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $missingFields[] = 'name'; + goto after_name; } - $properties['followersUrl'] = $value; + $properties['name'] = $value; - after_followersUrl: + after_name: - $value = $payload['following_url'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $properties['url'] = null; + goto after_url; } - $properties['followingUrl'] = $value; + $properties['url'] = $value; - after_followingUrl: + after_url: - $value = $payload['gists_url'] ?? null; + $value = $payload['spdx_id'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $properties['spdxId'] = null; + goto after_spdxId; } - $properties['gistsUrl'] = $value; + $properties['spdxId'] = $value; - after_gistsUrl: + after_spdxId: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['gravatarId'] = $value; + $properties['nodeId'] = $value; - after_gravatarId: + after_nodeId: $value = $payload['html_url'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; + $properties['htmlUrl'] = null; goto after_htmlUrl; } $properties['htmlUrl'] = $value; after_htmlUrl: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } - $value = $payload['id'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new LicenseSimple(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions(array $payload): Permissions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['admin'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $missingFields[] = 'admin'; + goto after_admin; } - $properties['id'] = $value; + $properties['admin'] = $value; - after_id: + after_admin: - $value = $payload['node_id'] ?? null; + $value = $payload['pull'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'pull'; + goto after_pull; } - $properties['nodeId'] = $value; + $properties['pull'] = $value; - after_nodeId: + after_pull: - $value = $payload['login'] ?? null; + $value = $payload['triage'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['triage'] = null; + goto after_triage; } - $properties['login'] = $value; + $properties['triage'] = $value; - after_login: + after_triage: - $value = $payload['organizations_url'] ?? null; + $value = $payload['push'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $missingFields[] = 'push'; + goto after_push; } - $properties['organizationsUrl'] = $value; + $properties['push'] = $value; - after_organizationsUrl: + after_push: - $value = $payload['received_events_url'] ?? null; + $value = $payload['maintain'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $properties['maintain'] = null; + goto after_maintain; } - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; + $properties['maintain'] = $value; - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } + after_maintain: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository\Permissions', $exception, stack: $this->hydrationStack); + } - $properties['reposUrl'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); + } - after_reposUrl: + try { + return new Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository\Permissions', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['site_admin'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(array $payload): Base + { + $properties = []; + $missingFields = []; + try { + $value = $payload['label'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $missingFields[] = 'label'; + goto after_label; } - $properties['siteAdmin'] = $value; + $properties['label'] = $value; - after_siteAdmin: + after_label: - $value = $payload['starred_url'] ?? null; + $value = $payload['ref'] ?? null; if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; + $missingFields[] = 'ref'; + goto after_ref; } - $properties['starredUrl'] = $value; + $properties['ref'] = $value; - after_starredUrl: + after_ref: - $value = $payload['subscriptions_url'] ?? null; + $value = $payload['repo'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $missingFields[] = 'repo'; + goto after_repo; } - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repo'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['type'] = $value; + $properties['repo'] = $value; - after_type: + after_repo: - $value = $payload['url'] ?? null; + $value = $payload['sha'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'sha'; + goto after_sha; } - $properties['url'] = $value; + $properties['sha'] = $value; - after_url: + after_sha: - $value = $payload['user_view_type'] ?? null; + $value = $payload['user'] ?? null; if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; + $missingFields[] = 'user'; + goto after_user; } - $properties['userViewType'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'user'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_userViewType: + $properties['user'] = $value; + + after_user: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Owner::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Base::class, $missingFields, stack: $this->hydrationStack); } try { - return new Owner(...$properties); + return new Base(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(array $payload): Permissions + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links(array $payload): Links { $properties = []; $missingFields = []; try { - $value = $payload['admin'] ?? null; + $value = $payload['comments'] ?? null; if ($value === null) { - $missingFields[] = 'admin'; - goto after_admin; + $missingFields[] = 'comments'; + goto after_comments; } - $properties['admin'] = $value; - - after_admin: - - $value = $payload['maintain'] ?? null; - - if ($value === null) { - $properties['maintain'] = null; - goto after_maintain; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'comments'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['maintain'] = $value; + $properties['comments'] = $value; - after_maintain: + after_comments: - $value = $payload['push'] ?? null; + $value = $payload['commits'] ?? null; if ($value === null) { - $missingFields[] = 'push'; - goto after_push; + $missingFields[] = 'commits'; + goto after_commits; } - $properties['push'] = $value; - - after_push: - - $value = $payload['triage'] ?? null; - - if ($value === null) { - $properties['triage'] = null; - goto after_triage; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'commits'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['triage'] = $value; + $properties['commits'] = $value; - after_triage: + after_commits: - $value = $payload['pull'] ?? null; + $value = $payload['statuses'] ?? null; if ($value === null) { - $missingFields[] = 'pull'; - goto after_pull; + $missingFields[] = 'statuses'; + goto after_statuses; } - $properties['pull'] = $value; - - after_pull: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions', $exception, stack: $this->hydrationStack); - } + if (is_array($value)) { + try { + $this->hydrationStack[] = 'statuses'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Permissions::class, $missingFields, stack: $this->hydrationStack); - } + $properties['statuses'] = $value; - try { - return new Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - } + after_statuses: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License(array $payload): License - { - $properties = []; - $missingFields = []; - try { - $value = $payload['key'] ?? null; + $value = $payload['html'] ?? null; if ($value === null) { - $missingFields[] = 'key'; - goto after_key; + $missingFields[] = 'html'; + goto after_html; } - $properties['key'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'html'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_key: + $properties['html'] = $value; - $value = $payload['name'] ?? null; + after_html: + + $value = $payload['issue'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; + $missingFields[] = 'issue'; + goto after_issue; } - $properties['name'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'issue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_name: + $properties['issue'] = $value; - $value = $payload['url'] ?? null; + after_issue: + + $value = $payload['review_comments'] ?? null; if ($value === null) { - $properties['url'] = null; - goto after_url; + $missingFields[] = 'review_comments'; + goto after_reviewComments; } - $properties['url'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'reviewComments'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_url: + $properties['reviewComments'] = $value; - $value = $payload['spdx_id'] ?? null; + after_reviewComments: + + $value = $payload['review_comment'] ?? null; if ($value === null) { - $properties['spdxId'] = null; - goto after_spdxId; + $missingFields[] = 'review_comment'; + goto after_reviewComment; } - $properties['spdxId'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'reviewComment'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_spdxId: + $properties['reviewComment'] = $value; - $value = $payload['node_id'] ?? null; + after_reviewComment: + + $value = $payload['self'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'self'; + goto after_self; } - $properties['nodeId'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'self'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_nodeId: + $properties['self'] = $value; + + after_self: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(License::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Links::class, $missingFields, stack: $this->hydrationStack); } try { - return new License(...$properties); + return new Links(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User(array $payload): User + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link(array $payload): Link { $properties = []; $missingFields = []; try { - $value = $payload['avatar_url'] ?? null; + $value = $payload['href'] ?? null; if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; + $missingFields[] = 'href'; + goto after_href; } - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; + $properties['href'] = $value; - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } + after_href: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); + } - $properties['eventsUrl'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Link::class, $missingFields, stack: $this->hydrationStack); + } - after_eventsUrl: + try { + return new Link(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['followers_url'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge(array $payload): AutoMerge + { + $properties = []; + $missingFields = []; + try { + $value = $payload['enabled_by'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $missingFields[] = 'enabled_by'; + goto after_enabledBy; } - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enabledBy'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['followingUrl'] = $value; + $properties['enabledBy'] = $value; - after_followingUrl: + after_enabledBy: - $value = $payload['gists_url'] ?? null; + $value = $payload['merge_method'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $missingFields[] = 'merge_method'; + goto after_mergeMethod; } - $properties['gistsUrl'] = $value; + $properties['mergeMethod'] = $value; - after_gistsUrl: + after_mergeMethod: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['commit_title'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'commit_title'; + goto after_commitTitle; } - $properties['gravatarId'] = $value; + $properties['commitTitle'] = $value; - after_gravatarId: + after_commitTitle: - $value = $payload['html_url'] ?? null; + $value = $payload['commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + $missingFields[] = 'commit_message'; + goto after_commitMessage; } - $properties['htmlUrl'] = $value; + $properties['commitMessage'] = $value; - after_htmlUrl: + after_commitMessage: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); + } - $value = $payload['id'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(AutoMerge::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new AutoMerge(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $properties['message'] = null; + goto after_message; } - $properties['id'] = $value; + $properties['message'] = $value; - after_id: + after_message: - $value = $payload['node_id'] ?? null; + $value = $payload['documentation_url'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $properties['documentationUrl'] = null; + goto after_documentationUrl; } - $properties['nodeId'] = $value; + $properties['documentationUrl'] = $value; - after_nodeId: + after_documentationUrl: - $value = $payload['login'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $properties['url'] = null; + goto after_url; } - $properties['login'] = $value; + $properties['url'] = $value; - after_login: + after_url: - $value = $payload['organizations_url'] ?? null; + $value = $payload['status'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $properties['status'] = null; + goto after_status; } - $properties['organizationsUrl'] = $value; + $properties['status'] = $value; - after_organizationsUrl: + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } - $value = $payload['received_events_url'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(array $payload): ServiceUnavailable + { + $properties = []; + $missingFields = []; + try { + $value = $payload['code'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $properties['code'] = null; + goto after_code; } - $properties['receivedEventsUrl'] = $value; + $properties['code'] = $value; - after_receivedEventsUrl: + after_code: - $value = $payload['repos_url'] ?? null; + $value = $payload['message'] ?? null; if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; + $properties['message'] = null; + goto after_message; } - $properties['reposUrl'] = $value; + $properties['message'] = $value; - after_reposUrl: + after_message: - $value = $payload['site_admin'] ?? null; + $value = $payload['documentation_url'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $properties['documentationUrl'] = null; + goto after_documentationUrl; } - $properties['siteAdmin'] = $value; - - after_siteAdmin: + $properties['documentationUrl'] = $value; - $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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: + after_documentationUrl: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\User', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(User::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(ServiceUnavailable::class, $missingFields, stack: $this->hydrationStack); } try { - return new User(...$properties); + return new ServiceUnavailable(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\User', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(array $payload): Base + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError(array $payload): ValidationError { $properties = []; $missingFields = []; try { - $value = $payload['label'] ?? null; - - if ($value === null) { - $missingFields[] = 'label'; - goto after_label; - } - - $properties['label'] = $value; - - after_label: - - $value = $payload['ref'] ?? null; - - if ($value === null) { - $missingFields[] = 'ref'; - goto after_ref; - } - - $properties['ref'] = $value; - - after_ref: - - $value = $payload['repo'] ?? null; + $value = $payload['message'] ?? null; if ($value === null) { - $missingFields[] = 'repo'; - goto after_repo; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'repo'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($value); - } finally { - array_pop($this->hydrationStack); - } + $missingFields[] = 'message'; + goto after_message; } - $properties['repo'] = $value; + $properties['message'] = $value; - after_repo: + after_message: - $value = $payload['sha'] ?? null; + $value = $payload['documentation_url'] ?? null; if ($value === null) { - $missingFields[] = 'sha'; - goto after_sha; + $missingFields[] = 'documentation_url'; + goto after_documentationUrl; } - $properties['sha'] = $value; + $properties['documentationUrl'] = $value; - after_sha: + after_documentationUrl: - $value = $payload['user'] ?? null; + $value = $payload['errors'] ?? null; if ($value === null) { - $missingFields[] = 'user'; - goto after_user; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'user'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['errors'] = null; + goto after_errors; } - $properties['user'] = $value; + $properties['errors'] = $value; - after_user: + after_errors: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ValidationError', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Base::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(ValidationError::class, $missingFields, stack: $this->hydrationStack); } try { - return new Base(...$properties); + return new ValidationError(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ValidationError', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { - $properties = []; - $missingFields = []; - try { - $value = $payload['archive_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'archive_url'; - goto after_archiveUrl; + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); } + } - $properties['archiveUrl'] = $value; + throw new LogicException('No type mapped for object of class: ' . $object::class); + } - after_archiveUrl: + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } - $value = $payload['assignees_url'] ?? null; + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), + 'ApiClients\Client\GitHub\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($object), + 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($object), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($object), + 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($object), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($object), + 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($object), + 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($object), + 'ApiClients\Client\GitHub\Schema\Link' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($object), + 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($object), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), + 'ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($object), + 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } - if ($value === null) { - $missingFields[] = 'assignees_url'; - goto after_assigneesUrl; - } + private function serializeValuearray(mixed $value): mixed + { + static $serializer; - $properties['assigneesUrl'] = $value; + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } - after_assigneesUrl: + return $serializer->serialize($value, $this); + } - $value = $payload['blobs_url'] ?? null; + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; - if ($value === null) { - $missingFields[] = 'blobs_url'; - goto after_blobsUrl; - } + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } - $properties['blobsUrl'] = $value; + return $serializer->serialize($value, $this); + } - after_blobsUrl: + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; - $value = $payload['branches_url'] ?? null; + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } - if ($value === null) { - $missingFields[] = 'branches_url'; - goto after_branchesUrl; - } + return $serializer->serialize($value, $this); + } - $properties['branchesUrl'] = $value; + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; - after_branchesUrl: + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } - $value = $payload['collaborators_url'] ?? null; + return $serializer->serialize($value, $this); + } - if ($value === null) { - $missingFields[] = 'collaborators_url'; - goto after_collaboratorsUrl; - } + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; - $properties['collaboratorsUrl'] = $value; + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } - 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['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - - $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['fork'] ?? null; - - if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; - } - - $properties['fork'] = $value; - - after_fork: - - $value = $payload['forks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'forks_url'; - goto after_forksUrl; - } - - $properties['forksUrl'] = $value; - - after_forksUrl: - - $value = $payload['full_name'] ?? null; - - if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; - } - - $properties['fullName'] = $value; - - after_fullName: - - $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['hooks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; - } - - $properties['hooksUrl'] = $value; - - after_hooksUrl: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['is_template'] ?? null; - - if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; - } - - $properties['isTemplate'] = $value; - - after_isTemplate: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $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['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['notifications_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; - } - - $properties['notificationsUrl'] = $value; - - after_notificationsUrl: - - $value = $payload['owner'] ?? null; - - if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($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['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['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['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['clone_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'clone_url'; - goto after_cloneUrl; - } - - $properties['cloneUrl'] = $value; - - after_cloneUrl: - - $value = $payload['default_branch'] ?? null; - - if ($value === null) { - $missingFields[] = 'default_branch'; - goto after_defaultBranch; - } - - $properties['defaultBranch'] = $value; - - after_defaultBranch: - - $value = $payload['forks'] ?? null; - - if ($value === null) { - $missingFields[] = 'forks'; - goto after_forks; - } - - $properties['forks'] = $value; - - after_forks: - - $value = $payload['forks_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'forks_count'; - goto after_forksCount; - } - - $properties['forksCount'] = $value; - - after_forksCount: - - $value = $payload['git_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'git_url'; - goto after_gitUrl; - } - - $properties['gitUrl'] = $value; - - after_gitUrl: - - $value = $payload['has_downloads'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_downloads'; - goto after_hasDownloads; - } - - $properties['hasDownloads'] = $value; - - after_hasDownloads: - - $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_discussions'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_discussions'; - goto after_hasDiscussions; - } - - $properties['hasDiscussions'] = $value; - - after_hasDiscussions: - - $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['master_branch'] ?? null; - - if ($value === null) { - $properties['masterBranch'] = null; - goto after_masterBranch; - } - - $properties['masterBranch'] = $value; - - after_masterBranch: - - $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['mirror_url'] ?? null; - - if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; - } - - $properties['mirrorUrl'] = $value; - - after_mirrorUrl: - - $value = $payload['open_issues'] ?? null; - - if ($value === null) { - $missingFields[] = 'open_issues'; - goto after_openIssues; - } - - $properties['openIssues'] = $value; - - after_openIssues: - - $value = $payload['open_issues_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'open_issues_count'; - goto after_openIssuesCount; - } - - $properties['openIssuesCount'] = $value; - - after_openIssuesCount: - - $value = $payload['permissions'] ?? null; - - if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['permissions'] = $value; - - after_permissions: - - $value = $payload['temp_clone_token'] ?? null; - - if ($value === null) { - $properties['tempCloneToken'] = null; - goto after_tempCloneToken; - } - - $properties['tempCloneToken'] = $value; - - after_tempCloneToken: - - $value = $payload['allow_merge_commit'] ?? null; - - if ($value === null) { - $properties['allowMergeCommit'] = null; - goto after_allowMergeCommit; - } - - $properties['allowMergeCommit'] = $value; - - after_allowMergeCommit: - - $value = $payload['allow_squash_merge'] ?? null; - - if ($value === null) { - $properties['allowSquashMerge'] = null; - goto after_allowSquashMerge; - } - - $properties['allowSquashMerge'] = $value; - - after_allowSquashMerge: - - $value = $payload['allow_rebase_merge'] ?? null; - - if ($value === null) { - $properties['allowRebaseMerge'] = null; - goto after_allowRebaseMerge; - } - - $properties['allowRebaseMerge'] = $value; - - after_allowRebaseMerge: - - $value = $payload['license'] ?? null; - - if ($value === null) { - $properties['license'] = null; - goto after_license; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['license'] = $value; - - after_license: - - $value = $payload['pushed_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'pushed_at'; - goto after_pushedAt; - } - - $properties['pushedAt'] = $value; - - after_pushedAt: - - $value = $payload['size'] ?? null; - - if ($value === null) { - $missingFields[] = 'size'; - goto after_size; - } - - $properties['size'] = $value; - - after_size: - - $value = $payload['ssh_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'ssh_url'; - goto after_sshUrl; - } - - $properties['sshUrl'] = $value; - - after_sshUrl: - - $value = $payload['stargazers_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'stargazers_count'; - goto after_stargazersCount; - } - - $properties['stargazersCount'] = $value; - - after_stargazersCount: - - $value = $payload['svn_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'svn_url'; - goto after_svnUrl; - } - - $properties['svnUrl'] = $value; - - after_svnUrl: - - $value = $payload['topics'] ?? null; - - if ($value === null) { - $properties['topics'] = null; - goto after_topics; - } - - $properties['topics'] = $value; - - after_topics: - - $value = $payload['watchers'] ?? null; - - if ($value === null) { - $missingFields[] = 'watchers'; - goto after_watchers; - } - - $properties['watchers'] = $value; - - after_watchers: - - $value = $payload['watchers_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'watchers_count'; - goto after_watchersCount; - } - - $properties['watchersCount'] = $value; - - after_watchersCount: - - $value = $payload['created_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; - } - - $properties['createdAt'] = $value; - - after_createdAt: - - $value = $payload['updated_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'updated_at'; - goto after_updatedAt; - } - - $properties['updatedAt'] = $value; - - after_updatedAt: - - $value = $payload['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: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner - { - $properties = []; - $missingFields = []; - try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $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['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions - { - $properties = []; - $missingFields = []; - try { - $value = $payload['admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'admin'; - 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) { - $missingFields[] = 'push'; - 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) { - $missingFields[] = 'pull'; - goto after_pull; - } - - $properties['pull'] = $value; - - after_pull: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple(array $payload): LicenseSimple - { - $properties = []; - $missingFields = []; - try { - $value = $payload['key'] ?? null; - - if ($value === null) { - $missingFields[] = 'key'; - goto after_key; - } - - $properties['key'] = $value; - - after_key: - - $value = $payload['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $properties['url'] = null; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['spdx_id'] ?? null; - - if ($value === null) { - $properties['spdxId'] = null; - goto after_spdxId; - } - - $properties['spdxId'] = $value; - - after_spdxId: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $properties['htmlUrl'] = null; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(LicenseSimple::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new LicenseSimple(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\LicenseSimple', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\User - { - $properties = []; - $missingFields = []; - try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $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['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\User', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\User::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\User(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\User', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links(array $payload): Links - { - $properties = []; - $missingFields = []; - try { - $value = $payload['comments'] ?? null; - - if ($value === null) { - $missingFields[] = 'comments'; - goto after_comments; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'comments'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['comments'] = $value; - - after_comments: - - $value = $payload['commits'] ?? null; - - if ($value === null) { - $missingFields[] = 'commits'; - goto after_commits; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'commits'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['commits'] = $value; - - after_commits: - - $value = $payload['statuses'] ?? null; - - if ($value === null) { - $missingFields[] = 'statuses'; - goto after_statuses; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'statuses'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['statuses'] = $value; - - after_statuses: - - $value = $payload['html'] ?? null; - - if ($value === null) { - $missingFields[] = 'html'; - goto after_html; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'html'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['html'] = $value; - - after_html: - - $value = $payload['issue'] ?? null; - - if ($value === null) { - $missingFields[] = 'issue'; - goto after_issue; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'issue'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['issue'] = $value; - - after_issue: - - $value = $payload['review_comments'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comments'; - goto after_reviewComments; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'reviewComments'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['reviewComments'] = $value; - - after_reviewComments: - - $value = $payload['review_comment'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comment'; - goto after_reviewComment; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'reviewComment'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['reviewComment'] = $value; - - after_reviewComment: - - $value = $payload['self'] ?? null; - - if ($value === null) { - $missingFields[] = 'self'; - goto after_self; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'self'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['self'] = $value; - - after_self: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Links::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new Links(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link(array $payload): Link - { - $properties = []; - $missingFields = []; - try { - $value = $payload['href'] ?? null; - - if ($value === null) { - $missingFields[] = 'href'; - goto after_href; - } - - $properties['href'] = $value; - - after_href: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Link::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new Link(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge(array $payload): AutoMerge - { - $properties = []; - $missingFields = []; - try { - $value = $payload['enabled_by'] ?? null; - - if ($value === null) { - $missingFields[] = 'enabled_by'; - goto after_enabledBy; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'enabledBy'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['enabledBy'] = $value; - - after_enabledBy: - - $value = $payload['merge_method'] ?? null; - - if ($value === null) { - $missingFields[] = 'merge_method'; - goto after_mergeMethod; - } - - $properties['mergeMethod'] = $value; - - after_mergeMethod: - - $value = $payload['commit_title'] ?? null; - - if ($value === null) { - $missingFields[] = 'commit_title'; - goto after_commitTitle; - } - - $properties['commitTitle'] = $value; - - after_commitTitle: - - $value = $payload['commit_message'] ?? null; - - if ($value === null) { - $missingFields[] = 'commit_message'; - goto after_commitMessage; - } - - $properties['commitMessage'] = $value; - - after_commitMessage: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(AutoMerge::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new AutoMerge(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError - { - $properties = []; - $missingFields = []; - try { - $value = $payload['message'] ?? null; - - if ($value === null) { - $properties['message'] = null; - goto after_message; - } - - $properties['message'] = $value; - - after_message: - - $value = $payload['documentation_url'] ?? null; - - if ($value === null) { - $properties['documentationUrl'] = null; - goto after_documentationUrl; - } - - $properties['documentationUrl'] = $value; - - after_documentationUrl: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $properties['url'] = null; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['status'] ?? null; - - if ($value === null) { - $properties['status'] = null; - goto after_status; - } - - $properties['status'] = $value; - - after_status: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new BasicError(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(array $payload): ServiceUnavailable - { - $properties = []; - $missingFields = []; - try { - $value = $payload['code'] ?? null; - - if ($value === null) { - $properties['code'] = null; - goto after_code; - } - - $properties['code'] = $value; - - after_code: - - $value = $payload['message'] ?? null; - - if ($value === null) { - $properties['message'] = null; - goto after_message; - } - - $properties['message'] = $value; - - after_message: - - $value = $payload['documentation_url'] ?? null; - - if ($value === null) { - $properties['documentationUrl'] = null; - goto after_documentationUrl; - } - - $properties['documentationUrl'] = $value; - - after_documentationUrl: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(ServiceUnavailable::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new ServiceUnavailable(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError(array $payload): ValidationError - { - $properties = []; - $missingFields = []; - try { - $value = $payload['message'] ?? null; - - if ($value === null) { - $missingFields[] = 'message'; - goto after_message; - } - - $properties['message'] = $value; - - after_message: - - $value = $payload['documentation_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'documentation_url'; - goto after_documentationUrl; - } - - $properties['documentationUrl'] = $value; - - after_documentationUrl: - - $value = $payload['errors'] ?? null; - - if ($value === null) { - $properties['errors'] = null; - goto after_errors; - } - - $properties['errors'] = $value; - - after_errors: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ValidationError', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(ValidationError::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new ValidationError(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ValidationError', $exception, stack: $this->hydrationStack); - } - } - - private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array - { - foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { - if (is_a($object, $valueType)) { - return [$accessor => $payloadType] + $this->{$method}($object); - } - } - - throw new LogicException('No type mapped for object of class: ' . $object::class); - } - - public function serializeObject(object $object): mixed - { - return $this->serializeObjectOfType($object, $object::class); - } - - /** - * @param T $object - * @param class-string $className - * - * @template T - */ - public function serializeObjectOfType(object $object, string $className): mixed - { - try { - return match ($className) { - 'array' => $this->serializeValuearray($object), - 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), - 'DateTime' => $this->serializeValueDateTime($object), - 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), - 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), - 'ApiClients\Client\GitHub\Schema\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), - 'ApiClients\Client\GitHub\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\User' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($object), - 'ApiClients\Client\GitHub\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\User' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($object), - 'ApiClients\Client\GitHub\Schema\Link' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($object), - 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($object), - 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), - 'ApiClients\Client\GitHub\Schema\Operations\SecretScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️SecretScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($object), - 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($object), - default => throw new LogicException("No serialization defined for $className"), - }; - } catch (Throwable $exception) { - throw UnableToSerializeObject::dueToError($className, $exception); - } - } - - private function serializeValuearray(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeArrayItems(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeUuidToString(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueDateTime(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeDateTime(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueDateTimeImmutable(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeDateTime(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeValueDateTimeInterface(mixed $value): mixed - { - static $serializer; - - if ($serializer === null) { - $serializer = new SerializeDateTime(...[]); - } - - return $serializer->serialize($value, $this); - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest(mixed $object): mixed - { - assert($object instanceof PullRequest); - $result = []; - - $url = $object->url; - after_url: $result['url'] = $url; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $diffUrl = $object->diffUrl; - after_diffUrl: $result['diff_url'] = $diffUrl; - - $patchUrl = $object->patchUrl; - after_patchUrl: $result['patch_url'] = $patchUrl; - - $issueUrl = $object->issueUrl; - after_issueUrl: $result['issue_url'] = $issueUrl; - - $commitsUrl = $object->commitsUrl; - after_commitsUrl: $result['commits_url'] = $commitsUrl; - - $reviewCommentsUrl = $object->reviewCommentsUrl; - after_reviewCommentsUrl: $result['review_comments_url'] = $reviewCommentsUrl; - - $reviewCommentUrl = $object->reviewCommentUrl; - after_reviewCommentUrl: $result['review_comment_url'] = $reviewCommentUrl; - - $commentsUrl = $object->commentsUrl; - after_commentsUrl: $result['comments_url'] = $commentsUrl; - - $statusesUrl = $object->statusesUrl; - after_statusesUrl: $result['statuses_url'] = $statusesUrl; - - $number = $object->number; - after_number: $result['number'] = $number; - - $state = $object->state; - after_state: $result['state'] = $state; - - $locked = $object->locked; - after_locked: $result['locked'] = $locked; - - $title = $object->title; - after_title: $result['title'] = $title; - - $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); - after_user: $result['user'] = $user; - - $body = $object->body; - - if ($body === null) { - goto after_body; - } - - after_body: $result['body'] = $body; - - $labels = $object->labels; - static $labelsSerializer0; - - if ($labelsSerializer0 === null) { - $labelsSerializer0 = new SerializeArrayItems(...[]); - } - - $labels = $labelsSerializer0->serialize($labels, $this); - after_labels: $result['labels'] = $labels; - - $milestone = $object->milestone; - - if ($milestone === null) { - goto after_milestone; - } - - $milestone = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($milestone); - after_milestone: $result['milestone'] = $milestone; - - $activeLockReason = $object->activeLockReason; - - if ($activeLockReason === null) { - goto after_activeLockReason; - } - - after_activeLockReason: $result['active_lock_reason'] = $activeLockReason; - - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; - - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; - - $closedAt = $object->closedAt; - - if ($closedAt === null) { - goto after_closedAt; - } - - after_closedAt: $result['closed_at'] = $closedAt; - - $mergedAt = $object->mergedAt; - - if ($mergedAt === null) { - goto after_mergedAt; - } - - after_mergedAt: $result['merged_at'] = $mergedAt; - - $mergeCommitSha = $object->mergeCommitSha; - - if ($mergeCommitSha === null) { - goto after_mergeCommitSha; - } - - after_mergeCommitSha: $result['merge_commit_sha'] = $mergeCommitSha; - - $assignee = $object->assignee; - - if ($assignee === null) { - goto after_assignee; - } - - $assignee = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($assignee); - after_assignee: $result['assignee'] = $assignee; - - $assignees = $object->assignees; - - if ($assignees === null) { - goto after_assignees; - } - - static $assigneesSerializer0; - - if ($assigneesSerializer0 === null) { - $assigneesSerializer0 = new SerializeArrayItems(...[]); - } - - $assignees = $assigneesSerializer0->serialize($assignees, $this); - after_assignees: $result['assignees'] = $assignees; - - $requestedReviewers = $object->requestedReviewers; - - if ($requestedReviewers === null) { - goto after_requestedReviewers; - } - - static $requestedReviewersSerializer0; - - if ($requestedReviewersSerializer0 === null) { - $requestedReviewersSerializer0 = new SerializeArrayItems(...[]); - } - - $requestedReviewers = $requestedReviewersSerializer0->serialize($requestedReviewers, $this); - after_requestedReviewers: $result['requested_reviewers'] = $requestedReviewers; - - $requestedTeams = $object->requestedTeams; - - if ($requestedTeams === null) { - goto after_requestedTeams; - } - - static $requestedTeamsSerializer0; - - if ($requestedTeamsSerializer0 === null) { - $requestedTeamsSerializer0 = new SerializeArrayItems(...[]); - } - - $requestedTeams = $requestedTeamsSerializer0->serialize($requestedTeams, $this); - after_requestedTeams: $result['requested_teams'] = $requestedTeams; - - $head = $object->head; - $head = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($head); - after_head: $result['head'] = $head; - - $base = $object->base; - $base = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($base); - after_base: $result['base'] = $base; - - $links = $object->links; - $links = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($links); - after_links: $result['_links'] = $links; - - $authorAssociation = $object->authorAssociation; - after_authorAssociation: $result['author_association'] = $authorAssociation; - - $autoMerge = $object->autoMerge; - - if ($autoMerge === null) { - goto after_autoMerge; - } - - $autoMerge = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($autoMerge); - after_autoMerge: $result['auto_merge'] = $autoMerge; - - $draft = $object->draft; - - if ($draft === null) { - goto after_draft; - } - - after_draft: $result['draft'] = $draft; - - $merged = $object->merged; - after_merged: $result['merged'] = $merged; - - $mergeable = $object->mergeable; - - if ($mergeable === null) { - goto after_mergeable; - } - - after_mergeable: $result['mergeable'] = $mergeable; - - $rebaseable = $object->rebaseable; - - if ($rebaseable === null) { - goto after_rebaseable; - } - - after_rebaseable: $result['rebaseable'] = $rebaseable; - - $mergeableState = $object->mergeableState; - after_mergeableState: $result['mergeable_state'] = $mergeableState; - - $mergedBy = $object->mergedBy; - - if ($mergedBy === null) { - goto after_mergedBy; - } - - $mergedBy = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($mergedBy); - after_mergedBy: $result['merged_by'] = $mergedBy; - - $comments = $object->comments; - after_comments: $result['comments'] = $comments; - - $reviewComments = $object->reviewComments; - after_reviewComments: $result['review_comments'] = $reviewComments; - - $maintainerCanModify = $object->maintainerCanModify; - after_maintainerCanModify: $result['maintainer_can_modify'] = $maintainerCanModify; - - $commits = $object->commits; - after_commits: $result['commits'] = $commits; - - $additions = $object->additions; - after_additions: $result['additions'] = $additions; - - $deletions = $object->deletions; - after_deletions: $result['deletions'] = $deletions; - - $changedFiles = $object->changedFiles; - after_changedFiles: $result['changed_files'] = $changedFiles; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone(mixed $object): mixed - { - assert($object instanceof Milestone); - $result = []; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $labelsUrl = $object->labelsUrl; - after_labelsUrl: $result['labels_url'] = $labelsUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $number = $object->number; - after_number: $result['number'] = $number; - - $state = $object->state; - after_state: $result['state'] = $state; - - $title = $object->title; - after_title: $result['title'] = $title; - - $description = $object->description; - - if ($description === null) { - goto after_description; - } - - after_description: $result['description'] = $description; - - $creator = $object->creator; - - if ($creator === null) { - goto after_creator; - } - - $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($creator); - after_creator: $result['creator'] = $creator; - - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; - - $closedIssues = $object->closedIssues; - after_closedIssues: $result['closed_issues'] = $closedIssues; - - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; - - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; - - $closedAt = $object->closedAt; - - if ($closedAt === null) { - goto after_closedAt; - } - - after_closedAt: $result['closed_at'] = $closedAt; - - $dueOn = $object->dueOn; - - if ($dueOn === null) { - goto after_dueOn; - } - - after_dueOn: $result['due_on'] = $dueOn; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head(mixed $object): mixed - { - assert($object instanceof Head); - $result = []; - - $label = $object->label; - after_label: $result['label'] = $label; - - $ref = $object->ref; - after_ref: $result['ref'] = $ref; - - $repo = $object->repo; - - if ($repo === null) { - goto after_repo; - } - - $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($repo); - after_repo: $result['repo'] = $repo; - - $sha = $object->sha; - after_sha: $result['sha'] = $sha; - - $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($user); - after_user: $result['user'] = $user; - - return $result; + return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo(mixed $object): mixed - { - assert($object instanceof Repo); - $result = []; - - $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; - - $description = $object->description; - - if ($description === null) { - goto after_description; - } - - after_description: $result['description'] = $description; - - $downloadsUrl = $object->downloadsUrl; - after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $fork = $object->fork; - after_fork: $result['fork'] = $fork; - - $forksUrl = $object->forksUrl; - after_forksUrl: $result['forks_url'] = $forksUrl; - - $fullName = $object->fullName; - after_fullName: $result['full_name'] = $fullName; - - $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; - - $hooksUrl = $object->hooksUrl; - after_hooksUrl: $result['hooks_url'] = $hooksUrl; + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest(mixed $object): mixed + { + assert($object instanceof PullRequest); + $result = []; - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + $url = $object->url; + after_url: $result['url'] = $url; $id = $object->id; after_id: $result['id'] = $id; @@ -5643,296 +3158,287 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $nodeId = $object->nodeId; after_nodeId: $result['node_id'] = $nodeId; - $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; + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - $name = $object->name; - after_name: $result['name'] = $name; + $diffUrl = $object->diffUrl; + after_diffUrl: $result['diff_url'] = $diffUrl; - $notificationsUrl = $object->notificationsUrl; - after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + $patchUrl = $object->patchUrl; + after_patchUrl: $result['patch_url'] = $patchUrl; - $owner = $object->owner; - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($owner); - after_owner: $result['owner'] = $owner; + $issueUrl = $object->issueUrl; + after_issueUrl: $result['issue_url'] = $issueUrl; - $private = $object->private; - after_private: $result['private'] = $private; + $commitsUrl = $object->commitsUrl; + after_commitsUrl: $result['commits_url'] = $commitsUrl; - $pullsUrl = $object->pullsUrl; - after_pullsUrl: $result['pulls_url'] = $pullsUrl; + $reviewCommentsUrl = $object->reviewCommentsUrl; + after_reviewCommentsUrl: $result['review_comments_url'] = $reviewCommentsUrl; - $releasesUrl = $object->releasesUrl; - after_releasesUrl: $result['releases_url'] = $releasesUrl; + $reviewCommentUrl = $object->reviewCommentUrl; + after_reviewCommentUrl: $result['review_comment_url'] = $reviewCommentUrl; - $stargazersUrl = $object->stargazersUrl; - after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; $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; + $number = $object->number; + after_number: $result['number'] = $number; - $tagsUrl = $object->tagsUrl; - after_tagsUrl: $result['tags_url'] = $tagsUrl; + $state = $object->state; + after_state: $result['state'] = $state; - $teamsUrl = $object->teamsUrl; - after_teamsUrl: $result['teams_url'] = $teamsUrl; + $locked = $object->locked; + after_locked: $result['locked'] = $locked; - $treesUrl = $object->treesUrl; - after_treesUrl: $result['trees_url'] = $treesUrl; + $title = $object->title; + after_title: $result['title'] = $title; - $url = $object->url; - after_url: $result['url'] = $url; + $user = $object->user; + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); + after_user: $result['user'] = $user; - $cloneUrl = $object->cloneUrl; - after_cloneUrl: $result['clone_url'] = $cloneUrl; + $body = $object->body; - $defaultBranch = $object->defaultBranch; - after_defaultBranch: $result['default_branch'] = $defaultBranch; + if ($body === null) { + goto after_body; + } - $forks = $object->forks; - after_forks: $result['forks'] = $forks; + after_body: $result['body'] = $body; - $forksCount = $object->forksCount; - after_forksCount: $result['forks_count'] = $forksCount; + $labels = $object->labels; + static $labelsSerializer0; - $gitUrl = $object->gitUrl; - after_gitUrl: $result['git_url'] = $gitUrl; + if ($labelsSerializer0 === null) { + $labelsSerializer0 = new SerializeArrayItems(...[]); + } - $hasDownloads = $object->hasDownloads; - after_hasDownloads: $result['has_downloads'] = $hasDownloads; + $labels = $labelsSerializer0->serialize($labels, $this); + after_labels: $result['labels'] = $labels; - $hasIssues = $object->hasIssues; - after_hasIssues: $result['has_issues'] = $hasIssues; + $milestone = $object->milestone; - $hasProjects = $object->hasProjects; - after_hasProjects: $result['has_projects'] = $hasProjects; + if ($milestone === null) { + goto after_milestone; + } - $hasWiki = $object->hasWiki; - after_hasWiki: $result['has_wiki'] = $hasWiki; + $milestone = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($milestone); + after_milestone: $result['milestone'] = $milestone; - $hasPages = $object->hasPages; - after_hasPages: $result['has_pages'] = $hasPages; + $activeLockReason = $object->activeLockReason; - $hasDiscussions = $object->hasDiscussions; - after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + if ($activeLockReason === null) { + goto after_activeLockReason; + } - $homepage = $object->homepage; + after_activeLockReason: $result['active_lock_reason'] = $activeLockReason; - if ($homepage === null) { - goto after_homepage; - } + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; - after_homepage: $result['homepage'] = $homepage; + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; - $language = $object->language; + $closedAt = $object->closedAt; - if ($language === null) { - goto after_language; + if ($closedAt === null) { + goto after_closedAt; } - after_language: $result['language'] = $language; + after_closedAt: $result['closed_at'] = $closedAt; - $masterBranch = $object->masterBranch; + $mergedAt = $object->mergedAt; - if ($masterBranch === null) { - goto after_masterBranch; + if ($mergedAt === null) { + goto after_mergedAt; } - after_masterBranch: $result['master_branch'] = $masterBranch; - - $archived = $object->archived; - after_archived: $result['archived'] = $archived; - - $disabled = $object->disabled; - after_disabled: $result['disabled'] = $disabled; + after_mergedAt: $result['merged_at'] = $mergedAt; - $visibility = $object->visibility; + $mergeCommitSha = $object->mergeCommitSha; - if ($visibility === null) { - goto after_visibility; + if ($mergeCommitSha === null) { + goto after_mergeCommitSha; } - after_visibility: $result['visibility'] = $visibility; + after_mergeCommitSha: $result['merge_commit_sha'] = $mergeCommitSha; - $mirrorUrl = $object->mirrorUrl; + $assignee = $object->assignee; - if ($mirrorUrl === null) { - goto after_mirrorUrl; + if ($assignee === null) { + goto after_assignee; } - after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + $assignee = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($assignee); + after_assignee: $result['assignee'] = $assignee; - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; + $assignees = $object->assignees; - $openIssuesCount = $object->openIssuesCount; - after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + if ($assignees === null) { + goto after_assignees; + } - $permissions = $object->permissions; + static $assigneesSerializer0; - if ($permissions === null) { - goto after_permissions; + if ($assigneesSerializer0 === null) { + $assigneesSerializer0 = new SerializeArrayItems(...[]); } - $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($permissions); - after_permissions: $result['permissions'] = $permissions; + $assignees = $assigneesSerializer0->serialize($assignees, $this); + after_assignees: $result['assignees'] = $assignees; - $tempCloneToken = $object->tempCloneToken; + $requestedReviewers = $object->requestedReviewers; - if ($tempCloneToken === null) { - goto after_tempCloneToken; + if ($requestedReviewers === null) { + goto after_requestedReviewers; } - after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; - - $allowMergeCommit = $object->allowMergeCommit; + static $requestedReviewersSerializer0; - if ($allowMergeCommit === null) { - goto after_allowMergeCommit; + if ($requestedReviewersSerializer0 === null) { + $requestedReviewersSerializer0 = new SerializeArrayItems(...[]); } - after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + $requestedReviewers = $requestedReviewersSerializer0->serialize($requestedReviewers, $this); + after_requestedReviewers: $result['requested_reviewers'] = $requestedReviewers; - $allowSquashMerge = $object->allowSquashMerge; + $requestedTeams = $object->requestedTeams; - if ($allowSquashMerge === null) { - goto after_allowSquashMerge; + if ($requestedTeams === null) { + goto after_requestedTeams; } - after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; - - $allowRebaseMerge = $object->allowRebaseMerge; + static $requestedTeamsSerializer0; - if ($allowRebaseMerge === null) { - goto after_allowRebaseMerge; + if ($requestedTeamsSerializer0 === null) { + $requestedTeamsSerializer0 = new SerializeArrayItems(...[]); } - after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; - - $license = $object->license; + $requestedTeams = $requestedTeamsSerializer0->serialize($requestedTeams, $this); + after_requestedTeams: $result['requested_teams'] = $requestedTeams; - if ($license === null) { - goto after_license; - } + $head = $object->head; + $head = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($head); + after_head: $result['head'] = $head; - $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($license); - after_license: $result['license'] = $license; + $base = $object->base; + $base = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($base); + after_base: $result['base'] = $base; - $pushedAt = $object->pushedAt; - after_pushedAt: $result['pushed_at'] = $pushedAt; + $links = $object->links; + $links = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($links); + after_links: $result['_links'] = $links; - $size = $object->size; - after_size: $result['size'] = $size; + $authorAssociation = $object->authorAssociation; + after_authorAssociation: $result['author_association'] = $authorAssociation; - $sshUrl = $object->sshUrl; - after_sshUrl: $result['ssh_url'] = $sshUrl; + $autoMerge = $object->autoMerge; - $stargazersCount = $object->stargazersCount; - after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + if ($autoMerge === null) { + goto after_autoMerge; + } - $svnUrl = $object->svnUrl; - after_svnUrl: $result['svn_url'] = $svnUrl; + $autoMerge = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($autoMerge); + after_autoMerge: $result['auto_merge'] = $autoMerge; - $topics = $object->topics; + $draft = $object->draft; - if ($topics === null) { - goto after_topics; + if ($draft === null) { + goto after_draft; } - static $topicsSerializer0; + after_draft: $result['draft'] = $draft; - if ($topicsSerializer0 === null) { - $topicsSerializer0 = new SerializeArrayItems(...[]); + $merged = $object->merged; + after_merged: $result['merged'] = $merged; + + $mergeable = $object->mergeable; + + if ($mergeable === null) { + goto after_mergeable; } - $topics = $topicsSerializer0->serialize($topics, $this); - after_topics: $result['topics'] = $topics; + after_mergeable: $result['mergeable'] = $mergeable; - $watchers = $object->watchers; - after_watchers: $result['watchers'] = $watchers; + $rebaseable = $object->rebaseable; - $watchersCount = $object->watchersCount; - after_watchersCount: $result['watchers_count'] = $watchersCount; + if ($rebaseable === null) { + goto after_rebaseable; + } - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + after_rebaseable: $result['rebaseable'] = $rebaseable; - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + $mergeableState = $object->mergeableState; + after_mergeableState: $result['mergeable_state'] = $mergeableState; - $allowForking = $object->allowForking; + $mergedBy = $object->mergedBy; - if ($allowForking === null) { - goto after_allowForking; + if ($mergedBy === null) { + goto after_mergedBy; } - after_allowForking: $result['allow_forking'] = $allowForking; + $mergedBy = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($mergedBy); + after_mergedBy: $result['merged_by'] = $mergedBy; - $isTemplate = $object->isTemplate; + $comments = $object->comments; + after_comments: $result['comments'] = $comments; - if ($isTemplate === null) { - goto after_isTemplate; - } + $reviewComments = $object->reviewComments; + after_reviewComments: $result['review_comments'] = $reviewComments; - after_isTemplate: $result['is_template'] = $isTemplate; + $maintainerCanModify = $object->maintainerCanModify; + after_maintainerCanModify: $result['maintainer_can_modify'] = $maintainerCanModify; - $webCommitSignoffRequired = $object->webCommitSignoffRequired; + $commits = $object->commits; + after_commits: $result['commits'] = $commits; - if ($webCommitSignoffRequired === null) { - goto after_webCommitSignoffRequired; - } + $additions = $object->additions; + after_additions: $result['additions'] = $additions; - after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; + $deletions = $object->deletions; + after_deletions: $result['deletions'] = $deletions; + + $changedFiles = $object->changedFiles; + after_changedFiles: $result['changed_files'] = $changedFiles; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed { - assert($object instanceof Owner); + assert($object instanceof SimpleUser); $result = []; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; + $name = $object->name; - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; + if ($name === null) { + goto after_name; + } - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + after_name: $result['name'] = $name; - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $email = $object->email; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + 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; @@ -5942,41 +3448,52 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_gravatarId: $result['gravatar_id'] = $gravatarId; + $url = $object->url; + after_url: $result['url'] = $url; + $htmlUrl = $object->htmlUrl; after_htmlUrl: $result['html_url'] = $htmlUrl; - $id = $object->id; - after_id: $result['id'] = $id; + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; - $login = $object->login; - after_login: $result['login'] = $login; + $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; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + $type = $object->type; + after_type: $result['type'] = $type; $siteAdmin = $object->siteAdmin; after_siteAdmin: $result['site_admin'] = $siteAdmin; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $starredAt = $object->starredAt; - $type = $object->type; - after_type: $result['type'] = $type; + if ($starredAt === null) { + goto after_starredAt; + } - $url = $object->url; - after_url: $result['url'] = $url; + after_starredAt: $result['starred_at'] = $starredAt; $userViewType = $object->userViewType; @@ -5989,150 +3506,86 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(mixed $object): mixed - { - assert($object instanceof Permissions); - $result = []; - - $admin = $object->admin; - after_admin: $result['admin'] = $admin; - - $maintain = $object->maintain; - - if ($maintain === null) { - goto after_maintain; - } - - after_maintain: $result['maintain'] = $maintain; - - $push = $object->push; - after_push: $result['push'] = $push; - - $triage = $object->triage; - - if ($triage === null) { - goto after_triage; - } - - after_triage: $result['triage'] = $triage; - - $pull = $object->pull; - after_pull: $result['pull'] = $pull; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone(mixed $object): mixed { - assert($object instanceof License); + assert($object instanceof Milestone); $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; - } - + $url = $object->url; after_url: $result['url'] = $url; - $spdxId = $object->spdxId; + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - if ($spdxId === null) { - goto after_spdxId; - } + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; - after_spdxId: $result['spdx_id'] = $spdxId; + $id = $object->id; + after_id: $result['id'] = $id; $nodeId = $object->nodeId; after_nodeId: $result['node_id'] = $nodeId; - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User(mixed $object): mixed - { - assert($object instanceof User); - $result = []; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + $number = $object->number; + after_number: $result['number'] = $number; - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $state = $object->state; + after_state: $result['state'] = $state; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + $title = $object->title; + after_title: $result['title'] = $title; - $gravatarId = $object->gravatarId; + $description = $object->description; - if ($gravatarId === null) { - goto after_gravatarId; + if ($description === null) { + goto after_description; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; + after_description: $result['description'] = $description; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $creator = $object->creator; - $login = $object->login; - after_login: $result['login'] = $login; + if ($creator === null) { + goto after_creator; + } - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($creator); + after_creator: $result['creator'] = $creator; - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + $closedIssues = $object->closedIssues; + after_closedIssues: $result['closed_issues'] = $closedIssues; - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $closedAt = $object->closedAt; - $type = $object->type; - after_type: $result['type'] = $type; + if ($closedAt === null) { + goto after_closedAt; + } - $url = $object->url; - after_url: $result['url'] = $url; + after_closedAt: $result['closed_at'] = $closedAt; - $userViewType = $object->userViewType; + $dueOn = $object->dueOn; - if ($userViewType === null) { - goto after_userViewType; + if ($dueOn === null) { + goto after_dueOn; } - after_userViewType: $result['user_view_type'] = $userViewType; + after_dueOn: $result['due_on'] = $dueOn; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head(mixed $object): mixed { - assert($object instanceof Base); + assert($object instanceof Head); $result = []; $label = $object->label; @@ -6142,24 +3595,81 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_ref: $result['ref'] = $ref; $repo = $object->repo; - $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($repo); + $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($repo); after_repo: $result['repo'] = $repo; $sha = $object->sha; after_sha: $result['sha'] = $sha; $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($user); + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); after_user: $result['user'] = $user; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo); + assert($object instanceof Repository); $result = []; + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + after_fullName: $result['full_name'] = $fullName; + + $license = $object->license; + + if ($license === null) { + goto after_license; + } + + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $forks = $object->forks; + after_forks: $result['forks'] = $forks; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + after_fork: $result['fork'] = $fork; + + $url = $object->url; + after_url: $result['url'] = $url; + $archiveUrl = $object->archiveUrl; after_archiveUrl: $result['archive_url'] = $archiveUrl; @@ -6193,29 +3703,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $deploymentsUrl = $object->deploymentsUrl; after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; - $description = $object->description; - - if ($description === null) { - goto after_description; - } - - after_description: $result['description'] = $description; - $downloadsUrl = $object->downloadsUrl; after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; $eventsUrl = $object->eventsUrl; after_eventsUrl: $result['events_url'] = $eventsUrl; - $fork = $object->fork; - after_fork: $result['fork'] = $fork; - $forksUrl = $object->forksUrl; after_forksUrl: $result['forks_url'] = $forksUrl; - $fullName = $object->fullName; - after_fullName: $result['full_name'] = $fullName; - $gitCommitsUrl = $object->gitCommitsUrl; after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; @@ -6225,25 +3721,8 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $gitTagsUrl = $object->gitTagsUrl; after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; - $hooksUrl = $object->hooksUrl; - after_hooksUrl: $result['hooks_url'] = $hooksUrl; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $isTemplate = $object->isTemplate; - - if ($isTemplate === null) { - goto after_isTemplate; - } - - after_isTemplate: $result['is_template'] = $isTemplate; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $gitUrl = $object->gitUrl; + after_gitUrl: $result['git_url'] = $gitUrl; $issueCommentUrl = $object->issueCommentUrl; after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; @@ -6269,25 +3748,18 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $milestonesUrl = $object->milestonesUrl; after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; - $name = $object->name; - after_name: $result['name'] = $name; - $notificationsUrl = $object->notificationsUrl; after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; - $owner = $object->owner; - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($owner); - after_owner: $result['owner'] = $owner; - - $private = $object->private; - after_private: $result['private'] = $private; - $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; @@ -6309,41 +3781,22 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $treesUrl = $object->treesUrl; after_treesUrl: $result['trees_url'] = $treesUrl; - $url = $object->url; - after_url: $result['url'] = $url; - $cloneUrl = $object->cloneUrl; after_cloneUrl: $result['clone_url'] = $cloneUrl; - $defaultBranch = $object->defaultBranch; - after_defaultBranch: $result['default_branch'] = $defaultBranch; - - $forks = $object->forks; - after_forks: $result['forks'] = $forks; - - $forksCount = $object->forksCount; - after_forksCount: $result['forks_count'] = $forksCount; - - $gitUrl = $object->gitUrl; - after_gitUrl: $result['git_url'] = $gitUrl; - - $hasDownloads = $object->hasDownloads; - after_hasDownloads: $result['has_downloads'] = $hasDownloads; - - $hasIssues = $object->hasIssues; - after_hasIssues: $result['has_issues'] = $hasIssues; + $mirrorUrl = $object->mirrorUrl; - $hasProjects = $object->hasProjects; - after_hasProjects: $result['has_projects'] = $hasProjects; + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } - $hasWiki = $object->hasWiki; - after_hasWiki: $result['has_wiki'] = $hasWiki; + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; - $hasPages = $object->hasPages; - after_hasPages: $result['has_pages'] = $hasPages; + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; - $hasDiscussions = $object->hasDiscussions; - after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; $homepage = $object->homepage; @@ -6361,74 +3814,107 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_language: $result['language'] = $language; - $masterBranch = $object->masterBranch; + $forksCount = $object->forksCount; + after_forksCount: $result['forks_count'] = $forksCount; - if ($masterBranch === null) { - goto after_masterBranch; + $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_masterBranch: $result['master_branch'] = $masterBranch; + after_isTemplate: $result['is_template'] = $isTemplate; - $archived = $object->archived; - after_archived: $result['archived'] = $archived; + $topics = $object->topics; - $disabled = $object->disabled; - after_disabled: $result['disabled'] = $disabled; + if ($topics === null) { + goto after_topics; + } - $visibility = $object->visibility; + static $topicsSerializer0; - if ($visibility === null) { - goto after_visibility; + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); } - after_visibility: $result['visibility'] = $visibility; + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; - $mirrorUrl = $object->mirrorUrl; + $hasIssues = $object->hasIssues; + after_hasIssues: $result['has_issues'] = $hasIssues; - if ($mirrorUrl === null) { - goto after_mirrorUrl; + $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_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; + $archived = $object->archived; + after_archived: $result['archived'] = $archived; - $openIssuesCount = $object->openIssuesCount; - after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + $disabled = $object->disabled; + after_disabled: $result['disabled'] = $disabled; - $permissions = $object->permissions; + $visibility = $object->visibility; - if ($permissions === null) { - goto after_permissions; + if ($visibility === null) { + goto after_visibility; } - $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($permissions); - after_permissions: $result['permissions'] = $permissions; + after_visibility: $result['visibility'] = $visibility; - $tempCloneToken = $object->tempCloneToken; + $pushedAt = $object->pushedAt; - if ($tempCloneToken === null) { - goto after_tempCloneToken; + if ($pushedAt === null) { + goto after_pushedAt; } - after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + after_pushedAt: $result['pushed_at'] = $pushedAt; - $allowMergeCommit = $object->allowMergeCommit; + $createdAt = $object->createdAt; - if ($allowMergeCommit === null) { - goto after_allowMergeCommit; + if ($createdAt === null) { + goto after_createdAt; } - after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + after_createdAt: $result['created_at'] = $createdAt; - $allowSquashMerge = $object->allowSquashMerge; + $updatedAt = $object->updatedAt; - if ($allowSquashMerge === null) { - goto after_allowSquashMerge; + if ($updatedAt === null) { + goto after_updatedAt; } - after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + after_updatedAt: $result['updated_at'] = $updatedAt; $allowRebaseMerge = $object->allowRebaseMerge; @@ -6438,180 +3924,139 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; - $license = $object->license; + $tempCloneToken = $object->tempCloneToken; - if ($license === null) { - goto after_license; + if ($tempCloneToken === null) { + goto after_tempCloneToken; } - $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); - after_license: $result['license'] = $license; - - $pushedAt = $object->pushedAt; - after_pushedAt: $result['pushed_at'] = $pushedAt; - - $size = $object->size; - after_size: $result['size'] = $size; + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; - $sshUrl = $object->sshUrl; - after_sshUrl: $result['ssh_url'] = $sshUrl; + $allowSquashMerge = $object->allowSquashMerge; - $stargazersCount = $object->stargazersCount; - after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + if ($allowSquashMerge === null) { + goto after_allowSquashMerge; + } - $svnUrl = $object->svnUrl; - after_svnUrl: $result['svn_url'] = $svnUrl; + after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; - $topics = $object->topics; + $allowAutoMerge = $object->allowAutoMerge; - if ($topics === null) { - goto after_topics; + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; } - static $topicsSerializer0; + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; - if ($topicsSerializer0 === null) { - $topicsSerializer0 = new SerializeArrayItems(...[]); - } + $deleteBranchOnMerge = $object->deleteBranchOnMerge; - $topics = $topicsSerializer0->serialize($topics, $this); - after_topics: $result['topics'] = $topics; + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; + } - $watchers = $object->watchers; - after_watchers: $result['watchers'] = $watchers; + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; - $watchersCount = $object->watchersCount; - after_watchersCount: $result['watchers_count'] = $watchersCount; + $allowUpdateBranch = $object->allowUpdateBranch; - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; - $allowForking = $object->allowForking; + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; - if ($allowForking === null) { - goto after_allowForking; + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; } - after_allowForking: $result['allow_forking'] = $allowForking; + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; - $webCommitSignoffRequired = $object->webCommitSignoffRequired; + $squashMergeCommitTitle = $object->squashMergeCommitTitle; - if ($webCommitSignoffRequired === null) { - goto after_webCommitSignoffRequired; + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; } - after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; - - return $result; - } + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner); - $result = []; + $squashMergeCommitMessage = $object->squashMergeCommitMessage; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; + } - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + $mergeCommitTitle = $object->mergeCommitTitle; - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; - $gravatarId = $object->gravatarId; + $mergeCommitMessage = $object->mergeCommitMessage; - if ($gravatarId === null) { - goto after_gravatarId; + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; - $id = $object->id; - after_id: $result['id'] = $id; + $allowMergeCommit = $object->allowMergeCommit; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + if ($allowMergeCommit === null) { + goto after_allowMergeCommit; + } - $login = $object->login; - after_login: $result['login'] = $login; + after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + $allowForking = $object->allowForking; - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + if ($allowForking === null) { + goto after_allowForking; + } - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + after_allowForking: $result['allow_forking'] = $allowForking; - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + $webCommitSignoffRequired = $object->webCommitSignoffRequired; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + if ($webCommitSignoffRequired === null) { + goto after_webCommitSignoffRequired; + } - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; - $type = $object->type; - after_type: $result['type'] = $type; + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - $url = $object->url; - after_url: $result['url'] = $url; + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; - $userViewType = $object->userViewType; + $masterBranch = $object->masterBranch; - if ($userViewType === null) { - goto after_userViewType; + if ($masterBranch === null) { + goto after_masterBranch; } - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions); - $result = []; - - $admin = $object->admin; - after_admin: $result['admin'] = $admin; + after_masterBranch: $result['master_branch'] = $masterBranch; - $maintain = $object->maintain; + $starredAt = $object->starredAt; - if ($maintain === null) { - goto after_maintain; + if ($starredAt === null) { + goto after_starredAt; } - after_maintain: $result['maintain'] = $maintain; - - $push = $object->push; - after_push: $result['push'] = $push; + after_starredAt: $result['starred_at'] = $starredAt; - $triage = $object->triage; + $anonymousAccessEnabled = $object->anonymousAccessEnabled; - if ($triage === null) { - goto after_triage; + if ($anonymousAccessEnabled === null) { + goto after_anonymousAccessEnabled; } - after_triage: $result['triage'] = $triage; - - $pull = $object->pull; - after_pull: $result['pull'] = $pull; + after_anonymousAccessEnabled: $result['anonymous_access_enabled'] = $anonymousAccessEnabled; return $result; } @@ -6657,77 +4102,60 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\User); + assert($object instanceof Permissions); $result = []; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $admin = $object->admin; + after_admin: $result['admin'] = $admin; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + $pull = $object->pull; + after_pull: $result['pull'] = $pull; - $gravatarId = $object->gravatarId; + $triage = $object->triage; - if ($gravatarId === null) { - goto after_gravatarId; + if ($triage === null) { + goto after_triage; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $login = $object->login; - after_login: $result['login'] = $login; + after_triage: $result['triage'] = $triage; - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + $push = $object->push; + after_push: $result['push'] = $push; - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + $maintain = $object->maintain; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + if ($maintain === null) { + goto after_maintain; + } - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + after_maintain: $result['maintain'] = $maintain; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + return $result; + } - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(mixed $object): mixed + { + assert($object instanceof Base); + $result = []; - $type = $object->type; - after_type: $result['type'] = $type; + $label = $object->label; + after_label: $result['label'] = $label; - $url = $object->url; - after_url: $result['url'] = $url; + $ref = $object->ref; + after_ref: $result['ref'] = $ref; - $userViewType = $object->userViewType; + $repo = $object->repo; + $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($repo); + after_repo: $result['repo'] = $repo; - if ($userViewType === null) { - goto after_userViewType; - } + $sha = $object->sha; + after_sha: $result['sha'] = $sha; - after_userViewType: $result['user_view_type'] = $userViewType; + $user = $object->user; + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); + after_user: $result['user'] = $user; return $result; } diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/CodeScanningAlert.php b/clients/GitHub/src/Internal/Hydrator/WebHook/CodeScanningAlert.php index 0d19193e915..dbc3ece46b6 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/CodeScanningAlert.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/CodeScanningAlert.php @@ -5591,7 +5591,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh $value = $payload['state'] ?? null; if ($value === null) { - $missingFields[] = 'state'; + $properties['state'] = null; goto after_state; } @@ -11487,7 +11487,12 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $rule = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCodeScanningAlertCreated⚡️Alert⚡️Rule($rule); after_rule: $result['rule'] = $rule; - $state = $object->state; + $state = $object->state; + + if ($state === null) { + goto after_state; + } + after_state: $result['state'] = $state; $tool = $object->tool; diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/PullRequest.php b/clients/GitHub/src/Internal/Hydrator/WebHook/PullRequest.php index 8d5d2ee111b..5e5f52611e0 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/PullRequest.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/PullRequest.php @@ -8,6 +8,7 @@ use ApiClients\Client\GitHub\Schema\LicenseSimple; use ApiClients\Client\GitHub\Schema\Link; use ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks; +use ApiClients\Client\GitHub\Schema\Repository; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties; use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository; @@ -203,16 +204,9 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\PullRequest' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($payload), 'ApiClients\Client\GitHub\Schema\Milestone' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($payload), 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\User' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($payload), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($payload), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($payload), 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($payload), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\User' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($payload), 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($payload), 'ApiClients\Client\GitHub\Schema\Link' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($payload), 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($payload), @@ -24550,14 +24544,14 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull $value = $payload['repo'] ?? null; if ($value === null) { - $properties['repo'] = null; + $missingFields[] = 'repo'; goto after_repo; } if (is_array($value)) { try { $this->hydrationStack[] = 'repo'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); } finally { array_pop($this->hydrationStack); } @@ -24588,7 +24582,7 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull if (is_array($value)) { try { $this->hydrationStack[] = 'user'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($value); + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); } finally { array_pop($this->hydrationStack); } @@ -24612,11 +24606,181 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(array $payload): Repository { $properties = []; $missingFields = []; try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $missingFields[] = 'id'; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['node_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'node_id'; + goto after_nodeId; + } + + $properties['nodeId'] = $value; + + after_nodeId: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $missingFields[] = 'name'; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['full_name'] ?? null; + + if ($value === null) { + $missingFields[] = 'full_name'; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + + $value = $payload['license'] ?? null; + + if ($value === null) { + $properties['license'] = null; + goto after_license; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'license'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['license'] = $value; + + after_license: + + $value = $payload['forks'] ?? null; + + if ($value === null) { + $missingFields[] = 'forks'; + goto after_forks; + } + + $properties['forks'] = $value; + + after_forks: + + $value = $payload['permissions'] ?? null; + + if ($value === null) { + $properties['permissions'] = null; + goto after_permissions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'permissions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['permissions'] = $value; + + after_permissions: + + $value = $payload['owner'] ?? null; + + if ($value === null) { + $missingFields[] = 'owner'; + goto after_owner; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'owner'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['owner'] = $value; + + after_owner: + + $value = $payload['private'] ?? null; + + if ($value === null) { + $missingFields[] = 'private'; + goto after_private; + } + + $properties['private'] = $value; + + after_private: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $missingFields[] = 'html_url'; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['fork'] ?? null; + + if ($value === null) { + $missingFields[] = 'fork'; + goto after_fork; + } + + $properties['fork'] = $value; + + after_fork: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $missingFields[] = 'url'; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + $value = $payload['archive_url'] ?? null; if ($value === null) { @@ -24738,17 +24902,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_deploymentsUrl: - $value = $payload['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - $value = $payload['downloads_url'] ?? null; if ($value === null) { @@ -24771,17 +24924,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_eventsUrl: - $value = $payload['fork'] ?? null; - - if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; - } - - $properties['fork'] = $value; - - after_fork: - $value = $payload['forks_url'] ?? null; if ($value === null) { @@ -24793,17 +24935,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_forksUrl: - $value = $payload['full_name'] ?? null; - - if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; - } - - $properties['fullName'] = $value; - - after_fullName: - $value = $payload['git_commits_url'] ?? null; if ($value === null) { @@ -24837,49 +24968,16 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_gitTagsUrl: - $value = $payload['hooks_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; - } - - $properties['hooksUrl'] = $value; - - after_hooksUrl: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; + $value = $payload['git_url'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'git_url'; + goto after_gitUrl; } - $properties['nodeId'] = $value; + $properties['gitUrl'] = $value; - after_nodeId: + after_gitUrl: $value = $payload['issue_comment_url'] ?? null; @@ -24969,17 +25067,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_milestonesUrl: - $value = $payload['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - $value = $payload['notifications_url'] ?? null; if ($value === null) { @@ -24991,37 +25078,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_notificationsUrl: - $value = $payload['owner'] ?? null; - - if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($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['pulls_url'] ?? null; if ($value === null) { @@ -25044,6 +25100,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull 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) { @@ -25121,49 +25188,71 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_treesUrl: - $value = $payload['url'] ?? null; + $value = $payload['clone_url'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'clone_url'; + goto after_cloneUrl; } - $properties['url'] = $value; + $properties['cloneUrl'] = $value; - after_url: + after_cloneUrl: - $value = $payload['clone_url'] ?? null; + $value = $payload['mirror_url'] ?? null; if ($value === null) { - $missingFields[] = 'clone_url'; - goto after_cloneUrl; + $properties['mirrorUrl'] = null; + goto after_mirrorUrl; } - $properties['cloneUrl'] = $value; + $properties['mirrorUrl'] = $value; - after_cloneUrl: + after_mirrorUrl: - $value = $payload['default_branch'] ?? null; + $value = $payload['hooks_url'] ?? null; if ($value === null) { - $missingFields[] = 'default_branch'; - goto after_defaultBranch; + $missingFields[] = 'hooks_url'; + goto after_hooksUrl; } - $properties['defaultBranch'] = $value; + $properties['hooksUrl'] = $value; - after_defaultBranch: + after_hooksUrl: - $value = $payload['forks'] ?? null; + $value = $payload['svn_url'] ?? null; if ($value === null) { - $missingFields[] = 'forks'; - goto after_forks; + $missingFields[] = 'svn_url'; + goto after_svnUrl; } - $properties['forks'] = $value; + $properties['svnUrl'] = $value; - after_forks: + 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; @@ -25176,27 +25265,82 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_forksCount: - $value = $payload['git_url'] ?? null; + $value = $payload['stargazers_count'] ?? null; if ($value === null) { - $missingFields[] = 'git_url'; - goto after_gitUrl; + $missingFields[] = 'stargazers_count'; + goto after_stargazersCount; } - $properties['gitUrl'] = $value; + $properties['stargazersCount'] = $value; - after_gitUrl: + after_stargazersCount: - $value = $payload['has_downloads'] ?? null; + $value = $payload['watchers_count'] ?? null; if ($value === null) { - $missingFields[] = 'has_downloads'; - goto after_hasDownloads; + $missingFields[] = 'watchers_count'; + goto after_watchersCount; } - $properties['hasDownloads'] = $value; + $properties['watchersCount'] = $value; - after_hasDownloads: + after_watchersCount: + + $value = $payload['size'] ?? null; + + if ($value === null) { + $missingFields[] = 'size'; + goto after_size; + } + + $properties['size'] = $value; + + after_size: + + $value = $payload['default_branch'] ?? null; + + if ($value === null) { + $missingFields[] = 'default_branch'; + goto after_defaultBranch; + } + + $properties['defaultBranch'] = $value; + + after_defaultBranch: + + $value = $payload['open_issues_count'] ?? null; + + if ($value === null) { + $missingFields[] = 'open_issues_count'; + goto after_openIssuesCount; + } + + $properties['openIssuesCount'] = $value; + + after_openIssuesCount: + + $value = $payload['is_template'] ?? null; + + if ($value === null) { + $properties['isTemplate'] = null; + goto after_isTemplate; + } + + $properties['isTemplate'] = $value; + + after_isTemplate: + + $value = $payload['topics'] ?? null; + + if ($value === null) { + $properties['topics'] = null; + goto after_topics; + } + + $properties['topics'] = $value; + + after_topics: $value = $payload['has_issues'] ?? null; @@ -25242,49 +25386,27 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_hasPages: - $value = $payload['has_discussions'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_discussions'; - goto after_hasDiscussions; - } - - $properties['hasDiscussions'] = $value; - - after_hasDiscussions: - - $value = $payload['homepage'] ?? null; - - if ($value === null) { - $properties['homepage'] = null; - goto after_homepage; - } - - $properties['homepage'] = $value; - - after_homepage: - - $value = $payload['language'] ?? null; + $value = $payload['has_downloads'] ?? null; if ($value === null) { - $properties['language'] = null; - goto after_language; + $missingFields[] = 'has_downloads'; + goto after_hasDownloads; } - $properties['language'] = $value; + $properties['hasDownloads'] = $value; - after_language: + after_hasDownloads: - $value = $payload['master_branch'] ?? null; + $value = $payload['has_discussions'] ?? null; if ($value === null) { - $properties['masterBranch'] = null; - goto after_masterBranch; + $properties['hasDiscussions'] = null; + goto after_hasDiscussions; } - $properties['masterBranch'] = $value; + $properties['hasDiscussions'] = $value; - after_masterBranch: + after_hasDiscussions: $value = $payload['archived'] ?? null; @@ -25319,58 +25441,49 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_visibility: - $value = $payload['mirror_url'] ?? null; + $value = $payload['pushed_at'] ?? null; if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; + $properties['pushedAt'] = null; + goto after_pushedAt; } - $properties['mirrorUrl'] = $value; + $properties['pushedAt'] = $value; - after_mirrorUrl: + after_pushedAt: - $value = $payload['open_issues'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues'; - goto after_openIssues; + $properties['createdAt'] = null; + goto after_createdAt; } - $properties['openIssues'] = $value; + $properties['createdAt'] = $value; - after_openIssues: + after_createdAt: - $value = $payload['open_issues_count'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $missingFields[] = 'open_issues_count'; - goto after_openIssuesCount; + $properties['updatedAt'] = null; + goto after_updatedAt; } - $properties['openIssuesCount'] = $value; + $properties['updatedAt'] = $value; - after_openIssuesCount: + after_updatedAt: - $value = $payload['permissions'] ?? null; + $value = $payload['allow_rebase_merge'] ?? null; if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['allowRebaseMerge'] = null; + goto after_allowRebaseMerge; } - $properties['permissions'] = $value; + $properties['allowRebaseMerge'] = $value; - after_permissions: + after_allowRebaseMerge: $value = $payload['temp_clone_token'] ?? null; @@ -25383,17 +25496,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_tempCloneToken: - $value = $payload['allow_merge_commit'] ?? null; - - if ($value === null) { - $properties['allowMergeCommit'] = null; - goto after_allowMergeCommit; - } - - $properties['allowMergeCommit'] = $value; - - after_allowMergeCommit: - $value = $payload['allow_squash_merge'] ?? null; if ($value === null) { @@ -25405,1125 +25507,1234 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_allowSquashMerge: - $value = $payload['allow_rebase_merge'] ?? null; + $value = $payload['allow_auto_merge'] ?? null; if ($value === null) { - $properties['allowRebaseMerge'] = null; - goto after_allowRebaseMerge; + $properties['allowAutoMerge'] = null; + goto after_allowAutoMerge; } - $properties['allowRebaseMerge'] = $value; + $properties['allowAutoMerge'] = $value; - after_allowRebaseMerge: + after_allowAutoMerge: - $value = $payload['license'] ?? null; + $value = $payload['delete_branch_on_merge'] ?? null; if ($value === null) { - $properties['license'] = null; - goto after_license; + $properties['deleteBranchOnMerge'] = null; + goto after_deleteBranchOnMerge; } - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($value); - } finally { - array_pop($this->hydrationStack); - } + $properties['deleteBranchOnMerge'] = $value; + + after_deleteBranchOnMerge: + + $value = $payload['allow_update_branch'] ?? null; + + if ($value === null) { + $properties['allowUpdateBranch'] = null; + goto after_allowUpdateBranch; } - $properties['license'] = $value; + $properties['allowUpdateBranch'] = $value; - after_license: + after_allowUpdateBranch: - $value = $payload['pushed_at'] ?? null; + $value = $payload['use_squash_pr_title_as_default'] ?? null; if ($value === null) { - $missingFields[] = 'pushed_at'; - goto after_pushedAt; + $properties['useSquashPrTitleAsDefault'] = null; + goto after_useSquashPrTitleAsDefault; } - $properties['pushedAt'] = $value; + $properties['useSquashPrTitleAsDefault'] = $value; - after_pushedAt: + after_useSquashPrTitleAsDefault: - $value = $payload['size'] ?? null; + $value = $payload['squash_merge_commit_title'] ?? null; if ($value === null) { - $missingFields[] = 'size'; - goto after_size; + $properties['squashMergeCommitTitle'] = null; + goto after_squashMergeCommitTitle; } - $properties['size'] = $value; + $properties['squashMergeCommitTitle'] = $value; - after_size: + after_squashMergeCommitTitle: - $value = $payload['ssh_url'] ?? null; + $value = $payload['squash_merge_commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'ssh_url'; - goto after_sshUrl; + $properties['squashMergeCommitMessage'] = null; + goto after_squashMergeCommitMessage; } - $properties['sshUrl'] = $value; + $properties['squashMergeCommitMessage'] = $value; - after_sshUrl: + after_squashMergeCommitMessage: - $value = $payload['stargazers_count'] ?? null; + $value = $payload['merge_commit_title'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_count'; - goto after_stargazersCount; + $properties['mergeCommitTitle'] = null; + goto after_mergeCommitTitle; } - $properties['stargazersCount'] = $value; + $properties['mergeCommitTitle'] = $value; - after_stargazersCount: + after_mergeCommitTitle: - $value = $payload['svn_url'] ?? null; + $value = $payload['merge_commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'svn_url'; - goto after_svnUrl; + $properties['mergeCommitMessage'] = null; + goto after_mergeCommitMessage; } - $properties['svnUrl'] = $value; + $properties['mergeCommitMessage'] = $value; - after_svnUrl: + after_mergeCommitMessage: - $value = $payload['topics'] ?? null; + $value = $payload['allow_merge_commit'] ?? null; if ($value === null) { - $properties['topics'] = null; - goto after_topics; + $properties['allowMergeCommit'] = null; + goto after_allowMergeCommit; } - $properties['topics'] = $value; + $properties['allowMergeCommit'] = $value; - after_topics: + after_allowMergeCommit: - $value = $payload['watchers'] ?? null; + $value = $payload['allow_forking'] ?? null; if ($value === null) { - $missingFields[] = 'watchers'; - goto after_watchers; + $properties['allowForking'] = null; + goto after_allowForking; } - $properties['watchers'] = $value; + $properties['allowForking'] = $value; - after_watchers: + after_allowForking: - $value = $payload['watchers_count'] ?? null; + $value = $payload['web_commit_signoff_required'] ?? null; if ($value === null) { - $missingFields[] = 'watchers_count'; - goto after_watchersCount; + $properties['webCommitSignoffRequired'] = null; + goto after_webCommitSignoffRequired; } - $properties['watchersCount'] = $value; + $properties['webCommitSignoffRequired'] = $value; - after_watchersCount: + after_webCommitSignoffRequired: - $value = $payload['created_at'] ?? null; + $value = $payload['open_issues'] ?? null; if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; + $missingFields[] = 'open_issues'; + goto after_openIssues; } - $properties['createdAt'] = $value; + $properties['openIssues'] = $value; - after_createdAt: + after_openIssues: - $value = $payload['updated_at'] ?? null; + $value = $payload['watchers'] ?? null; if ($value === null) { - $missingFields[] = 'updated_at'; - goto after_updatedAt; + $missingFields[] = 'watchers'; + goto after_watchers; } - $properties['updatedAt'] = $value; + $properties['watchers'] = $value; - after_updatedAt: + after_watchers: - $value = $payload['allow_forking'] ?? null; + $value = $payload['master_branch'] ?? null; if ($value === null) { - $properties['allowForking'] = null; - goto after_allowForking; + $properties['masterBranch'] = null; + goto after_masterBranch; } - $properties['allowForking'] = $value; + $properties['masterBranch'] = $value; - after_allowForking: + after_masterBranch: - $value = $payload['is_template'] ?? null; + $value = $payload['starred_at'] ?? null; if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; + $properties['starredAt'] = null; + goto after_starredAt; } - $properties['isTemplate'] = $value; + $properties['starredAt'] = $value; - after_isTemplate: + after_starredAt: - $value = $payload['web_commit_signoff_required'] ?? null; + $value = $payload['anonymous_access_enabled'] ?? null; if ($value === null) { - $properties['webCommitSignoffRequired'] = null; - goto after_webCommitSignoffRequired; + $properties['anonymousAccessEnabled'] = null; + goto after_anonymousAccessEnabled; } - $properties['webCommitSignoffRequired'] = $value; + $properties['anonymousAccessEnabled'] = $value; - after_webCommitSignoffRequired: + after_anonymousAccessEnabled: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Repository::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo(...$properties); + return new Repository(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\Repository\Permissions { $properties = []; $missingFields = []; try { - $value = $payload['avatar_url'] ?? null; + $value = $payload['admin'] ?? null; if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; + $missingFields[] = 'admin'; + goto after_admin; } - $properties['avatarUrl'] = $value; + $properties['admin'] = $value; - after_avatarUrl: + after_admin: - $value = $payload['events_url'] ?? null; + $value = $payload['pull'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $missingFields[] = 'pull'; + goto after_pull; } - $properties['eventsUrl'] = $value; + $properties['pull'] = $value; - after_eventsUrl: + after_pull: - $value = $payload['followers_url'] ?? null; + $value = $payload['triage'] ?? null; if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + $properties['triage'] = null; + goto after_triage; } - $properties['followersUrl'] = $value; + $properties['triage'] = $value; - after_followersUrl: + after_triage: - $value = $payload['following_url'] ?? null; + $value = $payload['push'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $missingFields[] = 'push'; + goto after_push; } - $properties['followingUrl'] = $value; + $properties['push'] = $value; - after_followingUrl: + after_push: - $value = $payload['gists_url'] ?? null; + $value = $payload['maintain'] ?? null; if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + $properties['maintain'] = null; + goto after_maintain; } - $properties['gistsUrl'] = $value; + $properties['maintain'] = $value; - after_gistsUrl: + after_maintain: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository\Permissions', $exception, stack: $this->hydrationStack); + } - $value = $payload['gravatar_id'] ?? null; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\Repository\Permissions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new \ApiClients\Client\GitHub\Schema\Repository\Permissions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Repository\Permissions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base + { + $properties = []; + $missingFields = []; + try { + $value = $payload['label'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'label'; + goto after_label; } - $properties['gravatarId'] = $value; + $properties['label'] = $value; - after_gravatarId: + after_label: - $value = $payload['html_url'] ?? null; + $value = $payload['ref'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + $missingFields[] = 'ref'; + goto after_ref; } - $properties['htmlUrl'] = $value; + $properties['ref'] = $value; - after_htmlUrl: + after_ref: - $value = $payload['id'] ?? null; + $value = $payload['repo'] ?? null; if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + $missingFields[] = 'repo'; + goto after_repo; } - $properties['id'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repo'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_id: + $properties['repo'] = $value; - $value = $payload['node_id'] ?? null; + after_repo: + + $value = $payload['sha'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'sha'; + goto after_sha; } - $properties['nodeId'] = $value; + $properties['sha'] = $value; - after_nodeId: + after_sha: - $value = $payload['login'] ?? null; + $value = $payload['user'] ?? null; if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + $missingFields[] = 'user'; + goto after_user; } - $properties['login'] = $value; - - after_login: + if (is_array($value)) { + try { + $this->hydrationStack[] = 'user'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } - $value = $payload['organizations_url'] ?? null; + $properties['user'] = $value; - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } + after_user: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); + } - $properties['organizationsUrl'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base::class, $missingFields, stack: $this->hydrationStack); + } - after_organizationsUrl: + try { + return new \ApiClients\Client\GitHub\Schema\PullRequest\Base(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['received_events_url'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Links + { + $properties = []; + $missingFields = []; + try { + $value = $payload['comments'] ?? null; if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + $missingFields[] = 'comments'; + goto after_comments; } - $properties['receivedEventsUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'comments'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_receivedEventsUrl: + $properties['comments'] = $value; - $value = $payload['repos_url'] ?? null; + after_comments: + + $value = $payload['commits'] ?? null; if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; + $missingFields[] = 'commits'; + goto after_commits; } - $properties['reposUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'commits'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_reposUrl: + $properties['commits'] = $value; - $value = $payload['site_admin'] ?? null; + after_commits: + + $value = $payload['statuses'] ?? null; if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + $missingFields[] = 'statuses'; + goto after_statuses; } - $properties['siteAdmin'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'statuses'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_siteAdmin: + $properties['statuses'] = $value; - $value = $payload['starred_url'] ?? null; + after_statuses: + + $value = $payload['html'] ?? null; if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; + $missingFields[] = 'html'; + goto after_html; } - $properties['starredUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'html'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_starredUrl: + $properties['html'] = $value; - $value = $payload['subscriptions_url'] ?? null; + after_html: + + $value = $payload['issue'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $missingFields[] = 'issue'; + goto after_issue; } - $properties['subscriptionsUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'issue'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_subscriptionsUrl: + $properties['issue'] = $value; - $value = $payload['type'] ?? null; + after_issue: + + $value = $payload['review_comments'] ?? null; if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + $missingFields[] = 'review_comments'; + goto after_reviewComments; } - $properties['type'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'reviewComments'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_type: + $properties['reviewComments'] = $value; - $value = $payload['url'] ?? null; + after_reviewComments: + + $value = $payload['review_comment'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'review_comment'; + goto after_reviewComment; } - $properties['url'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'reviewComment'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_url: + $properties['reviewComment'] = $value; - $value = $payload['user_view_type'] ?? null; + after_reviewComment: + + $value = $payload['self'] ?? null; if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; + $missingFields[] = 'self'; + goto after_self; } - $properties['userViewType'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'self'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_userViewType: + $properties['self'] = $value; + + after_self: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Links::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner(...$properties); + return new \ApiClients\Client\GitHub\Schema\PullRequest\Links(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link(array $payload): Link { $properties = []; $missingFields = []; try { - $value = $payload['admin'] ?? null; + $value = $payload['href'] ?? null; if ($value === null) { - $missingFields[] = 'admin'; - goto after_admin; + $missingFields[] = 'href'; + goto after_href; } - $properties['admin'] = $value; + $properties['href'] = $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) { - $missingFields[] = 'push'; - 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) { - $missingFields[] = 'pull'; - goto after_pull; - } - - $properties['pull'] = $value; - - after_pull: + after_href: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Link::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions(...$properties); + return new Link(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge(array $payload): \ApiClients\Client\GitHub\Schema\AutoMerge { $properties = []; $missingFields = []; try { - $value = $payload['key'] ?? null; + $value = $payload['enabled_by'] ?? null; if ($value === null) { - $missingFields[] = 'key'; - goto after_key; + $missingFields[] = 'enabled_by'; + goto after_enabledBy; } - $properties['key'] = $value; - - after_key: - - $value = $payload['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enabledBy'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['name'] = $value; + $properties['enabledBy'] = $value; - after_name: + after_enabledBy: - $value = $payload['url'] ?? null; + $value = $payload['merge_method'] ?? null; if ($value === null) { - $properties['url'] = null; - goto after_url; + $missingFields[] = 'merge_method'; + goto after_mergeMethod; } - $properties['url'] = $value; + $properties['mergeMethod'] = $value; - after_url: + after_mergeMethod: - $value = $payload['spdx_id'] ?? null; + $value = $payload['commit_title'] ?? null; if ($value === null) { - $properties['spdxId'] = null; - goto after_spdxId; + $missingFields[] = 'commit_title'; + goto after_commitTitle; } - $properties['spdxId'] = $value; + $properties['commitTitle'] = $value; - after_spdxId: + after_commitTitle: - $value = $payload['node_id'] ?? null; + $value = $payload['commit_message'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'commit_message'; + goto after_commitMessage; } - $properties['nodeId'] = $value; + $properties['commitMessage'] = $value; - after_nodeId: + after_commitMessage: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\AutoMerge::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License(...$properties); + return new \ApiClients\Client\GitHub\Schema\AutoMerge(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Head\User + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestConvertedToDraft(array $payload): WebhookPullRequestConvertedToDraft { $properties = []; $missingFields = []; try { - $value = $payload['avatar_url'] ?? null; + $value = $payload['action'] ?? null; if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; + $missingFields[] = 'action'; + goto after_action; } - $properties['avatarUrl'] = $value; + $properties['action'] = $value; - after_avatarUrl: + after_action: - $value = $payload['events_url'] ?? null; + $value = $payload['enterprise'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $properties['enterprise'] = null; + goto after_enterprise; } - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enterprise'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['followersUrl'] = $value; + $properties['enterprise'] = $value; - after_followersUrl: + after_enterprise: - $value = $payload['following_url'] ?? null; + $value = $payload['installation'] ?? null; if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; + $properties['installation'] = null; + goto after_installation; } - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['gistsUrl'] = $value; + $properties['installation'] = $value; - after_gistsUrl: + after_installation: - $value = $payload['gravatar_id'] ?? null; + $value = $payload['number'] ?? null; if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; + $missingFields[] = 'number'; + goto after_number; } - $properties['gravatarId'] = $value; + $properties['number'] = $value; - after_gravatarId: + after_number: - $value = $payload['html_url'] ?? null; + $value = $payload['organization'] ?? null; if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; + $properties['organization'] = null; + goto after_organization; } - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['id'] = $value; + $properties['organization'] = $value; - after_id: + after_organization: - $value = $payload['node_id'] ?? null; + $value = $payload['pull_request'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'pull_request'; + goto after_pullRequest; } - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'pullRequest'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['login'] = $value; + $properties['pullRequest'] = $value; - after_login: + after_pullRequest: - $value = $payload['organizations_url'] ?? null; + $value = $payload['repository'] ?? null; if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; + $missingFields[] = 'repository'; + goto after_repository; } - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['receivedEventsUrl'] = $value; + $properties['repository'] = $value; - after_receivedEventsUrl: + after_repository: - $value = $payload['repos_url'] ?? null; + $value = $payload['sender'] ?? null; if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; + $missingFields[] = 'sender'; + goto after_sender; } - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_url'] ?? null; + $properties['sender'] = $value; - if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; - } + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestConvertedToDraft', $exception, stack: $this->hydrationStack); + } - $properties['starredUrl'] = $value; + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookPullRequestConvertedToDraft::class, $missingFields, stack: $this->hydrationStack); + } - after_starredUrl: + try { + return new WebhookPullRequestConvertedToDraft(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestConvertedToDraft', $exception, stack: $this->hydrationStack); + } + } - $value = $payload['subscriptions_url'] ?? null; + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestDemilestoned(array $payload): WebhookPullRequestDemilestoned + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; + $missingFields[] = 'action'; + goto after_action; } - $properties['subscriptionsUrl'] = $value; + $properties['action'] = $value; - after_subscriptionsUrl: + after_action: - $value = $payload['type'] ?? null; + $value = $payload['enterprise'] ?? null; if ($value === null) { - $missingFields[] = 'type'; - goto after_type; + $properties['enterprise'] = null; + goto after_enterprise; } - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enterprise'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['url'] = $value; + $properties['enterprise'] = $value; - after_url: + after_enterprise: - $value = $payload['user_view_type'] ?? null; + $value = $payload['milestone'] ?? null; if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; + $properties['milestone'] = null; + goto after_milestone; } - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\User', $exception, stack: $this->hydrationStack); - } + if (is_array($value)) { + try { + $this->hydrationStack[] = 'milestone'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($value); + } finally { + array_pop($this->hydrationStack); + } + } - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Head\User::class, $missingFields, stack: $this->hydrationStack); - } + $properties['milestone'] = $value; - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Head\User(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Head\User', $exception, stack: $this->hydrationStack); - } - } + after_milestone: - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base - { - $properties = []; - $missingFields = []; - try { - $value = $payload['label'] ?? null; + $value = $payload['number'] ?? null; if ($value === null) { - $missingFields[] = 'label'; - goto after_label; + $missingFields[] = 'number'; + goto after_number; } - $properties['label'] = $value; + $properties['number'] = $value; - after_label: + after_number: - $value = $payload['ref'] ?? null; + $value = $payload['organization'] ?? null; if ($value === null) { - $missingFields[] = 'ref'; - goto after_ref; + $properties['organization'] = null; + goto after_organization; } - $properties['ref'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_ref: + $properties['organization'] = $value; - $value = $payload['repo'] ?? null; + after_organization: + + $value = $payload['pull_request'] ?? null; if ($value === null) { - $missingFields[] = 'repo'; - goto after_repo; + $missingFields[] = 'pull_request'; + goto after_pullRequest; } if (is_array($value)) { try { - $this->hydrationStack[] = 'repo'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($value); + $this->hydrationStack[] = 'pullRequest'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5($value); } finally { array_pop($this->hydrationStack); } } - $properties['repo'] = $value; + $properties['pullRequest'] = $value; - after_repo: + after_pullRequest: - $value = $payload['sha'] ?? null; + $value = $payload['repository'] ?? null; if ($value === null) { - $missingFields[] = 'sha'; - goto after_sha; + $missingFields[] = 'repository'; + goto after_repository; } - $properties['sha'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_sha: + $properties['repository'] = $value; - $value = $payload['user'] ?? null; + after_repository: + + $value = $payload['sender'] ?? null; if ($value === null) { - $missingFields[] = 'user'; - goto after_user; + $properties['sender'] = null; + goto after_sender; } if (is_array($value)) { try { - $this->hydrationStack[] = 'user'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($value); + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); } finally { array_pop($this->hydrationStack); } } - $properties['user'] = $value; + $properties['sender'] = $value; - after_user: + after_sender: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestDemilestoned', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(WebhookPullRequestDemilestoned::class, $missingFields, stack: $this->hydrationStack); } try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base(...$properties); + return new WebhookPullRequestDemilestoned(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestDemilestoned', $exception, stack: $this->hydrationStack); } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5(array $payload): WebhooksPullRequest5 { $properties = []; $missingFields = []; try { - $value = $payload['archive_url'] ?? null; + $value = $payload['_links'] ?? null; if ($value === null) { - $missingFields[] = 'archive_url'; - goto after_archiveUrl; + $missingFields[] = '_links'; + goto after_links; } - $properties['archiveUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'links'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Links($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_archiveUrl: + $properties['links'] = $value; - $value = $payload['assignees_url'] ?? null; + after_links: + + $value = $payload['active_lock_reason'] ?? null; if ($value === null) { - $missingFields[] = 'assignees_url'; - goto after_assigneesUrl; + $properties['activeLockReason'] = null; + goto after_activeLockReason; } - $properties['assigneesUrl'] = $value; + $properties['activeLockReason'] = $value; - after_assigneesUrl: + after_activeLockReason: - $value = $payload['blobs_url'] ?? null; + $value = $payload['additions'] ?? null; if ($value === null) { - $missingFields[] = 'blobs_url'; - goto after_blobsUrl; + $properties['additions'] = null; + goto after_additions; } - $properties['blobsUrl'] = $value; + $properties['additions'] = $value; - after_blobsUrl: + after_additions: - $value = $payload['branches_url'] ?? null; + $value = $payload['assignee'] ?? null; if ($value === null) { - $missingFields[] = 'branches_url'; - goto after_branchesUrl; + $properties['assignee'] = null; + goto after_assignee; } - $properties['branchesUrl'] = $value; - - after_branchesUrl: - - $value = $payload['collaborators_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'collaborators_url'; - goto after_collaboratorsUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'assignee'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Assignee($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['collaboratorsUrl'] = $value; + $properties['assignee'] = $value; - after_collaboratorsUrl: + after_assignee: - $value = $payload['comments_url'] ?? null; + $value = $payload['assignees'] ?? null; if ($value === null) { - $missingFields[] = 'comments_url'; - goto after_commentsUrl; + $missingFields[] = 'assignees'; + goto after_assignees; } - $properties['commentsUrl'] = $value; + $properties['assignees'] = $value; - after_commentsUrl: + after_assignees: - $value = $payload['commits_url'] ?? null; + $value = $payload['author_association'] ?? null; if ($value === null) { - $missingFields[] = 'commits_url'; - goto after_commitsUrl; + $missingFields[] = 'author_association'; + goto after_authorAssociation; } - $properties['commitsUrl'] = $value; + $properties['authorAssociation'] = $value; - after_commitsUrl: + after_authorAssociation: - $value = $payload['compare_url'] ?? null; + $value = $payload['auto_merge'] ?? null; if ($value === null) { - $missingFields[] = 'compare_url'; - goto after_compareUrl; + $properties['autoMerge'] = null; + goto after_autoMerge; } - $properties['compareUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'autoMerge'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️AutoMerge($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_compareUrl: + $properties['autoMerge'] = $value; - $value = $payload['contents_url'] ?? null; + after_autoMerge: + + $value = $payload['base'] ?? null; if ($value === null) { - $missingFields[] = 'contents_url'; - goto after_contentsUrl; + $missingFields[] = 'base'; + goto after_base; } - $properties['contentsUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'base'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Base($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_contentsUrl: + $properties['base'] = $value; - $value = $payload['contributors_url'] ?? null; + after_base: + + $value = $payload['body'] ?? null; if ($value === null) { - $missingFields[] = 'contributors_url'; - goto after_contributorsUrl; + $properties['body'] = null; + goto after_body; } - $properties['contributorsUrl'] = $value; + $properties['body'] = $value; - after_contributorsUrl: + after_body: - $value = $payload['deployments_url'] ?? null; + $value = $payload['changed_files'] ?? null; if ($value === null) { - $missingFields[] = 'deployments_url'; - goto after_deploymentsUrl; + $properties['changedFiles'] = null; + goto after_changedFiles; } - $properties['deploymentsUrl'] = $value; + $properties['changedFiles'] = $value; - after_deploymentsUrl: + after_changedFiles: - $value = $payload['description'] ?? null; + $value = $payload['closed_at'] ?? null; if ($value === null) { - $properties['description'] = null; - goto after_description; + $properties['closedAt'] = null; + goto after_closedAt; } - $properties['description'] = $value; + $properties['closedAt'] = $value; - after_description: + after_closedAt: - $value = $payload['downloads_url'] ?? null; + $value = $payload['comments'] ?? null; if ($value === null) { - $missingFields[] = 'downloads_url'; - goto after_downloadsUrl; + $properties['comments'] = null; + goto after_comments; } - $properties['downloadsUrl'] = $value; + $properties['comments'] = $value; - after_downloadsUrl: + after_comments: - $value = $payload['events_url'] ?? null; + $value = $payload['comments_url'] ?? null; if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; + $missingFields[] = 'comments_url'; + goto after_commentsUrl; } - $properties['eventsUrl'] = $value; + $properties['commentsUrl'] = $value; - after_eventsUrl: + after_commentsUrl: - $value = $payload['fork'] ?? null; + $value = $payload['commits'] ?? null; if ($value === null) { - $missingFields[] = 'fork'; - goto after_fork; + $properties['commits'] = null; + goto after_commits; } - $properties['fork'] = $value; + $properties['commits'] = $value; - after_fork: + after_commits: - $value = $payload['forks_url'] ?? null; + $value = $payload['commits_url'] ?? null; if ($value === null) { - $missingFields[] = 'forks_url'; - goto after_forksUrl; + $missingFields[] = 'commits_url'; + goto after_commitsUrl; } - $properties['forksUrl'] = $value; + $properties['commitsUrl'] = $value; - after_forksUrl: + after_commitsUrl: - $value = $payload['full_name'] ?? null; + $value = $payload['created_at'] ?? null; if ($value === null) { - $missingFields[] = 'full_name'; - goto after_fullName; + $missingFields[] = 'created_at'; + goto after_createdAt; } - $properties['fullName'] = $value; + $properties['createdAt'] = $value; - after_fullName: + after_createdAt: - $value = $payload['git_commits_url'] ?? null; + $value = $payload['deletions'] ?? null; if ($value === null) { - $missingFields[] = 'git_commits_url'; - goto after_gitCommitsUrl; + $properties['deletions'] = null; + goto after_deletions; } - $properties['gitCommitsUrl'] = $value; + $properties['deletions'] = $value; - after_gitCommitsUrl: + after_deletions: - $value = $payload['git_refs_url'] ?? null; + $value = $payload['diff_url'] ?? null; if ($value === null) { - $missingFields[] = 'git_refs_url'; - goto after_gitRefsUrl; + $missingFields[] = 'diff_url'; + goto after_diffUrl; } - $properties['gitRefsUrl'] = $value; + $properties['diffUrl'] = $value; - after_gitRefsUrl: + after_diffUrl: - $value = $payload['git_tags_url'] ?? null; + $value = $payload['draft'] ?? null; if ($value === null) { - $missingFields[] = 'git_tags_url'; - goto after_gitTagsUrl; + $missingFields[] = 'draft'; + goto after_draft; } - $properties['gitTagsUrl'] = $value; + $properties['draft'] = $value; - after_gitTagsUrl: + after_draft: - $value = $payload['hooks_url'] ?? null; + $value = $payload['head'] ?? null; if ($value === null) { - $missingFields[] = 'hooks_url'; - goto after_hooksUrl; + $missingFields[] = 'head'; + goto after_head; } - $properties['hooksUrl'] = $value; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'head'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Head($value); + } finally { + array_pop($this->hydrationStack); + } + } - after_hooksUrl: + $properties['head'] = $value; + + after_head: $value = $payload['html_url'] ?? null; @@ -26547,2464 +26758,316 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Pull after_id: - $value = $payload['is_template'] ?? null; - - if ($value === null) { - $properties['isTemplate'] = null; - goto after_isTemplate; - } - - $properties['isTemplate'] = $value; - - after_isTemplate: - - $value = $payload['node_id'] ?? null; + $value = $payload['issue_url'] ?? null; if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; + $missingFields[] = 'issue_url'; + goto after_issueUrl; } - $properties['nodeId'] = $value; + $properties['issueUrl'] = $value; - after_nodeId: + after_issueUrl: - $value = $payload['issue_comment_url'] ?? null; + $value = $payload['labels'] ?? null; if ($value === null) { - $missingFields[] = 'issue_comment_url'; - goto after_issueCommentUrl; + $missingFields[] = 'labels'; + goto after_labels; } - $properties['issueCommentUrl'] = $value; + $properties['labels'] = $value; - after_issueCommentUrl: + after_labels: - $value = $payload['issue_events_url'] ?? null; + $value = $payload['locked'] ?? null; if ($value === null) { - $missingFields[] = 'issue_events_url'; - goto after_issueEventsUrl; + $missingFields[] = 'locked'; + goto after_locked; } - $properties['issueEventsUrl'] = $value; + $properties['locked'] = $value; - after_issueEventsUrl: + after_locked: - $value = $payload['issues_url'] ?? null; + $value = $payload['maintainer_can_modify'] ?? null; if ($value === null) { - $missingFields[] = 'issues_url'; - goto after_issuesUrl; + $properties['maintainerCanModify'] = null; + goto after_maintainerCanModify; } - $properties['issuesUrl'] = $value; + $properties['maintainerCanModify'] = $value; - after_issuesUrl: + after_maintainerCanModify: - $value = $payload['keys_url'] ?? null; + $value = $payload['merge_commit_sha'] ?? null; if ($value === null) { - $missingFields[] = 'keys_url'; - goto after_keysUrl; + $properties['mergeCommitSha'] = null; + goto after_mergeCommitSha; } - $properties['keysUrl'] = $value; + $properties['mergeCommitSha'] = $value; - after_keysUrl: + after_mergeCommitSha: - $value = $payload['labels_url'] ?? null; + $value = $payload['mergeable'] ?? null; if ($value === null) { - $missingFields[] = 'labels_url'; - goto after_labelsUrl; + $properties['mergeable'] = null; + goto after_mergeable; } - $properties['labelsUrl'] = $value; + $properties['mergeable'] = $value; - after_labelsUrl: + after_mergeable: - $value = $payload['languages_url'] ?? null; + $value = $payload['mergeable_state'] ?? null; if ($value === null) { - $missingFields[] = 'languages_url'; - goto after_languagesUrl; + $properties['mergeableState'] = null; + goto after_mergeableState; } - $properties['languagesUrl'] = $value; + $properties['mergeableState'] = $value; - after_languagesUrl: + after_mergeableState: - $value = $payload['merges_url'] ?? null; + $value = $payload['merged'] ?? null; if ($value === null) { - $missingFields[] = 'merges_url'; - goto after_mergesUrl; + $properties['merged'] = null; + goto after_merged; } - $properties['mergesUrl'] = $value; + $properties['merged'] = $value; - after_mergesUrl: + after_merged: - $value = $payload['milestones_url'] ?? null; + $value = $payload['merged_at'] ?? null; if ($value === null) { - $missingFields[] = 'milestones_url'; - goto after_milestonesUrl; + $properties['mergedAt'] = null; + goto after_mergedAt; } - $properties['milestonesUrl'] = $value; + $properties['mergedAt'] = $value; - after_milestonesUrl: + after_mergedAt: - $value = $payload['name'] ?? null; + $value = $payload['merged_by'] ?? null; if ($value === null) { - $missingFields[] = 'name'; - goto after_name; + $properties['mergedBy'] = null; + goto after_mergedBy; } - $properties['name'] = $value; - - after_name: - - $value = $payload['notifications_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'notifications_url'; - goto after_notificationsUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'mergedBy'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️MergedBy($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['notificationsUrl'] = $value; + $properties['mergedBy'] = $value; - after_notificationsUrl: + after_mergedBy: - $value = $payload['owner'] ?? null; + $value = $payload['milestone'] ?? null; if ($value === null) { - $missingFields[] = 'owner'; - goto after_owner; + $properties['milestone'] = null; + goto after_milestone; } if (is_array($value)) { try { - $this->hydrationStack[] = 'owner'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($value); + $this->hydrationStack[] = 'milestone'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Milestone($value); } finally { array_pop($this->hydrationStack); } } - $properties['owner'] = $value; + $properties['milestone'] = $value; - after_owner: + after_milestone: - $value = $payload['private'] ?? null; + $value = $payload['node_id'] ?? null; if ($value === null) { - $missingFields[] = 'private'; - goto after_private; + $missingFields[] = 'node_id'; + goto after_nodeId; } - $properties['private'] = $value; + $properties['nodeId'] = $value; - after_private: + after_nodeId: - $value = $payload['pulls_url'] ?? null; + $value = $payload['number'] ?? null; if ($value === null) { - $missingFields[] = 'pulls_url'; - goto after_pullsUrl; + $missingFields[] = 'number'; + goto after_number; } - $properties['pullsUrl'] = $value; + $properties['number'] = $value; - after_pullsUrl: + after_number: - $value = $payload['releases_url'] ?? null; + $value = $payload['patch_url'] ?? null; if ($value === null) { - $missingFields[] = 'releases_url'; - goto after_releasesUrl; + $missingFields[] = 'patch_url'; + goto after_patchUrl; } - $properties['releasesUrl'] = $value; + $properties['patchUrl'] = $value; - after_releasesUrl: + after_patchUrl: - $value = $payload['stargazers_url'] ?? null; + $value = $payload['rebaseable'] ?? null; if ($value === null) { - $missingFields[] = 'stargazers_url'; - goto after_stargazersUrl; + $properties['rebaseable'] = null; + goto after_rebaseable; } - $properties['stargazersUrl'] = $value; + $properties['rebaseable'] = $value; - after_stargazersUrl: + after_rebaseable: - $value = $payload['statuses_url'] ?? null; + $value = $payload['requested_reviewers'] ?? null; if ($value === null) { - $missingFields[] = 'statuses_url'; - goto after_statusesUrl; + $missingFields[] = 'requested_reviewers'; + goto after_requestedReviewers; } - $properties['statusesUrl'] = $value; + $properties['requestedReviewers'] = $value; - after_statusesUrl: + after_requestedReviewers: - $value = $payload['subscribers_url'] ?? null; + $value = $payload['requested_teams'] ?? null; if ($value === null) { - $missingFields[] = 'subscribers_url'; - goto after_subscribersUrl; + $missingFields[] = 'requested_teams'; + goto after_requestedTeams; } - $properties['subscribersUrl'] = $value; + $properties['requestedTeams'] = $value; - after_subscribersUrl: + after_requestedTeams: - $value = $payload['subscription_url'] ?? null; + $value = $payload['review_comment_url'] ?? null; if ($value === null) { - $missingFields[] = 'subscription_url'; - goto after_subscriptionUrl; + $missingFields[] = 'review_comment_url'; + goto after_reviewCommentUrl; } - $properties['subscriptionUrl'] = $value; + $properties['reviewCommentUrl'] = $value; - after_subscriptionUrl: + after_reviewCommentUrl: - $value = $payload['tags_url'] ?? null; + $value = $payload['review_comments'] ?? null; if ($value === null) { - $missingFields[] = 'tags_url'; - goto after_tagsUrl; + $properties['reviewComments'] = null; + goto after_reviewComments; } - $properties['tagsUrl'] = $value; + $properties['reviewComments'] = $value; - after_tagsUrl: + after_reviewComments: - $value = $payload['teams_url'] ?? null; + $value = $payload['review_comments_url'] ?? null; if ($value === null) { - $missingFields[] = 'teams_url'; - goto after_teamsUrl; + $missingFields[] = 'review_comments_url'; + goto after_reviewCommentsUrl; } - $properties['teamsUrl'] = $value; + $properties['reviewCommentsUrl'] = $value; - after_teamsUrl: + after_reviewCommentsUrl: - $value = $payload['trees_url'] ?? null; + $value = $payload['state'] ?? null; if ($value === null) { - $missingFields[] = 'trees_url'; - goto after_treesUrl; + $missingFields[] = 'state'; + goto after_state; } - $properties['treesUrl'] = $value; + $properties['state'] = $value; - after_treesUrl: + after_state: - $value = $payload['url'] ?? null; + $value = $payload['statuses_url'] ?? null; if ($value === null) { - $missingFields[] = 'url'; - goto after_url; + $missingFields[] = 'statuses_url'; + goto after_statusesUrl; } - $properties['url'] = $value; + $properties['statusesUrl'] = $value; - after_url: + after_statusesUrl: - $value = $payload['clone_url'] ?? null; + $value = $payload['title'] ?? null; if ($value === null) { - $missingFields[] = 'clone_url'; - goto after_cloneUrl; + $missingFields[] = 'title'; + goto after_title; } - $properties['cloneUrl'] = $value; + $properties['title'] = $value; - after_cloneUrl: + after_title: - $value = $payload['default_branch'] ?? null; + $value = $payload['updated_at'] ?? null; if ($value === null) { - $missingFields[] = 'default_branch'; - goto after_defaultBranch; + $missingFields[] = 'updated_at'; + goto after_updatedAt; } - $properties['defaultBranch'] = $value; + $properties['updatedAt'] = $value; - after_defaultBranch: + after_updatedAt: - $value = $payload['forks'] ?? null; + $value = $payload['url'] ?? null; if ($value === null) { - $missingFields[] = 'forks'; - goto after_forks; + $missingFields[] = 'url'; + goto after_url; } - $properties['forks'] = $value; + $properties['url'] = $value; - after_forks: + after_url: - $value = $payload['forks_count'] ?? null; + $value = $payload['user'] ?? null; if ($value === null) { - $missingFields[] = 'forks_count'; - goto after_forksCount; + $properties['user'] = null; + goto after_user; } - $properties['forksCount'] = $value; - - after_forksCount: - - $value = $payload['git_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'git_url'; - goto after_gitUrl; + if (is_array($value)) { + try { + $this->hydrationStack[] = 'user'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️User($value); + } finally { + array_pop($this->hydrationStack); + } } - $properties['gitUrl'] = $value; - - after_gitUrl: - - $value = $payload['has_downloads'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_downloads'; - goto after_hasDownloads; - } - - $properties['hasDownloads'] = $value; - - after_hasDownloads: - - $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_discussions'] ?? null; - - if ($value === null) { - $missingFields[] = 'has_discussions'; - goto after_hasDiscussions; - } - - $properties['hasDiscussions'] = $value; - - after_hasDiscussions: - - $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['master_branch'] ?? null; - - if ($value === null) { - $properties['masterBranch'] = null; - goto after_masterBranch; - } - - $properties['masterBranch'] = $value; - - after_masterBranch: - - $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['mirror_url'] ?? null; - - if ($value === null) { - $properties['mirrorUrl'] = null; - goto after_mirrorUrl; - } - - $properties['mirrorUrl'] = $value; - - after_mirrorUrl: - - $value = $payload['open_issues'] ?? null; - - if ($value === null) { - $missingFields[] = 'open_issues'; - goto after_openIssues; - } - - $properties['openIssues'] = $value; - - after_openIssues: - - $value = $payload['open_issues_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'open_issues_count'; - goto after_openIssuesCount; - } - - $properties['openIssuesCount'] = $value; - - after_openIssuesCount: - - $value = $payload['permissions'] ?? null; - - if ($value === null) { - $properties['permissions'] = null; - goto after_permissions; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'permissions'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['permissions'] = $value; - - after_permissions: - - $value = $payload['temp_clone_token'] ?? null; - - if ($value === null) { - $properties['tempCloneToken'] = null; - goto after_tempCloneToken; - } - - $properties['tempCloneToken'] = $value; - - after_tempCloneToken: - - $value = $payload['allow_merge_commit'] ?? null; - - if ($value === null) { - $properties['allowMergeCommit'] = null; - goto after_allowMergeCommit; - } - - $properties['allowMergeCommit'] = $value; - - after_allowMergeCommit: - - $value = $payload['allow_squash_merge'] ?? null; - - if ($value === null) { - $properties['allowSquashMerge'] = null; - goto after_allowSquashMerge; - } - - $properties['allowSquashMerge'] = $value; - - after_allowSquashMerge: - - $value = $payload['allow_rebase_merge'] ?? null; - - if ($value === null) { - $properties['allowRebaseMerge'] = null; - goto after_allowRebaseMerge; - } - - $properties['allowRebaseMerge'] = $value; - - after_allowRebaseMerge: - - $value = $payload['license'] ?? null; - - if ($value === null) { - $properties['license'] = null; - goto after_license; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'license'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['license'] = $value; - - after_license: - - $value = $payload['pushed_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'pushed_at'; - goto after_pushedAt; - } - - $properties['pushedAt'] = $value; - - after_pushedAt: - - $value = $payload['size'] ?? null; - - if ($value === null) { - $missingFields[] = 'size'; - goto after_size; - } - - $properties['size'] = $value; - - after_size: - - $value = $payload['ssh_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'ssh_url'; - goto after_sshUrl; - } - - $properties['sshUrl'] = $value; - - after_sshUrl: - - $value = $payload['stargazers_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'stargazers_count'; - goto after_stargazersCount; - } - - $properties['stargazersCount'] = $value; - - after_stargazersCount: - - $value = $payload['svn_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'svn_url'; - goto after_svnUrl; - } - - $properties['svnUrl'] = $value; - - after_svnUrl: - - $value = $payload['topics'] ?? null; - - if ($value === null) { - $properties['topics'] = null; - goto after_topics; - } - - $properties['topics'] = $value; - - after_topics: - - $value = $payload['watchers'] ?? null; - - if ($value === null) { - $missingFields[] = 'watchers'; - goto after_watchers; - } - - $properties['watchers'] = $value; - - after_watchers: - - $value = $payload['watchers_count'] ?? null; - - if ($value === null) { - $missingFields[] = 'watchers_count'; - goto after_watchersCount; - } - - $properties['watchersCount'] = $value; - - after_watchersCount: - - $value = $payload['created_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; - } - - $properties['createdAt'] = $value; - - after_createdAt: - - $value = $payload['updated_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'updated_at'; - goto after_updatedAt; - } - - $properties['updatedAt'] = $value; - - after_updatedAt: - - $value = $payload['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: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner - { - $properties = []; - $missingFields = []; - try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $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['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions - { - $properties = []; - $missingFields = []; - try { - $value = $payload['admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'admin'; - 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) { - $missingFields[] = 'push'; - 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) { - $missingFields[] = 'pull'; - goto after_pull; - } - - $properties['pull'] = $value; - - after_pull: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Base\User - { - $properties = []; - $missingFields = []; - try { - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $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['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $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['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user_view_type'] ?? null; - - if ($value === null) { - $properties['userViewType'] = null; - goto after_userViewType; - } - - $properties['userViewType'] = $value; - - after_userViewType: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\User', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Base\User::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Base\User(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Base\User', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links(array $payload): \ApiClients\Client\GitHub\Schema\PullRequest\Links - { - $properties = []; - $missingFields = []; - try { - $value = $payload['comments'] ?? null; - - if ($value === null) { - $missingFields[] = 'comments'; - goto after_comments; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'comments'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['comments'] = $value; - - after_comments: - - $value = $payload['commits'] ?? null; - - if ($value === null) { - $missingFields[] = 'commits'; - goto after_commits; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'commits'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['commits'] = $value; - - after_commits: - - $value = $payload['statuses'] ?? null; - - if ($value === null) { - $missingFields[] = 'statuses'; - goto after_statuses; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'statuses'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['statuses'] = $value; - - after_statuses: - - $value = $payload['html'] ?? null; - - if ($value === null) { - $missingFields[] = 'html'; - goto after_html; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'html'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['html'] = $value; - - after_html: - - $value = $payload['issue'] ?? null; - - if ($value === null) { - $missingFields[] = 'issue'; - goto after_issue; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'issue'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['issue'] = $value; - - after_issue: - - $value = $payload['review_comments'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comments'; - goto after_reviewComments; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'reviewComments'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['reviewComments'] = $value; - - after_reviewComments: - - $value = $payload['review_comment'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comment'; - goto after_reviewComment; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'reviewComment'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['reviewComment'] = $value; - - after_reviewComment: - - $value = $payload['self'] ?? null; - - if ($value === null) { - $missingFields[] = 'self'; - goto after_self; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'self'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['self'] = $value; - - after_self: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\PullRequest\Links::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\PullRequest\Links(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\PullRequest\Links', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link(array $payload): Link - { - $properties = []; - $missingFields = []; - try { - $value = $payload['href'] ?? null; - - if ($value === null) { - $missingFields[] = 'href'; - goto after_href; - } - - $properties['href'] = $value; - - after_href: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Link::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new Link(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Link', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge(array $payload): \ApiClients\Client\GitHub\Schema\AutoMerge - { - $properties = []; - $missingFields = []; - try { - $value = $payload['enabled_by'] ?? null; - - if ($value === null) { - $missingFields[] = 'enabled_by'; - goto after_enabledBy; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'enabledBy'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['enabledBy'] = $value; - - after_enabledBy: - - $value = $payload['merge_method'] ?? null; - - if ($value === null) { - $missingFields[] = 'merge_method'; - goto after_mergeMethod; - } - - $properties['mergeMethod'] = $value; - - after_mergeMethod: - - $value = $payload['commit_title'] ?? null; - - if ($value === null) { - $missingFields[] = 'commit_title'; - goto after_commitTitle; - } - - $properties['commitTitle'] = $value; - - after_commitTitle: - - $value = $payload['commit_message'] ?? null; - - if ($value === null) { - $missingFields[] = 'commit_message'; - goto after_commitMessage; - } - - $properties['commitMessage'] = $value; - - after_commitMessage: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\AutoMerge::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new \ApiClients\Client\GitHub\Schema\AutoMerge(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\AutoMerge', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestConvertedToDraft(array $payload): WebhookPullRequestConvertedToDraft - { - $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⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['enterprise'] = $value; - - after_enterprise: - - $value = $payload['installation'] ?? null; - - if ($value === null) { - $properties['installation'] = null; - goto after_installation; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'installation'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['installation'] = $value; - - after_installation: - - $value = $payload['number'] ?? null; - - if ($value === null) { - $missingFields[] = 'number'; - goto after_number; - } - - $properties['number'] = $value; - - after_number: - - $value = $payload['organization'] ?? null; - - if ($value === null) { - $properties['organization'] = null; - goto after_organization; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'organization'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['organization'] = $value; - - after_organization: - - $value = $payload['pull_request'] ?? null; - - if ($value === null) { - $missingFields[] = 'pull_request'; - goto after_pullRequest; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'pullRequest'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['pullRequest'] = $value; - - after_pullRequest: - - $value = $payload['repository'] ?? null; - - if ($value === null) { - $missingFields[] = 'repository'; - goto after_repository; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'repository'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['repository'] = $value; - - after_repository: - - $value = $payload['sender'] ?? null; - - if ($value === null) { - $missingFields[] = 'sender'; - goto after_sender; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'sender'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['sender'] = $value; - - after_sender: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestConvertedToDraft', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(WebhookPullRequestConvertedToDraft::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new WebhookPullRequestConvertedToDraft(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestConvertedToDraft', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestDemilestoned(array $payload): WebhookPullRequestDemilestoned - { - $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⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['enterprise'] = $value; - - after_enterprise: - - $value = $payload['milestone'] ?? null; - - if ($value === null) { - $properties['milestone'] = null; - goto after_milestone; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'milestone'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['milestone'] = $value; - - after_milestone: - - $value = $payload['number'] ?? null; - - if ($value === null) { - $missingFields[] = 'number'; - goto after_number; - } - - $properties['number'] = $value; - - after_number: - - $value = $payload['organization'] ?? null; - - if ($value === null) { - $properties['organization'] = null; - goto after_organization; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'organization'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['organization'] = $value; - - after_organization: - - $value = $payload['pull_request'] ?? null; - - if ($value === null) { - $missingFields[] = 'pull_request'; - goto after_pullRequest; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'pullRequest'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['pullRequest'] = $value; - - after_pullRequest: - - $value = $payload['repository'] ?? null; - - if ($value === null) { - $missingFields[] = 'repository'; - goto after_repository; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'repository'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['repository'] = $value; - - after_repository: - - $value = $payload['sender'] ?? null; - - if ($value === null) { - $properties['sender'] = null; - goto after_sender; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'sender'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['sender'] = $value; - - after_sender: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestDemilestoned', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(WebhookPullRequestDemilestoned::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new WebhookPullRequestDemilestoned(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookPullRequestDemilestoned', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5(array $payload): WebhooksPullRequest5 - { - $properties = []; - $missingFields = []; - try { - $value = $payload['_links'] ?? null; - - if ($value === null) { - $missingFields[] = '_links'; - goto after_links; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'links'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Links($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['links'] = $value; - - after_links: - - $value = $payload['active_lock_reason'] ?? null; - - if ($value === null) { - $properties['activeLockReason'] = null; - goto after_activeLockReason; - } - - $properties['activeLockReason'] = $value; - - after_activeLockReason: - - $value = $payload['additions'] ?? null; - - if ($value === null) { - $properties['additions'] = null; - goto after_additions; - } - - $properties['additions'] = $value; - - after_additions: - - $value = $payload['assignee'] ?? null; - - if ($value === null) { - $properties['assignee'] = null; - goto after_assignee; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'assignee'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Assignee($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['assignee'] = $value; - - after_assignee: - - $value = $payload['assignees'] ?? null; - - if ($value === null) { - $missingFields[] = 'assignees'; - goto after_assignees; - } - - $properties['assignees'] = $value; - - after_assignees: - - $value = $payload['author_association'] ?? null; - - if ($value === null) { - $missingFields[] = 'author_association'; - goto after_authorAssociation; - } - - $properties['authorAssociation'] = $value; - - after_authorAssociation: - - $value = $payload['auto_merge'] ?? null; - - if ($value === null) { - $properties['autoMerge'] = null; - goto after_autoMerge; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'autoMerge'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️AutoMerge($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['autoMerge'] = $value; - - after_autoMerge: - - $value = $payload['base'] ?? null; - - if ($value === null) { - $missingFields[] = 'base'; - goto after_base; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'base'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Base($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['base'] = $value; - - after_base: - - $value = $payload['body'] ?? null; - - if ($value === null) { - $properties['body'] = null; - goto after_body; - } - - $properties['body'] = $value; - - after_body: - - $value = $payload['changed_files'] ?? null; - - if ($value === null) { - $properties['changedFiles'] = null; - goto after_changedFiles; - } - - $properties['changedFiles'] = $value; - - after_changedFiles: - - $value = $payload['closed_at'] ?? null; - - if ($value === null) { - $properties['closedAt'] = null; - goto after_closedAt; - } - - $properties['closedAt'] = $value; - - after_closedAt: - - $value = $payload['comments'] ?? null; - - if ($value === null) { - $properties['comments'] = null; - goto after_comments; - } - - $properties['comments'] = $value; - - after_comments: - - $value = $payload['comments_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'comments_url'; - goto after_commentsUrl; - } - - $properties['commentsUrl'] = $value; - - after_commentsUrl: - - $value = $payload['commits'] ?? null; - - if ($value === null) { - $properties['commits'] = null; - goto after_commits; - } - - $properties['commits'] = $value; - - after_commits: - - $value = $payload['commits_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'commits_url'; - goto after_commitsUrl; - } - - $properties['commitsUrl'] = $value; - - after_commitsUrl: - - $value = $payload['created_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; - } - - $properties['createdAt'] = $value; - - after_createdAt: - - $value = $payload['deletions'] ?? null; - - if ($value === null) { - $properties['deletions'] = null; - goto after_deletions; - } - - $properties['deletions'] = $value; - - after_deletions: - - $value = $payload['diff_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'diff_url'; - goto after_diffUrl; - } - - $properties['diffUrl'] = $value; - - after_diffUrl: - - $value = $payload['draft'] ?? null; - - if ($value === null) { - $missingFields[] = 'draft'; - goto after_draft; - } - - $properties['draft'] = $value; - - after_draft: - - $value = $payload['head'] ?? null; - - if ($value === null) { - $missingFields[] = 'head'; - goto after_head; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'head'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Head($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['head'] = $value; - - after_head: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['issue_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'issue_url'; - goto after_issueUrl; - } - - $properties['issueUrl'] = $value; - - after_issueUrl: - - $value = $payload['labels'] ?? null; - - if ($value === null) { - $missingFields[] = 'labels'; - goto after_labels; - } - - $properties['labels'] = $value; - - after_labels: - - $value = $payload['locked'] ?? null; - - if ($value === null) { - $missingFields[] = 'locked'; - goto after_locked; - } - - $properties['locked'] = $value; - - after_locked: - - $value = $payload['maintainer_can_modify'] ?? null; - - if ($value === null) { - $properties['maintainerCanModify'] = null; - goto after_maintainerCanModify; - } - - $properties['maintainerCanModify'] = $value; - - after_maintainerCanModify: - - $value = $payload['merge_commit_sha'] ?? null; - - if ($value === null) { - $properties['mergeCommitSha'] = null; - goto after_mergeCommitSha; - } - - $properties['mergeCommitSha'] = $value; - - after_mergeCommitSha: - - $value = $payload['mergeable'] ?? null; - - if ($value === null) { - $properties['mergeable'] = null; - goto after_mergeable; - } - - $properties['mergeable'] = $value; - - after_mergeable: - - $value = $payload['mergeable_state'] ?? null; - - if ($value === null) { - $properties['mergeableState'] = null; - goto after_mergeableState; - } - - $properties['mergeableState'] = $value; - - after_mergeableState: - - $value = $payload['merged'] ?? null; - - if ($value === null) { - $properties['merged'] = null; - goto after_merged; - } - - $properties['merged'] = $value; - - after_merged: - - $value = $payload['merged_at'] ?? null; - - if ($value === null) { - $properties['mergedAt'] = null; - goto after_mergedAt; - } - - $properties['mergedAt'] = $value; - - after_mergedAt: - - $value = $payload['merged_by'] ?? null; - - if ($value === null) { - $properties['mergedBy'] = null; - goto after_mergedBy; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'mergedBy'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️MergedBy($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['mergedBy'] = $value; - - after_mergedBy: - - $value = $payload['milestone'] ?? null; - - if ($value === null) { - $properties['milestone'] = null; - goto after_milestone; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'milestone'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️Milestone($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['milestone'] = $value; - - after_milestone: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['number'] ?? null; - - if ($value === null) { - $missingFields[] = 'number'; - goto after_number; - } - - $properties['number'] = $value; - - after_number: - - $value = $payload['patch_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'patch_url'; - goto after_patchUrl; - } - - $properties['patchUrl'] = $value; - - after_patchUrl: - - $value = $payload['rebaseable'] ?? null; - - if ($value === null) { - $properties['rebaseable'] = null; - goto after_rebaseable; - } - - $properties['rebaseable'] = $value; - - after_rebaseable: - - $value = $payload['requested_reviewers'] ?? null; - - if ($value === null) { - $missingFields[] = 'requested_reviewers'; - goto after_requestedReviewers; - } - - $properties['requestedReviewers'] = $value; - - after_requestedReviewers: - - $value = $payload['requested_teams'] ?? null; - - if ($value === null) { - $missingFields[] = 'requested_teams'; - goto after_requestedTeams; - } - - $properties['requestedTeams'] = $value; - - after_requestedTeams: - - $value = $payload['review_comment_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comment_url'; - goto after_reviewCommentUrl; - } - - $properties['reviewCommentUrl'] = $value; - - after_reviewCommentUrl: - - $value = $payload['review_comments'] ?? null; - - if ($value === null) { - $properties['reviewComments'] = null; - goto after_reviewComments; - } - - $properties['reviewComments'] = $value; - - after_reviewComments: - - $value = $payload['review_comments_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'review_comments_url'; - goto after_reviewCommentsUrl; - } - - $properties['reviewCommentsUrl'] = $value; - - after_reviewCommentsUrl: - - $value = $payload['state'] ?? null; - - if ($value === null) { - $missingFields[] = 'state'; - goto after_state; - } - - $properties['state'] = $value; - - after_state: - - $value = $payload['statuses_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'statuses_url'; - goto after_statusesUrl; - } - - $properties['statusesUrl'] = $value; - - after_statusesUrl: - - $value = $payload['title'] ?? null; - - if ($value === null) { - $missingFields[] = 'title'; - goto after_title; - } - - $properties['title'] = $value; - - after_title: - - $value = $payload['updated_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'updated_at'; - goto after_updatedAt; - } - - $properties['updatedAt'] = $value; - - after_updatedAt: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['user'] ?? null; - - if ($value === null) { - $properties['user'] = null; - goto after_user; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'user'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksPullRequest5⚡️User($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['user'] = $value; + $properties['user'] = $value; after_user: } catch (Throwable $exception) { @@ -90649,16 +88712,9 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($object), 'ApiClients\Client\GitHub\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($object), 'ApiClients\Client\GitHub\Schema\PullRequest\Head' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Head\User' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($object), + 'ApiClients\Client\GitHub\Schema\Repository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($object), + 'ApiClients\Client\GitHub\Schema\Repository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($object), 'ApiClients\Client\GitHub\Schema\PullRequest\Base' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($object), - 'ApiClients\Client\GitHub\Schema\PullRequest\Base\User' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($object), 'ApiClients\Client\GitHub\Schema\PullRequest\Links' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($object), 'ApiClients\Client\GitHub\Schema\Link' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Link($object), 'ApiClients\Client\GitHub\Schema\AutoMerge' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($object), @@ -101343,610 +99399,237 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $license = $object->license; - if ($license === null) { - goto after_license; - } - - $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️License($license); - after_license: $result['license'] = $license; - - $masterBranch = $object->masterBranch; - - if ($masterBranch === null) { - goto after_masterBranch; - } - - after_masterBranch: $result['master_branch'] = $masterBranch; - - $mergeCommitMessage = $object->mergeCommitMessage; - - if ($mergeCommitMessage === null) { - goto after_mergeCommitMessage; - } - - after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; - - $mergeCommitTitle = $object->mergeCommitTitle; - - if ($mergeCommitTitle === null) { - goto after_mergeCommitTitle; - } - - after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; - - $mergesUrl = $object->mergesUrl; - after_mergesUrl: $result['merges_url'] = $mergesUrl; - - $milestonesUrl = $object->milestonesUrl; - after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; - - $mirrorUrl = $object->mirrorUrl; - - if ($mirrorUrl === null) { - goto after_mirrorUrl; - } - - after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; - - $name = $object->name; - after_name: $result['name'] = $name; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $notificationsUrl = $object->notificationsUrl; - after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; - - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; - - $openIssuesCount = $object->openIssuesCount; - after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; - - $organization = $object->organization; - - if ($organization === null) { - goto after_organization; - } - - after_organization: $result['organization'] = $organization; - - $owner = $object->owner; - - if ($owner === null) { - goto after_owner; - } - - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($owner); - after_owner: $result['owner'] = $owner; - - $permissions = $object->permissions; - - if ($permissions === null) { - goto after_permissions; - } - - $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($permissions); - after_permissions: $result['permissions'] = $permissions; - - $private = $object->private; - after_private: $result['private'] = $private; - - $public = $object->public; - - if ($public === null) { - goto after_public; - } - - after_public: $result['public'] = $public; - - $pullsUrl = $object->pullsUrl; - after_pullsUrl: $result['pulls_url'] = $pullsUrl; - - $pushedAt = $object->pushedAt; - after_pushedAt: $result['pushed_at'] = $pushedAt; - - $releasesUrl = $object->releasesUrl; - after_releasesUrl: $result['releases_url'] = $releasesUrl; - - $roleName = $object->roleName; - - if ($roleName === null) { - goto after_roleName; - } - - after_roleName: $result['role_name'] = $roleName; - - $size = $object->size; - after_size: $result['size'] = $size; - - $squashMergeCommitMessage = $object->squashMergeCommitMessage; - - if ($squashMergeCommitMessage === null) { - goto after_squashMergeCommitMessage; - } - - after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; - - $squashMergeCommitTitle = $object->squashMergeCommitTitle; - - if ($squashMergeCommitTitle === null) { - goto after_squashMergeCommitTitle; - } - - after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; - - $sshUrl = $object->sshUrl; - after_sshUrl: $result['ssh_url'] = $sshUrl; - - $stargazers = $object->stargazers; - - if ($stargazers === null) { - goto after_stargazers; - } - - after_stargazers: $result['stargazers'] = $stargazers; - - $stargazersCount = $object->stargazersCount; - after_stargazersCount: $result['stargazers_count'] = $stargazersCount; - - $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; - - $svnUrl = $object->svnUrl; - after_svnUrl: $result['svn_url'] = $svnUrl; - - $tagsUrl = $object->tagsUrl; - after_tagsUrl: $result['tags_url'] = $tagsUrl; - - $teamsUrl = $object->teamsUrl; - after_teamsUrl: $result['teams_url'] = $teamsUrl; - - $topics = $object->topics; - static $topicsSerializer0; - - if ($topicsSerializer0 === null) { - $topicsSerializer0 = new SerializeArrayItems(...[]); - } - - $topics = $topicsSerializer0->serialize($topics, $this); - after_topics: $result['topics'] = $topics; - - $treesUrl = $object->treesUrl; - after_treesUrl: $result['trees_url'] = $treesUrl; - - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; - - $url = $object->url; - after_url: $result['url'] = $url; - - $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; - - if ($useSquashPrTitleAsDefault === null) { - goto after_useSquashPrTitleAsDefault; - } - - after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; - - $visibility = $object->visibility; - after_visibility: $result['visibility'] = $visibility; - - $watchers = $object->watchers; - after_watchers: $result['watchers'] = $watchers; - - $watchersCount = $object->watchersCount; - after_watchersCount: $result['watchers_count'] = $watchersCount; - - $webCommitSignoffRequired = $object->webCommitSignoffRequired; - - if ($webCommitSignoffRequired === null) { - goto after_webCommitSignoffRequired; - } - - after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️License(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\Repo\License); - $result = []; - - $key = $object->key; - after_key: $result['key'] = $key; - - $name = $object->name; - after_name: $result['name'] = $name; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $spdxId = $object->spdxId; - after_spdxId: $result['spdx_id'] = $spdxId; - - $url = $object->url; - - if ($url === null) { - goto after_url; - } - - after_url: $result['url'] = $url; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\Repo\Owner); - $result = []; - - $avatarUrl = $object->avatarUrl; - - if ($avatarUrl === null) { - goto after_avatarUrl; - } - - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $deleted = $object->deleted; - - if ($deleted === null) { - goto after_deleted; - } - - after_deleted: $result['deleted'] = $deleted; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $eventsUrl = $object->eventsUrl; - - if ($eventsUrl === null) { - goto after_eventsUrl; - } - - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $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; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - - if ($htmlUrl === null) { - goto after_htmlUrl; - } - - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $login = $object->login; - after_login: $result['login'] = $login; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $nodeId = $object->nodeId; - - if ($nodeId === null) { - goto after_nodeId; - } - - after_nodeId: $result['node_id'] = $nodeId; - - $organizationsUrl = $object->organizationsUrl; - - if ($organizationsUrl === null) { - goto after_organizationsUrl; - } - - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - - if ($receivedEventsUrl === null) { - goto after_receivedEventsUrl; - } - - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $reposUrl = $object->reposUrl; - - if ($reposUrl === null) { - goto after_reposUrl; - } - - after_reposUrl: $result['repos_url'] = $reposUrl; - - $siteAdmin = $object->siteAdmin; - - if ($siteAdmin === null) { - goto after_siteAdmin; - } - - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredUrl = $object->starredUrl; - - if ($starredUrl === null) { - goto after_starredUrl; - } - - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - - if ($subscriptionsUrl === null) { - goto after_subscriptionsUrl; + if ($license === null) { + goto after_license; } - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️License($license); + after_license: $result['license'] = $license; - $type = $object->type; + $masterBranch = $object->masterBranch; - if ($type === null) { - goto after_type; + if ($masterBranch === null) { + goto after_masterBranch; } - after_type: $result['type'] = $type; + after_masterBranch: $result['master_branch'] = $masterBranch; - $url = $object->url; + $mergeCommitMessage = $object->mergeCommitMessage; - if ($url === null) { - goto after_url; + if ($mergeCommitMessage === null) { + goto after_mergeCommitMessage; } - after_url: $result['url'] = $url; + after_mergeCommitMessage: $result['merge_commit_message'] = $mergeCommitMessage; - $userViewType = $object->userViewType; + $mergeCommitTitle = $object->mergeCommitTitle; - if ($userViewType === null) { - goto after_userViewType; + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; } - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\Repo\Permissions); - $result = []; + $mergesUrl = $object->mergesUrl; + after_mergesUrl: $result['merges_url'] = $mergesUrl; - $admin = $object->admin; - after_admin: $result['admin'] = $admin; + $milestonesUrl = $object->milestonesUrl; + after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; - $maintain = $object->maintain; + $mirrorUrl = $object->mirrorUrl; - if ($maintain === null) { - goto after_maintain; + if ($mirrorUrl === null) { + goto after_mirrorUrl; } - after_maintain: $result['maintain'] = $maintain; - - $pull = $object->pull; - after_pull: $result['pull'] = $pull; - - $push = $object->push; - after_push: $result['push'] = $push; + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; - $triage = $object->triage; + $name = $object->name; + after_name: $result['name'] = $name; - if ($triage === null) { - goto after_triage; - } + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; - after_triage: $result['triage'] = $triage; + $notificationsUrl = $object->notificationsUrl; + after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; - return $result; - } + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️User(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\User); - $result = []; + $openIssuesCount = $object->openIssuesCount; + after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; - $avatarUrl = $object->avatarUrl; + $organization = $object->organization; - if ($avatarUrl === null) { - goto after_avatarUrl; + if ($organization === null) { + goto after_organization; } - after_avatarUrl: $result['avatar_url'] = $avatarUrl; + after_organization: $result['organization'] = $organization; - $deleted = $object->deleted; + $owner = $object->owner; - if ($deleted === null) { - goto after_deleted; + if ($owner === null) { + goto after_owner; } - after_deleted: $result['deleted'] = $deleted; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($owner); + after_owner: $result['owner'] = $owner; - $email = $object->email; + $permissions = $object->permissions; - if ($email === null) { - goto after_email; + if ($permissions === null) { + goto after_permissions; } - after_email: $result['email'] = $email; + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; - $eventsUrl = $object->eventsUrl; + $private = $object->private; + after_private: $result['private'] = $private; - if ($eventsUrl === null) { - goto after_eventsUrl; + $public = $object->public; + + if ($public === null) { + goto after_public; } - after_eventsUrl: $result['events_url'] = $eventsUrl; + after_public: $result['public'] = $public; - $followersUrl = $object->followersUrl; + $pullsUrl = $object->pullsUrl; + after_pullsUrl: $result['pulls_url'] = $pullsUrl; - if ($followersUrl === null) { - goto after_followersUrl; - } + $pushedAt = $object->pushedAt; + after_pushedAt: $result['pushed_at'] = $pushedAt; - after_followersUrl: $result['followers_url'] = $followersUrl; + $releasesUrl = $object->releasesUrl; + after_releasesUrl: $result['releases_url'] = $releasesUrl; - $followingUrl = $object->followingUrl; + $roleName = $object->roleName; - if ($followingUrl === null) { - goto after_followingUrl; + if ($roleName === null) { + goto after_roleName; } - after_followingUrl: $result['following_url'] = $followingUrl; + after_roleName: $result['role_name'] = $roleName; - $gistsUrl = $object->gistsUrl; + $size = $object->size; + after_size: $result['size'] = $size; - if ($gistsUrl === null) { - goto after_gistsUrl; + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; } - after_gistsUrl: $result['gists_url'] = $gistsUrl; + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; - $gravatarId = $object->gravatarId; + $squashMergeCommitTitle = $object->squashMergeCommitTitle; - if ($gravatarId === null) { - goto after_gravatarId; + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; - $htmlUrl = $object->htmlUrl; + $sshUrl = $object->sshUrl; + after_sshUrl: $result['ssh_url'] = $sshUrl; - if ($htmlUrl === null) { - goto after_htmlUrl; + $stargazers = $object->stargazers; + + if ($stargazers === null) { + goto after_stargazers; } - after_htmlUrl: $result['html_url'] = $htmlUrl; + after_stargazers: $result['stargazers'] = $stargazers; - $id = $object->id; - after_id: $result['id'] = $id; + $stargazersCount = $object->stargazersCount; + after_stargazersCount: $result['stargazers_count'] = $stargazersCount; - $login = $object->login; - after_login: $result['login'] = $login; + $stargazersUrl = $object->stargazersUrl; + after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; - $name = $object->name; + $statusesUrl = $object->statusesUrl; + after_statusesUrl: $result['statuses_url'] = $statusesUrl; - if ($name === null) { - goto after_name; - } + $subscribersUrl = $object->subscribersUrl; + after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; - after_name: $result['name'] = $name; + $subscriptionUrl = $object->subscriptionUrl; + after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; - $nodeId = $object->nodeId; + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; - if ($nodeId === null) { - goto after_nodeId; - } + $tagsUrl = $object->tagsUrl; + after_tagsUrl: $result['tags_url'] = $tagsUrl; - after_nodeId: $result['node_id'] = $nodeId; + $teamsUrl = $object->teamsUrl; + after_teamsUrl: $result['teams_url'] = $teamsUrl; - $organizationsUrl = $object->organizationsUrl; + $topics = $object->topics; + static $topicsSerializer0; - if ($organizationsUrl === null) { - goto after_organizationsUrl; + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); } - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; - $receivedEventsUrl = $object->receivedEventsUrl; + $treesUrl = $object->treesUrl; + after_treesUrl: $result['trees_url'] = $treesUrl; - if ($receivedEventsUrl === null) { - goto after_receivedEventsUrl; - } + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + $url = $object->url; + after_url: $result['url'] = $url; - $reposUrl = $object->reposUrl; + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; - if ($reposUrl === null) { - goto after_reposUrl; + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; } - after_reposUrl: $result['repos_url'] = $reposUrl; + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; - $siteAdmin = $object->siteAdmin; + $visibility = $object->visibility; + after_visibility: $result['visibility'] = $visibility; - if ($siteAdmin === null) { - goto after_siteAdmin; - } + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + $watchersCount = $object->watchersCount; + after_watchersCount: $result['watchers_count'] = $watchersCount; - $starredUrl = $object->starredUrl; + $webCommitSignoffRequired = $object->webCommitSignoffRequired; - if ($starredUrl === null) { - goto after_starredUrl; + if ($webCommitSignoffRequired === null) { + goto after_webCommitSignoffRequired; } - after_starredUrl: $result['starred_url'] = $starredUrl; + after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; - $subscriptionsUrl = $object->subscriptionsUrl; + return $result; + } - if ($subscriptionsUrl === null) { - goto after_subscriptionsUrl; - } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️License(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\Repo\License); + $result = []; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $key = $object->key; + after_key: $result['key'] = $key; - $type = $object->type; + $name = $object->name; + after_name: $result['name'] = $name; - if ($type === null) { - goto after_type; - } + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; - after_type: $result['type'] = $type; + $spdxId = $object->spdxId; + after_spdxId: $result['spdx_id'] = $spdxId; $url = $object->url; @@ -101956,20 +99639,12 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_url: $result['url'] = $url; - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️MergedBy(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\MergedBy); + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\Repo\Owner); $result = []; $avatarUrl = $object->avatarUrl; @@ -102141,86 +99816,42 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Milestone(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Milestone); + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\Repo\Permissions); $result = []; - $closedAt = $object->closedAt; - - if ($closedAt === null) { - goto after_closedAt; - } - - after_closedAt: $result['closed_at'] = $closedAt; - - $closedIssues = $object->closedIssues; - after_closedIssues: $result['closed_issues'] = $closedIssues; - - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + $admin = $object->admin; + after_admin: $result['admin'] = $admin; - $creator = $object->creator; + $maintain = $object->maintain; - if ($creator === null) { - goto after_creator; + if ($maintain === null) { + goto after_maintain; } - $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksIssue⚡️Milestone⚡️Creator($creator); - after_creator: $result['creator'] = $creator; - - $description = $object->description; + after_maintain: $result['maintain'] = $maintain; - if ($description === null) { - goto after_description; - } + $pull = $object->pull; + after_pull: $result['pull'] = $pull; - after_description: $result['description'] = $description; + $push = $object->push; + after_push: $result['push'] = $push; - $dueOn = $object->dueOn; + $triage = $object->triage; - if ($dueOn === null) { - goto after_dueOn; + if ($triage === null) { + goto after_triage; } - after_dueOn: $result['due_on'] = $dueOn; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $labelsUrl = $object->labelsUrl; - after_labelsUrl: $result['labels_url'] = $labelsUrl; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $number = $object->number; - after_number: $result['number'] = $number; - - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; - - $state = $object->state; - after_state: $result['state'] = $state; - - $title = $object->title; - after_title: $result['title'] = $title; - - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; - - $url = $object->url; - after_url: $result['url'] = $url; + after_triage: $result['triage'] = $triage; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Milestone⚡️Creator(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Head⚡️User(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Milestone\Creator); + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Head\User); $result = []; $avatarUrl = $object->avatarUrl; @@ -102392,9 +100023,9 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️User(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️MergedBy(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\User); + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\MergedBy); $result = []; $avatarUrl = $object->avatarUrl; @@ -102540,182 +100171,36 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; $type = $object->type; - - if ($type === null) { - goto after_type; - } - - after_type: $result['type'] = $type; - - $url = $object->url; - - if ($url === null) { - goto after_url; - } - - after_url: $result['url'] = $url; - - $userViewType = $object->userViewType; - - if ($userViewType === null) { - goto after_userViewType; - } - - after_userViewType: $result['user_view_type'] = $userViewType; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestClosed(mixed $object): mixed - { - assert($object instanceof WebhookPullRequestClosed); - $result = []; - - $action = $object->action; - after_action: $result['action'] = $action; - - $enterprise = $object->enterprise; - - if ($enterprise === null) { - goto after_enterprise; - } - - $enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($enterprise); - after_enterprise: $result['enterprise'] = $enterprise; - - $installation = $object->installation; - - if ($installation === null) { - goto after_installation; - } - - $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); - after_installation: $result['installation'] = $installation; - - $number = $object->number; - after_number: $result['number'] = $number; - - $organization = $object->organization; - - if ($organization === null) { - goto after_organization; - } - - $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); - after_organization: $result['organization'] = $organization; - - $pullRequest = $object->pullRequest; - $pullRequest = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($pullRequest); - after_pullRequest: $result['pull_request'] = $pullRequest; - - $repository = $object->repository; - $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository); - after_repository: $result['repository'] = $repository; - - $sender = $object->sender; - $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($sender); - after_sender: $result['sender'] = $sender; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest); - $result = []; - - $url = $object->url; - after_url: $result['url'] = $url; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $diffUrl = $object->diffUrl; - after_diffUrl: $result['diff_url'] = $diffUrl; - - $patchUrl = $object->patchUrl; - after_patchUrl: $result['patch_url'] = $patchUrl; - - $issueUrl = $object->issueUrl; - after_issueUrl: $result['issue_url'] = $issueUrl; - - $commitsUrl = $object->commitsUrl; - after_commitsUrl: $result['commits_url'] = $commitsUrl; - - $reviewCommentsUrl = $object->reviewCommentsUrl; - after_reviewCommentsUrl: $result['review_comments_url'] = $reviewCommentsUrl; - - $reviewCommentUrl = $object->reviewCommentUrl; - after_reviewCommentUrl: $result['review_comment_url'] = $reviewCommentUrl; - - $commentsUrl = $object->commentsUrl; - after_commentsUrl: $result['comments_url'] = $commentsUrl; - - $statusesUrl = $object->statusesUrl; - after_statusesUrl: $result['statuses_url'] = $statusesUrl; - - $number = $object->number; - after_number: $result['number'] = $number; - - $state = $object->state; - after_state: $result['state'] = $state; - - $locked = $object->locked; - after_locked: $result['locked'] = $locked; - - $title = $object->title; - after_title: $result['title'] = $title; - - $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); - after_user: $result['user'] = $user; - - $body = $object->body; - - if ($body === null) { - goto after_body; - } - - after_body: $result['body'] = $body; - - $labels = $object->labels; - static $labelsSerializer0; - - if ($labelsSerializer0 === null) { - $labelsSerializer0 = new SerializeArrayItems(...[]); + + if ($type === null) { + goto after_type; } - $labels = $labelsSerializer0->serialize($labels, $this); - after_labels: $result['labels'] = $labels; + after_type: $result['type'] = $type; - $milestone = $object->milestone; + $url = $object->url; - if ($milestone === null) { - goto after_milestone; + if ($url === null) { + goto after_url; } - $milestone = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($milestone); - after_milestone: $result['milestone'] = $milestone; + after_url: $result['url'] = $url; - $activeLockReason = $object->activeLockReason; + $userViewType = $object->userViewType; - if ($activeLockReason === null) { - goto after_activeLockReason; + if ($userViewType === null) { + goto after_userViewType; } - after_activeLockReason: $result['active_lock_reason'] = $activeLockReason; + after_userViewType: $result['user_view_type'] = $userViewType; - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + return $result; + } - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Milestone(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Milestone); + $result = []; $closedAt = $object->closedAt; @@ -102725,589 +100210,562 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_closedAt: $result['closed_at'] = $closedAt; - $mergedAt = $object->mergedAt; + $closedIssues = $object->closedIssues; + after_closedIssues: $result['closed_issues'] = $closedIssues; - if ($mergedAt === null) { - goto after_mergedAt; + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; + + $creator = $object->creator; + + if ($creator === null) { + goto after_creator; } - after_mergedAt: $result['merged_at'] = $mergedAt; + $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhooksIssue⚡️Milestone⚡️Creator($creator); + after_creator: $result['creator'] = $creator; - $mergeCommitSha = $object->mergeCommitSha; + $description = $object->description; - if ($mergeCommitSha === null) { - goto after_mergeCommitSha; + if ($description === null) { + goto after_description; } - after_mergeCommitSha: $result['merge_commit_sha'] = $mergeCommitSha; + after_description: $result['description'] = $description; - $assignee = $object->assignee; + $dueOn = $object->dueOn; - if ($assignee === null) { - goto after_assignee; + if ($dueOn === null) { + goto after_dueOn; } - $assignee = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($assignee); - after_assignee: $result['assignee'] = $assignee; + after_dueOn: $result['due_on'] = $dueOn; - $assignees = $object->assignees; + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - if ($assignees === null) { - goto after_assignees; - } + $id = $object->id; + after_id: $result['id'] = $id; - static $assigneesSerializer0; + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; - if ($assigneesSerializer0 === null) { - $assigneesSerializer0 = new SerializeArrayItems(...[]); - } + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; - $assignees = $assigneesSerializer0->serialize($assignees, $this); - after_assignees: $result['assignees'] = $assignees; + $number = $object->number; + after_number: $result['number'] = $number; - $requestedReviewers = $object->requestedReviewers; + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - if ($requestedReviewers === null) { - goto after_requestedReviewers; - } + $state = $object->state; + after_state: $result['state'] = $state; - static $requestedReviewersSerializer0; + $title = $object->title; + after_title: $result['title'] = $title; - if ($requestedReviewersSerializer0 === null) { - $requestedReviewersSerializer0 = new SerializeArrayItems(...[]); - } + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; - $requestedReviewers = $requestedReviewersSerializer0->serialize($requestedReviewers, $this); - after_requestedReviewers: $result['requested_reviewers'] = $requestedReviewers; + $url = $object->url; + after_url: $result['url'] = $url; - $requestedTeams = $object->requestedTeams; + return $result; + } - if ($requestedTeams === null) { - goto after_requestedTeams; - } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️Milestone⚡️Creator(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\Milestone\Creator); + $result = []; - static $requestedTeamsSerializer0; + $avatarUrl = $object->avatarUrl; - if ($requestedTeamsSerializer0 === null) { - $requestedTeamsSerializer0 = new SerializeArrayItems(...[]); + if ($avatarUrl === null) { + goto after_avatarUrl; } - $requestedTeams = $requestedTeamsSerializer0->serialize($requestedTeams, $this); - after_requestedTeams: $result['requested_teams'] = $requestedTeams; - - $head = $object->head; - $head = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($head); - after_head: $result['head'] = $head; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; - $base = $object->base; - $base = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($base); - after_base: $result['base'] = $base; + $deleted = $object->deleted; - $links = $object->links; - $links = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($links); - after_links: $result['_links'] = $links; + if ($deleted === null) { + goto after_deleted; + } - $authorAssociation = $object->authorAssociation; - after_authorAssociation: $result['author_association'] = $authorAssociation; + after_deleted: $result['deleted'] = $deleted; - $autoMerge = $object->autoMerge; + $email = $object->email; - if ($autoMerge === null) { - goto after_autoMerge; + if ($email === null) { + goto after_email; } - $autoMerge = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($autoMerge); - after_autoMerge: $result['auto_merge'] = $autoMerge; + after_email: $result['email'] = $email; - $draft = $object->draft; + $eventsUrl = $object->eventsUrl; - if ($draft === null) { - goto after_draft; + if ($eventsUrl === null) { + goto after_eventsUrl; } - after_draft: $result['draft'] = $draft; - - $merged = $object->merged; - after_merged: $result['merged'] = $merged; + after_eventsUrl: $result['events_url'] = $eventsUrl; - $mergeable = $object->mergeable; + $followersUrl = $object->followersUrl; - if ($mergeable === null) { - goto after_mergeable; + if ($followersUrl === null) { + goto after_followersUrl; } - after_mergeable: $result['mergeable'] = $mergeable; + after_followersUrl: $result['followers_url'] = $followersUrl; - $rebaseable = $object->rebaseable; + $followingUrl = $object->followingUrl; - if ($rebaseable === null) { - goto after_rebaseable; + if ($followingUrl === null) { + goto after_followingUrl; } - after_rebaseable: $result['rebaseable'] = $rebaseable; - - $mergeableState = $object->mergeableState; - after_mergeableState: $result['mergeable_state'] = $mergeableState; + after_followingUrl: $result['following_url'] = $followingUrl; - $mergedBy = $object->mergedBy; + $gistsUrl = $object->gistsUrl; - if ($mergedBy === null) { - goto after_mergedBy; + if ($gistsUrl === null) { + goto after_gistsUrl; } - $mergedBy = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($mergedBy); - after_mergedBy: $result['merged_by'] = $mergedBy; + after_gistsUrl: $result['gists_url'] = $gistsUrl; - $comments = $object->comments; - after_comments: $result['comments'] = $comments; + $gravatarId = $object->gravatarId; - $reviewComments = $object->reviewComments; - after_reviewComments: $result['review_comments'] = $reviewComments; + if ($gravatarId === null) { + goto after_gravatarId; + } - $maintainerCanModify = $object->maintainerCanModify; - after_maintainerCanModify: $result['maintainer_can_modify'] = $maintainerCanModify; + after_gravatarId: $result['gravatar_id'] = $gravatarId; - $commits = $object->commits; - after_commits: $result['commits'] = $commits; + $htmlUrl = $object->htmlUrl; - $additions = $object->additions; - after_additions: $result['additions'] = $additions; + if ($htmlUrl === null) { + goto after_htmlUrl; + } - $deletions = $object->deletions; - after_deletions: $result['deletions'] = $deletions; + after_htmlUrl: $result['html_url'] = $htmlUrl; - $changedFiles = $object->changedFiles; - after_changedFiles: $result['changed_files'] = $changedFiles; + $id = $object->id; + after_id: $result['id'] = $id; - return $result; - } + $login = $object->login; + after_login: $result['login'] = $login; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\Milestone); - $result = []; + $name = $object->name; - $url = $object->url; - after_url: $result['url'] = $url; + if ($name === null) { + goto after_name; + } - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + after_name: $result['name'] = $name; - $labelsUrl = $object->labelsUrl; - after_labelsUrl: $result['labels_url'] = $labelsUrl; + $nodeId = $object->nodeId; - $id = $object->id; - after_id: $result['id'] = $id; + if ($nodeId === null) { + goto after_nodeId; + } - $nodeId = $object->nodeId; after_nodeId: $result['node_id'] = $nodeId; - $number = $object->number; - after_number: $result['number'] = $number; + $organizationsUrl = $object->organizationsUrl; - $state = $object->state; - after_state: $result['state'] = $state; + if ($organizationsUrl === null) { + goto after_organizationsUrl; + } - $title = $object->title; - after_title: $result['title'] = $title; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - $description = $object->description; + $receivedEventsUrl = $object->receivedEventsUrl; - if ($description === null) { - goto after_description; + if ($receivedEventsUrl === null) { + goto after_receivedEventsUrl; } - after_description: $result['description'] = $description; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - $creator = $object->creator; + $reposUrl = $object->reposUrl; - if ($creator === null) { - goto after_creator; + if ($reposUrl === null) { + goto after_reposUrl; } - $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($creator); - after_creator: $result['creator'] = $creator; - - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; + after_reposUrl: $result['repos_url'] = $reposUrl; - $closedIssues = $object->closedIssues; - after_closedIssues: $result['closed_issues'] = $closedIssues; + $siteAdmin = $object->siteAdmin; - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + if ($siteAdmin === null) { + goto after_siteAdmin; + } - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + after_siteAdmin: $result['site_admin'] = $siteAdmin; - $closedAt = $object->closedAt; + $starredUrl = $object->starredUrl; - if ($closedAt === null) { - goto after_closedAt; + if ($starredUrl === null) { + goto after_starredUrl; } - after_closedAt: $result['closed_at'] = $closedAt; + after_starredUrl: $result['starred_url'] = $starredUrl; - $dueOn = $object->dueOn; + $subscriptionsUrl = $object->subscriptionsUrl; - if ($dueOn === null) { - goto after_dueOn; + if ($subscriptionsUrl === null) { + goto after_subscriptionsUrl; } - after_dueOn: $result['due_on'] = $dueOn; - - return $result; - } + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Head); - $result = []; + $type = $object->type; - $label = $object->label; - after_label: $result['label'] = $label; + if ($type === null) { + goto after_type; + } - $ref = $object->ref; - after_ref: $result['ref'] = $ref; + after_type: $result['type'] = $type; - $repo = $object->repo; + $url = $object->url; - if ($repo === null) { - goto after_repo; + if ($url === null) { + goto after_url; } - $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo($repo); - after_repo: $result['repo'] = $repo; + after_url: $result['url'] = $url; - $sha = $object->sha; - after_sha: $result['sha'] = $sha; + $userViewType = $object->userViewType; - $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User($user); - after_user: $result['user'] = $user; + if ($userViewType === null) { + goto after_userViewType; + } + + after_userViewType: $result['user_view_type'] = $userViewType; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestAutoMergeEnabled⚡️PullRequest⚡️User(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo); + assert($object instanceof \ApiClients\Client\GitHub\Schema\WebhookPullRequestAutoMergeEnabled\PullRequest\User); $result = []; - $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; + $avatarUrl = $object->avatarUrl; - $branchesUrl = $object->branchesUrl; - after_branchesUrl: $result['branches_url'] = $branchesUrl; + if ($avatarUrl === null) { + goto after_avatarUrl; + } - $collaboratorsUrl = $object->collaboratorsUrl; - after_collaboratorsUrl: $result['collaborators_url'] = $collaboratorsUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; - $commentsUrl = $object->commentsUrl; - after_commentsUrl: $result['comments_url'] = $commentsUrl; + $deleted = $object->deleted; - $commitsUrl = $object->commitsUrl; - after_commitsUrl: $result['commits_url'] = $commitsUrl; + if ($deleted === null) { + goto after_deleted; + } - $compareUrl = $object->compareUrl; - after_compareUrl: $result['compare_url'] = $compareUrl; + after_deleted: $result['deleted'] = $deleted; - $contentsUrl = $object->contentsUrl; - after_contentsUrl: $result['contents_url'] = $contentsUrl; + $email = $object->email; - $contributorsUrl = $object->contributorsUrl; - after_contributorsUrl: $result['contributors_url'] = $contributorsUrl; + if ($email === null) { + goto after_email; + } - $deploymentsUrl = $object->deploymentsUrl; - after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; + after_email: $result['email'] = $email; - $description = $object->description; + $eventsUrl = $object->eventsUrl; - if ($description === null) { - goto after_description; + if ($eventsUrl === null) { + goto after_eventsUrl; } - after_description: $result['description'] = $description; - - $downloadsUrl = $object->downloadsUrl; - after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; - - $eventsUrl = $object->eventsUrl; after_eventsUrl: $result['events_url'] = $eventsUrl; - $fork = $object->fork; - after_fork: $result['fork'] = $fork; + $followersUrl = $object->followersUrl; - $forksUrl = $object->forksUrl; - after_forksUrl: $result['forks_url'] = $forksUrl; + if ($followersUrl === null) { + goto after_followersUrl; + } - $fullName = $object->fullName; - after_fullName: $result['full_name'] = $fullName; + after_followersUrl: $result['followers_url'] = $followersUrl; - $gitCommitsUrl = $object->gitCommitsUrl; - after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; + $followingUrl = $object->followingUrl; - $gitRefsUrl = $object->gitRefsUrl; - after_gitRefsUrl: $result['git_refs_url'] = $gitRefsUrl; + if ($followingUrl === null) { + goto after_followingUrl; + } - $gitTagsUrl = $object->gitTagsUrl; - after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; + after_followingUrl: $result['following_url'] = $followingUrl; - $hooksUrl = $object->hooksUrl; - after_hooksUrl: $result['hooks_url'] = $hooksUrl; + $gistsUrl = $object->gistsUrl; - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + if ($gistsUrl === null) { + goto after_gistsUrl; + } - $id = $object->id; - after_id: $result['id'] = $id; + after_gistsUrl: $result['gists_url'] = $gistsUrl; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $gravatarId = $object->gravatarId; - $issueCommentUrl = $object->issueCommentUrl; - after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; + if ($gravatarId === null) { + goto after_gravatarId; + } - $issueEventsUrl = $object->issueEventsUrl; - after_issueEventsUrl: $result['issue_events_url'] = $issueEventsUrl; + after_gravatarId: $result['gravatar_id'] = $gravatarId; - $issuesUrl = $object->issuesUrl; - after_issuesUrl: $result['issues_url'] = $issuesUrl; + $htmlUrl = $object->htmlUrl; - $keysUrl = $object->keysUrl; - after_keysUrl: $result['keys_url'] = $keysUrl; + if ($htmlUrl === null) { + goto after_htmlUrl; + } - $labelsUrl = $object->labelsUrl; - after_labelsUrl: $result['labels_url'] = $labelsUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - $languagesUrl = $object->languagesUrl; - after_languagesUrl: $result['languages_url'] = $languagesUrl; + $id = $object->id; + after_id: $result['id'] = $id; - $mergesUrl = $object->mergesUrl; - after_mergesUrl: $result['merges_url'] = $mergesUrl; + $login = $object->login; + after_login: $result['login'] = $login; - $milestonesUrl = $object->milestonesUrl; - after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; + $name = $object->name; - $name = $object->name; - after_name: $result['name'] = $name; + if ($name === null) { + goto after_name; + } - $notificationsUrl = $object->notificationsUrl; - after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; + after_name: $result['name'] = $name; - $owner = $object->owner; - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner($owner); - after_owner: $result['owner'] = $owner; + $nodeId = $object->nodeId; - $private = $object->private; - after_private: $result['private'] = $private; + if ($nodeId === null) { + goto after_nodeId; + } - $pullsUrl = $object->pullsUrl; - after_pullsUrl: $result['pulls_url'] = $pullsUrl; + after_nodeId: $result['node_id'] = $nodeId; - $releasesUrl = $object->releasesUrl; - after_releasesUrl: $result['releases_url'] = $releasesUrl; + $organizationsUrl = $object->organizationsUrl; - $stargazersUrl = $object->stargazersUrl; - after_stargazersUrl: $result['stargazers_url'] = $stargazersUrl; + if ($organizationsUrl === null) { + goto after_organizationsUrl; + } - $statusesUrl = $object->statusesUrl; - after_statusesUrl: $result['statuses_url'] = $statusesUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - $subscribersUrl = $object->subscribersUrl; - after_subscribersUrl: $result['subscribers_url'] = $subscribersUrl; + $receivedEventsUrl = $object->receivedEventsUrl; - $subscriptionUrl = $object->subscriptionUrl; - after_subscriptionUrl: $result['subscription_url'] = $subscriptionUrl; + if ($receivedEventsUrl === null) { + goto after_receivedEventsUrl; + } - $tagsUrl = $object->tagsUrl; - after_tagsUrl: $result['tags_url'] = $tagsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - $teamsUrl = $object->teamsUrl; - after_teamsUrl: $result['teams_url'] = $teamsUrl; + $reposUrl = $object->reposUrl; - $treesUrl = $object->treesUrl; - after_treesUrl: $result['trees_url'] = $treesUrl; + if ($reposUrl === null) { + goto after_reposUrl; + } - $url = $object->url; - after_url: $result['url'] = $url; + after_reposUrl: $result['repos_url'] = $reposUrl; - $cloneUrl = $object->cloneUrl; - after_cloneUrl: $result['clone_url'] = $cloneUrl; + $siteAdmin = $object->siteAdmin; - $defaultBranch = $object->defaultBranch; - after_defaultBranch: $result['default_branch'] = $defaultBranch; + if ($siteAdmin === null) { + goto after_siteAdmin; + } - $forks = $object->forks; - after_forks: $result['forks'] = $forks; + after_siteAdmin: $result['site_admin'] = $siteAdmin; - $forksCount = $object->forksCount; - after_forksCount: $result['forks_count'] = $forksCount; + $starredUrl = $object->starredUrl; - $gitUrl = $object->gitUrl; - after_gitUrl: $result['git_url'] = $gitUrl; + if ($starredUrl === null) { + goto after_starredUrl; + } - $hasDownloads = $object->hasDownloads; - after_hasDownloads: $result['has_downloads'] = $hasDownloads; + after_starredUrl: $result['starred_url'] = $starredUrl; - $hasIssues = $object->hasIssues; - after_hasIssues: $result['has_issues'] = $hasIssues; + $subscriptionsUrl = $object->subscriptionsUrl; - $hasProjects = $object->hasProjects; - after_hasProjects: $result['has_projects'] = $hasProjects; + if ($subscriptionsUrl === null) { + goto after_subscriptionsUrl; + } - $hasWiki = $object->hasWiki; - after_hasWiki: $result['has_wiki'] = $hasWiki; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - $hasPages = $object->hasPages; - after_hasPages: $result['has_pages'] = $hasPages; + $type = $object->type; - $hasDiscussions = $object->hasDiscussions; - after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + if ($type === null) { + goto after_type; + } - $homepage = $object->homepage; + after_type: $result['type'] = $type; - if ($homepage === null) { - goto after_homepage; + $url = $object->url; + + if ($url === null) { + goto after_url; } - after_homepage: $result['homepage'] = $homepage; + after_url: $result['url'] = $url; - $language = $object->language; + $userViewType = $object->userViewType; - if ($language === null) { - goto after_language; + if ($userViewType === null) { + goto after_userViewType; } - after_language: $result['language'] = $language; + after_userViewType: $result['user_view_type'] = $userViewType; - $masterBranch = $object->masterBranch; + return $result; + } - if ($masterBranch === null) { - goto after_masterBranch; - } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookPullRequestClosed(mixed $object): mixed + { + assert($object instanceof WebhookPullRequestClosed); + $result = []; - after_masterBranch: $result['master_branch'] = $masterBranch; + $action = $object->action; + after_action: $result['action'] = $action; - $archived = $object->archived; - after_archived: $result['archived'] = $archived; + $enterprise = $object->enterprise; - $disabled = $object->disabled; - after_disabled: $result['disabled'] = $disabled; + if ($enterprise === null) { + goto after_enterprise; + } - $visibility = $object->visibility; + $enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($enterprise); + after_enterprise: $result['enterprise'] = $enterprise; - if ($visibility === null) { - goto after_visibility; + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; } - after_visibility: $result['visibility'] = $visibility; + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; - $mirrorUrl = $object->mirrorUrl; + $number = $object->number; + after_number: $result['number'] = $number; - if ($mirrorUrl === null) { - goto after_mirrorUrl; + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; } - after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; + $pullRequest = $object->pullRequest; + $pullRequest = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest($pullRequest); + after_pullRequest: $result['pull_request'] = $pullRequest; - $openIssuesCount = $object->openIssuesCount; - after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + $repository = $object->repository; + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository); + after_repository: $result['repository'] = $repository; - $permissions = $object->permissions; + $sender = $object->sender; + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($sender); + after_sender: $result['sender'] = $sender; - if ($permissions === null) { - goto after_permissions; - } + return $result; + } - $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions($permissions); - after_permissions: $result['permissions'] = $permissions; + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest(mixed $object): mixed + { + assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest); + $result = []; - $tempCloneToken = $object->tempCloneToken; + $url = $object->url; + after_url: $result['url'] = $url; - if ($tempCloneToken === null) { - goto after_tempCloneToken; - } + $id = $object->id; + after_id: $result['id'] = $id; - after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; - $allowMergeCommit = $object->allowMergeCommit; + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - if ($allowMergeCommit === null) { - goto after_allowMergeCommit; - } + $diffUrl = $object->diffUrl; + after_diffUrl: $result['diff_url'] = $diffUrl; - after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + $patchUrl = $object->patchUrl; + after_patchUrl: $result['patch_url'] = $patchUrl; - $allowSquashMerge = $object->allowSquashMerge; + $issueUrl = $object->issueUrl; + after_issueUrl: $result['issue_url'] = $issueUrl; - if ($allowSquashMerge === null) { - goto after_allowSquashMerge; - } + $commitsUrl = $object->commitsUrl; + after_commitsUrl: $result['commits_url'] = $commitsUrl; - after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; + $reviewCommentsUrl = $object->reviewCommentsUrl; + after_reviewCommentsUrl: $result['review_comments_url'] = $reviewCommentsUrl; - $allowRebaseMerge = $object->allowRebaseMerge; + $reviewCommentUrl = $object->reviewCommentUrl; + after_reviewCommentUrl: $result['review_comment_url'] = $reviewCommentUrl; - if ($allowRebaseMerge === null) { - goto after_allowRebaseMerge; - } + $commentsUrl = $object->commentsUrl; + after_commentsUrl: $result['comments_url'] = $commentsUrl; - after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + $statusesUrl = $object->statusesUrl; + after_statusesUrl: $result['statuses_url'] = $statusesUrl; - $license = $object->license; + $number = $object->number; + after_number: $result['number'] = $number; - if ($license === null) { - goto after_license; - } + $state = $object->state; + after_state: $result['state'] = $state; - $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License($license); - after_license: $result['license'] = $license; + $locked = $object->locked; + after_locked: $result['locked'] = $locked; - $pushedAt = $object->pushedAt; - after_pushedAt: $result['pushed_at'] = $pushedAt; + $title = $object->title; + after_title: $result['title'] = $title; - $size = $object->size; - after_size: $result['size'] = $size; + $user = $object->user; + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); + after_user: $result['user'] = $user; - $sshUrl = $object->sshUrl; - after_sshUrl: $result['ssh_url'] = $sshUrl; + $body = $object->body; - $stargazersCount = $object->stargazersCount; - after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + if ($body === null) { + goto after_body; + } - $svnUrl = $object->svnUrl; - after_svnUrl: $result['svn_url'] = $svnUrl; + after_body: $result['body'] = $body; - $topics = $object->topics; + $labels = $object->labels; + static $labelsSerializer0; - if ($topics === null) { - goto after_topics; + if ($labelsSerializer0 === null) { + $labelsSerializer0 = new SerializeArrayItems(...[]); } - static $topicsSerializer0; + $labels = $labelsSerializer0->serialize($labels, $this); + after_labels: $result['labels'] = $labels; - if ($topicsSerializer0 === null) { - $topicsSerializer0 = new SerializeArrayItems(...[]); + $milestone = $object->milestone; + + if ($milestone === null) { + goto after_milestone; } - $topics = $topicsSerializer0->serialize($topics, $this); - after_topics: $result['topics'] = $topics; + $milestone = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone($milestone); + after_milestone: $result['milestone'] = $milestone; - $watchers = $object->watchers; - after_watchers: $result['watchers'] = $watchers; + $activeLockReason = $object->activeLockReason; - $watchersCount = $object->watchersCount; - after_watchersCount: $result['watchers_count'] = $watchersCount; + if ($activeLockReason === null) { + goto after_activeLockReason; + } + + after_activeLockReason: $result['active_lock_reason'] = $activeLockReason; $createdAt = $object->createdAt; after_createdAt: $result['created_at'] = $createdAt; @@ -103315,252 +100773,251 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $updatedAt = $object->updatedAt; after_updatedAt: $result['updated_at'] = $updatedAt; - $allowForking = $object->allowForking; + $closedAt = $object->closedAt; - if ($allowForking === null) { - goto after_allowForking; + if ($closedAt === null) { + goto after_closedAt; } - after_allowForking: $result['allow_forking'] = $allowForking; + after_closedAt: $result['closed_at'] = $closedAt; - $isTemplate = $object->isTemplate; + $mergedAt = $object->mergedAt; - if ($isTemplate === null) { - goto after_isTemplate; + if ($mergedAt === null) { + goto after_mergedAt; } - after_isTemplate: $result['is_template'] = $isTemplate; + after_mergedAt: $result['merged_at'] = $mergedAt; - $webCommitSignoffRequired = $object->webCommitSignoffRequired; + $mergeCommitSha = $object->mergeCommitSha; - if ($webCommitSignoffRequired === null) { - goto after_webCommitSignoffRequired; + if ($mergeCommitSha === null) { + goto after_mergeCommitSha; } - after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; + after_mergeCommitSha: $result['merge_commit_sha'] = $mergeCommitSha; - return $result; - } + $assignee = $object->assignee; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Owner(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Owner); - $result = []; + if ($assignee === null) { + goto after_assignee; + } - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; + $assignee = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($assignee); + after_assignee: $result['assignee'] = $assignee; - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; + $assignees = $object->assignees; - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + if ($assignees === null) { + goto after_assignees; + } - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + static $assigneesSerializer0; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + if ($assigneesSerializer0 === null) { + $assigneesSerializer0 = new SerializeArrayItems(...[]); + } - $gravatarId = $object->gravatarId; + $assignees = $assigneesSerializer0->serialize($assignees, $this); + after_assignees: $result['assignees'] = $assignees; - if ($gravatarId === null) { - goto after_gravatarId; - } + $requestedReviewers = $object->requestedReviewers; - after_gravatarId: $result['gravatar_id'] = $gravatarId; + if ($requestedReviewers === null) { + goto after_requestedReviewers; + } - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + static $requestedReviewersSerializer0; - $id = $object->id; - after_id: $result['id'] = $id; + if ($requestedReviewersSerializer0 === null) { + $requestedReviewersSerializer0 = new SerializeArrayItems(...[]); + } - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $requestedReviewers = $requestedReviewersSerializer0->serialize($requestedReviewers, $this); + after_requestedReviewers: $result['requested_reviewers'] = $requestedReviewers; - $login = $object->login; - after_login: $result['login'] = $login; + $requestedTeams = $object->requestedTeams; - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + if ($requestedTeams === null) { + goto after_requestedTeams; + } - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + static $requestedTeamsSerializer0; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + if ($requestedTeamsSerializer0 === null) { + $requestedTeamsSerializer0 = new SerializeArrayItems(...[]); + } - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + $requestedTeams = $requestedTeamsSerializer0->serialize($requestedTeams, $this); + after_requestedTeams: $result['requested_teams'] = $requestedTeams; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + $head = $object->head; + $head = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head($head); + after_head: $result['head'] = $head; - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $base = $object->base; + $base = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base($base); + after_base: $result['base'] = $base; - $type = $object->type; - after_type: $result['type'] = $type; + $links = $object->links; + $links = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Links($links); + after_links: $result['_links'] = $links; - $url = $object->url; - after_url: $result['url'] = $url; + $authorAssociation = $object->authorAssociation; + after_authorAssociation: $result['author_association'] = $authorAssociation; - $userViewType = $object->userViewType; + $autoMerge = $object->autoMerge; - if ($userViewType === null) { - goto after_userViewType; + if ($autoMerge === null) { + goto after_autoMerge; } - after_userViewType: $result['user_view_type'] = $userViewType; + $autoMerge = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️AutoMerge($autoMerge); + after_autoMerge: $result['auto_merge'] = $autoMerge; - return $result; - } + $draft = $object->draft; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️Permissions(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\Permissions); - $result = []; + if ($draft === null) { + goto after_draft; + } - $admin = $object->admin; - after_admin: $result['admin'] = $admin; + after_draft: $result['draft'] = $draft; - $maintain = $object->maintain; + $merged = $object->merged; + after_merged: $result['merged'] = $merged; - if ($maintain === null) { - goto after_maintain; - } + $mergeable = $object->mergeable; - after_maintain: $result['maintain'] = $maintain; + if ($mergeable === null) { + goto after_mergeable; + } - $push = $object->push; - after_push: $result['push'] = $push; + after_mergeable: $result['mergeable'] = $mergeable; - $triage = $object->triage; + $rebaseable = $object->rebaseable; - if ($triage === null) { - goto after_triage; + if ($rebaseable === null) { + goto after_rebaseable; } - after_triage: $result['triage'] = $triage; - - $pull = $object->pull; - after_pull: $result['pull'] = $pull; + after_rebaseable: $result['rebaseable'] = $rebaseable; - return $result; - } + $mergeableState = $object->mergeableState; + after_mergeableState: $result['mergeable_state'] = $mergeableState; - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️Repo⚡️License(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Head\Repo\License); - $result = []; + $mergedBy = $object->mergedBy; - $key = $object->key; - after_key: $result['key'] = $key; + if ($mergedBy === null) { + goto after_mergedBy; + } - $name = $object->name; - after_name: $result['name'] = $name; + $mergedBy = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($mergedBy); + after_mergedBy: $result['merged_by'] = $mergedBy; - $url = $object->url; + $comments = $object->comments; + after_comments: $result['comments'] = $comments; - if ($url === null) { - goto after_url; - } + $reviewComments = $object->reviewComments; + after_reviewComments: $result['review_comments'] = $reviewComments; - after_url: $result['url'] = $url; + $maintainerCanModify = $object->maintainerCanModify; + after_maintainerCanModify: $result['maintainer_can_modify'] = $maintainerCanModify; - $spdxId = $object->spdxId; + $commits = $object->commits; + after_commits: $result['commits'] = $commits; - if ($spdxId === null) { - goto after_spdxId; - } + $additions = $object->additions; + after_additions: $result['additions'] = $additions; - after_spdxId: $result['spdx_id'] = $spdxId; + $deletions = $object->deletions; + after_deletions: $result['deletions'] = $deletions; - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $changedFiles = $object->changedFiles; + after_changedFiles: $result['changed_files'] = $changedFiles; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head⚡️User(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Milestone(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Head\User); + assert($object instanceof \ApiClients\Client\GitHub\Schema\Milestone); $result = []; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; + $url = $object->url; + after_url: $result['url'] = $url; - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; + $labelsUrl = $object->labelsUrl; + after_labelsUrl: $result['labels_url'] = $labelsUrl; - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $id = $object->id; + after_id: $result['id'] = $id; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; - $gravatarId = $object->gravatarId; + $number = $object->number; + after_number: $result['number'] = $number; - if ($gravatarId === null) { - goto after_gravatarId; - } + $state = $object->state; + after_state: $result['state'] = $state; - after_gravatarId: $result['gravatar_id'] = $gravatarId; + $title = $object->title; + after_title: $result['title'] = $title; - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; + $description = $object->description; - $id = $object->id; - after_id: $result['id'] = $id; + if ($description === null) { + goto after_description; + } - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + after_description: $result['description'] = $description; - $login = $object->login; - after_login: $result['login'] = $login; + $creator = $object->creator; - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + if ($creator === null) { + goto after_creator; + } - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + $creator = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($creator); + after_creator: $result['creator'] = $creator; - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; + $closedIssues = $object->closedIssues; + after_closedIssues: $result['closed_issues'] = $closedIssues; - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + $createdAt = $object->createdAt; + after_createdAt: $result['created_at'] = $createdAt; - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; - $type = $object->type; - after_type: $result['type'] = $type; + $closedAt = $object->closedAt; - $url = $object->url; - after_url: $result['url'] = $url; + if ($closedAt === null) { + goto after_closedAt; + } - $userViewType = $object->userViewType; + after_closedAt: $result['closed_at'] = $closedAt; - if ($userViewType === null) { - goto after_userViewType; + $dueOn = $object->dueOn; + + if ($dueOn === null) { + goto after_dueOn; } - after_userViewType: $result['user_view_type'] = $userViewType; + after_dueOn: $result['due_on'] = $dueOn; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Head(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base); + assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Head); $result = []; $label = $object->label; @@ -103570,24 +101027,81 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_ref: $result['ref'] = $ref; $repo = $object->repo; - $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo($repo); + $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($repo); after_repo: $result['repo'] = $repo; $sha = $object->sha; after_sha: $result['sha'] = $sha; $user = $object->user; - $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User($user); + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); after_user: $result['user'] = $user; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo); + assert($object instanceof Repository); $result = []; + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $name = $object->name; + after_name: $result['name'] = $name; + + $fullName = $object->fullName; + after_fullName: $result['full_name'] = $fullName; + + $license = $object->license; + + if ($license === null) { + goto after_license; + } + + $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); + after_license: $result['license'] = $license; + + $forks = $object->forks; + after_forks: $result['forks'] = $forks; + + $permissions = $object->permissions; + + if ($permissions === null) { + goto after_permissions; + } + + $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions($permissions); + after_permissions: $result['permissions'] = $permissions; + + $owner = $object->owner; + $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($owner); + after_owner: $result['owner'] = $owner; + + $private = $object->private; + after_private: $result['private'] = $private; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $fork = $object->fork; + after_fork: $result['fork'] = $fork; + + $url = $object->url; + after_url: $result['url'] = $url; + $archiveUrl = $object->archiveUrl; after_archiveUrl: $result['archive_url'] = $archiveUrl; @@ -103621,29 +101135,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $deploymentsUrl = $object->deploymentsUrl; after_deploymentsUrl: $result['deployments_url'] = $deploymentsUrl; - $description = $object->description; - - if ($description === null) { - goto after_description; - } - - after_description: $result['description'] = $description; - $downloadsUrl = $object->downloadsUrl; after_downloadsUrl: $result['downloads_url'] = $downloadsUrl; $eventsUrl = $object->eventsUrl; after_eventsUrl: $result['events_url'] = $eventsUrl; - $fork = $object->fork; - after_fork: $result['fork'] = $fork; - $forksUrl = $object->forksUrl; after_forksUrl: $result['forks_url'] = $forksUrl; - $fullName = $object->fullName; - after_fullName: $result['full_name'] = $fullName; - $gitCommitsUrl = $object->gitCommitsUrl; after_gitCommitsUrl: $result['git_commits_url'] = $gitCommitsUrl; @@ -103653,25 +101153,8 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $gitTagsUrl = $object->gitTagsUrl; after_gitTagsUrl: $result['git_tags_url'] = $gitTagsUrl; - $hooksUrl = $object->hooksUrl; - after_hooksUrl: $result['hooks_url'] = $hooksUrl; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $isTemplate = $object->isTemplate; - - if ($isTemplate === null) { - goto after_isTemplate; - } - - after_isTemplate: $result['is_template'] = $isTemplate; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; + $gitUrl = $object->gitUrl; + after_gitUrl: $result['git_url'] = $gitUrl; $issueCommentUrl = $object->issueCommentUrl; after_issueCommentUrl: $result['issue_comment_url'] = $issueCommentUrl; @@ -103697,25 +101180,18 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $milestonesUrl = $object->milestonesUrl; after_milestonesUrl: $result['milestones_url'] = $milestonesUrl; - $name = $object->name; - after_name: $result['name'] = $name; - $notificationsUrl = $object->notificationsUrl; after_notificationsUrl: $result['notifications_url'] = $notificationsUrl; - $owner = $object->owner; - $owner = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner($owner); - after_owner: $result['owner'] = $owner; - - $private = $object->private; - after_private: $result['private'] = $private; - $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; @@ -103737,41 +101213,22 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $treesUrl = $object->treesUrl; after_treesUrl: $result['trees_url'] = $treesUrl; - $url = $object->url; - after_url: $result['url'] = $url; - $cloneUrl = $object->cloneUrl; after_cloneUrl: $result['clone_url'] = $cloneUrl; - $defaultBranch = $object->defaultBranch; - after_defaultBranch: $result['default_branch'] = $defaultBranch; - - $forks = $object->forks; - after_forks: $result['forks'] = $forks; - - $forksCount = $object->forksCount; - after_forksCount: $result['forks_count'] = $forksCount; - - $gitUrl = $object->gitUrl; - after_gitUrl: $result['git_url'] = $gitUrl; - - $hasDownloads = $object->hasDownloads; - after_hasDownloads: $result['has_downloads'] = $hasDownloads; - - $hasIssues = $object->hasIssues; - after_hasIssues: $result['has_issues'] = $hasIssues; + $mirrorUrl = $object->mirrorUrl; - $hasProjects = $object->hasProjects; - after_hasProjects: $result['has_projects'] = $hasProjects; + if ($mirrorUrl === null) { + goto after_mirrorUrl; + } - $hasWiki = $object->hasWiki; - after_hasWiki: $result['has_wiki'] = $hasWiki; + after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; - $hasPages = $object->hasPages; - after_hasPages: $result['has_pages'] = $hasPages; + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; - $hasDiscussions = $object->hasDiscussions; - after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; + $svnUrl = $object->svnUrl; + after_svnUrl: $result['svn_url'] = $svnUrl; $homepage = $object->homepage; @@ -103789,13 +101246,69 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_language: $result['language'] = $language; - $masterBranch = $object->masterBranch; + $forksCount = $object->forksCount; + after_forksCount: $result['forks_count'] = $forksCount; - if ($masterBranch === null) { - goto after_masterBranch; + $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_masterBranch: $result['master_branch'] = $masterBranch; + after_isTemplate: $result['is_template'] = $isTemplate; + + $topics = $object->topics; + + if ($topics === null) { + goto after_topics; + } + + static $topicsSerializer0; + + if ($topicsSerializer0 === null) { + $topicsSerializer0 = new SerializeArrayItems(...[]); + } + + $topics = $topicsSerializer0->serialize($topics, $this); + after_topics: $result['topics'] = $topics; + + $hasIssues = $object->hasIssues; + after_hasIssues: $result['has_issues'] = $hasIssues; + + $hasProjects = $object->hasProjects; + after_hasProjects: $result['has_projects'] = $hasProjects; + + $hasWiki = $object->hasWiki; + after_hasWiki: $result['has_wiki'] = $hasWiki; + + $hasPages = $object->hasPages; + after_hasPages: $result['has_pages'] = $hasPages; + + $hasDownloads = $object->hasDownloads; + after_hasDownloads: $result['has_downloads'] = $hasDownloads; + + $hasDiscussions = $object->hasDiscussions; + + if ($hasDiscussions === null) { + goto after_hasDiscussions; + } + + after_hasDiscussions: $result['has_discussions'] = $hasDiscussions; $archived = $object->archived; after_archived: $result['archived'] = $archived; @@ -103811,44 +101324,45 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_visibility: $result['visibility'] = $visibility; - $mirrorUrl = $object->mirrorUrl; + $pushedAt = $object->pushedAt; - if ($mirrorUrl === null) { - goto after_mirrorUrl; + if ($pushedAt === null) { + goto after_pushedAt; } - after_mirrorUrl: $result['mirror_url'] = $mirrorUrl; + after_pushedAt: $result['pushed_at'] = $pushedAt; - $openIssues = $object->openIssues; - after_openIssues: $result['open_issues'] = $openIssues; + $createdAt = $object->createdAt; - $openIssuesCount = $object->openIssuesCount; - after_openIssuesCount: $result['open_issues_count'] = $openIssuesCount; + if ($createdAt === null) { + goto after_createdAt; + } - $permissions = $object->permissions; + after_createdAt: $result['created_at'] = $createdAt; - if ($permissions === null) { - goto after_permissions; + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; } - $permissions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions($permissions); - after_permissions: $result['permissions'] = $permissions; + after_updatedAt: $result['updated_at'] = $updatedAt; - $tempCloneToken = $object->tempCloneToken; + $allowRebaseMerge = $object->allowRebaseMerge; - if ($tempCloneToken === null) { - goto after_tempCloneToken; + if ($allowRebaseMerge === null) { + goto after_allowRebaseMerge; } - after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; + after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; - $allowMergeCommit = $object->allowMergeCommit; + $tempCloneToken = $object->tempCloneToken; - if ($allowMergeCommit === null) { - goto after_allowMergeCommit; + if ($tempCloneToken === null) { + goto after_tempCloneToken; } - after_allowMergeCommit: $result['allow_merge_commit'] = $allowMergeCommit; + after_tempCloneToken: $result['temp_clone_token'] = $tempCloneToken; $allowSquashMerge = $object->allowSquashMerge; @@ -103858,64 +101372,77 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_allowSquashMerge: $result['allow_squash_merge'] = $allowSquashMerge; - $allowRebaseMerge = $object->allowRebaseMerge; + $allowAutoMerge = $object->allowAutoMerge; - if ($allowRebaseMerge === null) { - goto after_allowRebaseMerge; + if ($allowAutoMerge === null) { + goto after_allowAutoMerge; } - after_allowRebaseMerge: $result['allow_rebase_merge'] = $allowRebaseMerge; + after_allowAutoMerge: $result['allow_auto_merge'] = $allowAutoMerge; - $license = $object->license; + $deleteBranchOnMerge = $object->deleteBranchOnMerge; - if ($license === null) { - goto after_license; + if ($deleteBranchOnMerge === null) { + goto after_deleteBranchOnMerge; } - $license = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️LicenseSimple($license); - after_license: $result['license'] = $license; + after_deleteBranchOnMerge: $result['delete_branch_on_merge'] = $deleteBranchOnMerge; - $pushedAt = $object->pushedAt; - after_pushedAt: $result['pushed_at'] = $pushedAt; + $allowUpdateBranch = $object->allowUpdateBranch; - $size = $object->size; - after_size: $result['size'] = $size; + if ($allowUpdateBranch === null) { + goto after_allowUpdateBranch; + } - $sshUrl = $object->sshUrl; - after_sshUrl: $result['ssh_url'] = $sshUrl; + after_allowUpdateBranch: $result['allow_update_branch'] = $allowUpdateBranch; - $stargazersCount = $object->stargazersCount; - after_stargazersCount: $result['stargazers_count'] = $stargazersCount; + $useSquashPrTitleAsDefault = $object->useSquashPrTitleAsDefault; - $svnUrl = $object->svnUrl; - after_svnUrl: $result['svn_url'] = $svnUrl; + if ($useSquashPrTitleAsDefault === null) { + goto after_useSquashPrTitleAsDefault; + } - $topics = $object->topics; + after_useSquashPrTitleAsDefault: $result['use_squash_pr_title_as_default'] = $useSquashPrTitleAsDefault; - if ($topics === null) { - goto after_topics; + $squashMergeCommitTitle = $object->squashMergeCommitTitle; + + if ($squashMergeCommitTitle === null) { + goto after_squashMergeCommitTitle; } - static $topicsSerializer0; + after_squashMergeCommitTitle: $result['squash_merge_commit_title'] = $squashMergeCommitTitle; - if ($topicsSerializer0 === null) { - $topicsSerializer0 = new SerializeArrayItems(...[]); + $squashMergeCommitMessage = $object->squashMergeCommitMessage; + + if ($squashMergeCommitMessage === null) { + goto after_squashMergeCommitMessage; } - $topics = $topicsSerializer0->serialize($topics, $this); - after_topics: $result['topics'] = $topics; + after_squashMergeCommitMessage: $result['squash_merge_commit_message'] = $squashMergeCommitMessage; - $watchers = $object->watchers; - after_watchers: $result['watchers'] = $watchers; + $mergeCommitTitle = $object->mergeCommitTitle; - $watchersCount = $object->watchersCount; - after_watchersCount: $result['watchers_count'] = $watchersCount; + if ($mergeCommitTitle === null) { + goto after_mergeCommitTitle; + } - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; + after_mergeCommitTitle: $result['merge_commit_title'] = $mergeCommitTitle; - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; + $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; @@ -103933,188 +101460,93 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_webCommitSignoffRequired: $result['web_commit_signoff_required'] = $webCommitSignoffRequired; - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Owner(mixed $object): mixed - { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Owner); - $result = []; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; + $openIssues = $object->openIssues; + after_openIssues: $result['open_issues'] = $openIssues; - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; + $watchers = $object->watchers; + after_watchers: $result['watchers'] = $watchers; - $gravatarId = $object->gravatarId; + $masterBranch = $object->masterBranch; - if ($gravatarId === null) { - goto after_gravatarId; + if ($masterBranch === null) { + goto after_masterBranch; } - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $login = $object->login; - after_login: $result['login'] = $login; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; + after_masterBranch: $result['master_branch'] = $masterBranch; - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + $starredAt = $object->starredAt; - $type = $object->type; - after_type: $result['type'] = $type; + if ($starredAt === null) { + goto after_starredAt; + } - $url = $object->url; - after_url: $result['url'] = $url; + after_starredAt: $result['starred_at'] = $starredAt; - $userViewType = $object->userViewType; + $anonymousAccessEnabled = $object->anonymousAccessEnabled; - if ($userViewType === null) { - goto after_userViewType; + if ($anonymousAccessEnabled === null) { + goto after_anonymousAccessEnabled; } - after_userViewType: $result['user_view_type'] = $userViewType; + after_anonymousAccessEnabled: $result['anonymous_access_enabled'] = $anonymousAccessEnabled; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️Repo⚡️Permissions(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository⚡️Permissions(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\Repo\Permissions); + assert($object instanceof \ApiClients\Client\GitHub\Schema\Repository\Permissions); $result = []; $admin = $object->admin; after_admin: $result['admin'] = $admin; - $maintain = $object->maintain; + $pull = $object->pull; + after_pull: $result['pull'] = $pull; - if ($maintain === null) { - goto after_maintain; + $triage = $object->triage; + + if ($triage === null) { + goto after_triage; } - after_maintain: $result['maintain'] = $maintain; + after_triage: $result['triage'] = $triage; $push = $object->push; after_push: $result['push'] = $push; - $triage = $object->triage; + $maintain = $object->maintain; - if ($triage === null) { - goto after_triage; + if ($maintain === null) { + goto after_maintain; } - after_triage: $result['triage'] = $triage; - - $pull = $object->pull; - after_pull: $result['pull'] = $pull; + after_maintain: $result['maintain'] = $maintain; return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base⚡️User(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️PullRequest⚡️Base(mixed $object): mixed { - assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base\User); + assert($object instanceof \ApiClients\Client\GitHub\Schema\PullRequest\Base); $result = []; - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $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; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $login = $object->login; - after_login: $result['login'] = $login; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; + $label = $object->label; + after_label: $result['label'] = $label; - $url = $object->url; - after_url: $result['url'] = $url; + $ref = $object->ref; + after_ref: $result['ref'] = $ref; - $userViewType = $object->userViewType; + $repo = $object->repo; + $repo = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Repository($repo); + after_repo: $result['repo'] = $repo; - if ($userViewType === null) { - goto after_userViewType; - } + $sha = $object->sha; + after_sha: $result['sha'] = $sha; - after_userViewType: $result['user_view_type'] = $userViewType; + $user = $object->user; + $user = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($user); + after_user: $result['user'] = $user; return $result; } diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index d525454a310..cdbac00dfba 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -939,7 +939,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\PagesDeploymentStatus' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pages🌀Deployments🌀PagesDeploymentId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\PagesHealthCheck', '\\ApiClients\\Client\\GitHub\\Schema\\PagesHealthCheck\\Domain', '\\ApiClients\\Client\\GitHub\\Schema\\PagesHealthCheck\\AltDomain' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pages🌀Health()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Repos\\CheckPrivateVulnerabilityReporting\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀PrivateVulnerabilityReporting()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo\\License', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\User', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\Repo', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\Repo\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\Repo\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\User', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\Link', '\\ApiClients\\Client\\GitHub\\Schema\\AutoMerge' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\Link', '\\ApiClients\\Client\\GitHub\\Schema\\AutoMerge' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links\\Self_', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links\\Html', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links\\PullRequest' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls🌀Comments🌀CommentId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestMergeResult', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Pulls\\Merge\\Response\\ApplicationJson\\MethodNotAllowed\\Application\\Json', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Pulls\\Merge\\Response\\ApplicationJson\\Conflict\\Application\\Json' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls🌀PullNumber🌀Merge()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewRequest', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple\\Head', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple\\Base', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple\\Links' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls🌀PullNumber🌀RequestedReviewers()->hydrateObject($className, $payload), @@ -1297,7 +1297,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\PagesDeploymentStatus' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pages🌀Deployments🌀PagesDeploymentId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\PagesHealthCheck', '\\ApiClients\\Client\\GitHub\\Schema\\PagesHealthCheck\\Domain', '\\ApiClients\\Client\\GitHub\\Schema\\PagesHealthCheck\\AltDomain' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pages🌀Health()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Repos\\CheckPrivateVulnerabilityReporting\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀PrivateVulnerabilityReporting()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\Repo\\License', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head\\User', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\Repo', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\Repo\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\Repo\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base\\User', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\Link', '\\ApiClients\\Client\\GitHub\\Schema\\AutoMerge' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Head', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Base', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequest\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\Link', '\\ApiClients\\Client\\GitHub\\Schema\\AutoMerge' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links\\Self_', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links\\Html', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewComment\\Links\\PullRequest' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls🌀Comments🌀CommentId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestMergeResult', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Pulls\\Merge\\Response\\ApplicationJson\\MethodNotAllowed\\Application\\Json', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Pulls\\Merge\\Response\\ApplicationJson\\Conflict\\Application\\Json' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls🌀PullNumber🌀Merge()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestReviewRequest', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple\\Head', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple\\Base', '\\ApiClients\\Client\\GitHub\\Schema\\PullRequestSimple\\Links' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Pulls🌀PullNumber🌀RequestedReviewers()->serializeObject($object), diff --git a/clients/GitHub/src/Schema/AliasAbstract/Tiet51848752/TietF5AFF89A/Tiet1BF2E786/Tiet3454ABD5.php b/clients/GitHub/src/Schema/AliasAbstract/Tiet51848752/TietF5AFF89A/Tiet1BF2E786/Tiet3454ABD5.php deleted file mode 100644 index d25f2b77319..00000000000 --- a/clients/GitHub/src/Schema/AliasAbstract/Tiet51848752/TietF5AFF89A/Tiet1BF2E786/Tiet3454ABD5.php +++ /dev/null @@ -1,146 +0,0 @@ -