diff options
author | Mark Rekveld <mark.rekveld@sonarsource.com> | 2020-06-15 14:56:21 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-07-01 20:05:53 +0000 |
commit | bfd8b5317e65fe606b9922197bcab5368706b1d7 (patch) | |
tree | 5cfb23c21fe0f17181b32e2926cc7512e9454e5d /sonar-ws/src/main/java | |
parent | 0f5ec7677c8ce61d568b78ead47a6d1279f796ba (diff) | |
download | sonarqube-bfd8b5317e65fe606b9922197bcab5368706b1d7.tar.gz sonarqube-bfd8b5317e65fe606b9922197bcab5368706b1d7.zip |
SONAR-13524 - ALM Github Settings APIs (#2853)
Diffstat (limited to 'sonar-ws/src/main/java')
3 files changed, 52 insertions, 0 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java index a443796e0ed..3f7bc52032c 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java @@ -106,6 +106,8 @@ public class AlmSettingsService extends BaseService { .setParam("key", request.getKey()) .setParam("privateKey", request.getPrivateKey()) .setParam("url", request.getUrl()) + .setParam("clientId", request.getClientId()) + .setParam("clientSecret", request.getClientSecret()) .setMediaType(MediaTypes.JSON)).content(); } @@ -289,6 +291,8 @@ public class AlmSettingsService extends BaseService { .setParam("newKey", request.getNewKey()) .setParam("privateKey", request.getPrivateKey()) .setParam("url", request.getUrl()) + .setParam("clientId", request.getClientId()) + .setParam("clientSecret", request.getClientSecret()) .setMediaType(MediaTypes.JSON)).content(); } } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateGithubRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateGithubRequest.java index 30a15a8e1d4..2646fda3862 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateGithubRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateGithubRequest.java @@ -19,7 +19,9 @@ */ package org.sonarqube.ws.client.almsettings; +import javax.annotation.CheckForNull; import javax.annotation.Generated; +import javax.annotation.Nullable; /** * This is a POST request. @@ -33,6 +35,8 @@ public class CreateGithubRequest { private String key; private String privateKey; private String url; + private String clientId; + private String clientSecret; /** * This is a mandatory parameter. @@ -81,4 +85,24 @@ public class CreateGithubRequest { public String getUrl() { return url; } + + public CreateGithubRequest setClientId(@Nullable String clientId) { + this.clientId = clientId; + return this; + } + + @CheckForNull + public String getClientId() { + return clientId; + } + + public CreateGithubRequest setClientSecret(@Nullable String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + @CheckForNull + public String getClientSecret() { + return clientSecret; + } } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/UpdateGithubRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/UpdateGithubRequest.java index a0b85300c69..4dd5dcfd300 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/UpdateGithubRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/UpdateGithubRequest.java @@ -19,7 +19,9 @@ */ package org.sonarqube.ws.client.almsettings; +import javax.annotation.CheckForNull; import javax.annotation.Generated; +import javax.annotation.Nullable; /** * This is a POST request. @@ -34,6 +36,8 @@ public class UpdateGithubRequest { private String newKey; private String privateKey; private String url; + private String clientId; + private String clientSecret; public String getAppId() { return appId; @@ -93,4 +97,24 @@ public class UpdateGithubRequest { this.url = url; return this; } + + public UpdateGithubRequest setClientId(@Nullable String clientId) { + this.clientId = clientId; + return this; + } + + @CheckForNull + public String getClientId() { + return clientId; + } + + public UpdateGithubRequest setClientSecret(@Nullable String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + @CheckForNull + public String getClientSecret() { + return clientSecret; + } } |