import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class GetReportUnitHistory
{
@DataMember
public String unitId = null;
@DataMember
public Date from = null;
@DataMember
public Date to = null;
public String getUnitId() { return unitId; }
public GetReportUnitHistory setUnitId(String value) { this.unitId = value; return this; }
public Date getFrom() { return from; }
public GetReportUnitHistory setFrom(Date value) { this.from = value; return this; }
public Date getTo() { return to; }
public GetReportUnitHistory setTo(Date value) { this.to = value; return this; }
}
@DataContract
public static class GetReportUnitHistoryResponse
{
@DataMember
public ArrayList<UnitHistory> list = null;
@DataMember
public ResponseStatus responseStatus = null;
public ArrayList<UnitHistory> getList() { return list; }
public GetReportUnitHistoryResponse setList(ArrayList<UnitHistory> value) { this.list = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public GetReportUnitHistoryResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class UnitHistory
{
@DataMember
public Date time = null;
@DataMember
public Integer event = null;
@DataMember
public String keyId = null;
@DataMember
public Location location = null;
@DataMember
public Address address = null;
@DataMember
public Integer heading = null;
@DataMember
public Double speed = null;
@DataMember
public Double km = 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 temperature1 = null;
@DataMember
public Double temperature2 = null;
@DataMember
public Boolean input1 = null;
@DataMember
public Boolean input2 = null;
@DataMember
public Boolean input3 = null;
@DataMember
public Boolean input4 = null;
@DataMember
public Boolean input5 = null;
@DataMember
public Boolean input6 = null;
@DataMember
public Boolean input7 = null;
@DataMember
public Boolean input8 = null;
@DataMember
public Boolean input9 = null;
@DataMember
public Boolean input10 = null;
@DataMember
public Boolean output1 = null;
@DataMember
public Boolean output2 = null;
@DataMember
public Boolean output3 = null;
@DataMember
public Boolean output4 = null;
@DataMember
public Boolean output5 = null;
@DataMember
public Double analogInput1 = null;
@DataMember
public Double analogInput2 = null;
@DataMember
public Double analogInput4 = null;
@DataMember
public Integer input1ChangeCounter = null;
@DataMember
public Integer input2ChangeCounter = null;
@DataMember
public Integer input3ChangeCounter = null;
@DataMember
public Integer input4ChangeCounter = null;
@DataMember
public Double batteryLevel = null;
@DataMember
public Double externalPower = null;
public Date getTime() { return time; }
public UnitHistory setTime(Date value) { this.time = value; return this; }
public Integer getEvent() { return event; }
public UnitHistory setEvent(Integer value) { this.event = value; return this; }
public String getKeyId() { return keyId; }
public UnitHistory setKeyId(String value) { this.keyId = value; return this; }
public Location getLocation() { return location; }
public UnitHistory setLocation(Location value) { this.location = value; return this; }
public Address getAddress() { return address; }
public UnitHistory setAddress(Address value) { this.address = value; return this; }
public Integer getHeading() { return heading; }
public UnitHistory setHeading(Integer value) { this.heading = value; return this; }
public Double getSpeed() { return speed; }
public UnitHistory setSpeed(Double value) { this.speed = value; return this; }
public Double getKm() { return km; }
public UnitHistory setKm(Double value) { this.km = value; return this; }
public Double getRun1() { return run1; }
public UnitHistory setRun1(Double value) { this.run1 = value; return this; }
public Double getRun2() { return run2; }
public UnitHistory setRun2(Double value) { this.run2 = value; return this; }
public Double getRun3() { return run3; }
public UnitHistory setRun3(Double value) { this.run3 = value; return this; }
public Double getRun4() { return run4; }
public UnitHistory setRun4(Double value) { this.run4 = value; return this; }
public Double getRunOdo() { return runOdo; }
public UnitHistory setRunOdo(Double value) { this.runOdo = value; return this; }
public Double getTemperature1() { return temperature1; }
public UnitHistory setTemperature1(Double value) { this.temperature1 = value; return this; }
public Double getTemperature2() { return temperature2; }
public UnitHistory setTemperature2(Double value) { this.temperature2 = value; return this; }
public Boolean isInput1() { return input1; }
public UnitHistory setInput1(Boolean value) { this.input1 = value; return this; }
public Boolean isInput2() { return input2; }
public UnitHistory setInput2(Boolean value) { this.input2 = value; return this; }
public Boolean isInput3() { return input3; }
public UnitHistory setInput3(Boolean value) { this.input3 = value; return this; }
public Boolean isInput4() { return input4; }
public UnitHistory setInput4(Boolean value) { this.input4 = value; return this; }
public Boolean isInput5() { return input5; }
public UnitHistory setInput5(Boolean value) { this.input5 = value; return this; }
public Boolean isInput6() { return input6; }
public UnitHistory setInput6(Boolean value) { this.input6 = value; return this; }
public Boolean isInput7() { return input7; }
public UnitHistory setInput7(Boolean value) { this.input7 = value; return this; }
public Boolean isInput8() { return input8; }
public UnitHistory setInput8(Boolean value) { this.input8 = value; return this; }
public Boolean isInput9() { return input9; }
public UnitHistory setInput9(Boolean value) { this.input9 = value; return this; }
public Boolean isInput10() { return input10; }
public UnitHistory setInput10(Boolean value) { this.input10 = value; return this; }
public Boolean isOutput1() { return output1; }
public UnitHistory setOutput1(Boolean value) { this.output1 = value; return this; }
public Boolean isOutput2() { return output2; }
public UnitHistory setOutput2(Boolean value) { this.output2 = value; return this; }
public Boolean isOutput3() { return output3; }
public UnitHistory setOutput3(Boolean value) { this.output3 = value; return this; }
public Boolean isOutput4() { return output4; }
public UnitHistory setOutput4(Boolean value) { this.output4 = value; return this; }
public Boolean isOutput5() { return output5; }
public UnitHistory setOutput5(Boolean value) { this.output5 = value; return this; }
public Double getAnalogInput1() { return analogInput1; }
public UnitHistory setAnalogInput1(Double value) { this.analogInput1 = value; return this; }
public Double getAnalogInput2() { return analogInput2; }
public UnitHistory setAnalogInput2(Double value) { this.analogInput2 = value; return this; }
public Double getAnalogInput4() { return analogInput4; }
public UnitHistory setAnalogInput4(Double value) { this.analogInput4 = value; return this; }
public Integer getInput1ChangeCounter() { return input1ChangeCounter; }
public UnitHistory setInput1ChangeCounter(Integer value) { this.input1ChangeCounter = value; return this; }
public Integer getInput2ChangeCounter() { return input2ChangeCounter; }
public UnitHistory setInput2ChangeCounter(Integer value) { this.input2ChangeCounter = value; return this; }
public Integer getInput3ChangeCounter() { return input3ChangeCounter; }
public UnitHistory setInput3ChangeCounter(Integer value) { this.input3ChangeCounter = value; return this; }
public Integer getInput4ChangeCounter() { return input4ChangeCounter; }
public UnitHistory setInput4ChangeCounter(Integer value) { this.input4ChangeCounter = value; return this; }
public Double getBatteryLevel() { return batteryLevel; }
public UnitHistory setBatteryLevel(Double value) { this.batteryLevel = value; return this; }
public Double getExternalPower() { return externalPower; }
public UnitHistory setExternalPower(Double value) { this.externalPower = 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 GetReportUnitHistory 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>
<GetReportUnitHistory xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<From>0001-01-01T00:00:00</From>
<To>0001-01-01T00:00:00</To>
<UnitId>String</UnitId>
</GetReportUnitHistory>
</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> <GetReportUnitHistoryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <List> <UnitHistory> <Address> <City>String</City> <Country>String</Country> <StreetAddress>String</StreetAddress> <ZipCode>String</ZipCode> </Address> <AnalogInput1>0</AnalogInput1> <AnalogInput2>0</AnalogInput2> <AnalogInput4>0</AnalogInput4> <BatteryLevel>0</BatteryLevel> <Event>0</Event> <ExternalPower>0</ExternalPower> <Heading>0</Heading> <Input1>false</Input1> <Input10>false</Input10> <Input1ChangeCounter>0</Input1ChangeCounter> <Input2>false</Input2> <Input2ChangeCounter>0</Input2ChangeCounter> <Input3>false</Input3> <Input3ChangeCounter>0</Input3ChangeCounter> <Input4>false</Input4> <Input4ChangeCounter>0</Input4ChangeCounter> <Input5>false</Input5> <Input6>false</Input6> <Input7>false</Input7> <Input8>false</Input8> <Input9>false</Input9> <KeyId>String</KeyId> <Km>0</Km> <Location> <Latitude>0</Latitude> <Longitude>0</Longitude> </Location> <Output1>false</Output1> <Output2>false</Output2> <Output3>false</Output3> <Output4>false</Output4> <Output5>false</Output5> <Run1>0</Run1> <Run2>0</Run2> <Run3>0</Run3> <Run4>0</Run4> <RunOdo>0</RunOdo> <Speed>0</Speed> <Temperature1>0</Temperature1> <Temperature2>0</Temperature2> <Time>0001-01-01T00:00:00</Time> </UnitHistory> </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> </GetReportUnitHistoryResponse> </soap12:Body> </soap12:Envelope>