org.zendesk.client.v2.model.Trigger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zendesk-java-client Show documentation
Show all versions of zendesk-java-client Show documentation
Java client for the Zendesk API
The newest version!
package org.zendesk.client.v2.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* https://developer.zendesk.com/rest_api/docs/core/triggers
*
* @author adavidson
*/
public class Trigger implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private String title;
private boolean active;
private int position;
private Conditions conditions;
private List actions;
@JsonProperty("created_at")
private Date createdAt;
@JsonProperty("updated_at")
private Date updatedAt;
@JsonProperty("category_id")
private String categoryId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public int getPosition() {
return position;
}
public void setPosition(int position) {
this.position = position;
}
public Conditions getConditions() {
return conditions;
}
public void setConditions(Conditions conditions) {
this.conditions = conditions;
}
public List getActions() {
return actions;
}
public void setActions(List actions) {
this.actions = actions;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
@Override
public String toString() {
return "Trigger"
+ "{id="
+ id
+ ", categoryId="
+ categoryId
+ ", title="
+ title
+ ", position="
+ position
+ ", active="
+ active
+ ", conditions="
+ conditions
+ ", actions="
+ actions
+ ", createdAt="
+ createdAt
+ ", updatedAt="
+ updatedAt
+ '}';
}
public static class Conditions {
private List all = new ArrayList<>();
private List any = new ArrayList<>();
public List getAll() {
return all;
}
public void setAll(List all) {
this.all = all;
}
public List getAny() {
return any;
}
public void setAny(List any) {
this.any = any;
}
@Override
public String toString() {
return "Conditions" + "{all=" + all + ", any=" + any + '}';
}
}
public static class Condition {
private String field;
private String operator;
private String value;
public Condition() {}
public Condition(String field, String operator, String value) {
this.field = field;
this.operator = operator;
this.value = value;
}
public String getField() {
return field;
}
public void setField(String field) {
this.field = field;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "Condition" + "{field=" + field + ", operator=" + operator + ", value=" + value + '}';
}
}
}