|
9 | 9 | use ApiClients\Client\GitHubEnterprise\Schema\Integration;
|
10 | 10 | use ApiClients\Client\GitHubEnterprise\Schema\Issue;
|
11 | 11 | use ApiClients\Client\GitHubEnterprise\Schema\Issue\PullRequest;
|
| 12 | +use ApiClients\Client\GitHubEnterprise\Schema\IssueType; |
12 | 13 | use ApiClients\Client\GitHubEnterprise\Schema\LicenseSimple;
|
13 | 14 | use ApiClients\Client\GitHubEnterprise\Schema\Milestone;
|
14 | 15 | use ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable;
|
@@ -60,6 +61,7 @@ public function hydrateObject(string $className, array $payload): object
|
60 | 61 | 'ApiClients\Client\GitHubEnterprise\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SimpleUser($payload),
|
61 | 62 | 'ApiClients\Client\GitHubEnterprise\Schema\Milestone' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Milestone($payload),
|
62 | 63 | 'ApiClients\Client\GitHubEnterprise\Schema\Issue\PullRequest' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Issue⚡️PullRequest($payload),
|
| 64 | + 'ApiClients\Client\GitHubEnterprise\Schema\IssueType' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType($payload), |
63 | 65 | 'ApiClients\Client\GitHubEnterprise\Schema\Repository' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository($payload),
|
64 | 66 | 'ApiClients\Client\GitHubEnterprise\Schema\LicenseSimple' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️LicenseSimple($payload),
|
65 | 67 | 'ApiClients\Client\GitHubEnterprise\Schema\Repository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository⚡️Permissions($payload),
|
@@ -568,6 +570,26 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
|
568 | 570 |
|
569 | 571 | after_timelineUrl:
|
570 | 572 |
|
| 573 | + $value = $payload['type'] ?? null; |
| 574 | + |
| 575 | + if ($value === null) { |
| 576 | + $properties['type'] = null; |
| 577 | + goto after_type; |
| 578 | + } |
| 579 | + |
| 580 | + if (is_array($value)) { |
| 581 | + try { |
| 582 | + $this->hydrationStack[] = 'type'; |
| 583 | + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType($value); |
| 584 | + } finally { |
| 585 | + array_pop($this->hydrationStack); |
| 586 | + } |
| 587 | + } |
| 588 | + |
| 589 | + $properties['type'] = $value; |
| 590 | + |
| 591 | + after_type: |
| 592 | + |
571 | 593 | $value = $payload['repository'] ?? null;
|
572 | 594 |
|
573 | 595 | if ($value === null) {
|
@@ -1212,6 +1234,113 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
|
1212 | 1234 | }
|
1213 | 1235 | }
|
1214 | 1236 |
|
| 1237 | + private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType(array $payload): IssueType |
| 1238 | + { |
| 1239 | + $properties = []; |
| 1240 | + $missingFields = []; |
| 1241 | + try { |
| 1242 | + $value = $payload['id'] ?? null; |
| 1243 | + |
| 1244 | + if ($value === null) { |
| 1245 | + $missingFields[] = 'id'; |
| 1246 | + goto after_id; |
| 1247 | + } |
| 1248 | + |
| 1249 | + $properties['id'] = $value; |
| 1250 | + |
| 1251 | + after_id: |
| 1252 | + |
| 1253 | + $value = $payload['node_id'] ?? null; |
| 1254 | + |
| 1255 | + if ($value === null) { |
| 1256 | + $missingFields[] = 'node_id'; |
| 1257 | + goto after_nodeId; |
| 1258 | + } |
| 1259 | + |
| 1260 | + $properties['nodeId'] = $value; |
| 1261 | + |
| 1262 | + after_nodeId: |
| 1263 | + |
| 1264 | + $value = $payload['name'] ?? null; |
| 1265 | + |
| 1266 | + if ($value === null) { |
| 1267 | + $missingFields[] = 'name'; |
| 1268 | + goto after_name; |
| 1269 | + } |
| 1270 | + |
| 1271 | + $properties['name'] = $value; |
| 1272 | + |
| 1273 | + after_name: |
| 1274 | + |
| 1275 | + $value = $payload['description'] ?? null; |
| 1276 | + |
| 1277 | + if ($value === null) { |
| 1278 | + $properties['description'] = null; |
| 1279 | + goto after_description; |
| 1280 | + } |
| 1281 | + |
| 1282 | + $properties['description'] = $value; |
| 1283 | + |
| 1284 | + after_description: |
| 1285 | + |
| 1286 | + $value = $payload['color'] ?? null; |
| 1287 | + |
| 1288 | + if ($value === null) { |
| 1289 | + $properties['color'] = null; |
| 1290 | + goto after_color; |
| 1291 | + } |
| 1292 | + |
| 1293 | + $properties['color'] = $value; |
| 1294 | + |
| 1295 | + after_color: |
| 1296 | + |
| 1297 | + $value = $payload['created_at'] ?? null; |
| 1298 | + |
| 1299 | + if ($value === null) { |
| 1300 | + $properties['createdAt'] = null; |
| 1301 | + goto after_createdAt; |
| 1302 | + } |
| 1303 | + |
| 1304 | + $properties['createdAt'] = $value; |
| 1305 | + |
| 1306 | + after_createdAt: |
| 1307 | + |
| 1308 | + $value = $payload['updated_at'] ?? null; |
| 1309 | + |
| 1310 | + if ($value === null) { |
| 1311 | + $properties['updatedAt'] = null; |
| 1312 | + goto after_updatedAt; |
| 1313 | + } |
| 1314 | + |
| 1315 | + $properties['updatedAt'] = $value; |
| 1316 | + |
| 1317 | + after_updatedAt: |
| 1318 | + |
| 1319 | + $value = $payload['is_enabled'] ?? null; |
| 1320 | + |
| 1321 | + if ($value === null) { |
| 1322 | + $properties['isEnabled'] = null; |
| 1323 | + goto after_isEnabled; |
| 1324 | + } |
| 1325 | + |
| 1326 | + $properties['isEnabled'] = $value; |
| 1327 | + |
| 1328 | + after_isEnabled: |
| 1329 | + } catch (Throwable $exception) { |
| 1330 | + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\IssueType', $exception, stack: $this->hydrationStack); |
| 1331 | + } |
| 1332 | + |
| 1333 | + if (count($missingFields) > 0) { |
| 1334 | + throw UnableToHydrateObject::dueToMissingFields(IssueType::class, $missingFields, stack: $this->hydrationStack); |
| 1335 | + } |
| 1336 | + |
| 1337 | + try { |
| 1338 | + return new IssueType(...$properties); |
| 1339 | + } catch (Throwable $exception) { |
| 1340 | + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\IssueType', $exception, stack: $this->hydrationStack); |
| 1341 | + } |
| 1342 | + } |
| 1343 | + |
1215 | 1344 | private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository(array $payload): Repository
|
1216 | 1345 | {
|
1217 | 1346 | $properties = [];
|
@@ -3108,6 +3237,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
|
3108 | 3237 | 'ApiClients\Client\GitHubEnterprise\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SimpleUser($object),
|
3109 | 3238 | 'ApiClients\Client\GitHubEnterprise\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Milestone($object),
|
3110 | 3239 | 'ApiClients\Client\GitHubEnterprise\Schema\Issue\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Issue⚡️PullRequest($object),
|
| 3240 | + 'ApiClients\Client\GitHubEnterprise\Schema\IssueType' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType($object), |
3111 | 3241 | 'ApiClients\Client\GitHubEnterprise\Schema\Repository' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository($object),
|
3112 | 3242 | 'ApiClients\Client\GitHubEnterprise\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️LicenseSimple($object),
|
3113 | 3243 | 'ApiClients\Client\GitHubEnterprise\Schema\Repository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository⚡️Permissions($object),
|
@@ -3432,6 +3562,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
|
3432 | 3562 |
|
3433 | 3563 | after_timelineUrl: $result['timeline_url'] = $timelineUrl;
|
3434 | 3564 |
|
| 3565 | + $type = $object->type; |
| 3566 | + |
| 3567 | + if ($type === null) { |
| 3568 | + goto after_type; |
| 3569 | + } |
| 3570 | + |
| 3571 | + $type = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType($type); |
| 3572 | + after_type: $result['type'] = $type; |
| 3573 | + |
3435 | 3574 | $repository = $object->repository;
|
3436 | 3575 |
|
3437 | 3576 | if ($repository === null) {
|
@@ -3698,6 +3837,63 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
|
3698 | 3837 | return $result;
|
3699 | 3838 | }
|
3700 | 3839 |
|
| 3840 | + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType(mixed $object): mixed |
| 3841 | + { |
| 3842 | + assert($object instanceof IssueType); |
| 3843 | + $result = []; |
| 3844 | + |
| 3845 | + $id = $object->id; |
| 3846 | + after_id: $result['id'] = $id; |
| 3847 | + |
| 3848 | + $nodeId = $object->nodeId; |
| 3849 | + after_nodeId: $result['node_id'] = $nodeId; |
| 3850 | + |
| 3851 | + $name = $object->name; |
| 3852 | + after_name: $result['name'] = $name; |
| 3853 | + |
| 3854 | + $description = $object->description; |
| 3855 | + |
| 3856 | + if ($description === null) { |
| 3857 | + goto after_description; |
| 3858 | + } |
| 3859 | + |
| 3860 | + after_description: $result['description'] = $description; |
| 3861 | + |
| 3862 | + $color = $object->color; |
| 3863 | + |
| 3864 | + if ($color === null) { |
| 3865 | + goto after_color; |
| 3866 | + } |
| 3867 | + |
| 3868 | + after_color: $result['color'] = $color; |
| 3869 | + |
| 3870 | + $createdAt = $object->createdAt; |
| 3871 | + |
| 3872 | + if ($createdAt === null) { |
| 3873 | + goto after_createdAt; |
| 3874 | + } |
| 3875 | + |
| 3876 | + after_createdAt: $result['created_at'] = $createdAt; |
| 3877 | + |
| 3878 | + $updatedAt = $object->updatedAt; |
| 3879 | + |
| 3880 | + if ($updatedAt === null) { |
| 3881 | + goto after_updatedAt; |
| 3882 | + } |
| 3883 | + |
| 3884 | + after_updatedAt: $result['updated_at'] = $updatedAt; |
| 3885 | + |
| 3886 | + $isEnabled = $object->isEnabled; |
| 3887 | + |
| 3888 | + if ($isEnabled === null) { |
| 3889 | + goto after_isEnabled; |
| 3890 | + } |
| 3891 | + |
| 3892 | + after_isEnabled: $result['is_enabled'] = $isEnabled; |
| 3893 | + |
| 3894 | + return $result; |
| 3895 | + } |
| 3896 | + |
3701 | 3897 | private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository(mixed $object): mixed
|
3702 | 3898 | {
|
3703 | 3899 | assert($object instanceof Repository);
|
|
0 commit comments