| PUT | /growth_curves/{Id} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class GrowthCurvesEdit
{
@DataMember(Order=1)
@Validate(Validator="NotNull")
public Long id = null;
@DataMember(Order=2)
@Validate(Validator="NotNull")
public Long tenantsId = null;
@DataMember(Order=3)
@Validate(Validator="NotNull")
public Long zonesId = null;
@DataMember(Order=4)
@Validate(Validator="NotNull")
public Long varietiesId = null;
@DataMember(Order=5)
@Validate(Validator="NotNull")
public Integer weekNumber = null;
@DataMember(Order=6)
@Validate(Validator="NotNull")
public Double cropHeight = null;
public Long getId() { return id; }
public GrowthCurvesEdit setId(Long value) { this.id = value; return this; }
public Long getTenantsId() { return tenantsId; }
public GrowthCurvesEdit setTenantsId(Long value) { this.tenantsId = value; return this; }
public Long getZonesId() { return zonesId; }
public GrowthCurvesEdit setZonesId(Long value) { this.zonesId = value; return this; }
public Long getVarietiesId() { return varietiesId; }
public GrowthCurvesEdit setVarietiesId(Long value) { this.varietiesId = value; return this; }
public Integer getWeekNumber() { return weekNumber; }
public GrowthCurvesEdit setWeekNumber(Integer value) { this.weekNumber = value; return this; }
public Double getCropHeight() { return cropHeight; }
public GrowthCurvesEdit setCropHeight(Double value) { this.cropHeight = value; return this; }
}
public static class GrowthCurvesEditResponse
{
@DataMember(Order=1)
public Long id = null;
@DataMember(Order=2)
public Long tenantsId = null;
@DataMember(Order=3)
public Long zonesId = null;
@DataMember(Order=4)
public Long varietiesId = null;
@DataMember(Order=5)
public Integer weekNumber = null;
@DataMember(Order=6)
public Double cropHeight = null;
@DataMember(Order=7)
public ResponseStatus responseStatus = null;
public Long getId() { return id; }
public GrowthCurvesEditResponse setId(Long value) { this.id = value; return this; }
public Long getTenantsId() { return tenantsId; }
public GrowthCurvesEditResponse setTenantsId(Long value) { this.tenantsId = value; return this; }
public Long getZonesId() { return zonesId; }
public GrowthCurvesEditResponse setZonesId(Long value) { this.zonesId = value; return this; }
public Long getVarietiesId() { return varietiesId; }
public GrowthCurvesEditResponse setVarietiesId(Long value) { this.varietiesId = value; return this; }
public Integer getWeekNumber() { return weekNumber; }
public GrowthCurvesEditResponse setWeekNumber(Integer value) { this.weekNumber = value; return this; }
public Double getCropHeight() { return cropHeight; }
public GrowthCurvesEditResponse setCropHeight(Double value) { this.cropHeight = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GrowthCurvesEditResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
}
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.
PUT /growth_curves/{Id} HTTP/1.1
Host: sfgboxapi.dev.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: 0,
tenantsId: 0,
zonesId: 0,
varietiesId: 0,
weekNumber: 0,
cropHeight: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: 0,
tenantsId: 0,
zonesId: 0,
varietiesId: 0,
weekNumber: 0,
cropHeight: 0,
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}