import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class HelloAllTypes
{
public String name = null;
public AllTypes allTypes = null;
public AllCollectionTypes allCollectionTypes = null;
public String getName() { return name; }
public HelloAllTypes setName(String value) { this.name = value; return this; }
public AllTypes getAllTypes() { return allTypes; }
public HelloAllTypes setAllTypes(AllTypes value) { this.allTypes = value; return this; }
public AllCollectionTypes getAllCollectionTypes() { return allCollectionTypes; }
public HelloAllTypes setAllCollectionTypes(AllCollectionTypes value) { this.allCollectionTypes = value; return this; }
}
public static class AllTypes implements IGet
{
public Integer id = null;
public Integer nullableId = null;
@SerializedName("byte") public Short Byte = null;
@SerializedName("short") public Short Short = null;
@SerializedName("int") public Integer Int = null;
@SerializedName("long") public Long Long = null;
public Integer uShort = null;
public Long uInt = null;
public BigInteger uLong = null;
@SerializedName("float") public Float Float = null;
@SerializedName("double") public Double Double = null;
public BigDecimal decimal = null;
public String string = null;
public Date dateTime = null;
public TimeSpan timeSpan = null;
public Date dateTimeOffset = null;
public UUID guid = null;
@SerializedName("char") public String Char = null;
public KeyValuePair<String, String> keyValuePair = null;
public Date nullableDateTime = null;
public TimeSpan nullableTimeSpan = null;
public ArrayList<String> stringList = new ArrayList<String>();
public ArrayList<String> stringArray = new ArrayList<String>();
public HashMap<String,String> stringMap = new HashMap<String,String>();
public HashMap<Integer,String> intStringMap = new HashMap<Integer,String>();
public SubType subType = null;
public String point = null;
@DataMember(Name="aliasedName")
@SerializedName("aliasedName")
public String originalName = null;
public Integer getId() { return id; }
public AllTypes setId(Integer value) { this.id = value; return this; }
public Integer getNullableId() { return nullableId; }
public AllTypes setNullableId(Integer value) { this.nullableId = value; return this; }
public Short getByte() { return Byte; }
public AllTypes setByte(Short value) { this.Byte = value; return this; }
public Short getShort() { return Short; }
public AllTypes setShort(Short value) { this.Short = value; return this; }
public Integer getInt() { return Int; }
public AllTypes setInt(Integer value) { this.Int = value; return this; }
public Long getLong() { return Long; }
public AllTypes setLong(Long value) { this.Long = value; return this; }
public Integer getUShort() { return uShort; }
public AllTypes setUShort(Integer value) { this.uShort = value; return this; }
public Long getUInt() { return uInt; }
public AllTypes setUInt(Long value) { this.uInt = value; return this; }
public BigInteger getULong() { return uLong; }
public AllTypes setULong(BigInteger value) { this.uLong = value; return this; }
public Float getFloat() { return Float; }
public AllTypes setFloat(Float value) { this.Float = value; return this; }
public Double getDouble() { return Double; }
public AllTypes setDouble(Double value) { this.Double = value; return this; }
public BigDecimal getDecimal() { return decimal; }
public AllTypes setDecimal(BigDecimal value) { this.decimal = value; return this; }
public String getString() { return string; }
public AllTypes setString(String value) { this.string = value; return this; }
public Date getDateTime() { return dateTime; }
public AllTypes setDateTime(Date value) { this.dateTime = value; return this; }
public TimeSpan getTimeSpan() { return timeSpan; }
public AllTypes setTimeSpan(TimeSpan value) { this.timeSpan = value; return this; }
public Date getDateTimeOffset() { return dateTimeOffset; }
public AllTypes setDateTimeOffset(Date value) { this.dateTimeOffset = value; return this; }
public UUID getGuid() { return guid; }
public AllTypes setGuid(UUID value) { this.guid = value; return this; }
public String getChar() { return Char; }
public AllTypes setChar(String value) { this.Char = value; return this; }
public KeyValuePair<String, String> getKeyValuePair() { return keyValuePair; }
public AllTypes setKeyValuePair(KeyValuePair<String, String> value) { this.keyValuePair = value; return this; }
public Date getNullableDateTime() { return nullableDateTime; }
public AllTypes setNullableDateTime(Date value) { this.nullableDateTime = value; return this; }
public TimeSpan getNullableTimeSpan() { return nullableTimeSpan; }
public AllTypes setNullableTimeSpan(TimeSpan value) { this.nullableTimeSpan = value; return this; }
public ArrayList<String> getStringList() { return stringList; }
public AllTypes setStringList(ArrayList<String> value) { this.stringList = value; return this; }
public ArrayList<String> getStringArray() { return stringArray; }
public AllTypes setStringArray(ArrayList<String> value) { this.stringArray = value; return this; }
public HashMap<String,String> getStringMap() { return stringMap; }
public AllTypes setStringMap(HashMap<String,String> value) { this.stringMap = value; return this; }
public HashMap<Integer,String> getIntStringMap() { return intStringMap; }
public AllTypes setIntStringMap(HashMap<Integer,String> value) { this.intStringMap = value; return this; }
public SubType getSubType() { return subType; }
public AllTypes setSubType(SubType value) { this.subType = value; return this; }
public String getPoint() { return point; }
public AllTypes setPoint(String value) { this.point = value; return this; }
public String getOriginalName() { return originalName; }
public AllTypes setOriginalName(String value) { this.originalName = value; return this; }
}
public static class SubType
{
public Integer id = null;
public String name = null;
public Integer getId() { return id; }
public SubType setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public SubType setName(String value) { this.name = value; return this; }
}
public static class AllCollectionTypes
{
public ArrayList<Integer> intArray = new ArrayList<Integer>();
public ArrayList<Integer> intList = new ArrayList<Integer>();
public ArrayList<String> stringArray = new ArrayList<String>();
public ArrayList<String> stringList = new ArrayList<String>();
public ArrayList<Poco> pocoArray = new ArrayList<Poco>();
public ArrayList<Poco> pocoList = new ArrayList<Poco>();
public ArrayList<Short> nullableByteArray = new ArrayList<Short>();
public ArrayList<Short> nullableByteList = new ArrayList<Short>();
public ArrayList<Date> nullableDateTimeArray = new ArrayList<Date>();
public ArrayList<Date> nullableDateTimeList = new ArrayList<Date>();
public HashMap<String,ArrayList<Poco>> pocoLookup = new HashMap<String,ArrayList<Poco>>();
public HashMap<String,ArrayList<HashMap<String,Poco>>> pocoLookupMap = new HashMap<String,ArrayList<HashMap<String,Poco>>>();
public ArrayList<Integer> getIntArray() { return intArray; }
public AllCollectionTypes setIntArray(ArrayList<Integer> value) { this.intArray = value; return this; }
public ArrayList<Integer> getIntList() { return intList; }
public AllCollectionTypes setIntList(ArrayList<Integer> value) { this.intList = value; return this; }
public ArrayList<String> getStringArray() { return stringArray; }
public AllCollectionTypes setStringArray(ArrayList<String> value) { this.stringArray = value; return this; }
public ArrayList<String> getStringList() { return stringList; }
public AllCollectionTypes setStringList(ArrayList<String> value) { this.stringList = value; return this; }
public ArrayList<Poco> getPocoArray() { return pocoArray; }
public AllCollectionTypes setPocoArray(ArrayList<Poco> value) { this.pocoArray = value; return this; }
public ArrayList<Poco> getPocoList() { return pocoList; }
public AllCollectionTypes setPocoList(ArrayList<Poco> value) { this.pocoList = value; return this; }
public ArrayList<Short> getNullableByteArray() { return nullableByteArray; }
public AllCollectionTypes setNullableByteArray(ArrayList<Short> value) { this.nullableByteArray = value; return this; }
public ArrayList<Short> getNullableByteList() { return nullableByteList; }
public AllCollectionTypes setNullableByteList(ArrayList<Short> value) { this.nullableByteList = value; return this; }
public ArrayList<Date> getNullableDateTimeArray() { return nullableDateTimeArray; }
public AllCollectionTypes setNullableDateTimeArray(ArrayList<Date> value) { this.nullableDateTimeArray = value; return this; }
public ArrayList<Date> getNullableDateTimeList() { return nullableDateTimeList; }
public AllCollectionTypes setNullableDateTimeList(ArrayList<Date> value) { this.nullableDateTimeList = value; return this; }
public HashMap<String,ArrayList<Poco>> getPocoLookup() { return pocoLookup; }
public AllCollectionTypes setPocoLookup(HashMap<String,ArrayList<Poco>> value) { this.pocoLookup = value; return this; }
public HashMap<String,ArrayList<HashMap<String,Poco>>> getPocoLookupMap() { return pocoLookupMap; }
public AllCollectionTypes setPocoLookupMap(HashMap<String,ArrayList<HashMap<String,Poco>>> value) { this.pocoLookupMap = value; return this; }
}
public static class Poco
{
public String name = null;
public String getName() { return name; }
public Poco setName(String value) { this.name = value; return this; }
}
public static class HelloAllTypesResponse
{
public String result = null;
public AllTypes allTypes = null;
public AllCollectionTypes allCollectionTypes = null;
public String getResult() { return result; }
public HelloAllTypesResponse setResult(String value) { this.result = value; return this; }
public AllTypes getAllTypes() { return allTypes; }
public HelloAllTypesResponse setAllTypes(AllTypes value) { this.allTypes = value; return this; }
public AllCollectionTypes getAllCollectionTypes() { return allCollectionTypes; }
public HelloAllTypesResponse setAllCollectionTypes(AllCollectionTypes value) { this.allCollectionTypes = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /json/reply/HelloAllTypes HTTP/1.1
Host: blazor-gallery.servicestack.net
Accept: application/json
Content-Type: application/json
Content-Length: length
{"name":"String","allTypes":{"id":0,"nullableId":0,"byte":0,"short":0,"int":0,"long":0,"uShort":0,"uInt":0,"uLong":0,"float":0,"double":0,"decimal":0,"string":"String","dateTime":"0001-01-01T00:00:00","timeSpan":"PT0S","dateTimeOffset":"0001-01-01T00:00:00+00:00","guid":"00000000-0000-0000-0000-000000000000","char":"\u0000","keyValuePair":{"key":"String","value":"String"},"nullableDateTime":"0001-01-01T00:00:00","nullableTimeSpan":"PT0S","stringList":["String"],"stringArray":["String"],"stringMap":{"String":"String"},"intStringMap":{"0":"String"},"subType":{"id":0,"name":"String"},"point":"0,0","aliasedName":"String"},"allCollectionTypes":{"intArray":[0],"intList":[0],"stringArray":["String"],"stringList":["String"],"pocoArray":[{"name":"String"}],"pocoList":[{"name":"String"}],"nullableByteArray":[0],"nullableByteList":[0],"nullableDateTimeArray":["0001-01-01T00:00:00"],"nullableDateTimeList":["0001-01-01T00:00:00"],"pocoLookup":{"String":[{"name":"String"}]},"pocoLookupMap":{"String":[{"String":{"name":"String"}}]}}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"result":"String","allTypes":{"id":0,"nullableId":0,"byte":0,"short":0,"int":0,"long":0,"uShort":0,"uInt":0,"uLong":0,"float":0,"double":0,"decimal":0,"string":"String","dateTime":"0001-01-01T00:00:00","timeSpan":"PT0S","dateTimeOffset":"0001-01-01T00:00:00+00:00","guid":"00000000-0000-0000-0000-000000000000","char":"\u0000","keyValuePair":{"key":"String","value":"String"},"nullableDateTime":"0001-01-01T00:00:00","nullableTimeSpan":"PT0S","stringList":["String"],"stringArray":["String"],"stringMap":{"String":"String"},"intStringMap":{"0":"String"},"subType":{"id":0,"name":"String"},"point":"0,0","aliasedName":"String"},"allCollectionTypes":{"intArray":[0],"intList":[0],"stringArray":["String"],"stringList":["String"],"pocoArray":[{"name":"String"}],"pocoList":[{"name":"String"}],"nullableByteArray":[0],"nullableByteList":[0],"nullableDateTimeArray":["0001-01-01T00:00:00"],"nullableDateTimeList":["0001-01-01T00:00:00"],"pocoLookup":{"String":[{"name":"String"}]},"pocoLookupMap":{"String":[{"String":{"name":"String"}}]}}}