
com.sailthru.client.params.Alert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sailthru-java-client Show documentation
Show all versions of sailthru-java-client Show documentation
Java client library for Sailthru API
package com.sailthru.client.params;
import com.google.gson.reflect.TypeToken;
import com.sailthru.client.ApiAction;
import java.util.List;
import java.util.Map;
import java.lang.reflect.Type;
/**
*
* @author Prajwal Tuladhar
*/
public class Alert extends AbstractApiParams implements ApiParams {
public static final String PARAM_EMAIL = "email";
public static final String PARAM_ALERT_ID = "alert_id";
protected String email;
public static enum TypeMode {realtime, daily, weekly};
protected String type;
protected String template;
protected String when;
protected Map> match;
protected Map min;
protected Map max;
protected List tags;
public Alert setEmail(String email) {
this.email = email;
return this;
}
public Alert setTemplate(String template) {
this.template = template;
return this;
}
public Alert setMatchQuery(Map> match) {
this.match = match;
return this;
}
public Alert setMinQuery(Map min) {
this.min = min;
return this;
}
public Alert setMaxQuery(Map max) {
this.max = max;
return this;
}
public Alert setTagsQuery(List 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 Type getType() {
java.lang.reflect.Type _type = new TypeToken() {}.getType();
return _type;
}
@Override
public ApiAction getApiCall() {
return ApiAction.alert;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy