com.jelastic.api.system.persistence.TriggerCustomData Maven / Gradle / Ivy
The newest version!
/*Server class MD5: 5eb608e794129ff4287350906d80cf78*/
package com.jelastic.api.system.persistence;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.Serializable;
/**
* @name Jelastic API Client
* @version 8.11.2
* @copyright Jelastic, Inc.
*/
public class TriggerCustomData implements Serializable {
public static final String LIMIT = "limit";
public static final String COUNT = "count";
public static final String NOTIFY = "notify";
public static final String REMINDER_PERIOD = "reminderPeriod";
private Integer limit;
private Integer count;
private Boolean notify = true;
private Integer reminderPeriod;
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setCount(Integer count) {
this.count = count;
}
public Integer getCount() {
return count;
}
public void setNotify(Boolean notify) {
this.notify = notify;
}
public Boolean isNotify() {
return notify;
}
public Integer getReminderPeriod() {
return reminderPeriod;
}
public void setReminderPeriod(Integer reminderPeriod) {
this.reminderPeriod = reminderPeriod;
}
public JSONObject _toJSON() throws JSONException {
JSONObject json = new JSONObject();
json.put(LIMIT, limit);
json.put(COUNT, count);
json.put(NOTIFY, notify);
json.put(REMINDER_PERIOD, reminderPeriod);
return json;
}
public TriggerCustomData _fromJSON(JSONObject json) throws JSONException {
if (json.has(LIMIT)) {
this.limit = json.getInt(LIMIT);
}
if (json.has(COUNT)) {
this.count = json.getInt(COUNT);
}
if (json.has(NOTIFY)) {
this.notify = json.getBoolean(NOTIFY);
}
if (json.has(REMINDER_PERIOD)) {
this.reminderPeriod = json.getInt(REMINDER_PERIOD);
}
return this;
}
public TriggerCustomData fromString(String value) throws JSONException {
return this._fromJSON(new JSONObject(value));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy