import 'package:servicestack/servicestack.dart';
class RegisterDocumentResponse implements IConvertible
{
bool? IsSucces;
String? DocumentId;
List<String>? ErrorMessages;
String? Ooxml;
/**
* Is it a corporate identity document?
*/
// @ApiMember(Description="Is it a corporate identity document?", IsRequired=true)
bool? IsCorporateIdentity;
Map<String,String?>? DocumentVariables;
RegisterDocumentResponse({this.IsSucces,this.DocumentId,this.ErrorMessages,this.Ooxml,this.IsCorporateIdentity,this.DocumentVariables});
RegisterDocumentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
IsSucces = json['IsSucces'];
DocumentId = json['DocumentId'];
ErrorMessages = JsonConverters.fromJson(json['ErrorMessages'],'List<String>',context!);
Ooxml = json['Ooxml'];
IsCorporateIdentity = json['IsCorporateIdentity'];
DocumentVariables = JsonConverters.fromJson(json['DocumentVariables'],'Map<String,String?>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'IsSucces': IsSucces,
'DocumentId': DocumentId,
'ErrorMessages': JsonConverters.toJson(ErrorMessages,'List<String>',context!),
'Ooxml': Ooxml,
'IsCorporateIdentity': IsCorporateIdentity,
'DocumentVariables': JsonConverters.toJson(DocumentVariables,'Map<String,String?>',context!)
};
getTypeName() => "RegisterDocumentResponse";
TypeContext? context = _ctx;
}
class RegistrationValue implements IConvertible
{
String? Key;
String? Value;
String? ShadowValue;
RegistrationValue({this.Key,this.Value,this.ShadowValue});
RegistrationValue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Value = json['Value'];
ShadowValue = json['ShadowValue'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Value': Value,
'ShadowValue': ShadowValue
};
getTypeName() => "RegistrationValue";
TypeContext? context = _ctx;
}
class Transition implements IConvertible
{
String? ID;
String? Reason;
DateTime? DelayDate;
String? DelayReason;
List<int>? UserIDs;
List<int>? GroupIDs;
Transition({this.ID,this.Reason,this.DelayDate,this.DelayReason,this.UserIDs,this.GroupIDs});
Transition.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Reason = json['Reason'];
DelayDate = JsonConverters.fromJson(json['DelayDate'],'DateTime',context!);
DelayReason = json['DelayReason'];
UserIDs = JsonConverters.fromJson(json['UserIDs'],'List<int>',context!);
GroupIDs = JsonConverters.fromJson(json['GroupIDs'],'List<int>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Reason': Reason,
'DelayDate': JsonConverters.toJson(DelayDate,'DateTime',context!),
'DelayReason': DelayReason,
'UserIDs': JsonConverters.toJson(UserIDs,'List<int>',context!),
'GroupIDs': JsonConverters.toJson(GroupIDs,'List<int>',context!)
};
getTypeName() => "Transition";
TypeContext? context = _ctx;
}
class Process implements IConvertible
{
int? ID;
String? Title;
String? Description;
String? Note;
String? Coordinator;
bool? Urgent;
List<Transition>? Transitions;
Process({this.ID,this.Title,this.Description,this.Note,this.Coordinator,this.Urgent,this.Transitions});
Process.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Title = json['Title'];
Description = json['Description'];
Note = json['Note'];
Coordinator = json['Coordinator'];
Urgent = json['Urgent'];
Transitions = JsonConverters.fromJson(json['Transitions'],'List<Transition>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Title': Title,
'Description': Description,
'Note': Note,
'Coordinator': Coordinator,
'Urgent': Urgent,
'Transitions': JsonConverters.toJson(Transitions,'List<Transition>',context!)
};
getTypeName() => "Process";
TypeContext? context = _ctx;
}
class UpdateDocumentRegistration implements IConvertible
{
String? DocumentID;
List<RegistrationValue>? Values;
List<Process>? Processes;
bool? GenerateOoxml;
UpdateDocumentRegistration({this.DocumentID,this.Values,this.Processes,this.GenerateOoxml});
UpdateDocumentRegistration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DocumentID = json['DocumentID'];
Values = JsonConverters.fromJson(json['Values'],'List<RegistrationValue>',context!);
Processes = JsonConverters.fromJson(json['Processes'],'List<Process>',context!);
GenerateOoxml = json['GenerateOoxml'];
return this;
}
Map<String, dynamic> toJson() => {
'DocumentID': DocumentID,
'Values': JsonConverters.toJson(Values,'List<RegistrationValue>',context!),
'Processes': JsonConverters.toJson(Processes,'List<Process>',context!),
'GenerateOoxml': GenerateOoxml
};
getTypeName() => "UpdateDocumentRegistration";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
'RegisterDocumentResponse': TypeInfo(TypeOf.Class, create:() => RegisterDocumentResponse()),
'Map<String,String?>': TypeInfo(TypeOf.Class, create:() => Map<String,String?>()),
'RegistrationValue': TypeInfo(TypeOf.Class, create:() => RegistrationValue()),
'Transition': TypeInfo(TypeOf.Class, create:() => Transition()),
'Process': TypeInfo(TypeOf.Class, create:() => Process()),
'List<Transition>': TypeInfo(TypeOf.Class, create:() => <Transition>[]),
'UpdateDocumentRegistration': TypeInfo(TypeOf.Class, create:() => UpdateDocumentRegistration()),
'List<RegistrationValue>': TypeInfo(TypeOf.Class, create:() => <RegistrationValue>[]),
'List<Process>': TypeInfo(TypeOf.Class, create:() => <Process>[]),
});
Dart UpdateDocumentRegistration 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/UpdateDocumentRegistration HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Values:
[
{
Value: String,
ShadowValue: String
}
],
Processes:
[
{
ID: 0,
Title: String,
Description: String,
Note: String,
Coordinator: String,
Urgent: False,
Transitions:
[
{
Reason: String,
DelayDate: 0001-01-01,
DelayReason: String,
UserIDs:
[
0
],
GroupIDs:
[
0
]
}
]
}
],
GenerateOoxml: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { IsSucces: False, ErrorMessages: [ String ], Ooxml: String, IsCorporateIdentity: False }