package com.kickstarter.models;

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

import com.kickstarter.libs.qualifiers.AutoGson;

import org.joda.time.DateTime;

import auto.parcel.AutoParcel;

@AutoGson
@AutoParcel
public abstract class Update implements Parcelable {
  public abstract String body();
  @Nullable public abstract Integer commentsCount();
  @Nullable public abstract Boolean hasLiked();
  public abstract long id();
  @Nullable public abstract Integer likesCount();
  public abstract long projectId();
  @Nullable public abstract DateTime publishedAt();
  public abstract int sequence();
  public abstract String title();
  @Nullable public abstract User user();
  @Nullable public abstract DateTime updatedAt();
  @Nullable public abstract Boolean visible();

  @AutoParcel.Builder
  public abstract static class Builder {
    public abstract Builder body(String __);
    public abstract Builder commentsCount(Integer __);
    public abstract Builder hasLiked(Boolean __);
    public abstract Builder id(long __);
    public abstract Builder likesCount(Integer __);
    public abstract Builder projectId(long __);
    public abstract Builder publishedAt(DateTime __);
    public abstract Builder sequence(int __);
    public abstract Builder title(String __);
    public abstract Builder user(User __);
    public abstract Builder updatedAt(DateTime __);
    public abstract Builder visible(Boolean __);
    public abstract Update build();
  }

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

  public abstract Builder toBuilder();
  private static final int TRUNCATED_BODY_LENGTH = 400;

  public String truncatedBody() {
    String str = Html.fromHtml(body()).toString();
    if (str.length() > TRUNCATED_BODY_LENGTH) {
      str = str.substring(0, TRUNCATED_BODY_LENGTH - 1) + "\u2026";
    }

    return str;
  }
}

@@ -717,17 +717,57 @@
 act 
-User user
+DateTime updatedAt();%0A  public abstract Urls urls
 ();%0A
@@ -794,34 +794,25 @@
 bstract 
-DateTime updatedAt
+User user
 ();%0A  @N
@@ -1388,16 +1388,25 @@
 er u
-ser(User
+pdatedAt(DateTime
  __)
@@ -1436,33 +1436,67 @@
 uilder u
-pdatedAt(DateTime
+rls(Urls __);%0A    public abstract Builder user(User
  __);%0A  
@@ -1707,16 +1707,1626 @@
 lder();%0A
+%0A  @AutoParcel%0A  @AutoGson%0A  public abstract static class Urls implements Parcelable %7B%0A    public abstract Web web();%0A    @Nullable public abstract Api api();%0A%0A    @AutoParcel.Builder%0A    public abstract static class Builder %7B%0A      public abstract Builder web(Web __);%0A      public abstract Builder api(Api __);%0A      public abstract Urls build();%0A    %7D%0A%0A    public static Builder builder() %7B%0A      return new AutoParcel_Update_Urls.Builder();%0A    %7D%0A%0A    public abstract Builder toBuilder();%0A%0A    @AutoParcel%0A    @AutoGson%0A    public abstract static class Web implements Parcelable %7B%0A      public abstract String likes();%0A      public abstract String update();%0A%0A      @AutoParcel.Builder%0A      public abstract static class Builder %7B%0A        public abstract Builder likes(String __);%0A        public abstract Builder update(String __);%0A        public abstract Web build();%0A      %7D%0A%0A      public static Builder builder() %7B%0A        return new AutoParcel_Update_Urls_Web.Builder();%0A      %7D%0A%0A      public abstract Builder toBuilder();%0A    %7D%0A%0A    @AutoParcel%0A    @AutoGson%0A    public abstract static class Api implements Parcelable %7B%0A      @Nullable public abstract String comments();%0A      @Nullable public abstract String update();%0A%0A      @AutoParcel.Builder%0A      public abstract static class Builder %7B%0A        public abstract Builder comments(String __);%0A        public abstract Builder update(String __);%0A        public abstract Api build();%0A      %7D%0A%0A      public static Builder builder() %7B%0A        return new AutoParcel_Update_Urls_Api.Builder();%0A      %7D%0A%0A      public abstract Builder toBuilder();%0A    %7D%0A  %7D%0A%0A
   privat

Add web, api urls to update model