| GET, POST, DELETE | /{Workspace}/TaskType/{Type} | ||
|---|---|---|---|
| GET | /{Workspace}/TaskType |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class TaskType
{
public String Workspace = null;
public String Type = null;
public String Icon = null;
public ArrayList<String> SkillTags = null;
public Double MinTimeToComplete = null;
public Double AvgTimeToComplete = null;
public Double MaxTimeToComplete = null;
public String Template = null;
public Boolean DocFilter = null;
public Boolean ShowRelatedDocs = null;
public ArrayList<String> AllowedDocTypes = null;
public Integer DefaultPriority = null;
public Boolean Inactive = null;
public ArrayList<String> AutoCreateDocuments = null;
public String PercentCompleteType = null;
public Boolean UseJobTimers = null;
public Boolean InheritAssetTeams = null;
public Boolean InheritContactTeams = null;
public ArrayList<String> EditTeams = null;
public Boolean UseRequired = null;
public Boolean AllowOverride = null;
public ArrayList<RequiredAsset> RequiredAssets = null;
public ArrayList<RequiredInventoryType> RequiredInventoryTypes = null;
public ArrayList<RequiredUser> RequiredUsers = null;
public HashMap<String,Object> ActiveLaborTypes = null;
public Boolean IndividualUserStatuses = null;
public Boolean LockOption = null;
public ArrayList<AutoCreateDocExpression> AutoCreateDocExpressions = null;
public Boolean PTO = null;
public String getWorkspace() { return Workspace; }
public TaskType setWorkspace(String value) { this.Workspace = value; return this; }
public String getType() { return Type; }
public TaskType setType(String value) { this.Type = value; return this; }
public String getIcon() { return Icon; }
public TaskType setIcon(String value) { this.Icon = value; return this; }
public ArrayList<String> getSkillTags() { return SkillTags; }
public TaskType setSkillTags(ArrayList<String> value) { this.SkillTags = value; return this; }
public Double getMinTimeToComplete() { return MinTimeToComplete; }
public TaskType setMinTimeToComplete(Double value) { this.MinTimeToComplete = value; return this; }
public Double getAvgTimeToComplete() { return AvgTimeToComplete; }
public TaskType setAvgTimeToComplete(Double value) { this.AvgTimeToComplete = value; return this; }
public Double getMaxTimeToComplete() { return MaxTimeToComplete; }
public TaskType setMaxTimeToComplete(Double value) { this.MaxTimeToComplete = value; return this; }
public String getTemplate() { return Template; }
public TaskType setTemplate(String value) { this.Template = value; return this; }
public Boolean isDocFilter() { return DocFilter; }
public TaskType setDocFilter(Boolean value) { this.DocFilter = value; return this; }
public Boolean isShowRelatedDocs() { return ShowRelatedDocs; }
public TaskType setShowRelatedDocs(Boolean value) { this.ShowRelatedDocs = value; return this; }
public ArrayList<String> getAllowedDocTypes() { return AllowedDocTypes; }
public TaskType setAllowedDocTypes(ArrayList<String> value) { this.AllowedDocTypes = value; return this; }
public Integer getDefaultPriority() { return DefaultPriority; }
public TaskType setDefaultPriority(Integer value) { this.DefaultPriority = value; return this; }
public Boolean isInactive() { return Inactive; }
public TaskType setInactive(Boolean value) { this.Inactive = value; return this; }
public ArrayList<String> getAutoCreateDocuments() { return AutoCreateDocuments; }
public TaskType setAutoCreateDocuments(ArrayList<String> value) { this.AutoCreateDocuments = value; return this; }
public String getPercentCompleteType() { return PercentCompleteType; }
public TaskType setPercentCompleteType(String value) { this.PercentCompleteType = value; return this; }
public Boolean isUseJobTimers() { return UseJobTimers; }
public TaskType setUseJobTimers(Boolean value) { this.UseJobTimers = value; return this; }
public Boolean isInheritAssetTeams() { return InheritAssetTeams; }
public TaskType setInheritAssetTeams(Boolean value) { this.InheritAssetTeams = value; return this; }
public Boolean isInheritContactTeams() { return InheritContactTeams; }
public TaskType setInheritContactTeams(Boolean value) { this.InheritContactTeams = value; return this; }
public ArrayList<String> getEditTeams() { return EditTeams; }
public TaskType setEditTeams(ArrayList<String> value) { this.EditTeams = value; return this; }
public Boolean isUseRequired() { return UseRequired; }
public TaskType setUseRequired(Boolean value) { this.UseRequired = value; return this; }
public Boolean isAllowOverride() { return AllowOverride; }
public TaskType setAllowOverride(Boolean value) { this.AllowOverride = value; return this; }
public ArrayList<RequiredAsset> getRequiredAssets() { return RequiredAssets; }
public TaskType setRequiredAssets(ArrayList<RequiredAsset> value) { this.RequiredAssets = value; return this; }
public ArrayList<RequiredInventoryType> getRequiredInventoryTypes() { return RequiredInventoryTypes; }
public TaskType setRequiredInventoryTypes(ArrayList<RequiredInventoryType> value) { this.RequiredInventoryTypes = value; return this; }
public ArrayList<RequiredUser> getRequiredUsers() { return RequiredUsers; }
public TaskType setRequiredUsers(ArrayList<RequiredUser> value) { this.RequiredUsers = value; return this; }
public HashMap<String,Object> getActiveLaborTypes() { return ActiveLaborTypes; }
public TaskType setActiveLaborTypes(HashMap<String,Object> value) { this.ActiveLaborTypes = value; return this; }
public Boolean isIndividualUserStatuses() { return IndividualUserStatuses; }
public TaskType setIndividualUserStatuses(Boolean value) { this.IndividualUserStatuses = value; return this; }
public Boolean isLockOption() { return LockOption; }
public TaskType setLockOption(Boolean value) { this.LockOption = value; return this; }
public ArrayList<AutoCreateDocExpression> getAutoCreateDocExpressions() { return AutoCreateDocExpressions; }
public TaskType setAutoCreateDocExpressions(ArrayList<AutoCreateDocExpression> value) { this.AutoCreateDocExpressions = value; return this; }
public Boolean isPto() { return PTO; }
public TaskType setPto(Boolean value) { this.PTO = value; return this; }
}
public static class RequiredAsset
{
public Integer Number = null;
public String Type = null;
public Integer getNumber() { return Number; }
public RequiredAsset setNumber(Integer value) { this.Number = value; return this; }
public String getType() { return Type; }
public RequiredAsset setType(String value) { this.Type = value; return this; }
}
public static class RequiredInventoryType
{
public Integer Number = null;
public String Type = null;
public String Name = null;
public Boolean IsSerialized = null;
public String Description = null;
public Integer getNumber() { return Number; }
public RequiredInventoryType setNumber(Integer value) { this.Number = value; return this; }
public String getType() { return Type; }
public RequiredInventoryType setType(String value) { this.Type = value; return this; }
public String getName() { return Name; }
public RequiredInventoryType setName(String value) { this.Name = value; return this; }
public Boolean getIsSerialized() { return IsSerialized; }
public RequiredInventoryType setIsSerialized(Boolean value) { this.IsSerialized = value; return this; }
public String getDescription() { return Description; }
public RequiredInventoryType setDescription(String value) { this.Description = value; return this; }
}
public static class RequiredUser
{
public Integer Number = null;
public ArrayList<String> SkillTags = null;
public Integer getNumber() { return Number; }
public RequiredUser setNumber(Integer value) { this.Number = value; return this; }
public ArrayList<String> getSkillTags() { return SkillTags; }
public RequiredUser setSkillTags(ArrayList<String> value) { this.SkillTags = value; return this; }
}
public static class AutoCreateDocExpression
{
public String Document = null;
public String Expression = null;
public Boolean MultipleCopies = null;
public String getDocument() { return Document; }
public AutoCreateDocExpression setDocument(String value) { this.Document = value; return this; }
public String getExpression() { return Expression; }
public AutoCreateDocExpression setExpression(String value) { this.Expression = value; return this; }
public Boolean isMultipleCopies() { return MultipleCopies; }
public AutoCreateDocExpression setMultipleCopies(Boolean value) { this.MultipleCopies = value; return this; }
}
}
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.
POST /{Workspace}/TaskType/{Type} HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<TaskType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Tasks">
<ActiveLaborTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value />
</d2p1:KeyValueOfstringanyType>
</ActiveLaborTypes>
<AllowOverride>false</AllowOverride>
<AllowedDocTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</AllowedDocTypes>
<AutoCreateDocExpressions xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
<d2p1:AutoCreateDocExpression>
<d2p1:Document>String</d2p1:Document>
<d2p1:Expression>String</d2p1:Expression>
<d2p1:MultipleCopies>false</d2p1:MultipleCopies>
</d2p1:AutoCreateDocExpression>
</AutoCreateDocExpressions>
<AutoCreateDocuments xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</AutoCreateDocuments>
<AvgTimeToComplete>0</AvgTimeToComplete>
<DefaultPriority>0</DefaultPriority>
<DocFilter>false</DocFilter>
<EditTeams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</EditTeams>
<Icon>String</Icon>
<Inactive>false</Inactive>
<IndividualUserStatuses>false</IndividualUserStatuses>
<InheritAssetTeams>false</InheritAssetTeams>
<InheritContactTeams>false</InheritContactTeams>
<LockOption>false</LockOption>
<MaxTimeToComplete>0</MaxTimeToComplete>
<MinTimeToComplete>0</MinTimeToComplete>
<PTO>false</PTO>
<PercentCompleteType>String</PercentCompleteType>
<RequiredAssets xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
<d2p1:RequiredAsset>
<d2p1:Number>0</d2p1:Number>
<d2p1:Type>String</d2p1:Type>
</d2p1:RequiredAsset>
</RequiredAssets>
<RequiredInventoryTypes xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
<d2p1:RequiredInventoryType>
<d2p1:Description>String</d2p1:Description>
<d2p1:IsSerialized>false</d2p1:IsSerialized>
<d2p1:Name>String</d2p1:Name>
<d2p1:Number>0</d2p1:Number>
<d2p1:Type>String</d2p1:Type>
</d2p1:RequiredInventoryType>
</RequiredInventoryTypes>
<RequiredUsers xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
<d2p1:RequiredUser>
<d2p1:Number>0</d2p1:Number>
<d2p1:SkillTags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:SkillTags>
</d2p1:RequiredUser>
</RequiredUsers>
<ShowRelatedDocs>false</ShowRelatedDocs>
<SkillTags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</SkillTags>
<Template>String</Template>
<Type>String</Type>
<UseJobTimers>false</UseJobTimers>
<UseRequired>false</UseRequired>
<Workspace>String</Workspace>
</TaskType>