package com.siftscience.model;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.List;

import static com.siftscience.model.GetDecisionFieldSet.*;

public class GetDecisionsResponseBody extends BaseResponseBody<GetDecisionsResponseBody>{
    @Expose @SerializedName("data") private final List<Decision> decisions;
    @Expose @SerializedName("has_more") private final Boolean hasMore;
    @Expose @SerializedName("total_results") private final Long totalResults;
    @Expose @SerializedName("next_ref") private final String nextRef;


    public GetDecisionsResponseBody(List<Decision> decisions, boolean hasMore, long totalResults, String nextRef) {
        this.decisions = decisions;
        this.hasMore = hasMore;
        this.totalResults = totalResults;
        this.nextRef = nextRef;
    }

    public List<Decision> getDecisions() {
        return decisions;
    }

    public Boolean isHasMore() {
        return hasMore;
    }

    public Long getTotalResults() {
        return totalResults;
    }

    public String getNextRef() {
        return nextRef;
    }

    class Decision {
        @Expose @SerializedName("id") private final String id;
        @Expose @SerializedName("name") private final String name;
        @Expose @SerializedName("description") private final String description;
        @Expose @SerializedName("category") private final DecisionCategory category;
        @Expose @SerializedName("entity_type") private final EntityType entityType;
        @Expose @SerializedName("abuse_type") private final AbuseType abuseType;
        @Expose @SerializedName("webhook_url") private final String webhookUrl;
        @Expose @SerializedName("created_at") private final Long createdAt;
        @Expose @SerializedName("created_by") private final String createdBy;
        @Expose @SerializedName("updated_at") private final Long updatedAt;
        @Expose @SerializedName("updated_by") private final String updatedBy;

        public Decision(String id, String name, String description, DecisionCategory category,
                        EntityType entityType, AbuseType abuseType, String webhookUrl,
                        long createdAt, String createdBy, long updatedAt, String updatedBy) {
            this.id = id;
            this.name = name;
            this.description = description;
            this.category = category;
            this.entityType = entityType;
            this.abuseType = abuseType;
            this.webhookUrl = webhookUrl;
            this.createdAt = createdAt;
            this.createdBy = createdBy;
            this.updatedAt = updatedAt;
            this.updatedBy = updatedBy;
        }
    }
}

@@ -1136,16 +1136,23 @@
  %7D%0A%0A    
+public 
 class De
@@ -2717,16 +2717,891 @@
        %7D
+%0A%0A        public String getId() %7B%0A            return id;%0A        %7D%0A%0A        public String getName() %7B%0A            return name;%0A        %7D%0A%0A        public String getDescription() %7B%0A            return description;%0A        %7D%0A%0A        public DecisionCategory getCategory() %7B%0A            return category;%0A        %7D%0A%0A        public EntityType getEntityType() %7B%0A            return entityType;%0A        %7D%0A%0A        public AbuseType getAbuseType() %7B%0A            return abuseType;%0A        %7D%0A%0A        public String getWebhookUrl() %7B%0A            return webhookUrl;%0A        %7D%0A%0A        public Long getCreatedAt() %7B%0A            return createdAt;%0A        %7D%0A%0A        public String getCreatedBy() %7B%0A            return createdBy;%0A        %7D%0A%0A        public Long getUpdatedAt() %7B%0A            return updatedAt;%0A        %7D%0A%0A        public String getUpdatedBy() %7B%0A            return updatedBy;%0A        %7D
 %0A    %7D%0A%7D

make decision response public, add accessors