| GET | /{Workspace}/IntegrationRuleList | ||
|---|---|---|---|
| GET | /{Workspace}/IntegrationRuleList/{IgnoreSecurity} |
import 'package:servicestack/servicestack.dart';
enum PossibleComparisons
{
LTE,
LT,
GT,
GTE,
EQ,
NE,
NULL,
NOTNULL,
CHG,
STARTS,
LIKE,
}
class Condition implements IConvertible
{
String? ValueComparedTo;
String? ValueToCompare;
PossibleComparisons? ComparisonOperator;
Condition({this.ValueComparedTo,this.ValueToCompare,this.ComparisonOperator});
Condition.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ValueComparedTo = json['ValueComparedTo'];
ValueToCompare = json['ValueToCompare'];
ComparisonOperator = JsonConverters.fromJson(json['ComparisonOperator'],'PossibleComparisons',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ValueComparedTo': ValueComparedTo,
'ValueToCompare': ValueToCompare,
'ComparisonOperator': JsonConverters.toJson(ComparisonOperator,'PossibleComparisons',context!)
};
getTypeName() => "Condition";
TypeContext? context = _ctx;
}
class ConditionGroup implements IConvertible
{
Condition? Condition;
int? Precedence;
int? GroupIdentifier;
String? BooleanOperator;
ConditionGroup({this.Condition,this.Precedence,this.GroupIdentifier,this.BooleanOperator});
ConditionGroup.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Condition = JsonConverters.fromJson(json['Condition'],'Condition',context!);
Precedence = json['Precedence'];
GroupIdentifier = json['GroupIdentifier'];
BooleanOperator = json['BooleanOperator'];
return this;
}
Map<String, dynamic> toJson() => {
'Condition': JsonConverters.toJson(Condition,'Condition',context!),
'Precedence': Precedence,
'GroupIdentifier': GroupIdentifier,
'BooleanOperator': BooleanOperator
};
getTypeName() => "ConditionGroup";
TypeContext? context = _ctx;
}
class ConditionGroupItem implements IConvertible
{
List<ConditionGroup>? ConditionGroups;
int? Precedence;
int? GroupIdentifier;
String? BooleanOperator;
ConditionGroupItem({this.ConditionGroups,this.Precedence,this.GroupIdentifier,this.BooleanOperator});
ConditionGroupItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ConditionGroups = JsonConverters.fromJson(json['ConditionGroups'],'List<ConditionGroup>',context!);
Precedence = json['Precedence'];
GroupIdentifier = json['GroupIdentifier'];
BooleanOperator = json['BooleanOperator'];
return this;
}
Map<String, dynamic> toJson() => {
'ConditionGroups': JsonConverters.toJson(ConditionGroups,'List<ConditionGroup>',context!),
'Precedence': Precedence,
'GroupIdentifier': GroupIdentifier,
'BooleanOperator': BooleanOperator
};
getTypeName() => "ConditionGroupItem";
TypeContext? context = _ctx;
}
class Action implements IConvertible
{
String? Id;
String? CallType;
String? ActionToTake;
String? Destination;
String? ExternalId;
String? ExternalParentId;
String? DeleteTypeIfNotExists;
Map<String,dynamic?>? DataTree;
String? Data;
Map<String,dynamic?>? DataTypes;
Action({this.Id,this.CallType,this.ActionToTake,this.Destination,this.ExternalId,this.ExternalParentId,this.DeleteTypeIfNotExists,this.DataTree,this.Data,this.DataTypes});
Action.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
CallType = json['CallType'];
ActionToTake = json['ActionToTake'];
Destination = json['Destination'];
ExternalId = json['ExternalId'];
ExternalParentId = json['ExternalParentId'];
DeleteTypeIfNotExists = json['DeleteTypeIfNotExists'];
DataTree = JsonConverters.fromJson(json['DataTree'],'Map<String,dynamic?>',context!);
Data = json['Data'];
DataTypes = JsonConverters.fromJson(json['DataTypes'],'Map<String,dynamic?>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'CallType': CallType,
'ActionToTake': ActionToTake,
'Destination': Destination,
'ExternalId': ExternalId,
'ExternalParentId': ExternalParentId,
'DeleteTypeIfNotExists': DeleteTypeIfNotExists,
'DataTree': JsonConverters.toJson(DataTree,'Map<String,dynamic?>',context!),
'Data': Data,
'DataTypes': JsonConverters.toJson(DataTypes,'Map<String,dynamic?>',context!)
};
getTypeName() => "Action";
TypeContext? context = _ctx;
}
class RuleModuleDefinition implements IConvertible
{
bool? IsOutputModule;
String? Name;
List<String>? Prerequisites;
Map<String,dynamic?>? Parameters;
String? Type;
Action? OutputAction;
RuleModuleDefinition({this.IsOutputModule,this.Name,this.Prerequisites,this.Parameters,this.Type,this.OutputAction});
RuleModuleDefinition.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
IsOutputModule = json['IsOutputModule'];
Name = json['Name'];
Prerequisites = JsonConverters.fromJson(json['Prerequisites'],'List<String>',context!);
Parameters = JsonConverters.fromJson(json['Parameters'],'Map<String,dynamic?>',context!);
Type = json['Type'];
OutputAction = JsonConverters.fromJson(json['OutputAction'],'Action',context!);
return this;
}
Map<String, dynamic> toJson() => {
'IsOutputModule': IsOutputModule,
'Name': Name,
'Prerequisites': JsonConverters.toJson(Prerequisites,'List<String>',context!),
'Parameters': JsonConverters.toJson(Parameters,'Map<String,dynamic?>',context!),
'Type': Type,
'OutputAction': JsonConverters.toJson(OutputAction,'Action',context!)
};
getTypeName() => "RuleModuleDefinition";
TypeContext? context = _ctx;
}
/**
* 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.
*/
class IntegrationRule implements IConvertible
{
String? WorkspaceId;
String? Name;
Map<String,dynamic?>? Data;
String? ObjectType;
String? Id;
List<ConditionGroupItem>? ConditionGroupItems;
List<Action>? ActionsToTake;
DateTime? LastUpdated;
List<RuleModuleDefinition>? ModulePipeline;
bool? Enabled;
bool? WorkdayRestricted;
List<String>? Teams;
bool? AllowProgrammaticTrigger;
IntegrationRule({this.WorkspaceId,this.Name,this.Data,this.ObjectType,this.Id,this.ConditionGroupItems,this.ActionsToTake,this.LastUpdated,this.ModulePipeline,this.Enabled,this.WorkdayRestricted,this.Teams,this.AllowProgrammaticTrigger});
IntegrationRule.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WorkspaceId = json['WorkspaceId'];
Name = json['Name'];
Data = JsonConverters.fromJson(json['Data'],'Map<String,dynamic?>',context!);
ObjectType = json['ObjectType'];
Id = json['Id'];
ConditionGroupItems = JsonConverters.fromJson(json['ConditionGroupItems'],'List<ConditionGroupItem>',context!);
ActionsToTake = JsonConverters.fromJson(json['ActionsToTake'],'List<Action>',context!);
LastUpdated = JsonConverters.fromJson(json['LastUpdated'],'DateTime',context!);
ModulePipeline = JsonConverters.fromJson(json['ModulePipeline'],'List<RuleModuleDefinition>',context!);
Enabled = json['Enabled'];
WorkdayRestricted = json['WorkdayRestricted'];
Teams = JsonConverters.fromJson(json['Teams'],'List<String>',context!);
AllowProgrammaticTrigger = json['AllowProgrammaticTrigger'];
return this;
}
Map<String, dynamic> toJson() => {
'WorkspaceId': WorkspaceId,
'Name': Name,
'Data': JsonConverters.toJson(Data,'Map<String,dynamic?>',context!),
'ObjectType': ObjectType,
'Id': Id,
'ConditionGroupItems': JsonConverters.toJson(ConditionGroupItems,'List<ConditionGroupItem>',context!),
'ActionsToTake': JsonConverters.toJson(ActionsToTake,'List<Action>',context!),
'LastUpdated': JsonConverters.toJson(LastUpdated,'DateTime',context!),
'ModulePipeline': JsonConverters.toJson(ModulePipeline,'List<RuleModuleDefinition>',context!),
'Enabled': Enabled,
'WorkdayRestricted': WorkdayRestricted,
'Teams': JsonConverters.toJson(Teams,'List<String>',context!),
'AllowProgrammaticTrigger': AllowProgrammaticTrigger
};
getTypeName() => "IntegrationRule";
TypeContext? context = _ctx;
}
/**
* Represents a set or 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.
*/
class IntegrationRuleList implements IConvertible
{
String? Workspace;
String? DateGenerated;
List<IntegrationRule>? IntegrationRules;
bool? IgnoreSecurity;
IntegrationRuleList({this.Workspace,this.DateGenerated,this.IntegrationRules,this.IgnoreSecurity});
IntegrationRuleList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Workspace = json['Workspace'];
DateGenerated = json['DateGenerated'];
IntegrationRules = JsonConverters.fromJson(json['IntegrationRules'],'List<IntegrationRule>',context!);
IgnoreSecurity = json['IgnoreSecurity'];
return this;
}
Map<String, dynamic> toJson() => {
'Workspace': Workspace,
'DateGenerated': DateGenerated,
'IntegrationRules': JsonConverters.toJson(IntegrationRules,'List<IntegrationRule>',context!),
'IgnoreSecurity': IgnoreSecurity
};
getTypeName() => "IntegrationRuleList";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
'PossibleComparisons': TypeInfo(TypeOf.Enum, enumValues:PossibleComparisons.values),
'Condition': TypeInfo(TypeOf.Class, create:() => Condition()),
'ConditionGroup': TypeInfo(TypeOf.Class, create:() => ConditionGroup()),
'ConditionGroupItem': TypeInfo(TypeOf.Class, create:() => ConditionGroupItem()),
'List<ConditionGroup>': TypeInfo(TypeOf.Class, create:() => <ConditionGroup>[]),
'Action': TypeInfo(TypeOf.Class, create:() => Action()),
'Map<String,dynamic?>': TypeInfo(TypeOf.Class, create:() => Map<String,dynamic?>()),
'RuleModuleDefinition': TypeInfo(TypeOf.Class, create:() => RuleModuleDefinition()),
'IntegrationRule': TypeInfo(TypeOf.Class, create:() => IntegrationRule()),
'List<ConditionGroupItem>': TypeInfo(TypeOf.Class, create:() => <ConditionGroupItem>[]),
'List<Action>': TypeInfo(TypeOf.Class, create:() => <Action>[]),
'List<RuleModuleDefinition>': TypeInfo(TypeOf.Class, create:() => <RuleModuleDefinition>[]),
'IntegrationRuleList': TypeInfo(TypeOf.Class, create:() => IntegrationRuleList()),
'List<IntegrationRule>': TypeInfo(TypeOf.Class, create:() => <IntegrationRule>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /{Workspace}/IntegrationRuleList HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/jsv