001/*
002 * SonarQube, open source software quality management tool.
003 * Copyright (C) 2008-2014 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * SonarQube 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 * SonarQube 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.sonar.wsclient.services;
021
022import javax.annotation.CheckForNull;
023import javax.annotation.Nullable;
024
025import java.util.List;
026
027public class ResourceSearchResult extends Model {
028
029  public static class Resource {
030    private String key, name, qualifier;
031
032    @CheckForNull
033    public String key() {
034      return key;
035    }
036
037    @CheckForNull
038    public String name() {
039      return name;
040    }
041
042    @CheckForNull
043    public String qualifier() {
044      return qualifier;
045    }
046
047    public void setKey(@Nullable String key) {
048      this.key = key;
049    }
050
051    public void setName(@Nullable String s) {
052      this.name = s;
053    }
054
055    public void setQualifier(@Nullable String qualifier) {
056      this.qualifier = qualifier;
057    }
058  }
059
060
061  private Integer page, pageSize, total;
062  private List<ResourceSearchResult.Resource> resources;
063
064  @CheckForNull
065  public Integer getPage() {
066    return page;
067  }
068
069  @CheckForNull
070  public Integer getTotal() {
071    return total;
072  }
073
074  public List<ResourceSearchResult.Resource> getResources() {
075    return resources;
076  }
077
078  public void setPage(@Nullable Integer page) {
079    this.page = page;
080  }
081
082  public void setTotal(@Nullable Integer total) {
083    this.total = total;
084  }
085
086  @CheckForNull
087  public Integer getPageSize() {
088    return pageSize;
089  }
090
091  public void setPageSize(@Nullable Integer pageSize) {
092    this.pageSize = pageSize;
093  }
094
095  public void setResources(List<Resource> resources) {
096    this.resources = resources;
097  }
098}