|
7 | 7 | use ApiClients\Client\GitHub\Schema\BasicError;
|
8 | 8 | use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration;
|
9 | 9 | use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions;
|
| 10 | +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions; |
10 | 11 | use ApiClients\Client\GitHub\Schema\ScimError;
|
11 | 12 | use EventSauce\ObjectHydrator\IterableList;
|
12 | 13 | use EventSauce\ObjectHydrator\ObjectMapper;
|
@@ -45,6 +46,7 @@ public function hydrateObject(string $className, array $payload): object
|
45 | 46 | return match ($className) {
|
46 | 47 | 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload),
|
47 | 48 | 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload),
|
| 49 | + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($payload), |
48 | 50 | 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload),
|
49 | 51 | 'ApiClients\Client\GitHub\Schema\ScimError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ScimError($payload),
|
50 | 52 | default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
|
@@ -208,6 +210,37 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code
|
208 | 210 |
|
209 | 211 | after_secretScanningPushProtection:
|
210 | 212 |
|
| 213 | + $value = $payload['secret_scanning_delegated_bypass'] ?? null; |
| 214 | + |
| 215 | + if ($value === null) { |
| 216 | + $properties['secretScanningDelegatedBypass'] = null; |
| 217 | + goto after_secretScanningDelegatedBypass; |
| 218 | + } |
| 219 | + |
| 220 | + $properties['secretScanningDelegatedBypass'] = $value; |
| 221 | + |
| 222 | + after_secretScanningDelegatedBypass: |
| 223 | + |
| 224 | + $value = $payload['secret_scanning_delegated_bypass_options'] ?? null; |
| 225 | + |
| 226 | + if ($value === null) { |
| 227 | + $properties['secretScanningDelegatedBypassOptions'] = null; |
| 228 | + goto after_secretScanningDelegatedBypassOptions; |
| 229 | + } |
| 230 | + |
| 231 | + if (is_array($value)) { |
| 232 | + try { |
| 233 | + $this->hydrationStack[] = 'secretScanningDelegatedBypassOptions'; |
| 234 | + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($value); |
| 235 | + } finally { |
| 236 | + array_pop($this->hydrationStack); |
| 237 | + } |
| 238 | + } |
| 239 | + |
| 240 | + $properties['secretScanningDelegatedBypassOptions'] = $value; |
| 241 | + |
| 242 | + after_secretScanningDelegatedBypassOptions: |
| 243 | + |
211 | 244 | $value = $payload['secret_scanning_validity_checks'] ?? null;
|
212 | 245 |
|
213 | 246 | if ($value === null) {
|
@@ -340,6 +373,36 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code
|
340 | 373 | }
|
341 | 374 | }
|
342 | 375 |
|
| 376 | + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions |
| 377 | + { |
| 378 | + $properties = []; |
| 379 | + $missingFields = []; |
| 380 | + try { |
| 381 | + $value = $payload['reviewers'] ?? null; |
| 382 | + |
| 383 | + if ($value === null) { |
| 384 | + $properties['reviewers'] = null; |
| 385 | + goto after_reviewers; |
| 386 | + } |
| 387 | + |
| 388 | + $properties['reviewers'] = $value; |
| 389 | + |
| 390 | + after_reviewers: |
| 391 | + } catch (Throwable $exception) { |
| 392 | + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $exception, stack: $this->hydrationStack); |
| 393 | + } |
| 394 | + |
| 395 | + if (count($missingFields) > 0) { |
| 396 | + throw UnableToHydrateObject::dueToMissingFields(SecretScanningDelegatedBypassOptions::class, $missingFields, stack: $this->hydrationStack); |
| 397 | + } |
| 398 | + |
| 399 | + try { |
| 400 | + return new SecretScanningDelegatedBypassOptions(...$properties); |
| 401 | + } catch (Throwable $exception) { |
| 402 | + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $exception, stack: $this->hydrationStack); |
| 403 | + } |
| 404 | + } |
| 405 | + |
343 | 406 | private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError
|
344 | 407 | {
|
345 | 408 | $properties = [];
|
@@ -521,6 +584,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
|
521 | 584 | 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object),
|
522 | 585 | 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object),
|
523 | 586 | 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object),
|
| 587 | + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($object), |
524 | 588 | 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object),
|
525 | 589 | 'ApiClients\Client\GitHub\Schema\ScimError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ScimError($object),
|
526 | 590 | default => throw new LogicException("No serialization defined for $className"),
|
@@ -695,6 +759,23 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema
|
695 | 759 |
|
696 | 760 | after_secretScanningPushProtection: $result['secret_scanning_push_protection'] = $secretScanningPushProtection;
|
697 | 761 |
|
| 762 | + $secretScanningDelegatedBypass = $object->secretScanningDelegatedBypass; |
| 763 | + |
| 764 | + if ($secretScanningDelegatedBypass === null) { |
| 765 | + goto after_secretScanningDelegatedBypass; |
| 766 | + } |
| 767 | + |
| 768 | + after_secretScanningDelegatedBypass: $result['secret_scanning_delegated_bypass'] = $secretScanningDelegatedBypass; |
| 769 | + |
| 770 | + $secretScanningDelegatedBypassOptions = $object->secretScanningDelegatedBypassOptions; |
| 771 | + |
| 772 | + if ($secretScanningDelegatedBypassOptions === null) { |
| 773 | + goto after_secretScanningDelegatedBypassOptions; |
| 774 | + } |
| 775 | + |
| 776 | + $secretScanningDelegatedBypassOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($secretScanningDelegatedBypassOptions); |
| 777 | + after_secretScanningDelegatedBypassOptions: $result['secret_scanning_delegated_bypass_options'] = $secretScanningDelegatedBypassOptions; |
| 778 | + |
698 | 779 | $secretScanningValidityChecks = $object->secretScanningValidityChecks;
|
699 | 780 |
|
700 | 781 | if ($secretScanningValidityChecks === null) {
|
@@ -778,6 +859,29 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema
|
778 | 859 | return $result;
|
779 | 860 | }
|
780 | 861 |
|
| 862 | + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed |
| 863 | + { |
| 864 | + assert($object instanceof SecretScanningDelegatedBypassOptions); |
| 865 | + $result = []; |
| 866 | + |
| 867 | + $reviewers = $object->reviewers; |
| 868 | + |
| 869 | + if ($reviewers === null) { |
| 870 | + goto after_reviewers; |
| 871 | + } |
| 872 | + |
| 873 | + static $reviewersSerializer0; |
| 874 | + |
| 875 | + if ($reviewersSerializer0 === null) { |
| 876 | + $reviewersSerializer0 = new SerializeArrayItems(...[]); |
| 877 | + } |
| 878 | + |
| 879 | + $reviewers = $reviewersSerializer0->serialize($reviewers, $this); |
| 880 | + after_reviewers: $result['reviewers'] = $reviewers; |
| 881 | + |
| 882 | + return $result; |
| 883 | + } |
| 884 | + |
781 | 885 | private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed
|
782 | 886 | {
|
783 | 887 | assert($object instanceof BasicError);
|
|
0 commit comments