123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- /*
- * SonarQube
- * Copyright (C) 2009-2020 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
- package org.sonarqube.ws.client.almsettings;
-
- import javax.annotation.Generated;
- import org.sonarqube.ws.AlmSettings;
- import org.sonarqube.ws.MediaTypes;
- import org.sonarqube.ws.client.BaseService;
- import org.sonarqube.ws.client.GetRequest;
- import org.sonarqube.ws.client.PostRequest;
- import org.sonarqube.ws.client.WsConnector;
-
- /**
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings">Further information about this web service online</a>
- */
- @Generated("sonar-ws-generator")
- public class AlmSettingsService extends BaseService {
-
- public AlmSettingsService(WsConnector wsConnector) {
- super(wsConnector, "api/alm_settings");
- }
-
- /**
- * This is a GET request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/count_binding">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public AlmSettings.CountBindingWsResponse countBinding(CountBindingRequest request) {
- return call(
- new GetRequest(path("count_binding"))
- .setParam("almSetting", request.getAlmSetting())
- .setMediaType(MediaTypes.JSON),
- AlmSettings.CountBindingWsResponse.parser());
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/create_azure">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void createAzure(CreateAzureRequest request) {
- call(
- new PostRequest(path("create_azure"))
- .setParam("key", request.getKey())
- .setParam("personalAccessToken", request.getPersonalAccessToken())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/create_gitlab">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void createGitlab(CreateGitlabRequest request) {
- call(
- new PostRequest(path("create_gitlab"))
- .setParam("key", request.getKey())
- .setParam("personalAccessToken", request.getPersonalAccessToken())
- .setParam("url", request.getUrl())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/create_bitbucket">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void createBitbucket(CreateBitbucketRequest request) {
- call(
- new PostRequest(path("create_bitbucket"))
- .setParam("key", request.getKey())
- .setParam("url", request.getUrl())
- .setParam("personalAccessToken", request.getPersonalAccessToken())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/create_github">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void createGithub(CreateGithubRequest request) {
- call(
- new PostRequest(path("create_github"))
- .setParam("appId", request.getAppId())
- .setParam("key", request.getKey())
- .setParam("privateKey", request.getPrivateKey())
- .setParam("url", request.getUrl())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/delete">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void delete(DeleteRequest request) {
- call(
- new PostRequest(path("delete"))
- .setParam("key", request.getKey())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/delete_binding">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void deleteBinding(DeleteBindingRequest request) {
- call(
- new PostRequest(path("delete_binding"))
- .setParam("project", request.getProject())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- * This is a GET request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/get_binding">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public AlmSettings.GetBindingWsResponse getBinding(GetBindingRequest request) {
- return call(
- new GetRequest(path("get_binding"))
- .setParam("project", request.getProject())
- .setMediaType(MediaTypes.JSON),
- AlmSettings.GetBindingWsResponse.parser());
- }
-
- /**
- * This is a GET request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/list">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public AlmSettings.ListWsResponse list(ListRequest request) {
- return call(
- new GetRequest(path("list"))
- .setParam("project", request.getProject())
- .setMediaType(MediaTypes.JSON),
- AlmSettings.ListWsResponse.parser());
- }
-
- /**
- *
- * This is a GET request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/list_definitions">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public AlmSettings.ListDefinitionsWsResponse listDefinitions() {
- return call(
- new GetRequest(path("list_definitions")),
- AlmSettings.ListDefinitionsWsResponse.parser());
- }
-
- /**
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/set_azure_binding">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void setAzureBinding(SetAzureBindingRequest request) {
- call(
- new PostRequest(path("set_azure_binding"))
- .setParam("almSetting", request.getAlmSetting())
- .setParam("project", request.getProject())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/set_gitlab_binding">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void setGitlabBinding(SetGitlabBindingRequest request) {
- call(
- new PostRequest(path("set_gitlab_binding"))
- .setParam("almSetting", request.getAlmSetting())
- .setParam("project", request.getProject())
- .setParam("repository", request.getRepository())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/set_bitbucket_binding">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void setBitbucketBinding(SetBitbucketBindingRequest request) {
- call(
- new PostRequest(path("set_bitbucket_binding"))
- .setParam("almSetting", request.getAlmSetting())
- .setParam("project", request.getProject())
- .setParam("repository", request.getRepositoryKey())
- .setParam("slug", request.getRepositorySlug())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/set_github_binding">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void setGithubBinding(SetGithubBindingRequest request) {
- call(
- new PostRequest(path("set_github_binding"))
- .setParam("almSetting", request.getAlmSetting())
- .setParam("project", request.getProject())
- .setParam("repository", request.getRepository())
- .setParam("summaryCommentEnabled", request.getSummaryCommentEnabled())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/update_azure">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void updateAzure(UpdateAzureRequest request) {
- call(
- new PostRequest(path("update_azure"))
- .setParam("key", request.getKey())
- .setParam("newKey", request.getNewKey())
- .setParam("personalAccessToken", request.getPersonalAccessToken())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/update_gitlab">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void updateGitlab(UpdateGitlabRequest request) {
- call(
- new PostRequest(path("update_gitlab"))
- .setParam("key", request.getKey())
- .setParam("newKey", request.getNewKey())
- .setParam("personalAccessToken", request.getPersonalAccessToken())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/update_bitbucket">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void updateBitbucket(UpdateBitbucketRequest request) {
- call(
- new PostRequest(path("update_bitbucket"))
- .setParam("key", request.getKey())
- .setParam("newKey", request.getNewKey())
- .setParam("url", request.getUrl())
- .setParam("personalAccessToken", request.getPersonalAccessToken())
- .setMediaType(MediaTypes.JSON)).content();
- }
-
- /**
- *
- * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/update_github">Further information about this action online (including a response example)</a>
- * @since 8.1
- */
- public void updateGithub(UpdateGithubRequest request) {
- call(
- new PostRequest(path("update_github"))
- .setParam("appId", request.getAppId())
- .setParam("key", request.getKey())
- .setParam("newKey", request.getNewKey())
- .setParam("privateKey", request.getPrivateKey())
- .setParam("url", request.getUrl())
- .setMediaType(MediaTypes.JSON)).content();
- }
- }
|