import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
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 QuickLookupResponse implements IBaseQuickLookupResponse, IConvertible
{
int? NumberOfAllRecords;
List<SerializableKeyValuePair<String,String>>? Values;
List<QuickAddOption>? QuickAddOptions;
QuickLookupResponse({this.NumberOfAllRecords,this.Values,this.QuickAddOptions});
QuickLookupResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
NumberOfAllRecords = json['NumberOfAllRecords'];
Values = JsonConverters.fromJson(json['Values'],'List<SerializableKeyValuePair<String,String>>',context!);
QuickAddOptions = JsonConverters.fromJson(json['QuickAddOptions'],'List<QuickAddOption>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'NumberOfAllRecords': NumberOfAllRecords,
'Values': JsonConverters.toJson(Values,'List<SerializableKeyValuePair<String,String>>',context!),
'QuickAddOptions': JsonConverters.toJson(QuickAddOptions,'List<QuickAddOption>',context!)
};
getTypeName() => "QuickLookupResponse";
TypeContext? context = _ctx;
}
class RegistrationProfileFieldValue implements IConvertible
{
String? DocumentFieldID;
String? Value;
String? ShadowValue;
bool? IsModifiedByUser;
RegistrationProfileFieldValue({this.DocumentFieldID,this.Value,this.ShadowValue,this.IsModifiedByUser});
RegistrationProfileFieldValue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DocumentFieldID = json['DocumentFieldID'];
Value = json['Value'];
ShadowValue = json['ShadowValue'];
IsModifiedByUser = json['IsModifiedByUser'];
return this;
}
Map<String, dynamic> toJson() => {
'DocumentFieldID': DocumentFieldID,
'Value': Value,
'ShadowValue': ShadowValue,
'IsModifiedByUser': IsModifiedByUser
};
getTypeName() => "RegistrationProfileFieldValue";
TypeContext? context = _ctx;
}
class QuickLookup implements IConvertible
{
String? DocumentID;
String? DocumentFieldID;
String? RegistrationProfileFieldID;
String? LookupValue;
List<RegistrationProfileFieldValue>? DependableFields;
bool? ApplyOptionalFilters;
QuickLookup({this.DocumentID,this.DocumentFieldID,this.RegistrationProfileFieldID,this.LookupValue,this.DependableFields,this.ApplyOptionalFilters});
QuickLookup.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DocumentID = json['DocumentID'];
DocumentFieldID = json['DocumentFieldID'];
RegistrationProfileFieldID = json['RegistrationProfileFieldID'];
LookupValue = json['LookupValue'];
DependableFields = JsonConverters.fromJson(json['DependableFields'],'List<RegistrationProfileFieldValue>',context!);
ApplyOptionalFilters = json['ApplyOptionalFilters'];
return this;
}
Map<String, dynamic> toJson() => {
'DocumentID': DocumentID,
'DocumentFieldID': DocumentFieldID,
'RegistrationProfileFieldID': RegistrationProfileFieldID,
'LookupValue': LookupValue,
'DependableFields': JsonConverters.toJson(DependableFields,'List<RegistrationProfileFieldValue>',context!),
'ApplyOptionalFilters': ApplyOptionalFilters
};
getTypeName() => "QuickLookup";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
'QuickAddOption': TypeInfo(TypeOf.Class, create:() => QuickAddOption()),
'QuickLookupResponse': TypeInfo(TypeOf.Class, create:() => QuickLookupResponse()),
'List<SerializableKeyValuePair<String,String>>': TypeInfo(TypeOf.Class, create:() => <SerializableKeyValuePair<String,String>>[]),
'SerializableKeyValuePair<String,String>': TypeInfo(TypeOf.Class, create:() => SerializableKeyValuePair<String,String>()),
'List<QuickAddOption>': TypeInfo(TypeOf.Class, create:() => <QuickAddOption>[]),
'RegistrationProfileFieldValue': TypeInfo(TypeOf.Class, create:() => RegistrationProfileFieldValue()),
'QuickLookup': TypeInfo(TypeOf.Class, create:() => QuickLookup()),
'List<RegistrationProfileFieldValue>': TypeInfo(TypeOf.Class, create:() => <RegistrationProfileFieldValue>[]),
});
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/QuickLookup HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
DocumentID: 00000000-0000-0000-0000-000000000000,
DocumentFieldID: String,
RegistrationProfileFieldID: String,
LookupValue: String,
DependableFields:
[
{
Value: String,
ShadowValue: String,
IsModifiedByUser: False
}
],
ApplyOptionalFilters: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { NumberOfAllRecords: 0, Values: [ { } ], QuickAddOptions: [ { Name: String, EntityType: String } ] }