| POST | /JobHeartbeat |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class JobHeartbeatReportRequest
{
public String jobName = null;
public String phase = null;
public Integer expectedIntervalMinutes = null;
public String description = null;
public Long itemsProcessed = null;
public String resultJson = null;
public String getJobName() { return jobName; }
public JobHeartbeatReportRequest setJobName(String value) { this.jobName = value; return this; }
public String getPhase() { return phase; }
public JobHeartbeatReportRequest setPhase(String value) { this.phase = value; return this; }
public Integer getExpectedIntervalMinutes() { return expectedIntervalMinutes; }
public JobHeartbeatReportRequest setExpectedIntervalMinutes(Integer value) { this.expectedIntervalMinutes = value; return this; }
public String getDescription() { return description; }
public JobHeartbeatReportRequest setDescription(String value) { this.description = value; return this; }
public Long getItemsProcessed() { return itemsProcessed; }
public JobHeartbeatReportRequest setItemsProcessed(Long value) { this.itemsProcessed = value; return this; }
public String getResultJson() { return resultJson; }
public JobHeartbeatReportRequest setResultJson(String value) { this.resultJson = value; return this; }
}
public static class JobHeartbeatResult
{
public JobHeartbeat item = null;
public Integer statusCode = null;
public String message = null;
public JobHeartbeat getItem() { return item; }
public JobHeartbeatResult setItem(JobHeartbeat value) { this.item = value; return this; }
public Integer getStatusCode() { return statusCode; }
public JobHeartbeatResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public JobHeartbeatResult setMessage(String value) { this.message = value; return this; }
}
public static class JobHeartbeat
{
@StringLength(100)
public String jobName = null;
@StringLength(400)
public String description = null;
public Integer expectedIntervalMinutes = null;
public Date lastRunAt = null;
public Date lastOkAt = null;
@StringLength(2147483647)
public String lastResultJson = null;
public Long itemsProcessed = null;
public Integer consecutiveFailures = null;
public Boolean enabled = null;
public Date updatedAt = null;
public String getJobName() { return jobName; }
public JobHeartbeat setJobName(String value) { this.jobName = value; return this; }
public String getDescription() { return description; }
public JobHeartbeat setDescription(String value) { this.description = value; return this; }
public Integer getExpectedIntervalMinutes() { return expectedIntervalMinutes; }
public JobHeartbeat setExpectedIntervalMinutes(Integer value) { this.expectedIntervalMinutes = value; return this; }
public Date getLastRunAt() { return lastRunAt; }
public JobHeartbeat setLastRunAt(Date value) { this.lastRunAt = value; return this; }
public Date getLastOkAt() { return lastOkAt; }
public JobHeartbeat setLastOkAt(Date value) { this.lastOkAt = value; return this; }
public String getLastResultJson() { return lastResultJson; }
public JobHeartbeat setLastResultJson(String value) { this.lastResultJson = value; return this; }
public Long getItemsProcessed() { return itemsProcessed; }
public JobHeartbeat setItemsProcessed(Long value) { this.itemsProcessed = value; return this; }
public Integer getConsecutiveFailures() { return consecutiveFailures; }
public JobHeartbeat setConsecutiveFailures(Integer value) { this.consecutiveFailures = value; return this; }
public Boolean isEnabled() { return enabled; }
public JobHeartbeat setEnabled(Boolean value) { this.enabled = value; return this; }
public Date getUpdatedAt() { return updatedAt; }
public JobHeartbeat setUpdatedAt(Date value) { this.updatedAt = value; return this; }
}
}
Java JobHeartbeatReportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /JobHeartbeat HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
jobName: String,
phase: String,
expectedIntervalMinutes: 0,
description: String,
itemsProcessed: 0,
resultJson: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
item:
{
jobName: String,
description: String,
expectedIntervalMinutes: 0,
lastRunAt: 0001-01-01,
lastOkAt: 0001-01-01,
lastResultJson: String,
itemsProcessed: 0,
consecutiveFailures: 0,
enabled: False,
updatedAt: 0001-01-01
},
statusCode: 0,
message: String
}