From b3eaa9b11391bda5b50ce18af6218d0495bebfe8 Mon Sep 17 00:00:00 2001 From: WyriHaximus <147145+WyriHaximus@users.noreply.github.com> Date: Mon, 16 Dec 2024 21:16:07 +0000 Subject: [PATCH] =?UTF-8?q?[GitHubEnterpriseCloud]=20Update=20to=201.1.4-7?= =?UTF-8?q?48267a07491cd1ebfa9c41b5a4c19d6=20from=201.1.4-369141ccf82ff71f?= =?UTF-8?q?710ebff5458b7b5a=20Detected=20Schema=20changes:=202024-12-16=20?= =?UTF-8?q?20:31:22=20ERROR=20unable=20to=20open=20the=20rolodex=20file,?= =?UTF-8?q?=20check=20specification=20references=20and=20base=20path=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=9C=20file:=20/=5F=5Fw/github-root/github-root/server-sta?= =?UTF-8?q?tistics-actions.yaml=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=E2=94=94=20error:=20open=20/=5F=5Fw?= =?UTF-8?q?/github-root/github-root/server-statistics-actions.yaml:=20no?= =?UTF-8?q?=20such=20file=20or=20directory=202024-12-16=2020:31:22=20ERROR?= =?UTF-8?q?=20unable=20to=20open=20the=20rolodex=20file,=20check=20specifi?= =?UTF-8?q?cation=20references=20and=20base=20path=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20file:?= =?UTF-8?q?=20/=5F=5Fw/github-root/github-root/server-statistics-packages.?= =?UTF-8?q?yaml=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=E2=94=94=20error:=20open=20/=5F=5Fw/github-root/gi?= =?UTF-8?q?thub-root/server-statistics-packages.yaml:=20no=20such=20file?= =?UTF-8?q?=20or=20directory=202024-12-16=2020:31:22=20ERROR=20unable=20to?= =?UTF-8?q?=20open=20the=20rolodex=20file,=20check=20specification=20refer?= =?UTF-8?q?ences=20and=20base=20path=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20file:=20/=5F=5Fw/g?= =?UTF-8?q?ithub-root/github-root/server-statistics-advisory-db.yaml=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=94=20error:=20open=20/=5F=5Fw/github-root/github-root/se?= =?UTF-8?q?rver-statistics-advisory-db.yaml:=20no=20such=20file=20or=20dir?= =?UTF-8?q?ectory=202024-12-16=2020:31:24=20ERROR=20unable=20to=20open=20t?= =?UTF-8?q?he=20rolodex=20file,=20check=20specification=20references=20and?= =?UTF-8?q?=20base=20path=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=E2=94=9C=20file:=20/=5F=5Fw/github-root/g?= =?UTF-8?q?ithub-root/server-statistics-actions.yaml=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=94=20err?= =?UTF-8?q?or:=20open=20/=5F=5Fw/github-root/github-root/server-statistics?= =?UTF-8?q?-actions.yaml:=20no=20such=20file=20or=20directory=202024-12-16?= =?UTF-8?q?=2020:31:24=20ERROR=20unable=20to=20open=20the=20rolodex=20file?= =?UTF-8?q?,=20check=20specification=20references=20and=20base=20path=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=E2=94=9C=20file:=20/=5F=5Fw/github-root/github-root/server-?= =?UTF-8?q?statistics-packages.yaml=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=E2=94=94=20error:=20open=20/=5F?= =?UTF-8?q?=5Fw/github-root/github-root/server-statistics-packages.yaml:?= =?UTF-8?q?=20no=20such=20file=20or=20directory=202024-12-16=2020:31:24=20?= =?UTF-8?q?ERROR=20unable=20to=20open=20the=20rolodex=20file,=20check=20sp?= =?UTF-8?q?ecification=20references=20and=20base=20path=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20?= =?UTF-8?q?error:=20open=20/=5F=5Fw/github-root/github-root/server-statist?= =?UTF-8?q?ics-advisory-db.yaml:=20no=20such=20file=20or=20directory=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=94=20file:=20/=5F=5Fw/github-root/github-root/server-sta?= =?UTF-8?q?tistics-advisory-db.yaml=20ERROR:=20component=20`server-statist?= =?UTF-8?q?ics-actions.yaml`=20does=20not=20exist=20in=20the=20specificati?= =?UTF-8?q?on=20ERROR:=20component=20`server-statistics-packages.yaml`=20d?= =?UTF-8?q?oes=20not=20exist=20in=20the=20specification=20ERROR:=20compone?= =?UTF-8?q?nt=20`server-statistics-advisory-db.yaml`=20does=20not=20exist?= =?UTF-8?q?=20in=20the=20specification=20ERROR:=20cannot=20resolve=20refer?= =?UTF-8?q?ence=20`server-statistics-actions.yaml`,=20it's=20missing:=20?= =?UTF-8?q?=20[212520:11]=20ERROR:=20cannot=20resolve=20reference=20`serve?= =?UTF-8?q?r-statistics-packages.yaml`,=20it's=20missing:=20=20[212522:11]?= =?UTF-8?q?=20ERROR:=20cannot=20resolve=20reference=20`server-statistics-a?= =?UTF-8?q?dvisory-db.yaml`,=20it's=20missing:=20=20[212524:11]=20ERROR:?= =?UTF-8?q?=20component=20`server-statistics-actions.yaml`=20does=20not=20?= =?UTF-8?q?exist=20in=20the=20specification=20ERROR:=20component=20`server?= =?UTF-8?q?-statistics-packages.yaml`=20does=20not=20exist=20in=20the=20sp?= =?UTF-8?q?ecification=20ERROR:=20component=20`server-statistics-advisory-?= =?UTF-8?q?db.yaml`=20does=20not=20exist=20in=20the=20specification=20ERRO?= =?UTF-8?q?R:=20cannot=20resolve=20reference=20`server-statistics-actions.?= =?UTF-8?q?yaml`,=20it's=20missing:=20=20[211350:11]=20ERROR:=20cannot=20r?= =?UTF-8?q?esolve=20reference=20`server-statistics-packages.yaml`,=20it's?= =?UTF-8?q?=20missing:=20=20[211352:11]=20ERROR:=20cannot=20resolve=20refe?= =?UTF-8?q?rence=20`server-statistics-advisory-db.yaml`,=20it's=20missing:?= =?UTF-8?q?=20=20[211354:11]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clients/GitHubEnterpriseCloud/README.md | 438 ++++ .../etc/openapi-client-generator.state | 450 +++- clients/GitHubEnterpriseCloud/src/Client.php | 2 +- .../src/ClientInterface.php | 2 +- .../CodeSecurity/Configurations.php | 1128 ++++++++ .../Configurations/ConfigurationId.php | 1128 ++++++++ .../Configurations/ConfigurationId/Attach.php | 286 +++ .../ConfigurationId/Defaults.php | 1055 ++++++++ .../ConfigurationId/Repositories.php | 286 +++ .../src/Internal/Hydrator/Operation/Meta.php | 111 + .../Orgs/Org/BypassRequests/PushRules.php | 286 +++ .../ConfigurationId/Defaults.php | 20 +- .../Owner/Repo/BypassRequests/PushRules.php | 286 +++ .../PushRules/BypassRequestNumber.php | 870 +++++++ .../Alerts/AlertNumber/Autofix.php | 450 ++++ .../Alerts/AlertNumber/Autofix/Commits.php | 441 ++++ .../src/Internal/Hydrators.php | 132 +- .../Operation/CodeScanning/CommitAutofix.php | 110 + .../Operation/CodeScanning/CreateAutofix.php | 115 + .../Operation/CodeScanning/GetAutofix.php | 98 + .../AttachEnterpriseConfiguration.php | 90 + .../CreateConfigurationForEnterprise.php | 100 + .../DeleteConfigurationForEnterprise.php | 109 + .../GetConfigurationsForEnterprise.php | 99 + .../GetDefaultConfigurationsForEnterprise.php | 73 + ...RepositoriesForEnterpriseConfiguration.php | 107 + .../GetSingleConfigurationForEnterprise.php | 88 + .../SetConfigurationAsDefault.php | 6 +- ...SetConfigurationAsDefaultForEnterprise.php | 82 + .../UpdateEnterpriseConfiguration.php | 99 + .../Operation/Orgs/ListPushBypassRequests.php | 113 + .../Orgs/ListPushBypassRequestsListing.php | 113 + .../Repos/GetRepoPushBypassRequest.php | 82 + .../Repos/ListRepoPushBypassRequests.php | 113 + .../ListRepoPushBypassRequestsListing.php | 113 + .../Operator/CodeScanning/CommitAutofix.php | 41 + .../Operator/CodeScanning/CreateAutofix.php | 41 + .../Operator/CodeScanning/GetAutofix.php | 40 + .../AttachEnterpriseConfiguration.php | 40 + .../CreateConfigurationForEnterprise.php | 40 + .../DeleteConfigurationForEnterprise.php | 40 + .../GetConfigurationsForEnterprise.php | 41 + .../GetDefaultConfigurationsForEnterprise.php | 41 + ...RepositoriesForEnterpriseConfiguration.php | 41 + .../GetSingleConfigurationForEnterprise.php | 41 + .../SetConfigurationAsDefault.php | 7 +- ...SetConfigurationAsDefaultForEnterprise.php | 40 + .../UpdateEnterpriseConfiguration.php | 41 + .../Operator/Orgs/ListPushBypassRequests.php | 41 + .../Orgs/ListPushBypassRequestsListing.php | 41 + .../Repos/GetRepoPushBypassRequest.php | 40 + .../Repos/ListRepoPushBypassRequests.php | 41 + .../ListRepoPushBypassRequestsListing.php | 41 + .../src/Internal/Operators.php | 170 ++ .../Internal/Router/Delete/CodeSecurity.php | 20 + .../src/Internal/Router/Delete/Six.php | 9 + .../src/Internal/Router/Get/CodeScanning.php | 27 + .../src/Internal/Router/Get/CodeSecurity.php | 113 + .../src/Internal/Router/Get/Eight.php | 11 +- .../src/Internal/Router/Get/Five.php | 14 +- .../src/Internal/Router/Get/Orgs.php | 57 + .../src/Internal/Router/Get/Repos.php | 84 + .../src/Internal/Router/Get/Seven.php | 23 +- .../src/Internal/Router/Get/Six.php | 22 +- .../src/Internal/Router/List/Five.php | 10 +- .../src/Internal/Router/List/Orgs.php | 63 + .../src/Internal/Router/List/Repos.php | 63 + .../src/Internal/Router/List/Six.php | 10 +- .../Internal/Router/Patch/CodeSecurity.php | 20 + .../src/Internal/Router/Patch/Six.php | 11 +- .../src/Internal/Router/Post/CodeScanning.php | 54 + .../src/Internal/Router/Post/CodeSecurity.php | 38 +- .../src/Internal/Router/Post/Eight.php | 15 +- .../src/Internal/Router/Post/Five.php | 9 +- .../src/Internal/Router/Post/Nine.php | 17 +- .../src/Internal/Router/Post/Seven.php | 16 +- .../src/Internal/Router/Put/CodeSecurity.php | 26 +- .../src/Internal/Router/Put/Seven.php | 16 +- .../src/Internal/Routers.php | 56 +- .../src/Operation/CodeScanning.php | 17 + .../src/Operation/CodeSecurity.php | 57 +- .../src/Operation/Orgs.php | 12 + .../src/Operation/Repos.php | 18 + .../GitHubEnterpriseCloud/src/Operations.php | 10 +- .../src/OperationsInterface.php | 4 +- .../src/PHPStan/ClientCallReturnTypes.php | 70 +- .../Tiet17BD6D01/Tiet0890CA07.php | 313 +++ .../TietAC26D50C/Tiet27D4E07F.php | 35 + .../Tiet207FA02F/Tiet074F28B9.php | 39 + .../src/Schema/ApiOverview.php | 33 + .../src/Schema/ApiOverview/Domains.php | 36 +- .../ApiOverview/Domains/ActionsInbound.php | 52 + .../src/Schema/BypassResponse.php | 73 + .../src/Schema/BypassResponse/Reviewer.php | 41 + .../src/Schema/CodeScanningAutofix.php | 61 + .../src/Schema/CodeScanningAutofixCommits.php | 43 + .../CodeScanningAutofixCommitsResponse.php | 39 + .../Schema/CodeScanningAutofixDescription.php | 23 + .../Schema/CodeScanningAutofixStartedAt.php | 22 + .../src/Schema/CodeScanningAutofixStatus.php | 26 + .../Request/ApplicationJson.php | 38 + ...DependencyGraphAutosubmitActionOptions.php | 28 +- .../Request/ApplicationJson.php | 245 ++ ...DependencyGraphAutosubmitActionOptions.php | 11 + .../Request/ApplicationJson.php | 32 +- .../Request/ApplicationJson.php | 11 + .../Request/ApplicationJson.php | 228 ++ ...DependencyGraphAutosubmitActionOptions.php | 11 + .../Response/ApplicationJson/Accepted.php | 11 + .../Accepted/Application/Json.php | 11 + .../Response/ApplicationJson/Ok.php | 304 +-- .../ApplicationJson/Ok/Application/Json.php | 11 + .../Response/ApplicationJson/Ok.php | 11 + .../src/Schema/PushRuleBypassRequest.php | 258 ++ .../src/Schema/PushRuleBypassRequest/Data.php | 54 + .../PushRuleBypassRequest/Organization.php | 37 + .../PushRuleBypassRequest/Repository.php | 46 + .../PushRuleBypassRequest/Requester.php | 41 + .../CodeScanning/CommitAutofixTest.php | 237 ++ .../CodeScanning/CreateAutofixTest.php | 271 ++ .../Operation/CodeScanning/GetAutofixTest.php | 201 ++ .../AttachEnterpriseConfigurationTest.php | 161 ++ .../CreateConfigurationForEnterpriseTest.php | 191 ++ .../DeleteConfigurationForEnterpriseTest.php | 233 ++ .../GetConfigurationsForEnterpriseTest.php | 97 + ...DefaultConfigurationsForEnterpriseTest.php | 12 + ...sitoriesForEnterpriseConfigurationTest.php | 101 + ...etSingleConfigurationForEnterpriseTest.php | 161 ++ ...onfigurationAsDefaultForEnterpriseTest.php | 126 + .../SetConfigurationAsDefaultTest.php | 4 +- .../UpdateEnterpriseConfigurationTest.php | 196 ++ .../ListPushBypassRequestsListingTest.php | 113 + .../Orgs/ListPushBypassRequestsTest.php | 105 + .../Repos/GetRepoPushBypassRequestTest.php | 129 + .../ListRepoPushBypassRequestsListingTest.php | 113 + .../Repos/ListRepoPushBypassRequestsTest.php | 105 + .../tests/Types/ClientCallReturnTypes.php | 19 +- .../GitHubEnterpriseCloud/current.spec.yaml | 2279 +++++++++++++---- 138 files changed, 17084 insertions(+), 935 deletions(-) create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Attach.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Defaults.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Repositories.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/BypassRequests/PushRules.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/BypassRequests/PushRules.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/BypassRequests/PushRules/BypassRequestNumber.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix/Commits.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CommitAutofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CreateAutofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/GetAutofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/AttachEnterpriseConfiguration.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/CreateConfigurationForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfigurationsForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetDefaultConfigurationsForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetRepositoriesForEnterpriseConfiguration.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetSingleConfigurationForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/UpdateEnterpriseConfiguration.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPushBypassRequests.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPushBypassRequestsListing.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/GetRepoPushBypassRequest.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/ListRepoPushBypassRequests.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/ListRepoPushBypassRequestsListing.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/CommitAutofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/CreateAutofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/GetAutofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/AttachEnterpriseConfiguration.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/CreateConfigurationForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/DeleteConfigurationForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfigurationsForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetDefaultConfigurationsForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetRepositoriesForEnterpriseConfiguration.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetSingleConfigurationForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/UpdateEnterpriseConfiguration.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPushBypassRequests.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPushBypassRequestsListing.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoPushBypassRequest.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListRepoPushBypassRequests.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListRepoPushBypassRequestsListing.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet07CEC6F7/Tiet1DE9A5A0/Tiet17BD6D01/Tiet0890CA07.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet8DAAD835/Tiet93FE8D1C/TietAC26D50C/Tiet27D4E07F.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/TietA915022E/Tiet867AF88E/Tiet207FA02F/Tiet074F28B9.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/ApiOverview/Domains/ActionsInbound.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/BypassResponse.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/BypassResponse/Reviewer.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeScanningAutofix.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeScanningAutofixCommits.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeScanningAutofixCommitsResponse.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeScanningAutofixDescription.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeScanningAutofixStartedAt.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeScanningAutofixStatus.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/AttachEnterpriseConfiguration/Request/ApplicationJson.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/CreateConfigurationForEnterprise/Request/ApplicationJson.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/CreateConfigurationForEnterprise/Request/ApplicationJson/DependencyGraphAutosubmitActionOptions.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/SetConfigurationAsDefaultForEnterprise/Request/ApplicationJson.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/UpdateEnterpriseConfiguration/Request/ApplicationJson.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/CodeSecurity/UpdateEnterpriseConfiguration/Request/ApplicationJson/DependencyGraphAutosubmitActionOptions.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/Operations/CodeSecurity/AttachEnterpriseConfiguration/Response/ApplicationJson/Accepted.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/Operations/CodeSecurity/AttachEnterpriseConfiguration/Response/ApplicationJson/Accepted/Application/Json.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/Operations/CodeSecurity/SetConfigurationAsDefault/Response/ApplicationJson/Ok/Application/Json.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/Operations/CodeSecurity/SetConfigurationAsDefaultForEnterprise/Response/ApplicationJson/Ok.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/PushRuleBypassRequest.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/PushRuleBypassRequest/Data.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/PushRuleBypassRequest/Organization.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/PushRuleBypassRequest/Repository.php create mode 100644 clients/GitHubEnterpriseCloud/src/Schema/PushRuleBypassRequest/Requester.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/CommitAutofixTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/CreateAutofixTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/GetAutofixTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/AttachEnterpriseConfigurationTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/CreateConfigurationForEnterpriseTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterpriseTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationsForEnterpriseTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetDefaultConfigurationsForEnterpriseTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetRepositoriesForEnterpriseConfigurationTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetSingleConfigurationForEnterpriseTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterpriseTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/UpdateEnterpriseConfigurationTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsListingTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/GetRepoPushBypassRequestTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsListingTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsTest.php diff --git a/clients/GitHubEnterpriseCloud/README.md b/clients/GitHubEnterpriseCloud/README.md index 101fec9b4ab..b68fc9dff19 100644 --- a/clients/GitHubEnterpriseCloud/README.md +++ b/clients/GitHubEnterpriseCloud/README.md @@ -1998,6 +1998,212 @@ $client->operations()->codeScanning()->listAlertsForEnterpriseListing( en 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-enterprise). +### code-security/get-configurations-for-enterprise + +Get code security configurations for an enterprise + +Using the `call` method: +```php +$client->call('GET /enterprises/{enterprise}/code-security/configurations', [ + 'enterprise' => 'generated', + 'before' => 'generated', + 'after' => 'generated', + 'per_page' => 8, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getConfigurationsForEnterprise( enterprise: 'generated', + before: 'generated', + after: '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-enterprise). + + +### code-security/create-configuration-for-enterprise + +Create a code security configuration for an enterprise + +Using the `call` method: +```php +$client->call('POST /enterprises/{enterprise}/code-security/configurations', [ + 'enterprise' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->createConfigurationForEnterprise( enterprise: '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-for-an-enterprise). + + +### code-security/get-default-configurations-for-enterprise + +Get default code security configurations for an enterprise + +Using the `call` method: +```php +$client->call('GET /enterprises/{enterprise}/code-security/configurations/defaults', [ + 'enterprise' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getDefaultConfigurationsForEnterprise( enterprise: '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-for-an-enterprise). + + +### code-security/get-single-configuration-for-enterprise + +Retrieve a code security configuration of an enterprise + +Using the `call` method: +```php +$client->call('GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}', [ + 'enterprise' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getSingleConfigurationForEnterprise( enterprise: '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#retrieve-a-code-security-configuration-of-an-enterprise). + + +### code-security/delete-configuration-for-enterprise + +Delete a code security configuration for an enterprise + +Using the `call` method: +```php +$client->call('DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}', [ + 'enterprise' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->deleteConfigurationForEnterprise( enterprise: '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-for-an-enterprise). + + +### code-security/update-enterprise-configuration + +Update a custom code security configuration for an enterprise + +Using the `call` method: +```php +$client->call('PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}', [ + 'enterprise' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->updateEnterpriseConfiguration( enterprise: '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-custom-code-security-configuration-for-an-enterprise). + + +### code-security/attach-enterprise-configuration + +Attach an enterprise configuration to repositories + +Using the `call` method: +```php +$client->call('POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach', [ + 'enterprise' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->attachEnterpriseConfiguration( enterprise: '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-an-enterprise-configuration-to-repositories). + + +### code-security/set-configuration-as-default-for-enterprise + +Set a code security configuration as a default for an enterprise + +Using the `call` method: +```php +$client->call('PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults', [ + 'enterprise' => 'generated', + 'configuration_id' => 16, +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->setConfigurationAsDefaultForEnterprise( enterprise: '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-enterprise). + + +### code-security/get-repositories-for-enterprise-configuration + +Get repositories associated with an enterprise code security configuration + +Using the `call` method: +```php +$client->call('GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories', [ + 'enterprise' => 'generated', + 'configuration_id' => 16, + 'before' => 'generated', + 'after' => 'generated', + 'per_page' => 8, + 'status' => 'generated', +]); +``` + +Operations method: +```php +$client->operations()->codeSecurity()->getRepositoriesForEnterpriseConfiguration( enterprise: '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-an-enterprise-code-security-configuration). + + ### secret-scanning/get-security-analysis-settings-for-enterprise Get code security and analysis features for an enterprise @@ -5854,6 +6060,74 @@ $client->operations()->orgs()->unblockUser( org: 'generated', You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/orgs/blocking#unblock-a-user-from-an-organization). +### orgs/list-push-bypass-requests + +List push rule bypass requests within an organization + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/bypass-requests/push-rules', [ + 'org' => 'generated', + 'repository_name' => 'generated', + 'reviewer' => 'generated', + 'requester' => 'generated', + 'time_period' => 'generated', + 'request_status' => 'generated', + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->orgs()->listPushBypassRequests( org: 'generated', + repository_name: 'generated', + reviewer: 'generated', + requester: 'generated', + time_period: 'generated', + request_status: 'generated', + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/orgs/bypass-requests#list-push-rule-bypass-requests-within-an-organization). + + +### orgs/list-push-bypass-requests + +List push rule bypass requests within an organization + +Using the `call` method: +```php +$client->call('LIST /orgs/{org}/bypass-requests/push-rules', [ + 'org' => 'generated', + 'repository_name' => 'generated', + 'reviewer' => 'generated', + 'requester' => 'generated', + 'time_period' => 'generated', + 'request_status' => 'generated', + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->orgs()->listPushBypassRequestsListing( org: 'generated', + repository_name: 'generated', + reviewer: 'generated', + requester: 'generated', + time_period: 'generated', + request_status: 'generated', + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/orgs/bypass-requests#list-push-rule-bypass-requests-within-an-organization). + + ### code-scanning/list-alerts-for-org List code scanning alerts for an organization @@ -16021,6 +16295,98 @@ $client->operations()->repos()->renameBranch( owner: 'generated', You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/branches/branches#rename-a-branch). +### repos/list-repo-push-bypass-requests + +List repository push rule bypass requests + +Using the `call` method: +```php +$client->call('GET /repos/{owner}/{repo}/bypass-requests/push-rules', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'reviewer' => 'generated', + 'requester' => 'generated', + 'time_period' => 'generated', + 'request_status' => 'generated', + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->repos()->listRepoPushBypassRequests( owner: 'generated', + repo: 'generated', + reviewer: 'generated', + requester: 'generated', + time_period: 'generated', + request_status: 'generated', + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/repos/bypass-requests#list-repository-push-rule-bypass-requests). + + +### repos/list-repo-push-bypass-requests + +List repository push rule bypass requests + +Using the `call` method: +```php +$client->call('LIST /repos/{owner}/{repo}/bypass-requests/push-rules', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'reviewer' => 'generated', + 'requester' => 'generated', + 'time_period' => 'generated', + 'request_status' => 'generated', + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->repos()->listRepoPushBypassRequestsListing( owner: 'generated', + repo: 'generated', + reviewer: 'generated', + requester: 'generated', + time_period: 'generated', + request_status: 'generated', + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/repos/bypass-requests#list-repository-push-rule-bypass-requests). + + +### repos/get-repo-push-bypass-request + +Get a repository push bypass request + +Using the `call` method: +```php +$client->call('GET /repos/{owner}/{repo}/bypass-requests/push-rules/{bypass_request_number}', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'bypass_request_number' => 21, +]); +``` + +Operations method: +```php +$client->operations()->repos()->getRepoPushBypassRequest( owner: 'generated', + repo: 'generated', + bypass_request_number: 21, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/repos/bypass-requests#get-a-repository-push-bypass-request). + + ### checks/create Create a check run @@ -16437,6 +16803,78 @@ $client->operations()->codeScanning()->updateAlert( owner: 'generated', 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#update-a-code-scanning-alert). +### code-scanning/get-autofix + +Get the status of an autofix for a code scanning alert + +Using the `call` method: +```php +$client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'alert_number' => 12, +]); +``` + +Operations method: +```php +$client->operations()->codeScanning()->getAutofix( owner: 'generated', + repo: 'generated', + alert_number: 12, +); +``` + +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#get-the-status-of-an-autofix-for-a-code-scanning-alert). + + +### code-scanning/create-autofix + +Create an autofix for a code scanning alert + +Using the `call` method: +```php +$client->call('POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'alert_number' => 12, +]); +``` + +Operations method: +```php +$client->operations()->codeScanning()->createAutofix( owner: 'generated', + repo: 'generated', + alert_number: 12, +); +``` + +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#create-an-autofix-for-a-code-scanning-alert). + + +### code-scanning/commit-autofix + +Commit an autofix for a code scanning alert + +Using the `call` method: +```php +$client->call('POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'alert_number' => 12, +]); +``` + +Operations method: +```php +$client->operations()->codeScanning()->commitAutofix( owner: 'generated', + repo: 'generated', + alert_number: 12, +); +``` + +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#commit-an-autofix-for-a-code-scanning-alert). + + ### code-scanning/list-alert-instances List instances of a code scanning alert diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index ddb3de2cf51..a3a060c1fe9 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "369141ccf82ff71f710ebff5458b7b5a", + "specHash": "748267a07491cd1ebfa9c41b5a4c19d6", "generatedFiles": { "files": [ { @@ -456,7 +456,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ApiOverview.php", - "hash": "43502739bba053f2d341869e9194d097" + "hash": "52cd2f6557fd18bf29c6ed72fcd1a85f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/SecurityAndAnalysis.php", @@ -5852,15 +5852,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/ClientInterface.php", - "hash": "925f58017e1af2412a07603ae824799b" + "hash": "e85f3817c75761d6166d9a34923f1389" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Client.php", - "hash": "b565a6ec24e38a90281f0df9d9632394" + "hash": "32c95222825e027be4be84dc412b8396" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/OperationsInterface.php", - "hash": "310c0ad979571db963169fa417b75243" + "hash": "9d15439360dd04ac003a94eb4af894c2" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Meta.php", @@ -5892,11 +5892,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodeScanning.php", - "hash": "729c5f94c55f343c08d943ea6d6dc2a6" + "hash": "d4f2a39a9edb1cb76e91e54e228d1ec8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "dd6a39a006226ac2a532be41a087a1c4" + "hash": "94da37f210f9fc8d7220b2d7e525770e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Dependabot.php", @@ -5932,7 +5932,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "6ac1659d98f782954827c854f4dff7ae" + "hash": "0b533fbf5b65e92af85052bc6b784737" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Oidc.php", @@ -5964,7 +5964,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "d7956f53b12b6bfc6eb982a64e3a0424" + "hash": "e5baa49c48e2c4b1c90320bfdf50f49e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php", @@ -6008,7 +6008,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operations.php", - "hash": "3f412eea09babb6325879ea29dbd8be1" + "hash": "54bb75c01b55c6aa0900418464713265" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/WebHooks.php", @@ -12000,7 +12000,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains.php", - "hash": "dcd940b8599e21b489d62fb927517df1" + "hash": "53a81b9c5e3795247df5d9d637358df5" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/SecurityAndAnalysis\/DependabotSecurityUpdates.php", @@ -25980,7 +25980,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php", - "hash": "9656e4aaa0d1bfbe8b84a9b8987c3709" + "hash": "8a97a250fe477027c8a03fea0fc1508c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/RateLimit.php", @@ -25988,7 +25988,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php", - "hash": "624905488b2eb06782e02645c2960a43" + "hash": "7fa8e1622ce35199b5c2de910e58c760" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php", @@ -26040,7 +26040,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeScanning.php", - "hash": "34f3eedbcb467616a42b779c0f3ffa69" + "hash": "64c5712bddee781b24d5aaff2e54d145" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Dependabot.php", @@ -26132,7 +26132,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/CodeScanning.php", - "hash": "a233d6e2129a71322a54b4ce8f5954c8" + "hash": "3a26f653f5726dbc876e89ca0f529d51" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/DependencyGraph.php", @@ -26292,7 +26292,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Orgs.php", - "hash": "36412ebcc57862f1982cc18393155068" + "hash": "7e376b7ed724e1ab18f79259c8ea9dba" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Packages.php", @@ -26300,7 +26300,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Repos.php", - "hash": "cbd5354784413a34b58d3dcad984c30a" + "hash": "5c5be6cacc7740aee79223395dd46d39" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Activity.php", @@ -26540,19 +26540,19 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "0ff8b12829637163e5669984963e8132" + "hash": "2fcbb99972d7d293145ec2f8d7abb2f9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "634fc2d288401a367fcf45a077e838a8" + "hash": "1eb56fa9648a993150ea23dd6d55a6fd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "a692e3b2521738ca59df4bcc4aee1495" + "hash": "590d03bbefcf03b6b0d85382a886e8ff" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", - "hash": "1cf5790594bbb4d1413a9716c0f7dd0a" + "hash": "5e406347e5b08ba5233a15d86c14bb55" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Nine.php", @@ -26572,11 +26572,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Five.php", - "hash": "15312ba97078e9b59a44d6a62bc96584" + "hash": "1ab6be9d494d12b0cfc2240206229474" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Seven.php", - "hash": "7e7fe58d896c21a433c1b9f772f515da" + "hash": "b83e2c5f597e44740ae377f740b7e6cf" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Two.php", @@ -26588,11 +26588,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Eight.php", - "hash": "2e210c50daaef173ad79680471391c6e" + "hash": "3f243a3cccf19b4b3e9d149055e07b46" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Nine.php", - "hash": "07894740414497234a0338caf720bb29" + "hash": "5a2a20e4f471ee61028e3113a35051e2" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Ten.php", @@ -26604,7 +26604,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Six.php", - "hash": "9a5680ab1288bcea31889f25f2acb5d1" + "hash": "bccddbae9ed12948093cbae1dfa191c1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Three.php", @@ -26640,7 +26640,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "381b412abe49fd76e8e7e3fabc5978d8" + "hash": "a0253d4d997a1c4e2fac9cf7dc63f700" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Two.php", @@ -26648,7 +26648,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "fe00f124d0b03577835808f3c34eb6fd" + "hash": "c3bb6844087069507cefc8d51c7c3b96" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -26680,7 +26680,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Six.php", - "hash": "6218526b67fc4d9a25a087637d40069a" + "hash": "f275254da5091ca5bdcb16d8f80c8352" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Eight.php", @@ -26704,7 +26704,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Seven.php", - "hash": "0285c2b5a62c937aeecff4b83001b344" + "hash": "1dc0c10d31154a3249dbd500a89e8a06" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/Six.php", @@ -26744,11 +26744,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Routers.php", - "hash": "da17fa9e41d46b43ed56746c253e4525" + "hash": "90532c1af138835027b331c0cc20148a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operators.php", - "hash": "d48d31ed24bfece6135779b9ff18653f" + "hash": "fa562c234ab85888be8e80c6028dced0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php", @@ -27020,7 +27020,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Meta.php", - "hash": "6ec80e627a4899f39a12108aa03d83f7" + "hash": "93c849f37393bd0232bb963501ebef93" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Networks\/Owner\/Repo\/Events.php", @@ -28920,7 +28920,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "f362cf4fd37f55c10375ea54bb3f0775" + "hash": "7095b5ef87c58db759b7ee5dd7ae11dd" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php", @@ -29716,11 +29716,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "fa8324038520b5ff50d12333fa2bcbf2" + "hash": "f6e7df0b15f89c608f2f2de87367c089" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "3d96ca615a77ab7476b1934f90dad7cd" + "hash": "54d1b698683a624645a8c5c53c48d042" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -31904,15 +31904,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/SetConfigurationAsDefault.php", - "hash": "b662af2e2714fd033ec20fc7b65e8deb" + "hash": "18efbc0464fd63676607e16fccd420be" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/SetConfigurationAsDefault.php", - "hash": "71d0ff250042e2c1ae2744c378728823" + "hash": "c047af2b743feee48fb5c9992c635ae0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/SetConfigurationAsDefaultTest.php", - "hash": "852c8a9d2f10eb53dedf82db3f49522c" + "hash": "966911341ce032014b2cbef331e56490" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetRepositoriesForConfiguration.php", @@ -31960,35 +31960,35 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/SetConfigurationAsDefault\/Request\/ApplicationJson.php", - "hash": "f1cb4f50560f1f6e883345178c7430f6" + "hash": "888b869563dbf8c92a607289636bd78f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/SetConfigurationAsDefault\/Response\/ApplicationJson\/Ok.php", - "hash": "fd75b0c60d8209d1701aa1a589f220c7" + "hash": "0ff5f85b912aab461e0e0d0a3acc1e54" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeSecurity.php", - "hash": "cf8340ba3122e63614d4f0577e4c668b" + "hash": "20d8ac3f325604aeea6043a2f023f687" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/CodeSecurity.php", - "hash": "94f9a8fa66537c6f7d79ddd0710d8c82" + "hash": "3b5f9ab81748df16183bac9864711653" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeSecurity.php", - "hash": "c8db94eb44d9757d72c1ed5c467427bc" + "hash": "e8626c45b4e4f2f5a17f4ead2f116553" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/CodeSecurity.php", - "hash": "f07878f5d3d22ca65580699078f0e16e" + "hash": "41c76f5dde541747549ee6039773a1d1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Put\/CodeSecurity.php", - "hash": "8afdb5651e457b79c7559ac05efb1a3a" + "hash": "5cbc269f6b6b9fd58ba54d09363069da" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodeSecurity.php", - "hash": "1753bc68e4ff43d4b4158853685213e0" + "hash": "dac66df4cb27c7beaf3663f89d430ead" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations.php", @@ -32008,7 +32008,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Defaults.php", - "hash": "0bfad350f88990ab632986dbaed40e89" + "hash": "75f95c17961c72fc3156b36c4e28ea1c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations\/ConfigurationId\/Repositories.php", @@ -32436,7 +32436,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/CreateConfiguration\/Request\/ApplicationJson\/DependencyGraphAutosubmitActionOptions.php", - "hash": "bd0b6c94779a856b059ca8080a3b189c" + "hash": "b739dfbb4ccd34fd596b5abf62c79b8f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/SecretScanning\/CreatePushProtectionBypass\/Request\/ApplicationJson.php", @@ -33717,6 +33717,358 @@ { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecretScanningScan.php", "hash": "5d3c4be98252bd189197d3bce1896b8b" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetConfigurationsForEnterprise.php", + "hash": "a276423b58a93274436fcbb0509a4e9b" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetConfigurationsForEnterprise.php", + "hash": "e52d3fb93a955416c9f7db724a6ce881" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetConfigurationsForEnterpriseTest.php", + "hash": "df7dff80ef9da4143fc8f1ddb86f526f" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/CreateConfigurationForEnterprise.php", + "hash": "94a3b9a80096bd8ac2cda4a0e14cce95" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/CreateConfigurationForEnterprise.php", + "hash": "6ee0fd83befd00f1628b00d927f65429" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/CreateConfigurationForEnterpriseTest.php", + "hash": "934a5704e6c703bba5cbda4f4a729f71" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetDefaultConfigurationsForEnterprise.php", + "hash": "356597d76ff684a7997e77e9cedec6e1" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetDefaultConfigurationsForEnterprise.php", + "hash": "4b537b99a0bff86acefc874e6e46c6dd" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetDefaultConfigurationsForEnterpriseTest.php", + "hash": "6b90af88aafc540be3baabab7083880d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetSingleConfigurationForEnterprise.php", + "hash": "c7c61cba7e6b22de0b25d67c9b4e9e86" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetSingleConfigurationForEnterprise.php", + "hash": "e3c8b96a07b8a6cc81f9e75b312c89cb" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetSingleConfigurationForEnterpriseTest.php", + "hash": "e5e193ef874b34dc4828f67d7e2ed10a" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/DeleteConfigurationForEnterprise.php", + "hash": "d0e9d9f83c870c6f94cb2361cdd156ba" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/DeleteConfigurationForEnterprise.php", + "hash": "2a6c03d0838d51d17fbacd4150b4a752" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/DeleteConfigurationForEnterpriseTest.php", + "hash": "8f299fbf19c4e47898e7296606c61c00" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/UpdateEnterpriseConfiguration.php", + "hash": "16ed681adf2a8f15fc10192ba327195a" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/UpdateEnterpriseConfiguration.php", + "hash": "da4030b8449905331eb49574827adc7c" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/UpdateEnterpriseConfigurationTest.php", + "hash": "feaca71764c88d677cd0a53ca8491833" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/AttachEnterpriseConfiguration.php", + "hash": "3d0e7fcad611b22557583e40ba7bd543" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/AttachEnterpriseConfiguration.php", + "hash": "8d71e820b245eb2f362a9c7864c8f551" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/AttachEnterpriseConfigurationTest.php", + "hash": "d1ca73683fc462b62bdedd2f6121292d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/SetConfigurationAsDefaultForEnterprise.php", + "hash": "0b359ea53c51494fb6ac8efcf2fc5d00" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/SetConfigurationAsDefaultForEnterprise.php", + "hash": "dc0e6ad5bc75e74b7164dd53429aeae9" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/SetConfigurationAsDefaultForEnterpriseTest.php", + "hash": "ad341d511d43d8fa39927840707868f9" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeSecurity\/GetRepositoriesForEnterpriseConfiguration.php", + "hash": "62fcb338de1dc5a5ce858a263a6770fc" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetRepositoriesForEnterpriseConfiguration.php", + "hash": "347f0f1b9464c1e6dcb9bc3bccffd71d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetRepositoriesForEnterpriseConfigurationTest.php", + "hash": "bdb27216c33af795687d1dad0e96d9cf" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListPushBypassRequests.php", + "hash": "d30c0e0a48ee8a7f41d3d2f7f9efeb53" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListPushBypassRequests.php", + "hash": "a784815f3667ffbc0c96aa4c312979dd" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListPushBypassRequestsTest.php", + "hash": "52fce7040f46d98c14bf943b7e418943" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListPushBypassRequestsListing.php", + "hash": "380efb902663800121052e010ee3ce96" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListPushBypassRequestsListing.php", + "hash": "15d5b0b18eda21392ef40ed965f37eca" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListPushBypassRequestsListingTest.php", + "hash": "30d43b1c42c8d1cef5c9361a42d3c71d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/ListRepoPushBypassRequests.php", + "hash": "dd2d7cc97c5f0830e79b9f8736feb677" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/ListRepoPushBypassRequests.php", + "hash": "5706ee6b4bdd8c5a4d343c5a0a7f44f0" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/ListRepoPushBypassRequestsTest.php", + "hash": "ca98b73e8560ca340757c5edeae4d465" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/ListRepoPushBypassRequestsListing.php", + "hash": "5519f675a1e17a1306e399285d02a378" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/ListRepoPushBypassRequestsListing.php", + "hash": "ba2b63f0270007fb20b222d6a9c758cc" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/ListRepoPushBypassRequestsListingTest.php", + "hash": "7ec6cddffdb37b49bfe732515ab4bce9" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoPushBypassRequest.php", + "hash": "b7b40354419e22e6df9371e6a5f8f6e5" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoPushBypassRequest.php", + "hash": "2c5deaf12eeab257aae7695e11dc2129" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoPushBypassRequestTest.php", + "hash": "5ec487b9b2513e13301a7fffe63d9463" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/GetAutofix.php", + "hash": "2dabd7274e6dfdc258151b237b151178" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/GetAutofix.php", + "hash": "459796bc386478473611cca99134caf5" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/GetAutofixTest.php", + "hash": "0e3ee2dbbcb45473c680e3c0988f000d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/CreateAutofix.php", + "hash": "883b7e657394bcf946d340a64333d1e6" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/CreateAutofix.php", + "hash": "64c61bdaafa62f56e3bef1a966e14476" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/CreateAutofixTest.php", + "hash": "c72298ed118eaa3a3b53f575c070f497" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/CommitAutofix.php", + "hash": "72cc2c99d37b40b89904aeafa7e78ca0" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/CommitAutofix.php", + "hash": "9ddcd1fa6be78aa8ada7c20e31159427" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/CommitAutofixTest.php", + "hash": "f88614f11656679d1e62919aaeae91c7" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/BypassResponse.php", + "hash": "e0e1d428e164d961eb18d458c7693270" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/PushRuleBypassRequest.php", + "hash": "358834440086d63bdae6ce35e35796de" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeScanningAutofixStatus.php", + "hash": "96c98fdf772f3f96c8b72dcf8bf00946" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeScanningAutofixDescription.php", + "hash": "d2ee2fa0049e37a897ac1666bf271c1e" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeScanningAutofixStartedAt.php", + "hash": "b24ef5a5677e3d7009388c2b3b9fdc8a" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeScanningAutofix.php", + "hash": "b96071dbab9f34ba26eee8c6483504bf" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeScanningAutofixCommits.php", + "hash": "c0515d08d4dd606d39322ae6ec955888" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeScanningAutofixCommitsResponse.php", + "hash": "b01d7b3cee5ec61faf6e630f08389613" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/AttachEnterpriseConfiguration\/Response\/ApplicationJson\/Accepted.php", + "hash": "b7899a0a92d434de2ed0f9f98ea55c27" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/AttachEnterpriseConfiguration\/Response\/ApplicationJson\/Accepted\/Application\/Json.php", + "hash": "fd02b74fd8a73e5ec0dc9bafca2a5cab" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/UpdateEnterpriseConfiguration\/Request\/ApplicationJson\/DependencyGraphAutosubmitActionOptions.php", + "hash": "7ab199e28110a57f081b24b5c8b20c76" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains\/ActionsInbound.php", + "hash": "dea04b2db1df1c79b3061a1ed4173719" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/BypassResponse\/Reviewer.php", + "hash": "f324fcefbdd05c8c1a98e459e1e59840" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/PushRuleBypassRequest\/Repository.php", + "hash": "1da05fc6e47fb845b1ac173e0cebfe52" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/PushRuleBypassRequest\/Organization.php", + "hash": "4d7dae671b44d319ba2546a1bd5a83d4" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/PushRuleBypassRequest\/Requester.php", + "hash": "0098264bf2a56c6cf95813695654141a" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/PushRuleBypassRequest\/Data.php", + "hash": "b7e6658ecb78059b6fc79d63ba2e9576" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/CreateConfigurationForEnterprise\/Request\/ApplicationJson.php", + "hash": "b8bd36e2f7e12d9998362c646b1b6af0" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet8DAAD835\/Tiet93FE8D1C\/TietAC26D50C\/Tiet27D4E07F.php", + "hash": "576e2a99527c4d114fc5c156fe238f0d" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/CreateConfigurationForEnterprise\/Request\/ApplicationJson\/DependencyGraphAutosubmitActionOptions.php", + "hash": "6e8cc8637397b0821f7254e1641bc3f2" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/UpdateEnterpriseConfiguration\/Request\/ApplicationJson.php", + "hash": "b74982c2bfaf4e28071a0a38bdd9596b" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/AttachEnterpriseConfiguration\/Request\/ApplicationJson.php", + "hash": "7a1f575c4e68431273161a64b681c347" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietA915022E\/Tiet867AF88E\/Tiet207FA02F\/Tiet074F28B9.php", + "hash": "15ae5ad8e43229e3827a30f0be8fcec4" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CodeSecurity\/SetConfigurationAsDefaultForEnterprise\/Request\/ApplicationJson.php", + "hash": "e5943d59c1e72062478e134246d465c3" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet07CEC6F7\/Tiet1DE9A5A0\/Tiet17BD6D01\/Tiet0890CA07.php", + "hash": "07348a95943c2ac90c1fc9b959cf8908" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/SetConfigurationAsDefault\/Response\/ApplicationJson\/Ok\/Application\/Json.php", + "hash": "524a906c01ad312e155194d4ec5cba59" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/CodeSecurity\/SetConfigurationAsDefaultForEnterprise\/Response\/ApplicationJson\/Ok.php", + "hash": "7b90cbbc89e8adfb62445984f4b58d7f" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/CodeSecurity\/Configurations.php", + "hash": "e70be522b36a14381714f1ced947e87c" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/CodeSecurity\/Configurations\/ConfigurationId.php", + "hash": "e87061f55498510dd10f277bf8f68267" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/CodeSecurity\/Configurations\/ConfigurationId\/Attach.php", + "hash": "a64ac2d39a60ba2b6a5c290dba3c98f7" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/CodeSecurity\/Configurations\/ConfigurationId\/Defaults.php", + "hash": "85f5b148fa83433491745fa2af242083" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/CodeSecurity\/Configurations\/ConfigurationId\/Repositories.php", + "hash": "f21c4e8b4b5429b973c32ce43e677bb0" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/BypassRequests\/PushRules.php", + "hash": "1e300e6889a27c4223e0f1959112da84" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/BypassRequests\/PushRules.php", + "hash": "45bbea7137126da25f3e8a83e000ccf5" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/BypassRequests\/PushRules\/BypassRequestNumber.php", + "hash": "6d2e3535f3b53cfb0af5ed4aca90eac6" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber\/Autofix.php", + "hash": "8ab8210c93f604f18cd69d099166b704" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber\/Autofix\/Commits.php", + "hash": "ba941ef703c561ffaead0a007f948518" } ] }, diff --git a/clients/GitHubEnterpriseCloud/src/Client.php b/clients/GitHubEnterpriseCloud/src/Client.php index 6fa93dea180..f61c0707dd3 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\AuditLogStreamKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAuditLogStreamConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\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\Orgs\ListAttestations\Response\ApplicationJson\Ok|\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|\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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\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\ApiInsightsSummaryStats|\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\FullRepository|\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\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\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\CodeSecurityConfigurationForRepository|\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\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningScanHistory|\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\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\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\AuditLogStreamKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAuditLogStreamConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\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\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\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|\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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\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\ApiInsightsSummaryStats|\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\FullRepository|\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\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\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\PushRuleBypassRequest|\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\CodeScanningAutofix|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse|\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\CodeSecurityConfigurationForRepository|\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\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningScanHistory|\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\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\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 3ce34263005..952f7882701 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\AuditLogStreamKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAuditLogStreamConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\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\Orgs\ListAttestations\Response\ApplicationJson\Ok|\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|\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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\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\ApiInsightsSummaryStats|\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\FullRepository|\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\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\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\CodeSecurityConfigurationForRepository|\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\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningScanHistory|\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\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\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\AuditLogStreamKey|\ApiClients\Client\GitHubEnterpriseCloud\Schema\GetAuditLogStreamConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\EnterpriseSecurityAnalysisSettings|string|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CustomProperty|\ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryRuleset|\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\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\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|\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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\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\ApiInsightsSummaryStats|\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\FullRepository|\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\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\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\PushRuleBypassRequest|\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\CodeScanningAutofix|\ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse|\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\CodeSecurityConfigurationForRepository|\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\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHubEnterpriseCloud\Schema\SecretScanningScanHistory|\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\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\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/Enterprises/Enterprise/CodeSecurity/Configurations.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations.php new file mode 100644 index 00000000000..5ba3ead1a25 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations.php @@ -0,0 +1,1128 @@ + $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), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($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⚡️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['dependency_graph_autosubmit_action'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitAction'] = null; + goto after_dependencyGraphAutosubmitAction; + } + + $properties['dependencyGraphAutosubmitAction'] = $value; + + after_dependencyGraphAutosubmitAction: + + $value = $payload['dependency_graph_autosubmit_action_options'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitActionOptions'] = null; + goto after_dependencyGraphAutosubmitActionOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'dependencyGraphAutosubmitActionOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['dependencyGraphAutosubmitActionOptions'] = $value; + + after_dependencyGraphAutosubmitActionOptions: + + $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['code_scanning_default_setup_options'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetupOptions'] = null; + goto after_codeScanningDefaultSetupOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeScanningDefaultSetupOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['codeScanningDefaultSetupOptions'] = $value; + + after_codeScanningDefaultSetupOptions: + + $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['secret_scanning_delegated_bypass'] ?? null; + + if ($value === null) { + $properties['secretScanningDelegatedBypass'] = null; + goto after_secretScanningDelegatedBypass; + } + + $properties['secretScanningDelegatedBypass'] = $value; + + after_secretScanningDelegatedBypass: + + $value = $payload['secret_scanning_delegated_bypass_options'] ?? null; + + if ($value === null) { + $properties['secretScanningDelegatedBypassOptions'] = null; + goto after_secretScanningDelegatedBypassOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'secretScanningDelegatedBypassOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['secretScanningDelegatedBypassOptions'] = $value; + + after_secretScanningDelegatedBypassOptions: + + $value = $payload['secret_scanning_validity_checks'] ?? null; + + if ($value === null) { + $properties['secretScanningValidityChecks'] = null; + goto after_secretScanningValidityChecks; + } + + $properties['secretScanningValidityChecks'] = $value; + + after_secretScanningValidityChecks: + + $value = $payload['secret_scanning_non_provider_patterns'] ?? null; + + if ($value === null) { + $properties['secretScanningNonProviderPatterns'] = null; + goto after_secretScanningNonProviderPatterns; + } + + $properties['secretScanningNonProviderPatterns'] = $value; + + after_secretScanningNonProviderPatterns: + + $value = $payload['private_vulnerability_reporting'] ?? null; + + if ($value === null) { + $properties['privateVulnerabilityReporting'] = null; + goto after_privateVulnerabilityReporting; + } + + $properties['privateVulnerabilityReporting'] = $value; + + after_privateVulnerabilityReporting: + + $value = $payload['enforcement'] ?? null; + + if ($value === null) { + $properties['enforcement'] = null; + goto after_enforcement; + } + + $properties['enforcement'] = $value; + + after_enforcement: + + $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⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(array $payload): DependencyGraphAutosubmitActionOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['labeled_runners'] ?? null; + + if ($value === null) { + $properties['labeledRunners'] = null; + goto after_labeledRunners; + } + + $properties['labeledRunners'] = $value; + + after_labeledRunners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(DependencyGraphAutosubmitActionOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new DependencyGraphAutosubmitActionOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(array $payload): CodeScanningDefaultSetupOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['runner_type'] ?? null; + + if ($value === null) { + $properties['runnerType'] = null; + goto after_runnerType; + } + + $properties['runnerType'] = $value; + + after_runnerType: + + $value = $payload['runner_label'] ?? null; + + if ($value === null) { + $properties['runnerLabel'] = null; + goto after_runnerLabel; + } + + $properties['runnerLabel'] = $value; + + after_runnerLabel: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningDefaultSetupOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningDefaultSetupOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['reviewers'] ?? null; + + if ($value === null) { + $properties['reviewers'] = null; + goto after_reviewers; + } + + $properties['reviewers'] = $value; + + after_reviewers: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SecretScanningDelegatedBypassOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SecretScanningDelegatedBypassOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $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\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($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⚡️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; + + $dependencyGraphAutosubmitAction = $object->dependencyGraphAutosubmitAction; + + if ($dependencyGraphAutosubmitAction === null) { + goto after_dependencyGraphAutosubmitAction; + } + + after_dependencyGraphAutosubmitAction: $result['dependency_graph_autosubmit_action'] = $dependencyGraphAutosubmitAction; + + $dependencyGraphAutosubmitActionOptions = $object->dependencyGraphAutosubmitActionOptions; + + if ($dependencyGraphAutosubmitActionOptions === null) { + goto after_dependencyGraphAutosubmitActionOptions; + } + + $dependencyGraphAutosubmitActionOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($dependencyGraphAutosubmitActionOptions); + after_dependencyGraphAutosubmitActionOptions: $result['dependency_graph_autosubmit_action_options'] = $dependencyGraphAutosubmitActionOptions; + + $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; + + $codeScanningDefaultSetupOptions = $object->codeScanningDefaultSetupOptions; + + if ($codeScanningDefaultSetupOptions === null) { + goto after_codeScanningDefaultSetupOptions; + } + + $codeScanningDefaultSetupOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($codeScanningDefaultSetupOptions); + after_codeScanningDefaultSetupOptions: $result['code_scanning_default_setup_options'] = $codeScanningDefaultSetupOptions; + + $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; + + $secretScanningDelegatedBypass = $object->secretScanningDelegatedBypass; + + if ($secretScanningDelegatedBypass === null) { + goto after_secretScanningDelegatedBypass; + } + + after_secretScanningDelegatedBypass: $result['secret_scanning_delegated_bypass'] = $secretScanningDelegatedBypass; + + $secretScanningDelegatedBypassOptions = $object->secretScanningDelegatedBypassOptions; + + if ($secretScanningDelegatedBypassOptions === null) { + goto after_secretScanningDelegatedBypassOptions; + } + + $secretScanningDelegatedBypassOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($secretScanningDelegatedBypassOptions); + after_secretScanningDelegatedBypassOptions: $result['secret_scanning_delegated_bypass_options'] = $secretScanningDelegatedBypassOptions; + + $secretScanningValidityChecks = $object->secretScanningValidityChecks; + + if ($secretScanningValidityChecks === null) { + goto after_secretScanningValidityChecks; + } + + after_secretScanningValidityChecks: $result['secret_scanning_validity_checks'] = $secretScanningValidityChecks; + + $secretScanningNonProviderPatterns = $object->secretScanningNonProviderPatterns; + + if ($secretScanningNonProviderPatterns === null) { + goto after_secretScanningNonProviderPatterns; + } + + after_secretScanningNonProviderPatterns: $result['secret_scanning_non_provider_patterns'] = $secretScanningNonProviderPatterns; + + $privateVulnerabilityReporting = $object->privateVulnerabilityReporting; + + if ($privateVulnerabilityReporting === null) { + goto after_privateVulnerabilityReporting; + } + + after_privateVulnerabilityReporting: $result['private_vulnerability_reporting'] = $privateVulnerabilityReporting; + + $enforcement = $object->enforcement; + + if ($enforcement === null) { + goto after_enforcement; + } + + after_enforcement: $result['enforcement'] = $enforcement; + + $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⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(mixed $object): mixed + { + assert($object instanceof DependencyGraphAutosubmitActionOptions); + $result = []; + + $labeledRunners = $object->labeledRunners; + + if ($labeledRunners === null) { + goto after_labeledRunners; + } + + after_labeledRunners: $result['labeled_runners'] = $labeledRunners; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(mixed $object): mixed + { + assert($object instanceof CodeScanningDefaultSetupOptions); + $result = []; + + $runnerType = $object->runnerType; + + if ($runnerType === null) { + goto after_runnerType; + } + + after_runnerType: $result['runner_type'] = $runnerType; + + $runnerLabel = $object->runnerLabel; + + if ($runnerLabel === null) { + goto after_runnerLabel; + } + + after_runnerLabel: $result['runner_label'] = $runnerLabel; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed + { + assert($object instanceof SecretScanningDelegatedBypassOptions); + $result = []; + + $reviewers = $object->reviewers; + + if ($reviewers === null) { + goto after_reviewers; + } + + static $reviewersSerializer0; + + if ($reviewersSerializer0 === null) { + $reviewersSerializer0 = new SerializeArrayItems(...[]); + } + + $reviewers = $reviewersSerializer0->serialize($reviewers, $this); + after_reviewers: $result['reviewers'] = $reviewers; + + 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/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId.php new file mode 100644 index 00000000000..e77b0984f3b --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId.php @@ -0,0 +1,1128 @@ + $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\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($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['dependency_graph_autosubmit_action'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitAction'] = null; + goto after_dependencyGraphAutosubmitAction; + } + + $properties['dependencyGraphAutosubmitAction'] = $value; + + after_dependencyGraphAutosubmitAction: + + $value = $payload['dependency_graph_autosubmit_action_options'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitActionOptions'] = null; + goto after_dependencyGraphAutosubmitActionOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'dependencyGraphAutosubmitActionOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['dependencyGraphAutosubmitActionOptions'] = $value; + + after_dependencyGraphAutosubmitActionOptions: + + $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['code_scanning_default_setup_options'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetupOptions'] = null; + goto after_codeScanningDefaultSetupOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeScanningDefaultSetupOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['codeScanningDefaultSetupOptions'] = $value; + + after_codeScanningDefaultSetupOptions: + + $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['secret_scanning_delegated_bypass'] ?? null; + + if ($value === null) { + $properties['secretScanningDelegatedBypass'] = null; + goto after_secretScanningDelegatedBypass; + } + + $properties['secretScanningDelegatedBypass'] = $value; + + after_secretScanningDelegatedBypass: + + $value = $payload['secret_scanning_delegated_bypass_options'] ?? null; + + if ($value === null) { + $properties['secretScanningDelegatedBypassOptions'] = null; + goto after_secretScanningDelegatedBypassOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'secretScanningDelegatedBypassOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['secretScanningDelegatedBypassOptions'] = $value; + + after_secretScanningDelegatedBypassOptions: + + $value = $payload['secret_scanning_validity_checks'] ?? null; + + if ($value === null) { + $properties['secretScanningValidityChecks'] = null; + goto after_secretScanningValidityChecks; + } + + $properties['secretScanningValidityChecks'] = $value; + + after_secretScanningValidityChecks: + + $value = $payload['secret_scanning_non_provider_patterns'] ?? null; + + if ($value === null) { + $properties['secretScanningNonProviderPatterns'] = null; + goto after_secretScanningNonProviderPatterns; + } + + $properties['secretScanningNonProviderPatterns'] = $value; + + after_secretScanningNonProviderPatterns: + + $value = $payload['private_vulnerability_reporting'] ?? null; + + if ($value === null) { + $properties['privateVulnerabilityReporting'] = null; + goto after_privateVulnerabilityReporting; + } + + $properties['privateVulnerabilityReporting'] = $value; + + after_privateVulnerabilityReporting: + + $value = $payload['enforcement'] ?? null; + + if ($value === null) { + $properties['enforcement'] = null; + goto after_enforcement; + } + + $properties['enforcement'] = $value; + + after_enforcement: + + $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⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(array $payload): DependencyGraphAutosubmitActionOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['labeled_runners'] ?? null; + + if ($value === null) { + $properties['labeledRunners'] = null; + goto after_labeledRunners; + } + + $properties['labeledRunners'] = $value; + + after_labeledRunners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(DependencyGraphAutosubmitActionOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new DependencyGraphAutosubmitActionOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(array $payload): CodeScanningDefaultSetupOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['runner_type'] ?? null; + + if ($value === null) { + $properties['runnerType'] = null; + goto after_runnerType; + } + + $properties['runnerType'] = $value; + + after_runnerType: + + $value = $payload['runner_label'] ?? null; + + if ($value === null) { + $properties['runnerLabel'] = null; + goto after_runnerLabel; + } + + $properties['runnerLabel'] = $value; + + after_runnerLabel: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningDefaultSetupOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningDefaultSetupOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['reviewers'] ?? null; + + if ($value === null) { + $properties['reviewers'] = null; + goto after_reviewers; + } + + $properties['reviewers'] = $value; + + after_reviewers: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SecretScanningDelegatedBypassOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SecretScanningDelegatedBypassOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $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\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($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; + + $dependencyGraphAutosubmitAction = $object->dependencyGraphAutosubmitAction; + + if ($dependencyGraphAutosubmitAction === null) { + goto after_dependencyGraphAutosubmitAction; + } + + after_dependencyGraphAutosubmitAction: $result['dependency_graph_autosubmit_action'] = $dependencyGraphAutosubmitAction; + + $dependencyGraphAutosubmitActionOptions = $object->dependencyGraphAutosubmitActionOptions; + + if ($dependencyGraphAutosubmitActionOptions === null) { + goto after_dependencyGraphAutosubmitActionOptions; + } + + $dependencyGraphAutosubmitActionOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($dependencyGraphAutosubmitActionOptions); + after_dependencyGraphAutosubmitActionOptions: $result['dependency_graph_autosubmit_action_options'] = $dependencyGraphAutosubmitActionOptions; + + $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; + + $codeScanningDefaultSetupOptions = $object->codeScanningDefaultSetupOptions; + + if ($codeScanningDefaultSetupOptions === null) { + goto after_codeScanningDefaultSetupOptions; + } + + $codeScanningDefaultSetupOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($codeScanningDefaultSetupOptions); + after_codeScanningDefaultSetupOptions: $result['code_scanning_default_setup_options'] = $codeScanningDefaultSetupOptions; + + $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; + + $secretScanningDelegatedBypass = $object->secretScanningDelegatedBypass; + + if ($secretScanningDelegatedBypass === null) { + goto after_secretScanningDelegatedBypass; + } + + after_secretScanningDelegatedBypass: $result['secret_scanning_delegated_bypass'] = $secretScanningDelegatedBypass; + + $secretScanningDelegatedBypassOptions = $object->secretScanningDelegatedBypassOptions; + + if ($secretScanningDelegatedBypassOptions === null) { + goto after_secretScanningDelegatedBypassOptions; + } + + $secretScanningDelegatedBypassOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($secretScanningDelegatedBypassOptions); + after_secretScanningDelegatedBypassOptions: $result['secret_scanning_delegated_bypass_options'] = $secretScanningDelegatedBypassOptions; + + $secretScanningValidityChecks = $object->secretScanningValidityChecks; + + if ($secretScanningValidityChecks === null) { + goto after_secretScanningValidityChecks; + } + + after_secretScanningValidityChecks: $result['secret_scanning_validity_checks'] = $secretScanningValidityChecks; + + $secretScanningNonProviderPatterns = $object->secretScanningNonProviderPatterns; + + if ($secretScanningNonProviderPatterns === null) { + goto after_secretScanningNonProviderPatterns; + } + + after_secretScanningNonProviderPatterns: $result['secret_scanning_non_provider_patterns'] = $secretScanningNonProviderPatterns; + + $privateVulnerabilityReporting = $object->privateVulnerabilityReporting; + + if ($privateVulnerabilityReporting === null) { + goto after_privateVulnerabilityReporting; + } + + after_privateVulnerabilityReporting: $result['private_vulnerability_reporting'] = $privateVulnerabilityReporting; + + $enforcement = $object->enforcement; + + if ($enforcement === null) { + goto after_enforcement; + } + + after_enforcement: $result['enforcement'] = $enforcement; + + $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⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(mixed $object): mixed + { + assert($object instanceof DependencyGraphAutosubmitActionOptions); + $result = []; + + $labeledRunners = $object->labeledRunners; + + if ($labeledRunners === null) { + goto after_labeledRunners; + } + + after_labeledRunners: $result['labeled_runners'] = $labeledRunners; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(mixed $object): mixed + { + assert($object instanceof CodeScanningDefaultSetupOptions); + $result = []; + + $runnerType = $object->runnerType; + + if ($runnerType === null) { + goto after_runnerType; + } + + after_runnerType: $result['runner_type'] = $runnerType; + + $runnerLabel = $object->runnerLabel; + + if ($runnerLabel === null) { + goto after_runnerLabel; + } + + after_runnerLabel: $result['runner_label'] = $runnerLabel; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed + { + assert($object instanceof SecretScanningDelegatedBypassOptions); + $result = []; + + $reviewers = $object->reviewers; + + if ($reviewers === null) { + goto after_reviewers; + } + + static $reviewersSerializer0; + + if ($reviewersSerializer0 === null) { + $reviewersSerializer0 = new SerializeArrayItems(...[]); + } + + $reviewers = $reviewersSerializer0->serialize($reviewers, $this); + after_reviewers: $result['reviewers'] = $reviewers; + + 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/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Attach.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Attach.php new file mode 100644 index 00000000000..7221119a2e2 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Attach.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/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Defaults.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Defaults.php new file mode 100644 index 00000000000..f5cbc531a91 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Defaults.php @@ -0,0 +1,1055 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefaultForEnterprise⚡️Response⚡️ApplicationJson⚡️Ok($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($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⚡️SetConfigurationAsDefaultForEnterprise⚡️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\SetConfigurationAsDefaultForEnterprise\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\SetConfigurationAsDefaultForEnterprise\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['dependency_graph_autosubmit_action'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitAction'] = null; + goto after_dependencyGraphAutosubmitAction; + } + + $properties['dependencyGraphAutosubmitAction'] = $value; + + after_dependencyGraphAutosubmitAction: + + $value = $payload['dependency_graph_autosubmit_action_options'] ?? null; + + if ($value === null) { + $properties['dependencyGraphAutosubmitActionOptions'] = null; + goto after_dependencyGraphAutosubmitActionOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'dependencyGraphAutosubmitActionOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['dependencyGraphAutosubmitActionOptions'] = $value; + + after_dependencyGraphAutosubmitActionOptions: + + $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['code_scanning_default_setup_options'] ?? null; + + if ($value === null) { + $properties['codeScanningDefaultSetupOptions'] = null; + goto after_codeScanningDefaultSetupOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'codeScanningDefaultSetupOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['codeScanningDefaultSetupOptions'] = $value; + + after_codeScanningDefaultSetupOptions: + + $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['secret_scanning_delegated_bypass'] ?? null; + + if ($value === null) { + $properties['secretScanningDelegatedBypass'] = null; + goto after_secretScanningDelegatedBypass; + } + + $properties['secretScanningDelegatedBypass'] = $value; + + after_secretScanningDelegatedBypass: + + $value = $payload['secret_scanning_delegated_bypass_options'] ?? null; + + if ($value === null) { + $properties['secretScanningDelegatedBypassOptions'] = null; + goto after_secretScanningDelegatedBypassOptions; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'secretScanningDelegatedBypassOptions'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['secretScanningDelegatedBypassOptions'] = $value; + + after_secretScanningDelegatedBypassOptions: + + $value = $payload['secret_scanning_validity_checks'] ?? null; + + if ($value === null) { + $properties['secretScanningValidityChecks'] = null; + goto after_secretScanningValidityChecks; + } + + $properties['secretScanningValidityChecks'] = $value; + + after_secretScanningValidityChecks: + + $value = $payload['secret_scanning_non_provider_patterns'] ?? null; + + if ($value === null) { + $properties['secretScanningNonProviderPatterns'] = null; + goto after_secretScanningNonProviderPatterns; + } + + $properties['secretScanningNonProviderPatterns'] = $value; + + after_secretScanningNonProviderPatterns: + + $value = $payload['private_vulnerability_reporting'] ?? null; + + if ($value === null) { + $properties['privateVulnerabilityReporting'] = null; + goto after_privateVulnerabilityReporting; + } + + $properties['privateVulnerabilityReporting'] = $value; + + after_privateVulnerabilityReporting: + + $value = $payload['enforcement'] ?? null; + + if ($value === null) { + $properties['enforcement'] = null; + goto after_enforcement; + } + + $properties['enforcement'] = $value; + + after_enforcement: + + $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⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(array $payload): DependencyGraphAutosubmitActionOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['labeled_runners'] ?? null; + + if ($value === null) { + $properties['labeledRunners'] = null; + goto after_labeledRunners; + } + + $properties['labeledRunners'] = $value; + + after_labeledRunners: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(DependencyGraphAutosubmitActionOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new DependencyGraphAutosubmitActionOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(array $payload): CodeScanningDefaultSetupOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['runner_type'] ?? null; + + if ($value === null) { + $properties['runnerType'] = null; + goto after_runnerType; + } + + $properties['runnerType'] = $value; + + after_runnerType: + + $value = $payload['runner_label'] ?? null; + + if ($value === null) { + $properties['runnerLabel'] = null; + goto after_runnerLabel; + } + + $properties['runnerLabel'] = $value; + + after_runnerLabel: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningDefaultSetupOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningDefaultSetupOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(array $payload): SecretScanningDelegatedBypassOptions + { + $properties = []; + $missingFields = []; + try { + $value = $payload['reviewers'] ?? null; + + if ($value === null) { + $properties['reviewers'] = null; + goto after_reviewers; + } + + $properties['reviewers'] = $value; + + after_reviewers: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(SecretScanningDelegatedBypassOptions::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new SecretScanningDelegatedBypassOptions(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions', $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\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefaultForEnterprise⚡️Response⚡️ApplicationJson⚡️Ok($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($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⚡️SetConfigurationAsDefaultForEnterprise⚡️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; + + $dependencyGraphAutosubmitAction = $object->dependencyGraphAutosubmitAction; + + if ($dependencyGraphAutosubmitAction === null) { + goto after_dependencyGraphAutosubmitAction; + } + + after_dependencyGraphAutosubmitAction: $result['dependency_graph_autosubmit_action'] = $dependencyGraphAutosubmitAction; + + $dependencyGraphAutosubmitActionOptions = $object->dependencyGraphAutosubmitActionOptions; + + if ($dependencyGraphAutosubmitActionOptions === null) { + goto after_dependencyGraphAutosubmitActionOptions; + } + + $dependencyGraphAutosubmitActionOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($dependencyGraphAutosubmitActionOptions); + after_dependencyGraphAutosubmitActionOptions: $result['dependency_graph_autosubmit_action_options'] = $dependencyGraphAutosubmitActionOptions; + + $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; + + $codeScanningDefaultSetupOptions = $object->codeScanningDefaultSetupOptions; + + if ($codeScanningDefaultSetupOptions === null) { + goto after_codeScanningDefaultSetupOptions; + } + + $codeScanningDefaultSetupOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($codeScanningDefaultSetupOptions); + after_codeScanningDefaultSetupOptions: $result['code_scanning_default_setup_options'] = $codeScanningDefaultSetupOptions; + + $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; + + $secretScanningDelegatedBypass = $object->secretScanningDelegatedBypass; + + if ($secretScanningDelegatedBypass === null) { + goto after_secretScanningDelegatedBypass; + } + + after_secretScanningDelegatedBypass: $result['secret_scanning_delegated_bypass'] = $secretScanningDelegatedBypass; + + $secretScanningDelegatedBypassOptions = $object->secretScanningDelegatedBypassOptions; + + if ($secretScanningDelegatedBypassOptions === null) { + goto after_secretScanningDelegatedBypassOptions; + } + + $secretScanningDelegatedBypassOptions = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions($secretScanningDelegatedBypassOptions); + after_secretScanningDelegatedBypassOptions: $result['secret_scanning_delegated_bypass_options'] = $secretScanningDelegatedBypassOptions; + + $secretScanningValidityChecks = $object->secretScanningValidityChecks; + + if ($secretScanningValidityChecks === null) { + goto after_secretScanningValidityChecks; + } + + after_secretScanningValidityChecks: $result['secret_scanning_validity_checks'] = $secretScanningValidityChecks; + + $secretScanningNonProviderPatterns = $object->secretScanningNonProviderPatterns; + + if ($secretScanningNonProviderPatterns === null) { + goto after_secretScanningNonProviderPatterns; + } + + after_secretScanningNonProviderPatterns: $result['secret_scanning_non_provider_patterns'] = $secretScanningNonProviderPatterns; + + $privateVulnerabilityReporting = $object->privateVulnerabilityReporting; + + if ($privateVulnerabilityReporting === null) { + goto after_privateVulnerabilityReporting; + } + + after_privateVulnerabilityReporting: $result['private_vulnerability_reporting'] = $privateVulnerabilityReporting; + + $enforcement = $object->enforcement; + + if ($enforcement === null) { + goto after_enforcement; + } + + after_enforcement: $result['enforcement'] = $enforcement; + + $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⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions(mixed $object): mixed + { + assert($object instanceof DependencyGraphAutosubmitActionOptions); + $result = []; + + $labeledRunners = $object->labeledRunners; + + if ($labeledRunners === null) { + goto after_labeledRunners; + } + + after_labeledRunners: $result['labeled_runners'] = $labeledRunners; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions(mixed $object): mixed + { + assert($object instanceof CodeScanningDefaultSetupOptions); + $result = []; + + $runnerType = $object->runnerType; + + if ($runnerType === null) { + goto after_runnerType; + } + + after_runnerType: $result['runner_type'] = $runnerType; + + $runnerLabel = $object->runnerLabel; + + if ($runnerLabel === null) { + goto after_runnerLabel; + } + + after_runnerLabel: $result['runner_label'] = $runnerLabel; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️SecretScanningDelegatedBypassOptions(mixed $object): mixed + { + assert($object instanceof SecretScanningDelegatedBypassOptions); + $result = []; + + $reviewers = $object->reviewers; + + if ($reviewers === null) { + goto after_reviewers; + } + + static $reviewersSerializer0; + + if ($reviewersSerializer0 === null) { + $reviewersSerializer0 = new SerializeArrayItems(...[]); + } + + $reviewers = $reviewersSerializer0->serialize($reviewers, $this); + after_reviewers: $result['reviewers'] = $reviewers; + + 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/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Repositories.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/CodeSecurity/Configurations/ConfigurationId/Repositories.php new file mode 100644 index 00000000000..4fd791c8c39 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/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/Meta.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Meta.php index 58d067bfaae..0984f0a8d45 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Meta.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Meta.php @@ -6,6 +6,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ActionsInbound; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ArtifactAttestations; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\SshKeyFingerprints; use EventSauce\ObjectHydrator\IterableList; @@ -46,6 +47,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview($payload), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\SshKeyFingerprints' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️SshKeyFingerprints($payload), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ActionsInbound' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ActionsInbound($payload), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ArtifactAttestations' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; @@ -398,6 +400,26 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S after_actions: + $value = $payload['actions_inbound'] ?? null; + + if ($value === null) { + $properties['actionsInbound'] = null; + goto after_actionsInbound; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'actionsInbound'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ActionsInbound($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['actionsInbound'] = $value; + + after_actionsInbound: + $value = $payload['artifact_attestations'] ?? null; if ($value === null) { @@ -432,6 +454,47 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S } } + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ActionsInbound(array $payload): ActionsInbound + { + $properties = []; + $missingFields = []; + try { + $value = $payload['full_domains'] ?? null; + + if ($value === null) { + $properties['fullDomains'] = null; + goto after_fullDomains; + } + + $properties['fullDomains'] = $value; + + after_fullDomains: + + $value = $payload['wildcard_domains'] ?? null; + + if ($value === null) { + $properties['wildcardDomains'] = null; + goto after_wildcardDomains; + } + + $properties['wildcardDomains'] = $value; + + after_wildcardDomains: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ActionsInbound', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ActionsInbound::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ActionsInbound(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ActionsInbound', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations(array $payload): ArtifactAttestations { $properties = []; @@ -507,6 +570,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview($object), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\SshKeyFingerprints' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️SshKeyFingerprints($object), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ActionsInbound' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ActionsInbound($object), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiOverview\Domains\ArtifactAttestations' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations($object), default => throw new LogicException("No serialization defined for $className"), }; @@ -929,6 +993,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou $actions = $actionsSerializer0->serialize($actions, $this); after_actions: $result['actions'] = $actions; + $actionsInbound = $object->actionsInbound; + + if ($actionsInbound === null) { + goto after_actionsInbound; + } + + $actionsInbound = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ActionsInbound($actionsInbound); + after_actionsInbound: $result['actions_inbound'] = $actionsInbound; + $artifactAttestations = $object->artifactAttestations; if ($artifactAttestations === null) { @@ -941,6 +1014,44 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ActionsInbound(mixed $object): mixed + { + assert($object instanceof ActionsInbound); + $result = []; + + $fullDomains = $object->fullDomains; + + if ($fullDomains === null) { + goto after_fullDomains; + } + + static $fullDomainsSerializer0; + + if ($fullDomainsSerializer0 === null) { + $fullDomainsSerializer0 = new SerializeArrayItems(...[]); + } + + $fullDomains = $fullDomainsSerializer0->serialize($fullDomains, $this); + after_fullDomains: $result['full_domains'] = $fullDomains; + + $wildcardDomains = $object->wildcardDomains; + + if ($wildcardDomains === null) { + goto after_wildcardDomains; + } + + static $wildcardDomainsSerializer0; + + if ($wildcardDomainsSerializer0 === null) { + $wildcardDomainsSerializer0 = new SerializeArrayItems(...[]); + } + + $wildcardDomains = $wildcardDomainsSerializer0->serialize($wildcardDomains, $this); + after_wildcardDomains: $result['wildcard_domains'] = $wildcardDomains; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️ApiOverview⚡️Domains⚡️ArtifactAttestations(mixed $object): mixed { assert($object instanceof ArtifactAttestations); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/BypassRequests/PushRules.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/BypassRequests/PushRules.php new file mode 100644 index 00000000000..8d071573a9d --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/BypassRequests/PushRules.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/ConfigurationId/Defaults.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/CodeSecurity/Configurations/ConfigurationId/Defaults.php index 4cbeb2d5a52..7791b425f4b 100644 --- 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 @@ -9,7 +9,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\SecretScanningDelegatedBypassOptions; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems; @@ -45,7 +45,7 @@ public function __construct() 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\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($payload), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($payload), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($payload), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($payload), @@ -55,7 +55,7 @@ public function hydrateObject(string $className, array $payload): object }; } - private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(array $payload): Json { $properties = []; $missingFields = []; @@ -91,17 +91,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S after_configuration: } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack); } if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToMissingFields(Json::class, $missingFields, stack: $this->hydrationStack); } try { - return new Ok(...$properties); + return new Json(...$properties); } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack); + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack); } } @@ -610,7 +610,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '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\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($object), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration($object), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\DependencyGraphAutosubmitActionOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️DependencyGraphAutosubmitActionOptions($object), 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration\CodeScanningDefaultSetupOptions' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeSecurityConfiguration⚡️CodeScanningDefaultSetupOptions($object), @@ -678,9 +678,9 @@ private function serializeValueDateTimeInterface(mixed $value): mixed return $serializer->serialize($value, $this); } - private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeSecurity⚡️SetConfigurationAsDefault⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(mixed $object): mixed { - assert($object instanceof Ok); + assert($object instanceof Json); $result = []; $defaultForNewRepos = $object->defaultForNewRepos; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/BypassRequests/PushRules.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/BypassRequests/PushRules.php new file mode 100644 index 00000000000..76f79555bab --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/BypassRequests/PushRules.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/Repos/Owner/Repo/BypassRequests/PushRules/BypassRequestNumber.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/BypassRequests/PushRules/BypassRequestNumber.php new file mode 100644 index 00000000000..a45c9dcbe76 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/BypassRequests/PushRules/BypassRequestNumber.php @@ -0,0 +1,870 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Repository' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Repository($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Organization' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Organization($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Requester' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Requester($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⚡️PushRuleBypassRequest(array $payload): PushRuleBypassRequest + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['number'] ?? null; + + if ($value === null) { + $properties['number'] = null; + goto after_number; + } + + $properties['number'] = $value; + + after_number: + + $value = $payload['repository'] ?? null; + + if ($value === null) { + $properties['repository'] = null; + goto after_repository; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'repository'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Repository($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['repository'] = $value; + + after_repository: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Organization($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['requester'] ?? null; + + if ($value === null) { + $properties['requester'] = null; + goto after_requester; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'requester'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Requester($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['requester'] = $value; + + after_requester: + + $value = $payload['request_type'] ?? null; + + if ($value === null) { + $properties['requestType'] = null; + goto after_requestType; + } + + $properties['requestType'] = $value; + + after_requestType: + + $value = $payload['data'] ?? null; + + if ($value === null) { + $properties['data'] = null; + goto after_data; + } + + $properties['data'] = $value; + + after_data: + + $value = $payload['resource_identifier'] ?? null; + + if ($value === null) { + $properties['resourceIdentifier'] = null; + goto after_resourceIdentifier; + } + + $properties['resourceIdentifier'] = $value; + + after_resourceIdentifier: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['requester_comment'] ?? null; + + if ($value === null) { + $properties['requesterComment'] = null; + goto after_requesterComment; + } + + $properties['requesterComment'] = $value; + + after_requesterComment: + + $value = $payload['expires_at'] ?? null; + + if ($value === null) { + $properties['expiresAt'] = null; + goto after_expiresAt; + } + + $properties['expiresAt'] = $value; + + after_expiresAt: + + $value = $payload['created_at'] ?? null; + + if ($value === null) { + $properties['createdAt'] = null; + goto after_createdAt; + } + + $properties['createdAt'] = $value; + + after_createdAt: + + $value = $payload['responses'] ?? null; + + if ($value === null) { + $properties['responses'] = null; + goto after_responses; + } + + $properties['responses'] = $value; + + after_responses: + + $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: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(PushRuleBypassRequest::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new PushRuleBypassRequest(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Repository(array $payload): Repository + { + $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['full_name'] ?? null; + + if ($value === null) { + $properties['fullName'] = null; + goto after_fullName; + } + + $properties['fullName'] = $value; + + after_fullName: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Repository', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Repository::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Repository(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Repository', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Organization(array $payload): Organization + { + $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: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Organization', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Organization::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Organization(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Organization', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Requester(array $payload): Requester + { + $properties = []; + $missingFields = []; + try { + $value = $payload['actor_id'] ?? null; + + if ($value === null) { + $properties['actorId'] = null; + goto after_actorId; + } + + $properties['actorId'] = $value; + + after_actorId: + + $value = $payload['actor_name'] ?? null; + + if ($value === null) { + $properties['actorName'] = null; + goto after_actorName; + } + + $properties['actorName'] = $value; + + after_actorName: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Requester', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Requester::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Requester(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Requester', $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\PushRuleBypassRequest' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Repository' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Repository($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Organization' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Organization($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest\Requester' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Requester($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⚡️PushRuleBypassRequest(mixed $object): mixed + { + assert($object instanceof PushRuleBypassRequest); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $number = $object->number; + + if ($number === null) { + goto after_number; + } + + after_number: $result['number'] = $number; + + $repository = $object->repository; + + if ($repository === null) { + goto after_repository; + } + + $repository = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Repository($repository); + after_repository: $result['repository'] = $repository; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Organization($organization); + after_organization: $result['organization'] = $organization; + + $requester = $object->requester; + + if ($requester === null) { + goto after_requester; + } + + $requester = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Requester($requester); + after_requester: $result['requester'] = $requester; + + $requestType = $object->requestType; + + if ($requestType === null) { + goto after_requestType; + } + + after_requestType: $result['request_type'] = $requestType; + + $data = $object->data; + + if ($data === null) { + goto after_data; + } + + static $dataSerializer0; + + if ($dataSerializer0 === null) { + $dataSerializer0 = new SerializeArrayItems(...[]); + } + + $data = $dataSerializer0->serialize($data, $this); + after_data: $result['data'] = $data; + + $resourceIdentifier = $object->resourceIdentifier; + + if ($resourceIdentifier === null) { + goto after_resourceIdentifier; + } + + after_resourceIdentifier: $result['resource_identifier'] = $resourceIdentifier; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + $requesterComment = $object->requesterComment; + + if ($requesterComment === null) { + goto after_requesterComment; + } + + after_requesterComment: $result['requester_comment'] = $requesterComment; + + $expiresAt = $object->expiresAt; + + if ($expiresAt === null) { + goto after_expiresAt; + } + + after_expiresAt: $result['expires_at'] = $expiresAt; + + $createdAt = $object->createdAt; + + if ($createdAt === null) { + goto after_createdAt; + } + + after_createdAt: $result['created_at'] = $createdAt; + + $responses = $object->responses; + + if ($responses === null) { + goto after_responses; + } + + static $responsesSerializer0; + + if ($responsesSerializer0 === null) { + $responsesSerializer0 = new SerializeArrayItems(...[]); + } + + $responses = $responsesSerializer0->serialize($responses, $this); + after_responses: $result['responses'] = $responses; + + $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; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Repository(mixed $object): mixed + { + assert($object instanceof Repository); + $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; + + $fullName = $object->fullName; + + if ($fullName === null) { + goto after_fullName; + } + + after_fullName: $result['full_name'] = $fullName; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Organization(mixed $object): mixed + { + assert($object instanceof Organization); + $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; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️PushRuleBypassRequest⚡️Requester(mixed $object): mixed + { + assert($object instanceof Requester); + $result = []; + + $actorId = $object->actorId; + + if ($actorId === null) { + goto after_actorId; + } + + after_actorId: $result['actor_id'] = $actorId; + + $actorName = $object->actorName; + + if ($actorName === null) { + goto after_actorName; + } + + after_actorName: $result['actor_name'] = $actorName; + + 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/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix.php new file mode 100644 index 00000000000..b3b96d40af8 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix.php @@ -0,0 +1,450 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeScanningAutofix($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeScanningAutofix(array $payload): CodeScanningAutofix + { + $properties = []; + $missingFields = []; + try { + $value = $payload['status'] ?? null; + + if ($value === null) { + $missingFields[] = 'status'; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['description'] ?? null; + + if ($value === null) { + $properties['description'] = null; + goto after_description; + } + + $properties['description'] = $value; + + after_description: + + $value = $payload['started_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'started_at'; + goto after_startedAt; + } + + $properties['startedAt'] = $value; + + after_startedAt: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningAutofix::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningAutofix(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix', $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⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(array $payload): ServiceUnavailable + { + $properties = []; + $missingFields = []; + try { + $value = $payload['code'] ?? null; + + if ($value === null) { + $properties['code'] = null; + goto after_code; + } + + $properties['code'] = $value; + + after_code: + + $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: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ServiceUnavailable::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ServiceUnavailable(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $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\CodeScanningAutofix' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeScanningAutofix($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($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⚡️CodeScanningAutofix(mixed $object): mixed + { + assert($object instanceof CodeScanningAutofix); + $result = []; + + $status = $object->status; + after_status: $result['status'] = $status; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + $startedAt = $object->startedAt; + after_startedAt: $result['started_at'] = $startedAt; + + 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⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(mixed $object): mixed + { + assert($object instanceof ServiceUnavailable); + $result = []; + + $code = $object->code; + + if ($code === null) { + goto after_code; + } + + after_code: $result['code'] = $code; + + $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; + + 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/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix/Commits.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix/Commits.php new file mode 100644 index 00000000000..2ec0eeb9eae --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber/Autofix/Commits.php @@ -0,0 +1,441 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeScanningAutofixCommitsResponse($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeScanningAutofixCommitsResponse(array $payload): CodeScanningAutofixCommitsResponse + { + $properties = []; + $missingFields = []; + try { + $value = $payload['target_ref'] ?? null; + + if ($value === null) { + $properties['targetRef'] = null; + goto after_targetRef; + } + + $properties['targetRef'] = $value; + + after_targetRef: + + $value = $payload['sha'] ?? null; + + if ($value === null) { + $properties['sha'] = null; + goto after_sha; + } + + $properties['sha'] = $value; + + after_sha: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(CodeScanningAutofixCommitsResponse::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new CodeScanningAutofixCommitsResponse(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse', $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⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(array $payload): ServiceUnavailable + { + $properties = []; + $missingFields = []; + try { + $value = $payload['code'] ?? null; + + if ($value === null) { + $properties['code'] = null; + goto after_code; + } + + $properties['code'] = $value; + + after_code: + + $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: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ServiceUnavailable::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ServiceUnavailable(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable', $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\CodeScanningAutofixCommitsResponse' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️CodeScanningAutofixCommitsResponse($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($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⚡️CodeScanningAutofixCommitsResponse(mixed $object): mixed + { + assert($object instanceof CodeScanningAutofixCommitsResponse); + $result = []; + + $targetRef = $object->targetRef; + + if ($targetRef === null) { + goto after_targetRef; + } + + after_targetRef: $result['target_ref'] = $targetRef; + + $sha = $object->sha; + + if ($sha === null) { + goto after_sha; + } + + after_sha: $result['sha'] = $sha; + + 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⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable(mixed $object): mixed + { + assert($object instanceof ServiceUnavailable); + $result = []; + + $code = $object->code; + + if ($code === null) { + goto after_code; + } + + after_code: $result['code'] = $code; + + $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; + + 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 6f80f9b8a4d..2179d70b5a4 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php @@ -66,6 +66,12 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Enterprises\Enterprise\AuditLog\Streams|null $operation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\AuditLog\Streams\StreamId|null $operation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams🌀StreamId = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeScanning\Alerts|null $operation🌀Enterprises🌀Enterprise🌀CodeScanning🌀Alerts = null; + private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations = null; + private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\Defaults|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults = null; + private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId = null; + private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Attach|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach = null; + private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Defaults|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults = null; + private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Repositories|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurityAndAnalysis|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurityAndAnalysis = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\ConsumedLicenses|null $operation🌀Enterprises🌀Enterprise🌀ConsumedLicenses = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\Copilot\Billing\Seats|null $operation🌀Enterprises🌀Enterprise🌀Copilot🌀Billing🌀Seats = null; @@ -161,6 +167,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Orgs\Org\AuditLog|null $operation🌀Orgs🌀Org🌀AuditLog = null; 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\BypassRequests\PushRules|null $operation🌀Orgs🌀Org🌀BypassRequests🌀PushRules = 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; @@ -389,6 +396,8 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Repos\Owner\Repo\Branches\Branch\Protection\Restrictions\Teams|null $operation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch🌀Protection🌀Restrictions🌀Teams = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\Branches\Branch\Protection\Restrictions\Users|null $operation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch🌀Protection🌀Restrictions🌀Users = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\Branches\Branch\Rename|null $operation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch🌀Rename = null; + private Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules|null $operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules = null; + private Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules\BypassRequestNumber|null $operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CheckRuns|null $operation🌀Repos🌀Owner🌀Repo🌀CheckRuns = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CheckRuns\CheckRunId|null $operation🌀Repos🌀Owner🌀Repo🌀CheckRuns🌀CheckRunId = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CheckRuns\CheckRunId\Annotations|null $operation🌀Repos🌀Owner🌀Repo🌀CheckRuns🌀CheckRunId🌀Annotations = null; @@ -400,6 +409,8 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Repos\Owner\Repo\CheckSuites\CheckSuiteId\Rerequest|null $operation🌀Repos🌀Owner🌀Repo🌀CheckSuites🌀CheckSuiteId🌀Rerequest = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts|null $operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber|null $operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber = null; + private Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix|null $operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix = null; + private Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix\Commits|null $operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Instances|null $operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Instances = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Analyses|null $operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Analyses = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Analyses\AnalysisId|null $operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Analyses🌀AnalysisId = null; @@ -847,6 +858,9 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\GetAuditLogStreamConfig' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\EnterpriseAdmin\\UpdateAuditLogStream\\Response\\ApplicationJson\\UnprocessableEntity' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams🌀StreamId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeScanning\\ListAlertsForEnterprise\\Response\\ApplicationJson\\ServiceUnavailable' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeScanning🌀Alerts()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\CodeScanningDefaultSetupOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\AttachEnterpriseConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefaultForEnterprise\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\EnterpriseSecurityAnalysisSettings' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurityAndAnalysis()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\ListCopilotSeatsForEnterprise\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀Copilot🌀Billing🌀Seats()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CustomProperty' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀Properties🌀Schema🌀CustomPropertyName()->hydrateObject($className, $payload), @@ -868,7 +882,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Apps\\ListReposAccessibleToInstallation\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Installation🌀Repositories()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\License' => $this->getObjectMapperOperation🌀Licenses🌀License()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplacePurchase', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplacePurchase\\MarketplacePendingChange', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplaceListingPlan', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplacePurchase\\MarketplacePurchase' => $this->getObjectMapperOperation🌀MarketplaceListing🌀Accounts🌀AccountId()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains\\ArtifactAttestations' => $this->getObjectMapperOperation🌀Meta()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains\\ActionsInbound', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains\\ArtifactAttestations' => $this->getObjectMapperOperation🌀Meta()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Activity\\MarkNotificationsAsRead\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Notifications()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Thread', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MinimalRepository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MinimalRepository\\Permissions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MinimalRepository\\License', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\AdvancedSecurity', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\DependabotSecurityUpdates', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanning', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningPushProtection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningNonProviderPatterns', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningAiDetection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningValidityChecks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Thread\\Subject' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ThreadSubscription' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId🌀Subscription()->hydrateObject($className, $payload), @@ -891,9 +905,8 @@ public function hydrateObject(string $className, array $payload): object '\\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\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\CodeScanningDefaultSetupOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $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\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok\\Application\\Json' => $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), @@ -980,11 +993,14 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckAutomatedSecurityFixes' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀AutomatedSecurityFixes()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchWithProtection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit\\Commit', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\GitUser', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit\\Commit\\Tree', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Verification', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit\\Stats', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchWithProtection\\Links', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchRequiredStatusCheck', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchAdminEnforced', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchPullRequestReview', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchPullRequestReview\\DismissalRestrictions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchPullRequestReview\\BypassPullRequestAllowances', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchRestrictionPolicy', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\RequiredLinearHistory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\AllowForcePushes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\AllowDeletions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\BlockCreations', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\RequiredConversationResolution', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\RequiredSignatures', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\LockBranch', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\AllowForkSyncing' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\StatusCheckPolicy', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredPullRequestReviews', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredPullRequestReviews\\DismissalRestrictions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredPullRequestReviews\\BypassPullRequestAllowances', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredSignatures', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\EnforceAdmins', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredLinearHistory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\AllowForcePushes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\AllowDeletions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredConversationResolution', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\BlockCreations', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\LockBranch', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\AllowForkSyncing' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch🌀Protection()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest\\Repository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest\\Organization', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest\\Requester' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckRun', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckRun\\Output', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckRun\\CheckSuite', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\DeploymentSimple' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckRuns()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckSuite' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckSuites()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckSuitePreference', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckSuitePreference\\Preferences' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckSuites🌀Preferences()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Checks\\ListForSuite\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckSuites🌀CheckSuiteId🌀CheckRuns()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertRule', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAnalysisTool', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertInstance', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertInstance\\Message', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertLocation' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAutofix' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAutofixCommitsResponse' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeScanning\\GetAnalysis\\Response\\ApplicationJsonSarif\\Ok\\Application\\JsonSarif', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAnalysisDeletion' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Analyses🌀AnalysisId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningCodeqlDatabase' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Codeql🌀Databases🌀Language()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SimpleRepository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysis\\SkippedRepositories', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysisSkippedRepoGroup', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysis\\SkippedRepositories\\NotFoundRepos' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Codeql🌀VariantAnalyses()->hydrateObject($className, $payload), @@ -1233,6 +1249,9 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\GetAuditLogStreamConfig' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\EnterpriseAdmin\\UpdateAuditLogStream\\Response\\ApplicationJson\\UnprocessableEntity' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams🌀StreamId()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeScanning\\ListAlertsForEnterprise\\Response\\ApplicationJson\\ServiceUnavailable' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeScanning🌀Alerts()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\CodeScanningDefaultSetupOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\AttachEnterpriseConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefaultForEnterprise\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\EnterpriseSecurityAnalysisSettings' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurityAndAnalysis()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Copilot\\ListCopilotSeatsForEnterprise\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀Copilot🌀Billing🌀Seats()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CustomProperty' => $this->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀Properties🌀Schema🌀CustomPropertyName()->serializeObject($object), @@ -1254,7 +1273,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Apps\\ListReposAccessibleToInstallation\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Installation🌀Repositories()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\License' => $this->getObjectMapperOperation🌀Licenses🌀License()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplacePurchase', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplacePurchase\\MarketplacePendingChange', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplaceListingPlan', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MarketplacePurchase\\MarketplacePurchase' => $this->getObjectMapperOperation🌀MarketplaceListing🌀Accounts🌀AccountId()->serializeObject($object), - '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains\\ArtifactAttestations' => $this->getObjectMapperOperation🌀Meta()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\SshKeyFingerprints', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains\\ActionsInbound', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ApiOverview\\Domains\\ArtifactAttestations' => $this->getObjectMapperOperation🌀Meta()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Activity\\MarkNotificationsAsRead\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Notifications()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Thread', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MinimalRepository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MinimalRepository\\Permissions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\MinimalRepository\\License', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\AdvancedSecurity', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\DependabotSecurityUpdates', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanning', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningPushProtection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningNonProviderPatterns', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningAiDetection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SecurityAndAnalysis\\SecretScanningValidityChecks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Thread\\Subject' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ThreadSubscription' => $this->getObjectMapperOperation🌀Notifications🌀Threads🌀ThreadId🌀Subscription()->serializeObject($object), @@ -1277,9 +1296,8 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\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\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Attestations🌀SubjectDigest()->serializeObject($object), - '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\DependencyGraphAutosubmitActionOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\CodeScanningDefaultSetupOptions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeSecurityConfiguration\\SecretScanningDelegatedBypassOptions' => $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\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok\\Application\\Json' => $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), @@ -1366,11 +1384,14 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckAutomatedSecurityFixes' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀AutomatedSecurityFixes()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchWithProtection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit\\Commit', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\GitUser', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit\\Commit\\Tree', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Verification', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Commit\\Stats', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchWithProtection\\Links', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchRequiredStatusCheck', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchAdminEnforced', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchPullRequestReview', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchPullRequestReview\\DismissalRestrictions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranchPullRequestReview\\BypassPullRequestAllowances', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchRestrictionPolicy', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\RequiredLinearHistory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\AllowForcePushes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\AllowDeletions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\BlockCreations', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\RequiredConversationResolution', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\RequiredSignatures', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\LockBranch', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\BranchProtection\\AllowForkSyncing' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\StatusCheckPolicy', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredPullRequestReviews', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredPullRequestReviews\\DismissalRestrictions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredPullRequestReviews\\BypassPullRequestAllowances', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredSignatures', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\EnforceAdmins', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredLinearHistory', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\AllowForcePushes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\AllowDeletions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\RequiredConversationResolution', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\BlockCreations', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\LockBranch', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\ProtectedBranch\\AllowForkSyncing' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch🌀Protection()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest\\Repository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest\\Organization', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\PushRuleBypassRequest\\Requester' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckRun', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckRun\\Output', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckRun\\CheckSuite', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\DeploymentSimple' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckRuns()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckSuite' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckSuites()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckSuitePreference', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CheckSuitePreference\\Preferences' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckSuites🌀Preferences()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Checks\\ListForSuite\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckSuites🌀CheckSuiteId🌀CheckRuns()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlert', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertRule', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAnalysisTool', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertInstance', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertInstance\\Message', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAlertLocation' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAutofix' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix()->serializeObject($object), + '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAutofixCommitsResponse' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\CodeScanning\\GetAnalysis\\Response\\ApplicationJsonSarif\\Ok\\Application\\JsonSarif', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningAnalysisDeletion' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Analyses🌀AnalysisId()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningCodeqlDatabase' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Codeql🌀Databases🌀Language()->serializeObject($object), '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysis', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SimpleRepository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysis\\SkippedRepositories', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysisSkippedRepoGroup', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\CodeScanningVariantAnalysis\\SkippedRepositories\\NotFoundRepos' => $this->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Codeql🌀VariantAnalyses()->serializeObject($object), @@ -2075,6 +2096,60 @@ public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSca return $this->operation🌀Enterprises🌀Enterprise🌀CodeScanning🌀Alerts; } + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations + { + if ($this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations === false) { + $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations = new Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations(); + } + + return $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations; + } + + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\Defaults + { + if ($this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\Defaults === false) { + $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults = new Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\Defaults(); + } + + return $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults; + } + + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId + { + if ($this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId === false) { + $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId = new Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId(); + } + + return $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId; + } + + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Attach + { + if ($this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Attach === false) { + $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach = new Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Attach(); + } + + return $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach; + } + + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Defaults + { + if ($this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Defaults === false) { + $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults = new Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Defaults(); + } + + return $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults; + } + + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Repositories + { + if ($this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Repositories === false) { + $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories = new Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\ConfigurationId\Repositories(); + } + + return $this->operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories; + } + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurityAndAnalysis(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurityAndAnalysis { if ($this->operation🌀Enterprises🌀Enterprise🌀CodeSecurityAndAnalysis instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurityAndAnalysis === false) { @@ -2930,6 +3005,15 @@ public function getObjectMapperOperation🌀Orgs🌀Org🌀Blocks🌀Username(): return $this->operation🌀Orgs🌀Org🌀Blocks🌀Username; } + public function getObjectMapperOperation🌀Orgs🌀Org🌀BypassRequests🌀PushRules(): Internal\Hydrator\Operation\Orgs\Org\BypassRequests\PushRules + { + if ($this->operation🌀Orgs🌀Org🌀BypassRequests🌀PushRules instanceof Internal\Hydrator\Operation\Orgs\Org\BypassRequests\PushRules === false) { + $this->operation🌀Orgs🌀Org🌀BypassRequests🌀PushRules = new Internal\Hydrator\Operation\Orgs\Org\BypassRequests\PushRules(); + } + + return $this->operation🌀Orgs🌀Org🌀BypassRequests🌀PushRules; + } + public function getObjectMapperOperation🌀Orgs🌀Org🌀CodeScanning🌀Alerts(): Internal\Hydrator\Operation\Orgs\Org\CodeScanning\Alerts { if ($this->operation🌀Orgs🌀Org🌀CodeScanning🌀Alerts instanceof Internal\Hydrator\Operation\Orgs\Org\CodeScanning\Alerts === false) { @@ -4982,6 +5066,24 @@ public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Branches return $this->operation🌀Repos🌀Owner🌀Repo🌀Branches🌀Branch🌀Rename; } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules(): Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules + { + if ($this->operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules === false) { + $this->operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules = new Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules(); + } + + return $this->operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules; + } + + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber(): Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules\BypassRequestNumber + { + if ($this->operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules\BypassRequestNumber === false) { + $this->operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber = new Internal\Hydrator\Operation\Repos\Owner\Repo\BypassRequests\PushRules\BypassRequestNumber(); + } + + return $this->operation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber; + } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CheckRuns(): Internal\Hydrator\Operation\Repos\Owner\Repo\CheckRuns { if ($this->operation🌀Repos🌀Owner🌀Repo🌀CheckRuns instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\CheckRuns === false) { @@ -5081,6 +5183,24 @@ public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanni return $this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber; } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix(): Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix + { + if ($this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix === false) { + $this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix = new Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix(); + } + + return $this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix; + } + + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits(): Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix\Commits + { + if ($this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix\Commits === false) { + $this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits = new Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Autofix\Commits(); + } + + return $this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits; + } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Instances(): Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Instances { if ($this->operation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Instances instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\CodeScanning\Alerts\AlertNumber\Instances === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CommitAutofix.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CommitAutofix.php new file mode 100644 index 00000000000..d7ab3ff8a5f --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CommitAutofix.php @@ -0,0 +1,110 @@ +owner = $owner; + $this->repo = $repo; + $this->alertNumber = $alertNumber; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeScanningAutofixCommits::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', str_replace(['{owner}', '{repo}', '{alert_number}'], [$this->owner, $this->repo, $this->alertNumber], '/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\CodeScanningAutofixCommitsResponse|WithoutBody + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Created + **/ + case 201: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeScanningAutofixCommitsResponse::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\CodeScanningAutofixCommitsResponse::class, $body); + /** + * 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)); + /** + * Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository + **/ + + 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)); + /** + * Service unavailable + **/ + + case 503: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable(503, $this->hydrator->hydrateObject(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class, $body)); + } + + break; + } + + switch ($code) { + /** + * Unprocessable Entity + **/ + case 422: + return new WithoutBody(422, []); + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CreateAutofix.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CreateAutofix.php new file mode 100644 index 00000000000..f2073fa2b13 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/CreateAutofix.php @@ -0,0 +1,115 @@ +owner = $owner; + $this->repo = $repo; + $this->alertNumber = $alertNumber; + } + + public function createRequest(): RequestInterface + { + return new Request('POST', str_replace(['{owner}', '{repo}', '{alert_number}'], [$this->owner, $this->repo, $this->alertNumber], '/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix')); + } + + public function createResponse(ResponseInterface $response): Schema\CodeScanningAutofix|WithoutBody + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * OK + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeScanningAutofix::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\CodeScanningAutofix::class, $body); + /** + * Accepted + **/ + + case 202: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeScanningAutofix::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\CodeScanningAutofix::class, $body); + /** + * 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)); + /** + * Response if the repository is archived, if GitHub Advanced Security is not enabled for this repository or if rate limit is exceeded + **/ + + 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)); + /** + * Service unavailable + **/ + + case 503: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable(503, $this->hydrator->hydrateObject(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class, $body)); + } + + break; + } + + switch ($code) { + /** + * Unprocessable Entity + **/ + case 422: + return new WithoutBody(422, []); + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/GetAutofix.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/GetAutofix.php new file mode 100644 index 00000000000..30f06386371 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/GetAutofix.php @@ -0,0 +1,98 @@ +owner = $owner; + $this->repo = $repo; + $this->alertNumber = $alertNumber; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{owner}', '{repo}', '{alert_number}'], [$this->owner, $this->repo, $this->alertNumber], '/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix')); + } + + public function createResponse(ResponseInterface $response): Schema\CodeScanningAutofix + { + $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\CodeScanningAutofix::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\CodeScanningAutofix::class, $body); + /** + * 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)); + /** + * Response if GitHub Advanced Security is not enabled for this repository + **/ + + 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)); + /** + * Service unavailable + **/ + + case 503: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable(503, $this->hydrator->hydrateObject(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/AttachEnterpriseConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/AttachEnterpriseConfiguration.php new file mode 100644 index 00000000000..9264ae460ff --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/AttachEnterpriseConfiguration.php @@ -0,0 +1,90 @@ +enterprise = $enterprise; + $this->configurationId = $configurationId; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', str_replace(['{enterprise}', '{configuration_id}'], [$this->enterprise, $this->configurationId], '/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\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\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json::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; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/CreateConfigurationForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/CreateConfigurationForEnterprise.php new file mode 100644 index 00000000000..7446ee1a096 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/CreateConfigurationForEnterprise.php @@ -0,0 +1,100 @@ +enterprise = $enterprise; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('POST', str_replace(['{enterprise}'], [$this->enterprise], '/enterprises/{enterprise}/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); + /** + * 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)); + } + + 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; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterprise.php new file mode 100644 index 00000000000..3f31fbd9124 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterprise.php @@ -0,0 +1,109 @@ +enterprise = $enterprise; + $this->configurationId = $configurationId; + } + + public function createRequest(): RequestInterface + { + return new Request('DELETE', str_replace(['{enterprise}', '{configuration_id}'], [$this->enterprise, $this->configurationId], '/enterprises/{enterprise}/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/GetConfigurationsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfigurationsForEnterprise.php new file mode 100644 index 00000000000..b4fbb5c46f6 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetConfigurationsForEnterprise.php @@ -0,0 +1,99 @@ +enterprise = $enterprise; + $this->before = $before; + $this->after = $after; + $this->perPage = $perPage; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{enterprise}', '{before}', '{after}', '{per_page}'], [$this->enterprise, $this->before, $this->after, $this->perPage], '/enterprises/{enterprise}/code-security/configurations' . '?before={before}&after={after}&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/GetDefaultConfigurationsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetDefaultConfigurationsForEnterprise.php new file mode 100644 index 00000000000..2ebad0c2ba8 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetDefaultConfigurationsForEnterprise.php @@ -0,0 +1,73 @@ +enterprise = $enterprise; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{enterprise}'], [$this->enterprise], '/enterprises/{enterprise}/code-security/configurations/defaults')); + } + + /** @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\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; + }); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetRepositoriesForEnterpriseConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetRepositoriesForEnterpriseConfiguration.php new file mode 100644 index 00000000000..440e08d76fe --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetRepositoriesForEnterpriseConfiguration.php @@ -0,0 +1,107 @@ +enterprise = $enterprise; + $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(['{enterprise}', '{configuration_id}', '{before}', '{after}', '{per_page}', '{status}'], [$this->enterprise, $this->configurationId, $this->before, $this->after, $this->perPage, $this->status], '/enterprises/{enterprise}/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/GetSingleConfigurationForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetSingleConfigurationForEnterprise.php new file mode 100644 index 00000000000..480c4c05828 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/GetSingleConfigurationForEnterprise.php @@ -0,0 +1,88 @@ +enterprise = $enterprise; + $this->configurationId = $configurationId; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{enterprise}', '{configuration_id}'], [$this->enterprise, $this->configurationId], '/enterprises/{enterprise}/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/SetConfigurationAsDefault.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefault.php index 3839650f381..e2bc839cb3c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefault.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefault.php @@ -41,7 +41,7 @@ public function createRequest(array $data): RequestInterface 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 + public function createResponse(ResponseInterface $response): Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json { $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); @@ -53,9 +53,9 @@ public function createResponse(ResponseInterface $response): Schema\Operations\C * 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)); + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - return $this->hydrator->hydrateObject(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok::class, $body); + return $this->hydrator->hydrateObject(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json::class, $body); /** * Forbidden **/ diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php new file mode 100644 index 00000000000..d1c760e04fa --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php @@ -0,0 +1,82 @@ +enterprise = $enterprise; + $this->configurationId = $configurationId; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('PUT', str_replace(['{enterprise}', '{configuration_id}'], [$this->enterprise, $this->configurationId], '/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults'), ['Content-Type' => 'application/json'], json_encode($data)); + } + + public function createResponse(ResponseInterface $response): Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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/UpdateEnterpriseConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/UpdateEnterpriseConfiguration.php new file mode 100644 index 00000000000..0b8957999a4 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeSecurity/UpdateEnterpriseConfiguration.php @@ -0,0 +1,99 @@ +enterprise = $enterprise; + $this->configurationId = $configurationId; + } + + public function createRequest(array $data): RequestInterface + { + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return new Request('PATCH', str_replace(['{enterprise}', '{configuration_id}'], [$this->enterprise, $this->configurationId], '/enterprises/{enterprise}/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 + **/ + 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)); + /** + * 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; + } + + 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/Orgs/ListPushBypassRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPushBypassRequests.php new file mode 100644 index 00000000000..1a4eba5fe61 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPushBypassRequests.php @@ -0,0 +1,113 @@ +org = $org; + $this->repositoryName = $repositoryName; + $this->reviewer = $reviewer; + $this->requester = $requester; + $this->timePeriod = $timePeriod; + $this->requestStatus = $requestStatus; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{repository_name}', '{reviewer}', '{requester}', '{time_period}', '{request_status}', '{per_page}', '{page}'], [$this->org, $this->repositoryName, $this->reviewer, $this->requester, $this->timePeriod, $this->requestStatus, $this->perPage, $this->page], '/orgs/{org}/bypass-requests/push-rules' . '?repository_name={repository_name}&reviewer={reviewer}&requester={requester}&time_period={time_period}&request_status={request_status}&per_page={per_page}&page={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\PushRuleBypassRequest { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\PushRuleBypassRequest::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\PushRuleBypassRequest::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * 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)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $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/Orgs/ListPushBypassRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPushBypassRequestsListing.php new file mode 100644 index 00000000000..9bfe1d8156c --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/ListPushBypassRequestsListing.php @@ -0,0 +1,113 @@ +org = $org; + $this->repositoryName = $repositoryName; + $this->reviewer = $reviewer; + $this->requester = $requester; + $this->timePeriod = $timePeriod; + $this->requestStatus = $requestStatus; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{repository_name}', '{reviewer}', '{requester}', '{time_period}', '{request_status}', '{per_page}', '{page}'], [$this->org, $this->repositoryName, $this->reviewer, $this->requester, $this->timePeriod, $this->requestStatus, $this->perPage, $this->page], '/orgs/{org}/bypass-requests/push-rules' . '?repository_name={repository_name}&reviewer={reviewer}&requester={requester}&time_period={time_period}&request_status={request_status}&per_page={per_page}&page={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\PushRuleBypassRequest { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\PushRuleBypassRequest::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\PushRuleBypassRequest::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * 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)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $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/Repos/GetRepoPushBypassRequest.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/GetRepoPushBypassRequest.php new file mode 100644 index 00000000000..e25a02d9688 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/GetRepoPushBypassRequest.php @@ -0,0 +1,82 @@ +owner = $owner; + $this->repo = $repo; + $this->bypassRequestNumber = $bypassRequestNumber; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{owner}', '{repo}', '{bypass_request_number}'], [$this->owner, $this->repo, $this->bypassRequestNumber], '/repos/{owner}/{repo}/bypass-requests/push-rules/{bypass_request_number}')); + } + + public function createResponse(ResponseInterface $response): Schema\PushRuleBypassRequest + { + $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\PushRuleBypassRequest::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\PushRuleBypassRequest::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)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $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/Repos/ListRepoPushBypassRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/ListRepoPushBypassRequests.php new file mode 100644 index 00000000000..895273333e6 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/ListRepoPushBypassRequests.php @@ -0,0 +1,113 @@ +owner = $owner; + $this->repo = $repo; + $this->reviewer = $reviewer; + $this->requester = $requester; + $this->timePeriod = $timePeriod; + $this->requestStatus = $requestStatus; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{owner}', '{repo}', '{reviewer}', '{requester}', '{time_period}', '{request_status}', '{per_page}', '{page}'], [$this->owner, $this->repo, $this->reviewer, $this->requester, $this->timePeriod, $this->requestStatus, $this->perPage, $this->page], '/repos/{owner}/{repo}/bypass-requests/push-rules' . '?reviewer={reviewer}&requester={requester}&time_period={time_period}&request_status={request_status}&per_page={per_page}&page={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\PushRuleBypassRequest { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\PushRuleBypassRequest::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\PushRuleBypassRequest::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * 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)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $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/Repos/ListRepoPushBypassRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/ListRepoPushBypassRequestsListing.php new file mode 100644 index 00000000000..6c0a7151114 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/ListRepoPushBypassRequestsListing.php @@ -0,0 +1,113 @@ +owner = $owner; + $this->repo = $repo; + $this->reviewer = $reviewer; + $this->requester = $requester; + $this->timePeriod = $timePeriod; + $this->requestStatus = $requestStatus; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{owner}', '{repo}', '{reviewer}', '{requester}', '{time_period}', '{request_status}', '{per_page}', '{page}'], [$this->owner, $this->repo, $this->reviewer, $this->requester, $this->timePeriod, $this->requestStatus, $this->perPage, $this->page], '/repos/{owner}/{repo}/bypass-requests/push-rules' . '?reviewer={reviewer}&requester={requester}&time_period={time_period}&request_status={request_status}&per_page={per_page}&page={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\PushRuleBypassRequest { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\PushRuleBypassRequest::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\PushRuleBypassRequest::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * 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)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $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/Operator/CodeScanning/CommitAutofix.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/CommitAutofix.php new file mode 100644 index 00000000000..1f926d7c2c1 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/CommitAutofix.php @@ -0,0 +1,41 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo, $alertNumber); + $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): CodeScanningAutofixCommitsResponse|WithoutBody { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/CreateAutofix.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/CreateAutofix.php new file mode 100644 index 00000000000..48ec17be33f --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/CreateAutofix.php @@ -0,0 +1,41 @@ +responseSchemaValidator, $this->hydrator, $owner, $repo, $alertNumber); + $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): CodeScanningAutofix|WithoutBody { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/GetAutofix.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/GetAutofix.php new file mode 100644 index 00000000000..21db055f457 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/GetAutofix.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $owner, $repo, $alertNumber); + $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): CodeScanningAutofix { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/AttachEnterpriseConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/AttachEnterpriseConfiguration.php new file mode 100644 index 00000000000..fc212490852 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/AttachEnterpriseConfiguration.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise, $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/CreateConfigurationForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/CreateConfigurationForEnterprise.php new file mode 100644 index 00000000000..e55606d3c1e --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/CreateConfigurationForEnterprise.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise); + $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/DeleteConfigurationForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/DeleteConfigurationForEnterprise.php new file mode 100644 index 00000000000..fcfa03c2041 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/DeleteConfigurationForEnterprise.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $enterprise, $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/GetConfigurationsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfigurationsForEnterprise.php new file mode 100644 index 00000000000..43bb0c7d2a2 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetConfigurationsForEnterprise.php @@ -0,0 +1,41 @@ + */ + public function call(string $enterprise, string $before, string $after, int $perPage = 30): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeSecurity\GetConfigurationsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $before, $after, $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/GetDefaultConfigurationsForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetDefaultConfigurationsForEnterprise.php new file mode 100644 index 00000000000..3ff82bd9862 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetDefaultConfigurationsForEnterprise.php @@ -0,0 +1,41 @@ + */ + public function call(string $enterprise): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeSecurity\GetDefaultConfigurationsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise); + $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/GetRepositoriesForEnterpriseConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetRepositoriesForEnterpriseConfiguration.php new file mode 100644 index 00000000000..7d4ed0cea60 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetRepositoriesForEnterpriseConfiguration.php @@ -0,0 +1,41 @@ + */ + public function call(string $enterprise, int $configurationId, string $before, string $after, int $perPage = 30, string $status = 'all'): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeSecurity\GetRepositoriesForEnterpriseConfiguration($this->responseSchemaValidator, $this->hydrator, $enterprise, $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/GetSingleConfigurationForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetSingleConfigurationForEnterprise.php new file mode 100644 index 00000000000..42b9ba71143 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/GetSingleConfigurationForEnterprise.php @@ -0,0 +1,41 @@ +responseSchemaValidator, $this->hydrator, $enterprise, $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/SetConfigurationAsDefault.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefault.php index bb370efd205..52c5a0476c9 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefault.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefault.php @@ -5,7 +5,7 @@ namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Operator\CodeSecurity; use ApiClients\Client\GitHubEnterpriseCloud\Internal; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use League\OpenAPIValidation\Schema\SchemaValidator; use Psr\Http\Message\ResponseInterface; @@ -24,12 +24,11 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ - public function call(string $org, int $configurationId, array $params): Ok + public function call(string $org, int $configurationId, array $params): Json { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeSecurity\SetConfigurationAsDefault($this->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 { + $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) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php new file mode 100644 index 00000000000..d00f29ba30d --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/SetConfigurationAsDefaultForEnterprise.php @@ -0,0 +1,40 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise, $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/UpdateEnterpriseConfiguration.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/UpdateEnterpriseConfiguration.php new file mode 100644 index 00000000000..8a49c5ee981 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeSecurity/UpdateEnterpriseConfiguration.php @@ -0,0 +1,41 @@ +requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise, $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/Orgs/ListPushBypassRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPushBypassRequests.php new file mode 100644 index 00000000000..5acffb567df --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPushBypassRequests.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, string $repositoryName, string $reviewer, string $requester, string $timePeriod = 'day', string $requestStatus = 'all', int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPushBypassRequests($this->responseSchemaValidator, $this->hydrator, $org, $repositoryName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + $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/Orgs/ListPushBypassRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPushBypassRequestsListing.php new file mode 100644 index 00000000000..b29bc62ba28 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/ListPushBypassRequestsListing.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, string $repositoryName, string $reviewer, string $requester, string $timePeriod = 'day', string $requestStatus = 'all', int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\ListPushBypassRequestsListing($this->responseSchemaValidator, $this->hydrator, $org, $repositoryName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + $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/Repos/GetRepoPushBypassRequest.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoPushBypassRequest.php new file mode 100644 index 00000000000..153ddfe784d --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/GetRepoPushBypassRequest.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $owner, $repo, $bypassRequestNumber); + $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): PushRuleBypassRequest { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListRepoPushBypassRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListRepoPushBypassRequests.php new file mode 100644 index 00000000000..305b9d304f9 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListRepoPushBypassRequests.php @@ -0,0 +1,41 @@ + */ + public function call(string $owner, string $repo, string $reviewer, string $requester, string $timePeriod = 'day', string $requestStatus = 'all', int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\ListRepoPushBypassRequests($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + $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/Repos/ListRepoPushBypassRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListRepoPushBypassRequestsListing.php new file mode 100644 index 00000000000..6b61ea120ff --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Repos/ListRepoPushBypassRequestsListing.php @@ -0,0 +1,41 @@ + */ + public function call(string $owner, string $repo, string $reviewer, string $requester, string $timePeriod = 'day', string $requestStatus = 'all', int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Repos\ListRepoPushBypassRequestsListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + $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/Operators.php b/clients/GitHubEnterpriseCloud/src/Internal/Operators.php index 0a98ee5d9b2..8f4dc73bb12 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operators.php @@ -99,6 +99,15 @@ final class Operators private Internal\Operator\EnterpriseAdmin\DeleteAuditLogStream|null $enterpriseAdmin👷DeleteAuditLogStream = null; private Internal\Operator\CodeScanning\ListAlertsForEnterprise|null $codeScanning👷ListAlertsForEnterprise = null; private Internal\Operator\CodeScanning\ListAlertsForEnterpriseListing|null $codeScanning👷ListAlertsForEnterpriseListing = null; + private Internal\Operator\CodeSecurity\GetConfigurationsForEnterprise|null $codeSecurity👷GetConfigurationsForEnterprise = null; + private Internal\Operator\CodeSecurity\CreateConfigurationForEnterprise|null $codeSecurity👷CreateConfigurationForEnterprise = null; + private Internal\Operator\CodeSecurity\GetDefaultConfigurationsForEnterprise|null $codeSecurity👷GetDefaultConfigurationsForEnterprise = null; + private Internal\Operator\CodeSecurity\GetSingleConfigurationForEnterprise|null $codeSecurity👷GetSingleConfigurationForEnterprise = null; + private Internal\Operator\CodeSecurity\DeleteConfigurationForEnterprise|null $codeSecurity👷DeleteConfigurationForEnterprise = null; + private Internal\Operator\CodeSecurity\UpdateEnterpriseConfiguration|null $codeSecurity👷UpdateEnterpriseConfiguration = null; + private Internal\Operator\CodeSecurity\AttachEnterpriseConfiguration|null $codeSecurity👷AttachEnterpriseConfiguration = null; + private Internal\Operator\CodeSecurity\SetConfigurationAsDefaultForEnterprise|null $codeSecurity👷SetConfigurationAsDefaultForEnterprise = null; + private Internal\Operator\CodeSecurity\GetRepositoriesForEnterpriseConfiguration|null $codeSecurity👷GetRepositoriesForEnterpriseConfiguration = null; private Internal\Operator\SecretScanning\GetSecurityAnalysisSettingsForEnterprise|null $secretScanning👷GetSecurityAnalysisSettingsForEnterprise = null; private Internal\Operator\SecretScanning\PatchSecurityAnalysisSettingsForEnterprise|null $secretScanning👷PatchSecurityAnalysisSettingsForEnterprise = null; private Internal\Operator\EnterpriseAdmin\GetConsumedLicenses|null $enterpriseAdmin👷GetConsumedLicenses = null; @@ -267,6 +276,8 @@ final class Operators private Internal\Operator\Orgs\CheckBlockedUser|null $orgs👷CheckBlockedUser = null; private Internal\Operator\Orgs\BlockUser|null $orgs👷BlockUser = null; private Internal\Operator\Orgs\UnblockUser|null $orgs👷UnblockUser = null; + private Internal\Operator\Orgs\ListPushBypassRequests|null $orgs👷ListPushBypassRequests = null; + private Internal\Operator\Orgs\ListPushBypassRequestsListing|null $orgs👷ListPushBypassRequestsListing = 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; @@ -679,6 +690,9 @@ final class Operators private Internal\Operator\Repos\AddUserAccessRestrictions|null $repos👷AddUserAccessRestrictions = null; private Internal\Operator\Repos\RemoveUserAccessRestrictions|null $repos👷RemoveUserAccessRestrictions = null; private Internal\Operator\Repos\RenameBranch|null $repos👷RenameBranch = null; + private Internal\Operator\Repos\ListRepoPushBypassRequests|null $repos👷ListRepoPushBypassRequests = null; + private Internal\Operator\Repos\ListRepoPushBypassRequestsListing|null $repos👷ListRepoPushBypassRequestsListing = null; + private Internal\Operator\Repos\GetRepoPushBypassRequest|null $repos👷GetRepoPushBypassRequest = null; private Internal\Operator\Checks\Create|null $checks👷Create = null; private Internal\Operator\Checks\Get|null $checks👷Get = null; private Internal\Operator\Checks\Update|null $checks👷Update = null; @@ -694,6 +708,9 @@ final class Operators private Internal\Operator\CodeScanning\ListAlertsForRepoListing|null $codeScanning👷ListAlertsForRepoListing = null; private Internal\Operator\CodeScanning\GetAlert|null $codeScanning👷GetAlert = null; private Internal\Operator\CodeScanning\UpdateAlert|null $codeScanning👷UpdateAlert = null; + private Internal\Operator\CodeScanning\GetAutofix|null $codeScanning👷GetAutofix = null; + private Internal\Operator\CodeScanning\CreateAutofix|null $codeScanning👷CreateAutofix = null; + private Internal\Operator\CodeScanning\CommitAutofix|null $codeScanning👷CommitAutofix = null; private Internal\Operator\CodeScanning\ListAlertInstances|null $codeScanning👷ListAlertInstances = null; private Internal\Operator\CodeScanning\ListAlertInstancesListing|null $codeScanning👷ListAlertInstancesListing = null; private Internal\Operator\CodeScanning\ListRecentAnalyses|null $codeScanning👷ListRecentAnalyses = null; @@ -2104,6 +2121,87 @@ public function codeScanning👷ListAlertsForEnterpriseListing(): Internal\Opera return $this->codeScanning👷ListAlertsForEnterpriseListing; } + public function codeSecurity👷GetConfigurationsForEnterprise(): Internal\Operator\CodeSecurity\GetConfigurationsForEnterprise + { + if ($this->codeSecurity👷GetConfigurationsForEnterprise instanceof Internal\Operator\CodeSecurity\GetConfigurationsForEnterprise === false) { + $this->codeSecurity👷GetConfigurationsForEnterprise = new Internal\Operator\CodeSecurity\GetConfigurationsForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations()); + } + + return $this->codeSecurity👷GetConfigurationsForEnterprise; + } + + public function codeSecurity👷CreateConfigurationForEnterprise(): Internal\Operator\CodeSecurity\CreateConfigurationForEnterprise + { + if ($this->codeSecurity👷CreateConfigurationForEnterprise instanceof Internal\Operator\CodeSecurity\CreateConfigurationForEnterprise === false) { + $this->codeSecurity👷CreateConfigurationForEnterprise = new Internal\Operator\CodeSecurity\CreateConfigurationForEnterprise($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations()); + } + + return $this->codeSecurity👷CreateConfigurationForEnterprise; + } + + public function codeSecurity👷GetDefaultConfigurationsForEnterprise(): Internal\Operator\CodeSecurity\GetDefaultConfigurationsForEnterprise + { + if ($this->codeSecurity👷GetDefaultConfigurationsForEnterprise instanceof Internal\Operator\CodeSecurity\GetDefaultConfigurationsForEnterprise === false) { + $this->codeSecurity👷GetDefaultConfigurationsForEnterprise = new Internal\Operator\CodeSecurity\GetDefaultConfigurationsForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults()); + } + + return $this->codeSecurity👷GetDefaultConfigurationsForEnterprise; + } + + public function codeSecurity👷GetSingleConfigurationForEnterprise(): Internal\Operator\CodeSecurity\GetSingleConfigurationForEnterprise + { + if ($this->codeSecurity👷GetSingleConfigurationForEnterprise instanceof Internal\Operator\CodeSecurity\GetSingleConfigurationForEnterprise === false) { + $this->codeSecurity👷GetSingleConfigurationForEnterprise = new Internal\Operator\CodeSecurity\GetSingleConfigurationForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + } + + return $this->codeSecurity👷GetSingleConfigurationForEnterprise; + } + + public function codeSecurity👷DeleteConfigurationForEnterprise(): Internal\Operator\CodeSecurity\DeleteConfigurationForEnterprise + { + if ($this->codeSecurity👷DeleteConfigurationForEnterprise instanceof Internal\Operator\CodeSecurity\DeleteConfigurationForEnterprise === false) { + $this->codeSecurity👷DeleteConfigurationForEnterprise = new Internal\Operator\CodeSecurity\DeleteConfigurationForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + } + + return $this->codeSecurity👷DeleteConfigurationForEnterprise; + } + + public function codeSecurity👷UpdateEnterpriseConfiguration(): Internal\Operator\CodeSecurity\UpdateEnterpriseConfiguration + { + if ($this->codeSecurity👷UpdateEnterpriseConfiguration instanceof Internal\Operator\CodeSecurity\UpdateEnterpriseConfiguration === false) { + $this->codeSecurity👷UpdateEnterpriseConfiguration = new Internal\Operator\CodeSecurity\UpdateEnterpriseConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + } + + return $this->codeSecurity👷UpdateEnterpriseConfiguration; + } + + public function codeSecurity👷AttachEnterpriseConfiguration(): Internal\Operator\CodeSecurity\AttachEnterpriseConfiguration + { + if ($this->codeSecurity👷AttachEnterpriseConfiguration instanceof Internal\Operator\CodeSecurity\AttachEnterpriseConfiguration === false) { + $this->codeSecurity👷AttachEnterpriseConfiguration = new Internal\Operator\CodeSecurity\AttachEnterpriseConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()); + } + + return $this->codeSecurity👷AttachEnterpriseConfiguration; + } + + public function codeSecurity👷SetConfigurationAsDefaultForEnterprise(): Internal\Operator\CodeSecurity\SetConfigurationAsDefaultForEnterprise + { + if ($this->codeSecurity👷SetConfigurationAsDefaultForEnterprise instanceof Internal\Operator\CodeSecurity\SetConfigurationAsDefaultForEnterprise === false) { + $this->codeSecurity👷SetConfigurationAsDefaultForEnterprise = new Internal\Operator\CodeSecurity\SetConfigurationAsDefaultForEnterprise($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()); + } + + return $this->codeSecurity👷SetConfigurationAsDefaultForEnterprise; + } + + public function codeSecurity👷GetRepositoriesForEnterpriseConfiguration(): Internal\Operator\CodeSecurity\GetRepositoriesForEnterpriseConfiguration + { + if ($this->codeSecurity👷GetRepositoriesForEnterpriseConfiguration instanceof Internal\Operator\CodeSecurity\GetRepositoriesForEnterpriseConfiguration === false) { + $this->codeSecurity👷GetRepositoriesForEnterpriseConfiguration = new Internal\Operator\CodeSecurity\GetRepositoriesForEnterpriseConfiguration($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories()); + } + + return $this->codeSecurity👷GetRepositoriesForEnterpriseConfiguration; + } + public function secretScanning👷GetSecurityAnalysisSettingsForEnterprise(): Internal\Operator\SecretScanning\GetSecurityAnalysisSettingsForEnterprise { if ($this->secretScanning👷GetSecurityAnalysisSettingsForEnterprise instanceof Internal\Operator\SecretScanning\GetSecurityAnalysisSettingsForEnterprise === false) { @@ -3616,6 +3714,24 @@ public function orgs👷UnblockUser(): Internal\Operator\Orgs\UnblockUser return $this->orgs👷UnblockUser; } + public function orgs👷ListPushBypassRequests(): Internal\Operator\Orgs\ListPushBypassRequests + { + if ($this->orgs👷ListPushBypassRequests instanceof Internal\Operator\Orgs\ListPushBypassRequests === false) { + $this->orgs👷ListPushBypassRequests = new Internal\Operator\Orgs\ListPushBypassRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀BypassRequests🌀PushRules()); + } + + return $this->orgs👷ListPushBypassRequests; + } + + public function orgs👷ListPushBypassRequestsListing(): Internal\Operator\Orgs\ListPushBypassRequestsListing + { + if ($this->orgs👷ListPushBypassRequestsListing instanceof Internal\Operator\Orgs\ListPushBypassRequestsListing === false) { + $this->orgs👷ListPushBypassRequestsListing = new Internal\Operator\Orgs\ListPushBypassRequestsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀BypassRequests🌀PushRules()); + } + + return $this->orgs👷ListPushBypassRequestsListing; + } + public function codeScanning👷ListAlertsForOrg(): Internal\Operator\CodeScanning\ListAlertsForOrg { if ($this->codeScanning👷ListAlertsForOrg instanceof Internal\Operator\CodeScanning\ListAlertsForOrg === false) { @@ -7324,6 +7440,33 @@ public function repos👷RenameBranch(): Internal\Operator\Repos\RenameBranch return $this->repos👷RenameBranch; } + public function repos👷ListRepoPushBypassRequests(): Internal\Operator\Repos\ListRepoPushBypassRequests + { + if ($this->repos👷ListRepoPushBypassRequests instanceof Internal\Operator\Repos\ListRepoPushBypassRequests === false) { + $this->repos👷ListRepoPushBypassRequests = new Internal\Operator\Repos\ListRepoPushBypassRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules()); + } + + return $this->repos👷ListRepoPushBypassRequests; + } + + public function repos👷ListRepoPushBypassRequestsListing(): Internal\Operator\Repos\ListRepoPushBypassRequestsListing + { + if ($this->repos👷ListRepoPushBypassRequestsListing instanceof Internal\Operator\Repos\ListRepoPushBypassRequestsListing === false) { + $this->repos👷ListRepoPushBypassRequestsListing = new Internal\Operator\Repos\ListRepoPushBypassRequestsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules()); + } + + return $this->repos👷ListRepoPushBypassRequestsListing; + } + + public function repos👷GetRepoPushBypassRequest(): Internal\Operator\Repos\GetRepoPushBypassRequest + { + if ($this->repos👷GetRepoPushBypassRequest instanceof Internal\Operator\Repos\GetRepoPushBypassRequest === false) { + $this->repos👷GetRepoPushBypassRequest = new Internal\Operator\Repos\GetRepoPushBypassRequest($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber()); + } + + return $this->repos👷GetRepoPushBypassRequest; + } + public function checks👷Create(): Internal\Operator\Checks\Create { if ($this->checks👷Create instanceof Internal\Operator\Checks\Create === false) { @@ -7459,6 +7602,33 @@ public function codeScanning👷UpdateAlert(): Internal\Operator\CodeScanning\Up return $this->codeScanning👷UpdateAlert; } + public function codeScanning👷GetAutofix(): Internal\Operator\CodeScanning\GetAutofix + { + if ($this->codeScanning👷GetAutofix instanceof Internal\Operator\CodeScanning\GetAutofix === false) { + $this->codeScanning👷GetAutofix = new Internal\Operator\CodeScanning\GetAutofix($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix()); + } + + return $this->codeScanning👷GetAutofix; + } + + public function codeScanning👷CreateAutofix(): Internal\Operator\CodeScanning\CreateAutofix + { + if ($this->codeScanning👷CreateAutofix instanceof Internal\Operator\CodeScanning\CreateAutofix === false) { + $this->codeScanning👷CreateAutofix = new Internal\Operator\CodeScanning\CreateAutofix($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix()); + } + + return $this->codeScanning👷CreateAutofix; + } + + public function codeScanning👷CommitAutofix(): Internal\Operator\CodeScanning\CommitAutofix + { + if ($this->codeScanning👷CommitAutofix instanceof Internal\Operator\CodeScanning\CommitAutofix === false) { + $this->codeScanning👷CommitAutofix = new Internal\Operator\CodeScanning\CommitAutofix($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits()); + } + + return $this->codeScanning👷CommitAutofix; + } + public function codeScanning👷ListAlertInstances(): Internal\Operator\CodeScanning\ListAlertInstances { if ($this->codeScanning👷ListAlertInstances instanceof Internal\Operator\CodeScanning\ListAlertInstances === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/CodeSecurity.php index 3d2ffe39f35..5b002540e88 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/CodeSecurity.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/CodeSecurity.php @@ -19,6 +19,26 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + public function deleteConfigurationForEnterprise(array $params): WithoutBody + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + 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\DeleteConfigurationForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + + return $operator->call($arguments['enterprise'], $arguments['configuration_id']); + } + /** @return */ public function detachConfiguration(array $params): WithoutBody { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php index 221ad804e41..9b974560fd2 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Delete/Six.php @@ -17,6 +17,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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|ActionsCacheList|FileCommit { if ($pathChunks[0] === '') { @@ -44,6 +45,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 /enterprises/{enterprise}/code-security/configurations/{configuration_id}') { + return $this->routers->internal🔀Router🔀Delete🔀CodeSecurity()->deleteConfigurationForEnterprise($params); + } + } + } } elseif ($pathChunks[3] === 'properties') { if ($pathChunks[4] === 'schema') { if ($pathChunks[5] === '{custom_property_name}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php index d23ed28ab93..88ea2bdd7e2 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeScanning.php @@ -8,6 +8,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAlert; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningCodeqlDatabase; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetup; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsStatus; @@ -462,6 +463,32 @@ public function getSarif(array $params): CodeScanningSarifsStatus|WithoutBody return $operator->call($arguments['owner'], $arguments['repo'], $arguments['sarif_id']); } + public function getAutofix(array $params): CodeScanningAutofix + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('alert_number', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: alert_number'); + } + + $arguments['alert_number'] = $params['alert_number']; + unset($params['alert_number']); + $operator = new Internal\Operator\CodeScanning\GetAutofix($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix()); + + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['alert_number']); + } + /** @return Observable */ public function listAlertInstances(array $params): iterable { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeSecurity.php index 56c6bfb3b45..14c54c953c9 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeSecurity.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/CodeSecurity.php @@ -22,6 +22,39 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + /** @return iterable */ + public function getConfigurationsForEnterprise(array $params): iterable + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + 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']); + $operator = new Internal\Operator\CodeSecurity\GetConfigurationsForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations()); + + return $operator->call($arguments['enterprise'], $arguments['before'], $arguments['after'], $arguments['per_page']); + } + /** @return Observable */ public function getConfigurationsForOrg(array $params): iterable { @@ -82,6 +115,41 @@ public function getConfigurationForRepository(array $params): CodeSecurityConfig return $operator->call($arguments['owner'], $arguments['repo']); } + /** @return iterable */ + public function getDefaultConfigurationsForEnterprise(array $params): iterable + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + $operator = new Internal\Operator\CodeSecurity\GetDefaultConfigurationsForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults()); + + return $operator->call($arguments['enterprise']); + } + + public function getSingleConfigurationForEnterprise(array $params): CodeSecurityConfiguration|WithoutBody + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + 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\GetSingleConfigurationForEnterprise($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + + return $operator->call($arguments['enterprise'], $arguments['configuration_id']); + } + /** @return Observable|WithoutBody */ public function getDefaultConfigurations(array $params): iterable|WithoutBody { @@ -118,6 +186,51 @@ public function getConfiguration(array $params): CodeSecurityConfiguration|Witho return $operator->call($arguments['org'], $arguments['configuration_id']); } + /** @return iterable */ + public function getRepositoriesForEnterpriseConfiguration(array $params): iterable + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + 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\GetRepositoriesForEnterpriseConfiguration($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Repositories()); + + return $operator->call($arguments['enterprise'], $arguments['configuration_id'], $arguments['before'], $arguments['after'], $arguments['per_page'], $arguments['status']); + } + /** @return Observable */ public function getRepositoriesForConfiguration(array $params): iterable { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php index 34672c75023..2492ac3c80e 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Eight.php @@ -10,6 +10,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\ActionsVariable; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ApiInsightsSummaryStats; use ApiClients\Client\GitHubEnterpriseCloud\Schema\BranchRestrictionPolicy; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningCodeqlDatabase; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysis; use ApiClients\Client\GitHubEnterpriseCloud\Schema\DeploymentBranchPolicy; @@ -36,8 +37,8 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody */ - public function call(string $call, array $params, array $pathChunks): iterable|ApiInsightsSummaryStats|PackageVersion|TeamRepository|WithoutBody|OidcCustomSubRepo|Ok|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|WorkflowRunUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|WorkflowUsage|ProtectedBranchAdminEnforced|ProtectedBranchPullRequestReview|StatusCheckPolicy|BranchRestrictionPolicy|CodeScanningCodeqlDatabase|CodeScanningVariantAnalysis|DeploymentStatus|DeploymentBranchPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|DeploymentProtectionRule|ActionsPublicKey|ActionsSecret|ActionsVariable|HookDelivery|PullRequestReview + /** @return Observable||Observable|Observable|Observable|Observable|Observable|Schema\CodeScanningAutofix|Observable|Observable|WithoutBody */ + public function call(string $call, array $params, array $pathChunks): iterable|ApiInsightsSummaryStats|PackageVersion|TeamRepository|WithoutBody|OidcCustomSubRepo|Ok|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|WorkflowRunUsage|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|WorkflowUsage|ProtectedBranchAdminEnforced|ProtectedBranchPullRequestReview|StatusCheckPolicy|BranchRestrictionPolicy|CodeScanningAutofix|CodeScanningCodeqlDatabase|CodeScanningVariantAnalysis|DeploymentStatus|DeploymentBranchPolicy|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|DeploymentProtectionRule|ActionsPublicKey|ActionsSecret|ActionsVariable|HookDelivery|PullRequestReview { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'orgs') { @@ -226,7 +227,11 @@ public function call(string $call, array $params, array $pathChunks): iterable|A } elseif ($pathChunks[4] === 'code-scanning') { if ($pathChunks[5] === 'alerts') { if ($pathChunks[6] === '{alert_number}') { - if ($pathChunks[7] === 'instances') { + if ($pathChunks[7] === 'autofix') { + if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix') { + return $this->routers->internal🔀Router🔀Get🔀CodeScanning()->getAutofix($params); + } + } elseif ($pathChunks[7] === 'instances') { if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances') { return $this->routers->internal🔀Router🔀Get🔀CodeScanning()->listAlertInstances($params); } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php index 63ff3611e19..1a5ec85df8c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php @@ -56,7 +56,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|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|iterable|Observable|Observable|Observable|WithoutBody|Observable|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|AuditLogStreamKey|iterable|WithoutBody|RepositoryRuleset|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\Orgs\ListAttestations\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|GroupMapping|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { @@ -102,6 +102,12 @@ public function call(string $call, array $params, array $pathChunks): HookDelive return $this->routers->internal🔀Router🔀Get🔀CodeScanning()->listAlertsForEnterprise($params); } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($call === 'GET /enterprises/{enterprise}/code-security/configurations') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getConfigurationsForEnterprise($params); + } + } } elseif ($pathChunks[3] === 'copilot') { if ($pathChunks[4] === 'metrics') { if ($call === 'GET /enterprises/{enterprise}/copilot/metrics') { @@ -222,6 +228,12 @@ public function call(string $call, array $params, array $pathChunks): HookDelive return $this->routers->internal🔀Router🔀Get🔀Orgs()->checkBlockedUser($params); } } + } elseif ($pathChunks[3] === 'bypass-requests') { + if ($pathChunks[4] === 'push-rules') { + if ($call === 'GET /orgs/{org}/bypass-requests/push-rules') { + return $this->routers->internal🔀Router🔀Get🔀Orgs()->listPushBypassRequests($params); + } + } } elseif ($pathChunks[3] === 'code-scanning') { if ($pathChunks[4] === 'alerts') { if ($call === 'GET /orgs/{org}/code-scanning/alerts') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php index dddfcf71624..9b9db1c6e62 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Orgs.php @@ -774,6 +774,63 @@ public function checkBlockedUser(array $params): WithoutBody return $operator->call($arguments['org'], $arguments['username']); } + /** @return iterable */ + public function listPushBypassRequests(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('repository_name', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repository_name'); + } + + $arguments['repository_name'] = $params['repository_name']; + unset($params['repository_name']); + if (array_key_exists('reviewer', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: reviewer'); + } + + $arguments['reviewer'] = $params['reviewer']; + unset($params['reviewer']); + if (array_key_exists('requester', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: requester'); + } + + $arguments['requester'] = $params['requester']; + unset($params['requester']); + if (array_key_exists('time_period', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: time_period'); + } + + $arguments['time_period'] = $params['time_period']; + unset($params['time_period']); + if (array_key_exists('request_status', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: request_status'); + } + + $arguments['request_status'] = $params['request_status']; + unset($params['request_status']); + 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('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $operator = new Internal\Operator\Orgs\ListPushBypassRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀BypassRequests🌀PushRules()); + + return $operator->call($arguments['org'], $arguments['repository_name'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page']); + } + /** @return */ public function getCustomRepoRole(array $params): OrganizationCustomRepositoryRole { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php index 81fca68d2bc..ec1a51caa93 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Repos.php @@ -43,6 +43,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\ParticipationStats; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchAdminEnforced; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchPullRequestReview; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Release; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseAsset; use ApiClients\Client\GitHubEnterpriseCloud\Schema\RepositoryCollaboratorPermission; @@ -1380,6 +1381,63 @@ public function getBranch(array $params): BranchWithProtection|BasicError return $operator->call($arguments['owner'], $arguments['repo'], $arguments['branch']); } + /** @return iterable */ + public function listRepoPushBypassRequests(array $params): iterable + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('reviewer', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: reviewer'); + } + + $arguments['reviewer'] = $params['reviewer']; + unset($params['reviewer']); + if (array_key_exists('requester', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: requester'); + } + + $arguments['requester'] = $params['requester']; + unset($params['requester']); + if (array_key_exists('time_period', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: time_period'); + } + + $arguments['time_period'] = $params['time_period']; + unset($params['time_period']); + if (array_key_exists('request_status', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: request_status'); + } + + $arguments['request_status'] = $params['request_status']; + unset($params['request_status']); + 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('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $operator = new Internal\Operator\Repos\ListRepoPushBypassRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules()); + + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page']); + } + /** @return */ public function codeownersErrors(array $params): CodeownersErrors|WithoutBody { @@ -2208,6 +2266,32 @@ public function getBranchProtection(array $params): BranchProtection return $operator->call($arguments['owner'], $arguments['repo'], $arguments['branch']); } + public function getRepoPushBypassRequest(array $params): PushRuleBypassRequest + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('bypass_request_number', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: bypass_request_number'); + } + + $arguments['bypass_request_number'] = $params['bypass_request_number']; + unset($params['bypass_request_number']); + $operator = new Internal\Operator\Repos\GetRepoPushBypassRequest($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules🌀BypassRequestNumber()); + + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['bypass_request_number']); + } + /** @return */ public function getCollaboratorPermissionLevel(array $params): RepositoryCollaboratorPermission { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php index 7127fd0f0aa..6c863bb02e5 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Seven.php @@ -41,6 +41,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\PagesDeploymentStatus; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewRequest; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Release; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseAsset; use ApiClients\Client\GitHubEnterpriseCloud\Schema\RepoCodespacesSecret; @@ -67,8 +68,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ - public function call(string $call, array $params, array $pathChunks): Json|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|iterable|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|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|Schema\PushRuleBypassRequest|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + public function call(string $call, array $params, array $pathChunks): Json|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|iterable|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|TeamDiscussion|TeamMembership|TeamProject|GroupMapping|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|PushRuleBypassRequest|\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') { @@ -95,6 +96,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 /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getRepositoriesForEnterpriseConfiguration($params); + } + } + } + } } elseif ($pathChunks[3] === 'team') { if ($pathChunks[4] === '{team_slug}') { if ($pathChunks[5] === 'copilot') { @@ -346,6 +357,14 @@ public function call(string $call, array $params, array $pathChunks): Json|Ok|\A } } } + } elseif ($pathChunks[4] === 'bypass-requests') { + if ($pathChunks[5] === 'push-rules') { + if ($pathChunks[6] === '{bypass_request_number}') { + if ($call === 'GET /repos/{owner}/{repo}/bypass-requests/push-rules/{bypass_request_number}') { + return $this->routers->internal🔀Router🔀Get🔀Repos()->getRepoPushBypassRequest($params); + } + } + } } elseif ($pathChunks[4] === 'check-runs') { if ($pathChunks[5] === '{check_run_id}') { if ($pathChunks[6] === 'annotations') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php index 50d2f6ca192..28a8dc43697 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php @@ -86,8 +86,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ - public function call(string $call, array $params, array $pathChunks): ActionsCacheUsageOrgEnterprise|Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|GetAuditLogStreamConfig|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|CustomProperty|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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|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|SecretScanningScanHistory|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|iterable|Schema\CodeSecurityConfiguration|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|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|GetAuditLogStreamConfig|CodeSecurityConfiguration|WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|CustomProperty|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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|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|SecretScanningScanHistory|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') { @@ -138,6 +138,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 /enterprises/{enterprise}/code-security/configurations/defaults') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getDefaultConfigurationsForEnterprise($params); + } + } elseif ($pathChunks[5] === '{configuration_id}') { + if ($call === 'GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}') { + return $this->routers->internal🔀Router🔀Get🔀CodeSecurity()->getSingleConfigurationForEnterprise($params); + } + } + } } elseif ($pathChunks[3] === 'copilot') { if ($pathChunks[4] === 'billing') { if ($pathChunks[5] === 'seats') { @@ -559,6 +571,12 @@ public function call(string $call, array $params, array $pathChunks): ActionsCac return $this->routers->internal🔀Router🔀Get🔀Repos()->getBranch($params); } } + } elseif ($pathChunks[4] === 'bypass-requests') { + if ($pathChunks[5] === 'push-rules') { + if ($call === 'GET /repos/{owner}/{repo}/bypass-requests/push-rules') { + return $this->routers->internal🔀Router🔀Get🔀Repos()->listRepoPushBypassRequests($params); + } + } } elseif ($pathChunks[4] === 'check-runs') { if ($pathChunks[5] === '{check_run_id}') { if ($call === 'GET /repos/{owner}/{repo}/check-runs/{check_run_id}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php index 83c51755a6d..a9dddd30eb0 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|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 */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError|WithoutBody { if ($pathChunks[0] === '') { @@ -62,7 +62,13 @@ public function call(string $call, array $params, array $pathChunks): iterable|B } } elseif ($pathChunks[1] === 'orgs') { if ($pathChunks[2] === '{org}') { - if ($pathChunks[3] === 'code-scanning') { + if ($pathChunks[3] === 'bypass-requests') { + if ($pathChunks[4] === 'push-rules') { + if ($call === 'LIST /orgs/{org}/bypass-requests/push-rules') { + return $this->routers->internal🔀Router🔀List🔀Orgs()->listPushBypassRequestsListing($params); + } + } + } elseif ($pathChunks[3] === 'code-scanning') { if ($pathChunks[4] === 'alerts') { if ($call === 'LIST /orgs/{org}/code-scanning/alerts') { return $this->routers->internal🔀Router🔀List🔀CodeScanning()->listAlertsForOrgListing($params); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php index e8e09ed3f95..ec885606570 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Orgs.php @@ -564,6 +564,69 @@ public function listForUserListing(array $params): iterable } while (count($items) > 0); } + /** @return iterable */ + public function listPushBypassRequestsListing(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('repository_name', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repository_name'); + } + + $arguments['repository_name'] = $params['repository_name']; + unset($params['repository_name']); + if (array_key_exists('reviewer', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: reviewer'); + } + + $arguments['reviewer'] = $params['reviewer']; + unset($params['reviewer']); + if (array_key_exists('requester', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: requester'); + } + + $arguments['requester'] = $params['requester']; + unset($params['requester']); + if (array_key_exists('time_period', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: time_period'); + } + + $arguments['time_period'] = $params['time_period']; + unset($params['time_period']); + if (array_key_exists('request_status', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: request_status'); + } + + $arguments['request_status'] = $params['request_status']; + unset($params['request_status']); + 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('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $arguments['page'] = 1; + do { + $operator = new Internal\Operator\Orgs\ListPushBypassRequestsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀BypassRequests🌀PushRules()); + $items = [...$operator->call($arguments['org'], $arguments['repository_name'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page'])]; + + yield from $items; + + $arguments['page']++; + } while (count($items) > 0); + } + /** @return Observable */ public function listCustomPropertiesValuesForReposListing(array $params): iterable { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php index 2a62021189f..cd77b5e58d3 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Repos.php @@ -1240,6 +1240,69 @@ public function getBranchRulesListing(array $params): iterable } while (count($items) > 0); } + /** @return iterable */ + public function listRepoPushBypassRequestsListing(array $params): iterable + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('reviewer', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: reviewer'); + } + + $arguments['reviewer'] = $params['reviewer']; + unset($params['reviewer']); + if (array_key_exists('requester', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: requester'); + } + + $arguments['requester'] = $params['requester']; + unset($params['requester']); + if (array_key_exists('time_period', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: time_period'); + } + + $arguments['time_period'] = $params['time_period']; + unset($params['time_period']); + if (array_key_exists('request_status', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: request_status'); + } + + $arguments['request_status'] = $params['request_status']; + unset($params['request_status']); + 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('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $arguments['page'] = 1; + do { + $operator = new Internal\Operator\Repos\ListRepoPushBypassRequestsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀BypassRequests🌀PushRules()); + $items = [...$operator->call($arguments['owner'], $arguments['repo'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page'])]; + + yield from $items; + + $arguments['page']++; + } while (count($items) > 0); + } + /** @return Observable */ public function listPagesBuildsListing(array $params): iterable { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php index be9aeeda656..042b3060541 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { @@ -118,7 +118,13 @@ public function call(string $call, array $params, array $pathChunks): iterable|W } elseif ($pathChunks[1] === 'repos') { if ($pathChunks[2] === '{owner}') { if ($pathChunks[3] === '{repo}') { - if ($pathChunks[4] === 'code-scanning') { + if ($pathChunks[4] === 'bypass-requests') { + if ($pathChunks[5] === 'push-rules') { + if ($call === 'LIST /repos/{owner}/{repo}/bypass-requests/push-rules') { + return $this->routers->internal🔀Router🔀List🔀Repos()->listRepoPushBypassRequestsListing($params); + } + } + } elseif ($pathChunks[4] === 'code-scanning') { if ($pathChunks[5] === 'alerts') { if ($call === 'LIST /repos/{owner}/{repo}/code-scanning/alerts') { return $this->routers->internal🔀Router🔀List🔀CodeScanning()->listAlertsForRepoListing($params); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeSecurity.php index c32c0f05827..b0763157587 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeSecurity.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeSecurity.php @@ -20,6 +20,26 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + public function updateEnterpriseConfiguration(array $params): CodeSecurityConfiguration|WithoutBody + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + 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\UpdateEnterpriseConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId()); + + return $operator->call($arguments['enterprise'], $arguments['configuration_id'], $params); + } + /** @return */ public function updateConfiguration(array $params): CodeSecurityConfiguration|WithoutBody { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php index 51d37cbf11d..b7893b6a032 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php @@ -34,7 +34,8 @@ public function __construct(private Routers $routers) { } - 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 + /** @return |Schema\CodeSecurityConfiguration|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ + public function call(string $call, array $params, array $pathChunks): RunnerGroupsEnterprise|CodeSecurityConfiguration|WithoutBody|RunnerGroupsOrg|WebhookConfig|ExternalGroup|CheckRun|CheckSuitePreference|EmptyObject|CodeScanningDefaultSetupUpdateResponse|CommitComment|Hook|Import|RepositoryInvitation|Issue|BasicError|Label|Milestone|PullRequest|Release|RepositoryAdvisory { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -47,6 +48,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 /enterprises/{enterprise}/code-security/configurations/{configuration_id}') { + return $this->routers->internal🔀Router🔀Patch🔀CodeSecurity()->updateEnterpriseConfiguration($params); + } + } + } } } } elseif ($pathChunks[1] === 'orgs') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeScanning.php index a07a8393059..863d5fe803f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeScanning.php @@ -5,6 +5,8 @@ namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Router\Post; use ApiClients\Client\GitHubEnterpriseCloud\Internal; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningSarifsReceipt; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningVariantAnalysis; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; @@ -62,4 +64,56 @@ public function createVariantAnalysis(array $params): CodeScanningVariantAnalysi return $operator->call($arguments['owner'], $arguments['repo'], $params); } + + public function createAutofix(array $params): CodeScanningAutofix|WithoutBody + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('alert_number', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: alert_number'); + } + + $arguments['alert_number'] = $params['alert_number']; + unset($params['alert_number']); + $operator = new Internal\Operator\CodeScanning\CreateAutofix($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix()); + + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['alert_number']); + } + + public function commitAutofix(array $params): CodeScanningAutofixCommitsResponse|WithoutBody + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('alert_number', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: alert_number'); + } + + $arguments['alert_number'] = $params['alert_number']; + unset($params['alert_number']); + $operator = new Internal\Operator\CodeScanning\CommitAutofix($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀CodeScanning🌀Alerts🌀AlertNumber🌀Autofix🌀Commits()); + + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['alert_number'], $params); + } } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeSecurity.php index 93c19a7d33f..ad80850958d 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeSecurity.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/CodeSecurity.php @@ -6,7 +6,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Internal; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use InvalidArgumentException; use League\OpenAPIValidation\Schema\SchemaValidator; @@ -20,6 +20,20 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + public function createConfigurationForEnterprise(array $params): CodeSecurityConfiguration + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + $operator = new Internal\Operator\CodeSecurity\CreateConfigurationForEnterprise($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations()); + + return $operator->call($arguments['enterprise'], $params); + } + /** @return */ public function createConfiguration(array $params): CodeSecurityConfiguration { @@ -35,8 +49,28 @@ public function createConfiguration(array $params): CodeSecurityConfiguration return $operator->call($arguments['org'], $params); } + public function attachEnterpriseConfiguration(array $params): Json + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + 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\AttachEnterpriseConfiguration($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Attach()); + + return $operator->call($arguments['enterprise'], $arguments['configuration_id'], $params); + } + /** @return */ - public function attachConfiguration(array $params): Json + public function attachConfiguration(array $params): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json { $arguments = []; if (array_key_exists('org', $params) === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Eight.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Eight.php index 07df51ebb7d..b1ac8f303a5 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Eight.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Eight.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Router\Post; use ApiClients\Client\GitHubEnterpriseCloud\Internal\Routers; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Codespace; use ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Billing\AddResourceToCostCenter\Response\ApplicationJson\Ok; @@ -21,8 +22,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable */ - public function call(string $call, array $params, array $pathChunks): Ok|Json|Codespace|WithoutBody|TeamDiscussionComment|Reaction|EmptyObject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|iterable|ProtectedBranchAdminEnforced + /** @return |Observable|Schema\CodeScanningAutofix|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ + public function call(string $call, array $params, array $pathChunks): Ok|Json|Codespace|WithoutBody|TeamDiscussionComment|Reaction|EmptyObject|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok|iterable|ProtectedBranchAdminEnforced|CodeScanningAutofix { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -160,6 +161,16 @@ public function call(string $call, array $params, array $pathChunks): Ok|Json|Co } } } + } elseif ($pathChunks[4] === 'code-scanning') { + if ($pathChunks[5] === 'alerts') { + if ($pathChunks[6] === '{alert_number}') { + if ($pathChunks[7] === 'autofix') { + if ($call === 'POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix') { + return $this->routers->internal🔀Router🔀Post🔀CodeScanning()->createAutofix($params); + } + } + } + } } elseif ($pathChunks[4] === 'issues') { if ($pathChunks[5] === 'comments') { if ($pathChunks[6] === '{comment_id}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php index 09dd88199d1..8177ee0dee5 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Five.php @@ -46,7 +46,8 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): InstallationToken|Authorization|RunnerGroupsEnterprise|GetAuditLogStreamConfig|WithoutBody|RunnerGroupsOrg|EmptyObject|CodeSecurityConfiguration|ProjectCard|Json|Created|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|GetAuditLogStreamConfig|CodeSecurityConfiguration|WithoutBody|RunnerGroupsOrg|EmptyObject|ProjectCard|Json|Created|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') { @@ -83,6 +84,12 @@ public function call(string $call, array $params, array $pathChunks): Installati return $this->routers->internal🔀Router🔀Post🔀EnterpriseAdmin()->createAuditLogStream($params); } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($call === 'POST /enterprises/{enterprise}/code-security/configurations') { + return $this->routers->internal🔀Router🔀Post🔀CodeSecurity()->createConfigurationForEnterprise($params); + } + } } elseif ($pathChunks[3] === '{security_product}') { if ($pathChunks[4] === '{enablement}') { if ($call === 'POST /enterprises/{enterprise}/{security_product}/{enablement}') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Nine.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Nine.php index d9060a7c0af..9e23fad2a7c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Nine.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Nine.php @@ -5,6 +5,7 @@ namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Router\Post; use ApiClients\Client\GitHubEnterpriseCloud\Internal\Routers; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReview; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment; @@ -17,8 +18,8 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable */ - public function call(string $call, array $params, array $pathChunks): WithoutBody|iterable|Json|PullRequestReviewComment|PullRequestReview + /** @return |Observable|Observable|Observable|Observable|Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ + public function call(string $call, array $params, array $pathChunks): WithoutBody|iterable|CodeScanningAutofixCommitsResponse|Json|PullRequestReviewComment|PullRequestReview { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'orgs') { @@ -68,6 +69,18 @@ public function call(string $call, array $params, array $pathChunks): WithoutBod } } } + } elseif ($pathChunks[4] === 'code-scanning') { + if ($pathChunks[5] === 'alerts') { + if ($pathChunks[6] === '{alert_number}') { + if ($pathChunks[7] === 'autofix') { + if ($pathChunks[8] === 'commits') { + if ($call === 'POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits') { + return $this->routers->internal🔀Router🔀Post🔀CodeScanning()->commitAutofix($params); + } + } + } + } + } } elseif ($pathChunks[4] === 'hooks') { if ($pathChunks[5] === '{hook_id}') { if ($pathChunks[6] === 'deliveries') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php index c785c96a392..fb4486ec32f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php @@ -19,7 +19,7 @@ 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\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReview; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestReviewComment; @@ -35,8 +35,8 @@ public function __construct(private Routers $routers) { } - /** @return |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 + /** @return |Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\BasicError */ + public function call(string $call, array $params, array $pathChunks): Ok|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\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') { @@ -51,6 +51,16 @@ public function call(string $call, array $params, array $pathChunks): Ok|Json|Wi } } } + } elseif ($pathChunks[3] === 'code-security') { + if ($pathChunks[4] === 'configurations') { + if ($pathChunks[5] === '{configuration_id}') { + if ($pathChunks[6] === 'attach') { + if ($call === 'POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach') { + return $this->routers->internal🔀Router🔀Post🔀CodeSecurity()->attachEnterpriseConfiguration($params); + } + } + } + } } } } elseif ($pathChunks[1] === 'orgs') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/CodeSecurity.php index 08d2ef70804..c79edaf08ea 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/CodeSecurity.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/CodeSecurity.php @@ -5,7 +5,8 @@ namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Router\Put; use ApiClients\Client\GitHubEnterpriseCloud\Internal; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use InvalidArgumentException; use League\OpenAPIValidation\Schema\SchemaValidator; @@ -19,8 +20,27 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return */ - public function setConfigurationAsDefault(array $params): Ok + public function setConfigurationAsDefaultForEnterprise(array $params): Ok + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + 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\SetConfigurationAsDefaultForEnterprise($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀ConfigurationId🌀Defaults()); + + return $operator->call($arguments['enterprise'], $arguments['configuration_id'], $params); + } + + public function setConfigurationAsDefault(array $params): Json { $arguments = []; if (array_key_exists('org', $params) === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php index 388da3e0ce3..1611c2a5c17 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Put/Seven.php @@ -8,8 +8,8 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError; use ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject; use ApiClients\Client\GitHubEnterpriseCloud\Schema\GroupResponse; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListLabelsForSelfHostedRunnerForEnterprise\Response\ApplicationJson\Ok; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranch; use ApiClients\Client\GitHubEnterpriseCloud\Schema\PullRequestMergeResult; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser; @@ -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|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok|TeamMembership|ProtectedBranch|iterable|BasicError|PullRequestMergeResult|Json|GroupResponse|UserResponse|ScimUser + /** @return |Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|Observable|Schema\BasicError */ + public function call(string $call, array $params, array $pathChunks): WithoutBody|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|EmptyObject|Json|TeamMembership|ProtectedBranch|iterable|BasicError|PullRequestMergeResult|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|GroupResponse|UserResponse|ScimUser { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -68,6 +68,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 /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults') { + return $this->routers->internal🔀Router🔀Put🔀CodeSecurity()->setConfigurationAsDefaultForEnterprise($params); + } + } + } + } } } } elseif ($pathChunks[1] === 'orgs') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Routers.php b/clients/GitHubEnterpriseCloud/src/Internal/Routers.php index fdf16c73939..54bb610ea5d 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Routers.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Routers.php @@ -37,10 +37,10 @@ final class Routers private Internal\Router\Get\AnnouncementBanners|null $internal🔀Router🔀Get🔀AnnouncementBanners = null; private Internal\Router\Get\SecretScanning|null $internal🔀Router🔀Get🔀SecretScanning = null; private Internal\Router\Get\CodeScanning|null $internal🔀Router🔀Get🔀CodeScanning = null; + private Internal\Router\Get\CodeSecurity|null $internal🔀Router🔀Get🔀CodeSecurity = null; 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\ApiInsights|null $internal🔀Router🔀Get🔀ApiInsights = null; @@ -85,8 +85,8 @@ final class Routers private Internal\Router\Patch\Codespaces|null $internal🔀Router🔀Patch🔀Codespaces = null; 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\Actions|null $internal🔀Router🔀Patch🔀Actions = 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; @@ -157,8 +157,8 @@ final class Routers private Internal\Router\Put\Migrations|null $internal🔀Router🔀Put🔀Migrations = null; 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\Oidc|null $internal🔀Router🔀Put🔀Oidc = 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; @@ -407,6 +407,15 @@ public function internal🔀Router🔀Get🔀CodeScanning(): Internal\Router\Get return $this->internal🔀Router🔀Get🔀CodeScanning; } + 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🔀Copilot(): Internal\Router\Get\Copilot { if ($this->internal🔀Router🔀Get🔀Copilot instanceof Internal\Router\Get\Copilot === false) { @@ -434,15 +443,6 @@ 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) { @@ -839,22 +839,22 @@ public function internal🔀Router🔀Patch🔀EnterpriseAdmin(): Internal\Route return $this->internal🔀Router🔀Patch🔀EnterpriseAdmin; } - public function internal🔀Router🔀Patch🔀Actions(): Internal\Router\Patch\Actions + public function internal🔀Router🔀Patch🔀CodeSecurity(): Internal\Router\Patch\CodeSecurity { - if ($this->internal🔀Router🔀Patch🔀Actions instanceof Internal\Router\Patch\Actions === false) { - $this->internal🔀Router🔀Patch🔀Actions = new Internal\Router\Patch\Actions(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + 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🔀Actions; + return $this->internal🔀Router🔀Patch🔀CodeSecurity; } - public function internal🔀Router🔀Patch🔀CodeSecurity(): Internal\Router\Patch\CodeSecurity + public function internal🔀Router🔀Patch🔀Actions(): Internal\Router\Patch\Actions { - 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); + if ($this->internal🔀Router🔀Patch🔀Actions instanceof Internal\Router\Patch\Actions === false) { + $this->internal🔀Router🔀Patch🔀Actions = new Internal\Router\Patch\Actions(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); } - return $this->internal🔀Router🔀Patch🔀CodeSecurity; + return $this->internal🔀Router🔀Patch🔀Actions; } public function internal🔀Router🔀Patch🔀Orgs(): Internal\Router\Patch\Orgs @@ -1487,22 +1487,22 @@ public function internal🔀Router🔀Put🔀Teams(): Internal\Router\Put\Teams return $this->internal🔀Router🔀Put🔀Teams; } - public function internal🔀Router🔀Put🔀Oidc(): Internal\Router\Put\Oidc + public function internal🔀Router🔀Put🔀CodeSecurity(): Internal\Router\Put\CodeSecurity { - if ($this->internal🔀Router🔀Put🔀Oidc instanceof Internal\Router\Put\Oidc === false) { - $this->internal🔀Router🔀Put🔀Oidc = new Internal\Router\Put\Oidc(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); + 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🔀Oidc; + return $this->internal🔀Router🔀Put🔀CodeSecurity; } - public function internal🔀Router🔀Put🔀CodeSecurity(): Internal\Router\Put\CodeSecurity + public function internal🔀Router🔀Put🔀Oidc(): Internal\Router\Put\Oidc { - 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); + if ($this->internal🔀Router🔀Put🔀Oidc instanceof Internal\Router\Put\Oidc === false) { + $this->internal🔀Router🔀Put🔀Oidc = new Internal\Router\Put\Oidc(browser: $this->browser, authentication: $this->authentication, requestSchemaValidator: $this->requestSchemaValidator, responseSchemaValidator: $this->responseSchemaValidator, hydrators: $this->hydrators); } - return $this->internal🔀Router🔀Put🔀CodeSecurity; + return $this->internal🔀Router🔀Put🔀Oidc; } public function internal🔀Router🔀Put🔀Dependabot(): Internal\Router\Put\Dependabot diff --git a/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php b/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php index 0d0ab9d28ba..27ad8114294 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php @@ -9,6 +9,8 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAlert; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysisDeletion; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofix; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAutofixCommitsResponse; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningCodeqlDatabase; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetup; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse; @@ -73,6 +75,21 @@ public function updateAlert(string $owner, string $repo, int $alertNumber, array return $this->operators->codeScanning👷UpdateAlert()->call($owner, $repo, $alertNumber, $params); } + public function getAutofix(string $owner, string $repo, int $alertNumber): CodeScanningAutofix + { + return $this->operators->codeScanning👷GetAutofix()->call($owner, $repo, $alertNumber); + } + + public function createAutofix(string $owner, string $repo, int $alertNumber): CodeScanningAutofix|WithoutBody + { + return $this->operators->codeScanning👷CreateAutofix()->call($owner, $repo, $alertNumber); + } + + public function commitAutofix(string $owner, string $repo, int $alertNumber, array $params): CodeScanningAutofixCommitsResponse|WithoutBody + { + return $this->operators->codeScanning👷CommitAutofix()->call($owner, $repo, $alertNumber, $params); + } + /** @return Observable */ public function listAlertInstances(string $owner, string $repo, int $alertNumber, string $ref, int $pr, int $page, int $perPage): iterable { diff --git a/clients/GitHubEnterpriseCloud/src/Operation/CodeSecurity.php b/clients/GitHubEnterpriseCloud/src/Operation/CodeSecurity.php index 4744c1c904a..9e58ce8452d 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/CodeSecurity.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/CodeSecurity.php @@ -8,8 +8,8 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfiguration; use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeSecurityConfigurationForRepository; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json; -use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; final class CodeSecurity @@ -18,6 +18,54 @@ public function __construct(private Internal\Operators $operators) { } + /** @return iterable */ + public function getConfigurationsForEnterprise(string $enterprise, string $before, string $after, int $perPage): iterable + { + return $this->operators->codeSecurity👷GetConfigurationsForEnterprise()->call($enterprise, $before, $after, $perPage); + } + + public function createConfigurationForEnterprise(string $enterprise, array $params): CodeSecurityConfiguration + { + return $this->operators->codeSecurity👷CreateConfigurationForEnterprise()->call($enterprise, $params); + } + + /** @return iterable */ + public function getDefaultConfigurationsForEnterprise(string $enterprise): iterable + { + return $this->operators->codeSecurity👷GetDefaultConfigurationsForEnterprise()->call($enterprise); + } + + public function getSingleConfigurationForEnterprise(string $enterprise, int $configurationId): CodeSecurityConfiguration|WithoutBody + { + return $this->operators->codeSecurity👷GetSingleConfigurationForEnterprise()->call($enterprise, $configurationId); + } + + public function deleteConfigurationForEnterprise(string $enterprise, int $configurationId): WithoutBody + { + return $this->operators->codeSecurity👷DeleteConfigurationForEnterprise()->call($enterprise, $configurationId); + } + + public function updateEnterpriseConfiguration(string $enterprise, int $configurationId, array $params): CodeSecurityConfiguration|WithoutBody + { + return $this->operators->codeSecurity👷UpdateEnterpriseConfiguration()->call($enterprise, $configurationId, $params); + } + + public function attachEnterpriseConfiguration(string $enterprise, int $configurationId, array $params): Json + { + return $this->operators->codeSecurity👷AttachEnterpriseConfiguration()->call($enterprise, $configurationId, $params); + } + + public function setConfigurationAsDefaultForEnterprise(string $enterprise, int $configurationId, array $params): Ok + { + return $this->operators->codeSecurity👷SetConfigurationAsDefaultForEnterprise()->call($enterprise, $configurationId, $params); + } + + /** @return iterable */ + public function getRepositoriesForEnterpriseConfiguration(string $enterprise, int $configurationId, string $before, string $after, int $perPage, string $status): iterable + { + return $this->operators->codeSecurity👷GetRepositoriesForEnterpriseConfiguration()->call($enterprise, $configurationId, $before, $after, $perPage, $status); + } + /** @return Observable */ public function getConfigurationsForOrg(string $org, string $before, string $after, string $targetType, int $perPage): iterable { @@ -61,13 +109,12 @@ public function updateConfiguration(string $org, int $configurationId, array $pa } /** @return */ - public function attachConfiguration(string $org, int $configurationId, array $params): Json + public function attachConfiguration(string $org, int $configurationId, array $params): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json { return $this->operators->codeSecurity👷AttachConfiguration()->call($org, $configurationId, $params); } - /** @return */ - public function setConfigurationAsDefault(string $org, int $configurationId, array $params): Ok + public function setConfigurationAsDefault(string $org, int $configurationId, array $params): \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json { return $this->operators->codeSecurity👷SetConfigurationAsDefault()->call($org, $configurationId, $params); } diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php index 2eb0f9241f3..1169f99199c 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php @@ -97,6 +97,18 @@ public function unblockUser(string $org, string $username): WithoutBody return $this->operators->orgs👷UnblockUser()->call($org, $username); } + /** @return iterable */ + public function listPushBypassRequests(string $org, string $repositoryName, string $reviewer, string $requester, string $timePeriod, string $requestStatus, int $perPage, int $page): iterable + { + return $this->operators->orgs👷ListPushBypassRequests()->call($org, $repositoryName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + } + + /** @return iterable */ + public function listPushBypassRequestsListing(string $org, string $repositoryName, string $reviewer, string $requester, string $timePeriod, string $requestStatus, int $perPage, int $page): iterable + { + return $this->operators->orgs👷ListPushBypassRequestsListing()->call($org, $repositoryName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + } + /** @return Observable */ public function listSamlSsoAuthorizations(string $org, int $page, string $login, int $perPage): iterable { diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php index 2e6611a776b..65a9458712d 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Repos.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Repos.php @@ -50,6 +50,7 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranch; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchAdminEnforced; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ProtectedBranchPullRequestReview; +use ApiClients\Client\GitHubEnterpriseCloud\Schema\PushRuleBypassRequest; use ApiClients\Client\GitHubEnterpriseCloud\Schema\Release; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseAsset; use ApiClients\Client\GitHubEnterpriseCloud\Schema\ReleaseNotesContent; @@ -467,6 +468,23 @@ public function renameBranch(string $owner, string $repo, string $branch, array return $this->operators->repos👷RenameBranch()->call($owner, $repo, $branch, $params); } + /** @return iterable */ + public function listRepoPushBypassRequests(string $owner, string $repo, string $reviewer, string $requester, string $timePeriod, string $requestStatus, int $perPage, int $page): iterable + { + return $this->operators->repos👷ListRepoPushBypassRequests()->call($owner, $repo, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + } + + /** @return iterable */ + public function listRepoPushBypassRequestsListing(string $owner, string $repo, string $reviewer, string $requester, string $timePeriod, string $requestStatus, int $perPage, int $page): iterable + { + return $this->operators->repos👷ListRepoPushBypassRequestsListing()->call($owner, $repo, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + } + + public function getRepoPushBypassRequest(string $owner, string $repo, int $bypassRequestNumber): PushRuleBypassRequest + { + return $this->operators->repos👷GetRepoPushBypassRequest()->call($owner, $repo, $bypassRequestNumber); + } + /** @return */ public function codeownersErrors(string $owner, string $repo, string $ref): CodeownersErrors|WithoutBody { diff --git a/clients/GitHubEnterpriseCloud/src/Operations.php b/clients/GitHubEnterpriseCloud/src/Operations.php index 17cc9021f82..686d284d941 100644 --- a/clients/GitHubEnterpriseCloud/src/Operations.php +++ b/clients/GitHubEnterpriseCloud/src/Operations.php @@ -60,6 +60,11 @@ public function codeScanning(): Operation\CodeScanning return new Operation\CodeScanning($this->operators); } + public function codeSecurity(): Operation\CodeSecurity + { + return new Operation\CodeSecurity($this->operators); + } + public function secretScanning(): Operation\SecretScanning { return new Operation\SecretScanning($this->operators); @@ -125,11 +130,6 @@ 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 39d1cf50fe5..0be2831944c 100644 --- a/clients/GitHubEnterpriseCloud/src/OperationsInterface.php +++ b/clients/GitHubEnterpriseCloud/src/OperationsInterface.php @@ -26,6 +26,8 @@ public function announcementBanners(): Operation\AnnouncementBanners; public function codeScanning(): Operation\CodeScanning; + public function codeSecurity(): Operation\CodeSecurity; + public function secretScanning(): Operation\SecretScanning; public function copilot(): Operation\Copilot; @@ -52,8 +54,6 @@ 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 71c50610a09..22192c73b52 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -395,6 +395,42 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve('Observable'); } + if ($call === 'GET /enterprises/{enterprise}/code-security/configurations') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'POST /enterprises/{enterprise}/code-security/configurations') { + return $this->typeResolver->resolve('Schema\\CodeSecurityConfiguration'); + } + + if ($call === 'GET /enterprises/{enterprise}/code-security/configurations/defaults') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}') { + return $this->typeResolver->resolve('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}') { + return $this->typeResolver->resolve('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}') { + return $this->typeResolver->resolve('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach') { + return $this->typeResolver->resolve('Schema\\Operations\\CodeSecurity\\AttachEnterpriseConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json'); + } + + if ($call === 'PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults') { + return $this->typeResolver->resolve('Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefaultForEnterprise\\Response\\ApplicationJson\\Ok'); + } + + if ($call === 'GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories') { + return $this->typeResolver->resolve('iterable'); + } + if ($call === 'GET /enterprises/{enterprise}/code_security_and_analysis') { return $this->typeResolver->resolve(''); } @@ -1067,6 +1103,14 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /orgs/{org}/bypass-requests/push-rules') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'LIST /orgs/{org}/bypass-requests/push-rules') { + return $this->typeResolver->resolve('iterable'); + } + if ($call === 'GET /orgs/{org}/code-scanning/alerts') { return $this->typeResolver->resolve('Observable'); } @@ -1108,7 +1152,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok\\Application\\Json'); } if ($call === 'GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories') { @@ -2715,6 +2759,18 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /repos/{owner}/{repo}/bypass-requests/push-rules') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'LIST /repos/{owner}/{repo}/bypass-requests/push-rules') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'GET /repos/{owner}/{repo}/bypass-requests/push-rules/{bypass_request_number}') { + return $this->typeResolver->resolve('Schema\\PushRuleBypassRequest'); + } + if ($call === 'POST /repos/{owner}/{repo}/check-runs') { return $this->typeResolver->resolve(''); } @@ -2775,6 +2831,18 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix') { + return $this->typeResolver->resolve('Schema\\CodeScanningAutofix'); + } + + if ($call === 'POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix') { + return $this->typeResolver->resolve('Schema\\CodeScanningAutofix|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + + if ($call === 'POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits') { + return $this->typeResolver->resolve('Schema\\CodeScanningAutofixCommitsResponse|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + } + if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances') { return $this->typeResolver->resolve('Observable'); } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet07CEC6F7/Tiet1DE9A5A0/Tiet17BD6D01/Tiet0890CA07.php b/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet07CEC6F7/Tiet1DE9A5A0/Tiet17BD6D01/Tiet0890CA07.php new file mode 100644 index 00000000000..1452ec096b4 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet07CEC6F7/Tiet1DE9A5A0/Tiet17BD6D01/Tiet0890CA07.php @@ -0,0 +1,313 @@ + 'application/json'], json_encode(json_decode(Schema\CodeScanningAutofixCommitsResponse::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', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CommitAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanningAutofixCommits::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\CodeScanningAutofixCommitsResponse::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', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->commitAutofix('generated', 'generated', 12, json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_400_requestContentType_application_json_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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CommitAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_400_requestContentType_application_json_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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->commitAutofix('generated', 'generated', 12, json_decode(Schema\CodeScanningAutofixCommits::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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CommitAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanningAutofixCommits::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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->commitAutofix('generated', 'generated', 12, json_decode(Schema\CodeScanningAutofixCommits::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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CommitAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanningAutofixCommits::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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->commitAutofix('generated', 'generated', 12, json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_503_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CommitAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_503_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->commitAutofix('generated', 'generated', 12, json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_422_requestContentType_application_json_empty(): void + { + $response = new Response(422, []); + $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', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CommitAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_422_requestContentType_application_json_empty(): void + { + $response = new Response(422, []); + $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', '/repos/generated/generated/code-scanning/alerts/12/autofix/commits', Argument::type('array'), json_encode(json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->commitAutofix('generated', 'generated', 12, json_decode(Schema\CodeScanningAutofixCommits::SCHEMA_EXAMPLE_DATA, true)); + self::assertArrayHasKey('code', $result); + self::assertSame(422, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/CreateAutofixTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/CreateAutofixTest.php new file mode 100644 index 00000000000..738408ca4bf --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/CreateAutofixTest.php @@ -0,0 +1,271 @@ + 'application/json'], json_encode(json_decode(Schema\CodeScanningAutofix::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CreateAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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\CodeScanningAutofix::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->createAutofix('generated', 'generated', 12); + } + + /** @test */ + public function call_httpCode_202_responseContentType_application_json_zero(): void + { + $response = new Response(202, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CodeScanningAutofix::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CreateAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_202_responseContentType_application_json_zero(): void + { + $response = new Response(202, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\CodeScanningAutofix::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->createAutofix('generated', 'generated', 12); + } + + /** @test */ + public function call_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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CreateAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->createAutofix('generated', 'generated', 12); + } + + /** @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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CreateAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->createAutofix('generated', 'generated', 12); + } + + /** @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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CreateAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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('POST', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->createAutofix('generated', 'generated', 12); + } + + /** @test */ + public function call_httpCode_503_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CreateAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_503_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->createAutofix('generated', 'generated', 12); + } + + /** @test */ + public function call_httpCode_422_empty(): void + { + $response = new Response(422, []); + $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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\CreateAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_422_empty(): void + { + $response = new Response(422, []); + $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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->createAutofix('generated', 'generated', 12); + self::assertArrayHasKey('code', $result); + self::assertSame(422, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/GetAutofixTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/GetAutofixTest.php new file mode 100644 index 00000000000..0094466ed72 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeScanning/GetAutofixTest.php @@ -0,0 +1,201 @@ + 'application/json'], json_encode(json_decode(Schema\CodeScanningAutofix::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\GetAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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\CodeScanningAutofix::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->getAutofix('generated', 'generated', 12); + } + + /** @test */ + public function call_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('GET', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\GetAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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('GET', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->getAutofix('generated', 'generated', 12); + } + + /** @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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\GetAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->getAutofix('generated', 'generated', 12); + } + + /** @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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\GetAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + 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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->getAutofix('generated', 'generated', 12); + } + + /** @test */ + public function call_httpCode_503_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\GetAutofix::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_503_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class); + $response = new Response(503, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::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', '/repos/generated/generated/code-scanning/alerts/12/autofix', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->getAutofix('generated', 'generated', 12); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/AttachEnterpriseConfigurationTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/AttachEnterpriseConfigurationTest.php new file mode 100644 index 00000000000..af16417a187 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/AttachEnterpriseConfigurationTest.php @@ -0,0 +1,161 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\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', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\AttachEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\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\AttachEnterpriseConfiguration\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', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->attachEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\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('POST', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\AttachEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\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('POST', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->attachEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\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('POST', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\AttachEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\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('POST', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->attachEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_409_requestContentType_application_json_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('POST', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\AttachEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_409_requestContentType_application_json_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('POST', '/enterprises/generated/code-security/configurations/16/attach', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->attachEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\AttachEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/CreateConfigurationForEnterpriseTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/CreateConfigurationForEnterpriseTest.php new file mode 100644 index 00000000000..0ffe9771b34 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/CreateConfigurationForEnterpriseTest.php @@ -0,0 +1,191 @@ + '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', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\CreateConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + + return $data; + })(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\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', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->createConfigurationForEnterprise('generated', json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_400_requestContentType_application_json_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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\CreateConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + + return $data; + })(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_400_requestContentType_application_json_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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->createConfigurationForEnterprise('generated', json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_400_requestContentType_application_json_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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\CreateConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + + return $data; + })(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_400_requestContentType_application_json_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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->createConfigurationForEnterprise('generated', json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\CreateConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + + return $data; + })(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->createConfigurationForEnterprise('generated', json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\CreateConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + + return $data; + })(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\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('POST', '/enterprises/generated/code-security/configurations', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->createConfigurationForEnterprise('generated', json_decode(Schema\CodeSecurity\CreateConfigurationForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterpriseTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterpriseTest.php new file mode 100644 index 00000000000..4c72b70dc9b --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/DeleteConfigurationForEnterpriseTest.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', '/enterprises/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\DeleteConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->deleteConfigurationForEnterprise('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', '/enterprises/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\DeleteConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->deleteConfigurationForEnterprise('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', '/enterprises/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\DeleteConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->deleteConfigurationForEnterprise('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', '/enterprises/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\DeleteConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->deleteConfigurationForEnterprise('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', '/enterprises/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\DeleteConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->deleteConfigurationForEnterprise('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', '/enterprises/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\DeleteConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->deleteConfigurationForEnterprise('generated', 16); + self::assertArrayHasKey('code', $result); + self::assertSame(204, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationsForEnterpriseTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationsForEnterpriseTest.php new file mode 100644 index 00000000000..1f35f0b81f7 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetConfigurationsForEnterpriseTest.php @@ -0,0 +1,97 @@ + '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', '/enterprises/generated/code-security/configurations?before=generated&after=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\GetConfigurationsForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['before'] = 'generated'; + $data['after'] = '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', '/enterprises/generated/code-security/configurations?before=generated&after=generated&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfigurationsForEnterprise('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', '/enterprises/generated/code-security/configurations?before=generated&after=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\GetConfigurationsForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['before'] = 'generated'; + $data['after'] = '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', '/enterprises/generated/code-security/configurations?before=generated&after=generated&per_page=8', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->getConfigurationsForEnterprise('generated', 'generated', 'generated', 8); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetDefaultConfigurationsForEnterpriseTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetDefaultConfigurationsForEnterpriseTest.php new file mode 100644 index 00000000000..1d2862826d9 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetDefaultConfigurationsForEnterpriseTest.php @@ -0,0 +1,12 @@ + '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', '/enterprises/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\GetRepositoriesForEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->getRepositoriesForEnterpriseConfiguration('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', '/enterprises/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\GetRepositoriesForEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->getRepositoriesForEnterpriseConfiguration('generated', 16, 'generated', 'generated', 8, 'generated'); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetSingleConfigurationForEnterpriseTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetSingleConfigurationForEnterpriseTest.php new file mode 100644 index 00000000000..ced5da895c3 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/GetSingleConfigurationForEnterpriseTest.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', '/enterprises/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\GetSingleConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->getSingleConfigurationForEnterprise('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', '/enterprises/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\GetSingleConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->getSingleConfigurationForEnterprise('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', '/enterprises/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\GetSingleConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->getSingleConfigurationForEnterprise('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', '/enterprises/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\GetSingleConfigurationForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = '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', '/enterprises/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()->getSingleConfigurationForEnterprise('generated', 16); + self::assertArrayHasKey('code', $result); + self::assertSame(304, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterpriseTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterpriseTest.php new file mode 100644 index 00000000000..7062aea93c0 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultForEnterpriseTest.php @@ -0,0 +1,126 @@ + 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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', '/enterprises/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\SetConfigurationAsDefaultForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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\SetConfigurationAsDefaultForEnterprise\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', '/enterprises/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->setConfigurationAsDefaultForEnterprise('generated', 16, json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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', '/enterprises/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\SetConfigurationAsDefaultForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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', '/enterprises/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->setConfigurationAsDefaultForEnterprise('generated', 16, json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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', '/enterprises/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\SetConfigurationAsDefaultForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\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', '/enterprises/generated/code-security/configurations/16/defaults', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->setConfigurationAsDefaultForEnterprise('generated', 16, json_decode(Schema\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultTest.php index fe61fda598c..73a2fb2eb7f 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/SetConfigurationAsDefaultTest.php @@ -24,7 +24,7 @@ final class SetConfigurationAsDefaultTest extends AsyncTestCase /** @test */ public function call_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))); + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json::SCHEMA_EXAMPLE_DATA, true))); $auth = $this->prophesize(AuthenticationInterface::class); $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); $browser = $this->prophesize(Browser::class); @@ -43,7 +43,7 @@ public function call_httpCode_200_requestContentType_application_json_responseCo /** @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))); + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json::SCHEMA_EXAMPLE_DATA, true))); $auth = $this->prophesize(AuthenticationInterface::class); $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); $browser = $this->prophesize(Browser::class); diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/UpdateEnterpriseConfigurationTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/UpdateEnterpriseConfigurationTest.php new file mode 100644 index 00000000000..fc3872db16b --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/CodeSecurity/UpdateEnterpriseConfigurationTest.php @@ -0,0 +1,196 @@ + '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', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\UpdateEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\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', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->updateEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\UpdateEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->updateEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\UpdateEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->updateEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_409_requestContentType_application_json_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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\UpdateEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_409_requestContentType_application_json_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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->updateEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_304_requestContentType_application_json_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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeSecurity\UpdateEnterpriseConfiguration::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['configuration_id'] = 16; + + return $data; + })(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_304_requestContentType_application_json_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('PATCH', '/enterprises/generated/code-security/configurations/16', Argument::type('array'), json_encode(json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeSecurity()->updateEnterpriseConfiguration('generated', 16, json_decode(Schema\CodeSecurity\UpdateEnterpriseConfiguration\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + self::assertArrayHasKey('code', $result); + self::assertSame(304, $result['code']); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsListingTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsListingTest.php new file mode 100644 index 00000000000..1513d337d4c --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsListingTest.php @@ -0,0 +1,113 @@ + '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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\ListPushBypassRequestsListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['repository_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->listPushBypassRequestsListing('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\ListPushBypassRequestsListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['repository_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->listPushBypassRequestsListing('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + foreach ($result as $item) { + } + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsTest.php new file mode 100644 index 00000000000..cf537bc54b1 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/ListPushBypassRequestsTest.php @@ -0,0 +1,105 @@ + '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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\ListPushBypassRequests::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['repository_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + 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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->listPushBypassRequests('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\ListPushBypassRequests::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['repository_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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/bypass-requests/push-rules?repository_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->listPushBypassRequests('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/GetRepoPushBypassRequestTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/GetRepoPushBypassRequestTest.php new file mode 100644 index 00000000000..56281b56346 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/GetRepoPushBypassRequestTest.php @@ -0,0 +1,129 @@ + 'application/json'], json_encode(json_decode(Schema\PushRuleBypassRequest::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', '/repos/generated/generated/bypass-requests/push-rules/21', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoPushBypassRequest::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['bypass_request_number'] = 21; + + 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\PushRuleBypassRequest::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', '/repos/generated/generated/bypass-requests/push-rules/21', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoPushBypassRequest('generated', 'generated', 21); + } + + /** @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', '/repos/generated/generated/bypass-requests/push-rules/21', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoPushBypassRequest::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['bypass_request_number'] = 21; + + 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', '/repos/generated/generated/bypass-requests/push-rules/21', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoPushBypassRequest('generated', 'generated', 21); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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', '/repos/generated/generated/bypass-requests/push-rules/21', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoPushBypassRequest::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['bypass_request_number'] = 21; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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', '/repos/generated/generated/bypass-requests/push-rules/21', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoPushBypassRequest('generated', 'generated', 21); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsListingTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsListingTest.php new file mode 100644 index 00000000000..7aa7850b68e --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsListingTest.php @@ -0,0 +1,113 @@ + '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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\ListRepoPushBypassRequestsListing::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->listRepoPushBypassRequestsListing('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\ListRepoPushBypassRequestsListing::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->listRepoPushBypassRequestsListing('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + foreach ($result as $item) { + } + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsTest.php new file mode 100644 index 00000000000..d7aca02df6d --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Repos/ListRepoPushBypassRequestsTest.php @@ -0,0 +1,105 @@ + '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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\ListRepoPushBypassRequests::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + 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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->listRepoPushBypassRequests('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\ListRepoPushBypassRequests::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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', '/repos/generated/generated/bypass-requests/push-rules?reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->listRepoPushBypassRequests('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index bb4f9d2f77c..9fb1f0e2791 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -105,6 +105,15 @@ function authHeader(): string assertType('', $client->call('DELETE /enterprises/{enterprise}/audit-log/streams/{stream_id}')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/code-scanning/alerts')); assertType('Observable', $client->call('LIST /enterprises/{enterprise}/code-scanning/alerts')); +assertType('iterable', $client->call('GET /enterprises/{enterprise}/code-security/configurations')); +assertType('Schema\\CodeSecurityConfiguration', $client->call('POST /enterprises/{enterprise}/code-security/configurations')); +assertType('iterable', $client->call('GET /enterprises/{enterprise}/code-security/configurations/defaults')); +assertType('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}')); +assertType('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}')); +assertType('Schema\\CodeSecurityConfiguration|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}')); +assertType('Schema\\Operations\\CodeSecurity\\AttachEnterpriseConfiguration\\Response\\ApplicationJson\\Accepted\\Application\\Json', $client->call('POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach')); +assertType('Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefaultForEnterprise\\Response\\ApplicationJson\\Ok', $client->call('PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults')); +assertType('iterable', $client->call('GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories')); 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')); @@ -273,6 +282,8 @@ function authHeader(): string assertType('', $client->call('GET /orgs/{org}/blocks/{username}')); assertType('', $client->call('PUT /orgs/{org}/blocks/{username}')); assertType('', $client->call('DELETE /orgs/{org}/blocks/{username}')); +assertType('iterable', $client->call('GET /orgs/{org}/bypass-requests/push-rules')); +assertType('iterable', $client->call('LIST /orgs/{org}/bypass-requests/push-rules')); assertType('Observable', $client->call('GET /orgs/{org}/code-scanning/alerts')); assertType('Observable', $client->call('LIST /orgs/{org}/code-scanning/alerts')); assertType('Observable', $client->call('GET /orgs/{org}/code-security/configurations')); @@ -283,7 +294,7 @@ function authHeader(): string assertType('', $client->call('DELETE /orgs/{org}/code-security/configurations/{configuration_id}')); assertType('', $client->call('PATCH /orgs/{org}/code-security/configurations/{configuration_id}')); assertType('', $client->call('POST /orgs/{org}/code-security/configurations/{configuration_id}/attach')); -assertType('', $client->call('PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults')); +assertType('Schema\\Operations\\CodeSecurity\\SetConfigurationAsDefault\\Response\\ApplicationJson\\Ok\\Application\\Json', $client->call('PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults')); assertType('Observable', $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')); @@ -685,6 +696,9 @@ function authHeader(): string assertType('Observable', $client->call('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users')); assertType('Observable', $client->call('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users')); assertType('', $client->call('POST /repos/{owner}/{repo}/branches/{branch}/rename')); +assertType('iterable', $client->call('GET /repos/{owner}/{repo}/bypass-requests/push-rules')); +assertType('iterable', $client->call('LIST /repos/{owner}/{repo}/bypass-requests/push-rules')); +assertType('Schema\\PushRuleBypassRequest', $client->call('GET /repos/{owner}/{repo}/bypass-requests/push-rules/{bypass_request_number}')); assertType('', $client->call('POST /repos/{owner}/{repo}/check-runs')); assertType('', $client->call('GET /repos/{owner}/{repo}/check-runs/{check_run_id}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}')); @@ -700,6 +714,9 @@ function authHeader(): string assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); +assertType('Schema\\CodeScanningAutofix', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix')); +assertType('Schema\\CodeScanningAutofix|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix')); +assertType('Schema\\CodeScanningAutofixCommitsResponse|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances')); assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/code-scanning/analyses')); diff --git a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index 66ded8167f4..3877146a94e 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -3341,6 +3341,685 @@ paths: previews: [] category: code-scanning subcategory: code-scanning + "/enterprises/{enterprise}/code-security/configurations": + get: + summary: Get code security configurations for an enterprise + description: |- + Lists all code security configurations available in an enterprise. + + The authenticated user must be an administrator of the enterprise in order to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-configurations-for-enterprise + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-code-security-configurations-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - 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/enterprise-code-security-configuration-list" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: code-security + subcategory: configurations + post: + summary: Create a code security configuration for an enterprise + description: |- + Creates a code security configuration in an enterprise. + + The authenticated user must be an administrator of the enterprise in order to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/create-configuration-for-enterprise + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#create-a-code-security-configuration-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + 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 enterprise. + 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 + dependency_graph_autosubmit_action: + type: string + description: The enablement status of Automatic dependency submission + enum: + - enabled + - disabled + - not_set + default: disabled + dependency_graph_autosubmit_action_options: + type: object + description: Feature options for Automatic dependency submission + properties: + labeled_runners: + type: boolean + description: Whether to use runners labeled with 'dependency-submission' + or standard GitHub runners. + default: false + 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 + code_scanning_default_setup_options: + "$ref": "#/components/schemas/code-scanning-default-setup-options" + 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 + secret_scanning_validity_checks: + type: string + description: The enablement status of secret scanning validity checks + enum: + - enabled + - disabled + - not_set + default: disabled + secret_scanning_non_provider_patterns: + type: string + description: The enablement status of secret scanning non provider + patterns + 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 + enforcement: + type: string + description: The enforcement status for a security configuration + enum: + - enforced + - unenforced + default: enforced + required: + - name + - description + examples: + default: + summary: Example for a code security configuration + value: + name: High rish settings + description: This is a code security configuration for octo-enterprise + 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/enterprise-code-security-configuration" + '400': + "$ref": "#/components/responses/bad_request" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: code-security + subcategory: configurations + "/enterprises/{enterprise}/code-security/configurations/defaults": + get: + summary: Get default code security configurations for an enterprise + description: |- + Lists the default code security configurations for an enterprise. + + The authenticated user must be an administrator of the enterprise in order to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-default-configurations-for-enterprise + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-default-code-security-configurations-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-security-default-configurations" + examples: + default: + "$ref": "#/components/examples/code-security-default-configurations" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-security + subcategory: configurations + "/enterprises/{enterprise}/code-security/configurations/{configuration_id}": + get: + summary: Retrieve a code security configuration of an enterprise + description: |- + Gets a code security configuration available in an enterprise. + + The authenticated user must be an administrator of the enterprise in order to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-single-configuration-for-enterprise + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#retrieve-a-code-security-configuration-of-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/configuration-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-security-configuration" + examples: + default: + "$ref": "#/components/examples/enterprise-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: false + category: code-security + subcategory: configurations + patch: + summary: Update a custom code security configuration for an enterprise + description: |- + Updates a code security configuration in an enterprise. + + The authenticated user must be an administrator of the enterprise in order to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/update-enterprise-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#update-a-custom-code-security-configuration-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$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 across the enterprise. + 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. + Must be set to enabled if you want to enable any GHAS settings. + enum: + - enabled + - disabled + dependency_graph: + type: string + description: The enablement status of Dependency Graph + enum: + - enabled + - disabled + - not_set + dependency_graph_autosubmit_action: + type: string + description: The enablement status of Automatic dependency submission + enum: + - enabled + - disabled + - not_set + dependency_graph_autosubmit_action_options: + type: object + description: Feature options for Automatic dependency submission + properties: + labeled_runners: + type: boolean + description: Whether to use runners labeled with 'dependency-submission' + or standard GitHub runners. + 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 + code_scanning_default_setup_options: + "$ref": "#/components/schemas/code-scanning-default-setup-options" + 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 + secret_scanning_validity_checks: + type: string + description: The enablement status of secret scanning validity checks + enum: + - enabled + - disabled + - not_set + secret_scanning_non_provider_patterns: + type: string + description: The enablement status of secret scanning non-provider + patterns + enum: + - enabled + - disabled + - not_set + private_vulnerability_reporting: + type: string + description: The enablement status of private vulnerability reporting + enum: + - enabled + - disabled + - not_set + enforcement: + type: string + description: The enforcement status for a security configuration + enum: + - enforced + - unenforced + examples: + default: + summary: Example for updating a code security configuration + value: + name: octo-enterprise recommended settings v2 + secret_scanning: disabled + code_scanning_default_setup: enabled + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-security-configuration" + examples: + default: + "$ref": "#/components/examples/enterprise-code-security-configuration" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: code-security + subcategory: configurations + delete: + summary: Delete a code security configuration for an enterprise + description: |- + Deletes a code security configuration from an enterprise. + 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 for the enterprise to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/delete-configuration-for-enterprise + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#delete-a-code-security-configuration-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$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: false + category: code-security + subcategory: configurations + "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach": + post: + summary: Attach an enterprise configuration to repositories + description: |- + Attaches an enterprise code security configuration to 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 for the enterprise to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/attach-enterprise-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#attach-an-enterprise-configuration-to-repositories + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$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 + - all_without_configurations + required: + - scope + examples: + default: + summary: Example for attaching a configuration to some repositories + value: + scope: all + responses: + '202': + "$ref": "#/components/responses/accepted" + '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 + "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults": + put: + summary: Set a code security configuration as a default for an enterprise + description: |- + Sets a code security configuration as a default to be applied to new repositories in your enterprise. + + This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set. + + The authenticated user must be an administrator for the enterprise to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/set-configuration-as-default-for-enterprise + 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-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$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 + "/enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories": + get: + summary: Get repositories associated with an enterprise code security configuration + description: |- + Lists the repositories associated with an enterprise code security configuration in an organization. + + The authenticated user must be an administrator of the enterprise in order to use this endpoint. + + OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + tags: + - code-security + operationId: code-security/get-repositories-for-enterprise-configuration + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations#get-repositories-associated-with-an-enterprise-code-security-configuration + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$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`, `removed`, `enforced`, `failed`, `updating`, `removed_by_enterprise` + 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: false + category: code-security + subcategory: configurations "/enterprises/{enterprise}/code_security_and_analysis": get: summary: Get code security and analysis features for an enterprise @@ -9994,6 +10673,47 @@ paths: enabledForGitHubApps: true category: orgs subcategory: blocking + "/orgs/{org}/bypass-requests/push-rules": + get: + summary: List push rule bypass requests within an organization + description: Lists the requests made by users of a repository to bypass push + protection rules within an organization. + tags: + - orgs + operationId: orgs/list-push-bypass-requests + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/orgs/bypass-requests#list-push-rule-bypass-requests-within-an-organization + x-github: + githubCloudOnly: true + enabledForGitHubApps: true + category: orgs + subcategory: bypass-requests + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/repository-name-in-query" + - "$ref": "#/components/parameters/bypass-reviewer-name" + - "$ref": "#/components/parameters/bypass-requester-name" + - "$ref": "#/components/parameters/time-period" + - "$ref": "#/components/parameters/bypass-request-status" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/push-rule-bypass-request" + examples: + default: + "$ref": "#/components/examples/push-rule-bypass-request-items" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" "/orgs/{org}/code-scanning/alerts": get: summary: List code scanning alerts for an organization @@ -18142,11 +18862,8 @@ paths: get: summary: List security manager teams description: |- - Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-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 `read:org` scope to use this endpoint. + > [!WARNING] + > **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. tags: - orgs operationId: orgs/list-security-manager-teams @@ -18173,15 +18890,15 @@ paths: previews: [] category: orgs subcategory: security-managers + deprecationDate: '2024-12-01' + removalDate: '2026-01-01' + deprecated: true "/orgs/{org}/security-managers/teams/{team_slug}": put: summary: Add a security manager team description: |- - Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization." - - The authenticated user must be an administrator for the organization to use this endpoint. - - OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + > [!WARNING] + > **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. tags: - orgs operationId: orgs/add-security-manager-team @@ -18200,14 +18917,14 @@ paths: previews: [] category: orgs subcategory: security-managers + deprecationDate: '2024-12-01' + removalDate: '2026-01-01' + deprecated: true delete: summary: Remove a security manager team description: |- - Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization." - - The authenticated user must be an administrator for the organization to use this endpoint. - - OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + > [!WARNING] + > **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. tags: - orgs operationId: orgs/remove-security-manager-team @@ -18226,6 +18943,9 @@ paths: previews: [] category: orgs subcategory: security-managers + deprecationDate: '2024-12-01' + removalDate: '2026-01-01' + deprecated: true "/orgs/{org}/settings/billing/actions": get: summary: Get GitHub Actions billing for an organization @@ -27335,6 +28055,88 @@ paths: enabledForGitHubApps: true category: branches subcategory: branches + "/repos/{owner}/{repo}/bypass-requests/push-rules": + get: + summary: List repository push rule bypass requests + description: Lists the requests made by users of a repository to bypass push + protection rules + tags: + - repos + operationId: repos/list-repo-push-bypass-requests + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/repos/bypass-requests#list-repository-push-rule-bypass-requests + x-github: + githubCloudOnly: true + enabledForGitHubApps: true + category: repos + subcategory: bypass-requests + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/bypass-reviewer-name" + - "$ref": "#/components/parameters/bypass-requester-name" + - "$ref": "#/components/parameters/time-period" + - "$ref": "#/components/parameters/bypass-request-status" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/push-rule-bypass-request" + examples: + default: + "$ref": "#/components/examples/push-rule-bypass-request-items" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + "/repos/{owner}/{repo}/bypass-requests/push-rules/{bypass_request_number}": + get: + summary: Get a repository push bypass request + description: Get information about a request to bypass push protection rules + for a repository. + tags: + - repos + operationId: repos/get-repo-push-bypass-request + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/repos/bypass-requests#get-a-repository-push-bypass-request + x-github: + githubCloudOnly: true + enabledForGitHubApps: true + category: repos + subcategory: bypass-requests + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: bypass_request_number + in: path + required: true + schema: + type: integer + description: The number that identifies the bypass request within the context + of the given repository. + example: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/push-rule-bypass-request" + examples: + default: + "$ref": "#/components/examples/push-rule-bypass-request-item" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" "/repos/{owner}/{repo}/check-runs": post: summary: Create a check run @@ -28464,6 +29266,153 @@ paths: githubCloudOnly: false category: code-scanning subcategory: code-scanning + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix": + get: + summary: Get the status of an autofix for a code scanning alert + description: |- + Gets the status and description of an autofix for a code scanning alert. + + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-scanning + operationId: code-scanning/get-autofix + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#get-the-status-of-an-autofix-for-a-code-scanning-alert + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/alert-number" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-scanning-autofix" + examples: + default: + "$ref": "#/components/examples/code-scanning-autofix" + '400': + "$ref": "#/components/responses/code_scanning_bad_request" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-scanning + subcategory: code-scanning + post: + summary: Create an autofix for a code scanning alert + description: |- + Creates an autofix for a code scanning alert. + + If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response. + + If an autofix already exists for a given alert, then this endpoint will return a 200 OK response. + + OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-scanning + operationId: code-scanning/create-autofix + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#create-an-autofix-for-a-code-scanning-alert + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/alert-number" + responses: + '200': + description: OK + content: + application/json: + schema: + "$ref": "#/components/schemas/code-scanning-autofix" + examples: + default: + "$ref": "#/components/examples/code-scanning-autofix" + '202': + description: Accepted + content: + application/json: + schema: + "$ref": "#/components/schemas/code-scanning-autofix" + examples: + default: + "$ref": "#/components/examples/code-scanning-autofix-pending" + '400': + "$ref": "#/components/responses/code_scanning_bad_request" + '403': + "$ref": "#/components/responses/code_scanning_autofix_create_forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + description: Unprocessable Entity + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-scanning + subcategory: code-scanning + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits": + post: + summary: Commit an autofix for a code scanning alert + description: |- + Commits an autofix for a code scanning alert. + + If an autofix is commited as a result of this request, then this endpoint will return a 201 Created response. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + tags: + - code-scanning + operationId: code-scanning/commit-autofix + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/code-scanning/code-scanning#commit-an-autofix-for-a-code-scanning-alert + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/alert-number" + requestBody: + required: false + content: + application/json: + schema: + "$ref": "#/components/schemas/code-scanning-autofix-commits" + examples: + default: + "$ref": "#/components/examples/code-scanning-autofix-commits" + responses: + '201': + description: Created + content: + application/json: + schema: + "$ref": "#/components/schemas/code-scanning-autofix-commits-response" + examples: + default: + "$ref": "#/components/examples/code-scanning-autofix-commits-response" + '400': + "$ref": "#/components/responses/code_scanning_bad_request" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_write" + '404': + "$ref": "#/components/responses/not_found" + '422': + description: Unprocessable Entity + '503': + "$ref": "#/components/responses/service_unavailable" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: code-scanning + subcategory: code-scanning "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": get: summary: List instances of a code scanning alert @@ -76899,6 +77848,236 @@ components: - tool - most_recent_instance - repository + 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 + - enterprise + 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 + dependency_graph_autosubmit_action: + type: string + description: The enablement status of Automatic dependency submission + enum: + - enabled + - disabled + - not_set + dependency_graph_autosubmit_action_options: + type: object + description: Feature options for Automatic dependency submission + properties: + labeled_runners: + type: boolean + description: Whether to use runners labeled with 'dependency-submission' + or standard GitHub runners. + 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 + code_scanning_default_setup_options: + type: + - object + - 'null' + description: Feature options for code scanning default setup + properties: + runner_type: + type: + - string + - 'null' + enum: + - standard + - labeled + - not_set + - + description: Whether to use labeled runners or standard GitHub runners. + runner_label: + type: + - string + - 'null' + description: The label of the runner to use for code scanning when runner_type + is 'labeled'. + secret_scanning: + type: string + description: The enablement status of secret scanning + 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 + secret_scanning_delegated_bypass: + type: string + description: The enablement status of secret scanning delegated bypass + enum: + - enabled + - disabled + - not_set + secret_scanning_delegated_bypass_options: + type: object + description: Feature options for secret scanning delegated bypass + properties: + reviewers: + type: array + description: The bypass reviewers for secret scanning delegated bypass + items: + type: object + required: + - reviewer_id + - reviewer_type + properties: + reviewer_id: + type: integer + description: The ID of the team or role selected as a bypass reviewer + reviewer_type: + type: string + description: The type of the bypass reviewer + enum: + - TEAM + - ROLE + secret_scanning_validity_checks: + type: string + description: The enablement status of secret scanning validity checks + enum: + - enabled + - disabled + - not_set + secret_scanning_non_provider_patterns: + type: string + description: The enablement status of secret scanning non-provider patterns + enum: + - enabled + - disabled + - not_set + private_vulnerability_reporting: + type: string + description: The enablement status of private vulnerability reporting + enum: + - enabled + - disabled + - not_set + enforcement: + type: string + description: The enforcement status for a security configuration + enum: + - enforced + - unenforced + 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-scanning-default-setup-options: + type: + - object + - 'null' + description: Feature options for code scanning default setup + properties: + runner_type: + type: string + enum: + - standard + - labeled + - not_set + description: Whether to use labeled runners or standard GitHub runners. + runner_label: + type: + - string + - 'null' + description: The label of the runner to use for code scanning default setup + when runner_type is 'labeled'. + code-security-default-configurations: + type: array + description: A list of default code security configurations + 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 + - removed + - enforced + - failed + - updating + - removed_by_enterprise + repository: + "$ref": "#/components/schemas/simple-repository" enterprise-security-analysis-settings: title: Enterprise Security Analysis Settings type: object @@ -81202,6 +82381,21 @@ components: type: string examples: - example.com + actions_inbound: + type: object + properties: + full_domains: + type: array + items: + type: string + examples: + - example.com + wildcard_domains: + type: array + items: + type: string + examples: + - example.com artifact_attestations: type: object properties: @@ -82415,247 +83609,167 @@ components: - created_at - updated_at - visibility - code-scanning-alert-severity: - type: string - description: Severity of a code scanning alert. - enum: - - critical - - high - - medium - - low - - warning - - note - - error - code-security-configuration: + bypass-response: + title: Bypass response + description: A response made by a delegated bypasser to a bypass request. 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 - - enterprise - 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 - dependency_graph_autosubmit_action: - type: string - description: The enablement status of Automatic dependency submission - enum: - - enabled - - disabled - - not_set - dependency_graph_autosubmit_action_options: + description: The ID of the response to the bypass request. + reviewer: type: object - description: Feature options for Automatic dependency submission + description: The user who reviewed the bypass request. properties: - labeled_runners: - type: boolean - description: Whether to use runners labeled with 'dependency-submission' - or standard GitHub runners. - dependabot_alerts: - type: string - description: The enablement status of Dependabot alerts - enum: - - enabled - - disabled - - not_set - dependabot_security_updates: + actor_id: + type: integer + description: The ID of the GitHub user who reviewed the bypass request. + actor_name: + type: string + description: The name of the GitHub user who reviewed the bypass request. + status: type: string - description: The enablement status of Dependabot security updates + description: The response status to the bypass request until dismissed. enum: - - enabled - - disabled - - not_set - code_scanning_default_setup: + - approved + - denied + - dismissed + created_at: type: string - description: The enablement status of code scanning default setup - enum: - - enabled - - disabled - - not_set - code_scanning_default_setup_options: - type: - - object - - 'null' - description: Feature options for code scanning default setup + format: date-time + description: The date and time the response to the bypass request was created. + push-rule-bypass-request: + title: Push rule bypass request + description: A bypass request made by a user asking to be exempted from a push + rule in this repository. + type: object + properties: + id: + type: integer + description: The unique identifier of the bypass request. + number: + type: integer + description: The number uniquely identifying the bypass request within its + repository. + repository: + type: object + description: The repository the bypass request is for. properties: - runner_type: - type: - - string - - 'null' - enum: - - standard - - labeled - - not_set - - - description: Whether to use labeled runners or standard GitHub runners. - runner_label: - type: - - string - - 'null' - description: The label of the runner to use for code scanning when runner_type - is 'labeled'. - secret_scanning: - type: string - description: The enablement status of secret scanning - 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 - secret_scanning_delegated_bypass: - type: string - description: The enablement status of secret scanning delegated bypass - enum: - - enabled - - disabled - - not_set - secret_scanning_delegated_bypass_options: + id: + type: integer + description: The ID of the repository the bypass request is for. + name: + type: string + description: The name of the repository the bypass request is for. + full_name: + type: string + description: The full name of the repository the bypass request is for. + organization: type: object - description: Feature options for secret scanning delegated bypass + description: The organization associated with the repository the bypass + request is for. properties: - reviewers: - type: array - description: The bypass reviewers for secret scanning delegated bypass - items: - type: object - required: - - reviewer_id - - reviewer_type - properties: - reviewer_id: - type: integer - description: The ID of the team or role selected as a bypass reviewer - reviewer_type: - type: string - description: The type of the bypass reviewer - enum: - - TEAM - - ROLE - secret_scanning_validity_checks: - type: string - description: The enablement status of secret scanning validity checks - enum: - - enabled - - disabled - - not_set - secret_scanning_non_provider_patterns: + id: + type: integer + description: The ID of the organization. + name: + type: string + description: The name of the organization. + requester: + type: object + description: The user who requested the bypass. + properties: + actor_id: + type: integer + description: The ID of the GitHub user who requested the bypass. + actor_name: + type: string + description: The name of the GitHub user who requested the bypass. + request_type: type: string - description: The enablement status of secret scanning non-provider patterns - enum: - - enabled - - disabled - - not_set - private_vulnerability_reporting: + description: The type of request. + data: + type: + - array + - 'null' + description: Data describing the push rules that are being requested to + be bypassed. + items: + type: object + properties: + ruleset_id: + type: integer + description: The ID of the ruleset for the rules that were violated. + ruleset_name: + type: string + description: The name of the ruleset for the rules that were violated. + total_violations: + type: integer + description: The number of rule violations generated from the push + associated with this request. + rule_type: + type: string + description: The type of rule that was violated. + resource_identifier: type: string - description: The enablement status of private vulnerability reporting - enum: - - enabled - - disabled - - not_set - enforcement: + description: The unique identifier for the request type of the bypass request. + For example, a commit SHA. + examples: + - 827efc6d56897b048c772eb4087f854f46256132 + status: type: string - description: The enforcement status for a security configuration + description: The status of the bypass request. enum: - - enforced - - unenforced - 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: + - pending + - denied + - approved + - cancelled + - completed + - expired + - open + requester_comment: + type: + - string + - 'null' + description: The comment the requester provided when creating the bypass + request. + expires_at: type: string format: date-time - updated_at: + description: The date and time the bypass request will expire. + created_at: type: string format: date-time - code-scanning-default-setup-options: - type: - - object - - 'null' - description: Feature options for code scanning default setup - properties: - runner_type: - type: string - enum: - - standard - - labeled - - not_set - description: Whether to use labeled runners or standard GitHub runners. - runner_label: + description: The date and time the bypass request was created. + responses: type: - - string + - array - 'null' - description: The label of the runner to use for code scanning default setup - when runner_type is 'labeled'. - code-security-default-configurations: - type: array - description: A list of default code security configurations - 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: + description: The responses to the bypass request. + items: + "$ref": "#/components/schemas/bypass-response" + url: type: string - description: The attachment status of the code security configuration on - the repository. - enum: - - attached - - attaching - - detached - - removed - - enforced - - failed - - updating - - removed_by_enterprise - repository: - "$ref": "#/components/schemas/simple-repository" + format: uri + examples: + - https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/1 + html_url: + type: string + description: The URL to view the bypass request in a browser. + format: uri + examples: + - https://github.com/octo-org/smile/exemptions/1 + code-scanning-alert-severity: + type: string + description: Severity of a code scanning alert. + enum: + - critical + - high + - medium + - low + - warning + - note + - error codespace-machine: type: object title: Codespace machine @@ -90220,6 +91334,62 @@ components: enum: - open - dismissed + code-scanning-autofix-status: + type: string + description: The status of an autofix. + enum: + - pending + - error + - success + - outdated + code-scanning-autofix-description: + type: + - string + - 'null' + description: The description of an autofix. + code-scanning-autofix-started-at: + type: string + description: 'The start time of an autofix in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' + format: date-time + readOnly: true + code-scanning-autofix: + type: object + properties: + status: + "$ref": "#/components/schemas/code-scanning-autofix-status" + description: + "$ref": "#/components/schemas/code-scanning-autofix-description" + started_at: + "$ref": "#/components/schemas/code-scanning-autofix-started-at" + required: + - status + - description + - started_at + code-scanning-autofix-commits: + description: Commit an autofix for a code scanning alert + type: + - object + - 'null' + properties: + target_ref: + description: The Git reference of target branch for the commit. Branch needs + to already exist. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" + in the Git documentation. + type: string + message: + description: Commit message to be used. + type: string + code-scanning-autofix-commits-response: + type: object + properties: + target_ref: + type: string + description: The Git reference of target branch for the commit. For more + information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" + in the Git documentation. + sha: + type: string + description: SHA of commit with autofix. code-scanning-analysis-sarif-id: type: string description: An identifier for the upload. @@ -211883,6 +213053,244 @@ components: 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: https://api.github.com/repos/octocat/Hello-World/hooks + enterprise-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 + dependency_graph_autosubmit_action: not_set + dependency_graph_autosubmit_action_options: + labeled_runners: false + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: enabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: + secret_scanning: enabled + secret_scanning_push_protection: enabled + secret_scanning_validity_checks: enabled + secret_scanning_non_provider_patterns: enabled + private_vulnerability_reporting: enabled + enforcement: enforced + url: https://api.github.com/enterprises/octo-enterprise/code-security/configurations/17 + html_url: https://github.com/organizations/octo-enterprise/settings/security_analysis/configurations/17/view + created_at: '2023-12-04T15:58:07Z' + updated_at: '2023-12-04T15:58:07Z' + - id: 1326 + target_type: enterprise + name: High risk settings + description: This is a code security configuration for octo-enterprise high + risk repositories + advanced_security: enabled + dependency_graph: enabled + dependency_graph_autosubmit_action: enabled + dependency_graph_autosubmit_action_options: + labeled_runners: false + dependabot_alerts: enabled + dependabot_security_updates: enabled + code_scanning_default_setup: enabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: + secret_scanning: enabled + secret_scanning_push_protection: enabled + secret_scanning_validity_checks: disabled + secret_scanning_non_provider_patterns: disabled + private_vulnerability_reporting: enabled + enforcement: enforced + url: https://api.github.com/enterprises/octo-enterprise/code-security/configurations/1326 + html_url: https://github.com/enterprises/octo-enterprise/settings/security_analysis/configurations/1326/edit + created_at: '2024-05-10T00:00:00Z' + updated_at: '2024-05-10T00:00:00Z' + enterprise-code-security-configuration: + value: + id: 1325 + target_type: enterprise + name: High risk settings + description: This is a code security configuration for octo-enterprise + advanced_security: enabled + dependency_graph: enabled + dependency_graph_autosubmit_action: enabled + dependency_graph_autosubmit_action_options: + labeled_runners: false + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: disabled + secret_scanning: enabled + secret_scanning_push_protection: disabled + secret_scanning_delegated_bypass: disabled + secret_scanning_validity_checks: disabled + secret_scanning_non_provider_patterns: disabled + private_vulnerability_reporting: disabled + enforcement: enforced + url: https://api.github.com/enterprises/octo-enterprise/code-security/configurations/1325 + html_url: https://github.com/enterprises/octo-enterprise/settings/security_analysis/configurations/1325/edit + 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 + dependency_graph_autosubmit_action: not_set + dependency_graph_autosubmit_action_options: + labeled_runners: false + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: enabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: + secret_scanning: enabled + secret_scanning_push_protection: enabled + secret_scanning_delegated_bypass: enabled + secret_scanning_delegated_bypass_options: + reviewers: + - security_configuration_id: 1325 + reviewer_id: 5678 + reviewer_type: TEAM + secret_scanning_validity_checks: enabled + secret_scanning_non_provider_patterns: enabled + private_vulnerability_reporting: enabled + enforcement: enforced + 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 + dependency_graph_autosubmit_action: not_set + dependency_graph_autosubmit_action_options: + labeled_runners: false + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: enabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: + secret_scanning: enabled + secret_scanning_push_protection: enabled + secret_scanning_delegated_bypass: disabled + secret_scanning_validity_checks: disabled + private_vulnerability_reporting: enabled + enforcement: enforced + 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: + 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 + dependency_graph_autosubmit_action: enabled + dependency_graph_autosubmit_action_options: + labeled_runners: false + dependabot_alerts: enabled + dependabot_security_updates: not_set + code_scanning_default_setup: disabled + code_scanning_default_setup_options: + runner_type: not_set + runner_label: + secret_scanning: enabled + secret_scanning_push_protection: disabled + secret_scanning_delegated_bypass: disabled + secret_scanning_validity_checks: disabled + secret_scanning_non_provider_patterns: disabled + private_vulnerability_reporting: disabled + enforcement: enforced + 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 enterprise-security-analysis-settings: value: advanced_security_enabled_for_new_repositories: true @@ -215095,6 +216503,74 @@ components: received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false + push-rule-bypass-request-items: + value: + - id: 21 + number: 42 + repository: + id: 1 + name: smile + full_name: octo-org/smile + organization: + id: 1 + name: octo-org + requester: + actor_id: 12 + actor_name: monalisa + request_type: push_ruleset_bypass + data: + - ruleset_id: 410 + ruleset_name: Exclude image files + total_violations: 1 + rule_type: file_extension_restriction + resource_identifier: 827efc6d56897b048c772eb4087f854f46256132 + status: denied + requester_comment: Updating site images to follow changes in marketing. Part + 1 + expires_at: '2024-07-08T08:43:03Z' + created_at: '2024-07-01T08:43:03Z' + responses: + - id: 42 + reviewer: + actor_id: 4 + actor_name: octocat + status: denied + created_at: '2024-07-02T08:43:04Z' + url: https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/1 + html_url: https://github.com/octo-org/smile/exemptions/1 + - id: 12 + number: 24 + repository: + id: 1 + name: smile + full_name: octo-org/smile + organization: + id: 1 + name: octo-org + requester: + actor_id: 12 + actor_name: monalisa + request_type: push_ruleset_bypass + data: + - ruleset_id: 410 + ruleset_name: Exclude image files + total_violations: 1 + rule_type: file_extension_restriction + resource_identifier: 827efc6d56897b048c772eb4087f854f46255555 + status: denied + requester_comment: Updating site images to follow changes in marketing. Part + 2 + expires_at: '2024-07-08T07:43:03Z' + created_at: '2024-07-01T07:43:03Z' + responses: + - id: 42 + reviewer: + actor_id: 4 + actor_name: octocat + status: denied + created_at: '2024-07-02T08:43:04Z' + url: https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/2 + html_url: https://github.com/octo-org/smile/exemptions/2 code-security-configuration-list: value: - id: 17 @@ -215150,97 +216626,6 @@ components: 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 - dependency_graph_autosubmit_action: enabled - dependency_graph_autosubmit_action_options: - labeled_runners: false - dependabot_alerts: enabled - dependabot_security_updates: not_set - code_scanning_default_setup: disabled - code_scanning_default_setup_options: - runner_type: not_set - runner_label: - secret_scanning: enabled - secret_scanning_push_protection: disabled - secret_scanning_delegated_bypass: disabled - secret_scanning_validity_checks: disabled - secret_scanning_non_provider_patterns: disabled - private_vulnerability_reporting: disabled - enforcement: enforced - 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 - dependency_graph_autosubmit_action: not_set - dependency_graph_autosubmit_action_options: - labeled_runners: false - dependabot_alerts: enabled - dependabot_security_updates: not_set - code_scanning_default_setup: enabled - code_scanning_default_setup_options: - runner_type: not_set - runner_label: - secret_scanning: enabled - secret_scanning_push_protection: enabled - secret_scanning_delegated_bypass: enabled - secret_scanning_delegated_bypass_options: - reviewers: - - security_configuration_id: 1325 - reviewer_id: 5678 - reviewer_type: TEAM - secret_scanning_validity_checks: enabled - secret_scanning_non_provider_patterns: enabled - private_vulnerability_reporting: enabled - enforcement: enforced - 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 - dependency_graph_autosubmit_action: not_set - dependency_graph_autosubmit_action_options: - labeled_runners: false - dependabot_alerts: enabled - dependabot_security_updates: not_set - code_scanning_default_setup: enabled - code_scanning_default_setup_options: - runner_type: not_set - runner_label: - secret_scanning: enabled - secret_scanning_push_protection: enabled - secret_scanning_delegated_bypass: disabled - secret_scanning_validity_checks: disabled - private_vulnerability_reporting: enabled - enforcement: enforced - 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 @@ -215269,74 +216654,6 @@ components: 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 @@ -221326,6 +222643,41 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + push-rule-bypass-request-item: + value: + id: 12 + number: 24 + repository: + id: 1 + name: smile + full_name: octo-org/smile + organization: + id: 1 + name: octo-org + requester: + actor_id: 12 + actor_name: monalisa + request_type: push_ruleset_bypass + data: + - ruleset_id: 410 + ruleset_name: Exclude image files + total_violations: 1 + rule_type: file_extension_restriction + resource_identifier: 827efc6d56897b048c772eb4087f854f46255555 + status: denied + requester_comment: Updating site images to follow changes in marketing. Part + 2 + expires_at: '2024-07-08T07:43:03Z' + created_at: '2024-07-01T07:43:03Z' + responses: + - id: 42 + reviewer: + actor_id: 4 + actor_name: octocat + status: denied + created_at: '2024-07-02T08:43:04Z' + url: https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/2 + html_url: https://github.com/octo-org/smile/exemptions/2 check-run-example-of-completed-conclusion: summary: Response for completed conclusion value: @@ -222405,6 +223757,29 @@ components: classifications: - test instances_url: https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42/instances + code-scanning-autofix: + value: + status: success + description: This fixes an XSS vulnerability by escaping the user input. + started_at: '2024-02-14T12:29:18Z' + code-scanning-bad-request: + value: + message: The alert_number is not valid + documentation_url: https://docs.github.com/rest/code-scanning/code-scanning#get-the-status-of-an-autofix-for-a-code-scanning-alert + status: '400' + code-scanning-autofix-pending: + value: + status: pending + description: + started_at: '2024-02-14T12:29:18Z' + code-scanning-autofix-commits: + value: + target_ref: refs/heads/fix-bug + message: "Let's fix this \U0001FAB2!" + code-scanning-autofix-commits-response: + value: + target_ref: refs/heads/main + sha: 178f4f6090b3fccad4a65b3e83d076a622d59652 code-scanning-alert-instances: value: - ref: refs/heads/main @@ -236533,6 +237908,13 @@ components: required: false schema: "$ref": "#/components/schemas/code-scanning-analysis-tool-guid" + configuration-id: + name: configuration_id + description: The unique identifier of the code security configuration. + in: path + required: true + schema: + type: integer dependabot-alert-comma-separated-states: name: state in: query @@ -236937,13 +238319,60 @@ components: required: true schema: type: string - configuration-id: - name: configuration_id - description: The unique identifier of the code security configuration. - in: path - required: true + repository-name-in-query: + name: repository_name + description: The name of the repository to filter on. + in: query schema: - type: integer + type: string + bypass-reviewer-name: + name: reviewer + description: Filter bypass requests by the handle of the GitHub user who reviewed + the bypass request. + in: query + required: false + schema: + type: string + bypass-requester-name: + name: requester + description: Filter bypass requests by the handle of the GitHub user who requested + the bypass. + in: query + required: false + schema: + type: string + time-period: + name: time_period + description: |- + The time period to filter by. + + For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). + in: query + required: false + schema: + type: string + enum: + - hour + - day + - week + - month + default: day + bypass-request-status: + name: request_status + description: The status of the bypass request to filter on. When specified, + only requests with this status will be returned. + in: query + required: false + schema: + type: string + enum: + - completed + - cancelled + - expired + - denied + - open + - all + default: all role-id: name: role_id description: The unique identifier of the role. @@ -237255,28 +238684,6 @@ components: schema: type: string x-multi-segment: true - repository-name-in-query: - name: repository_name - description: The name of the repository to filter on. - in: query - schema: - type: string - time-period: - name: time_period - description: |- - The time period to filter by. - - For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). - in: query - required: false - schema: - type: string - enum: - - hour - - day - - week - - month - default: day actor-name-in-query: name: actor_name description: The handle for the GitHub user account to filter on. When specified, @@ -238065,6 +239472,14 @@ components: type: string documentation_url: type: string + conflict: + description: Conflict + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + no_content: + description: A header with no content is returned. internal_error: description: Internal Error content: @@ -238078,8 +239493,6 @@ components: application/json: schema: "$ref": "#/components/schemas/basic-error" - no_content: - description: A header with no content is returned. get_all_cost_centers: description: Response when getting cost centers content: @@ -238102,12 +239515,6 @@ components: default: value: message: Resources successfully added to the cost center. - conflict: - description: Conflict - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" remove_resource_from_cost_center: description: Response when removing resources from a cost center content: @@ -238195,6 +239602,22 @@ components: application/json: schema: "$ref": "#/components/schemas/basic-error" + code_scanning_bad_request: + description: Bad Request + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + examples: + default: + "$ref": "#/components/examples/code-scanning-bad-request" + code_scanning_autofix_create_forbidden: + description: Response if the repository is archived, if GitHub Advanced Security + is not enabled for this repository or if rate limit is exceeded + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" found: description: Found code_scanning_conflict: