import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
abstract class UserOrGroup
{
int? ID;
String? Title;
bool? IsChecked;
String? Image;
UserOrGroup({this.ID,this.Title,this.IsChecked,this.Image});
UserOrGroup.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Title = json['Title'];
IsChecked = json['IsChecked'];
Image = json['Image'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Title': Title,
'IsChecked': IsChecked,
'Image': Image
};
getTypeName() => "UserOrGroup";
TypeContext? context = _ctx;
}
class User extends UserOrGroup implements IConvertible
{
String? Image;
User({this.Image});
User.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Image = json['Image'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Image': Image
});
getTypeName() => "User";
TypeContext? context = _ctx;
}
class Group extends UserOrGroup implements IConvertible
{
String? Image;
Group({this.Image});
Group.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Image = json['Image'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Image': Image
});
getTypeName() => "Group";
TypeContext? context = _ctx;
}
class WorkflowTaskDelay implements IConvertible
{
DateTime? DelayDate;
String? Reason;
WorkflowTaskDelay({this.DelayDate,this.Reason});
WorkflowTaskDelay.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DelayDate = JsonConverters.fromJson(json['DelayDate'],'DateTime',context!);
Reason = json['Reason'];
return this;
}
Map<String, dynamic> toJson() => {
'DelayDate': JsonConverters.toJson(DelayDate,'DateTime',context!),
'Reason': Reason
};
getTypeName() => "WorkflowTaskDelay";
TypeContext? context = _ctx;
}
class WorkflowTaskReason implements IConvertible
{
String? Reason;
bool? Required;
WorkflowTaskReason({this.Reason,this.Required});
WorkflowTaskReason.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Reason = json['Reason'];
Required = json['Required'];
return this;
}
Map<String, dynamic> toJson() => {
'Reason': Reason,
'Required': Required
};
getTypeName() => "WorkflowTaskReason";
TypeContext? context = _ctx;
}
class WorkflowTaskAdhocTransition implements IConvertible
{
String? ID;
String? Title;
bool? AssignmentAllowed;
bool? AssignmentRequired;
int? UserEnvironment;
List<User>? Users;
List<Group>? Groups;
WorkflowTaskDelay? Delay;
WorkflowTaskReason? Reason;
List<UserOrGroup>? UsersOrGroups;
String? Value;
WorkflowTaskAdhocTransition({this.ID,this.Title,this.AssignmentAllowed,this.AssignmentRequired,this.UserEnvironment,this.Users,this.Groups,this.Delay,this.Reason,this.UsersOrGroups,this.Value});
WorkflowTaskAdhocTransition.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Title = json['Title'];
AssignmentAllowed = json['AssignmentAllowed'];
AssignmentRequired = json['AssignmentRequired'];
UserEnvironment = json['UserEnvironment'];
Users = JsonConverters.fromJson(json['Users'],'List<User>',context!);
Groups = JsonConverters.fromJson(json['Groups'],'List<Group>',context!);
Delay = JsonConverters.fromJson(json['Delay'],'WorkflowTaskDelay',context!);
Reason = JsonConverters.fromJson(json['Reason'],'WorkflowTaskReason',context!);
UsersOrGroups = JsonConverters.fromJson(json['UsersOrGroups'],'List<UserOrGroup>',context!);
Value = json['Value'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Title': Title,
'AssignmentAllowed': AssignmentAllowed,
'AssignmentRequired': AssignmentRequired,
'UserEnvironment': UserEnvironment,
'Users': JsonConverters.toJson(Users,'List<User>',context!),
'Groups': JsonConverters.toJson(Groups,'List<Group>',context!),
'Delay': JsonConverters.toJson(Delay,'WorkflowTaskDelay',context!),
'Reason': JsonConverters.toJson(Reason,'WorkflowTaskReason',context!),
'UsersOrGroups': JsonConverters.toJson(UsersOrGroups,'List<UserOrGroup>',context!),
'Value': Value
};
getTypeName() => "WorkflowTaskAdhocTransition";
TypeContext? context = _ctx;
}
class AdhocTransitionDetails implements IConvertible
{
List<WorkflowTaskAdhocTransition>? AdhocTransitions;
AdhocTransitionDetails({this.AdhocTransitions});
AdhocTransitionDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AdhocTransitions = JsonConverters.fromJson(json['AdhocTransitions'],'List<WorkflowTaskAdhocTransition>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'AdhocTransitions': JsonConverters.toJson(AdhocTransitions,'List<WorkflowTaskAdhocTransition>',context!)
};
getTypeName() => "AdhocTransitionDetails";
TypeContext? context = _ctx;
}
class WorkflowTaskActionComment implements IConvertible
{
String? Comment;
bool? Required;
WorkflowTaskActionComment({this.Comment,this.Required});
WorkflowTaskActionComment.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Comment = json['Comment'];
Required = json['Required'];
return this;
}
Map<String, dynamic> toJson() => {
'Comment': Comment,
'Required': Required
};
getTypeName() => "WorkflowTaskActionComment";
TypeContext? context = _ctx;
}
class WorkflowTaskActionDetails extends AdhocTransitionDetails implements IConvertible
{
String? Title;
WorkflowTaskActionComment? Comment;
WorkflowTaskReason? Reason;
WorkflowTaskActionDetails({this.Title,this.Comment,this.Reason});
WorkflowTaskActionDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Title = json['Title'];
Comment = JsonConverters.fromJson(json['Comment'],'WorkflowTaskActionComment',context!);
Reason = JsonConverters.fromJson(json['Reason'],'WorkflowTaskReason',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Title': Title,
'Comment': JsonConverters.toJson(Comment,'WorkflowTaskActionComment',context!),
'Reason': JsonConverters.toJson(Reason,'WorkflowTaskReason',context!)
});
getTypeName() => "WorkflowTaskActionDetails";
TypeContext? context = _ctx;
}
class GetWorkflowTaskActionDetails implements IConvertible
{
String? ConnectionID;
int? TaskID;
GetWorkflowTaskActionDetails({this.ConnectionID,this.TaskID});
GetWorkflowTaskActionDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ConnectionID = json['ConnectionID'];
TaskID = json['TaskID'];
return this;
}
Map<String, dynamic> toJson() => {
'ConnectionID': ConnectionID,
'TaskID': TaskID
};
getTypeName() => "GetWorkflowTaskActionDetails";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
'UserOrGroup': TypeInfo(TypeOf.AbstractClass),
'User': TypeInfo(TypeOf.Class, create:() => User()),
'Group': TypeInfo(TypeOf.Class, create:() => Group()),
'WorkflowTaskDelay': TypeInfo(TypeOf.Class, create:() => WorkflowTaskDelay()),
'WorkflowTaskReason': TypeInfo(TypeOf.Class, create:() => WorkflowTaskReason()),
'WorkflowTaskAdhocTransition': TypeInfo(TypeOf.Class, create:() => WorkflowTaskAdhocTransition()),
'List<User>': TypeInfo(TypeOf.Class, create:() => <User>[]),
'List<Group>': TypeInfo(TypeOf.Class, create:() => <Group>[]),
'List<UserOrGroup>': TypeInfo(TypeOf.Class, create:() => <UserOrGroup>[]),
'AdhocTransitionDetails': TypeInfo(TypeOf.Class, create:() => AdhocTransitionDetails()),
'List<WorkflowTaskAdhocTransition>': TypeInfo(TypeOf.Class, create:() => <WorkflowTaskAdhocTransition>[]),
'WorkflowTaskActionComment': TypeInfo(TypeOf.Class, create:() => WorkflowTaskActionComment()),
'WorkflowTaskActionDetails': TypeInfo(TypeOf.Class, create:() => WorkflowTaskActionDetails()),
'GetWorkflowTaskActionDetails': TypeInfo(TypeOf.Class, create:() => GetWorkflowTaskActionDetails()),
});
Dart GetWorkflowTaskActionDetails DTOs
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.
POST /jsv/reply/GetWorkflowTaskActionDetails HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ConnectionID: 00000000-0000-0000-0000-000000000000,
TaskID: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Title: String, Comment: { Comment: String, Required: False }, Reason: { Reason: String, Required: False }, AdhocTransitions: [ { Title: String, AssignmentAllowed: False, AssignmentRequired: False, UserEnvironment: 0, Users: [ { Image: Icons/User, ID: 0, Title: String, IsChecked: False } ], Groups: [ { Image: Icons/Group, ID: 0, Title: String, IsChecked: False } ], Delay: { DelayDate: 0001-01-01, Reason: String }, Reason: { Reason: String, Required: False }, UsersOrGroups: [ { __type: "IDB.API.DTO.User, IDB.API.DTO", Image: Icons/User, ID: 0, Title: String, IsChecked: False }, { __type: "IDB.API.DTO.Group, IDB.API.DTO", Image: Icons/Group, ID: 0, Title: String, IsChecked: False } ], Value: "String String" } ] }