GET | /config |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class ConfigurationReq
{
}
public static class Configuration extends Entity
{
public String category = null;
public HashMap<String,Country> countries = null;
public ArrayList<ListItem> listItems = null;
public HashMap<String,String> listRelationships = null;
public HashMap<String,ArrayList<String>> sectionElements = null;
public HashMap<String,SiteSection> siteStructure = null;
public Integer version = null;
public String createdBy = null;
public Date dateCreated = null;
public String updatedBy = null;
public Date dateUpdated = null;
public String getCategory() { return category; }
public Configuration setCategory(String value) { this.category = value; return this; }
public HashMap<String,Country> getCountries() { return countries; }
public Configuration setCountries(HashMap<String,Country> value) { this.countries = value; return this; }
public ArrayList<ListItem> getListItems() { return listItems; }
public Configuration setListItems(ArrayList<ListItem> value) { this.listItems = value; return this; }
public HashMap<String,String> getListRelationships() { return listRelationships; }
public Configuration setListRelationships(HashMap<String,String> value) { this.listRelationships = value; return this; }
public HashMap<String,ArrayList<String>> getSectionElements() { return sectionElements; }
public Configuration setSectionElements(HashMap<String,ArrayList<String>> value) { this.sectionElements = value; return this; }
public HashMap<String,SiteSection> getSiteStructure() { return siteStructure; }
public Configuration setSiteStructure(HashMap<String,SiteSection> value) { this.siteStructure = value; return this; }
public Integer getVersion() { return version; }
public Configuration setVersion(Integer value) { this.version = value; return this; }
public String getCreatedBy() { return createdBy; }
public Configuration setCreatedBy(String value) { this.createdBy = value; return this; }
public Date getDateCreated() { return dateCreated; }
public Configuration setDateCreated(Date value) { this.dateCreated = value; return this; }
public String getUpdatedBy() { return updatedBy; }
public Configuration setUpdatedBy(String value) { this.updatedBy = value; return this; }
public Date getDateUpdated() { return dateUpdated; }
public Configuration setDateUpdated(Date value) { this.dateUpdated = value; return this; }
}
public static class Entity implements IEntity
{
public String id = null;
public String getId() { return id; }
public Entity setId(String value) { this.id = value; return this; }
}
public static class Country
{
public String name = null;
public HashMap<String,String> languages = null;
public String getName() { return name; }
public Country setName(String value) { this.name = value; return this; }
public HashMap<String,String> getLanguages() { return languages; }
public Country setLanguages(HashMap<String,String> value) { this.languages = value; return this; }
}
public static class ListItem extends Entity
{
public String listId = null;
public String country = null;
public String relatedId = null;
public String code = null;
public String custom = null;
public String getListId() { return listId; }
public ListItem setListId(String value) { this.listId = value; return this; }
public String getCountry() { return country; }
public ListItem setCountry(String value) { this.country = value; return this; }
public String getRelatedId() { return relatedId; }
public ListItem setRelatedId(String value) { this.relatedId = value; return this; }
public String getCode() { return code; }
public ListItem setCode(String value) { this.code = value; return this; }
public String getCustom() { return custom; }
public ListItem setCustom(String value) { this.custom = value; return this; }
}
public static class SiteSection
{
public String route = null;
@SerializedName("public") public Boolean Public = null;
public String parent = null;
public Integer roles = null;
public ArrayList<String> hideFrom = null;
public Integer order = null;
public String getRoute() { return route; }
public SiteSection setRoute(String value) { this.route = value; return this; }
public Boolean isPublic() { return Public; }
public SiteSection setPublic(Boolean value) { this.Public = value; return this; }
public String getParent() { return parent; }
public SiteSection setParent(String value) { this.parent = value; return this; }
public Integer getRoles() { return roles; }
public SiteSection setRoles(Integer value) { this.roles = value; return this; }
public ArrayList<String> getHideFrom() { return hideFrom; }
public SiteSection setHideFrom(ArrayList<String> value) { this.hideFrom = value; return this; }
public Integer getOrder() { return order; }
public SiteSection setOrder(Integer value) { this.order = 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.
GET /config HTTP/1.1 Host: hcbtas-q-albamfs-api.azurewebsites.net Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { category: String, countries: { String: { name: String, languages: { String: String } } }, listItems: [ { listId: String, country: String, relatedId: String, code: String, custom: String, id: String } ], listRelationships: { String: String }, sectionElements: { String: [ String ] }, siteStructure: { String: { route: String, public: False, parent: String, roles: 0, hideFrom: [ String ], order: 0 } }, version: 0, createdBy: String, dateCreated: 0001-01-01, updatedBy: String, dateUpdated: 0001-01-01, id: String }