]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13524 - ALM Github Settings APIs (#2853)
authorMark Rekveld <mark.rekveld@sonarsource.com>
Mon, 15 Jun 2020 12:56:21 +0000 (14:56 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 1 Jul 2020 20:05:53 +0000 (20:05 +0000)
sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateGithubRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/UpdateGithubRequest.java
sonar-ws/src/main/protobuf/ws-alm_settings.proto

index a443796e0edef20557bac9e08c7c77b52cbf14cd..3f7bc52032c96970c2451e963a728f04a1cee6cd 100644 (file)
@@ -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();
   }
 }
index 30a15a8e1d4693fbf9088d2c299603ffff5f5d16..2646fda38622d86a1268c5cfc3c78d20935d72ab 100644 (file)
@@ -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;
+  }
 }
index a0b85300c6908c94105805fe398061b165ba8f61..4dd5dcfd3009bc72e8e1a5abbf76c1e84bbef484 100644 (file)
@@ -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;
+  }
 }
index 81b6b2ab2bf446b7886fa385c921e4a1b5a91ced..c1b2352c33c26037395715210044e4d8163fd808 100644 (file)
@@ -37,6 +37,8 @@ message AlmSettingGithub {
   optional string url = 2;
   optional string appId = 3;
   optional string privateKey = 4;
+  optional string clientId = 5;
+  optional string clientSecret = 6;
 }
 
 message AlmSettingAzure {