| POST | /RestApi/translations/projects |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CreateProject implements IProjectInfo
{
public String Title = null;
public Date StartDate = null;
public Date EndDate = null;
public String Description = null;
public String Connector = null;
public String PoReference = null;
public String ActualSourceLanguage = null;
public String getTitle() { return Title; }
public CreateProject setTitle(String value) { this.Title = value; return this; }
public Date getStartDate() { return StartDate; }
public CreateProject setStartDate(Date value) { this.StartDate = value; return this; }
public Date getEndDate() { return EndDate; }
public CreateProject setEndDate(Date value) { this.EndDate = value; return this; }
public String getDescription() { return Description; }
public CreateProject setDescription(String value) { this.Description = value; return this; }
public String getConnector() { return Connector; }
public CreateProject setConnector(String value) { this.Connector = value; return this; }
public String getPoReference() { return PoReference; }
public CreateProject setPoReference(String value) { this.PoReference = value; return this; }
public String getActualSourceLanguage() { return ActualSourceLanguage; }
public CreateProject setActualSourceLanguage(String value) { this.ActualSourceLanguage = value; return this; }
}
public static class ProjectProxy
{
public UUID Id = null;
public String Title = null;
public String Description = null;
public Date StartDate = null;
public Date DueDate = null;
public Date DateSent = null;
public Date DateCompleted = null;
public String SentBy = null;
public ConnectorProxy Connector = null;
public String Status = null;
public String PoReference = null;
public LanguageProxy ActualSourceLanguage = null;
public ArrayList<LanguageProxy> TargetLanguages = null;
public Integer TranslationsCount = null;
public Boolean CanBeCompleted = null;
public String ExternalId = null;
public UUID getId() { return Id; }
public ProjectProxy setId(UUID value) { this.Id = value; return this; }
public String getTitle() { return Title; }
public ProjectProxy setTitle(String value) { this.Title = value; return this; }
public String getDescription() { return Description; }
public ProjectProxy setDescription(String value) { this.Description = value; return this; }
public Date getStartDate() { return StartDate; }
public ProjectProxy setStartDate(Date value) { this.StartDate = value; return this; }
public Date getDueDate() { return DueDate; }
public ProjectProxy setDueDate(Date value) { this.DueDate = value; return this; }
public Date getDateSent() { return DateSent; }
public ProjectProxy setDateSent(Date value) { this.DateSent = value; return this; }
public Date getDateCompleted() { return DateCompleted; }
public ProjectProxy setDateCompleted(Date value) { this.DateCompleted = value; return this; }
public String getSentBy() { return SentBy; }
public ProjectProxy setSentBy(String value) { this.SentBy = value; return this; }
public ConnectorProxy getConnector() { return Connector; }
public ProjectProxy setConnector(ConnectorProxy value) { this.Connector = value; return this; }
public String getStatus() { return Status; }
public ProjectProxy setStatus(String value) { this.Status = value; return this; }
public String getPoReference() { return PoReference; }
public ProjectProxy setPoReference(String value) { this.PoReference = value; return this; }
public LanguageProxy getActualSourceLanguage() { return ActualSourceLanguage; }
public ProjectProxy setActualSourceLanguage(LanguageProxy value) { this.ActualSourceLanguage = value; return this; }
public ArrayList<LanguageProxy> getTargetLanguages() { return TargetLanguages; }
public ProjectProxy setTargetLanguages(ArrayList<LanguageProxy> value) { this.TargetLanguages = value; return this; }
public Integer getTranslationsCount() { return TranslationsCount; }
public ProjectProxy setTranslationsCount(Integer value) { this.TranslationsCount = value; return this; }
public Boolean isCanBeCompleted() { return CanBeCompleted; }
public ProjectProxy setCanBeCompleted(Boolean value) { this.CanBeCompleted = value; return this; }
public String getExternalId() { return ExternalId; }
public ProjectProxy setExternalId(String value) { this.ExternalId = value; return this; }
}
public static class ConnectorProxy
{
public String Name = null;
public String Title = null;
public Integer Count = null;
public XliffProxy Xliff = null;
public ArrayList<LanguagePairProxy> SupportedLanguages = null;
public String getName() { return Name; }
public ConnectorProxy setName(String value) { this.Name = value; return this; }
public String getTitle() { return Title; }
public ConnectorProxy setTitle(String value) { this.Title = value; return this; }
public Integer getCount() { return Count; }
public ConnectorProxy setCount(Integer value) { this.Count = value; return this; }
public XliffProxy getXliff() { return Xliff; }
public ConnectorProxy setXliff(XliffProxy value) { this.Xliff = value; return this; }
public ArrayList<LanguagePairProxy> getSupportedLanguages() { return SupportedLanguages; }
public ConnectorProxy setSupportedLanguages(ArrayList<LanguagePairProxy> value) { this.SupportedLanguages = value; return this; }
}
public static class XliffProxy
{
public Boolean IsXliff = null;
public Boolean IsFtp = null;
public Boolean IsMachineTranslation = null;
public Boolean getIsXliff() { return IsXliff; }
public XliffProxy setIsXliff(Boolean value) { this.IsXliff = value; return this; }
public Boolean getIsFtp() { return IsFtp; }
public XliffProxy setIsFtp(Boolean value) { this.IsFtp = value; return this; }
public Boolean getIsMachineTranslation() { return IsMachineTranslation; }
public XliffProxy setIsMachineTranslation(Boolean value) { this.IsMachineTranslation = value; return this; }
}
public static class LanguagePairProxy
{
public LanguageProxy ActualSource = null;
public LanguageProxy Target = null;
public LanguageProxy getActualSource() { return ActualSource; }
public LanguagePairProxy setActualSource(LanguageProxy value) { this.ActualSource = value; return this; }
public LanguageProxy getTarget() { return Target; }
public LanguagePairProxy setTarget(LanguageProxy value) { this.Target = value; return this; }
}
public static class LanguageProxy
{
public String Code = null;
public String Name = null;
public Integer Count = null;
public String getCode() { return Code; }
public LanguageProxy setCode(String value) { this.Code = value; return this; }
public String getName() { return Name; }
public LanguageProxy setName(String value) { this.Name = value; return this; }
public Integer getCount() { return Count; }
public LanguageProxy setCount(Integer value) { this.Count = 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 /RestApi/translations/projects HTTP/1.1
Host: www.imglobal.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Title":"String","StartDate":"\/Date(-62135596800000-0000)\/","EndDate":"\/Date(-62135596800000-0000)\/","Description":"String","Connector":"String","PoReference":"String","ActualSourceLanguage":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Title":"String","Description":"String","StartDate":"\/Date(-62135596800000-0000)\/","DueDate":"\/Date(-62135596800000-0000)\/","DateSent":"\/Date(-62135596800000-0000)\/","DateCompleted":"\/Date(-62135596800000-0000)\/","SentBy":"String","Connector":{"Name":"String","Title":"String","Count":0,"Xliff":{"IsXliff":false,"IsFtp":false,"IsMachineTranslation":false}},"Status":"String","PoReference":"String","ActualSourceLanguage":{"Code":"String","Name":"String","Count":0},"TargetLanguages":[{"Code":"String","Name":"String","Count":0}],"TranslationsCount":0,"CanBeCompleted":false,"ExternalId":"String"}