/* Options: Date: 2025-03-15 04:15:10 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: GetSubUsers.* //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 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 GetSubUsersData extends BaseResponse implements IConvertible { /** * The list of sub users */ // @ApiMember(Description="The list of sub users") List? subUsers; GetSubUsersData({this.subUsers}); GetSubUsersData.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); subUsers = JsonConverters.fromJson(json['subUsers'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'subUsers': JsonConverters.toJson(subUsers,'List',context!) }); getTypeName() => "GetSubUsersData"; TypeContext? context = _ctx; } abstract class IBaseDataResponse { ResponseStatus? responseStatus; } abstract class IHasResponseStatus { ResponseStatus? responseStatus; } // @DataContract class GetSubUsersResponse implements IConvertible { /** * The response data */ // @DataMember // @ApiMember(Description="The response data") GetSubUsersData? data; GetSubUsersResponse({this.data}); GetSubUsersResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { data = JsonConverters.fromJson(json['data'],'GetSubUsersData',context!); return this; } Map toJson() => { 'data': JsonConverters.toJson(data,'GetSubUsersData',context!) }; getTypeName() => "GetSubUsersResponse"; TypeContext? context = _ctx; } // @Route("/subusers/list", "GET") // @DataContract class GetSubUsers extends BaseRequest implements IReturn, IConvertible, IGet { /** * If this is 'True' the main user will be included in the list of sub users */ // @DataMember // @ApiMember(Description="If this is 'True' the main user will be included in the list of sub users", ParameterType="query") bool? includeMainUser; GetSubUsers({this.includeMainUser}); GetSubUsers.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); includeMainUser = json['includeMainUser']; return this; } Map toJson() => super.toJson()..addAll({ 'includeMainUser': includeMainUser }); createResponse() => GetSubUsersResponse(); getResponseTypeName() => "GetSubUsersResponse"; getTypeName() => "GetSubUsers"; 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), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'ArrayOfUserNames': TypeInfo(TypeOf.Class, create:() => ArrayOfUserNames()), 'SubUser': TypeInfo(TypeOf.Class, create:() => SubUser()), 'GetSubUsersData': TypeInfo(TypeOf.Class, create:() => GetSubUsersData()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'IBaseDataResponse': TypeInfo(TypeOf.Interface), 'IHasResponseStatus': TypeInfo(TypeOf.Interface), 'GetSubUsersResponse': TypeInfo(TypeOf.Class, create:() => GetSubUsersResponse()), 'GetSubUsers': TypeInfo(TypeOf.Class, create:() => GetSubUsers()), });