| GET,POST,DELETE | /{Workspace}/AssetType/{Type} | ||
|---|---|---|---|
| GET | /{Workspace}/AssetType |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Represents a single asset type.
*/
public static class AssetType
{
public String Workspace = null;
public String Type = null;
public Boolean IsActive = null;
public String Name = null;
public String Make = null;
public String Model = null;
public String Manuf = null;
public String Barcode = null;
public String Symbol = null;
public String Color = null;
public Double LineThickness = null;
public Double Scale = null;
public Double VisibilityMin = null;
public Double VisibilityMax = null;
public Boolean SyncNode = null;
public ArrayList<CustomField> CustomFields = null;
public ArrayList<String> AllowedParentTypes = null;
public ArrayList<String> AllowedChildTypes = null;
public Boolean UseLocationHistory = null;
public Boolean IsMobileAsset = null;
public HashMap<String,String> Data = null;
public String GeomType = null;
public Boolean DocFilter = null;
public Boolean ShowRelatedDocs = null;
public ArrayList<String> AllowedDocTypes = null;
public String TLA = null;
public Boolean UseTLAOnMap = null;
public String RoutingLocation = null;
public String Fill = null;
public Double FillOpacity = null;
public Boolean ShowAnno = null;
public String AnnoColor = null;
public Double MaxAnnoVisibility = null;
public String AnnoFont = null;
public Boolean HideTypeLabel = null;
public Boolean UseAddress = null;
public Boolean UseFullScreen = null;
public Integer TimeSeries = null;
public Boolean IsUnselectable = null;
public ArrayList<String> EditTeams = null;
public Boolean IsWarehouse = null;
public Boolean IsVehicle = null;
public HashMap<String,Object> CustomSymbol = null;
public ArrayList<String> TaskSeriesTemplates = null;
public String getWorkspace() { return Workspace; }
public AssetType setWorkspace(String value) { this.Workspace = value; return this; }
public String getType() { return Type; }
public AssetType setType(String value) { this.Type = value; return this; }
public Boolean getIsActive() { return IsActive; }
public AssetType setIsActive(Boolean value) { this.IsActive = value; return this; }
public String getName() { return Name; }
public AssetType setName(String value) { this.Name = value; return this; }
public String getMake() { return Make; }
public AssetType setMake(String value) { this.Make = value; return this; }
public String getModel() { return Model; }
public AssetType setModel(String value) { this.Model = value; return this; }
public String getManuf() { return Manuf; }
public AssetType setManuf(String value) { this.Manuf = value; return this; }
public String getBarcode() { return Barcode; }
public AssetType setBarcode(String value) { this.Barcode = value; return this; }
public String getSymbol() { return Symbol; }
public AssetType setSymbol(String value) { this.Symbol = value; return this; }
public String getColor() { return Color; }
public AssetType setColor(String value) { this.Color = value; return this; }
public Double getLineThickness() { return LineThickness; }
public AssetType setLineThickness(Double value) { this.LineThickness = value; return this; }
public Double getScale() { return Scale; }
public AssetType setScale(Double value) { this.Scale = value; return this; }
public Double getVisibilityMin() { return VisibilityMin; }
public AssetType setVisibilityMin(Double value) { this.VisibilityMin = value; return this; }
public Double getVisibilityMax() { return VisibilityMax; }
public AssetType setVisibilityMax(Double value) { this.VisibilityMax = value; return this; }
public Boolean isSyncNode() { return SyncNode; }
public AssetType setSyncNode(Boolean value) { this.SyncNode = value; return this; }
public ArrayList<CustomField> getCustomFields() { return CustomFields; }
public AssetType setCustomFields(ArrayList<CustomField> value) { this.CustomFields = value; return this; }
public ArrayList<String> getAllowedParentTypes() { return AllowedParentTypes; }
public AssetType setAllowedParentTypes(ArrayList<String> value) { this.AllowedParentTypes = value; return this; }
public ArrayList<String> getAllowedChildTypes() { return AllowedChildTypes; }
public AssetType setAllowedChildTypes(ArrayList<String> value) { this.AllowedChildTypes = value; return this; }
public Boolean isUseLocationHistory() { return UseLocationHistory; }
public AssetType setUseLocationHistory(Boolean value) { this.UseLocationHistory = value; return this; }
public Boolean getIsMobileAsset() { return IsMobileAsset; }
public AssetType setIsMobileAsset(Boolean value) { this.IsMobileAsset = value; return this; }
public HashMap<String,String> getData() { return Data; }
public AssetType setData(HashMap<String,String> value) { this.Data = value; return this; }
public String getGeomType() { return GeomType; }
public AssetType setGeomType(String value) { this.GeomType = value; return this; }
public Boolean isDocFilter() { return DocFilter; }
public AssetType setDocFilter(Boolean value) { this.DocFilter = value; return this; }
public Boolean isShowRelatedDocs() { return ShowRelatedDocs; }
public AssetType setShowRelatedDocs(Boolean value) { this.ShowRelatedDocs = value; return this; }
public ArrayList<String> getAllowedDocTypes() { return AllowedDocTypes; }
public AssetType setAllowedDocTypes(ArrayList<String> value) { this.AllowedDocTypes = value; return this; }
public String getTla() { return TLA; }
public AssetType setTla(String value) { this.TLA = value; return this; }
public Boolean isUseTLAOnMap() { return UseTLAOnMap; }
public AssetType setUseTLAOnMap(Boolean value) { this.UseTLAOnMap = value; return this; }
public String getRoutingLocation() { return RoutingLocation; }
public AssetType setRoutingLocation(String value) { this.RoutingLocation = value; return this; }
public String getFill() { return Fill; }
public AssetType setFill(String value) { this.Fill = value; return this; }
public Double getFillOpacity() { return FillOpacity; }
public AssetType setFillOpacity(Double value) { this.FillOpacity = value; return this; }
public Boolean isShowAnno() { return ShowAnno; }
public AssetType setShowAnno(Boolean value) { this.ShowAnno = value; return this; }
public String getAnnoColor() { return AnnoColor; }
public AssetType setAnnoColor(String value) { this.AnnoColor = value; return this; }
public Double getMaxAnnoVisibility() { return MaxAnnoVisibility; }
public AssetType setMaxAnnoVisibility(Double value) { this.MaxAnnoVisibility = value; return this; }
public String getAnnoFont() { return AnnoFont; }
public AssetType setAnnoFont(String value) { this.AnnoFont = value; return this; }
public Boolean isHideTypeLabel() { return HideTypeLabel; }
public AssetType setHideTypeLabel(Boolean value) { this.HideTypeLabel = value; return this; }
public Boolean isUseAddress() { return UseAddress; }
public AssetType setUseAddress(Boolean value) { this.UseAddress = value; return this; }
public Boolean isUseFullScreen() { return UseFullScreen; }
public AssetType setUseFullScreen(Boolean value) { this.UseFullScreen = value; return this; }
public Integer getTimeSeries() { return TimeSeries; }
public AssetType setTimeSeries(Integer value) { this.TimeSeries = value; return this; }
public Boolean getIsUnselectable() { return IsUnselectable; }
public AssetType setIsUnselectable(Boolean value) { this.IsUnselectable = value; return this; }
public ArrayList<String> getEditTeams() { return EditTeams; }
public AssetType setEditTeams(ArrayList<String> value) { this.EditTeams = value; return this; }
public Boolean getIsWarehouse() { return IsWarehouse; }
public AssetType setIsWarehouse(Boolean value) { this.IsWarehouse = value; return this; }
public Boolean getIsVehicle() { return IsVehicle; }
public AssetType setIsVehicle(Boolean value) { this.IsVehicle = value; return this; }
public HashMap<String,Object> getCustomSymbol() { return CustomSymbol; }
public AssetType setCustomSymbol(HashMap<String,Object> value) { this.CustomSymbol = value; return this; }
public ArrayList<String> getTaskSeriesTemplates() { return TaskSeriesTemplates; }
public AssetType setTaskSeriesTemplates(ArrayList<String> value) { this.TaskSeriesTemplates = value; return this; }
}
public static class CustomField
{
public String Key = null;
public String Label = null;
public Boolean IsActive = null;
public Boolean IsReadOnly = null;
public Boolean IsHidden = null;
public Boolean IsMandatory = null;
public Boolean DisplayOnMap = null;
public CustomFieldDataType CustomFieldDataType = null;
public String Values = null;
public String Prompt = null;
public String Default = null;
public Boolean DefaultAutoUpdate = null;
public String RequiredIf = null;
public ArrayList<String> Hidden = null;
public ArrayList<String> ReadOnly = null;
public HashMap<String,Object> ControlArgs = null;
public String IndexSlot = null;
public String Index = null;
public String getKey() { return Key; }
public CustomField setKey(String value) { this.Key = value; return this; }
public String getLabel() { return Label; }
public CustomField setLabel(String value) { this.Label = value; return this; }
public Boolean getIsActive() { return IsActive; }
public CustomField setIsActive(Boolean value) { this.IsActive = value; return this; }
public Boolean getIsReadOnly() { return IsReadOnly; }
public CustomField setIsReadOnly(Boolean value) { this.IsReadOnly = value; return this; }
public Boolean getIsHidden() { return IsHidden; }
public CustomField setIsHidden(Boolean value) { this.IsHidden = value; return this; }
public Boolean getIsMandatory() { return IsMandatory; }
public CustomField setIsMandatory(Boolean value) { this.IsMandatory = value; return this; }
public Boolean isDisplayOnMap() { return DisplayOnMap; }
public CustomField setDisplayOnMap(Boolean value) { this.DisplayOnMap = value; return this; }
public CustomFieldDataType getCustomFieldDataType() { return CustomFieldDataType; }
public CustomField setCustomFieldDataType(CustomFieldDataType value) { this.CustomFieldDataType = value; return this; }
public String getValues() { return Values; }
public CustomField setValues(String value) { this.Values = value; return this; }
public String getPrompt() { return Prompt; }
public CustomField setPrompt(String value) { this.Prompt = value; return this; }
public String getDefault() { return Default; }
public CustomField setDefault(String value) { this.Default = value; return this; }
public Boolean isDefaultAutoUpdate() { return DefaultAutoUpdate; }
public CustomField setDefaultAutoUpdate(Boolean value) { this.DefaultAutoUpdate = value; return this; }
public String getRequiredIf() { return RequiredIf; }
public CustomField setRequiredIf(String value) { this.RequiredIf = value; return this; }
public ArrayList<String> getHidden() { return Hidden; }
public CustomField setHidden(ArrayList<String> value) { this.Hidden = value; return this; }
public ArrayList<String> getReadOnly() { return ReadOnly; }
public CustomField setReadOnly(ArrayList<String> value) { this.ReadOnly = value; return this; }
public HashMap<String,Object> getControlArgs() { return ControlArgs; }
public CustomField setControlArgs(HashMap<String,Object> value) { this.ControlArgs = value; return this; }
public String getIndexSlot() { return IndexSlot; }
public CustomField setIndexSlot(String value) { this.IndexSlot = value; return this; }
public String getIndex() { return Index; }
public CustomField setIndex(String value) { this.Index = value; return this; }
}
public static enum CustomFieldDataType
{
Text,
Number,
Decimal,
Money,
PhoneNumber,
Ssn,
List,
Date,
File,
Barcode,
Gps,
Photo,
Spacer,
Separator,
AutoNumber,
TextArea,
Contact,
User,
Asset,
Checkbox,
CoreAssetList,
CoreTaskList,
CoreParentTask,
CoreContactList,
ComboBox,
DateTime,
Time,
Location,
CoreLocation,
Label,
EventLog,
Address,
Catalog,
CoreTeamList,
Segment,
CoreTimeSeries,
TimeSeries,
Command,
AutoNumberNumeric,
CatalogList,
CatalogComboBox,
DateRange,
DocumentGrid,
ReportLink,
Hyperlink,
PercentComplete,
Chart,
Range,
ExternalId,
AssetCatalog,
Inventory,
CoreTaskLaborItemTypes,
CoreTaskLaborItems,
ObjectList,
CoreTimeZone;
}
}
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}/AssetType/{Type} HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AssetType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Assets">
<AllowedChildTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</AllowedChildTypes>
<AllowedDocTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</AllowedDocTypes>
<AllowedParentTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</AllowedParentTypes>
<AnnoColor>String</AnnoColor>
<AnnoFont>String</AnnoFont>
<Barcode>String</Barcode>
<Color>String</Color>
<CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Model">
<d2p1:CustomField>
<d2p1:ControlArgs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d2p1:ControlArgs>
<d2p1:CustomFieldDataType>Text</d2p1:CustomFieldDataType>
<d2p1:Default>String</d2p1:Default>
<d2p1:DefaultAutoUpdate>false</d2p1:DefaultAutoUpdate>
<d2p1:DisplayOnMap>false</d2p1:DisplayOnMap>
<d2p1:Hidden xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:Hidden>
<d2p1:Index>String</d2p1:Index>
<d2p1:IndexSlot>String</d2p1:IndexSlot>
<d2p1:IsActive>false</d2p1:IsActive>
<d2p1:IsHidden>false</d2p1:IsHidden>
<d2p1:IsMandatory>false</d2p1:IsMandatory>
<d2p1:IsReadOnly>false</d2p1:IsReadOnly>
<d2p1:Key>String</d2p1:Key>
<d2p1:Label>String</d2p1:Label>
<d2p1:Prompt>String</d2p1:Prompt>
<d2p1:ReadOnly xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:ReadOnly>
<d2p1:RequiredIf>String</d2p1:RequiredIf>
<d2p1:Values>String</d2p1:Values>
</d2p1:CustomField>
</CustomFields>
<CustomSymbol xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value />
</d2p1:KeyValueOfstringanyType>
</CustomSymbol>
<Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</Data>
<DocFilter>false</DocFilter>
<EditTeams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</EditTeams>
<Fill>String</Fill>
<FillOpacity>0</FillOpacity>
<GeomType>String</GeomType>
<HideTypeLabel>false</HideTypeLabel>
<IsActive>false</IsActive>
<IsMobileAsset>false</IsMobileAsset>
<IsUnselectable>false</IsUnselectable>
<IsVehicle>false</IsVehicle>
<IsWarehouse>false</IsWarehouse>
<LineThickness>0</LineThickness>
<Make>String</Make>
<Manuf>String</Manuf>
<MaxAnnoVisibility>0</MaxAnnoVisibility>
<Model>String</Model>
<Name>String</Name>
<RoutingLocation>String</RoutingLocation>
<Scale>0</Scale>
<ShowAnno>false</ShowAnno>
<ShowRelatedDocs>false</ShowRelatedDocs>
<Symbol>String</Symbol>
<SyncNode>false</SyncNode>
<TLA>String</TLA>
<TaskSeriesTemplates xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TaskSeriesTemplates>
<TimeSeries>0</TimeSeries>
<Type>String</Type>
<UseAddress>false</UseAddress>
<UseFullScreen>false</UseFullScreen>
<UseLocationHistory>false</UseLocationHistory>
<UseTLAOnMap>false</UseTLAOnMap>
<VisibilityMax>0</VisibilityMax>
<VisibilityMin>0</VisibilityMin>
<Workspace>String</Workspace>
</AssetType>