001/*
002 * SonarQube
003 * Copyright (C) 2009-2016 SonarSource SA
004 * mailto:contact AT sonarsource DOT com
005 *
006 * This program is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * This program is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public License
017 * along with this program; if not, write to the Free Software Foundation,
018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
019 */
020package org.sonarqube.ws.client.permission;
021
022import javax.annotation.CheckForNull;
023import javax.annotation.Nullable;
024
025import static java.util.Objects.requireNonNull;
026
027public class GroupsWsRequest {
028  private String permission;
029  private String projectId;
030  private String projectKey;
031  private Integer page;
032  private Integer pageSize;
033  private String query;
034  private String selected;
035
036  public String getPermission() {
037    return permission;
038  }
039
040  public GroupsWsRequest setPermission(String permission) {
041    this.permission = requireNonNull(permission, "permission must not be null");
042    return this;
043  }
044
045  @CheckForNull
046  public String getProjectId() {
047    return projectId;
048  }
049
050  public GroupsWsRequest setProjectId(@Nullable String projectId) {
051    this.projectId = projectId;
052    return this;
053  }
054
055  @CheckForNull
056  public String getProjectKey() {
057    return projectKey;
058  }
059
060  public GroupsWsRequest setProjectKey(String projectKey) {
061    this.projectKey = projectKey;
062    return this;
063  }
064
065  @CheckForNull
066  public Integer getPage() {
067    return page;
068  }
069
070  public GroupsWsRequest setPage(int page) {
071    this.page = page;
072    return this;
073  }
074
075  @CheckForNull
076  public Integer getPageSize() {
077    return pageSize;
078  }
079
080  public GroupsWsRequest setPageSize(int pageSize) {
081    this.pageSize = pageSize;
082    return this;
083  }
084
085  @CheckForNull
086  public String getQuery() {
087    return query;
088  }
089
090  public GroupsWsRequest setQuery(@Nullable String query) {
091    this.query = query;
092    return this;
093  }
094
095  public String getSelected() {
096    return selected;
097  }
098
099  public GroupsWsRequest setSelected(String selected) {
100    this.selected = requireNonNull(selected, "selected must not be null");
101    return this;
102  }
103}