diff --git a/clients/GitHub/README.md b/clients/GitHub/README.md index 27acfcd3c1a..fba2ad98904 100644 --- a/clients/GitHub/README.md +++ b/clients/GitHub/README.md @@ -5583,6 +5583,7 @@ $client->call('GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}' 'min_timestamp' => 'generated', 'max_timestamp' => 'generated', 'sort' => , + 'api_route_substring' => 'generated', 'page' => 1, 'per_page' => 8, 'direction' => 'generated', @@ -5597,6 +5598,7 @@ $client->operations()->apiInsights()->getRouteStatsByActor( org: 'generat min_timestamp: 'generated', max_timestamp: 'generated', sort: , + api_route_substring: 'generated', page: 1, per_page: 8, direction: 'generated', @@ -5619,6 +5621,7 @@ $client->call('LIST /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id} 'min_timestamp' => 'generated', 'max_timestamp' => 'generated', 'sort' => , + 'api_route_substring' => 'generated', 'page' => 1, 'per_page' => 8, 'direction' => 'generated', @@ -5633,6 +5636,7 @@ $client->operations()->apiInsights()->getRouteStatsByActorListing( org: ' min_timestamp: 'generated', max_timestamp: 'generated', sort: , + api_route_substring: 'generated', page: 1, per_page: 8, direction: 'generated', @@ -5653,6 +5657,7 @@ $client->call('GET /orgs/{org}/insights/api/subject-stats', [ 'min_timestamp' => 'generated', 'max_timestamp' => 'generated', 'sort' => , + 'subject_name_substring' => 'generated', 'page' => 1, 'per_page' => 8, 'direction' => 'generated', @@ -5665,6 +5670,7 @@ $client->operations()->apiInsights()->getSubjectStats( org: 'generated', min_timestamp: 'generated', max_timestamp: 'generated', sort: , + subject_name_substring: 'generated', page: 1, per_page: 8, direction: 'generated', @@ -5685,6 +5691,7 @@ $client->call('LIST /orgs/{org}/insights/api/subject-stats', [ 'min_timestamp' => 'generated', 'max_timestamp' => 'generated', 'sort' => , + 'subject_name_substring' => 'generated', 'page' => 1, 'per_page' => 8, 'direction' => 'generated', @@ -5697,6 +5704,7 @@ $client->operations()->apiInsights()->getSubjectStatsListing( org: 'gener min_timestamp: 'generated', max_timestamp: 'generated', sort: , + subject_name_substring: 'generated', page: 1, per_page: 8, direction: 'generated', @@ -5880,6 +5888,7 @@ $client->call('GET /orgs/{org}/insights/api/user-stats/{user_id}', [ 'min_timestamp' => 'generated', 'max_timestamp' => 'generated', 'sort' => , + 'actor_name_substring' => 'generated', 'page' => 1, 'per_page' => 8, 'direction' => 'generated', @@ -5893,6 +5902,7 @@ $client->operations()->apiInsights()->getUserStats( org: 'generated', min_timestamp: 'generated', max_timestamp: 'generated', sort: , + actor_name_substring: 'generated', page: 1, per_page: 8, direction: 'generated', @@ -5914,6 +5924,7 @@ $client->call('LIST /orgs/{org}/insights/api/user-stats/{user_id}', [ 'min_timestamp' => 'generated', 'max_timestamp' => 'generated', 'sort' => , + 'actor_name_substring' => 'generated', 'page' => 1, 'per_page' => 8, 'direction' => 'generated', @@ -5927,6 +5938,7 @@ $client->operations()->apiInsights()->getUserStatsListing( org: 'generate min_timestamp: 'generated', max_timestamp: 'generated', sort: , + actor_name_substring: 'generated', page: 1, per_page: 8, direction: 'generated', diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index ab6fb62aaab..117fa6b10ba 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "c22e4288a9c6ed5c4a6a2c04770f2d22", + "specHash": "893e2fb0b8fad9258f8b3396ebcda9b9", "generatedFiles": { "files": [ { @@ -896,7 +896,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningDefaultSetupUpdate.php", - "hash": "56495c66553d2fa6fa691a0b0b5f5f50" + "hash": "8598567d9a3c577bf15eabd1686f592a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningDefaultSetupUpdateResponse.php", @@ -24856,15 +24856,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "2efc037dceec2d934880567dac3d5fdb" + "hash": "fe4eb4bfcd96dfe133a348a5dbe06d33" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "b1ab36693fa5c4c60f402c9e0349b1fd" + "hash": "fba5bdfe2785c25d285ab05bafa48c0b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", - "hash": "3dca95be52846097223409b2f9926606" + "hash": "29247474ad451462da498194f867b3df" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Nine.php", @@ -24960,15 +24960,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "71625fca086e278619781593e380e8fb" + "hash": "9812269e81564353be3fc1d6da6f2fba" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", - "hash": "81326c9e0e34933f9df6d7e397ac8782" + "hash": "0ca46583c79954781dc0988a5669ab0d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Eight.php", - "hash": "9aca9c730a1e32ff37bb817fb1db5454" + "hash": "50b0aae5cf5d664d36f0080f508b4ac2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Ten.php", @@ -27052,7 +27052,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "79dba7a8edc842d649a369ef04e742e9" + "hash": "83972c993a5555d60bc5d5fd44ecdc4b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27636,11 +27636,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "526aac10512dc0d92689f985b41922b4" + "hash": "7a0cf9690dc301be83a1f5eb1001a5f7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "e92ed3755800eb5eccdcb78430551361" + "hash": "369433cd266ad8428bdbe179d75b18c5" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -29588,11 +29588,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfiguration.php", - "hash": "1e8941d9a169c1c3b0d772423f39fa1d" + "hash": "b209f9beffe93fe386d862737a20e208" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityDefaultConfigurations.php", - "hash": "c57aec34cb3b94d8b019d3541e0c287b" + "hash": "36d1be537f4518f64d877b8e04d34ed4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfigurationRepositories.php", @@ -29624,11 +29624,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/CreateConfiguration\/Request\/ApplicationJson.php", - "hash": "42f6c69b019e9a18c164383d79fea873" + "hash": "6702f78493d195557f877ac3e0c507b8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/UpdateConfiguration\/Request\/ApplicationJson.php", - "hash": "3f80abeb5e1513836a8ce5e7f912dfa5" + "hash": "bcd4c1473af1625f6b107fbf0a31198d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/AttachConfiguration\/Request\/ApplicationJson.php", @@ -29640,7 +29640,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/SetConfigurationAsDefault\/Response\/ApplicationJson\/Ok.php", - "hash": "3b610e67cf3cb21cfd478043df62e64a" + "hash": "703585c95188715c4f2d358b90c2cd40" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeSecurity.php", @@ -29668,7 +29668,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations.php", - "hash": "d2d539fe1058247544b6c6d92d90582c" + "hash": "423933ad34ce803942cf62a1b3fa1c52" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/Defaults.php", @@ -29676,7 +29676,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId.php", - "hash": "049b8c3bce4921a51a42974dab1723ae" + "hash": "d0372d20b92ef6065ce9ad91a58a2362" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Attach.php", @@ -29684,7 +29684,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Defaults.php", - "hash": "556e05cb7532b9a4835f4851bd6dcb1f" + "hash": "2f76d4e528093653157c68775f2c18e9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Repositories.php", @@ -30136,11 +30136,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfigurationForRepository.php", - "hash": "c0db4a4962e14c2c1f743c22a7e3cf58" + "hash": "2070ab70b26bbd22f0534f995fe3f621" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeSecurityConfiguration.php", - "hash": "79df6defbc4f6864e79fbdaec9e3fe24" + "hash": "ea01c4d7d7db0f85baffa452aaa134e4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleViolationError.php", @@ -30796,11 +30796,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/ApiInsights\/GetRouteStatsByActor.php", - "hash": "180ee5c12a7f7a4f58763309c25cc523" + "hash": "06343ca2fc4eb61c2c54014e91e57c01" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetRouteStatsByActor.php", - "hash": "9cd55e081f90294fa66bedc3a8e624af" + "hash": "9e2110c42f7f0dcfcf28ebf3ee9c72c9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetRouteStatsByActorTest.php", @@ -30808,11 +30808,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/ApiInsights\/GetRouteStatsByActorListing.php", - "hash": "9396ce173025dfabfc9957603fde165b" + "hash": "06c033ceb6ec931ddd85d2d53731fe58" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetRouteStatsByActorListing.php", - "hash": "e55c6f8caeed3455d0e65d784742a9c2" + "hash": "e9e573713799aaedbc78b21f1b23a341" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetRouteStatsByActorListingTest.php", @@ -30820,11 +30820,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/ApiInsights\/GetSubjectStats.php", - "hash": "ade4b32266e961bfa9bf623c9647dcc8" + "hash": "e0a3963aa76eb09948a71658c19fe437" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetSubjectStats.php", - "hash": "8f82f7bbdbd9c4d1c2c301f6b0f2fbe3" + "hash": "45b29e075ca7417d41606fe7b183dcad" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetSubjectStatsTest.php", @@ -30832,11 +30832,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/ApiInsights\/GetSubjectStatsListing.php", - "hash": "5ce0f66c46b508f861d426f460dfc602" + "hash": "9ab4615d22310058c9037cd396fc4f20" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetSubjectStatsListing.php", - "hash": "6e215466323d2e9913c6d1edcc43a819" + "hash": "097c6950b99b971f07bf4f85cf66278b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetSubjectStatsListingTest.php", @@ -30916,11 +30916,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/ApiInsights\/GetUserStats.php", - "hash": "e20039dc37837e21bb0ae2a34e998ef6" + "hash": "a312bdc3712dac427a97f4d7946122a5" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetUserStats.php", - "hash": "34e57c1778587180890c7817c1777d33" + "hash": "1e53ba9026d0cbdc5d64b7392e3961fe" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetUserStatsTest.php", @@ -30928,11 +30928,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/ApiInsights\/GetUserStatsListing.php", - "hash": "1de972d403fbbe654d6e4188f30d57a9" + "hash": "109a5236749f249b4745c6f85a60cd9e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/ApiInsights\/GetUserStatsListing.php", - "hash": "a677f87cb5586815f71bb7e6ca33531a" + "hash": "134f79396a0f58e5142f68d7747a8d0b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/ApiInsights\/GetUserStatsListingTest.php", @@ -30960,15 +30960,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/ApiInsights.php", - "hash": "6d5a962542daa2df7d7260c85a7a2d13" + "hash": "695f87d3736571d2ed30c489e5efd8d8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/ApiInsights.php", - "hash": "23a52212777a55d49faa33c1cbf8932e" + "hash": "c0390ef48a0c990baf7937e77b2c6102" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/ApiInsights.php", - "hash": "ac590892e3050454bca47ddcecd45298" + "hash": "dee9bddcbeb31b6a4083a80364816562" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Insights\/Api\/SummaryStats.php", @@ -31028,11 +31028,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanningScan.php", - "hash": "a094f8c62b842c76d108d9f2fb8acfda" + "hash": "baf113add8a1512cfbd2f11ce8c532e3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanningScanHistory.php", - "hash": "c0fdaa06def547b0224599d74dd5c3f8" + "hash": "3eb984c576608ac8d786d2dcfd8af216" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietE746E247\/Tiet29FCA330\/Tiet8C6E229F\/TietB9C53521.php", @@ -31213,6 +31213,14 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Issues\/IssueNumber\/SubIssues\/Priority.php", "hash": "8f937489bfbe5b1a84bcfd618c6d9d21" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningDefaultSetupOptions.php", + "hash": "13332c471733d464620f46059f8f76a0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfiguration\/CodeScanningDefaultSetupOptions.php", + "hash": "878f417b0d2b7dfad71bf07e4bd5e095" } ] }, diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php index 7d0fb259f49..f6e8a7aca66 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration; +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions; use EventSauce\ObjectHydrator\IterableList; @@ -46,6 +47,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; @@ -249,6 +251,26 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code after_codeScanningDefaultSetup: + $value = $payload['code_scanning_default_setup_options'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetupOptions'] = null; + goto after_codeScanningDefaultSetupOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeScanningDefaultSetupOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['codeScanningDefaultSetupOptions'] = $value; + + after_codeScanningDefaultSetupOptions: + $value = $payload['secret_scanning'] ?? null; if ($value === null) { @@ -434,6 +456,47 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(array $payload): CodeScanningDefaultSetupOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['runner_type'] ?? null; + + if ($value === null) { + $properties['runnerType'] = null; + goto after_runnerType; + } + + $properties['runnerType'] = $value; + + after_runnerType: + + $value = $payload['runner_label'] ?? null; + + if ($value === null) { + $properties['runnerLabel'] = null; + goto after_runnerLabel; + } + + $properties['runnerLabel'] = $value; + + after_runnerLabel: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningDefaultSetupOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningDefaultSetupOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions { $properties = []; @@ -498,6 +561,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($object), default => throw new LogicException("No serialization defined for $className"), }; @@ -695,6 +759,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_codeScanningDefaultSetup: $result['code_scanning_default_setup'] = $codeScanningDefaultSetup; + $codeScanningDefaultSetupOptions = $object->codeScanningDefaultSetupOptions; + + if ($codeScanningDefaultSetupOptions === null) { + goto after_codeScanningDefaultSetupOptions; + } + + $codeScanningDefaultSetupOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($codeScanningDefaultSetupOptions); + after_codeScanningDefaultSetupOptions: $result['code_scanning_default_setup_options'] = $codeScanningDefaultSetupOptions; + $secretScanning = $object->secretScanning; if ($secretScanning === null) { @@ -811,6 +884,30 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(mixed $object): mixed + { + assert($object instanceof CodeScanningDefaultSetupOptions); + $result = []; + + $runnerType = $object->runnerType; + + if ($runnerType === null) { + goto after_runnerType; + } + + after_runnerType: $result['runner_type'] = $runnerType; + + $runnerLabel = $object->runnerLabel; + + if ($runnerLabel === null) { + goto after_runnerLabel; + } + + after_runnerLabel: $result['runner_label'] = $runnerLabel; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed { assert($object instanceof SecretScanningDelegatedBypassOptions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php index 3c78d544a66..4e622a990a5 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration; +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions; use ApiClients\Client\GitHub\Schema\ScimError; @@ -46,6 +47,7 @@ public function hydrateObject(string $className, array $payload): object return match ($className) { 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHub\Schema\ScimError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ScimError($payload), @@ -188,6 +190,26 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code after_codeScanningDefaultSetup: + $value = $payload['code_scanning_default_setup_options'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetupOptions'] = null; + goto after_codeScanningDefaultSetupOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeScanningDefaultSetupOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['codeScanningDefaultSetupOptions'] = $value; + + after_codeScanningDefaultSetupOptions: + $value = $payload['secret_scanning'] ?? null; if ($value === null) { @@ -373,6 +395,47 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(array $payload): CodeScanningDefaultSetupOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['runner_type'] ?? null; + + if ($value === null) { + $properties['runnerType'] = null; + goto after_runnerType; + } + + $properties['runnerType'] = $value; + + after_runnerType: + + $value = $payload['runner_label'] ?? null; + + if ($value === null) { + $properties['runnerLabel'] = null; + goto after_runnerLabel; + } + + $properties['runnerLabel'] = $value; + + after_runnerLabel: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningDefaultSetupOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningDefaultSetupOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions { $properties = []; @@ -584,6 +647,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), 'ApiClients\Client\GitHub\Schema\ScimError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ScimError($object), @@ -743,6 +807,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_codeScanningDefaultSetup: $result['code_scanning_default_setup'] = $codeScanningDefaultSetup; + $codeScanningDefaultSetupOptions = $object->codeScanningDefaultSetupOptions; + + if ($codeScanningDefaultSetupOptions === null) { + goto after_codeScanningDefaultSetupOptions; + } + + $codeScanningDefaultSetupOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($codeScanningDefaultSetupOptions); + after_codeScanningDefaultSetupOptions: $result['code_scanning_default_setup_options'] = $codeScanningDefaultSetupOptions; + $secretScanning = $object->secretScanning; if ($secretScanning === null) { @@ -859,6 +932,30 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(mixed $object): mixed + { + assert($object instanceof CodeScanningDefaultSetupOptions); + $result = []; + + $runnerType = $object->runnerType; + + if ($runnerType === null) { + goto after_runnerType; + } + + after_runnerType: $result['runner_type'] = $runnerType; + + $runnerLabel = $object->runnerLabel; + + if ($runnerLabel === null) { + goto after_runnerLabel; + } + + after_runnerLabel: $result['runner_label'] = $runnerLabel; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed { assert($object instanceof SecretScanningDelegatedBypassOptions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php index ffb49250905..d92192bdcd9 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration; +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions; use ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok; @@ -47,6 +48,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), @@ -238,6 +240,26 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code after_codeScanningDefaultSetup: + $value = $payload['code_scanning_default_setup_options'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetupOptions'] = null; + goto after_codeScanningDefaultSetupOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeScanningDefaultSetupOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['codeScanningDefaultSetupOptions'] = $value; + + after_codeScanningDefaultSetupOptions: + $value = $payload['secret_scanning'] ?? null; if ($value === null) { @@ -423,6 +445,47 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(array $payload): CodeScanningDefaultSetupOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['runner_type'] ?? null; + + if ($value === null) { + $properties['runnerType'] = null; + goto after_runnerType; + } + + $properties['runnerType'] = $value; + + after_runnerType: + + $value = $payload['runner_label'] ?? null; + + if ($value === null) { + $properties['runnerLabel'] = null; + goto after_runnerLabel; + } + + $properties['runnerLabel'] = $value; + + after_runnerLabel: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningDefaultSetupOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningDefaultSetupOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions { $properties = []; @@ -550,6 +613,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException("No serialization defined for $className"), @@ -733,6 +797,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_codeScanningDefaultSetup: $result['code_scanning_default_setup'] = $codeScanningDefaultSetup; + $codeScanningDefaultSetupOptions = $object->codeScanningDefaultSetupOptions; + + if ($codeScanningDefaultSetupOptions === null) { + goto after_codeScanningDefaultSetupOptions; + } + + $codeScanningDefaultSetupOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($codeScanningDefaultSetupOptions); + after_codeScanningDefaultSetupOptions: $result['code_scanning_default_setup_options'] = $codeScanningDefaultSetupOptions; + $secretScanning = $object->secretScanning; if ($secretScanning === null) { @@ -849,6 +922,30 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(mixed $object): mixed + { + assert($object instanceof CodeScanningDefaultSetupOptions); + $result = []; + + $runnerType = $object->runnerType; + + if ($runnerType === null) { + goto after_runnerType; + } + + after_runnerType: $result['runner_type'] = $runnerType; + + $runnerLabel = $object->runnerLabel; + + if ($runnerLabel === null) { + goto after_runnerLabel; + } + + after_runnerLabel: $result['runner_label'] = $runnerLabel; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed { assert($object instanceof SecretScanningDelegatedBypassOptions); diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeSecurityConfiguration.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeSecurityConfiguration.php index 55f00d6b368..987bca1a5d8 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeSecurityConfiguration.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeSecurityConfiguration.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Repos\Owner\Repo; use ApiClients\Client\GitHub\Schema\BasicError; +use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions; use ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository; @@ -46,6 +47,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfigurationForRepository($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), @@ -237,6 +239,26 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code after_codeScanningDefaultSetup: + $value = $payload['code_scanning_default_setup_options'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetupOptions'] = null; + goto after_codeScanningDefaultSetupOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeScanningDefaultSetupOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['codeScanningDefaultSetupOptions'] = $value; + + after_codeScanningDefaultSetupOptions: + $value = $payload['secret_scanning'] ?? null; if ($value === null) { @@ -422,6 +444,47 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Code } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(array $payload): CodeScanningDefaultSetupOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['runner_type'] ?? null; + + if ($value === null) { + $properties['runnerType'] = null; + goto after_runnerType; + } + + $properties['runnerType'] = $value; + + after_runnerType: + + $value = $payload['runner_label'] ?? null; + + if ($value === null) { + $properties['runnerLabel'] = null; + goto after_runnerLabel; + } + + $properties['runnerLabel'] = $value; + + after_runnerLabel: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningDefaultSetupOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningDefaultSetupOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions { $properties = []; @@ -549,6 +612,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfigurationForRepository($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), + 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), 'ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException("No serialization defined for $className"), @@ -732,6 +796,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema after_codeScanningDefaultSetup: $result['code_scanning_default_setup'] = $codeScanningDefaultSetup; + $codeScanningDefaultSetupOptions = $object->codeScanningDefaultSetupOptions; + + if ($codeScanningDefaultSetupOptions === null) { + goto after_codeScanningDefaultSetupOptions; + } + + $codeScanningDefaultSetupOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($codeScanningDefaultSetupOptions); + after_codeScanningDefaultSetupOptions: $result['code_scanning_default_setup_options'] = $codeScanningDefaultSetupOptions; + $secretScanning = $object->secretScanning; if ($secretScanning === null) { @@ -848,6 +921,30 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(mixed $object): mixed + { + assert($object instanceof CodeScanningDefaultSetupOptions); + $result = []; + + $runnerType = $object->runnerType; + + if ($runnerType === null) { + goto after_runnerType; + } + + after_runnerType: $result['runner_type'] = $runnerType; + + $runnerLabel = $object->runnerLabel; + + if ($runnerLabel === null) { + goto after_runnerLabel; + } + + after_runnerLabel: $result['runner_label'] = $runnerLabel; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed { assert($object instanceof SecretScanningDelegatedBypassOptions); diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index 096bca01f0f..1fe1be4314a 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -798,7 +798,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationActionsVariable' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelectedReposForOrgVariable\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name🌀Repositories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\CodeScanningDefaultSetupOptions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\ListInOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces()->hydrateObject($className, $payload), @@ -1159,7 +1159,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationActionsVariable' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Actions\\ListSelectedReposForOrgVariable\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name🌀Repositories()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Attestations🌀SubjectDigest()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\CodeScanningDefaultSetupOptions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\ListInOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces()->serializeObject($object), diff --git a/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActor.php b/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActor.php index 3ac7f413e79..cc861715c40 100644 --- a/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActor.php +++ b/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActor.php @@ -36,6 +36,8 @@ final class GetRouteStatsByActor private string $maxTimestamp; /**The property to sort the results by. **/ private array $sort; + /**Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. **/ + private string $apiRouteSubstring; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -43,22 +45,23 @@ final class GetRouteStatsByActor /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\RouteStats\ActorType\ActorId $hydrator, string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\RouteStats\ActorType\ActorId $hydrator, string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, string $apiRouteSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc') { - $this->org = $org; - $this->actorType = $actorType; - $this->actorId = $actorId; - $this->minTimestamp = $minTimestamp; - $this->maxTimestamp = $maxTimestamp; - $this->sort = $sort; - $this->page = $page; - $this->perPage = $perPage; - $this->direction = $direction; + $this->org = $org; + $this->actorType = $actorType; + $this->actorId = $actorId; + $this->minTimestamp = $minTimestamp; + $this->maxTimestamp = $maxTimestamp; + $this->sort = $sort; + $this->apiRouteSubstring = $apiRouteSubstring; + $this->page = $page; + $this->perPage = $perPage; + $this->direction = $direction; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{actor_type}', '{actor_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->actorType, $this->actorId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&page={page}&per_page={per_page}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{actor_type}', '{actor_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{api_route_substring}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->actorType, $this->actorId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->apiRouteSubstring, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&api_route_substring={api_route_substring}&page={page}&per_page={per_page}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActorListing.php b/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActorListing.php index 86999cccc4f..c9339658e62 100644 --- a/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActorListing.php +++ b/clients/GitHub/src/Internal/Operation/ApiInsights/GetRouteStatsByActorListing.php @@ -36,6 +36,8 @@ final class GetRouteStatsByActorListing private string $maxTimestamp; /**The property to sort the results by. **/ private array $sort; + /**Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. **/ + private string $apiRouteSubstring; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -43,22 +45,23 @@ final class GetRouteStatsByActorListing /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\RouteStats\ActorType\ActorId $hydrator, string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\RouteStats\ActorType\ActorId $hydrator, string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, string $apiRouteSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc') { - $this->org = $org; - $this->actorType = $actorType; - $this->actorId = $actorId; - $this->minTimestamp = $minTimestamp; - $this->maxTimestamp = $maxTimestamp; - $this->sort = $sort; - $this->page = $page; - $this->perPage = $perPage; - $this->direction = $direction; + $this->org = $org; + $this->actorType = $actorType; + $this->actorId = $actorId; + $this->minTimestamp = $minTimestamp; + $this->maxTimestamp = $maxTimestamp; + $this->sort = $sort; + $this->apiRouteSubstring = $apiRouteSubstring; + $this->page = $page; + $this->perPage = $perPage; + $this->direction = $direction; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{actor_type}', '{actor_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->actorType, $this->actorId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&page={page}&per_page={per_page}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{actor_type}', '{actor_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{api_route_substring}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->actorType, $this->actorId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->apiRouteSubstring, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&api_route_substring={api_route_substring}&page={page}&per_page={per_page}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStats.php b/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStats.php index 4889176735a..934d677e9cd 100644 --- a/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStats.php +++ b/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStats.php @@ -32,6 +32,8 @@ final class GetSubjectStats private string $maxTimestamp; /**The property to sort the results by. **/ private array $sort; + /**Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. **/ + private string $subjectNameSubstring; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -39,20 +41,21 @@ final class GetSubjectStats /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\SubjectStats $hydrator, string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\SubjectStats $hydrator, string $org, string $minTimestamp, string $maxTimestamp, array $sort, string $subjectNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc') { - $this->org = $org; - $this->minTimestamp = $minTimestamp; - $this->maxTimestamp = $maxTimestamp; - $this->sort = $sort; - $this->page = $page; - $this->perPage = $perPage; - $this->direction = $direction; + $this->org = $org; + $this->minTimestamp = $minTimestamp; + $this->maxTimestamp = $maxTimestamp; + $this->sort = $sort; + $this->subjectNameSubstring = $subjectNameSubstring; + $this->page = $page; + $this->perPage = $perPage; + $this->direction = $direction; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/subject-stats' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&page={page}&per_page={per_page}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{subject_name_substring}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->subjectNameSubstring, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/subject-stats' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&subject_name_substring={subject_name_substring}&page={page}&per_page={per_page}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStatsListing.php b/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStatsListing.php index 8f50b1459b8..4a2a7497c48 100644 --- a/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStatsListing.php +++ b/clients/GitHub/src/Internal/Operation/ApiInsights/GetSubjectStatsListing.php @@ -32,6 +32,8 @@ final class GetSubjectStatsListing private string $maxTimestamp; /**The property to sort the results by. **/ private array $sort; + /**Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. **/ + private string $subjectNameSubstring; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -39,20 +41,21 @@ final class GetSubjectStatsListing /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\SubjectStats $hydrator, string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\SubjectStats $hydrator, string $org, string $minTimestamp, string $maxTimestamp, array $sort, string $subjectNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc') { - $this->org = $org; - $this->minTimestamp = $minTimestamp; - $this->maxTimestamp = $maxTimestamp; - $this->sort = $sort; - $this->page = $page; - $this->perPage = $perPage; - $this->direction = $direction; + $this->org = $org; + $this->minTimestamp = $minTimestamp; + $this->maxTimestamp = $maxTimestamp; + $this->sort = $sort; + $this->subjectNameSubstring = $subjectNameSubstring; + $this->page = $page; + $this->perPage = $perPage; + $this->direction = $direction; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/subject-stats' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&page={page}&per_page={per_page}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{subject_name_substring}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->subjectNameSubstring, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/subject-stats' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&subject_name_substring={subject_name_substring}&page={page}&per_page={per_page}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStats.php b/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStats.php index 1faa3e4127b..f64108849d3 100644 --- a/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStats.php +++ b/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStats.php @@ -34,6 +34,8 @@ final class GetUserStats private string $maxTimestamp; /**The property to sort the results by. **/ private array $sort; + /**Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. **/ + private string $actorNameSubstring; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -41,21 +43,22 @@ final class GetUserStats /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\UserStats\UserId $hydrator, string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\UserStats\UserId $hydrator, string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, string $actorNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc') { - $this->org = $org; - $this->userId = $userId; - $this->minTimestamp = $minTimestamp; - $this->maxTimestamp = $maxTimestamp; - $this->sort = $sort; - $this->page = $page; - $this->perPage = $perPage; - $this->direction = $direction; + $this->org = $org; + $this->userId = $userId; + $this->minTimestamp = $minTimestamp; + $this->maxTimestamp = $maxTimestamp; + $this->sort = $sort; + $this->actorNameSubstring = $actorNameSubstring; + $this->page = $page; + $this->perPage = $perPage; + $this->direction = $direction; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{user_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->userId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/user-stats/{user_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&page={page}&per_page={per_page}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{user_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{actor_name_substring}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->userId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->actorNameSubstring, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/user-stats/{user_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&actor_name_substring={actor_name_substring}&page={page}&per_page={per_page}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStatsListing.php b/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStatsListing.php index ff5f0c6f26f..738dbf060f9 100644 --- a/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStatsListing.php +++ b/clients/GitHub/src/Internal/Operation/ApiInsights/GetUserStatsListing.php @@ -34,6 +34,8 @@ final class GetUserStatsListing private string $maxTimestamp; /**The property to sort the results by. **/ private array $sort; + /**Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. **/ + private string $actorNameSubstring; /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; /**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ @@ -41,21 +43,22 @@ final class GetUserStatsListing /**The direction to sort the results by. **/ private string $direction; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\UserStats\UserId $hydrator, string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc') + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Insights\Api\UserStats\UserId $hydrator, string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, string $actorNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc') { - $this->org = $org; - $this->userId = $userId; - $this->minTimestamp = $minTimestamp; - $this->maxTimestamp = $maxTimestamp; - $this->sort = $sort; - $this->page = $page; - $this->perPage = $perPage; - $this->direction = $direction; + $this->org = $org; + $this->userId = $userId; + $this->minTimestamp = $minTimestamp; + $this->maxTimestamp = $maxTimestamp; + $this->sort = $sort; + $this->actorNameSubstring = $actorNameSubstring; + $this->page = $page; + $this->perPage = $perPage; + $this->direction = $direction; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{user_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->userId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/user-stats/{user_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&page={page}&per_page={per_page}&direction={direction}')); + return new Request('GET', str_replace(['{org}', '{user_id}', '{min_timestamp}', '{max_timestamp}', '{sort}', '{actor_name_substring}', '{page}', '{per_page}', '{direction}'], [$this->org, $this->userId, $this->minTimestamp, $this->maxTimestamp, $this->sort, $this->actorNameSubstring, $this->page, $this->perPage, $this->direction], '/orgs/{org}/insights/api/user-stats/{user_id}' . '?min_timestamp={min_timestamp}&max_timestamp={max_timestamp}&sort={sort}&actor_name_substring={actor_name_substring}&page={page}&per_page={per_page}&direction={direction}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php b/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php index 7269b79d3c0..274db8cbfa1 100644 --- a/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php +++ b/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActor.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, string $apiRouteSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetRouteStatsByActor($this->responseSchemaValidator, $this->hydrator, $org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetRouteStatsByActor($this->responseSchemaValidator, $this->hydrator, $org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $apiRouteSubstring, $page, $perPage, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php b/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php index 2815e0d203c..73c4e8ad759 100644 --- a/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php +++ b/clients/GitHub/src/Internal/Operator/ApiInsights/GetRouteStatsByActorListing.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, string $apiRouteSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetRouteStatsByActorListing($this->responseSchemaValidator, $this->hydrator, $org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetRouteStatsByActorListing($this->responseSchemaValidator, $this->hydrator, $org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $apiRouteSubstring, $page, $perPage, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStats.php b/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStats.php index c89c02da68b..e62f548061c 100644 --- a/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStats.php +++ b/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStats.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, string $minTimestamp, string $maxTimestamp, array $sort, string $subjectNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetSubjectStats($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetSubjectStats($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $sort, $subjectNameSubstring, $page, $perPage, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php b/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php index f226ccddf15..83018c7e9e9 100644 --- a/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php +++ b/clients/GitHub/src/Internal/Operator/ApiInsights/GetSubjectStatsListing.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, string $minTimestamp, string $maxTimestamp, array $sort, string $subjectNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetSubjectStatsListing($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetSubjectStatsListing($this->responseSchemaValidator, $this->hydrator, $org, $minTimestamp, $maxTimestamp, $sort, $subjectNameSubstring, $page, $perPage, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStats.php b/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStats.php index 41d83e08275..35286905c03 100644 --- a/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStats.php +++ b/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStats.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, string $actorNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetUserStats($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetUserStats($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp, $sort, $actorNameSubstring, $page, $perPage, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStatsListing.php b/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStatsListing.php index 87ff53b8aae..16fee1a7deb 100644 --- a/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStatsListing.php +++ b/clients/GitHub/src/Internal/Operator/ApiInsights/GetUserStatsListing.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable + /** @return iterable */ + public function call(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, string $actorNameSubstring, int $page = 1, int $perPage = 30, string $direction = 'desc'): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetUserStatsListing($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\ApiInsights\GetUserStatsListing($this->responseSchemaValidator, $this->hydrator, $org, $userId, $minTimestamp, $maxTimestamp, $sort, $actorNameSubstring, $page, $perPage, $direction); $request = $operation->createRequest(); $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Router/Get/ApiInsights.php b/clients/GitHub/src/Internal/Router/Get/ApiInsights.php index 375cecc668c..81e0d270e65 100644 --- a/clients/GitHub/src/Internal/Router/Get/ApiInsights.php +++ b/clients/GitHub/src/Internal/Router/Get/ApiInsights.php @@ -20,7 +20,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return Observable */ + /** @return iterable */ public function getSubjectStats(array $params): iterable { $arguments = []; @@ -48,6 +48,12 @@ public function getSubjectStats(array $params): iterable $arguments['sort'] = $params['sort']; unset($params['sort']); + if (array_key_exists('subject_name_substring', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: subject_name_substring'); + } + + $arguments['subject_name_substring'] = $params['subject_name_substring']; + unset($params['subject_name_substring']); if (array_key_exists('page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: page'); } @@ -68,7 +74,7 @@ public function getSubjectStats(array $params): iterable unset($params['direction']); $operator = new Internal\Operator\ApiInsights\GetSubjectStats($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Insights🌀Api🌀SubjectStats()); - return $operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction']); + return $operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['subject_name_substring'], $arguments['page'], $arguments['per_page'], $arguments['direction']); } /** @return */ @@ -131,7 +137,7 @@ public function getTimeStats(array $params): iterable return $operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['timestamp_increment']); } - /** @return Observable */ + /** @return iterable */ public function getUserStats(array $params): iterable { $arguments = []; @@ -165,6 +171,12 @@ public function getUserStats(array $params): iterable $arguments['sort'] = $params['sort']; unset($params['sort']); + if (array_key_exists('actor_name_substring', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: actor_name_substring'); + } + + $arguments['actor_name_substring'] = $params['actor_name_substring']; + unset($params['actor_name_substring']); if (array_key_exists('page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: page'); } @@ -185,10 +197,10 @@ public function getUserStats(array $params): iterable unset($params['direction']); $operator = new Internal\Operator\ApiInsights\GetUserStats($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Insights🌀Api🌀UserStats🌀UserId()); - return $operator->call($arguments['org'], $arguments['user_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction']); + return $operator->call($arguments['org'], $arguments['user_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['actor_name_substring'], $arguments['page'], $arguments['per_page'], $arguments['direction']); } - /** @return Observable */ + /** @return iterable */ public function getRouteStatsByActor(array $params): iterable { $arguments = []; @@ -228,6 +240,12 @@ public function getRouteStatsByActor(array $params): iterable $arguments['sort'] = $params['sort']; unset($params['sort']); + if (array_key_exists('api_route_substring', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: api_route_substring'); + } + + $arguments['api_route_substring'] = $params['api_route_substring']; + unset($params['api_route_substring']); if (array_key_exists('page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: page'); } @@ -248,7 +266,7 @@ public function getRouteStatsByActor(array $params): iterable unset($params['direction']); $operator = new Internal\Operator\ApiInsights\GetRouteStatsByActor($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Insights🌀Api🌀RouteStats🌀ActorType🌀ActorId()); - return $operator->call($arguments['org'], $arguments['actor_type'], $arguments['actor_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction']); + return $operator->call($arguments['org'], $arguments['actor_type'], $arguments['actor_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['api_route_substring'], $arguments['page'], $arguments['per_page'], $arguments['direction']); } /** @return */ diff --git a/clients/GitHub/src/Internal/Router/Get/Eight.php b/clients/GitHub/src/Internal/Router/Get/Eight.php index 5c5d697bcde..08c9f6e159e 100644 --- a/clients/GitHub/src/Internal/Router/Get/Eight.php +++ b/clients/GitHub/src/Internal/Router/Get/Eight.php @@ -36,7 +36,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody */ + /** @return iterable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody */ public function call(string $call, array $params, array $pathChunks): iterable|ApiInsightsSummaryStats|PackageVersion|TeamRepository|WithoutBody|OidcCustomSubRepo|Ok|Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|WorkflowUsage|ProtectedBranchAdminEnforced|ProtectedBranchPullRequestReview|StatusCheckPolicy|BranchRestrictionPolicy|CodeScanningCodeqlDatabase|CodeScanningVariantAnalysis|DeploymentStatus|DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|DeploymentProtectionRule|ActionsPublicKey|ActionsSecret|ActionsVariable|HookDelivery|PullRequestReview { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Seven.php b/clients/GitHub/src/Internal/Router/Get/Seven.php index 171aa5e5e13..5c77dd8cf27 100644 --- a/clients/GitHub/src/Internal/Router/Get/Seven.php +++ b/clients/GitHub/src/Internal/Router/Get/Seven.php @@ -63,7 +63,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable||Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|OidcCustomSub|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|Json|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|TeamDiscussion|TeamMembership|TeamProject|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|Blob|GitCommit|GitRef|GitTag|GitTree|WebhookConfig|IssueComment|IssueEvent|PageBuild|PagesDeploymentStatus|PullRequestReviewComment|PullRequestReviewRequest|ReleaseAsset|Release|RuleSuite|SecretScanningAlert|TeamDiscussionComment|PackageVersion { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index 48b11e3354e..5e66f37c3f1 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -78,7 +78,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|WithoutBody|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): Ok|iterable|BillingUsageReport|ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsOrg|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/ApiInsights.php b/clients/GitHub/src/Internal/Router/List/ApiInsights.php index bdbbf8740f8..87b81548fa6 100644 --- a/clients/GitHub/src/Internal/Router/List/ApiInsights.php +++ b/clients/GitHub/src/Internal/Router/List/ApiInsights.php @@ -20,7 +20,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return Observable */ + /** @return iterable */ public function getUserStatsListing(array $params): iterable { $arguments = []; @@ -54,6 +54,12 @@ public function getUserStatsListing(array $params): iterable $arguments['sort'] = $params['sort']; unset($params['sort']); + if (array_key_exists('actor_name_substring', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: actor_name_substring'); + } + + $arguments['actor_name_substring'] = $params['actor_name_substring']; + unset($params['actor_name_substring']); if (array_key_exists('page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: page'); } @@ -75,7 +81,7 @@ public function getUserStatsListing(array $params): iterable $arguments['page'] = 1; do { $operator = new Internal\Operator\ApiInsights\GetUserStatsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Insights🌀Api🌀UserStats🌀UserId()); - $items = [...$operator->call($arguments['org'], $arguments['user_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction'])]; + $items = [...$operator->call($arguments['org'], $arguments['user_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['actor_name_substring'], $arguments['page'], $arguments['per_page'], $arguments['direction'])]; yield from $items; @@ -83,7 +89,7 @@ public function getUserStatsListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable */ + /** @return iterable */ public function getSubjectStatsListing(array $params): iterable { $arguments = []; @@ -111,6 +117,12 @@ public function getSubjectStatsListing(array $params): iterable $arguments['sort'] = $params['sort']; unset($params['sort']); + if (array_key_exists('subject_name_substring', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: subject_name_substring'); + } + + $arguments['subject_name_substring'] = $params['subject_name_substring']; + unset($params['subject_name_substring']); if (array_key_exists('page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: page'); } @@ -132,7 +144,7 @@ public function getSubjectStatsListing(array $params): iterable $arguments['page'] = 1; do { $operator = new Internal\Operator\ApiInsights\GetSubjectStatsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Insights🌀Api🌀SubjectStats()); - $items = [...$operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction'])]; + $items = [...$operator->call($arguments['org'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['subject_name_substring'], $arguments['page'], $arguments['per_page'], $arguments['direction'])]; yield from $items; @@ -140,7 +152,7 @@ public function getSubjectStatsListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable */ + /** @return iterable */ public function getRouteStatsByActorListing(array $params): iterable { $arguments = []; @@ -180,6 +192,12 @@ public function getRouteStatsByActorListing(array $params): iterable $arguments['sort'] = $params['sort']; unset($params['sort']); + if (array_key_exists('api_route_substring', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: api_route_substring'); + } + + $arguments['api_route_substring'] = $params['api_route_substring']; + unset($params['api_route_substring']); if (array_key_exists('page', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: page'); } @@ -201,7 +219,7 @@ public function getRouteStatsByActorListing(array $params): iterable $arguments['page'] = 1; do { $operator = new Internal\Operator\ApiInsights\GetRouteStatsByActorListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Insights🌀Api🌀RouteStats🌀ActorType🌀ActorId()); - $items = [...$operator->call($arguments['org'], $arguments['actor_type'], $arguments['actor_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['page'], $arguments['per_page'], $arguments['direction'])]; + $items = [...$operator->call($arguments['org'], $arguments['actor_type'], $arguments['actor_id'], $arguments['min_timestamp'], $arguments['max_timestamp'], $arguments['sort'], $arguments['api_route_substring'], $arguments['page'], $arguments['per_page'], $arguments['direction'])]; yield from $items; diff --git a/clients/GitHub/src/Internal/Router/List/Eight.php b/clients/GitHub/src/Internal/Router/List/Eight.php index 9292bfd92c4..5843a2ee94c 100644 --- a/clients/GitHub/src/Internal/Router/List/Eight.php +++ b/clients/GitHub/src/Internal/Router/List/Eight.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody */ + /** @return iterable|Observable|Observable|Observable|Observable|WithoutBody */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/Seven.php b/clients/GitHub/src/Internal/Router/List/Seven.php index 496fd87c523..9783f7c632f 100644 --- a/clients/GitHub/src/Internal/Router/List/Seven.php +++ b/clients/GitHub/src/Internal/Router/List/Seven.php @@ -14,7 +14,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/Six.php b/clients/GitHub/src/Internal/Router/List/Six.php index 15771a2e3fb..ab1b6ca29b2 100644 --- a/clients/GitHub/src/Internal/Router/List/Six.php +++ b/clients/GitHub/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|iterable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Operation/ApiInsights.php b/clients/GitHub/src/Operation/ApiInsights.php index 8244973b634..3d4a6618020 100644 --- a/clients/GitHub/src/Operation/ApiInsights.php +++ b/clients/GitHub/src/Operation/ApiInsights.php @@ -14,28 +14,28 @@ public function __construct(private Internal\Operators $operators) { } - /** @return Observable */ - public function getRouteStatsByActor(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable + /** @return iterable */ + public function getRouteStatsByActor(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, string $apiRouteSubstring, int $page, int $perPage, string $direction): iterable { - return $this->operators->apiInsights👷GetRouteStatsByActor()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + return $this->operators->apiInsights👷GetRouteStatsByActor()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $apiRouteSubstring, $page, $perPage, $direction); } - /** @return Observable */ - public function getRouteStatsByActorListing(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable + /** @return iterable */ + public function getRouteStatsByActorListing(string $org, string $actorType, int $actorId, string $minTimestamp, string $maxTimestamp, array $sort, string $apiRouteSubstring, int $page, int $perPage, string $direction): iterable { - return $this->operators->apiInsights👷GetRouteStatsByActorListing()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + return $this->operators->apiInsights👷GetRouteStatsByActorListing()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $sort, $apiRouteSubstring, $page, $perPage, $direction); } - /** @return Observable */ - public function getSubjectStats(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable + /** @return iterable */ + public function getSubjectStats(string $org, string $minTimestamp, string $maxTimestamp, array $sort, string $subjectNameSubstring, int $page, int $perPage, string $direction): iterable { - return $this->operators->apiInsights👷GetSubjectStats()->call($org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + return $this->operators->apiInsights👷GetSubjectStats()->call($org, $minTimestamp, $maxTimestamp, $sort, $subjectNameSubstring, $page, $perPage, $direction); } - /** @return Observable */ - public function getSubjectStatsListing(string $org, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable + /** @return iterable */ + public function getSubjectStatsListing(string $org, string $minTimestamp, string $maxTimestamp, array $sort, string $subjectNameSubstring, int $page, int $perPage, string $direction): iterable { - return $this->operators->apiInsights👷GetSubjectStatsListing()->call($org, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + return $this->operators->apiInsights👷GetSubjectStatsListing()->call($org, $minTimestamp, $maxTimestamp, $sort, $subjectNameSubstring, $page, $perPage, $direction); } /** @return */ @@ -74,15 +74,15 @@ public function getTimeStatsByActor(string $org, string $actorType, int $actorId return $this->operators->apiInsights👷GetTimeStatsByActor()->call($org, $actorType, $actorId, $minTimestamp, $maxTimestamp, $timestampIncrement); } - /** @return Observable */ - public function getUserStats(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable + /** @return iterable */ + public function getUserStats(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, string $actorNameSubstring, int $page, int $perPage, string $direction): iterable { - return $this->operators->apiInsights👷GetUserStats()->call($org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + return $this->operators->apiInsights👷GetUserStats()->call($org, $userId, $minTimestamp, $maxTimestamp, $sort, $actorNameSubstring, $page, $perPage, $direction); } - /** @return Observable */ - public function getUserStatsListing(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, int $page, int $perPage, string $direction): iterable + /** @return iterable */ + public function getUserStatsListing(string $org, string $userId, string $minTimestamp, string $maxTimestamp, array $sort, string $actorNameSubstring, int $page, int $perPage, string $direction): iterable { - return $this->operators->apiInsights👷GetUserStatsListing()->call($org, $userId, $minTimestamp, $maxTimestamp, $sort, $page, $perPage, $direction); + return $this->operators->apiInsights👷GetUserStatsListing()->call($org, $userId, $minTimestamp, $maxTimestamp, $sort, $actorNameSubstring, $page, $perPage, $direction); } } diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 7c4ef1befd4..f1e6c8e8374 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -1004,19 +1004,19 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /orgs/{org}/insights/api/subject-stats') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/insights/api/subject-stats') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /orgs/{org}/insights/api/summary-stats') { @@ -1044,11 +1044,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/insights/api/user-stats/{user_id}') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/insights/api/user-stats/{user_id}') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /orgs/{org}/installation') { diff --git a/clients/GitHub/src/Schema/CodeScanningDefaultSetupOptions.php b/clients/GitHub/src/Schema/CodeScanningDefaultSetupOptions.php new file mode 100644 index 00000000000..1129a2d296c --- /dev/null +++ b/clients/GitHub/src/Schema/CodeScanningDefaultSetupOptions.php @@ -0,0 +1,52 @@ +call('GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}')); assertType('', $client->call('POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts')); assertType('', $client->call('POST /orgs/{org}/hooks/{hook_id}/pings')); -assertType('Observable', $client->call('GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); -assertType('Observable', $client->call('LIST /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); -assertType('Observable', $client->call('GET /orgs/{org}/insights/api/subject-stats')); -assertType('Observable', $client->call('LIST /orgs/{org}/insights/api/subject-stats')); +assertType('iterable', $client->call('GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); +assertType('iterable', $client->call('LIST /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}')); +assertType('iterable', $client->call('GET /orgs/{org}/insights/api/subject-stats')); +assertType('iterable', $client->call('LIST /orgs/{org}/insights/api/subject-stats')); assertType('', $client->call('GET /orgs/{org}/insights/api/summary-stats')); assertType('', $client->call('GET /orgs/{org}/insights/api/summary-stats/users/{user_id}')); assertType('', $client->call('GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}')); assertType('Observable', $client->call('GET /orgs/{org}/insights/api/time-stats')); assertType('Observable', $client->call('GET /orgs/{org}/insights/api/time-stats/users/{user_id}')); assertType('Observable', $client->call('GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}')); -assertType('Observable', $client->call('GET /orgs/{org}/insights/api/user-stats/{user_id}')); -assertType('Observable', $client->call('LIST /orgs/{org}/insights/api/user-stats/{user_id}')); +assertType('iterable', $client->call('GET /orgs/{org}/insights/api/user-stats/{user_id}')); +assertType('iterable', $client->call('LIST /orgs/{org}/insights/api/user-stats/{user_id}')); assertType('', $client->call('GET /orgs/{org}/installation')); assertType('', $client->call('GET /orgs/{org}/installations')); assertType('', $client->call('GET /orgs/{org}/interaction-limits')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index e469ef314b3..d61450224ea 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -1767,6 +1767,9 @@ paths: get: summary: Get Copilot metrics for an enterprise team description: |- + > [!NOTE] + > This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." + Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions. The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day, @@ -1843,7 +1846,7 @@ paths: summary: Get a summary of Copilot usage for an enterprise team description: |- > [!NOTE] - > This endpoint is in public preview and is subject to change. + > This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)." You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE for users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day. @@ -7088,6 +7091,8 @@ paths: - disabled - not_set default: disabled + code_scanning_default_setup_options: + "$ref": "#/components/schemas/code-scanning-default-setup-options" secret_scanning: type: string description: The enablement status of secret scanning @@ -7411,6 +7416,8 @@ paths: - enabled - disabled - not_set + code_scanning_default_setup_options: + "$ref": "#/components/schemas/code-scanning-default-setup-options" secret_scanning: type: string description: The enablement status of secret scanning @@ -8496,13 +8503,11 @@ paths: Purchases a GitHub Copilot seat for all users within each specified team. The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - Only organization owners can add Copilot seats for their organization members. - - In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." - The response will contain the total number of new seats that were created and existing seats that were refreshed. + The response contains the total number of new seats that were created and existing seats that were refreshed. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. tags: @@ -8580,14 +8585,11 @@ paths: Sets seats for all members of each team specified to "pending cancellation". This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team. - - For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - - For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." Only organization owners can cancel Copilot seats for their organization members. - The response will contain the total number of seats set to "pending cancellation". + The response contains the total number of seats set to "pending cancellation". OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. tags: @@ -8667,13 +8669,11 @@ paths: Purchases a GitHub Copilot seat for each user specified. The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - Only organization owners can add Copilot seats for their organization members. - - In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy. + Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy. For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)." For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)." - The response will contain the total number of new seats that were created and existing seats that were refreshed. + The response contains the total number of new seats that were created and existing seats that were refreshed. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. tags: @@ -8750,14 +8750,11 @@ paths: Sets seats for all users specified to "pending cancellation". This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership. - - For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)." - - For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." + For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)." Only organization owners can cancel Copilot seats for their organization members. - The response will contain the total number of seats set to "pending cancellation". + The response contains the total number of seats set to "pending cancellation". OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. tags: @@ -10059,6 +10056,7 @@ paths: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/direction" - "$ref": "#/components/parameters/api-insights-route-stats-sort" + - "$ref": "#/components/parameters/api-insights-api-route-substring" responses: '200': description: Response @@ -10092,6 +10090,7 @@ paths: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/direction" - "$ref": "#/components/parameters/api-insights-sort" + - "$ref": "#/components/parameters/api-insights-subject-name-substring" responses: '200': description: Response @@ -10310,6 +10309,7 @@ paths: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/direction" - "$ref": "#/components/parameters/api-insights-sort" + - "$ref": "#/components/parameters/api-insights-actor-name-substring" responses: '200': description: Response @@ -73815,6 +73815,28 @@ components: - enabled - disabled - not_set + code_scanning_default_setup_options: + type: + - object + - 'null' + description: Feature options for code scanning default setup + properties: + runner_type: + type: + - string + - 'null' + enum: + - standard + - labeled + - not_set + - + description: Whether to use labeled runners or standard GitHub runners. + runner_label: + type: + - string + - 'null' + description: The label of the runner to use for code scanning when runner_type + is 'labeled'. secret_scanning: type: string description: The enablement status of secret scanning @@ -73899,6 +73921,25 @@ components: updated_at: type: string format: date-time + code-scanning-default-setup-options: + type: + - object + - 'null' + description: Feature options for code scanning default setup + properties: + runner_type: + type: string + enum: + - standard + - labeled + - not_set + description: Whether to use labeled runners or standard GitHub runners. + runner_label: + type: + - string + - 'null' + description: The label of the runner to use for code scanning default setup + when runner_type is 'labeled'. code-security-default-configurations: type: array description: A list of default code security configurations @@ -82661,6 +82702,19 @@ components: enum: - configured - not-configured + runner_type: + description: Runner type to be used. + type: string + enum: + - standard + - labeled + runner_label: + description: Runner label to be used if the runner type is labeled. + type: + - string + - 'null' + examples: + - code-scanning query_suite: description: CodeQL query suite to be used. type: string @@ -89634,18 +89688,20 @@ components: description: The type of scan status: type: string - description: The state of the scan. Either "completed" or "running" + description: The state of the scan. Either "completed", "running", or "pending" completed_at: type: - string - 'null' format: date-time description: The time that the scan was completed. Empty if the scan is - active + running started_at: - type: string + type: + - string + - 'null' format: date-time - description: The time that the scan was started + description: The time that the scan was started. Empty if the scan is pending secret-scanning-scan-history: type: object properties: @@ -205594,6 +205650,9 @@ components: dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: disabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: secret_scanning: enabled secret_scanning_push_protection: disabled secret_scanning_delegated_bypass: disabled @@ -205621,6 +205680,9 @@ components: dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: enabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: secret_scanning: enabled secret_scanning_push_protection: enabled secret_scanning_delegated_bypass: enabled @@ -205652,6 +205714,9 @@ components: dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: enabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: secret_scanning: enabled secret_scanning_push_protection: enabled secret_scanning_delegated_bypass: disabled @@ -205676,6 +205741,9 @@ components: dependabot_alerts: enabled dependabot_security_updates: not_set code_scanning_default_setup: enabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: secret_scanning: disabled secret_scanning_push_protection: disabled secret_scanning_delegated_bypass: disabled @@ -226944,6 +227012,14 @@ components: - api_route - total_request_count default: total_request_count + api-insights-api-route-substring: + name: api_route_substring + in: query + description: Providing a substring will filter results where the API route contains + the substring. This is a case-insensitive search. + required: false + schema: + type: string api-insights-sort: name: sort description: The property to sort the results by. @@ -226960,6 +227036,14 @@ components: - subject_name - total_request_count default: total_request_count + api-insights-subject-name-substring: + name: subject_name_substring + in: query + description: Providing a substring will filter results where the subject name + contains the substring. This is a case-insensitive search. + required: false + schema: + type: string api-insights-user-id: name: user_id in: path @@ -226975,6 +227059,14 @@ components: required: true schema: type: string + api-insights-actor-name-substring: + name: actor_name_substring + in: query + description: Providing a substring will filter results where the actor name + contains the substring. This is a case-insensitive search. + required: false + schema: + type: string invitation-id: name: invitation_id description: The unique identifier of the invitation.