/* Options: Date: 2025-03-15 05:39:35 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: GetCompanyLookups.* //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 GetCompanyLookupsRequest implements IConvertible { /** * If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view */ // @ApiMember(Description="If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view") String? subUserName; bool? listIncompleteSearches; int? page; String? sortOrder; String? nameSearch; String? filterReference; DateTime? filterDateFrom; DateTime? filterDateTo; /** * If set, will only return searches created by the user */ // @ApiMember(Description="If set, will only return searches created by the user") String? filterUserName; GetCompanyLookupsRequest({this.subUserName,this.listIncompleteSearches,this.page,this.sortOrder,this.nameSearch,this.filterReference,this.filterDateFrom,this.filterDateTo,this.filterUserName}); GetCompanyLookupsRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { subUserName = json['subUserName']; listIncompleteSearches = json['listIncompleteSearches']; page = json['page']; sortOrder = json['sortOrder']; nameSearch = json['nameSearch']; filterReference = json['filterReference']; filterDateFrom = JsonConverters.fromJson(json['filterDateFrom'],'DateTime',context!); filterDateTo = JsonConverters.fromJson(json['filterDateTo'],'DateTime',context!); filterUserName = json['filterUserName']; return this; } Map toJson() => { 'subUserName': subUserName, 'listIncompleteSearches': listIncompleteSearches, 'page': page, 'sortOrder': sortOrder, 'nameSearch': nameSearch, 'filterReference': filterReference, 'filterDateFrom': JsonConverters.toJson(filterDateFrom,'DateTime',context!), 'filterDateTo': JsonConverters.toJson(filterDateTo,'DateTime',context!), 'filterUserName': filterUserName }; getTypeName() => "GetCompanyLookupsRequest"; 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 SearchCriteria implements IConvertible { String? name; String? address; String? country; String? dateOfBirth; String? nationality; String? reference; SearchCriteria({this.name,this.address,this.country,this.dateOfBirth,this.nationality,this.reference}); SearchCriteria.fromJson(Map json) { fromMap(json); } fromMap(Map json) { name = json['name']; address = json['address']; country = json['country']; dateOfBirth = json['dateOfBirth']; nationality = json['nationality']; reference = json['reference']; return this; } Map toJson() => { 'name': name, 'address': address, 'country': country, 'dateOfBirth': dateOfBirth, 'nationality': nationality, 'reference': reference }; getTypeName() => "SearchCriteria"; TypeContext? context = _ctx; } class ArrayOfLists 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; } ArrayOfLists(); ArrayOfLists.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "ArrayOfLists"; TypeContext? context = _ctx; } class CompanyLookupListItem implements IConvertible { int? id; SearchCriteria? searchCriteria; ArrayOfLists? selectedLists; DateTime? date; bool? hasCompanyId; bool? hasCompanyDetails; bool? hasStartedSearches; bool? hasCompletedSearches; CompanyLookupListItem({this.id,this.searchCriteria,this.selectedLists,this.date,this.hasCompanyId,this.hasCompanyDetails,this.hasStartedSearches,this.hasCompletedSearches}); CompanyLookupListItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; searchCriteria = JsonConverters.fromJson(json['searchCriteria'],'SearchCriteria',context!); selectedLists = JsonConverters.fromJson(json['selectedLists'],'ArrayOfLists',context!); date = JsonConverters.fromJson(json['date'],'DateTime',context!); hasCompanyId = json['hasCompanyId']; hasCompanyDetails = json['hasCompanyDetails']; hasStartedSearches = json['hasStartedSearches']; hasCompletedSearches = json['hasCompletedSearches']; return this; } Map toJson() => { 'id': id, 'searchCriteria': JsonConverters.toJson(searchCriteria,'SearchCriteria',context!), 'selectedLists': JsonConverters.toJson(selectedLists,'ArrayOfLists',context!), 'date': JsonConverters.toJson(date,'DateTime',context!), 'hasCompanyId': hasCompanyId, 'hasCompanyDetails': hasCompanyDetails, 'hasStartedSearches': hasStartedSearches, 'hasCompletedSearches': hasCompletedSearches }; getTypeName() => "CompanyLookupListItem"; TypeContext? context = _ctx; } class ArrayOfCompanyLookupListItem extends ListBase implements IConvertible { final List l = []; set length(int newLength) { l.length = newLength; } int get length => l.length; CompanyLookupListItem operator [](int index) => l[index]; void operator []=(int index, CompanyLookupListItem value) { l[index] = value; } ArrayOfCompanyLookupListItem(); ArrayOfCompanyLookupListItem.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "ArrayOfCompanyLookupListItem"; TypeContext? context = _ctx; } class GetCompanyLookupsData extends BaseResponse implements IConvertible { int? totalRecords; int? currentPageNum; int? maxPageNum; ArrayOfCompanyLookupListItem? companyLookupRecords; GetCompanyLookupsData({this.totalRecords,this.currentPageNum,this.maxPageNum,this.companyLookupRecords}); GetCompanyLookupsData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); totalRecords = json['totalRecords']; currentPageNum = json['currentPageNum']; maxPageNum = json['maxPageNum']; companyLookupRecords = JsonConverters.fromJson(json['companyLookupRecords'],'ArrayOfCompanyLookupListItem',context!); return this; } Map toJson() => super.toJson()..addAll({ 'totalRecords': totalRecords, 'currentPageNum': currentPageNum, 'maxPageNum': maxPageNum, 'companyLookupRecords': JsonConverters.toJson(companyLookupRecords,'ArrayOfCompanyLookupListItem',context!) }); getTypeName() => "GetCompanyLookupsData"; TypeContext? context = _ctx; } abstract class IBaseDataResponse { ResponseStatus? responseStatus; } abstract class IHasResponseStatus { ResponseStatus? responseStatus; } // @DataContract class GetCompanyLookupsResponse implements IConvertible { // @DataMember GetCompanyLookupsData? data; GetCompanyLookupsResponse({this.data}); GetCompanyLookupsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { data = JsonConverters.fromJson(json['data'],'GetCompanyLookupsData',context!); return this; } Map toJson() => { 'data': JsonConverters.toJson(data,'GetCompanyLookupsData',context!) }; getTypeName() => "GetCompanyLookupsResponse"; TypeContext? context = _ctx; } // @Route("/companylookups/list", "POST") // @DataContract class GetCompanyLookups extends BaseRequest implements IReturn, IConvertible, IPost { // @DataMember GetCompanyLookupsRequest? request; GetCompanyLookups({this.request}); GetCompanyLookups.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); request = JsonConverters.fromJson(json['request'],'GetCompanyLookupsRequest',context!); return this; } Map toJson() => super.toJson()..addAll({ 'request': JsonConverters.toJson(request,'GetCompanyLookupsRequest',context!) }); createResponse() => GetCompanyLookupsResponse(); getResponseTypeName() => "GetCompanyLookupsResponse"; getTypeName() => "GetCompanyLookups"; 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), 'GetCompanyLookupsRequest': TypeInfo(TypeOf.Class, create:() => GetCompanyLookupsRequest()), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'SearchCriteria': TypeInfo(TypeOf.Class, create:() => SearchCriteria()), 'ArrayOfLists': TypeInfo(TypeOf.Class, create:() => ArrayOfLists()), 'CompanyLookupListItem': TypeInfo(TypeOf.Class, create:() => CompanyLookupListItem()), 'ArrayOfCompanyLookupListItem': TypeInfo(TypeOf.Class, create:() => ArrayOfCompanyLookupListItem()), 'GetCompanyLookupsData': TypeInfo(TypeOf.Class, create:() => GetCompanyLookupsData()), 'IBaseDataResponse': TypeInfo(TypeOf.Interface), 'IHasResponseStatus': TypeInfo(TypeOf.Interface), 'GetCompanyLookupsResponse': TypeInfo(TypeOf.Class, create:() => GetCompanyLookupsResponse()), 'GetCompanyLookups': TypeInfo(TypeOf.Class, create:() => GetCompanyLookups()), });