You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CreateRequest.java 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2021 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonarqube.ws.client.users;
  21. import java.util.List;
  22. import javax.annotation.Generated;
  23. /**
  24. * This is part of the internal API.
  25. * This is a POST request.
  26. * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/create">Further information about this action online (including a response example)</a>
  27. * @since 3.7
  28. */
  29. @Generated("sonar-ws-generator")
  30. public class CreateRequest {
  31. private String email;
  32. private String local;
  33. private String login;
  34. private String name;
  35. private String password;
  36. private List<String> scmAccount;
  37. private List<String> scmAccounts;
  38. /**
  39. * Example value: "myname@email.com"
  40. */
  41. public CreateRequest setEmail(String email) {
  42. this.email = email;
  43. return this;
  44. }
  45. public String getEmail() {
  46. return email;
  47. }
  48. /**
  49. * Possible values:
  50. * <ul>
  51. * <li>"true"</li>
  52. * <li>"false"</li>
  53. * <li>"yes"</li>
  54. * <li>"no"</li>
  55. * </ul>
  56. */
  57. public CreateRequest setLocal(String local) {
  58. this.local = local;
  59. return this;
  60. }
  61. public String getLocal() {
  62. return local;
  63. }
  64. /**
  65. * This is a mandatory parameter.
  66. * Example value: "myuser"
  67. */
  68. public CreateRequest setLogin(String login) {
  69. this.login = login;
  70. return this;
  71. }
  72. public String getLogin() {
  73. return login;
  74. }
  75. /**
  76. * This is a mandatory parameter.
  77. * Example value: "My Name"
  78. */
  79. public CreateRequest setName(String name) {
  80. this.name = name;
  81. return this;
  82. }
  83. public String getName() {
  84. return name;
  85. }
  86. /**
  87. * Example value: "mypassword"
  88. */
  89. public CreateRequest setPassword(String password) {
  90. this.password = password;
  91. return this;
  92. }
  93. public String getPassword() {
  94. return password;
  95. }
  96. /**
  97. * Example value: "scmAccount=firstValue&scmAccount=secondValue&scmAccount=thirdValue"
  98. */
  99. public CreateRequest setScmAccount(List<String> scmAccount) {
  100. this.scmAccount = scmAccount;
  101. return this;
  102. }
  103. public List<String> getScmAccount() {
  104. return scmAccount;
  105. }
  106. /**
  107. * Example value: "myscmaccount1,myscmaccount2"
  108. * @deprecated since 6.1
  109. */
  110. @Deprecated
  111. public CreateRequest setScmAccounts(List<String> scmAccounts) {
  112. this.scmAccounts = scmAccounts;
  113. return this;
  114. }
  115. public List<String> getScmAccounts() {
  116. return scmAccounts;
  117. }
  118. }