3 * Copyright (C) 2009-2017 SonarSource SA
4 * mailto:info AT sonarsource DOT com
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.
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.
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.
20 package org.sonarqube.ws.client.permission;
22 import javax.annotation.CheckForNull;
23 import javax.annotation.Nullable;
24 import javax.annotation.concurrent.Immutable;
26 import static java.util.Objects.requireNonNull;
29 public class RemoveProjectCreatorFromTemplateRequest {
30 private final String templateId;
31 private final String organization;
32 private final String templateName;
33 private final String permission;
35 private RemoveProjectCreatorFromTemplateRequest(Builder builder) {
36 this.templateId = builder.templateId;
37 this.organization = builder.organization;
38 this.templateName = builder.templateName;
39 this.permission = requireNonNull(builder.permission);
43 public String getTemplateId() {
48 public String getOrganization() {
53 public String getTemplateName() {
57 public String getPermission() {
61 public static Builder builder() {
65 public static class Builder {
66 private String templateId;
67 private String organization;
68 private String templateName;
69 private String permission;
72 // enforce method constructor
75 public Builder setTemplateId(@Nullable String templateId) {
76 this.templateId = templateId;
80 public Builder setOrganization(@Nullable String s) {
81 this.organization = s;
85 public Builder setTemplateName(@Nullable String templateName) {
86 this.templateName = templateName;
90 public Builder setPermission(@Nullable String permission) {
91 this.permission = permission;
95 public RemoveProjectCreatorFromTemplateRequest build() {
96 return new RemoveProjectCreatorFromTemplateRequest(this);