diff --git a/clients/GitHubEnterpriseCloud/README.md b/clients/GitHubEnterpriseCloud/README.md index d436f3c1f0c..19ed832ec7c 100644 --- a/clients/GitHubEnterpriseCloud/README.md +++ b/clients/GitHubEnterpriseCloud/README.md @@ -5378,6 +5378,214 @@ $client->operations()->codeScanning()->listAlertsForOrgListing( org: 'gen You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization). +### code-security/get-configurations-for-org + +Get code security configurations for an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/code-security/configurations', [ + 'org' => 'generated', + 'before' => 'generated', + 'after' => 'generated', + 'target_type' => 'generated', + 'per_page' => 8, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getConfigurationsForOrg( org: 'generated', + before: 'generated', + after: 'generated', + target_type: 'generated', + per_page: 8, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-code-security-configurations-for-an-organization). + + +### code-security/create-configuration + +Create a code security configuration + +Using the `call` method: +```php +$client->call('POST /orgs/{org}/code-security/configurations', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->createConfiguration( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#create-a-code-security-configuration). + + +### code-security/get-default-configurations + +Get default code security configurations + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/code-security/configurations/defaults', [ + 'org' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getDefaultConfigurations( org: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-default-code-security-configurations). + + +### code-security/get-configuration + +Get a code security configuration + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/code-security/configurations/{configuration_id}', [ + 'org' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getConfiguration( org: 'generated', + configuration_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-a-code-security-configuration). + + +### code-security/delete-configuration + +Delete a code security configuration + +Using the `call` method: +```php +$client->call('DELETE /orgs/{org}/code-security/configurations/{configuration_id}', [ + 'org' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->deleteConfiguration( org: 'generated', + configuration_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#delete-a-code-security-configuration). + + +### code-security/update-configuration + +Update a code security configuration + +Using the `call` method: +```php +$client->call('PATCH /orgs/{org}/code-security/configurations/{configuration_id}', [ + 'org' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->updateConfiguration( org: 'generated', + configuration_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#update-a-code-security-configuration). + + +### code-security/attach-configuration + +Attach a configuration to repositories + +Using the `call` method: +```php +$client->call('POST /orgs/{org}/code-security/configurations/{configuration_id}/attach', [ + 'org' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->attachConfiguration( org: 'generated', + configuration_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#attach-a-configuration-to-repositories). + + +### code-security/set-configuration-as-default + +Set a code security configuration as a default for an organization + +Using the `call` method: +```php +$client->call('PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults', [ + 'org' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->setConfigurationAsDefault( org: 'generated', + configuration_id: 16, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization). + + +### code-security/get-repositories-for-configuration + +Get repositories associated with a code security configuration + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories', [ + 'org' => 'generated', + 'configuration_id' => 16, + 'before' => 'generated', + 'after' => 'generated', + 'per_page' => 8, + 'status' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getRepositoriesForConfiguration( org: 'generated', + configuration_id: 16, + before: 'generated', + after: 'generated', + per_page: 8, + status: 'generated', +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-repositories-associated-with-a-code-security-configuration). + + ### codespaces/list-in-organization List codespaces for the organization diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index a2f70aaf378..b6a81582dcf 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "38a45d7a3a3bb0ec70df310b701a186e", + "specHash": "75e34aeeed8a99a2532a8a0eee1f6ea6", "generatedFiles": { "files": [ { @@ -5868,15 +5868,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/ClientInterface.php", - "hash": "84700cb604b14b87083312daba6cc7f8" + "hash": "01e1fdab74c43fcf56b06d7ac0a32fa7" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Client.php", - "hash": "81cd59ca25ca820a19a2806140f0287e" + "hash": "8d8ba8da274fdb712916b09999f1009c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/OperationsInterface.php", - "hash": "45c728214984a39de0bb4caf3d913248" + "hash": "cf8544b1786c99c1927e9b1fb0c659db" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Meta.php", @@ -6024,7 +6024,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operations.php", - "hash": "28be9edb807fbfa63ac17fd91a613618" + "hash": "2143eb384c612442c045487e3b778179" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/WebHooks.php", @@ -12248,7 +12248,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Copilot.php", - "hash": "b0a63c8b49a71a7e53ff1667853490b5" + "hash": "dc0bf709d230cd54c4fb7c0ff3ebe963" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CheckAutomatedSecurityFixes.php", @@ -15264,7 +15264,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Copilot\/ListCopilotSeats.php", - "hash": "520f1c0a050a13f9f0edd4cdbf8563b7" + "hash": "67199a8b56e4b8892083d62fad534428" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Copilot\/ListCopilotSeatsTest.php", @@ -26232,7 +26232,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Copilot.php", - "hash": "9fdd97c3286f45b10c73383d4f6eb814" + "hash": "2e5edfe27af91ae6257454adf2f5dec1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Pulls.php", @@ -26720,15 +26720,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "0a3bd1955d6e93219dba943e6d14cdbd" + "hash": "b91ff0ccb6e5d418ecd54034ddd28f88" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "35a9f632cc4bbb15106ce2e90a8c5f80" + "hash": "2c2d3f2bdc52684bbed9da66f7550be8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "fa62c68707c48f32eea6934543fd417a" + "hash": "e34b82e487ab33acef47861f05497328" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", @@ -26752,11 +26752,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Five.php", - "hash": "e0dd9392090644b3b937fb490984a237" + "hash": "e6aec187eb682494ff744560c4c07e00" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Seven.php", - "hash": "5d1f49d1e9b37859dec0366fa1ee3d1d" + "hash": "ef2e9debd1f79dbfa111699d3342e41d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Two.php", @@ -26784,7 +26784,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Six.php", - "hash": "769e66aa0e18e1f39da6485b36f18fdb" + "hash": "5279493be1d48a781b97f6f7ae24abb2" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Three.php", @@ -26860,7 +26860,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Six.php", - "hash": "23423303b4599889f96aa0400f9751e8" + "hash": "9b8c980adfce919166be01a6d0106011" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Eight.php", @@ -26884,7 +26884,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Seven.php", - "hash": "c05b6ca82a42af6863ea64b590ae6f91" + "hash": "615a0c1cd776fa967c23c28c546960c1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Six.php", @@ -26924,11 +26924,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Routers.php", - "hash": "c98b4ade0408141bcbcde16efc2bc75b" + "hash": "944027f80579bb6f0d840d8338b965e5" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operators.php", - "hash": "c8305d02ebabf6ea6a952a8eee2089fb" + "hash": "d9a6313b4e8329794c17608cb9345c88" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php", @@ -29100,7 +29100,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "9f4f9152ad59da0023b1623900d10405" + "hash": "9e3abf15b31d96a88e852ac6f168bc24" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php", @@ -29944,11 +29944,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "583e837317220f9e198a3418747c0653" + "hash": "4f960102b2f332d72f7a4bceeeb1694d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "1fdede95fec86f4bd0ec7f1545133621" + "hash": "92e806abe91d503b47cc6f63ed6b7513" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -32088,7 +32088,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Copilot\/ListCopilotSeatsForEnterprise.php", - "hash": "0a1bd74bdbd945e1350b76136fe37bb3" + "hash": "0aec33152a5bf8a38167c6ca91659f52" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Copilot\/ListCopilotSeatsForEnterpriseTest.php", @@ -32109,6 +32109,202 @@ { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Copilot\/Billing\/Seats.php", "hash": "dd2678c524000db77657c3c452c5f784" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetConfigurationsForOrg.php", + "hash": "ab60ef1644c128d30e0e821f89cb4dce" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetConfigurationsForOrg.php", + "hash": "a97708e1cdf7f307b45dce0f264503ac" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetConfigurationsForOrgTest.php", + "hash": "56ce4363b2d864c1db7579117f9409d5" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/CreateConfiguration.php", + "hash": "e6516a4a5c14a6a3dbce390d95e4ac2d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/CreateConfiguration.php", + "hash": "3bf2a1a6d3de3eee99664d6554e2f8e4" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/CreateConfigurationTest.php", + "hash": "0d3b864e58eb7399be62b0f7d279592b" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetDefaultConfigurations.php", + "hash": "2f8d2b36e47c0a33d2f2cfde2f369b21" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetDefaultConfigurations.php", + "hash": "6d575ca75c4f958720efd0cba8ca4579" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetDefaultConfigurationsTest.php", + "hash": "d2410e69018f823e45c575f06f4095c1" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetConfiguration.php", + "hash": "3dc799ab26ab1458a12f7d7c263c0d4e" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetConfiguration.php", + "hash": "bf0da56402a3f1c70330ea355ec061d3" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetConfigurationTest.php", + "hash": "18206795604091715b895689042b67be" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/DeleteConfiguration.php", + "hash": "c27ee5e44ef4524be07a6989b159f2c4" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/DeleteConfiguration.php", + "hash": "2f3ad1b72ac2804b6fb974cb1317608d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/DeleteConfigurationTest.php", + "hash": "6e5abf592b0a321f3976f60203ba448d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/UpdateConfiguration.php", + "hash": "0e3a456f8754baaa494ad5dfd3ded0ed" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/UpdateConfiguration.php", + "hash": "bed755e51b5407852cd94610db1bac35" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/UpdateConfigurationTest.php", + "hash": "f4b4c9d8c6c289d6733238748b8e6a2a" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/AttachConfiguration.php", + "hash": "fc3b5b904b76cdec655b2d3a76e8f140" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/AttachConfiguration.php", + "hash": "c549f35777c93dd339258f5f2f503bad" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/AttachConfigurationTest.php", + "hash": "328fbb68903709f174f2f58f7d9b83e4" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/SetConfigurationAsDefault.php", + "hash": "b662af2e2714fd033ec20fc7b65e8deb" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/SetConfigurationAsDefault.php", + "hash": "fad1a5761fe49f2f6418f24a14aefc4c" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/SetConfigurationAsDefaultTest.php", + "hash": "852c8a9d2f10eb53dedf82db3f49522c" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetRepositoriesForConfiguration.php", + "hash": "eaadc328b8f801a6727741d20d49fa8d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetRepositoriesForConfiguration.php", + "hash": "3a5f58cdc041ab05a6fd24a08513cd6f" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetRepositoriesForConfigurationTest.php", + "hash": "6cfa9d7a9fbc7c9a95ccc0fe0835e47e" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfiguration.php", + "hash": "d94ba3a622d718e7ec874e77fc65d868" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurityDefaultConfigurations.php", + "hash": "85d03336fac0e1e90c630d90df85e229" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfigurationRepositories.php", + "hash": "666360ba722c9483b151a2c607e83932" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/AttachConfiguration\/Response\/ApplicationJson\/Accepted.php", + "hash": "3a1282d9abb5214748eb846de71b1c17" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/AttachConfiguration\/Response\/ApplicationJson\/Accepted\/Application\/Json.php", + "hash": "105138876e5948ceb8d835e27bdfe666" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/CreateConfiguration\/Request\/ApplicationJson.php", + "hash": "b4cec55b0aed4178544c881a49ee179f" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/UpdateConfiguration\/Request\/ApplicationJson.php", + "hash": "166fcab6ed5e6c75e0cf415a38e0af94" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/AttachConfiguration\/Request\/ApplicationJson.php", + "hash": "1934c3b21aa51e613db14e95ba5a62e9" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/SetConfigurationAsDefault\/Request\/ApplicationJson.php", + "hash": "f1cb4f50560f1f6e883345178c7430f6" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/SetConfigurationAsDefault\/Response\/ApplicationJson\/Ok.php", + "hash": "ce557582185935d42bebce869b6aacad" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeSecurity.php", + "hash": "b4e9849351f9e845209e3a9c2e814ab4" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/CodeSecurity.php", + "hash": "60e14df88608c35b96f9f5ef498a7f04" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeSecurity.php", + "hash": "7c94e6639ff510f87e817d3ce18ad95a" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/CodeSecurity.php", + "hash": "2988b3a8b9a22e963a201b274139be55" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/CodeSecurity.php", + "hash": "d6f4e713a49cdb0c4447609e25a4b0fe" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodeSecurity.php", + "hash": "7bc32485d783b7ae84688834a4e10474" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations.php", + "hash": "85b79d14128b3bca8dc657948e671b1a" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/Defaults.php", + "hash": "d8d8bb200f5309bf496eedcd1cdcb4b3" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId.php", + "hash": "4273ce08d8252d0344590b6ad964502e" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Attach.php", + "hash": "f9bb312af95b88375484439d2674a9c1" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Defaults.php", + "hash": "e85a772c9b6566d6dd53efbde2616ab7" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Repositories.php", + "hash": "23b30a87bad805880650628a6f7f32a1" } ] }, diff --git a/clients/GitHubEnterpriseCloud/src/Client.php b/clients/GitHubEnterpriseCloud/src/Client.php index 07a2bd2024f..cf5c7b36b9c 100644 --- a/clients/GitHubEnterpriseCloud/src/Client.php +++ b/clients/GitHubEnterpriseCloud/src/Client.php @@ -27,7 +27,7 @@ public function __construct(AuthenticationInterface $authentication, Browser $br } // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Root|iterable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GlobalAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Integration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\HookDelivery|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Installation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InstallationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Authorization|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ClassroomAssignment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Classroom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeOfConduct|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsEnterprisePermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelectedOrganizationsEnabledGithubActionsEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SelectedActions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnerGroupsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListOrgAccessToSelfHostedRunnerGroupInEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersInGroupForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GenerateRunnerJitconfigForEnterprise\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AuthenticationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\RemoveAllCustomLabelsFromSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AnnouncementBanner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AdvancedSecurityActiveCommitters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAllCostCenters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\AddResourceToCostCenter\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\RemoveResourceFromCostCenter\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackagesBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Feed|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BaseGist|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitignoreTemplate|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\License|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MarketplacePurchase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Thread|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSub|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRepoRoles\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroups|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgHook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InteractionLimitResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Codespace|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Migration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackageVersion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Project|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgCustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RuleSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupMapping|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussionComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Reaction|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamProject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectColumn|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RateLimitOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Artifact|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Job|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRunUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Workflow|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Autolink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchWithProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranch|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StatusCheckPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuitePreference|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Commit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedCommitStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommunityProfile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComparison|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentDirectory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentFile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSymlink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FileCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Deployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Environment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ShortBlob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Blob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitRef|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTag|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTree|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Import|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PorterAuthor|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Issue|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueEvent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeployKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Label|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Language|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\EnableLfsForRepo\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MergedUpstream|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Milestone|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuildStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuild|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageDeployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesHealthCheck|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestMergeResult|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Release|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseAsset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseNotesContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Stargazer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ParticipationStats|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Status|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositorySubscription|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TagProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Topic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CloneTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ViewTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MinimalRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseGroupList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\UserResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PrivateUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PublicUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceExportDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GpgKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Key|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SshSigningKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hovercard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StarredRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Repository + public function call(string $call, array $params = []): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Root|iterable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GlobalAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Integration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\HookDelivery|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Installation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InstallationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Authorization|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ClassroomAssignment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Classroom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeOfConduct|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsEnterprisePermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelectedOrganizationsEnabledGithubActionsEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SelectedActions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnerGroupsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListOrgAccessToSelfHostedRunnerGroupInEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersInGroupForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GenerateRunnerJitconfigForEnterprise\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AuthenticationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\RemoveAllCustomLabelsFromSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AnnouncementBanner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AdvancedSecurityActiveCommitters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAllCostCenters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\AddResourceToCostCenter\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\RemoveResourceFromCostCenter\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackagesBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Feed|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BaseGist|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitignoreTemplate|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\License|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MarketplacePurchase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Thread|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSub|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRepoRoles\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroups|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgHook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InteractionLimitResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Codespace|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Migration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackageVersion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Project|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgCustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RuleSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupMapping|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussionComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Reaction|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamProject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectColumn|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RateLimitOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Artifact|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Job|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRunUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Workflow|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Autolink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchWithProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranch|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StatusCheckPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuitePreference|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Commit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedCommitStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommunityProfile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComparison|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentDirectory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentFile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSymlink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FileCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Deployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Environment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ShortBlob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Blob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitRef|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTag|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTree|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Import|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PorterAuthor|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Issue|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueEvent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeployKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Label|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Language|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\EnableLfsForRepo\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MergedUpstream|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Milestone|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuildStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuild|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageDeployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesHealthCheck|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestMergeResult|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Release|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseAsset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseNotesContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Stargazer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ParticipationStats|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Status|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositorySubscription|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TagProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Topic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CloneTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ViewTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MinimalRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseGroupList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\UserResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PrivateUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PublicUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceExportDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GpgKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Key|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SshSigningKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hovercard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StarredRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Repository { [$method, $path] = explode(' ', $call); $pathChunks = explode('/', $path); diff --git a/clients/GitHubEnterpriseCloud/src/ClientInterface.php b/clients/GitHubEnterpriseCloud/src/ClientInterface.php index 78b21c1ac41..29b58c93d86 100644 --- a/clients/GitHubEnterpriseCloud/src/ClientInterface.php +++ b/clients/GitHubEnterpriseCloud/src/ClientInterface.php @@ -7,7 +7,7 @@ interface ClientInterface { // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Root|iterable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GlobalAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Integration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\HookDelivery|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Installation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InstallationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Authorization|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ClassroomAssignment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Classroom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeOfConduct|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsEnterprisePermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelectedOrganizationsEnabledGithubActionsEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SelectedActions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnerGroupsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListOrgAccessToSelfHostedRunnerGroupInEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersInGroupForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GenerateRunnerJitconfigForEnterprise\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AuthenticationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\RemoveAllCustomLabelsFromSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AnnouncementBanner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AdvancedSecurityActiveCommitters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAllCostCenters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\AddResourceToCostCenter\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\RemoveResourceFromCostCenter\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackagesBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Feed|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BaseGist|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitignoreTemplate|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\License|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MarketplacePurchase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Thread|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSub|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRepoRoles\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroups|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgHook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InteractionLimitResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Codespace|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Migration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackageVersion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Project|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgCustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RuleSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupMapping|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussionComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Reaction|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamProject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectColumn|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RateLimitOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Artifact|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Job|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRunUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Workflow|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Autolink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchWithProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranch|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StatusCheckPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuitePreference|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Commit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedCommitStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommunityProfile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComparison|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentDirectory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentFile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSymlink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FileCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Deployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Environment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ShortBlob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Blob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitRef|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTag|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTree|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Import|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PorterAuthor|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Issue|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueEvent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeployKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Label|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Language|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\EnableLfsForRepo\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MergedUpstream|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Milestone|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuildStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuild|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageDeployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesHealthCheck|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestMergeResult|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Release|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseAsset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseNotesContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Stargazer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ParticipationStats|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Status|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositorySubscription|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TagProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Topic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CloneTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ViewTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MinimalRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseGroupList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\UserResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PrivateUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PublicUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceExportDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GpgKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Key|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SshSigningKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hovercard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StarredRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Repository; + public function call(string $call, array $params = []): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Root|iterable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GlobalAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Integration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WebhookConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\HookDelivery|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Installation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InstallationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Authorization|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ClassroomAssignment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Classroom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeOfConduct|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsEnterprisePermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelectedOrganizationsEnabledGithubActionsEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SelectedActions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnerGroupsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsEnterprise|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListOrgAccessToSelfHostedRunnerGroupInEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersInGroupForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GenerateRunnerJitconfigForEnterprise\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AuthenticationToken|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\RemoveAllCustomLabelsFromSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AnnouncementBanner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\AdvancedSecurityActiveCommitters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAllCostCenters|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\AddResourceToCostCenter\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\RemoveResourceFromCostCenter\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackagesBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedBillingUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Feed|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GistComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BaseGist|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitignoreTemplate|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\License|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MarketplacePurchase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Thread|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSub|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListCustomRepoRoles\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroups|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgHook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\InteractionLimitResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Codespace|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CopilotSeatDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Migration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrganizationRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PackageVersion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Project|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OrgCustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RuleSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupMapping|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamFull|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamDiscussionComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Reaction|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamMembership|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamProject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectColumn|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RateLimitOverview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Artifact|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Job|\ApiClients\Client\GitHubEnterpriseCloud\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowRunUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsVariable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Workflow|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\WorkflowUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Autolink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchWithProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranch|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StatusCheckPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckRun|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuite|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuitePreference|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryInvitation|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Commit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CombinedCommitStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommunityProfile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComparison|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentDirectory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentFile|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSymlink|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\FileCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Deployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Environment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ShortBlob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Blob|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitCommit|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitRef|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTag|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GitTree|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hook|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Import|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PorterAuthor|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Issue|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueEvent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\DeployKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Label|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Language|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\EnableLfsForRepo\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\LicenseContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MergedUpstream|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Milestone|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuildStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageBuild|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PageDeployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesHealthCheck|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestMergeResult|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestSimple|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReview|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Release|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseAsset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseNotesContent|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningAlert|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SimpleUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Stargazer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ParticipationStats|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Status|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositorySubscription|\ApiClients\Client\GitHubEnterpriseCloud\Schema\TagProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Topic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CloneTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ViewTraffic|\ApiClients\Client\GitHubEnterpriseCloud\Schema\MinimalRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseGroupList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimEnterpriseUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\UserResponse|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUserList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PrivateUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\PublicUser|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceExportDetails|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GpgKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Key|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SshSigningKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Hovercard|\ApiClients\Client\GitHubEnterpriseCloud\Schema\StarredRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Repository; public function operations(): OperationsInterface; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php new file mode 100644 index 00000000000..48779eba30a --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations.php @@ -0,0 +1,620 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration(array $payload): CodeSecurityConfiguration + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['target_type'] ?? null; + + if ($value === null) { + $properties['targetType'] = null; + goto after_targetType; + } + + $properties['targetType'] = $value; + + after_targetType: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['advanced_security'] ?? null; + + if ($value === null) { + $properties['advancedSecurity'] = null; + goto after_advancedSecurity; + } + + $properties['advancedSecurity'] = $value; + + after_advancedSecurity: + + $value = $payload['dependency_graph'] ?? null; + + if ($value === null) { + $properties['dependencyGraph'] = null; + goto after_dependencyGraph; + } + + $properties['dependencyGraph'] = $value; + + after_dependencyGraph: + + $value = $payload['dependabot_alerts'] ?? null; + + if ($value === null) { + $properties['dependabotAlerts'] = null; + goto after_dependabotAlerts; + } + + $properties['dependabotAlerts'] = $value; + + after_dependabotAlerts: + + $value = $payload['dependabot_security_updates'] ?? null; + + if ($value === null) { + $properties['dependabotSecurityUpdates'] = null; + goto after_dependabotSecurityUpdates; + } + + $properties['dependabotSecurityUpdates'] = $value; + + after_dependabotSecurityUpdates: + + $value = $payload['code_scanning_default_setup'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetup'] = null; + goto after_codeScanningDefaultSetup; + } + + $properties['codeScanningDefaultSetup'] = $value; + + after_codeScanningDefaultSetup: + + $value = $payload['secret_scanning'] ?? null; + + if ($value === null) { + $properties['secretScanning'] = null; + goto after_secretScanning; + } + + $properties['secretScanning'] = $value; + + after_secretScanning: + + $value = $payload['secret_scanning_push_protection'] ?? null; + + if ($value === null) { + $properties['secretScanningPushProtection'] = null; + goto after_secretScanningPushProtection; + } + + $properties['secretScanningPushProtection'] = $value; + + after_secretScanningPushProtection: + + $value = $payload['private_vulnerability_reporting'] ?? null; + + if ($value === null) { + $properties['privateVulnerabilityReporting'] = null; + goto after_privateVulnerabilityReporting; + } + + $properties['privateVulnerabilityReporting'] = $value; + + after_privateVulnerabilityReporting: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeSecurityConfiguration::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeSecurityConfiguration(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration(mixed $object): mixed + { + assert($object instanceof CodeSecurityConfiguration); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $targetType = $object->targetType; + + if ($targetType === null) { + goto after_targetType; + } + + after_targetType: $result['target_type'] = $targetType; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $advancedSecurity = $object->advancedSecurity; + + if ($advancedSecurity === null) { + goto after_advancedSecurity; + } + + after_advancedSecurity: $result['advanced_security'] = $advancedSecurity; + + $dependencyGraph = $object->dependencyGraph; + + if ($dependencyGraph === null) { + goto after_dependencyGraph; + } + + after_dependencyGraph: $result['dependency_graph'] = $dependencyGraph; + + $dependabotAlerts = $object->dependabotAlerts; + + if ($dependabotAlerts === null) { + goto after_dependabotAlerts; + } + + after_dependabotAlerts: $result['dependabot_alerts'] = $dependabotAlerts; + + $dependabotSecurityUpdates = $object->dependabotSecurityUpdates; + + if ($dependabotSecurityUpdates === null) { + goto after_dependabotSecurityUpdates; + } + + after_dependabotSecurityUpdates: $result['dependabot_security_updates'] = $dependabotSecurityUpdates; + + $codeScanningDefaultSetup = $object->codeScanningDefaultSetup; + + if ($codeScanningDefaultSetup === null) { + goto after_codeScanningDefaultSetup; + } + + after_codeScanningDefaultSetup: $result['code_scanning_default_setup'] = $codeScanningDefaultSetup; + + $secretScanning = $object->secretScanning; + + if ($secretScanning === null) { + goto after_secretScanning; + } + + after_secretScanning: $result['secret_scanning'] = $secretScanning; + + $secretScanningPushProtection = $object->secretScanningPushProtection; + + if ($secretScanningPushProtection === null) { + goto after_secretScanningPushProtection; + } + + after_secretScanningPushProtection: $result['secret_scanning_push_protection'] = $secretScanningPushProtection; + + $privateVulnerabilityReporting = $object->privateVulnerabilityReporting; + + if ($privateVulnerabilityReporting === null) { + goto after_privateVulnerabilityReporting; + } + + after_privateVulnerabilityReporting: $result['private_vulnerability_reporting'] = $privateVulnerabilityReporting; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php new file mode 100644 index 00000000000..b20a16ee468 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId.php @@ -0,0 +1,771 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ScimError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration(array $payload): CodeSecurityConfiguration + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['target_type'] ?? null; + + if ($value === null) { + $properties['targetType'] = null; + goto after_targetType; + } + + $properties['targetType'] = $value; + + after_targetType: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['advanced_security'] ?? null; + + if ($value === null) { + $properties['advancedSecurity'] = null; + goto after_advancedSecurity; + } + + $properties['advancedSecurity'] = $value; + + after_advancedSecurity: + + $value = $payload['dependency_graph'] ?? null; + + if ($value === null) { + $properties['dependencyGraph'] = null; + goto after_dependencyGraph; + } + + $properties['dependencyGraph'] = $value; + + after_dependencyGraph: + + $value = $payload['dependabot_alerts'] ?? null; + + if ($value === null) { + $properties['dependabotAlerts'] = null; + goto after_dependabotAlerts; + } + + $properties['dependabotAlerts'] = $value; + + after_dependabotAlerts: + + $value = $payload['dependabot_security_updates'] ?? null; + + if ($value === null) { + $properties['dependabotSecurityUpdates'] = null; + goto after_dependabotSecurityUpdates; + } + + $properties['dependabotSecurityUpdates'] = $value; + + after_dependabotSecurityUpdates: + + $value = $payload['code_scanning_default_setup'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetup'] = null; + goto after_codeScanningDefaultSetup; + } + + $properties['codeScanningDefaultSetup'] = $value; + + after_codeScanningDefaultSetup: + + $value = $payload['secret_scanning'] ?? null; + + if ($value === null) { + $properties['secretScanning'] = null; + goto after_secretScanning; + } + + $properties['secretScanning'] = $value; + + after_secretScanning: + + $value = $payload['secret_scanning_push_protection'] ?? null; + + if ($value === null) { + $properties['secretScanningPushProtection'] = null; + goto after_secretScanningPushProtection; + } + + $properties['secretScanningPushProtection'] = $value; + + after_secretScanningPushProtection: + + $value = $payload['private_vulnerability_reporting'] ?? null; + + if ($value === null) { + $properties['privateVulnerabilityReporting'] = null; + goto after_privateVulnerabilityReporting; + } + + $properties['privateVulnerabilityReporting'] = $value; + + after_privateVulnerabilityReporting: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeSecurityConfiguration::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeSecurityConfiguration(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ScimError(array $payload): ScimError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['detail'] ?? null; + + if ($value === null) { + $properties['detail'] = null; + goto after_detail; + } + + $properties['detail'] = $value; + + after_detail: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['scim_type'] ?? null; + + if ($value === null) { + $properties['scimType'] = null; + goto after_scimType; + } + + $properties['scimType'] = $value; + + after_scimType: + + $value = $payload['schemas'] ?? null; + + if ($value === null) { + $properties['schemas'] = null; + goto after_schemas; + } + + $properties['schemas'] = $value; + + after_schemas: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ScimError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ScimError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ScimError($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration(mixed $object): mixed + { + assert($object instanceof CodeSecurityConfiguration); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $targetType = $object->targetType; + + if ($targetType === null) { + goto after_targetType; + } + + after_targetType: $result['target_type'] = $targetType; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $advancedSecurity = $object->advancedSecurity; + + if ($advancedSecurity === null) { + goto after_advancedSecurity; + } + + after_advancedSecurity: $result['advanced_security'] = $advancedSecurity; + + $dependencyGraph = $object->dependencyGraph; + + if ($dependencyGraph === null) { + goto after_dependencyGraph; + } + + after_dependencyGraph: $result['dependency_graph'] = $dependencyGraph; + + $dependabotAlerts = $object->dependabotAlerts; + + if ($dependabotAlerts === null) { + goto after_dependabotAlerts; + } + + after_dependabotAlerts: $result['dependabot_alerts'] = $dependabotAlerts; + + $dependabotSecurityUpdates = $object->dependabotSecurityUpdates; + + if ($dependabotSecurityUpdates === null) { + goto after_dependabotSecurityUpdates; + } + + after_dependabotSecurityUpdates: $result['dependabot_security_updates'] = $dependabotSecurityUpdates; + + $codeScanningDefaultSetup = $object->codeScanningDefaultSetup; + + if ($codeScanningDefaultSetup === null) { + goto after_codeScanningDefaultSetup; + } + + after_codeScanningDefaultSetup: $result['code_scanning_default_setup'] = $codeScanningDefaultSetup; + + $secretScanning = $object->secretScanning; + + if ($secretScanning === null) { + goto after_secretScanning; + } + + after_secretScanning: $result['secret_scanning'] = $secretScanning; + + $secretScanningPushProtection = $object->secretScanningPushProtection; + + if ($secretScanningPushProtection === null) { + goto after_secretScanningPushProtection; + } + + after_secretScanningPushProtection: $result['secret_scanning_push_protection'] = $secretScanningPushProtection; + + $privateVulnerabilityReporting = $object->privateVulnerabilityReporting; + + if ($privateVulnerabilityReporting === null) { + goto after_privateVulnerabilityReporting; + } + + after_privateVulnerabilityReporting: $result['private_vulnerability_reporting'] = $privateVulnerabilityReporting; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ScimError(mixed $object): mixed + { + assert($object instanceof ScimError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $detail = $object->detail; + + if ($detail === null) { + goto after_detail; + } + + after_detail: $result['detail'] = $detail; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + $scimType = $object->scimType; + + if ($scimType === null) { + goto after_scimType; + } + + after_scimType: $result['scim_type'] = $scimType; + + $schemas = $object->schemas; + + if ($schemas === null) { + goto after_schemas; + } + + static $schemasSerializer0; + + if ($schemasSerializer0 === null) { + $schemasSerializer0 = new SerializeArrayItems(...[]); + } + + $schemas = $schemasSerializer0->serialize($schemas, $this); + after_schemas: $result['schemas'] = $schemas; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Attach.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Attach.php new file mode 100644 index 00000000000..71359b7bb0b --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Attach.php @@ -0,0 +1,178 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php new file mode 100644 index 00000000000..d8fc0f28390 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php @@ -0,0 +1,700 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok + { + $properties = []; + $missingFields = []; + try { + $value = $payload['default_for_new_repos'] ?? null; + + if ($value === null) { + $properties['defaultForNewRepos'] = null; + goto after_defaultForNewRepos; + } + + $properties['defaultForNewRepos'] = $value; + + after_defaultForNewRepos: + + $value = $payload['configuration'] ?? null; + + if ($value === null) { + $properties['configuration'] = null; + goto after_configuration; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'configuration'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['configuration'] = $value; + + after_configuration: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Ok(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration(array $payload): CodeSecurityConfiguration + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['name'] ?? null; + + if ($value === null) { + $properties['name'] = null; + goto after_name; + } + + $properties['name'] = $value; + + after_name: + + $value = $payload['target_type'] ?? null; + + if ($value === null) { + $properties['targetType'] = null; + goto after_targetType; + } + + $properties['targetType'] = $value; + + after_targetType: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['advanced_security'] ?? null; + + if ($value === null) { + $properties['advancedSecurity'] = null; + goto after_advancedSecurity; + } + + $properties['advancedSecurity'] = $value; + + after_advancedSecurity: + + $value = $payload['dependency_graph'] ?? null; + + if ($value === null) { + $properties['dependencyGraph'] = null; + goto after_dependencyGraph; + } + + $properties['dependencyGraph'] = $value; + + after_dependencyGraph: + + $value = $payload['dependabot_alerts'] ?? null; + + if ($value === null) { + $properties['dependabotAlerts'] = null; + goto after_dependabotAlerts; + } + + $properties['dependabotAlerts'] = $value; + + after_dependabotAlerts: + + $value = $payload['dependabot_security_updates'] ?? null; + + if ($value === null) { + $properties['dependabotSecurityUpdates'] = null; + goto after_dependabotSecurityUpdates; + } + + $properties['dependabotSecurityUpdates'] = $value; + + after_dependabotSecurityUpdates: + + $value = $payload['code_scanning_default_setup'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetup'] = null; + goto after_codeScanningDefaultSetup; + } + + $properties['codeScanningDefaultSetup'] = $value; + + after_codeScanningDefaultSetup: + + $value = $payload['secret_scanning'] ?? null; + + if ($value === null) { + $properties['secretScanning'] = null; + goto after_secretScanning; + } + + $properties['secretScanning'] = $value; + + after_secretScanning: + + $value = $payload['secret_scanning_push_protection'] ?? null; + + if ($value === null) { + $properties['secretScanningPushProtection'] = null; + goto after_secretScanningPushProtection; + } + + $properties['secretScanningPushProtection'] = $value; + + after_secretScanningPushProtection: + + $value = $payload['private_vulnerability_reporting'] ?? null; + + if ($value === null) { + $properties['privateVulnerabilityReporting'] = null; + goto after_privateVulnerabilityReporting; + } + + $properties['privateVulnerabilityReporting'] = $value; + + after_privateVulnerabilityReporting: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['html_url'] ?? null; + + if ($value === null) { + $properties['htmlUrl'] = null; + goto after_htmlUrl; + } + + $properties['htmlUrl'] = $value; + + after_htmlUrl: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $properties['updatedAt'] = null; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeSecurityConfiguration::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeSecurityConfiguration(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed + { + assert($object instanceof Ok); + $result = []; + + $defaultForNewRepos = $object->defaultForNewRepos; + + if ($defaultForNewRepos === null) { + goto after_defaultForNewRepos; + } + + after_defaultForNewRepos: $result['default_for_new_repos'] = $defaultForNewRepos; + + $configuration = $object->configuration; + + if ($configuration === null) { + goto after_configuration; + } + + $configuration = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($configuration); + after_configuration: $result['configuration'] = $configuration; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration(mixed $object): mixed + { + assert($object instanceof CodeSecurityConfiguration); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $targetType = $object->targetType; + + if ($targetType === null) { + goto after_targetType; + } + + after_targetType: $result['target_type'] = $targetType; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $advancedSecurity = $object->advancedSecurity; + + if ($advancedSecurity === null) { + goto after_advancedSecurity; + } + + after_advancedSecurity: $result['advanced_security'] = $advancedSecurity; + + $dependencyGraph = $object->dependencyGraph; + + if ($dependencyGraph === null) { + goto after_dependencyGraph; + } + + after_dependencyGraph: $result['dependency_graph'] = $dependencyGraph; + + $dependabotAlerts = $object->dependabotAlerts; + + if ($dependabotAlerts === null) { + goto after_dependabotAlerts; + } + + after_dependabotAlerts: $result['dependabot_alerts'] = $dependabotAlerts; + + $dependabotSecurityUpdates = $object->dependabotSecurityUpdates; + + if ($dependabotSecurityUpdates === null) { + goto after_dependabotSecurityUpdates; + } + + after_dependabotSecurityUpdates: $result['dependabot_security_updates'] = $dependabotSecurityUpdates; + + $codeScanningDefaultSetup = $object->codeScanningDefaultSetup; + + if ($codeScanningDefaultSetup === null) { + goto after_codeScanningDefaultSetup; + } + + after_codeScanningDefaultSetup: $result['code_scanning_default_setup'] = $codeScanningDefaultSetup; + + $secretScanning = $object->secretScanning; + + if ($secretScanning === null) { + goto after_secretScanning; + } + + after_secretScanning: $result['secret_scanning'] = $secretScanning; + + $secretScanningPushProtection = $object->secretScanningPushProtection; + + if ($secretScanningPushProtection === null) { + goto after_secretScanningPushProtection; + } + + after_secretScanningPushProtection: $result['secret_scanning_push_protection'] = $secretScanningPushProtection; + + $privateVulnerabilityReporting = $object->privateVulnerabilityReporting; + + if ($privateVulnerabilityReporting === null) { + goto after_privateVulnerabilityReporting; + } + + after_privateVulnerabilityReporting: $result['private_vulnerability_reporting'] = $privateVulnerabilityReporting; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + + if ($htmlUrl === null) { + goto after_htmlUrl; + } + + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $updatedAt = $object->updatedAt; + + if ($updatedAt === null) { + goto after_updatedAt; + } + + after_updatedAt: $result['updated_at'] = $updatedAt; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Repositories.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Repositories.php new file mode 100644 index 00000000000..a6a448591b5 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Repositories.php @@ -0,0 +1,286 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/Defaults.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/Defaults.php new file mode 100644 index 00000000000..bc69518615d --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/Defaults.php @@ -0,0 +1,286 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + default => throw new LogicException('No serialization defined for $className'), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php index c68caf239a1..2aed0b74b34 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php @@ -150,6 +150,12 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Orgs\Org\Blocks|null $operation🌀Orgs🌀Org🌀Blocks = null; private Internal\Hydrator\Operation\Orgs\Org\Blocks\Username|null $operation🌀Orgs🌀Org🌀Blocks🌀Username = null; private Internal\Hydrator\Operation\Orgs\Org\CodeScanning\Alerts|null $operation🌀Orgs🌀Org🌀CodeScanning🌀Alerts = null; + private Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations|null $operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations = null; + private Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\Defaults|null $operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀Defaults = null; + private Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId|null $operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId = null; + private Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Attach|null $operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach = null; + private Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Defaults|null $operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults = null; + private Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Repositories|null $operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories = null; private Internal\Hydrator\Operation\Orgs\Org\Codespaces|null $operation🌀Orgs🌀Org🌀Codespaces = null; private Internal\Hydrator\Operation\Orgs\Org\Codespaces\Access|null $operation🌀Orgs🌀Org🌀Codespaces🌀Access = null; private Internal\Hydrator\Operation\Orgs\Org\Codespaces\Access\SelectedUsers|null $operation🌀Orgs🌀Org🌀Codespaces🌀Access🌀SelectedUsers = null; @@ -841,6 +847,9 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Actions\\ListOrgVariables\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\OrganizationActionsVariable' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Actions\\ListSelectedReposForOrgVariable\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name🌀Repositories()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Codespaces\\ListInOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Codespaces\\ListOrgSecrets\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodespacesPublicKey' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀PublicKey()->hydrateObject($className, $payload), @@ -1210,6 +1219,9 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Actions\\ListOrgVariables\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\OrganizationActionsVariable' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Actions\\ListSelectedReposForOrgVariable\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Actions🌀Variables🌀Name🌀Repositories()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Codespaces\\ListInOrganization\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Codespaces\\ListOrgSecrets\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodespacesPublicKey' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces🌀Secrets🌀PublicKey()->serializeObject($object), @@ -2753,6 +2765,60 @@ public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeScanning🌀Alert return $this->operation🌀Orgs🌀Org🌀CodeScanning🌀Alerts; } + public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations(): Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations + { + if ($this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations instanceof Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations === false) { + $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations = new Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations(); + } + + return $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀Defaults(): Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\Defaults + { + if ($this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀Defaults instanceof Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\Defaults === false) { + $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀Defaults = new Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\Defaults(); + } + + return $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀Defaults; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId(): Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId + { + if ($this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId instanceof Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId === false) { + $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId = new Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId(); + } + + return $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach(): Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Attach + { + if ($this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach instanceof Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Attach === false) { + $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach = new Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Attach(); + } + + return $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults(): Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Defaults + { + if ($this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults instanceof Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Defaults === false) { + $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults = new Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Defaults(); + } + + return $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories(): Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Repositories + { + if ($this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories instanceof Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Repositories === false) { + $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories = new Internal\Hydrator\Operation\Orgs\Org\CodeSecurity\Configurations\ConfigurationId\Repositories(); + } + + return $this->operation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories; + } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Codespaces(): Internal\Hydrator\Operation\Orgs\Org\Codespaces { if ($this->operation🌀Orgs🌀Org🌀Codespaces instanceof Internal\Hydrator\Operation\Orgs\Org\Codespaces === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/AttachConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/AttachConfiguration.php new file mode 100644 index 00000000000..ce36a906f87 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/AttachConfiguration.php @@ -0,0 +1,65 @@ +org = $org; + $this->configurationId = $configurationId; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\AttachConfiguration\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', str_replace(['{org}', '{configuration_id}'], [$this->org, $this->configurationId], '/orgs/{org}/code-security/configurations/{configuration_id}/attach'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Accepted + **/ + case 202: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/CreateConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/CreateConfiguration.php new file mode 100644 index 00000000000..974287de568 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/CreateConfiguration.php @@ -0,0 +1,62 @@ +org = $org; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\CreateConfiguration\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', str_replace(['{org}'], [$this->org], '/orgs/{org}/code-security/configurations'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\CodeSecurityConfiguration + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Successfully created code security configuration + **/ + case 201: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeSecurityConfiguration::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\CodeSecurityConfiguration::class, $body); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/DeleteConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/DeleteConfiguration.php new file mode 100644 index 00000000000..74cdb9f7462 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/DeleteConfiguration.php @@ -0,0 +1,109 @@ +org = $org; + $this->configurationId = $configurationId; + } + + public function createRequest(): RequestInterface + { + return new Request('DELETE', str_replace(['{org}', '{configuration_id}'], [$this->org, $this->configurationId], '/orgs/{org}/code-security/configurations/{configuration_id}')); + } + + public function createResponse(ResponseInterface $response): WithoutBody + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Bad Request + **/ + case 400: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(400, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Conflict + **/ + + case 409: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + case 'application/scim+json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Bad Request + **/ + case 400: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ScimError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\ScimError(400, $this->hydrator->hydrateObject(Schema\ScimError::class, $body)); + } + + break; + } + + switch ($code) { + /** + * A header with no content is returned. + **/ + case 204: + return new WithoutBody(204, []); + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfiguration.php new file mode 100644 index 00000000000..d5ee89654c7 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfiguration.php @@ -0,0 +1,88 @@ +org = $org; + $this->configurationId = $configurationId; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{configuration_id}'], [$this->org, $this->configurationId], '/orgs/{org}/code-security/configurations/{configuration_id}')); + } + + public function createResponse(ResponseInterface $response): Schema\CodeSecurityConfiguration|WithoutBody + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeSecurityConfiguration::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\CodeSecurityConfiguration::class, $body); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + switch ($code) { + /** + * Not modified + **/ + case 304: + return new WithoutBody(304, []); + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfigurationsForOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfigurationsForOrg.php new file mode 100644 index 00000000000..cf8e8bfcdad --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfigurationsForOrg.php @@ -0,0 +1,103 @@ +org = $org; + $this->before = $before; + $this->after = $after; + $this->targetType = $targetType; + $this->perPage = $perPage; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{before}', '{after}', '{target_type}', '{per_page}'], [$this->org, $this->before, $this->after, $this->targetType, $this->perPage], '/orgs/{org}/code-security/configurations' . '?before={before}&after={after}&target_type={target_type}&per_page={per_page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\CodeSecurityConfiguration { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeSecurityConfiguration::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\CodeSecurityConfiguration::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetDefaultConfigurations.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetDefaultConfigurations.php new file mode 100644 index 00000000000..02aae23ace3 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetDefaultConfigurations.php @@ -0,0 +1,99 @@ +org = $org; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/code-security/configurations/defaults')); + } + + /** @return Observable|WithoutBody */ + public function createResponse(ResponseInterface $response): Observable|WithoutBody + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\CodeSecurityDefaultConfigurations { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeSecurityDefaultConfigurations::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\CodeSecurityDefaultConfigurations::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + switch ($code) { + /** + * Not modified + **/ + case 304: + return new WithoutBody(304, []); + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetRepositoriesForConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetRepositoriesForConfiguration.php new file mode 100644 index 00000000000..a86f6cdd893 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetRepositoriesForConfiguration.php @@ -0,0 +1,107 @@ +org = $org; + $this->configurationId = $configurationId; + $this->before = $before; + $this->after = $after; + $this->perPage = $perPage; + $this->status = $status; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{configuration_id}', '{before}', '{after}', '{per_page}', '{status}'], [$this->org, $this->configurationId, $this->before, $this->after, $this->perPage, $this->status], '/orgs/{org}/code-security/configurations/{configuration_id}/repositories' . '?before={before}&after={after}&per_page={per_page}&status={status}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\CodeSecurityConfigurationRepositories { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeSecurityConfigurationRepositories::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\CodeSecurityConfigurationRepositories::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefault.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefault.php new file mode 100644 index 00000000000..3839650f381 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefault.php @@ -0,0 +1,82 @@ +org = $org; + $this->configurationId = $configurationId; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('PUT', str_replace(['{org}', '{configuration_id}'], [$this->org, $this->configurationId], '/orgs/{org}/code-security/configurations/{configuration_id}/defaults'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Default successfully changed. + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok::class, $body); + /** + * Forbidden + **/ + + case 403: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(403, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/UpdateConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/UpdateConfiguration.php new file mode 100644 index 00000000000..8429447931d --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/UpdateConfiguration.php @@ -0,0 +1,74 @@ +org = $org; + $this->configurationId = $configurationId; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('PATCH', str_replace(['{org}', '{configuration_id}'], [$this->org, $this->configurationId], '/orgs/{org}/code-security/configurations/{configuration_id}'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\CodeSecurityConfiguration|WithoutBody + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response when a configuration is updated + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeSecurityConfiguration::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\CodeSecurityConfiguration::class, $body); + } + + break; + } + + switch ($code) { + /** + * Response when no new updates are made + **/ + case 204: + return new WithoutBody(204, []); + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/AttachConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/AttachConfiguration.php new file mode 100644 index 00000000000..51459cfe076 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/AttachConfiguration.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $configurationId); + $request = $operation->createRequest($params); + $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): Json { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/CreateConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/CreateConfiguration.php new file mode 100644 index 00000000000..5ca46bc16dd --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/CreateConfiguration.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); + $request = $operation->createRequest($params); + $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): CodeSecurityConfiguration { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/DeleteConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/DeleteConfiguration.php new file mode 100644 index 00000000000..25fb2e8b6ee --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/DeleteConfiguration.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org, $configurationId); + $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): WithoutBody { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfiguration.php new file mode 100644 index 00000000000..a431f1e90dd --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfiguration.php @@ -0,0 +1,41 @@ +responseSchemaValidator, $this->hydrator, $org, $configurationId); + $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): CodeSecurityConfiguration|WithoutBody { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfigurationsForOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfigurationsForOrg.php new file mode 100644 index 00000000000..892d2923c6c --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfigurationsForOrg.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, string $before, string $after, string $targetType = 'all', int $perPage = 30): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeSecurity\GetConfigurationsForOrg($this->responseSchemaValidator, $this->hydrator, $org, $before, $after, $targetType, $perPage); + $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); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetDefaultConfigurations.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetDefaultConfigurations.php new file mode 100644 index 00000000000..e7c471b2025 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetDefaultConfigurations.php @@ -0,0 +1,42 @@ +|WithoutBody */ + public function call(string $org): iterable|WithoutBody + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeSecurity\GetDefaultConfigurations($this->responseSchemaValidator, $this->hydrator, $org); + $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|WithoutBody { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetRepositoriesForConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetRepositoriesForConfiguration.php new file mode 100644 index 00000000000..8f5dffb2922 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetRepositoriesForConfiguration.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, int $configurationId, string $before, string $after, int $perPage = 30, string $status = 'all'): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeSecurity\GetRepositoriesForConfiguration($this->responseSchemaValidator, $this->hydrator, $org, $configurationId, $before, $after, $perPage, $status); + $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); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefault.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefault.php new file mode 100644 index 00000000000..22505e0bdef --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefault.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $configurationId); + $request = $operation->createRequest($params); + $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): Ok { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/UpdateConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/UpdateConfiguration.php new file mode 100644 index 00000000000..9ada7dafef9 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/UpdateConfiguration.php @@ -0,0 +1,41 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $configurationId); + $request = $operation->createRequest($params); + $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): CodeSecurityConfiguration|WithoutBody { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeats.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeats.php index 917be298e64..43bce698ed0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeats.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeats.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, int $page = 1, int $perPage = 50): Json { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Copilot\ListCopilotSeats($this->responseSchemaValidator, $this->hydrator, $org, $page, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeatsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeatsForEnterprise.php index 48ee079fb24..5da21ff32c5 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeatsForEnterprise.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Copilot/ListCopilotSeatsForEnterprise.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $enterprise, int $page = 1, int $perPage = 50): Ok { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Copilot\ListCopilotSeatsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $page, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operators.php b/clients/GitHubEnterpriseCloud/src/Internal/Operators.php index 15187c3d3a5..57dbc7a5e0f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operators.php @@ -246,6 +246,15 @@ final class Operators private Internal\Operator\Orgs\UnblockUser|null $orgs👷UnblockUser = null; private Internal\Operator\CodeScanning\ListAlertsForOrg|null $codeScanning👷ListAlertsForOrg = null; private Internal\Operator\CodeScanning\ListAlertsForOrgListing|null $codeScanning👷ListAlertsForOrgListing = null; + private Internal\Operator\CodeSecurity\GetConfigurationsForOrg|null $codeSecurity👷GetConfigurationsForOrg = null; + private Internal\Operator\CodeSecurity\CreateConfiguration|null $codeSecurity👷CreateConfiguration = null; + private Internal\Operator\CodeSecurity\GetDefaultConfigurations|null $codeSecurity👷GetDefaultConfigurations = null; + private Internal\Operator\CodeSecurity\GetConfiguration|null $codeSecurity👷GetConfiguration = null; + private Internal\Operator\CodeSecurity\DeleteConfiguration|null $codeSecurity👷DeleteConfiguration = null; + private Internal\Operator\CodeSecurity\UpdateConfiguration|null $codeSecurity👷UpdateConfiguration = null; + private Internal\Operator\CodeSecurity\AttachConfiguration|null $codeSecurity👷AttachConfiguration = null; + private Internal\Operator\CodeSecurity\SetConfigurationAsDefault|null $codeSecurity👷SetConfigurationAsDefault = null; + private Internal\Operator\CodeSecurity\GetRepositoriesForConfiguration|null $codeSecurity👷GetRepositoriesForConfiguration = null; private Internal\Operator\Codespaces\ListInOrganization|null $codespaces👷ListInOrganization = null; private Internal\Operator\Codespaces\SetCodespacesAccess|null $codespaces👷SetCodespacesAccess = null; private Internal\Operator\Codespaces\SetCodespacesAccessUsers|null $codespaces👷SetCodespacesAccessUsers = null; @@ -3363,6 +3372,87 @@ public function codeScanning👷ListAlertsForOrgListing(): Internal\Operator\Cod return $this->codeScanning👷ListAlertsForOrgListing; } + public function codeSecurity👷GetConfigurationsForOrg(): Internal\Operator\CodeSecurity\GetConfigurationsForOrg + { + if ($this->codeSecurity👷GetConfigurationsForOrg instanceof Internal\Operator\CodeSecurity\GetConfigurationsForOrg === false) { + $this->codeSecurity👷GetConfigurationsForOrg = new Internal\Operator\CodeSecurity\GetConfigurationsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()); + } + + return $this->codeSecurity👷GetConfigurationsForOrg; + } + + public function codeSecurity👷CreateConfiguration(): Internal\Operator\CodeSecurity\CreateConfiguration + { + if ($this->codeSecurity👷CreateConfiguration instanceof Internal\Operator\CodeSecurity\CreateConfiguration === false) { + $this->codeSecurity👷CreateConfiguration = new Internal\Operator\CodeSecurity\CreateConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()); + } + + return $this->codeSecurity👷CreateConfiguration; + } + + public function codeSecurity👷GetDefaultConfigurations(): Internal\Operator\CodeSecurity\GetDefaultConfigurations + { + if ($this->codeSecurity👷GetDefaultConfigurations instanceof Internal\Operator\CodeSecurity\GetDefaultConfigurations === false) { + $this->codeSecurity👷GetDefaultConfigurations = new Internal\Operator\CodeSecurity\GetDefaultConfigurations($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀Defaults()); + } + + return $this->codeSecurity👷GetDefaultConfigurations; + } + + public function codeSecurity👷GetConfiguration(): Internal\Operator\CodeSecurity\GetConfiguration + { + if ($this->codeSecurity👷GetConfiguration instanceof Internal\Operator\CodeSecurity\GetConfiguration === false) { + $this->codeSecurity👷GetConfiguration = new Internal\Operator\CodeSecurity\GetConfiguration($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + } + + return $this->codeSecurity👷GetConfiguration; + } + + public function codeSecurity👷DeleteConfiguration(): Internal\Operator\CodeSecurity\DeleteConfiguration + { + if ($this->codeSecurity👷DeleteConfiguration instanceof Internal\Operator\CodeSecurity\DeleteConfiguration === false) { + $this->codeSecurity👷DeleteConfiguration = new Internal\Operator\CodeSecurity\DeleteConfiguration($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + } + + return $this->codeSecurity👷DeleteConfiguration; + } + + public function codeSecurity👷UpdateConfiguration(): Internal\Operator\CodeSecurity\UpdateConfiguration + { + if ($this->codeSecurity👷UpdateConfiguration instanceof Internal\Operator\CodeSecurity\UpdateConfiguration === false) { + $this->codeSecurity👷UpdateConfiguration = new Internal\Operator\CodeSecurity\UpdateConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + } + + return $this->codeSecurity👷UpdateConfiguration; + } + + public function codeSecurity👷AttachConfiguration(): Internal\Operator\CodeSecurity\AttachConfiguration + { + if ($this->codeSecurity👷AttachConfiguration instanceof Internal\Operator\CodeSecurity\AttachConfiguration === false) { + $this->codeSecurity👷AttachConfiguration = new Internal\Operator\CodeSecurity\AttachConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()); + } + + return $this->codeSecurity👷AttachConfiguration; + } + + public function codeSecurity👷SetConfigurationAsDefault(): Internal\Operator\CodeSecurity\SetConfigurationAsDefault + { + if ($this->codeSecurity👷SetConfigurationAsDefault instanceof Internal\Operator\CodeSecurity\SetConfigurationAsDefault === false) { + $this->codeSecurity👷SetConfigurationAsDefault = new Internal\Operator\CodeSecurity\SetConfigurationAsDefault($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()); + } + + return $this->codeSecurity👷SetConfigurationAsDefault; + } + + public function codeSecurity👷GetRepositoriesForConfiguration(): Internal\Operator\CodeSecurity\GetRepositoriesForConfiguration + { + if ($this->codeSecurity👷GetRepositoriesForConfiguration instanceof Internal\Operator\CodeSecurity\GetRepositoriesForConfiguration === false) { + $this->codeSecurity👷GetRepositoriesForConfiguration = new Internal\Operator\CodeSecurity\GetRepositoriesForConfiguration($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories()); + } + + return $this->codeSecurity👷GetRepositoriesForConfiguration; + } + public function codespaces👷ListInOrganization(): Internal\Operator\Codespaces\ListInOrganization { if ($this->codespaces👷ListInOrganization instanceof Internal\Operator\Codespaces\ListInOrganization === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/CodeSecurity.php new file mode 100644 index 00000000000..06aa034273a --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/CodeSecurity.php @@ -0,0 +1,41 @@ +browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + + return $operator->call($arguments['org'], $arguments['configuration_id']); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php index 1e236c818ce..845a9932995 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php @@ -18,6 +18,7 @@ public function __construct(private Routers $routers) { } + /** @return |\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ public function call(string $call, array $params, array $pathChunks): WithoutBody|Ok|Json|ActionsCacheList|FileCommit { if ($pathChunks[0] === '') { @@ -67,6 +68,14 @@ public function call(string $call, array $params, array $pathChunks): WithoutBod } } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($pathChunks[5] === '{configuration_id}') { + if ($call === 'DELETE /orgs/{org}/code-security/configurations/{configuration_id}') { + return $this->routers->internal🔀Router🔀Delete🔀CodeSecurity()->deleteConfiguration($params); + } + } + } } elseif ($pathChunks[3] === 'codespaces') { if ($pathChunks[4] === 'access') { if ($pathChunks[5] === 'selected_users') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeSecurity.php new file mode 100644 index 00000000000..31b1e0bed7e --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeSecurity.php @@ -0,0 +1,142 @@ + */ + public function getConfigurationsForOrg(array $params): iterable + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('before', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: before'); + } + + $arguments['before'] = $params['before']; + unset($params['before']); + if (array_key_exists('after', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: after'); + } + + $arguments['after'] = $params['after']; + unset($params['after']); + if (array_key_exists('target_type', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: target_type'); + } + + $arguments['target_type'] = $params['target_type']; + unset($params['target_type']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + $operator = new Internal\Operator\CodeSecurity\GetConfigurationsForOrg($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()); + + return $operator->call($arguments['org'], $arguments['before'], $arguments['after'], $arguments['target_type'], $arguments['per_page']); + } + + /** @return iterable|WithoutBody */ + public function getDefaultConfigurations(array $params): iterable|WithoutBody + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + $operator = new Internal\Operator\CodeSecurity\GetDefaultConfigurations($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀Defaults()); + + return $operator->call($arguments['org']); + } + + public function getConfiguration(array $params): CodeSecurityConfiguration|WithoutBody + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('configuration_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: configuration_id'); + } + + $arguments['configuration_id'] = $params['configuration_id']; + unset($params['configuration_id']); + $operator = new Internal\Operator\CodeSecurity\GetConfiguration($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + + return $operator->call($arguments['org'], $arguments['configuration_id']); + } + + /** @return iterable */ + public function getRepositoriesForConfiguration(array $params): iterable + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('configuration_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: configuration_id'); + } + + $arguments['configuration_id'] = $params['configuration_id']; + unset($params['configuration_id']); + if (array_key_exists('before', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: before'); + } + + $arguments['before'] = $params['before']; + unset($params['before']); + if (array_key_exists('after', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: after'); + } + + $arguments['after'] = $params['after']; + unset($params['after']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('status', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: status'); + } + + $arguments['status'] = $params['status']; + unset($params['status']); + $operator = new Internal\Operator\CodeSecurity\GetRepositoriesForConfiguration($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories()); + + return $operator->call($arguments['org'], $arguments['configuration_id'], $arguments['before'], $arguments['after'], $arguments['per_page'], $arguments['status']); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Copilot.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Copilot.php index 02c420a309f..4b1d3d8cfa5 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Copilot.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Copilot.php @@ -117,6 +117,7 @@ public function usageMetricsForOrg(array $params): iterable return $operator->call($arguments['org'], $arguments['since'], $arguments['until'], $arguments['page'], $arguments['per_page']); } + /** @return */ public function listCopilotSeatsForEnterprise(array $params): Ok { $arguments = []; @@ -143,6 +144,7 @@ public function listCopilotSeatsForEnterprise(array $params): Ok return $operator->call($arguments['enterprise'], $arguments['page'], $arguments['per_page']); } + /** @return */ public function listCopilotSeats(array $params): Json { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php index 48b0bf69048..db5f884522a 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php @@ -53,7 +53,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|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): HookDelivery|ActionsEnterprisePermissions|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|ExternalGroup|OrgHook|OrgMembership|Migration|OrganizationRole|RepositoryRuleset|GroupMapping|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package { if ($pathChunks[0] === '') { @@ -193,6 +193,12 @@ public function call(string $call, array $params, array $pathChunks): HookDelive return $this->routers->internal🔀Router🔀Get🔀CodeScanning()->listAlertsForOrg($params); } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($call === 'GET /orgs/{org}/code-security/configurations') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getConfigurationsForOrg($params); + } + } } elseif ($pathChunks[3] === 'codespaces') { if ($pathChunks[4] === 'secrets') { if ($call === 'GET /orgs/{org}/codespaces/secrets') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php index 045f9b64829..17596ebb028 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php @@ -67,8 +67,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|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): Json|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|OidcCustomSub|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|iterable|TeamDiscussion|TeamMembership|TeamProject|GroupMapping|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\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|GroupResponse|UserResponse|ScimUser|TeamDiscussionComment|PackageVersion + /** @return |iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|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): Json|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|OidcCustomSub|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|WithoutBody|iterable|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|TeamDiscussion|TeamMembership|TeamProject|GroupMapping|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\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|GroupResponse|UserResponse|ScimUser|TeamDiscussionComment|PackageVersion { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -145,6 +145,16 @@ public function call(string $call, array $params, array $pathChunks): Json|Ok|\A } } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($pathChunks[5] === '{configuration_id}') { + if ($pathChunks[6] === 'repositories') { + if ($call === 'GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getRepositoriesForConfiguration($params); + } + } + } + } } elseif ($pathChunks[3] === 'codespaces') { if ($pathChunks[4] === 'secrets') { if ($pathChunks[5] === '{secret_name}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php index 0750593f2ce..9101f37732b 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php @@ -21,6 +21,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\CloneTraffic; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeownersErrors; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetup; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceExportDetails; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesOrgSecret; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespacesPermissionsCheckForDevcontainer; @@ -82,8 +83,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|Observable|Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok\Application\Json|Observable|Observable|Observable|Observable|WithoutBody|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): ActionsCacheUsageOrgEnterprise|Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|ActionsBillingUsage|AdvancedSecurityActiveCommitters|GetAllCostCenters|PackagesBillingUsage|CombinedBillingUsage|BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|RunnerGroupsOrg|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|Json|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|WithoutBody|CopilotSeatDetails|Package|OrgCustomProperty|RuleSuite|ExternalGroups|ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|ScimEnterpriseGroupList|ScimEnterpriseUserList|ScimUserList|TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails + /** @return |Observable|Observable|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Schema\CodeSecurityConfiguration|Observable|Observable|Observable|Observable|WithoutBody|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): ActionsCacheUsageOrgEnterprise|Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|ActionsBillingUsage|AdvancedSecurityActiveCommitters|GetAllCostCenters|PackagesBillingUsage|CombinedBillingUsage|BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|RunnerGroupsOrg|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|Json|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|CopilotSeatDetails|Package|OrgCustomProperty|RuleSuite|ExternalGroups|ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|ScimEnterpriseGroupList|ScimEnterpriseUserList|ScimUserList|TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -236,6 +237,18 @@ public function call(string $call, array $params, array $pathChunks): ActionsCac } } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($pathChunks[5] === 'defaults') { + if ($call === 'GET /orgs/{org}/code-security/configurations/defaults') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getDefaultConfigurations($params); + } + } elseif ($pathChunks[5] === '{configuration_id}') { + if ($call === 'GET /orgs/{org}/code-security/configurations/{configuration_id}') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getConfiguration($params); + } + } + } } elseif ($pathChunks[3] === 'codespaces') { if ($pathChunks[4] === 'secrets') { if ($pathChunks[5] === 'public-key') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeSecurity.php new file mode 100644 index 00000000000..713f1d8712e --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeSecurity.php @@ -0,0 +1,42 @@ +browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + + return $operator->call($arguments['org'], $arguments['configuration_id'], $params); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php index 736932b82ae..19057d405c6 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php @@ -9,6 +9,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckRun; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuitePreference; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CommitComment; use ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ExternalGroup; @@ -33,7 +34,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): RunnerGroupsEnterprise|RunnerGroupsOrg|WithoutBody|WebhookConfig|ExternalGroup|CheckRun|CheckSuitePreference|EmptyObject|CodeScanningDefaultSetupUpdateResponse|CommitComment|Hook|Import|RepositoryInvitation|Issue|BasicError|Label|Milestone|PullRequest|Release|RepositoryAdvisory + /** @return |Schema\CodeSecurityConfiguration|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ + public function call(string $call, array $params, array $pathChunks): RunnerGroupsEnterprise|RunnerGroupsOrg|WithoutBody|CodeSecurityConfiguration|WebhookConfig|ExternalGroup|CheckRun|CheckSuitePreference|EmptyObject|CodeScanningDefaultSetupUpdateResponse|CommitComment|Hook|Import|RepositoryInvitation|Issue|BasicError|Label|Milestone|PullRequest|Release|RepositoryAdvisory { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -64,6 +66,14 @@ public function call(string $call, array $params, array $pathChunks): RunnerGrou } } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($pathChunks[5] === '{configuration_id}') { + if ($call === 'PATCH /orgs/{org}/code-security/configurations/{configuration_id}') { + return $this->routers->internal🔀Router🔀Patch🔀CodeSecurity()->updateConfiguration($params); + } + } + } } elseif ($pathChunks[3] === 'hooks') { if ($pathChunks[4] === '{hook_id}') { if ($pathChunks[5] === 'config') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeSecurity.php new file mode 100644 index 00000000000..fe58eadca7b --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeSecurity.php @@ -0,0 +1,56 @@ +browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations()); + + return $operator->call($arguments['org'], $params); + } + + public function attachConfiguration(array $params): Json + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('configuration_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: configuration_id'); + } + + $arguments['configuration_id'] = $params['configuration_id']; + unset($params['configuration_id']); + $operator = new Internal\Operator\CodeSecurity\AttachConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()); + + return $operator->call($arguments['org'], $arguments['configuration_id'], $params); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php index bffed71914e..4b59bf02826 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php @@ -9,6 +9,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\Autolink; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckRun; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CheckSuite; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Codespace; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceExportDetails; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodespaceWithFullRepository; @@ -43,7 +44,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): InstallationToken|Authorization|RunnerGroupsEnterprise|WithoutBody|RunnerGroupsOrg|EmptyObject|ProjectCard|Json|Autolink|CheckRun|CheckSuite|Codespace|Deployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|FullRepository|Hook|Issue|DeployKey|Label|MergedUpstream|Commit|Milestone|Page|Project|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|MinimalRepository|CodespaceExportDetails|CodespaceWithFullRepository + /** @return |Schema\CodeSecurityConfiguration */ + public function call(string $call, array $params, array $pathChunks): InstallationToken|Authorization|RunnerGroupsEnterprise|WithoutBody|RunnerGroupsOrg|EmptyObject|CodeSecurityConfiguration|ProjectCard|Json|Autolink|CheckRun|CheckSuite|Codespace|Deployment|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|FullRepository|Hook|Issue|DeployKey|Label|MergedUpstream|Commit|Milestone|Page|Project|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|MinimalRepository|CodespaceExportDetails|CodespaceWithFullRepository { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'app') { @@ -94,6 +96,12 @@ public function call(string $call, array $params, array $pathChunks): Installati return $this->routers->internal🔀Router🔀Post🔀Actions()->createOrgVariable($params); } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($call === 'POST /orgs/{org}/code-security/configurations') { + return $this->routers->internal🔀Router🔀Post🔀CodeSecurity()->createConfiguration($params); + } + } } elseif ($pathChunks[3] === 'personal-access-token-requests') { if ($pathChunks[4] === '{pat_request_id}') { if ($call === 'POST /orgs/{org}/personal-access-token-requests/{pat_request_id}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php index 432cc9a58c5..4aed3c62b54 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php @@ -19,8 +19,8 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\Issue; use ApiClients\Client\GitHubEnterpriseCloud\Schema\IssueComment; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GenerateRunnerJitconfigForEnterprise\Response\ApplicationJson\Created; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReview; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestSimple; @@ -35,8 +35,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Schema\BasicError */ - public function call(string $call, array $params, array $pathChunks): Ok|WithoutBody|Created|AuthenticationToken|BranchWithProtection|EmptyObject|CodeScanningVariantAnalysis|Reaction|CommitComment|DeploymentStatus|DeploymentBranchPolicy|DeploymentProtectionRule|Issue|IssueComment|iterable|BasicError|Codespace|PullRequestReviewComment|PullRequestSimple|PullRequestReview|ReleaseAsset|Json|FullRepository + /** @return |Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\BasicError */ + public function call(string $call, array $params, array $pathChunks): Ok|Json|WithoutBody|Created|AuthenticationToken|BranchWithProtection|EmptyObject|CodeScanningVariantAnalysis|Reaction|CommitComment|DeploymentStatus|DeploymentBranchPolicy|DeploymentProtectionRule|Issue|IssueComment|iterable|BasicError|Codespace|PullRequestReviewComment|PullRequestSimple|PullRequestReview|ReleaseAsset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|FullRepository { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -65,6 +65,16 @@ public function call(string $call, array $params, array $pathChunks): Ok|Without } } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($pathChunks[5] === '{configuration_id}') { + if ($pathChunks[6] === 'attach') { + if ($call === 'POST /orgs/{org}/code-security/configurations/{configuration_id}/attach') { + return $this->routers->internal🔀Router🔀Post🔀CodeSecurity()->attachConfiguration($params); + } + } + } + } } elseif ($pathChunks[3] === 'packages') { if ($pathChunks[4] === '{package_type}') { if ($pathChunks[5] === '{package_name}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/CodeSecurity.php new file mode 100644 index 00000000000..258027ed155 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/CodeSecurity.php @@ -0,0 +1,41 @@ +browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()); + + return $operator->call($arguments['org'], $arguments['configuration_id'], $params); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php index 15a64e12bf5..d1a0732e9e3 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php @@ -24,8 +24,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Schema\BasicError */ - public function call(string $call, array $params, array $pathChunks): WithoutBody|Ok|EmptyObject|TeamMembership|ProtectedBranch|iterable|BasicError|PullRequestMergeResult|Json|GroupResponse|UserResponse|ScimUser + /** @return |Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|Observable|Schema\BasicError */ + public function call(string $call, array $params, array $pathChunks): WithoutBody|Ok|EmptyObject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|TeamMembership|ProtectedBranch|iterable|BasicError|PullRequestMergeResult|Json|GroupResponse|UserResponse|ScimUser { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -126,6 +126,16 @@ public function call(string $call, array $params, array $pathChunks): WithoutBod } } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($pathChunks[5] === '{configuration_id}') { + if ($pathChunks[6] === 'defaults') { + if ($call === 'PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults') { + return $this->routers->internal🔀Router🔀Put🔀CodeSecurity()->setConfigurationAsDefault($params); + } + } + } + } } elseif ($pathChunks[3] === 'codespaces') { if ($pathChunks[4] === 'secrets') { if ($pathChunks[5] === '{secret_name}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Routers.php b/clients/GitHubEnterpriseCloud/src/Internal/Routers.php index 02f604e0c85..0ab57d2ffd3 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Routers.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Routers.php @@ -40,6 +40,7 @@ final class Routers private Internal\Router\Get\Copilot|null $internal🔀Router🔀Get🔀Copilot = null; private Internal\Router\Get\Dependabot|null $internal🔀Router🔀Get🔀Dependabot = null; private Internal\Router\Get\Actions|null $internal🔀Router🔀Get🔀Actions = null; + private Internal\Router\Get\CodeSecurity|null $internal🔀Router🔀Get🔀CodeSecurity = null; private Internal\Router\Get\Pulls|null $internal🔀Router🔀Get🔀Pulls = null; private Internal\Router\Get\Billing|null $internal🔀Router🔀Get🔀Billing = null; private Internal\Router\Get\Checks|null $internal🔀Router🔀Get🔀Checks = null; @@ -67,6 +68,7 @@ final class Routers private Internal\Router\Post\Reactions|null $internal🔀Router🔀Post🔀Reactions = null; private Internal\Router\Post\Packages|null $internal🔀Router🔀Post🔀Packages = null; private Internal\Router\Post\SecretScanning|null $internal🔀Router🔀Post🔀SecretScanning = null; + private Internal\Router\Post\CodeSecurity|null $internal🔀Router🔀Post🔀CodeSecurity = null; private Internal\Router\Post\Checks|null $internal🔀Router🔀Post🔀Checks = null; private Internal\Router\Post\Issues|null $internal🔀Router🔀Post🔀Issues = null; private Internal\Router\Post\Pulls|null $internal🔀Router🔀Post🔀Pulls = null; @@ -83,6 +85,7 @@ final class Routers private Internal\Router\Patch\Users|null $internal🔀Router🔀Patch🔀Users = null; private Internal\Router\Patch\EnterpriseAdmin|null $internal🔀Router🔀Patch🔀EnterpriseAdmin = null; private Internal\Router\Patch\Actions|null $internal🔀Router🔀Patch🔀Actions = null; + private Internal\Router\Patch\CodeSecurity|null $internal🔀Router🔀Patch🔀CodeSecurity = null; private Internal\Router\Patch\Orgs|null $internal🔀Router🔀Patch🔀Orgs = null; private Internal\Router\Patch\Teams|null $internal🔀Router🔀Patch🔀Teams = null; private Internal\Router\Patch\Checks|null $internal🔀Router🔀Patch🔀Checks = null; @@ -137,6 +140,7 @@ final class Routers private Internal\Router\Delete\Issues|null $internal🔀Router🔀Delete🔀Issues = null; private Internal\Router\Delete\Pulls|null $internal🔀Router🔀Delete🔀Pulls = null; private Internal\Router\Delete\Scim|null $internal🔀Router🔀Delete🔀Scim = null; + private Internal\Router\Delete\CodeSecurity|null $internal🔀Router🔀Delete🔀CodeSecurity = null; private Internal\Router\Delete\Copilot|null $internal🔀Router🔀Delete🔀Copilot = null; private Internal\Router\Delete\Billing|null $internal🔀Router🔀Delete🔀Billing = null; private Internal\Router\Delete\Reactions|null $internal🔀Router🔀Delete🔀Reactions = null; @@ -152,6 +156,7 @@ final class Routers private Internal\Router\Put\Interactions|null $internal🔀Router🔀Put🔀Interactions = null; private Internal\Router\Put\Teams|null $internal🔀Router🔀Put🔀Teams = null; private Internal\Router\Put\Oidc|null $internal🔀Router🔀Put🔀Oidc = null; + private Internal\Router\Put\CodeSecurity|null $internal🔀Router🔀Put🔀CodeSecurity = null; private Internal\Router\Put\Dependabot|null $internal🔀Router🔀Put🔀Dependabot = null; private Internal\Router\Put\Issues|null $internal🔀Router🔀Put🔀Issues = null; private Internal\Router\Put\Pulls|null $internal🔀Router🔀Put🔀Pulls = null; @@ -427,6 +432,15 @@ public function internal🔀Router🔀Get🔀Actions(): Internal\Router\Get\Acti return $this->internal🔀Router🔀Get🔀Actions; } + public function internal🔀Router🔀Get🔀CodeSecurity(): Internal\Router\Get\CodeSecurity + { + if ($this->internal🔀Router🔀Get🔀CodeSecurity instanceof Internal\Router\Get\CodeSecurity === false) { + $this->internal🔀Router🔀Get🔀CodeSecurity = new Internal\Router\Get\CodeSecurity(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + } + + return $this->internal🔀Router🔀Get🔀CodeSecurity; + } + public function internal🔀Router🔀Get🔀Pulls(): Internal\Router\Get\Pulls { if ($this->internal🔀Router🔀Get🔀Pulls instanceof Internal\Router\Get\Pulls === false) { @@ -670,6 +684,15 @@ public function internal🔀Router🔀Post🔀SecretScanning(): Internal\Router\ return $this->internal🔀Router🔀Post🔀SecretScanning; } + public function internal🔀Router🔀Post🔀CodeSecurity(): Internal\Router\Post\CodeSecurity + { + if ($this->internal🔀Router🔀Post🔀CodeSecurity instanceof Internal\Router\Post\CodeSecurity === false) { + $this->internal🔀Router🔀Post🔀CodeSecurity = new Internal\Router\Post\CodeSecurity(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + } + + return $this->internal🔀Router🔀Post🔀CodeSecurity; + } + public function internal🔀Router🔀Post🔀Checks(): Internal\Router\Post\Checks { if ($this->internal🔀Router🔀Post🔀Checks instanceof Internal\Router\Post\Checks === false) { @@ -814,6 +837,15 @@ public function internal🔀Router🔀Patch🔀Actions(): Internal\Router\Patch\ return $this->internal🔀Router🔀Patch🔀Actions; } + public function internal🔀Router🔀Patch🔀CodeSecurity(): Internal\Router\Patch\CodeSecurity + { + if ($this->internal🔀Router🔀Patch🔀CodeSecurity instanceof Internal\Router\Patch\CodeSecurity === false) { + $this->internal🔀Router🔀Patch🔀CodeSecurity = new Internal\Router\Patch\CodeSecurity(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + } + + return $this->internal🔀Router🔀Patch🔀CodeSecurity; + } + public function internal🔀Router🔀Patch🔀Orgs(): Internal\Router\Patch\Orgs { if ($this->internal🔀Router🔀Patch🔀Orgs instanceof Internal\Router\Patch\Orgs === false) { @@ -1300,6 +1332,15 @@ public function internal🔀Router🔀Delete🔀Scim(): Internal\Router\Delete\S return $this->internal🔀Router🔀Delete🔀Scim; } + public function internal🔀Router🔀Delete🔀CodeSecurity(): Internal\Router\Delete\CodeSecurity + { + if ($this->internal🔀Router🔀Delete🔀CodeSecurity instanceof Internal\Router\Delete\CodeSecurity === false) { + $this->internal🔀Router🔀Delete🔀CodeSecurity = new Internal\Router\Delete\CodeSecurity(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + } + + return $this->internal🔀Router🔀Delete🔀CodeSecurity; + } + public function internal🔀Router🔀Delete🔀Copilot(): Internal\Router\Delete\Copilot { if ($this->internal🔀Router🔀Delete🔀Copilot instanceof Internal\Router\Delete\Copilot === false) { @@ -1435,6 +1476,15 @@ public function internal🔀Router🔀Put🔀Oidc(): Internal\Router\Put\Oidc return $this->internal🔀Router🔀Put🔀Oidc; } + public function internal🔀Router🔀Put🔀CodeSecurity(): Internal\Router\Put\CodeSecurity + { + if ($this->internal🔀Router🔀Put🔀CodeSecurity instanceof Internal\Router\Put\CodeSecurity === false) { + $this->internal🔀Router🔀Put🔀CodeSecurity = new Internal\Router\Put\CodeSecurity(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + } + + return $this->internal🔀Router🔀Put🔀CodeSecurity; + } + public function internal🔀Router🔀Put🔀Dependabot(): Internal\Router\Put\Dependabot { if ($this->internal🔀Router🔀Put🔀Dependabot instanceof Internal\Router\Put\Dependabot === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Operation/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Operation/CodeSecurity.php new file mode 100644 index 00000000000..1b53f5ad5e0 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Operation/CodeSecurity.php @@ -0,0 +1,67 @@ + */ + public function getConfigurationsForOrg(string $org, string $before, string $after, string $targetType, int $perPage): iterable + { + return $this->operators->codeSecurity👷GetConfigurationsForOrg()->call($org, $before, $after, $targetType, $perPage); + } + + public function createConfiguration(string $org, array $params): CodeSecurityConfiguration + { + return $this->operators->codeSecurity👷CreateConfiguration()->call($org, $params); + } + + /** @return iterable|WithoutBody */ + public function getDefaultConfigurations(string $org): iterable|WithoutBody + { + return $this->operators->codeSecurity👷GetDefaultConfigurations()->call($org); + } + + public function getConfiguration(string $org, int $configurationId): CodeSecurityConfiguration|WithoutBody + { + return $this->operators->codeSecurity👷GetConfiguration()->call($org, $configurationId); + } + + public function deleteConfiguration(string $org, int $configurationId): WithoutBody + { + return $this->operators->codeSecurity👷DeleteConfiguration()->call($org, $configurationId); + } + + public function updateConfiguration(string $org, int $configurationId, array $params): CodeSecurityConfiguration|WithoutBody + { + return $this->operators->codeSecurity👷UpdateConfiguration()->call($org, $configurationId, $params); + } + + public function attachConfiguration(string $org, int $configurationId, array $params): Json + { + return $this->operators->codeSecurity👷AttachConfiguration()->call($org, $configurationId, $params); + } + + public function setConfigurationAsDefault(string $org, int $configurationId, array $params): Ok + { + return $this->operators->codeSecurity👷SetConfigurationAsDefault()->call($org, $configurationId, $params); + } + + /** @return iterable */ + public function getRepositoriesForConfiguration(string $org, int $configurationId, string $before, string $after, int $perPage, string $status): iterable + { + return $this->operators->codeSecurity👷GetRepositoriesForConfiguration()->call($org, $configurationId, $before, $after, $perPage, $status); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Copilot.php b/clients/GitHubEnterpriseCloud/src/Operation/Copilot.php index a5ea5d6dde1..f0bc0e5a77c 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Copilot.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Copilot.php @@ -19,6 +19,7 @@ public function __construct(private Internal\Operators $operators) { } + /** @return */ public function listCopilotSeatsForEnterprise(string $enterprise, int $page, int $perPage): Ok { return $this->operators->copilot👷ListCopilotSeatsForEnterprise()->call($enterprise, $page, $perPage); @@ -42,6 +43,7 @@ public function getCopilotOrganizationDetails(string $org): CopilotOrganizationD return $this->operators->copilot👷GetCopilotOrganizationDetails()->call($org); } + /** @return */ public function listCopilotSeats(string $org, int $page, int $perPage): Json { return $this->operators->copilot👷ListCopilotSeats()->call($org, $page, $perPage); diff --git a/clients/GitHubEnterpriseCloud/src/Operations.php b/clients/GitHubEnterpriseCloud/src/Operations.php index a58946429d5..c09fa3f7acf 100644 --- a/clients/GitHubEnterpriseCloud/src/Operations.php +++ b/clients/GitHubEnterpriseCloud/src/Operations.php @@ -120,6 +120,11 @@ public function oidc(): Operation\Oidc return new Operation\Oidc($this->operators); } + public function codeSecurity(): Operation\CodeSecurity + { + return new Operation\CodeSecurity($this->operators); + } + public function codespaces(): Operation\Codespaces { return new Operation\Codespaces($this->operators); diff --git a/clients/GitHubEnterpriseCloud/src/OperationsInterface.php b/clients/GitHubEnterpriseCloud/src/OperationsInterface.php index 2b905b05981..913b2bddeb6 100644 --- a/clients/GitHubEnterpriseCloud/src/OperationsInterface.php +++ b/clients/GitHubEnterpriseCloud/src/OperationsInterface.php @@ -50,6 +50,8 @@ public function orgs(): Operation\Orgs; public function oidc(): Operation\Oidc; + public function codeSecurity(): Operation\CodeSecurity; + public function codespaces(): Operation\Codespaces; public function packages(): Operation\Packages; diff --git a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php index 2e1f1e7a063..a448d14eda7 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -384,7 +384,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /enterprises/{enterprise}/copilot/billing/seats') { - return $this->typeResolver->resolve('Schema\\Operations\\Copilot\\ListCopilotSeatsForEnterprise\\Response\\ApplicationJson\\Ok'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /enterprises/{enterprise}/copilot/usage') { @@ -983,6 +983,42 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve('Observable'); } + if ($call === 'GET /orgs/{org}/code-security/configurations') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'POST /orgs/{org}/code-security/configurations') { + return $this->typeResolver->resolve('Schema\\CodeSecurityConfiguration'); + } + + if ($call === 'GET /orgs/{org}/code-security/configurations/defaults') { + return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'GET /orgs/{org}/code-security/configurations/{configuration_id}') { + return $this->typeResolver->resolve('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'DELETE /orgs/{org}/code-security/configurations/{configuration_id}') { + return $this->typeResolver->resolve('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'PATCH /orgs/{org}/code-security/configurations/{configuration_id}') { + return $this->typeResolver->resolve('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'POST /orgs/{org}/code-security/configurations/{configuration_id}/attach') { + return $this->typeResolver->resolve('Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json'); + } + + if ($call === 'PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults') { + return $this->typeResolver->resolve('Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok'); + } + + if ($call === 'GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories') { + return $this->typeResolver->resolve('iterable'); + } + if ($call === 'GET /orgs/{org}/codespaces') { return $this->typeResolver->resolve(''); } @@ -1040,7 +1076,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/copilot/billing/seats') { - return $this->typeResolver->resolve('Schema\\Operations\\Copilot\\ListCopilotSeats\\Response\\ApplicationJson\\Ok\\Application\\Json'); + return $this->typeResolver->resolve(''); } if ($call === 'POST /orgs/{org}/copilot/billing/selected_teams') { diff --git a/clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/AttachConfiguration/Request/ApplicationJson.php b/clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/AttachConfiguration/Request/ApplicationJson.php new file mode 100644 index 00000000000..ae9787abe8b --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/AttachConfiguration/Request/ApplicationJson.php @@ -0,0 +1,56 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\AttachConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\AttachConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_202_requestContentType_application_json_responseContentType_application_json_zero(): void + { + $response = new Response(202, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->attachConfiguration('generated', 16, json_decode(Schema\CodeSecurity\AttachConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/CreateConfigurationTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/CreateConfigurationTest.php new file mode 100644 index 00000000000..3cadbc13a09 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/CreateConfigurationTest.php @@ -0,0 +1,54 @@ + 'application/json'], json_encode(json_decode(Schema\CodeSecurityConfiguration::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\CreateConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })(json_decode(Schema\CodeSecurity\CreateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_201_requestContentType_application_json_responseContentType_application_json_zero(): void + { + $response = new Response(201, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CodeSecurityConfiguration::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->createConfiguration('generated', json_decode(Schema\CodeSecurity\CreateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/DeleteConfigurationTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/DeleteConfigurationTest.php new file mode 100644 index 00000000000..99fbe47a34c --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/DeleteConfigurationTest.php @@ -0,0 +1,233 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\DeleteConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_400_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(400, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->deleteConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_400_responseContentType_application_scim_json_zero(): void + { + self::expectException(ErrorSchemas\ScimError::class); + $response = new Response(400, ['Content-Type' => 'application/scim+json'], json_encode(json_decode(Schema\ScimError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\DeleteConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_400_responseContentType_application_scim_json_zero(): void + { + self::expectException(ErrorSchemas\ScimError::class); + $response = new Response(400, ['Content-Type' => 'application/scim+json'], json_encode(json_decode(Schema\ScimError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->deleteConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\DeleteConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->deleteConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\DeleteConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->deleteConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_409_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\DeleteConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_409_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->deleteConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_204_empty(): void + { + $response = new Response(204, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\DeleteConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_204_empty(): void + { + $response = new Response(204, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('DELETE', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->deleteConfiguration('generated', 16); + self::assertArrayHasKey('code', $result); + self::assertSame(204, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationTest.php new file mode 100644 index 00000000000..363a0572551 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationTest.php @@ -0,0 +1,161 @@ + 'application/json'], json_encode(json_decode(Schema\CodeSecurityConfiguration::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CodeSecurityConfiguration::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfiguration('generated', 16); + } + + /** @test */ + public function call_httpCode_304_empty(): void + { + $response = new Response(304, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_304_empty(): void + { + $response = new Response(304, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfiguration('generated', 16); + self::assertArrayHasKey('code', $result); + self::assertSame(304, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationsForOrgTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationsForOrgTest.php new file mode 100644 index 00000000000..94b11b2b686 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationsForOrgTest.php @@ -0,0 +1,99 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations?before=generated&after=generated&target_type=generated&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetConfigurationsForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['before'] = 'generated'; + $data['after'] = 'generated'; + $data['target_type'] = 'generated'; + $data['per_page'] = 8; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations?before=generated&after=generated&target_type=generated&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfigurationsForOrg('generated', 'generated', 'generated', 'generated', 8); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations?before=generated&after=generated&target_type=generated&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetConfigurationsForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['before'] = 'generated'; + $data['after'] = 'generated'; + $data['target_type'] = 'generated'; + $data['per_page'] = 8; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations?before=generated&after=generated&target_type=generated&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfigurationsForOrg('generated', 'generated', 'generated', 'generated', 8); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetDefaultConfigurationsTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetDefaultConfigurationsTest.php new file mode 100644 index 00000000000..391a9e2d01c --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetDefaultConfigurationsTest.php @@ -0,0 +1,125 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/defaults', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetDefaultConfigurations::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/defaults', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getDefaultConfigurations('generated'); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/defaults', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetDefaultConfigurations::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/defaults', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getDefaultConfigurations('generated'); + } + + /** @test */ + public function call_httpCode_304_empty(): void + { + $response = new Response(304, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/defaults', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetDefaultConfigurations::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_304_empty(): void + { + $response = new Response(304, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/defaults', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getDefaultConfigurations('generated'); + self::assertArrayHasKey('code', $result); + self::assertSame(304, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetRepositoriesForConfigurationTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetRepositoriesForConfigurationTest.php new file mode 100644 index 00000000000..8f11bfd1b92 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetRepositoriesForConfigurationTest.php @@ -0,0 +1,101 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16/repositories?before=generated&after=generated&per_page=8&status=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetRepositoriesForConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + $data['before'] = 'generated'; + $data['after'] = 'generated'; + $data['per_page'] = 8; + $data['status'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_403_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16/repositories?before=generated&after=generated&per_page=8&status=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getRepositoriesForConfiguration('generated', 16, 'generated', 'generated', 8, 'generated'); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16/repositories?before=generated&after=generated&per_page=8&status=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\GetRepositoriesForConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + $data['before'] = 'generated'; + $data['after'] = 'generated'; + $data['per_page'] = 8; + $data['status'] = 'generated'; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/orgs/generated/code-security/configurations/16/repositories?before=generated&after=generated&per_page=8&status=generated', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getRepositoriesForConfiguration('generated', 16, 'generated', 'generated', 8, 'generated'); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultTest.php new file mode 100644 index 00000000000..fe61fda598c --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultTest.php @@ -0,0 +1,126 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/orgs/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\SetConfigurationAsDefault::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_200_requestContentType_application_json_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/orgs/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->setConfigurationAsDefault('generated', 16, json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_403_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/orgs/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\SetConfigurationAsDefault::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_403_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(403, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/orgs/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->setConfigurationAsDefault('generated', 16, json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_404_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/orgs/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\SetConfigurationAsDefault::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_404_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PUT', '/orgs/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->setConfigurationAsDefault('generated', 16, json_decode(Schema\CodeSecurity\SetConfigurationAsDefault\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/UpdateConfigurationTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/UpdateConfigurationTest.php new file mode 100644 index 00000000000..c91eb4d80a5 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/UpdateConfigurationTest.php @@ -0,0 +1,90 @@ + 'application/json'], json_encode(json_decode(Schema\CodeSecurityConfiguration::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/orgs/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\UpdateConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_200_requestContentType_application_json_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CodeSecurityConfiguration::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/orgs/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->updateConfiguration('generated', 16, json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_204_requestContentType_application_json_empty(): void + { + $response = new Response(204, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/orgs/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\UpdateConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_204_requestContentType_application_json_empty(): void + { + $response = new Response(204, []); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/orgs/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->updateConfiguration('generated', 16, json_decode(Schema\CodeSecurity\UpdateConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + self::assertArrayHasKey('code', $result); + self::assertSame(204, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index 08e156fa063..70dd7ebfa28 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -102,7 +102,7 @@ function authHeader(): string assertType('', $client->call('GET /enterprises/{enterprise}/code_security_and_analysis')); assertType('', $client->call('PATCH /enterprises/{enterprise}/code_security_and_analysis')); assertType('', $client->call('GET /enterprises/{enterprise}/consumed-licenses')); -assertType('Schema\\Operations\\Copilot\\ListCopilotSeatsForEnterprise\\Response\\ApplicationJson\\Ok', $client->call('GET /enterprises/{enterprise}/copilot/billing/seats')); +assertType('', $client->call('GET /enterprises/{enterprise}/copilot/billing/seats')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/copilot/usage')); assertType('Observable', $client->call('LIST /enterprises/{enterprise}/copilot/usage')); assertType('Observable|WithoutBody', $client->call('GET /enterprises/{enterprise}/dependabot/alerts')); @@ -252,6 +252,15 @@ function authHeader(): string assertType('', $client->call('DELETE /orgs/{org}/blocks/{username}')); assertType('Observable', $client->call('GET /orgs/{org}/code-scanning/alerts')); assertType('Observable', $client->call('LIST /orgs/{org}/code-scanning/alerts')); +assertType('iterable', $client->call('GET /orgs/{org}/code-security/configurations')); +assertType('Schema\\CodeSecurityConfiguration', $client->call('POST /orgs/{org}/code-security/configurations')); +assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /orgs/{org}/code-security/configurations/defaults')); +assertType('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /orgs/{org}/code-security/configurations/{configuration_id}')); +assertType('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('DELETE /orgs/{org}/code-security/configurations/{configuration_id}')); +assertType('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('PATCH /orgs/{org}/code-security/configurations/{configuration_id}')); +assertType('Schema\\Operations\\CodeSecurity\\AttachConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json', $client->call('POST /orgs/{org}/code-security/configurations/{configuration_id}/attach')); +assertType('Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok', $client->call('PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults')); +assertType('iterable', $client->call('GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories')); assertType('', $client->call('GET /orgs/{org}/codespaces')); assertType('', $client->call('PUT /orgs/{org}/codespaces/access')); assertType('', $client->call('POST /orgs/{org}/codespaces/access/selected_users')); @@ -266,7 +275,7 @@ function authHeader(): string assertType('', $client->call('PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}')); assertType('', $client->call('DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}')); assertType('', $client->call('GET /orgs/{org}/copilot/billing')); -assertType('Schema\\Operations\\Copilot\\ListCopilotSeats\\Response\\ApplicationJson\\Ok\\Application\\Json', $client->call('GET /orgs/{org}/copilot/billing/seats')); +assertType('', $client->call('GET /orgs/{org}/copilot/billing/seats')); assertType('', $client->call('POST /orgs/{org}/copilot/billing/selected_teams')); assertType('', $client->call('DELETE /orgs/{org}/copilot/billing/selected_teams')); assertType('', $client->call('POST /orgs/{org}/copilot/billing/selected_users')); diff --git a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index 634149d93cd..f6671d34062 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -8940,6 +8940,616 @@ paths: enabledForGitHubApps: true category: code-scanning subcategory: code-scanning + "/orgs/{org}/code-security/configurations": + get: + summary: Get code security configurations for an organization + description: |- + Lists all code security configurations available in an organization. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-configurations-for-org + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-code-security-configurations-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - name: target_type + in: query + description: The target type of the code security configuration + required: false + schema: + type: string + enum: + - global + - all + default: all + - name: per_page + in: query + description: '''The number of results per page (max 100). For more information, + see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)."'' + + ' + required: false + schema: + type: integer + default: 30 + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/code-security-configuration" + examples: + default: + "$ref": "#/components/examples/code-security-configuration-list" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + post: + summary: Create a code security configuration + description: |- + Creates a code security configuration in an organization. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/create-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#create-a-code-security-configuration + parameters: + - "$ref": "#/components/parameters/org" + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + name: + type: string + description: The name of the code security configuration. Must be + unique within the organization. + description: + type: string + description: A description of the code security configuration + maxLength: 255 + advanced_security: + type: string + description: The enablement status of GitHub Advanced Security + enum: + - enabled + - disabled + default: disabled + dependency_graph: + type: string + description: The enablement status of Dependency Graph + enum: + - enabled + - disabled + - not_set + default: enabled + dependabot_alerts: + type: string + description: The enablement status of Dependabot alerts + enum: + - enabled + - disabled + - not_set + default: disabled + dependabot_security_updates: + type: string + description: The enablement status of Dependabot security updates + enum: + - enabled + - disabled + - not_set + default: disabled + code_scanning_default_setup: + type: string + description: The enablement status of code scanning default setup + enum: + - enabled + - disabled + - not_set + default: disabled + secret_scanning: + type: string + description: The enablement status of secret scanning + enum: + - enabled + - disabled + - not_set + default: disabled + secret_scanning_push_protection: + type: string + description: The enablement status of secret scanning push protection + enum: + - enabled + - disabled + - not_set + default: disabled + private_vulnerability_reporting: + type: string + description: The enablement status of private vulnerability reporting + enum: + - enabled + - disabled + - not_set + default: disabled + required: + - name + - description + examples: + default: + summary: Example for a code security configuration + value: + name: octo-org recommended settings + description: This is a code security configuration for octo-org + advanced_security: enabled + dependabot_alerts: enabled + dependabot_security_updates: not_set + secret_scanning: enabled + responses: + '201': + description: Successfully created code security configuration + content: + application/json: + schema: + "$ref": "#/components/schemas/code-security-configuration" + examples: + default: + "$ref": "#/components/examples/code-security-configuration" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + "/orgs/{org}/code-security/configurations/defaults": + get: + summary: Get default code security configurations + description: |- + Lists the default code security configurations for an organization. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-default-configurations + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-default-code-security-configurations + parameters: + - "$ref": "#/components/parameters/org" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-security-default-configurations" + examples: + default: + "$ref": "#/components/examples/code-security-default-configurations" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + "/orgs/{org}/code-security/configurations/{configuration_id}": + get: + summary: Get a code security configuration + description: |- + Gets a code security configuration available in an organization. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-a-code-security-configuration + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/configuration-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-security-configuration" + examples: + default: + "$ref": "#/components/examples/code-security-configuration" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + patch: + summary: Update a code security configuration + description: |- + Updates a code security configuration in an organization. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/update-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#update-a-code-security-configuration + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/configuration-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + name: + type: string + description: The name of the code security configuration. Must be + unique within the organization. + description: + type: string + description: A description of the code security configuration + maxLength: 255 + advanced_security: + type: string + description: The enablement status of GitHub Advanced Security + enum: + - enabled + - disabled + dependency_graph: + type: string + description: The enablement status of Dependency Graph + enum: + - enabled + - disabled + - not_set + dependabot_alerts: + type: string + description: The enablement status of Dependabot alerts + enum: + - enabled + - disabled + - not_set + dependabot_security_updates: + type: string + description: The enablement status of Dependabot security updates + enum: + - enabled + - disabled + - not_set + code_scanning_default_setup: + type: string + description: The enablement status of code scanning default setup + enum: + - enabled + - disabled + - not_set + secret_scanning: + type: string + description: The enablement status of secret scanning + enum: + - enabled + - disabled + - not_set + secret_scanning_push_protection: + type: string + description: The enablement status of secret scanning push protection + enum: + - enabled + - disabled + - not_set + private_vulnerability_reporting: + type: string + description: The enablement status of private vulnerability reporting + enum: + - enabled + - disabled + - not_set + examples: + default: + summary: Example for updating a code security configuration + value: + name: octo-org recommended settings v2 + secret_scanning: disabled + code_scanning_default_setup: enabled + responses: + '200': + description: Response when a configuration is updated + content: + application/json: + schema: + "$ref": "#/components/schemas/code-security-configuration" + examples: + default: + "$ref": "#/components/examples/code-security-configuration-updated" + '204': + description: Response when no new updates are made + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + delete: + summary: Delete a code security configuration + description: |- + Deletes the desired code security configuration from an organization. + Repositories attached to the configuration will retain their settings but will no longer be associated with + the configuration. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/delete-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#delete-a-code-security-configuration + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/configuration-id" + responses: + '204': + "$ref": "#/components/responses/no_content" + '400': + "$ref": "#/components/responses/bad_request" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + "/orgs/{org}/code-security/configurations/{configuration_id}/attach": + post: + summary: Attach a configuration to repositories + description: |- + Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration. + + If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/attach-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#attach-a-configuration-to-repositories + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/configuration-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + scope: + type: string + description: The type of repositories to attach the configuration + to. `selected` means the configuration will be attached to only + the repositories specified by `selected_repository_ids` + enum: + - all + - public + - private_or_internal + - selected + selected_repository_ids: + type: array + description: An array of repository IDs to attach the configuration + to. You can only provide a list of repository ids when the `scope` + is set to `selected`. + items: + type: integer + description: Unique identifier of the repository. + required: + - scope + examples: + default: + summary: Example for attaching a configuration to some repositories + value: + scope: selected + selected_repository_ids: + - 32 + - 91 + responses: + '202': + "$ref": "#/components/responses/accepted" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + "/orgs/{org}/code-security/configurations/{configuration_id}/defaults": + put: + summary: Set a code security configuration as a default for an organization + description: |- + Sets a code security configuration as a default to be applied to new repositories in your organization. + + This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/set-configuration-as-default + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/configuration-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + default_for_new_repos: + type: string + description: Specify which types of repository this security configuration + should be applied to by default. + enum: + - all + - none + - private_and_internal + - public + examples: + default: + summary: Set this configuration to be enabled by default on all new + repositories. + value: + default_for_new_repos: all + responses: + '200': + description: Default successfully changed. + content: + application/json: + schema: + type: object + properties: + default_for_new_repos: + type: string + description: Specifies which types of repository this security + configuration is applied to by default. + enum: + - all + - none + - private_and_internal + - public + configuration: + "$ref": "#/components/schemas/code-security-configuration" + examples: + default: + value: + default_for_new_repos: all + configuration: + "$ref": "#/components/examples/code-security-configuration" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + "/orgs/{org}/code-security/configurations/{configuration_id}/repositories": + get: + summary: Get repositories associated with a code security configuration + description: |- + Lists the repositories associated with a code security configuration in an organization. + + The authenticated user must be an administrator or security manager for the organization to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-repositories-for-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-repositories-associated-with-a-code-security-configuration + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/configuration-id" + - name: per_page + description: The number of results per page (max 100). For more information, + see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + in: query + required: false + schema: + type: integer + default: 30 + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + - name: status + description: |- + A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned. + + Can be: `all`, `attached`, `attaching`, `detached`, `enforced`, `failed`, `updating` + in: query + required: false + schema: + type: string + default: all + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/code-security-configuration-repositories" + examples: + default: + summary: Example of code security configuration repositories + value: + - status: attached + repository: + "$ref": "#/components/examples/simple-repository" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations "/orgs/{org}/codespaces": get: summary: List codespaces for the organization @@ -76723,6 +77333,128 @@ components: - warning - note - error + code-security-configuration: + type: object + description: A code security configuration + properties: + id: + type: integer + description: The ID of the code security configuration + name: + type: string + description: The name of the code security configuration. Must be unique + within the organization. + target_type: + type: string + description: The type of the code security configuration. + enum: + - global + - organization + description: + type: string + description: A description of the code security configuration + advanced_security: + type: string + description: The enablement status of GitHub Advanced Security + enum: + - enabled + - disabled + dependency_graph: + type: string + description: The enablement status of Dependency Graph + enum: + - enabled + - disabled + - not_set + dependabot_alerts: + type: string + description: The enablement status of Dependabot alerts + enum: + - enabled + - disabled + - not_set + dependabot_security_updates: + type: string + description: The enablement status of Dependabot security updates + enum: + - enabled + - disabled + - not_set + code_scanning_default_setup: + type: string + description: The enablement status of code scanning default setup + enum: + - enabled + - disabled + - not_set + secret_scanning: + type: string + description: The enablement status of secret scanning + enum: + - enabled + - disabled + - not_set + secret_scanning_push_protection: + type: string + description: The enablement status of secret scanning push protection + enum: + - enabled + - disabled + - not_set + private_vulnerability_reporting: + type: string + description: The enablement status of private vulnerability reporting + enum: + - enabled + - disabled + - not_set + url: + type: string + format: uri + description: The URL of the configuration + html_url: + type: string + format: uri + description: The URL of the configuration + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + code-security-default-configurations: + type: array + description: A list of default code security configurations + items: + type: object + properties: + default_for_new_repos: + enum: + - public + - private_and_internal + - all + description: The visibility of newly created repositories for which the + code security configuration will be applied to by default + configuration: + "$ref": "#/components/schemas/code-security-configuration" + code-security-configuration-repositories: + type: object + description: Repositories associated with a code security configuration and + attachment status + properties: + status: + type: string + description: The attachment status of the code security configuration on + the repository. + enum: + - attached + - attaching + - detached + - enforced + - failed + - updating + repository: + "$ref": "#/components/schemas/simple-repository" codespace-machine: type: object title: Codespace machine @@ -208224,6 +208956,185 @@ components: received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false + code-security-configuration-list: + value: + - id: 17 + target_type: global + name: GitHub recommended + description: Suggested settings for Dependabot, secret scanning, and code + scanning. + advanced_security: enabled + dependency_graph: enabled + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: enabled + secret_scanning: enabled + secret_scanning_push_protection: enabled + private_vulnerability_reporting: enabled + url: https://api.github.com/orgs/octo-org/code-security/configurations/17 + html_url: https://github.com/organizations/octo-org/settings/security_products/configurations/view + created_at: '2023-12-04T15:58:07Z' + updated_at: '2023-12-04T15:58:07Z' + - id: 1326 + target_type: organization + name: High risk settings + description: This is a code security configuration for octo-org high risk + repositories + advanced_security: enabled + dependency_graph: enabled + dependabot_alerts: enabled + dependabot_security_updates: enabled + code_scanning_default_setup: enabled + secret_scanning: enabled + secret_scanning_push_protection: enabled + private_vulnerability_reporting: enabled + url: https://api.github.com/orgs/octo-org/code-security/configurations/1326 + html_url: https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1326 + created_at: '2024-05-10T00:00:00Z' + updated_at: '2024-05-10T00:00:00Z' + code-security-configuration: + value: + id: 1325 + target_type: organization + name: octo-org recommended settings + description: This is a code security configuration for octo-org + advanced_security: enabled + dependency_graph: enabled + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: disabled + secret_scanning: enabled + secret_scanning_push_protection: disabled + private_vulnerability_reporting: disabled + url: https://api.github.com/orgs/octo-org/code-security/configurations/1325 + html_url: https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325 + created_at: '2024-05-01T00:00:00Z' + updated_at: '2024-05-01T00:00:00Z' + code-security-default-configurations: + value: + - default_for_new_repos: public + configuration: + id: 1325 + target_type: organization + name: octo-org recommended settings + description: This is a code security configuration for octo-org + advanced_security: enabled + dependency_graph: enabled + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: enabled + secret_scanning: enabled + secret_scanning_push_protection: enabled + private_vulnerability_reporting: enabled + url: https://api.github.com/orgs/octo-org/code-security/configurations/1325 + html_url: https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325 + created_at: '2024-05-01T00:00:00Z' + updated_at: '2024-05-01T00:00:00Z' + - default_for_new_repos: private_and_internal + configuration: + id: 17 + target_type: global + name: GitHub recommended + description: Suggested settings for Dependabot, secret scanning, and code + scanning. + advanced_security: enabled + dependency_graph: enabled + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: enabled + secret_scanning: enabled + secret_scanning_push_protection: enabled + private_vulnerability_reporting: enabled + url: https://api.github.com/orgs/octo-org/code-security/configurations/17 + html_url: https://github.com/organizations/octo-org/settings/security_products/configurations/view + created_at: '2023-12-04T15:58:07Z' + updated_at: '2023-12-04T15:58:07Z' + code-security-configuration-updated: + value: + id: 1325 + target_type: organization + name: octo-org recommended settings v2 + description: This is a code security configuration for octo-org + advanced_security: enabled + dependency_graph: enabled + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: enabled + secret_scanning: disabled + secret_scanning_push_protection: disabled + private_vulnerability_reporting: disabled + url: https://api.github.com/orgs/octo-org/code-security/configurations/1325 + html_url: https://github.com/organizations/octo-org/settings/security_products/configurations/edit/1325 + created_at: '2024-05-01T00:00:00Z' + updated_at: '2024-05-01T00:00:00Z' + simple-repository: + value: + id: 1296269 + node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: Hello-World + full_name: octocat/Hello-World + owner: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + private: false + html_url: https://github.com/octocat/Hello-World + description: This your first repo! + fork: false + url: https://api.github.com/repos/octocat/Hello-World + archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads + events_url: https://api.github.com/repos/octocat/Hello-World/events + forks_url: https://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: git:github.com/octocat/Hello-World.git + issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} + languages_url: https://api.github.com/repos/octocat/Hello-World/languages + merges_url: https://api.github.com/repos/octocat/Hello-World/merges + milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: git@github.com:octocat/Hello-World.git + stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription + tags_url: https://api.github.com/repos/octocat/Hello-World/tags + teams_url: https://api.github.com/repos/octocat/Hello-World/teams + trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks codespaces-list: value: total_count: 3 @@ -229553,6 +230464,13 @@ components: required: true schema: type: string + configuration-id: + name: configuration_id + description: The unique identifier of the code security configuration. + in: path + required: true + schema: + type: integer role-id: name: role_id description: The unique identifier of the role. @@ -230627,11 +231545,11 @@ components: application/json: schema: "$ref": "#/components/schemas/basic-error" + no_content: + description: A header with no content is returned. package_es_list_error: description: The value of `per_page` multiplied by `page` cannot be greater than 10000. - no_content: - description: A header with no content is returned. gone: description: Gone content: