| GET | /template-approval/list |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class TemplateApprovalList extends ApiServiceRequest
{
}
public static class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
{
/**
* The API Key required for authentication
*/
@ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
public String apiKey = null;
/**
* Latitude of the user making this request
*/
@ApiMember(DataType="double", Description="Latitude of the user making this request")
public Double latitude = null;
/**
* Longitude of the user making this request
*/
@ApiMember(DataType="double", Description="Longitude of the user making this request")
public Double longitude = null;
public String getApiKey() { return apiKey; }
public ApiServiceRequest setApiKey(String value) { this.apiKey = value; return this; }
public Double getLatitude() { return latitude; }
public ApiServiceRequest setLatitude(Double value) { this.latitude = value; return this; }
public Double getLongitude() { return longitude; }
public ApiServiceRequest setLongitude(Double value) { this.longitude = value; return this; }
}
public static class TemplateApprovalListResponse extends ApiServiceResponse
{
public ArrayList<TemplateApprovalListItem> templates = null;
public ArrayList<TemplateApprovalListItem> getTemplates() { return templates; }
public TemplateApprovalListResponse setTemplates(ArrayList<TemplateApprovalListItem> value) { this.templates = value; return this; }
}
public static class ApiServiceResponse implements IServiceResponse
{
public String description = null;
public String heading = null;
public Boolean wasSuccessful = null;
public Object modelState = null;
public String getDescription() { return description; }
public ApiServiceResponse setDescription(String value) { this.description = value; return this; }
public String getHeading() { return heading; }
public ApiServiceResponse setHeading(String value) { this.heading = value; return this; }
public Boolean isWasSuccessful() { return wasSuccessful; }
public ApiServiceResponse setWasSuccessful(Boolean value) { this.wasSuccessful = value; return this; }
public Object getModelState() { return modelState; }
public ApiServiceResponse setModelState(Object value) { this.modelState = value; return this; }
}
public static class TemplateApprovalListItem
{
public UUID userCrmId = null;
public String approvalDate = null;
public Integer templateApprovalId = null;
public TemplateApprovalStatus approvalStatus = null;
public String approvalStatusString = null;
public TemplateType templateType = null;
public String templateTypeString = null;
public String templateName = null;
public String systemUserName = null;
public ArrayList<SectionSummary> templateChangeDetail = null;
public ArrayList<SectionSummary> templateDetail = null;
public String content = null;
public UUID getUserCrmId() { return userCrmId; }
public TemplateApprovalListItem setUserCrmId(UUID value) { this.userCrmId = value; return this; }
public String getApprovalDate() { return approvalDate; }
public TemplateApprovalListItem setApprovalDate(String value) { this.approvalDate = value; return this; }
public Integer getTemplateApprovalId() { return templateApprovalId; }
public TemplateApprovalListItem setTemplateApprovalId(Integer value) { this.templateApprovalId = value; return this; }
public TemplateApprovalStatus getApprovalStatus() { return approvalStatus; }
public TemplateApprovalListItem setApprovalStatus(TemplateApprovalStatus value) { this.approvalStatus = value; return this; }
public String getApprovalStatusString() { return approvalStatusString; }
public TemplateApprovalListItem setApprovalStatusString(String value) { this.approvalStatusString = value; return this; }
public TemplateType getTemplateType() { return templateType; }
public TemplateApprovalListItem setTemplateType(TemplateType value) { this.templateType = value; return this; }
public String getTemplateTypeString() { return templateTypeString; }
public TemplateApprovalListItem setTemplateTypeString(String value) { this.templateTypeString = value; return this; }
public String getTemplateName() { return templateName; }
public TemplateApprovalListItem setTemplateName(String value) { this.templateName = value; return this; }
public String getSystemUserName() { return systemUserName; }
public TemplateApprovalListItem setSystemUserName(String value) { this.systemUserName = value; return this; }
public ArrayList<SectionSummary> getTemplateChangeDetail() { return templateChangeDetail; }
public TemplateApprovalListItem setTemplateChangeDetail(ArrayList<SectionSummary> value) { this.templateChangeDetail = value; return this; }
public ArrayList<SectionSummary> getTemplateDetail() { return templateDetail; }
public TemplateApprovalListItem setTemplateDetail(ArrayList<SectionSummary> value) { this.templateDetail = value; return this; }
public String getContent() { return content; }
public TemplateApprovalListItem setContent(String value) { this.content = value; return this; }
}
public static enum TemplateApprovalStatus
{
@SerializedName("0") AwaitingApproval(0),
@SerializedName("1") Rejected(1),
@SerializedName("2") Approved(2);
private final int value;
TemplateApprovalStatus(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum TemplateType
{
@SerializedName("0") Introductory(0),
@SerializedName("1") Refresher(1);
private final int value;
TemplateType(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class SectionSummary
{
public SectionTitle title = null;
public String titleString = null;
public Integer sectionId = null;
public String sectionName = null;
public SectionTitle getTitle() { return title; }
public SectionSummary setTitle(SectionTitle value) { this.title = value; return this; }
public String getTitleString() { return titleString; }
public SectionSummary setTitleString(String value) { this.titleString = value; return this; }
public Integer getSectionId() { return sectionId; }
public SectionSummary setSectionId(Integer value) { this.sectionId = value; return this; }
public String getSectionName() { return sectionName; }
public SectionSummary setSectionName(String value) { this.sectionName = value; return this; }
}
public static enum SectionTitle
{
@SerializedName("0") Welcome(0),
@SerializedName("1") Cochrane(1),
@SerializedName("2") Iconic(2),
@SerializedName("3") OurBestWork(3),
@SerializedName("4") RealityOfRisk(4),
@SerializedName("5") ProductRange(5),
@SerializedName("6") ProductDeployments(6),
@SerializedName("7") Industries(7),
@SerializedName("8") ClearVu(8),
@SerializedName("9") CaseStudies(9),
@SerializedName("10") Expertise(10),
@SerializedName("11") Media(11),
@SerializedName("12") ThankYou(12),
@SerializedName("13") ClearVuRange(13),
@SerializedName("14") Presentations(14),
@SerializedName("15") LegacyVideos(15);
private final int value;
SectionTitle(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
}
Java TemplateApprovalList DTOs
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 /template-approval/list HTTP/1.1 Host: cochraneplus-api-dev.happen.zone Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
templates:
[
{
}
],
description: String,
heading: String,
wasSuccessful: False,
modelState: {}
}