package com.sailthru.client.params;

import com.google.gson.reflect.TypeToken;
import java.util.ArrayList;
import java.util.HashMap;

/**
 *
 * @author Prajwal Tuladhar
 */
public class Alert extends AbstractApiParams implements ApiParams {
    protected String email;

    public static enum TypeMode {realtime, daily, weekly};
    protected String type;
    protected String template;
    protected String when;

    protected HashMap<String, ArrayList<String>> match;
    protected HashMap<String, Number> min;
    protected HashMap<String, Number> max;
    protected ArrayList<String> tags;

    public Alert setEmail(String email) {
        this.email = email;
        return this;
    }

    public Alert setTemplate(String template) {
        this.template = template;
        return this;
    }

    public Alert setMatchQuery(HashMap<String, ArrayList<String>> match) {
        this.match = match;
        return this;
    }

    public Alert setMinQuery(HashMap<String, Number> min) {
        this.min = min;
        return this;
    }

    public Alert setMaxQuery(HashMap<String, Number> max) {
        this.max = max;
        return this;
    }

    public Alert setTagsQuery(ArrayList<String> tags) {
        this.tags = tags;
        return this;
    }

    public Alert setType(TypeMode mode) {
        this.type = mode.toString();
        return this;
    }

    public Alert setWhen(String when) {
        this.when = when;
        return this;
    }

    public java.lang.reflect.Type getType() {
        java.lang.reflect.Type _type = new TypeToken<Alert>() {}.getType();
        return _type;
    }

}
@@ -89,21 +89,16 @@
 va.util.
-Array
 List;%0Aim
@@ -112,20 +112,16 @@
 va.util.
-Hash
 Map;%0A%0A/*
@@ -405,36 +405,32 @@
 %0A%0A    protected 
-Hash
 Map%3CString, Arra
@@ -417,37 +417,32 @@
 ted Map%3CString, 
-Array
 List%3CString%3E%3E ma
@@ -452,36 +452,32 @@
 ;%0A    protected 
-Hash
 Map%3CString, Numb
@@ -499,20 +499,16 @@
 otected 
-Hash
 Map%3CStri
@@ -538,21 +538,16 @@
 otected 
-Array
 List%3CStr
@@ -793,28 +793,24 @@
 tMatchQuery(
-Hash
 Map%3CString, 
@@ -809,21 +809,16 @@
 String, 
-Array
 List%3CStr
@@ -913,28 +913,24 @@
 setMinQuery(
-Hash
 Map%3CString, 
@@ -1029,12 +1029,8 @@
 ery(
-Hash
 Map%3C
@@ -1138,13 +1138,8 @@
 ery(
-Array
 List

Use List instead of ArrayList