import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class GetReportUnitSummary
{
@DataMember
public String unitId = null;
@DataMember
public Date date = null;
public String getUnitId() { return unitId; }
public GetReportUnitSummary setUnitId(String value) { this.unitId = value; return this; }
public Date getDate() { return date; }
public GetReportUnitSummary setDate(Date value) { this.date = value; return this; }
}
@DataContract
public static class GetReportUnitSummaryResponse
{
@DataMember
public ArrayList<UnitDaySummary> list = null;
@DataMember
public ResponseStatus responseStatus = null;
public ArrayList<UnitDaySummary> getList() { return list; }
public GetReportUnitSummaryResponse setList(ArrayList<UnitDaySummary> value) { this.list = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetReportUnitSummaryResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class UnitDaySummary
{
@DataMember
public String unitId = null;
@DataMember
public Date startTime = null;
@DataMember
public Location startLocation = null;
@DataMember
public Address startAddress = null;
@DataMember
public Date stopTime = null;
@DataMember
public Location stopLocation = null;
@DataMember
public Address stopAddress = null;
@DataMember
public Integer input1ChangeCounter = null;
@DataMember
public Integer input2ChangeCounter = null;
@DataMember
public Double run1 = null;
@DataMember
public Double run2 = null;
@DataMember
public Double run3 = null;
@DataMember
public Double run4 = null;
@DataMember
public Double runOdo = null;
@DataMember
public Double km = null;
public String getUnitId() { return unitId; }
public UnitDaySummary setUnitId(String value) { this.unitId = value; return this; }
public Date getStartTime() { return startTime; }
public UnitDaySummary setStartTime(Date value) { this.startTime = value; return this; }
public Location getStartLocation() { return startLocation; }
public UnitDaySummary setStartLocation(Location value) { this.startLocation = value; return this; }
public Address getStartAddress() { return startAddress; }
public UnitDaySummary setStartAddress(Address value) { this.startAddress = value; return this; }
public Date getStopTime() { return stopTime; }
public UnitDaySummary setStopTime(Date value) { this.stopTime = value; return this; }
public Location getStopLocation() { return stopLocation; }
public UnitDaySummary setStopLocation(Location value) { this.stopLocation = value; return this; }
public Address getStopAddress() { return stopAddress; }
public UnitDaySummary setStopAddress(Address value) { this.stopAddress = value; return this; }
public Integer getInput1ChangeCounter() { return input1ChangeCounter; }
public UnitDaySummary setInput1ChangeCounter(Integer value) { this.input1ChangeCounter = value; return this; }
public Integer getInput2ChangeCounter() { return input2ChangeCounter; }
public UnitDaySummary setInput2ChangeCounter(Integer value) { this.input2ChangeCounter = value; return this; }
public Double getRun1() { return run1; }
public UnitDaySummary setRun1(Double value) { this.run1 = value; return this; }
public Double getRun2() { return run2; }
public UnitDaySummary setRun2(Double value) { this.run2 = value; return this; }
public Double getRun3() { return run3; }
public UnitDaySummary setRun3(Double value) { this.run3 = value; return this; }
public Double getRun4() { return run4; }
public UnitDaySummary setRun4(Double value) { this.run4 = value; return this; }
public Double getRunOdo() { return runOdo; }
public UnitDaySummary setRunOdo(Double value) { this.runOdo = value; return this; }
public Double getKm() { return km; }
public UnitDaySummary setKm(Double value) { this.km = value; return this; }
}
@DataContract
public static class Location
{
@DataMember
public Double latitude = null;
@DataMember
public Double longitude = null;
public Double getLatitude() { return latitude; }
public Location setLatitude(Double value) { this.latitude = value; return this; }
public Double getLongitude() { return longitude; }
public Location setLongitude(Double value) { this.longitude = value; return this; }
}
@DataContract
public static class Address
{
@DataMember
public String country = null;
@DataMember
public String zipCode = null;
@DataMember
public String city = null;
@DataMember
public String streetAddress = null;
public String getCountry() { return country; }
public Address setCountry(String value) { this.country = value; return this; }
public String getZipCode() { return zipCode; }
public Address setZipCode(String value) { this.zipCode = value; return this; }
public String getCity() { return city; }
public Address setCity(String value) { this.city = value; return this; }
public String getStreetAddress() { return streetAddress; }
public Address setStreetAddress(String value) { this.streetAddress = value; return this; }
}
}
Java GetReportUnitSummary DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .soap12 suffix or ?format=soap12
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap12 HTTP/1.1
Host: api.trackunit.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetReportUnitSummary xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Date>0001-01-01T00:00:00</Date>
<UnitId>String</UnitId>
</GetReportUnitSummary>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetReportUnitSummaryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <List> <UnitDaySummary> <Input1ChangeCounter>0</Input1ChangeCounter> <Input2ChangeCounter>0</Input2ChangeCounter> <Km>0</Km> <Run1>0</Run1> <Run2>0</Run2> <Run3>0</Run3> <Run4>0</Run4> <RunOdo>0</RunOdo> <StartAddress> <City>String</City> <Country>String</Country> <StreetAddress>String</StreetAddress> <ZipCode>String</ZipCode> </StartAddress> <StartLocation> <Latitude>0</Latitude> <Longitude>0</Longitude> </StartLocation> <StartTime>0001-01-01T00:00:00</StartTime> <StopAddress> <City>String</City> <Country>String</Country> <StreetAddress>String</StreetAddress> <ZipCode>String</ZipCode> </StopAddress> <StopLocation> <Latitude>0</Latitude> <Longitude>0</Longitude> </StopLocation> <StopTime>0001-01-01T00:00:00</StopTime> <UnitId>String</UnitId> </UnitDaySummary> </List> <ResponseStatus> <ErrorCode>String</ErrorCode> <Message>String</Message> <StackTrace>String</StackTrace> <Errors> <ResponseError> <ErrorCode>String</ErrorCode> <FieldName>String</FieldName> <Message>String</Message> <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </Meta> </ResponseError> </Errors> <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </Meta> </ResponseStatus> </GetReportUnitSummaryResponse> </soap12:Body> </soap12:Envelope>