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.Date;
import java.util.List;

import static java.util.Collections.emptyList;

public class Meta {

    @JsonProperty("total_pages")
    private Integer totalPages;

    @JsonProperty("total_count")
    private Integer totalCount;

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

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

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

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

    @JsonProperty("total_unread_count")
    private Integer totalUnreadCount;

    @JsonProperty("total_new_count")
    private Integer totalNewCount;

    @JsonProperty("last_viewed_at")
    private Date lastViewedAt;

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

    private String code;

    @JsonProperty("followed_hashtags")
    private List<String> followedTags;

    @JsonProperty("favorite_creations")
    private List<String> favoriteCreations;

    @JsonProperty("favorite_users")
    private List<String> favoriteUsers;

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

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

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

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

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

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

    @Nullable
    public List<Ability> getAbilities() {
        return abilities;
    }

    @Nullable
    public Integer getTotalUnreadCount() {
        return totalUnreadCount;
    }

    @Nullable
    public Integer getTotalNewCount() {
        return totalNewCount;
    }

    @Nullable
    public Date getLastViewedAt() {
        return lastViewedAt;
    }

    @Nullable
    public String getCode() {
        return code;
    }

    @Nullable
    public List<String> getFollowedTags() {
        return followedTags;
    }

    @Nullable
    public List<String> getFavoriteCreations() {
        return favoriteCreations;
    }

    @Nullable
    public List<String> getFavoriteUsers() {
        return favoriteUsers;
    }
}
@@ -29,16 +29,59 @@
 model;%0A%0A
+import android.support.annotation.NonNull;%0A
 import a
@@ -1373,16 +1373,30 @@
 owedTags
+ = emptyList()
 ;%0A%0A    @
@@ -1413,25 +1413,27 @@
 ty(%22
-favorite_creation
+submitted_challenge
 s%22)%0A
@@ -1457,33 +1457,37 @@
 String%3E 
-favoriteCreations
+submittedChallengesId
 ;%0A%0A    @
@@ -1509,20 +1509,25 @@
 avorite_
-user
+challenge
 s%22)%0A    
@@ -1555,21 +1555,28 @@
 favorite
-Users
+ChallengesId
 ;%0A%0A    @
@@ -2673,39 +2673,38 @@
 s;%0A    %7D%0A%0A    @N
+onN
 ull
-able
 %0A    public List
@@ -2719,62 +2719,70 @@
  get
-FavoriteCreations() %7B%0A        return favoriteCreations
+SubmittedChallengesId() %7B%0A        return submittedChallengesId
 ;%0A  
@@ -2784,39 +2784,38 @@
 d;%0A    %7D%0A%0A    @N
+onN
 ull
-able
 %0A    public List
@@ -2834,21 +2834,28 @@
 Favorite
-Users
+ChallengesId
 () %7B%0A   
@@ -2874,21 +2874,28 @@
 favorite
-Users
+ChallengesId
 ;%0A    %7D%0A

Add challenges related metadata