| GET | /equipment/{Id} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetEquipmentByIdRequest
{
public Integer id = null;
public Integer getId() { return id; }
public GetEquipmentByIdRequest setId(Integer value) { this.id = value; return this; }
}
public static class Equipment
{
public Integer id = null;
@Required()
@StringLength(500)
public String name = null;
@StringLength(1000)
public String imageUrl = null;
public String description = null;
@StringLength(50)
public String unit = null;
public Integer materialTypeId = null;
public Integer status = null;
public Boolean isDeleted = null;
public Date approvedAt = null;
public Integer approvedBy = null;
public Date createdAt = null;
public Integer createdBy = null;
public Date updatedAt = null;
public Integer updatedBy = null;
@Ignore()
public String materialTypeName = null;
@Ignore()
public String createdByName = null;
@Ignore()
public String approvedByName = null;
public Integer getId() { return id; }
public Equipment setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public Equipment setName(String value) { this.name = value; return this; }
public String getImageUrl() { return imageUrl; }
public Equipment setImageUrl(String value) { this.imageUrl = value; return this; }
public String getDescription() { return description; }
public Equipment setDescription(String value) { this.description = value; return this; }
public String getUnit() { return unit; }
public Equipment setUnit(String value) { this.unit = value; return this; }
public Integer getMaterialTypeId() { return materialTypeId; }
public Equipment setMaterialTypeId(Integer value) { this.materialTypeId = value; return this; }
public Integer getStatus() { return status; }
public Equipment setStatus(Integer value) { this.status = value; return this; }
public Boolean getIsDeleted() { return isDeleted; }
public Equipment setIsDeleted(Boolean value) { this.isDeleted = value; return this; }
public Date getApprovedAt() { return approvedAt; }
public Equipment setApprovedAt(Date value) { this.approvedAt = value; return this; }
public Integer getApprovedBy() { return approvedBy; }
public Equipment setApprovedBy(Integer value) { this.approvedBy = value; return this; }
public Date getCreatedAt() { return createdAt; }
public Equipment setCreatedAt(Date value) { this.createdAt = value; return this; }
public Integer getCreatedBy() { return createdBy; }
public Equipment setCreatedBy(Integer value) { this.createdBy = value; return this; }
public Date getUpdatedAt() { return updatedAt; }
public Equipment setUpdatedAt(Date value) { this.updatedAt = value; return this; }
public Integer getUpdatedBy() { return updatedBy; }
public Equipment setUpdatedBy(Integer value) { this.updatedBy = value; return this; }
public String getMaterialTypeName() { return materialTypeName; }
public Equipment setMaterialTypeName(String value) { this.materialTypeName = value; return this; }
public String getCreatedByName() { return createdByName; }
public Equipment setCreatedByName(String value) { this.createdByName = value; return this; }
public String getApprovedByName() { return approvedByName; }
public Equipment setApprovedByName(String value) { this.approvedByName = value; return this; }
}
}
Java GetEquipmentByIdRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /equipment/{Id} HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <Equipment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models"> <ApprovedAt>0001-01-01T00:00:00</ApprovedAt> <ApprovedBy>0</ApprovedBy> <ApprovedByName>String</ApprovedByName> <CreatedAt>0001-01-01T00:00:00</CreatedAt> <CreatedBy>0</CreatedBy> <CreatedByName>String</CreatedByName> <DeletedAt>0001-01-01T00:00:00</DeletedAt> <DeletedBy>0</DeletedBy> <Description>String</Description> <Id>0</Id> <ImageUrl>String</ImageUrl> <IsDeleted>false</IsDeleted> <MaterialTypeId>0</MaterialTypeId> <MaterialTypeName>String</MaterialTypeName> <Name>String</Name> <Status>0</Status> <Unit>String</Unit> <UpdatedAt>0001-01-01T00:00:00</UpdatedAt> <UpdatedBy>0</UpdatedBy> </Equipment>