GET | /api/workflowtransitions/{TransitionID}/getusersandgroups |
---|
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 QuickAddOption implements IConvertible
{
String? Name;
String? EntityType;
QuickAddOption({this.Name,this.EntityType});
QuickAddOption.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
EntityType = json['EntityType'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'EntityType': EntityType
};
getTypeName() => "QuickAddOption";
TypeContext? context = _ctx;
}
class UsersOrGroupsResponse implements IBaseQuickLookupResponse, IConvertible
{
int? NumberOfAllRecords;
List<UserOrGroup>? UsersOrGroups;
List<QuickAddOption>? QuickAddOptions;
UsersOrGroupsResponse({this.NumberOfAllRecords,this.UsersOrGroups,this.QuickAddOptions});
UsersOrGroupsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
NumberOfAllRecords = json['NumberOfAllRecords'];
UsersOrGroups = JsonConverters.fromJson(json['UsersOrGroups'],'List<UserOrGroup>',context!);
QuickAddOptions = JsonConverters.fromJson(json['QuickAddOptions'],'List<QuickAddOption>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'NumberOfAllRecords': NumberOfAllRecords,
'UsersOrGroups': JsonConverters.toJson(UsersOrGroups,'List<UserOrGroup>',context!),
'QuickAddOptions': JsonConverters.toJson(QuickAddOptions,'List<QuickAddOption>',context!)
};
getTypeName() => "UsersOrGroupsResponse";
TypeContext? context = _ctx;
}
/**
* Get available users and groups to assign to a transition.
*/
// @Api(Description="Get available users and groups to assign to a transition.")
class GetUsersAndGroupsForTransition implements IConvertible
{
/**
* ID of the transition
*/
// @ApiMember(Description="ID of the transition", IsRequired=true)
String? TransitionID;
int? PageSize;
int? PageNumber;
String? SearchCriteria;
List<int>? SelectedUserIDs;
List<int>? SelectedGroupIDs;
GetUsersAndGroupsForTransition({this.TransitionID,this.PageSize,this.PageNumber,this.SearchCriteria,this.SelectedUserIDs,this.SelectedGroupIDs});
GetUsersAndGroupsForTransition.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TransitionID = json['TransitionID'];
PageSize = json['PageSize'];
PageNumber = json['PageNumber'];
SearchCriteria = json['SearchCriteria'];
SelectedUserIDs = JsonConverters.fromJson(json['SelectedUserIDs'],'List<int>',context!);
SelectedGroupIDs = JsonConverters.fromJson(json['SelectedGroupIDs'],'List<int>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'TransitionID': TransitionID,
'PageSize': PageSize,
'PageNumber': PageNumber,
'SearchCriteria': SearchCriteria,
'SelectedUserIDs': JsonConverters.toJson(SelectedUserIDs,'List<int>',context!),
'SelectedGroupIDs': JsonConverters.toJson(SelectedGroupIDs,'List<int>',context!)
};
getTypeName() => "GetUsersAndGroupsForTransition";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
'UserOrGroup': TypeInfo(TypeOf.AbstractClass),
'QuickAddOption': TypeInfo(TypeOf.Class, create:() => QuickAddOption()),
'UsersOrGroupsResponse': TypeInfo(TypeOf.Class, create:() => UsersOrGroupsResponse()),
'List<UserOrGroup>': TypeInfo(TypeOf.Class, create:() => <UserOrGroup>[]),
'List<QuickAddOption>': TypeInfo(TypeOf.Class, create:() => <QuickAddOption>[]),
'GetUsersAndGroupsForTransition': TypeInfo(TypeOf.Class, create:() => GetUsersAndGroupsForTransition()),
});
Dart GetUsersAndGroupsForTransition DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/workflowtransitions/{TransitionID}/getusersandgroups HTTP/1.1 Host: digiofficeapigateway.deltares.nl Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"NumberOfAllRecords":0,"UsersOrGroups":[{}],"QuickAddOptions":[{"Name":"String","EntityType":"String"}]}