Skip to content

Commit 3eda01c

Browse files
authored
Merge pull request #1097 from php-api-clients/GitHubEnterpriseCloud/from-1.1.4-1e5665ad707a6042586f05a37e990074-from-1.1.4-1e5665ad707a6042586f05a37e990074
2 parents cad7b32 + 6e4f272 commit 3eda01c

File tree

22 files changed

+61
-364
lines changed

22 files changed

+61
-364
lines changed

clients/GitHubEnterpriseCloud/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19884,13 +19884,15 @@ Using the `call` method:
1988419884
$client->call('GET /repos/{owner}/{repo}/license', [
1988519885
'owner' => 'generated',
1988619886
'repo' => 'generated',
19887+
'ref' => 'generated',
1988719888
]);
1988819889
```
1988919890

1989019891
Operations method:
1989119892
```php
1989219893
$client->operations()->licenses()->getForRepo( owner: 'generated',
1989319894
repo: 'generated',
19895+
ref: 'generated',
1989419896
);
1989519897
```
1989619898

clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "aac9174d4a1dfe95ad6ff969d25fba1a",
2+
"specHash": "1e5665ad707a6042586f05a37e990074",
33
"generatedFiles": {
44
"files": [
55
{
@@ -6108,7 +6108,7 @@
61086108
},
61096109
{
61106110
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Billing.php",
6111-
"hash": "2f89f8f34c1648063bd254cf117621d1"
6111+
"hash": "e91380bc951c865dc3a281116a800760"
61126112
},
61136113
{
61146114
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Activity.php",
@@ -6128,7 +6128,7 @@
61286128
},
61296129
{
61306130
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Licenses.php",
6131-
"hash": "9385aea163849d89e9b238f8fccfd845"
6131+
"hash": "c91c673516a6e89c4a4b75f25baf68cb"
61326132
},
61336133
{
61346134
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Markdown.php",
@@ -15360,15 +15360,15 @@
1536015360
},
1536115361
{
1536215362
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Billing\/GetGithubAdvancedSecurityBillingGhe.php",
15363-
"hash": "e687408aa00deb30987b7c6c1e491238"
15363+
"hash": "7920a60cabcab10201ceb36ce3501139"
1536415364
},
1536515365
{
1536615366
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Billing\/GetGithubAdvancedSecurityBillingGhe.php",
15367-
"hash": "02331c54e823011bef21436d174dad60"
15367+
"hash": "ab92036517688f8cb6552d59e6ce0ca5"
1536815368
},
1536915369
{
1537015370
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Billing\/GetGithubAdvancedSecurityBillingGheTest.php",
15371-
"hash": "9f8be1fcc7d1e17c0e45c87be8b1267f"
15371+
"hash": "ca763b878e7b47c63091233de3971bbf"
1537215372
},
1537315373
{
1537415374
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Billing\/GetGithubPackagesBillingGhe.php",
@@ -18580,15 +18580,15 @@
1858018580
},
1858118581
{
1858218582
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Billing\/GetGithubAdvancedSecurityBillingOrg.php",
18583-
"hash": "b7e4932d89213f0aba7a76b64c345fe0"
18583+
"hash": "3c77a5c5ba9ea28b20fdea0458f40aac"
1858418584
},
1858518585
{
1858618586
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Billing\/GetGithubAdvancedSecurityBillingOrg.php",
18587-
"hash": "5dac03411cf1ef6e5768442275553a51"
18587+
"hash": "95e7bab4123b6f1b2db78ec0cc89fdf6"
1858818588
},
1858918589
{
1859018590
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Billing\/GetGithubAdvancedSecurityBillingOrgTest.php",
18591-
"hash": "46773005bedb29a91906f60620ee0617"
18591+
"hash": "f767192d429119efbf2c924c7bc94878"
1859218592
},
1859318593
{
1859418594
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Billing\/GetGithubPackagesBillingOrg.php",
@@ -23344,15 +23344,15 @@
2334423344
},
2334523345
{
2334623346
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Licenses\/GetForRepo.php",
23347-
"hash": "7d31437aed451471be02fc85f3fde9b7"
23347+
"hash": "93a6ae4fa636397cc9d024bf26dbfa55"
2334823348
},
2334923349
{
2335023350
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Licenses\/GetForRepo.php",
23351-
"hash": "0c3e60fa607def8277b54beea4e5a9f8"
23351+
"hash": "2c68cb8a1a6c3cce4fc62a5300e6b0bc"
2335223352
},
2335323353
{
2335423354
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Licenses\/GetForRepoTest.php",
23355-
"hash": "01027afc315db445374421f32e8d74fd"
23355+
"hash": "fe6634b9b088098191347643f0470979"
2335623356
},
2335723357
{
2335823358
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/MergeUpstream.php",
@@ -27976,7 +27976,7 @@
2797627976
},
2797727977
{
2797827978
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Licenses.php",
27979-
"hash": "84d1551035880d6c271cb3b5159d5e0f"
27979+
"hash": "10865bbe8258479c98088f638b926698"
2798027980
},
2798127981
{
2798227982
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php",
@@ -28060,7 +28060,7 @@
2806028060
},
2806128061
{
2806228062
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Billing.php",
28063-
"hash": "6cd51d86132d2ced5d1933abcaec00c7"
28063+
"hash": "01b4be6122ab9bbf671277f314bc0e15"
2806428064
},
2806528065
{
2806628066
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Checks.php",
@@ -28540,11 +28540,11 @@
2854028540
},
2854128541
{
2854228542
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
28543-
"hash": "da8afc25858bf9ab936a233e4966b47d"
28543+
"hash": "7e7bcc82043b5c52eaebd9a2d486a540"
2854428544
},
2854528545
{
2854628546
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
28547-
"hash": "0c73fff643784943f9f446280775e530"
28547+
"hash": "2358a6a72bd04f4f9cc72d6bea0acaff"
2854828548
},
2854928549
{
2855028550
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
@@ -28916,7 +28916,7 @@
2891628916
},
2891728917
{
2891828918
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Settings\/Billing\/AdvancedSecurity.php",
28919-
"hash": "96bae146f68db214898b2ea6d0c0d53c"
28919+
"hash": "994a9b2ee536818ba9a0596c9b29bc2a"
2892028920
},
2892128921
{
2892228922
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Settings\/Billing\/Packages.php",
@@ -29452,7 +29452,7 @@
2945229452
},
2945329453
{
2945429454
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Settings\/Billing\/AdvancedSecurity.php",
29455-
"hash": "8b32fcd1ad48b8d2a566ab2ea57ba638"
29455+
"hash": "54b27ae9b526ab01671683bafb9bd7e3"
2945629456
},
2945729457
{
2945829458
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Settings\/Billing\/Packages.php",
@@ -31808,11 +31808,11 @@
3180831808
},
3180931809
{
3181031810
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
31811-
"hash": "8d4c6bba384c321e1c471455261dea31"
31811+
"hash": "58a31640d7fa36c36e142e66de63bd3a"
3181231812
},
3181331813
{
3181431814
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
31815-
"hash": "6fd5cfe80262fa8052a8d91247518f70"
31815+
"hash": "144bd72a7bb6590d5c286235d34fa779"
3181631816
},
3181731817
{
3181831818
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",

clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Settings/Billing/AdvancedSecurity.php

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Hydrator\Operation\Enterprises\Enterprise\Settings\Billing;
66

77
use ApiClients\Client\GitHubEnterpriseCloud\Schema\AdvancedSecurityActiveCommitters;
8-
use ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError;
98
use EventSauce\ObjectHydrator\IterableList;
109
use EventSauce\ObjectHydrator\ObjectMapper;
1110
use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems;
@@ -40,7 +39,6 @@ public function hydrateObject(string $className, array $payload): object
4039
{
4140
return match ($className) {
4241
'ApiClients\Client\GitHubEnterpriseCloud\Schema\AdvancedSecurityActiveCommitters' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️AdvancedSecurityActiveCommitters($payload),
43-
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload),
4442
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
4543
};
4644
}
@@ -119,69 +117,6 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
119117
}
120118
}
121119

122-
private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(array $payload): BasicError
123-
{
124-
$properties = [];
125-
$missingFields = [];
126-
try {
127-
$value = $payload['message'] ?? null;
128-
129-
if ($value === null) {
130-
$properties['message'] = null;
131-
goto after_message;
132-
}
133-
134-
$properties['message'] = $value;
135-
136-
after_message:
137-
138-
$value = $payload['documentation_url'] ?? null;
139-
140-
if ($value === null) {
141-
$properties['documentationUrl'] = null;
142-
goto after_documentationUrl;
143-
}
144-
145-
$properties['documentationUrl'] = $value;
146-
147-
after_documentationUrl:
148-
149-
$value = $payload['url'] ?? null;
150-
151-
if ($value === null) {
152-
$properties['url'] = null;
153-
goto after_url;
154-
}
155-
156-
$properties['url'] = $value;
157-
158-
after_url:
159-
160-
$value = $payload['status'] ?? null;
161-
162-
if ($value === null) {
163-
$properties['status'] = null;
164-
goto after_status;
165-
}
166-
167-
$properties['status'] = $value;
168-
169-
after_status:
170-
} catch (Throwable $exception) {
171-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack);
172-
}
173-
174-
if (count($missingFields) > 0) {
175-
throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack);
176-
}
177-
178-
try {
179-
return new BasicError(...$properties);
180-
} catch (Throwable $exception) {
181-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack);
182-
}
183-
}
184-
185120
private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array
186121
{
187122
foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) {
@@ -214,7 +149,6 @@ public function serializeObjectOfType(object $object, string $className): mixed
214149
'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object),
215150
'DateTimeInterface' => $this->serializeValueDateTimeInterface($object),
216151
'ApiClients\Client\GitHubEnterpriseCloud\Schema\AdvancedSecurityActiveCommitters' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️AdvancedSecurityActiveCommitters($object),
217-
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object),
218152
default => throw new LogicException('No serialization defined for $className'),
219153
};
220154
} catch (Throwable $exception) {
@@ -327,46 +261,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
327261
return $result;
328262
}
329263

330-
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(mixed $object): mixed
331-
{
332-
assert($object instanceof BasicError);
333-
$result = [];
334-
335-
$message = $object->message;
336-
337-
if ($message === null) {
338-
goto after_message;
339-
}
340-
341-
after_message: $result['message'] = $message;
342-
343-
$documentationUrl = $object->documentationUrl;
344-
345-
if ($documentationUrl === null) {
346-
goto after_documentationUrl;
347-
}
348-
349-
after_documentationUrl: $result['documentation_url'] = $documentationUrl;
350-
351-
$url = $object->url;
352-
353-
if ($url === null) {
354-
goto after_url;
355-
}
356-
357-
after_url: $result['url'] = $url;
358-
359-
$status = $object->status;
360-
361-
if ($status === null) {
362-
goto after_status;
363-
}
364-
365-
after_status: $result['status'] = $status;
366-
367-
return $result;
368-
}
369-
370264
/**
371265
* @param class-string<T> $className
372266
* @param iterable<array> $payloads;

0 commit comments

Comments
 (0)