/* Options: Date: 2025-03-15 04:08:17 Version: 8.30 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.sanctionssearch.com/v2 //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: AddSubUser.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; // @DataContract class Authentication implements IConvertible { /** * The API User ID provided by us when you signed up to use our API */ // @DataMember // @ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body") String? apiUserId; /** * The API User Key provided by us when you signed up to use our API */ // @DataMember // @ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body") String? apiUserKey; Authentication({this.apiUserId,this.apiUserKey}); Authentication.fromJson(Map json) { fromMap(json); } fromMap(Map json) { apiUserId = json['apiUserId']; apiUserKey = json['apiUserKey']; return this; } Map toJson() => { 'apiUserId': apiUserId, 'apiUserKey': apiUserKey }; getTypeName() => "Authentication"; TypeContext? context = _ctx; } // @DataContract class BaseRequest implements IBaseRequest, IConvertible { /** * The authentication credentials */ // @DataMember // @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body") Authentication? authentication; BaseRequest({this.authentication}); BaseRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { authentication = JsonConverters.fromJson(json['authentication'],'Authentication',context!); return this; } Map toJson() => { 'authentication': JsonConverters.toJson(authentication,'Authentication',context!) }; getTypeName() => "BaseRequest"; TypeContext? context = _ctx; } abstract class IBaseRequest { Authentication? authentication; } class AddSubUserRequest implements IConvertible { String? userName; String? name; String? email; bool? isAdmin; bool? canResolveSearches; bool? canDeleteSearches; bool? sendWelcomeEmail; AddSubUserRequest({this.userName,this.name,this.email,this.isAdmin,this.canResolveSearches,this.canDeleteSearches,this.sendWelcomeEmail}); AddSubUserRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { userName = json['userName']; name = json['name']; email = json['email']; isAdmin = json['isAdmin']; canResolveSearches = json['canResolveSearches']; canDeleteSearches = json['canDeleteSearches']; sendWelcomeEmail = json['sendWelcomeEmail']; return this; } Map toJson() => { 'userName': userName, 'name': name, 'email': email, 'isAdmin': isAdmin, 'canResolveSearches': canResolveSearches, 'canDeleteSearches': canDeleteSearches, 'sendWelcomeEmail': sendWelcomeEmail }; getTypeName() => "AddSubUserRequest"; TypeContext? context = _ctx; } class BaseResponse implements IBaseDataResponse, IHasResponseStatus, IConvertible { /** * The status of the response */ // @ApiMember(Description="The status of the response") ResponseStatus? responseStatus; BaseResponse({this.responseStatus}); BaseResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "BaseResponse"; TypeContext? context = _ctx; } class ArrayOfUserNames extends ListBase implements IConvertible { final List l = []; set length(int newLength) { l.length = newLength; } int get length => l.length; String operator [](int index) => l[index]; void operator []=(int index, String value) { l[index] = value; } ArrayOfUserNames(); ArrayOfUserNames.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "ArrayOfUserNames"; TypeContext? context = _ctx; } class SubUser implements IConvertible { /** * Is this user the main user (i.e. the user who created the account) */ // @ApiMember(Description="Is this user the main user (i.e. the user who created the account)") bool? isMainUser; /** * The sub user's id (GUID) */ // @ApiMember(Description="The sub user's id (GUID)") String? userId; /** * The sub user's UserName (i.e. the sign-in username) */ // @ApiMember(Description="The sub user's UserName (i.e. the sign-in username)") String? userName; /** * The sub user's name */ // @ApiMember(Description="The sub user's name") String? name; /** * The sub user's email address */ // @ApiMember(Description="The sub user's email address") String? email; /** * Does this sub user have admin privileges, such as managing purchases and sub users */ // @ApiMember(Description="Does this sub user have admin privileges, such as managing purchases and sub users") bool? isAdmin; /** * Can this sub user resolve searches (UpdateSearch) they have access to */ // @ApiMember(Description="Can this sub user resolve searches (UpdateSearch) they have access to") bool? canResolveSearches; /** * Can this sub user delete searches (DeleteSearch) they have access to */ // @ApiMember(Description="Can this sub user delete searches (DeleteSearch) they have access to") bool? canDeleteSearches; /** * The user names for which searches will be made available to the sub user */ // @ApiMember(Description="The user names for which searches will be made available to the sub user") ArrayOfUserNames? permissions; SubUser({this.isMainUser,this.userId,this.userName,this.name,this.email,this.isAdmin,this.canResolveSearches,this.canDeleteSearches,this.permissions}); SubUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { isMainUser = json['isMainUser']; userId = json['userId']; userName = json['userName']; name = json['name']; email = json['email']; isAdmin = json['isAdmin']; canResolveSearches = json['canResolveSearches']; canDeleteSearches = json['canDeleteSearches']; permissions = JsonConverters.fromJson(json['permissions'],'ArrayOfUserNames',context!); return this; } Map toJson() => { 'isMainUser': isMainUser, 'userId': userId, 'userName': userName, 'name': name, 'email': email, 'isAdmin': isAdmin, 'canResolveSearches': canResolveSearches, 'canDeleteSearches': canDeleteSearches, 'permissions': JsonConverters.toJson(permissions,'ArrayOfUserNames',context!) }; getTypeName() => "SubUser"; TypeContext? context = _ctx; } class AddSubUserData extends BaseResponse implements IConvertible { /** * The sub user */ // @ApiMember(Description="The sub user") SubUser? subUser; AddSubUserData({this.subUser}); AddSubUserData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); subUser = JsonConverters.fromJson(json['subUser'],'SubUser',context!); return this; } Map toJson() => super.toJson()..addAll({ 'subUser': JsonConverters.toJson(subUser,'SubUser',context!) }); getTypeName() => "AddSubUserData"; TypeContext? context = _ctx; } abstract class IBaseDataResponse { ResponseStatus? responseStatus; } abstract class IHasResponseStatus { ResponseStatus? responseStatus; } // @DataContract class AddSubUserResponse implements IConvertible { /** * The response data */ // @DataMember // @ApiMember(Description="The response data") AddSubUserData? data; AddSubUserResponse({this.data}); AddSubUserResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { data = JsonConverters.fromJson(json['data'],'AddSubUserData',context!); return this; } Map toJson() => { 'data': JsonConverters.toJson(data,'AddSubUserData',context!) }; getTypeName() => "AddSubUserResponse"; TypeContext? context = _ctx; } // @Route("/subusers/create", "POST") // @DataContract class AddSubUser extends BaseRequest implements IReturn, IConvertible, IPost { // @DataMember AddSubUserRequest? request; AddSubUser({this.request}); AddSubUser.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); request = JsonConverters.fromJson(json['request'],'AddSubUserRequest',context!); return this; } Map toJson() => super.toJson()..addAll({ 'request': JsonConverters.toJson(request,'AddSubUserRequest',context!) }); createResponse() => AddSubUserResponse(); getResponseTypeName() => "AddSubUserResponse"; getTypeName() => "AddSubUser"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: { 'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()), 'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()), 'IBaseRequest': TypeInfo(TypeOf.Interface), 'AddSubUserRequest': TypeInfo(TypeOf.Class, create:() => AddSubUserRequest()), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'ArrayOfUserNames': TypeInfo(TypeOf.Class, create:() => ArrayOfUserNames()), 'SubUser': TypeInfo(TypeOf.Class, create:() => SubUser()), 'AddSubUserData': TypeInfo(TypeOf.Class, create:() => AddSubUserData()), 'IBaseDataResponse': TypeInfo(TypeOf.Interface), 'IHasResponseStatus': TypeInfo(TypeOf.Interface), 'AddSubUserResponse': TypeInfo(TypeOf.Class, create:() => AddSubUserResponse()), 'AddSubUser': TypeInfo(TypeOf.Class, create:() => AddSubUser()), });