/*
 * Copyright 2000-2016 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jetbrains.plugins.github.api;

import com.intellij.tasks.impl.gson.Mandatory;
import com.intellij.tasks.impl.gson.RestModel;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@RestModel
@SuppressWarnings("UnusedDeclaration")
public class GithubUserDetailed extends GithubUser {
  private String name;
  private String email;
  private String company;
  private String location;
  private String type;

  private Integer publicRepos;
  private Integer publicGists;
  private Integer totalPrivateRepos;
  private Integer ownedPrivateRepos;
  private Integer privateGists;
  private Long diskUsage;

  private UserPlan plan;

  public static class UserPlan {
    @Mandatory private String name;
    private Long space;
    private Long collaborators;
    @Mandatory private Long privateRepos;

    @NotNull
    public String getName() {
      return name;
    }

    public long getPrivateRepos() {
      return privateRepos;
    }
  }

  @Nullable
  public String getName() {
    return name;
  }

  @Nullable
  public String getEmail() {
    return email;
  }

  @Nullable
  public String getType() {
    return type;
  }

  @Nullable
  public Integer getOwnedPrivateRepos() {
    return ownedPrivateRepos;
  }

  @Nullable
  public UserPlan getPlan() {
    return plan;
  }

  public boolean canCreatePrivateRepo() {
    return getPlan() == null || getOwnedPrivateRepos() == null || getPlan().getPrivateRepos() > getOwnedPrivateRepos();
  }
}

@@ -735,50 +735,8 @@
 el;%0A
-import org.jetbrains.annotations.NotNull;%0A
 impo
@@ -1256,35 +1256,24 @@
 rPlan %7B%0A    
-@Mandatory 
 private Stri
@@ -1384,77 +1384,8 @@
 s;%0A%0A
-    @NotNull%0A    public String getName() %7B%0A      return name;%0A    %7D%0A%0A
     
@@ -1584,223 +1584,8 @@
  %7D%0A%0A
-  @Nullable%0A  public String getType() %7B%0A    return type;%0A  %7D%0A%0A  @Nullable%0A  public Integer getOwnedPrivateRepos() %7B%0A    return ownedPrivateRepos;%0A  %7D%0A%0A  @Nullable%0A  public UserPlan getPlan() %7B%0A    return plan;%0A  %7D%0A%0A
   pu
@@ -1633,25 +1633,20 @@
  return 
-getP
+p
 lan
-()
  == null
@@ -1649,20 +1649,17 @@
 null %7C%7C 
-getO
+o
 wnedPriv
@@ -1666,18 +1666,16 @@
 ateRepos
-()
  == null
@@ -1682,17 +1682,12 @@
  %7C%7C 
-getP
+p
 lan
-()
 .get
@@ -1707,12 +1707,9 @@
 ) %3E 
-getO
+o
 wned
@@ -1720,18 +1720,16 @@
 ateRepos
-()
 ;%0A  %7D%0A%7D%0A

remove unused getters