71 lines
2.1 KiB
Java
71 lines
2.1 KiB
Java
package dev.evercatch.model;
|
|
|
|
import com.google.gson.JsonObject;
|
|
import com.google.gson.annotations.SerializedName;
|
|
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* A webhook event captured by Evercatch.
|
|
*/
|
|
public class Event {
|
|
|
|
private String id;
|
|
private String provider;
|
|
|
|
@SerializedName("event_type")
|
|
private String eventType;
|
|
|
|
private String status;
|
|
private JsonObject payload;
|
|
private JsonObject headers;
|
|
|
|
@SerializedName("destination_id")
|
|
private String destinationId;
|
|
|
|
@SerializedName("retry_count")
|
|
private int retryCount;
|
|
|
|
@SerializedName("created_at")
|
|
private Date createdAt;
|
|
|
|
@SerializedName("processed_at")
|
|
private Date processedAt;
|
|
|
|
public String getId() { return id; }
|
|
public void setId(String id) { this.id = id; }
|
|
|
|
public String getProvider() { return provider; }
|
|
public void setProvider(String provider) { this.provider = provider; }
|
|
|
|
public String getEventType() { return eventType; }
|
|
public void setEventType(String eventType) { this.eventType = eventType; }
|
|
|
|
public String getStatus() { return status; }
|
|
public void setStatus(String status) { this.status = status; }
|
|
|
|
public JsonObject getPayload() { return payload; }
|
|
public void setPayload(JsonObject payload) { this.payload = payload; }
|
|
|
|
public JsonObject getHeaders() { return headers; }
|
|
public void setHeaders(JsonObject headers) { this.headers = headers; }
|
|
|
|
public String getDestinationId() { return destinationId; }
|
|
public void setDestinationId(String destinationId) { this.destinationId = destinationId; }
|
|
|
|
public int getRetryCount() { return retryCount; }
|
|
public void setRetryCount(int retryCount) { this.retryCount = retryCount; }
|
|
|
|
public Date getCreatedAt() { return createdAt; }
|
|
public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
|
|
|
|
public Date getProcessedAt() { return processedAt; }
|
|
public void setProcessedAt(Date processedAt) { this.processedAt = processedAt; }
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Event{id='" + id + "', provider='" + provider + "', eventType='" + eventType
|
|
+ "', status='" + status + "'}";
|
|
}
|
|
}
|