| GET,PUT,DELETE | /{WorkspaceId}/IntegrationRule/{Id} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Represents a set of rules what the system reads to take a particular set of actions. These dtos allow transfer of that data from the client to the server and vice versa.
*/
public static class IntegrationRule
{
public String WorkspaceId = null;
public String Name = null;
public HashMap<String,Object> Data = null;
public String ObjectType = null;
public String Id = null;
public ArrayList<ConditionGroupItem> ConditionGroupItems = null;
public ArrayList<Action> ActionsToTake = null;
public Date LastUpdated = null;
public ArrayList<RuleModuleDefinition> ModulePipeline = null;
public Boolean Enabled = null;
public Boolean WorkdayRestricted = null;
public ArrayList<String> Teams = null;
public Boolean AllowProgrammaticTrigger = null;
public String getWorkspaceId() { return WorkspaceId; }
public IntegrationRule setWorkspaceId(String value) { this.WorkspaceId = value; return this; }
public String getName() { return Name; }
public IntegrationRule setName(String value) { this.Name = value; return this; }
public HashMap<String,Object> getData() { return Data; }
public IntegrationRule setData(HashMap<String,Object> value) { this.Data = value; return this; }
public String getObjectType() { return ObjectType; }
public IntegrationRule setObjectType(String value) { this.ObjectType = value; return this; }
public String getId() { return Id; }
public IntegrationRule setId(String value) { this.Id = value; return this; }
public ArrayList<ConditionGroupItem> getConditionGroupItems() { return ConditionGroupItems; }
public IntegrationRule setConditionGroupItems(ArrayList<ConditionGroupItem> value) { this.ConditionGroupItems = value; return this; }
public ArrayList<Action> getActionsToTake() { return ActionsToTake; }
public IntegrationRule setActionsToTake(ArrayList<Action> value) { this.ActionsToTake = value; return this; }
public Date getLastUpdated() { return LastUpdated; }
public IntegrationRule setLastUpdated(Date value) { this.LastUpdated = value; return this; }
public ArrayList<RuleModuleDefinition> getModulePipeline() { return ModulePipeline; }
public IntegrationRule setModulePipeline(ArrayList<RuleModuleDefinition> value) { this.ModulePipeline = value; return this; }
public Boolean isEnabled() { return Enabled; }
public IntegrationRule setEnabled(Boolean value) { this.Enabled = value; return this; }
public Boolean isWorkdayRestricted() { return WorkdayRestricted; }
public IntegrationRule setWorkdayRestricted(Boolean value) { this.WorkdayRestricted = value; return this; }
public ArrayList<String> getTeams() { return Teams; }
public IntegrationRule setTeams(ArrayList<String> value) { this.Teams = value; return this; }
public Boolean isAllowProgrammaticTrigger() { return AllowProgrammaticTrigger; }
public IntegrationRule setAllowProgrammaticTrigger(Boolean value) { this.AllowProgrammaticTrigger = value; return this; }
}
public static class ConditionGroupItem
{
public ArrayList<ConditionGroup> ConditionGroups = null;
public Integer Precedence = null;
public Integer GroupIdentifier = null;
public String BooleanOperator = null;
public ArrayList<ConditionGroup> getConditionGroups() { return ConditionGroups; }
public ConditionGroupItem setConditionGroups(ArrayList<ConditionGroup> value) { this.ConditionGroups = value; return this; }
public Integer getPrecedence() { return Precedence; }
public ConditionGroupItem setPrecedence(Integer value) { this.Precedence = value; return this; }
public Integer getGroupIdentifier() { return GroupIdentifier; }
public ConditionGroupItem setGroupIdentifier(Integer value) { this.GroupIdentifier = value; return this; }
public String getBooleanOperator() { return BooleanOperator; }
public ConditionGroupItem setBooleanOperator(String value) { this.BooleanOperator = value; return this; }
}
public static class ConditionGroup
{
public Condition Condition = null;
public Integer Precedence = null;
public Integer GroupIdentifier = null;
public String BooleanOperator = null;
public Condition getCondition() { return Condition; }
public ConditionGroup setCondition(Condition value) { this.Condition = value; return this; }
public Integer getPrecedence() { return Precedence; }
public ConditionGroup setPrecedence(Integer value) { this.Precedence = value; return this; }
public Integer getGroupIdentifier() { return GroupIdentifier; }
public ConditionGroup setGroupIdentifier(Integer value) { this.GroupIdentifier = value; return this; }
public String getBooleanOperator() { return BooleanOperator; }
public ConditionGroup setBooleanOperator(String value) { this.BooleanOperator = value; return this; }
}
public static class Condition
{
public String ValueComparedTo = null;
public String ValueToCompare = null;
public PossibleComparisons ComparisonOperator = null;
public String getValueComparedTo() { return ValueComparedTo; }
public Condition setValueComparedTo(String value) { this.ValueComparedTo = value; return this; }
public String getValueToCompare() { return ValueToCompare; }
public Condition setValueToCompare(String value) { this.ValueToCompare = value; return this; }
public PossibleComparisons getComparisonOperator() { return ComparisonOperator; }
public Condition setComparisonOperator(PossibleComparisons value) { this.ComparisonOperator = value; return this; }
}
public static enum PossibleComparisons
{
Lte,
Lt,
Gt,
Gte,
Eq,
Ne,
Null,
Notnull,
Chg,
Starts,
Like;
}
public static class Action
{
public String Id = null;
public String CallType = null;
public String ActionToTake = null;
public String Destination = null;
public String ExternalId = null;
public String ExternalParentId = null;
public String DeleteTypeIfNotExists = null;
public HashMap<String,Object> DataTree = null;
public String Data = null;
public HashMap<String,Object> DataTypes = null;
public String getId() { return Id; }
public Action setId(String value) { this.Id = value; return this; }
public String getCallType() { return CallType; }
public Action setCallType(String value) { this.CallType = value; return this; }
public String getActionToTake() { return ActionToTake; }
public Action setActionToTake(String value) { this.ActionToTake = value; return this; }
public String getDestination() { return Destination; }
public Action setDestination(String value) { this.Destination = value; return this; }
public String getExternalId() { return ExternalId; }
public Action setExternalId(String value) { this.ExternalId = value; return this; }
public String getExternalParentId() { return ExternalParentId; }
public Action setExternalParentId(String value) { this.ExternalParentId = value; return this; }
public String getDeleteTypeIfNotExists() { return DeleteTypeIfNotExists; }
public Action setDeleteTypeIfNotExists(String value) { this.DeleteTypeIfNotExists = value; return this; }
public HashMap<String,Object> getDataTree() { return DataTree; }
public Action setDataTree(HashMap<String,Object> value) { this.DataTree = value; return this; }
public String getData() { return Data; }
public Action setData(String value) { this.Data = value; return this; }
public HashMap<String,Object> getDataTypes() { return DataTypes; }
public Action setDataTypes(HashMap<String,Object> value) { this.DataTypes = value; return this; }
}
public static class RuleModuleDefinition
{
public Boolean IsOutputModule = null;
public String Name = null;
public ArrayList<String> Prerequisites = null;
public HashMap<String,Object> Parameters = null;
public String Type = null;
public Action OutputAction = null;
public Boolean getIsOutputModule() { return IsOutputModule; }
public RuleModuleDefinition setIsOutputModule(Boolean value) { this.IsOutputModule = value; return this; }
public String getName() { return Name; }
public RuleModuleDefinition setName(String value) { this.Name = value; return this; }
public ArrayList<String> getPrerequisites() { return Prerequisites; }
public RuleModuleDefinition setPrerequisites(ArrayList<String> value) { this.Prerequisites = value; return this; }
public HashMap<String,Object> getParameters() { return Parameters; }
public RuleModuleDefinition setParameters(HashMap<String,Object> value) { this.Parameters = value; return this; }
public String getType() { return Type; }
public RuleModuleDefinition setType(String value) { this.Type = value; return this; }
public Action getOutputAction() { return OutputAction; }
public RuleModuleDefinition setOutputAction(Action value) { this.OutputAction = 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.
PUT /{WorkspaceId}/IntegrationRule/{Id} HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<IntegrationRule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model">
<ActionsToTake>
<Action>
<ActionToTake>String</ActionToTake>
<CallType>String</CallType>
<Data>String</Data>
<DataTree xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringanyType>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value />
</d4p1:KeyValueOfstringanyType>
</DataTree>
<DataTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringanyType>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value />
</d4p1:KeyValueOfstringanyType>
</DataTypes>
<DeleteTypeIfNotExists>String</DeleteTypeIfNotExists>
<Destination>String</Destination>
<ExternalId>String</ExternalId>
<ExternalParentId>String</ExternalParentId>
<Id>String</Id>
</Action>
</ActionsToTake>
<AllowProgrammaticTrigger>false</AllowProgrammaticTrigger>
<ConditionGroupItems>
<ConditionGroupItem>
<BooleanOperator>String</BooleanOperator>
<ConditionGroups>
<ConditionGroup>
<BooleanOperator>String</BooleanOperator>
<Condition>
<ComparisonOperator>LTE</ComparisonOperator>
<ValueComparedTo>String</ValueComparedTo>
<ValueToCompare>String</ValueToCompare>
</Condition>
<GroupIdentifier>0</GroupIdentifier>
<Precedence>0</Precedence>
</ConditionGroup>
</ConditionGroups>
<GroupIdentifier>0</GroupIdentifier>
<Precedence>0</Precedence>
</ConditionGroupItem>
</ConditionGroupItems>
<Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>value</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">String</d2p1:Value>
</d2p1:KeyValueOfstringanyType>
</Data>
<Enabled>false</Enabled>
<Id>String</Id>
<LastUpdated>0001-01-01T00:00:00</LastUpdated>
<ModulePipeline xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Integration">
<d2p1:RuleModuleDefinition>
<d2p1:IsOutputModule>false</d2p1:IsOutputModule>
<d2p1:Name>String</d2p1:Name>
<d2p1:OutputAction>
<ActionToTake>String</ActionToTake>
<CallType>String</CallType>
<Data>String</Data>
<DataTree xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringanyType>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value />
</d5p1:KeyValueOfstringanyType>
</DataTree>
<DataTypes xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringanyType>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value />
</d5p1:KeyValueOfstringanyType>
</DataTypes>
<DeleteTypeIfNotExists>String</DeleteTypeIfNotExists>
<Destination>String</Destination>
<ExternalId>String</ExternalId>
<ExternalParentId>String</ExternalParentId>
<Id>String</Id>
</d2p1:OutputAction>
<d2p1:Parameters xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringanyType>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value />
</d4p1:KeyValueOfstringanyType>
</d2p1:Parameters>
<d2p1:Prerequisites xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:Prerequisites>
<d2p1:Type>String</d2p1:Type>
</d2p1:RuleModuleDefinition>
</ModulePipeline>
<Name>String</Name>
<ObjectType>String</ObjectType>
<Teams xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Teams>
<WorkdayRestricted>false</WorkdayRestricted>
<WorkspaceId>String</WorkspaceId>
<_data>String</_data>
</IntegrationRule>