package com.kickstarter.models;

import android.os.Parcelable;
import android.support.annotation.Nullable;

import com.kickstarter.libs.AutoGson;

import org.joda.time.DateTime;

import auto.parcel.AutoParcel;

@AutoGson
@AutoParcel
public abstract class Reward implements Parcelable {
  @Nullable public abstract Integer backersCount();
  @Nullable public abstract String description();
  public abstract long id();
  @Nullable public abstract Integer limit();
  public abstract float minimum();
  @Nullable public abstract DateTime estimatedDeliveryOn();
  public abstract String reward();
  @Nullable public abstract Boolean shippingEnabled();
  @Nullable public abstract String shippingPreference();
  @Nullable public abstract String shippingSummary();

  @AutoParcel.Builder
  public abstract static class Builder {
    public abstract Builder backersCount(Integer __);
    public abstract Builder description(String __);
    public abstract Builder id(long __);
    public abstract Builder limit(Integer __);
    public abstract Builder minimum(float __);
    public abstract Builder estimatedDeliveryOn(DateTime __);
    public abstract Builder reward(String __);
    public abstract Builder shippingEnabled(Boolean __);
    public abstract Builder shippingPreference(String __);
    public abstract Builder shippingSummary(String __);
    public abstract Reward build();
  }

  public static Builder builder() {
    return new AutoParcel_Reward.Builder();
  }

  public abstract Builder toBuilder();

  public boolean isReward() {
    return this.id() != 0;
  }

  public boolean isNoReward() {
    return this.id() == 0;
  }
}

@@ -546,24 +546,73 @@
 liveryOn();%0A
+  @Nullable public abstract Integer remaining();%0A
   public abs
@@ -630,24 +630,24 @@
 g reward();%0A
-
   @Nullable 
@@ -1163,24 +1163,75 @@
 teTime __);%0A
+    public abstract Builder remaining(Integer __);%0A
     public a
@@ -1555,32 +1555,32 @@
 Builder();%0A  %7D%0A%0A
-
   public abstrac
@@ -1603,16 +1603,204 @@
 der();%0A%0A
+  public boolean isAllGone() %7B%0A    return this.remaining() != null && this.remaining() == 0;%0A  %7D%0A%0A  public boolean isLimited() %7B%0A    return this.limit() != null && !this.isAllGone();%0A  %7D%0A%0A
   public

update Reward model