package com.gilt.svc.sundial.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Boolean; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.Arrays; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.2.7 * User agent: apibuilder app.apibuilder.io/gilt/svc-sundial/0.2.7/android_rx2_client * * WARNING: not all features (notably unions) and data types work with android generator yet. * Android generator is designed to be used in an android application, but should work in any java codebase as long as you import jackson, retrofit2 and RxJava2 libraries. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact android-feedback@gilt.com * * A grouping of related tasks that are run as a single unit on the same schedule */ @JsonIgnoreProperties( ignoreUnknown = true ) public class ProcessDefinition { private final String processDefinitionName; private final Boolean paused; private final String processDescription; private final ProcessSchedule schedule; private final TaskDefinition[] taskDefinitions; private final ProcessOverlapAction overlapAction; private final Notification[] notifications; @JsonCreator public ProcessDefinition(@JsonProperty("process_definition_name") String processDefinitionName, @JsonProperty("paused") Boolean paused, @JsonProperty("process_description") String processDescription, @JsonProperty("schedule") ProcessSchedule schedule, @JsonProperty("task_definitions") TaskDefinition[] taskDefinitions, @JsonProperty("overlap_action") ProcessOverlapAction overlapAction, @JsonProperty("notifications") Notification[] notifications) { this.processDefinitionName = processDefinitionName; this.paused = paused; this.processDescription = processDescription; this.schedule = schedule; this.taskDefinitions = taskDefinitions; this.overlapAction = overlapAction; this.notifications = notifications; } public String getProcessDefinitionName() { return processDefinitionName; } /** * If true, ignore schedule and only start process if triggered manually */ public Boolean getPaused() { return paused; } public String getProcessDescription() { return processDescription; } /** * The schedule that the process runs on; if not specified, the process will only run when triggered manually */ public ProcessSchedule getSchedule() { return schedule; } public TaskDefinition[] getTaskDefinitions() { return taskDefinitions; } public ProcessOverlapAction getOverlapAction() { return overlapAction; } public Notification[] getNotifications() { return notifications; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ProcessDefinition that = (ProcessDefinition) o; if (processDefinitionName != null ? !processDefinitionName.equals(that.processDefinitionName) : that.processDefinitionName != null) return false; if (paused != null ? !paused.equals(that.paused) : that.paused != null) return false; if (processDescription != null ? !processDescription.equals(that.processDescription) : that.processDescription != null) return false; if (schedule != null ? !schedule.equals(that.schedule) : that.schedule != null) return false; if (!Arrays.equals(taskDefinitions, that.taskDefinitions)) return false; if (overlapAction != null ? !overlapAction.equals(that.overlapAction) : that.overlapAction != null) return false; if (!Arrays.equals(notifications, that.notifications)) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (processDefinitionName != null ? processDefinitionName.hashCode() : 0); result = 31 * result + (paused != null ? paused.hashCode() : 0); result = 31 * result + (processDescription != null ? processDescription.hashCode() : 0); result = 31 * result + (schedule != null ? schedule.hashCode() : 0); result = 31 * result + (taskDefinitions != null ? taskDefinitions.hashCode() : 0); result = 31 * result + (overlapAction != null ? overlapAction.hashCode() : 0); result = 31 * result + (notifications != null ? notifications.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.gilt.svc.sundial.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static ProcessDefinition parseJson(String json) throws IOException { return com.gilt.svc.sundial.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, ProcessDefinition.class); } }