| GET | /DocumentPolicy/GetById |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetDocumentPolicyByIdRequest implements IGet
{
public Integer id = null;
public Integer getId() { return id; }
public GetDocumentPolicyByIdRequest setId(Integer value) { this.id = value; return this; }
}
public static class DocumentPolicy extends UpdateDocumentPolicyModel
{
public Date approvedDate = null;
public Date estimatedDeadline = null;
public Boolean isApproved = null;
@Required()
public Integer createdBy = null;
public Date createdDate = null;
public Date deletedAt = null;
public Integer deletedBy = null;
public String approvalComment = null;
public Boolean isDeleted = null;
public Date lastUpdateAt = null;
public Integer updatedBy = null;
public Date getApprovedDate() { return approvedDate; }
public DocumentPolicy setApprovedDate(Date value) { this.approvedDate = value; return this; }
public Date getEstimatedDeadline() { return estimatedDeadline; }
public DocumentPolicy setEstimatedDeadline(Date value) { this.estimatedDeadline = value; return this; }
public Boolean getIsApproved() { return isApproved; }
public DocumentPolicy setIsApproved(Boolean value) { this.isApproved = value; return this; }
public Integer getCreatedBy() { return createdBy; }
public DocumentPolicy setCreatedBy(Integer value) { this.createdBy = value; return this; }
public Date getCreatedDate() { return createdDate; }
public DocumentPolicy setCreatedDate(Date value) { this.createdDate = value; return this; }
public Date getDeletedAt() { return deletedAt; }
public DocumentPolicy setDeletedAt(Date value) { this.deletedAt = value; return this; }
public Integer getDeletedBy() { return deletedBy; }
public DocumentPolicy setDeletedBy(Integer value) { this.deletedBy = value; return this; }
public String getApprovalComment() { return approvalComment; }
public DocumentPolicy setApprovalComment(String value) { this.approvalComment = value; return this; }
public Boolean getIsDeleted() { return isDeleted; }
public DocumentPolicy setIsDeleted(Boolean value) { this.isDeleted = value; return this; }
public Date getLastUpdateAt() { return lastUpdateAt; }
public DocumentPolicy setLastUpdateAt(Date value) { this.lastUpdateAt = value; return this; }
public Integer getUpdatedBy() { return updatedBy; }
public DocumentPolicy setUpdatedBy(Integer value) { this.updatedBy = value; return this; }
}
public static class UpdateDocumentPolicyModel
{
public Integer id = null;
public String policyCode = null;
public String title = null;
public String documentLink = null;
public Integer documentGroupId = null;
public String description = null;
public Integer approvedBy = null;
@Required()
public Integer departmentLeadId = null;
public Integer departmentCoId = null;
public Integer getId() { return id; }
public UpdateDocumentPolicyModel setId(Integer value) { this.id = value; return this; }
public String getPolicyCode() { return policyCode; }
public UpdateDocumentPolicyModel setPolicyCode(String value) { this.policyCode = value; return this; }
public String getTitle() { return title; }
public UpdateDocumentPolicyModel setTitle(String value) { this.title = value; return this; }
public String getDocumentLink() { return documentLink; }
public UpdateDocumentPolicyModel setDocumentLink(String value) { this.documentLink = value; return this; }
public Integer getDocumentGroupId() { return documentGroupId; }
public UpdateDocumentPolicyModel setDocumentGroupId(Integer value) { this.documentGroupId = value; return this; }
public String getDescription() { return description; }
public UpdateDocumentPolicyModel setDescription(String value) { this.description = value; return this; }
public Integer getApprovedBy() { return approvedBy; }
public UpdateDocumentPolicyModel setApprovedBy(Integer value) { this.approvedBy = value; return this; }
public Integer getDepartmentLeadId() { return departmentLeadId; }
public UpdateDocumentPolicyModel setDepartmentLeadId(Integer value) { this.departmentLeadId = value; return this; }
public Integer getDepartmentCoId() { return departmentCoId; }
public UpdateDocumentPolicyModel setDepartmentCoId(Integer value) { this.departmentCoId = value; return this; }
}
}
Java GetDocumentPolicyByIdRequest 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 /DocumentPolicy/GetById HTTP/1.1 Host: etc-api.vsmlab.vn Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
approvedDate: "0001-01-01T00:00:00.0000000+07:06",
estimatedDeadline: "0001-01-01T00:00:00.0000000+07:06",
isApproved: False,
createdBy: 0,
deletedAt: "0001-01-01T00:00:00.0000000+07:06",
deletedBy: 0,
approvalComment: String,
isDeleted: False,
lastUpdateAt: "0001-01-01T00:00:00.0000000+07:06",
updatedBy: 0,
id: 0,
policyCode: String,
title: String,
documentLink: String,
documentGroupId: 0,
description: String,
approvedBy: 0,
departmentLeadId: 0,
departmentCoId: 0
}