| All Verbs | /api/timezones |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Get a list of timezones
*/
@Api(Description="Get a list of timezones")
public static class GetTimezones
{
}
@ApiResponse(Description="List of timezones matching the criteria")
public static class GetTimezonesResponse
{
public DataListModel Timezones = null;
public ResponseStatus ResponseStatus = null;
public DataListModel getTimezones() { return Timezones; }
public GetTimezonesResponse setTimezones(DataListModel value) { this.Timezones = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public GetTimezonesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class DataListModel
{
/**
* Guid of the List PKID.
*/
@ApiMember(DataType="Guid", Description="Guid of the List PKID.", IsRequired=true, Name="ListId", ParameterType="query")
public UUID ListId = null;
/**
* Name of the list.
*/
@ApiMember(DataType="String", Description="Name of the list.", Name="Name", ParameterType="query")
public String Name = null;
/**
* The owner of this item.
*/
@ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
public UUID OwnerContactId = null;
/**
* List Items in the list.
*/
@ApiMember(DataType="List<DataListItemModel>", Description="List Items in the list.", Name="ListItems", ParameterType="query")
public ArrayList<DataListItemModel> DataListItems = null;
public UUID getListId() { return ListId; }
public DataListModel setListId(UUID value) { this.ListId = value; return this; }
public String getName() { return Name; }
public DataListModel setName(String value) { this.Name = value; return this; }
public UUID getOwnerContactId() { return OwnerContactId; }
public DataListModel setOwnerContactId(UUID value) { this.OwnerContactId = value; return this; }
public ArrayList<DataListItemModel> getDataListItems() { return DataListItems; }
public DataListModel setDataListItems(ArrayList<DataListItemModel> value) { this.DataListItems = value; return this; }
}
public static class DataListItemModel
{
/**
* Guid of the list item PKID.
*/
@ApiMember(DataType="Guid", Description="Guid of the list item PKID.", IsRequired=true, Name="ListItemId", ParameterType="query")
public UUID ListItemId = null;
/**
* Name of the list item.
*/
@ApiMember(DataType="string", Description="Name of the list item.", Name="Name", ParameterType="query")
public String Name = null;
/**
* Short Version Name of the list item.
*/
@ApiMember(DataType="string", Description="Short Version Name of the list item.", Name="ShortName", ParameterType="query")
public String ShortName = null;
/**
* The primary image url
*/
@ApiMember(DataType="string", Description="The primary image url", Name="PrimaryImagePath", ParameterType="query")
public String PrimaryImagePath = null;
/**
* Record Status of the List Item (A=Active, I=Inactive, D=Deleted).
*/
@ApiMember(DataType="string", Description="Record Status of the List Item (A=Active, I=Inactive, D=Deleted).", Name="RecordStatus", ParameterType="query")
public String RecordStatus = null;
/**
* The order (if any) of this item in the list.
*/
@ApiMember(DataType="int", Description="The order (if any) of this item in the list.", Name="Order", ParameterType="query")
public Integer Order = null;
/**
* The owner of this item.
*/
@ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
public UUID OwnerContactId = null;
public ArrayList<Object> ExtraValues = null;
public UUID getListItemId() { return ListItemId; }
public DataListItemModel setListItemId(UUID value) { this.ListItemId = value; return this; }
public String getName() { return Name; }
public DataListItemModel setName(String value) { this.Name = value; return this; }
public String getShortName() { return ShortName; }
public DataListItemModel setShortName(String value) { this.ShortName = value; return this; }
public String getPrimaryImagePath() { return PrimaryImagePath; }
public DataListItemModel setPrimaryImagePath(String value) { this.PrimaryImagePath = value; return this; }
public String getRecordStatus() { return RecordStatus; }
public DataListItemModel setRecordStatus(String value) { this.RecordStatus = value; return this; }
public Integer getOrder() { return Order; }
public DataListItemModel setOrder(Integer value) { this.Order = value; return this; }
public UUID getOwnerContactId() { return OwnerContactId; }
public DataListItemModel setOwnerContactId(UUID value) { this.OwnerContactId = value; return this; }
public ArrayList<Object> getExtraValues() { return ExtraValues; }
public DataListItemModel setExtraValues(ArrayList<Object> value) { this.ExtraValues = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/timezones HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Timezones":{"ListId":"00000000-0000-0000-0000-000000000000","Name":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000","DataListItems":[{"ListItemId":"00000000-0000-0000-0000-000000000000","Name":"String","ShortName":"String","PrimaryImagePath":"String","RecordStatus":"String","Order":0,"OwnerContactId":"00000000-0000-0000-0000-000000000000","ExtraValues":[{}]}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}