import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class JsonDto implements IConvertible
{
JsonDto();
JsonDto.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "JsonDto";
TypeContext? context = _ctx;
}
class JsonRequestDto extends JsonDto implements IConvertible
{
String? ClientCode;
String? ClientRegistrationCode;
String? Token;
JsonRequestDto({this.ClientCode,this.ClientRegistrationCode,this.Token});
JsonRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ClientCode = json['ClientCode'];
ClientRegistrationCode = json['ClientRegistrationCode'];
Token = json['Token'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ClientCode': ClientCode,
'ClientRegistrationCode': ClientRegistrationCode,
'Token': Token
});
getTypeName() => "JsonRequestDto";
TypeContext? context = _ctx;
}
class JsonIsUserBasedLicenseRequest extends JsonRequestDto implements IConvertible
{
JsonIsUserBasedLicenseRequest();
JsonIsUserBasedLicenseRequest.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "JsonIsUserBasedLicenseRequest";
TypeContext? context = _ctx;
}
class JsonIsUserBasedLicenseResponse implements IConvertible
{
bool? IsUserBased;
bool? EnableAivikaCaptureSso;
JsonIsUserBasedLicenseResponse({this.IsUserBased,this.EnableAivikaCaptureSso});
JsonIsUserBasedLicenseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
IsUserBased = json['IsUserBased'];
EnableAivikaCaptureSso = json['EnableAivikaCaptureSso'];
return this;
}
Map<String, dynamic> toJson() => {
'IsUserBased': IsUserBased,
'EnableAivikaCaptureSso': EnableAivikaCaptureSso
};
getTypeName() => "JsonIsUserBasedLicenseResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'buildmax.org', types: <String, TypeInfo> {
'JsonDto': TypeInfo(TypeOf.Class, create:() => JsonDto()),
'JsonRequestDto': TypeInfo(TypeOf.Class, create:() => JsonRequestDto()),
'JsonIsUserBasedLicenseRequest': TypeInfo(TypeOf.Class, create:() => JsonIsUserBasedLicenseRequest()),
'JsonIsUserBasedLicenseResponse': TypeInfo(TypeOf.Class, create:() => JsonIsUserBasedLicenseResponse()),
});
Dart JsonIsUserBasedLicenseRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/reply/JsonIsUserBasedLicenseRequest HTTP/1.1
Host: buildmax.org
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<JsonIsUserBasedLicenseRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ScannerVision.WebService.Json.Dto">
<ClientCode>String</ClientCode>
<ClientRegistrationCode>String</ClientRegistrationCode>
<Token>String</Token>
</JsonIsUserBasedLicenseRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <JsonIsUserBasedLicenseResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ScannerVision.WebService.Json.Dto"> <EnableAivikaCaptureSso>false</EnableAivikaCaptureSso> <IsUserBased>false</IsUserBased> </JsonIsUserBasedLicenseResponse>