]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16263 Added integration tests
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>
Tue, 26 Apr 2022 08:46:05 +0000 (10:46 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 29 Apr 2022 20:03:19 +0000 (20:03 +0000)
sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java

index ba5b8a35d410687b848ac8c6e63214bf339e7eb7..c0b3214b7d882f216126ffd749f34e0233da9bc2 100644 (file)
@@ -20,6 +20,7 @@
 package org.sonarqube.ws.client.usertokens;
 
 import javax.annotation.Generated;
+import javax.annotation.Nullable;
 
 /**
  * This is part of the internal API.
@@ -32,6 +33,8 @@ public class GenerateRequest {
 
   private String login;
   private String name;
+  private String type;
+  private String projectKey;
 
   /**
    * Example value: "g.hopper"
@@ -57,4 +60,22 @@ public class GenerateRequest {
   public String getName() {
     return name;
   }
+
+  public String getType() {
+    return type;
+  }
+
+  public GenerateRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  public GenerateRequest setProjectKey(@Nullable String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
 }
index 93e7adb6ffdfed6611202cfde40329622f10e407..1539acc65f227c21827400838dd10228b05ec783 100644 (file)
@@ -49,7 +49,9 @@ public class UserTokensService extends BaseService {
     return call(
       new PostRequest(path("generate"))
         .setParam("login", request.getLogin())
-        .setParam("name", request.getName()),
+        .setParam("name", request.getName())
+        .setParam("type", request.getType())
+        .setParam("projectKey", request.getProjectKey()),
       GenerateWsResponse.parser());
   }