diff options
Diffstat (limited to 'sonar-ws')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java | 21 | ||||
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java | 4 |
2 files changed, 24 insertions, 1 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java index ba5b8a35d41..c0b3214b7d8 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java @@ -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; + } } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java index 93e7adb6ffd..1539acc65f2 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java @@ -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()); } |