package com.creatubbles.api.model;

import android.support.annotation.Nullable;

import com.creatubbles.api.converter.AbilitiesConverter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import java.util.List;

import static java.util.Collections.unmodifiableList;

public class Meta {

    @JsonProperty("total_pages")
    private Integer totalPages;

    @JsonProperty("total_count")
    private Integer totalCount;

    @JsonProperty("user_bubbled_creations")
    private List<String> userBubbledCreations;

    @JsonProperty("user_bubbled_users")
    private List<String> userBubbledUsers;

    @JsonProperty("user_bubbled_galleries")
    private List<String> userBubbledGalleries;

    @JsonProperty("followed_users")
    private List<String> followedUsers;

    @JsonDeserialize(using = AbilitiesConverter.class)
    private List<Ability> abilities;

    @Nullable
    public Integer getTotalPages() {
        return totalPages;
    }

    @Nullable
    public Integer getTotalCount() {
        return totalCount;
    }

    @Nullable
    public List<String> getBubbledCreations() {
        return unmodifiableList(userBubbledCreations);
    }

    @Nullable
    public List<String> getBubbledGalleries() {
        return unmodifiableList(userBubbledGalleries);
    }

    @Nullable
    public List<String> getBubbledUsers() {
        return unmodifiableList(userBubbledUsers);
    }

    @Nullable
    public List<String> getFollowedUsers() {
        return unmodifiableList(followedUsers);
    }

    @Nullable
    public List<Ability> getAbilities() {
        return unmodifiableList(abilities);
    }
}
@@ -248,24 +248,47 @@
 serialize;%0A%0A
+import java.util.Date;%0A
 import java.
@@ -298,16 +298,16 @@
 l.List;%0A
-
 %0Aimport 
@@ -844,32 +844,252 @@
 followedUsers;%0A%0A
+    @JsonProperty(%22total_unread_count%22)%0A    private Integer totalUnreadCount;%0A%0A    @JsonProperty(%22total_new_count%22)%0A    private Integer totalNewCount;%0A%0A    @JsonProperty(%22last_viewed_at%22)%0A    private Date lastViewedAt;%0A%0A
     @JsonDeseria
@@ -1861,32 +1861,32 @@
 etAbilities() %7B%0A
-
         return u
@@ -1918,10 +1918,284 @@
 );%0A    %7D
+%0A%0A    @Nullable%0A    public Integer getTotalUnreadCount() %7B%0A        return totalUnreadCount;%0A    %7D%0A%0A    @Nullable%0A    public Integer getTotalNewCount() %7B%0A        return totalNewCount;%0A    %7D%0A%0A    @Nullable%0A    public Date getLastViewedAt() %7B%0A        return lastViewedAt;%0A    %7D
 %0A%7D

Fix missing meta fields