|
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 = [];
|
@@ -3119,6 +3248,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
|
3119 | 3248 | 'ApiClients\Client\GitHubEnterprise\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SimpleUser($object),
|
3120 | 3249 | 'ApiClients\Client\GitHubEnterprise\Schema\Milestone' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Milestone($object),
|
3121 | 3250 | 'ApiClients\Client\GitHubEnterprise\Schema\Issue\PullRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Issue⚡️PullRequest($object),
|
| 3251 | + 'ApiClients\Client\GitHubEnterprise\Schema\IssueType' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType($object), |
3122 | 3252 | 'ApiClients\Client\GitHubEnterprise\Schema\Repository' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository($object),
|
3123 | 3253 | 'ApiClients\Client\GitHubEnterprise\Schema\LicenseSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️LicenseSimple($object),
|
3124 | 3254 | 'ApiClients\Client\GitHubEnterprise\Schema\Repository\Permissions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository⚡️Permissions($object),
|
@@ -3443,6 +3573,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
|
3443 | 3573 |
|
3444 | 3574 | after_timelineUrl: $result['timeline_url'] = $timelineUrl;
|
3445 | 3575 |
|
| 3576 | + $type = $object->type; |
| 3577 | + |
| 3578 | + if ($type === null) { |
| 3579 | + goto after_type; |
| 3580 | + } |
| 3581 | + |
| 3582 | + $type = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType($type); |
| 3583 | + after_type: $result['type'] = $type; |
| 3584 | + |
3446 | 3585 | $repository = $object->repository;
|
3447 | 3586 |
|
3448 | 3587 | if ($repository === null) {
|
@@ -3709,6 +3848,63 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
|
3709 | 3848 | return $result;
|
3710 | 3849 | }
|
3711 | 3850 |
|
| 3851 | + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️IssueType(mixed $object): mixed |
| 3852 | + { |
| 3853 | + assert($object instanceof IssueType); |
| 3854 | + $result = []; |
| 3855 | + |
| 3856 | + $id = $object->id; |
| 3857 | + after_id: $result['id'] = $id; |
| 3858 | + |
| 3859 | + $nodeId = $object->nodeId; |
| 3860 | + after_nodeId: $result['node_id'] = $nodeId; |
| 3861 | + |
| 3862 | + $name = $object->name; |
| 3863 | + after_name: $result['name'] = $name; |
| 3864 | + |
| 3865 | + $description = $object->description; |
| 3866 | + |
| 3867 | + if ($description === null) { |
| 3868 | + goto after_description; |
| 3869 | + } |
| 3870 | + |
| 3871 | + after_description: $result['description'] = $description; |
| 3872 | + |
| 3873 | + $color = $object->color; |
| 3874 | + |
| 3875 | + if ($color === null) { |
| 3876 | + goto after_color; |
| 3877 | + } |
| 3878 | + |
| 3879 | + after_color: $result['color'] = $color; |
| 3880 | + |
| 3881 | + $createdAt = $object->createdAt; |
| 3882 | + |
| 3883 | + if ($createdAt === null) { |
| 3884 | + goto after_createdAt; |
| 3885 | + } |
| 3886 | + |
| 3887 | + after_createdAt: $result['created_at'] = $createdAt; |
| 3888 | + |
| 3889 | + $updatedAt = $object->updatedAt; |
| 3890 | + |
| 3891 | + if ($updatedAt === null) { |
| 3892 | + goto after_updatedAt; |
| 3893 | + } |
| 3894 | + |
| 3895 | + after_updatedAt: $result['updated_at'] = $updatedAt; |
| 3896 | + |
| 3897 | + $isEnabled = $object->isEnabled; |
| 3898 | + |
| 3899 | + if ($isEnabled === null) { |
| 3900 | + goto after_isEnabled; |
| 3901 | + } |
| 3902 | + |
| 3903 | + after_isEnabled: $result['is_enabled'] = $isEnabled; |
| 3904 | + |
| 3905 | + return $result; |
| 3906 | + } |
| 3907 | + |
3712 | 3908 | private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Repository(mixed $object): mixed
|
3713 | 3909 | {
|
3714 | 3910 | assert($object instanceof Repository);
|
|
0 commit comments