/* Options:
Date: 2025-06-17 07:38:34
Version: 8.30
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://api.sanctionssearch.com/v1

//GlobalNamespace: 
//AddServiceStackTypes: True
//AddResponseStatus: False
//AddImplicitVersion: 
//AddDescriptionAsComments: True
IncludeTypes: AddIndividualSearch.*
//ExcludeTypes: 
//DefaultImports: package:servicestack/servicestack.dart
*/

import 'package:servicestack/servicestack.dart';

// @DataContract
class Authentication implements IAuthentication, IConvertible
{
    /**
    * The API User ID that will authenticate your request
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The API User ID that will authenticate your request", IsRequired=true)
    String? ApiUserId;

    /**
    * The API User Key that will authenticate your request
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The API User Key that will authenticate your request", IsRequired=true)
    String? ApiUserKey;

    Authentication({this.ApiUserId,this.ApiUserKey});
    Authentication.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiUserId = json['ApiUserId'];
        ApiUserKey = json['ApiUserKey'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiUserId': ApiUserId,
        'ApiUserKey': ApiUserKey
    };

    getTypeName() => "Authentication";
    TypeContext? context = _ctx;
}

abstract class IBaseRequest
{
    Authentication? Authentication;
}

class ArrayOfSanctionsLists extends ListBase<String> implements IConvertible
{
    final List<String> 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; }
    ArrayOfSanctionsLists();
    ArrayOfSanctionsLists.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ArrayOfSanctionsLists";
    TypeContext? context = _ctx;
}

class SearchIndividualRequest implements IConvertible
{
    String? Name1;
    String? Name2;
    String? Name3;
    String? Name4;
    String? Name5;
    String? Name6;
    String? DateOfBirth;
    String? CountryOfBirth;
    String? Nationality;
    String? Address;
    ArrayOfSanctionsLists? SelectedSanctionsLists;

    SearchIndividualRequest({this.Name1,this.Name2,this.Name3,this.Name4,this.Name5,this.Name6,this.DateOfBirth,this.CountryOfBirth,this.Nationality,this.Address,this.SelectedSanctionsLists});
    SearchIndividualRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name1 = json['Name1'];
        Name2 = json['Name2'];
        Name3 = json['Name3'];
        Name4 = json['Name4'];
        Name5 = json['Name5'];
        Name6 = json['Name6'];
        DateOfBirth = json['DateOfBirth'];
        CountryOfBirth = json['CountryOfBirth'];
        Nationality = json['Nationality'];
        Address = json['Address'];
        SelectedSanctionsLists = JsonConverters.fromJson(json['SelectedSanctionsLists'],'ArrayOfSanctionsLists',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name1': Name1,
        'Name2': Name2,
        'Name3': Name3,
        'Name4': Name4,
        'Name5': Name5,
        'Name6': Name6,
        'DateOfBirth': DateOfBirth,
        'CountryOfBirth': CountryOfBirth,
        'Nationality': Nationality,
        'Address': Address,
        'SelectedSanctionsLists': JsonConverters.toJson(SelectedSanctionsLists,'ArrayOfSanctionsLists',context!)
    };

    getTypeName() => "SearchIndividualRequest";
    TypeContext? context = _ctx;
}

class SearchCriteria implements IConvertible
{
    String? Name;
    String? DateOfBirth;
    String? CountryOfBirth;
    String? Nationality;
    String? Address;

    SearchCriteria({this.Name,this.DateOfBirth,this.CountryOfBirth,this.Nationality,this.Address});
    SearchCriteria.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        DateOfBirth = json['DateOfBirth'];
        CountryOfBirth = json['CountryOfBirth'];
        Nationality = json['Nationality'];
        Address = json['Address'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'DateOfBirth': DateOfBirth,
        'CountryOfBirth': CountryOfBirth,
        'Nationality': Nationality,
        'Address': Address
    };

    getTypeName() => "SearchCriteria";
    TypeContext? context = _ctx;
}

class SearchResultHmTreasury implements IConvertible
{
    int? ResultStrength;
    double? ResultSimilarity;
    bool? ResultResolved;
    String? ResultType;
    DateTime? DateListed;
    DateTime? DateUpdated;
    String? Name1;
    String? Name2;
    String? Name3;
    String? Name4;
    String? Name5;
    String? Name6;
    String? DateOfBirth;
    String? CountryOfBirth;
    String? Nationality;
    String? Address1;
    String? Address2;
    String? Address3;
    String? Address4;
    String? Address5;
    String? Address6;
    String? PostCode;
    String? Country;

    SearchResultHmTreasury({this.ResultStrength,this.ResultSimilarity,this.ResultResolved,this.ResultType,this.DateListed,this.DateUpdated,this.Name1,this.Name2,this.Name3,this.Name4,this.Name5,this.Name6,this.DateOfBirth,this.CountryOfBirth,this.Nationality,this.Address1,this.Address2,this.Address3,this.Address4,this.Address5,this.Address6,this.PostCode,this.Country});
    SearchResultHmTreasury.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResultStrength = json['ResultStrength'];
        ResultSimilarity = JsonConverters.toDouble(json['ResultSimilarity']);
        ResultResolved = json['ResultResolved'];
        ResultType = json['ResultType'];
        DateListed = JsonConverters.fromJson(json['DateListed'],'DateTime',context!);
        DateUpdated = JsonConverters.fromJson(json['DateUpdated'],'DateTime',context!);
        Name1 = json['Name1'];
        Name2 = json['Name2'];
        Name3 = json['Name3'];
        Name4 = json['Name4'];
        Name5 = json['Name5'];
        Name6 = json['Name6'];
        DateOfBirth = json['DateOfBirth'];
        CountryOfBirth = json['CountryOfBirth'];
        Nationality = json['Nationality'];
        Address1 = json['Address1'];
        Address2 = json['Address2'];
        Address3 = json['Address3'];
        Address4 = json['Address4'];
        Address5 = json['Address5'];
        Address6 = json['Address6'];
        PostCode = json['PostCode'];
        Country = json['Country'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResultStrength': ResultStrength,
        'ResultSimilarity': ResultSimilarity,
        'ResultResolved': ResultResolved,
        'ResultType': ResultType,
        'DateListed': JsonConverters.toJson(DateListed,'DateTime',context!),
        'DateUpdated': JsonConverters.toJson(DateUpdated,'DateTime',context!),
        'Name1': Name1,
        'Name2': Name2,
        'Name3': Name3,
        'Name4': Name4,
        'Name5': Name5,
        'Name6': Name6,
        'DateOfBirth': DateOfBirth,
        'CountryOfBirth': CountryOfBirth,
        'Nationality': Nationality,
        'Address1': Address1,
        'Address2': Address2,
        'Address3': Address3,
        'Address4': Address4,
        'Address5': Address5,
        'Address6': Address6,
        'PostCode': PostCode,
        'Country': Country
    };

    getTypeName() => "SearchResultHmTreasury";
    TypeContext? context = _ctx;
}

class SearchResultOfacAddress implements IConvertible
{
    String? Address1;
    String? Address2;
    String? Address3;
    String? City;
    String? State;
    String? PostCode;
    String? Country;

    SearchResultOfacAddress({this.Address1,this.Address2,this.Address3,this.City,this.State,this.PostCode,this.Country});
    SearchResultOfacAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Address1 = json['Address1'];
        Address2 = json['Address2'];
        Address3 = json['Address3'];
        City = json['City'];
        State = json['State'];
        PostCode = json['PostCode'];
        Country = json['Country'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Address1': Address1,
        'Address2': Address2,
        'Address3': Address3,
        'City': City,
        'State': State,
        'PostCode': PostCode,
        'Country': Country
    };

    getTypeName() => "SearchResultOfacAddress";
    TypeContext? context = _ctx;
}

class SearchResultOfacAka implements IConvertible
{
    String? FirstName;
    String? LastName;
    String? Type;
    String? Strength;

    SearchResultOfacAka({this.FirstName,this.LastName,this.Type,this.Strength});
    SearchResultOfacAka.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        Type = json['Type'];
        Strength = json['Strength'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'FirstName': FirstName,
        'LastName': LastName,
        'Type': Type,
        'Strength': Strength
    };

    getTypeName() => "SearchResultOfacAka";
    TypeContext? context = _ctx;
}

class SearchResultOfacDateOfBirth implements IConvertible
{
    String? DateOfBirth;

    SearchResultOfacDateOfBirth({this.DateOfBirth});
    SearchResultOfacDateOfBirth.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DateOfBirth = json['DateOfBirth'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DateOfBirth': DateOfBirth
    };

    getTypeName() => "SearchResultOfacDateOfBirth";
    TypeContext? context = _ctx;
}

class SearchResultOfacNationality implements IConvertible
{
    String? Country;

    SearchResultOfacNationality({this.Country});
    SearchResultOfacNationality.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Country = json['Country'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Country': Country
    };

    getTypeName() => "SearchResultOfacNationality";
    TypeContext? context = _ctx;
}

class SearchResultOfacPlaceOfBirth implements IConvertible
{
    String? PlaceOfBirth;

    SearchResultOfacPlaceOfBirth({this.PlaceOfBirth});
    SearchResultOfacPlaceOfBirth.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PlaceOfBirth = json['PlaceOfBirth'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PlaceOfBirth': PlaceOfBirth
    };

    getTypeName() => "SearchResultOfacPlaceOfBirth";
    TypeContext? context = _ctx;
}

class SearchResultOfac implements IConvertible
{
    int? ResultStrength;
    double? ResultSimilarity;
    bool? ResultResolved;
    String? ResultType;
    DateTime? DateUpdated;
    String? FirstName;
    String? LastName;
    List<SearchResultOfacAddress>? Addresses;
    List<SearchResultOfacAka>? Akas;
    List<SearchResultOfacDateOfBirth>? DateOfBirths;
    List<SearchResultOfacNationality>? Nationalities;
    List<SearchResultOfacPlaceOfBirth>? PlaceOfBirths;

    SearchResultOfac({this.ResultStrength,this.ResultSimilarity,this.ResultResolved,this.ResultType,this.DateUpdated,this.FirstName,this.LastName,this.Addresses,this.Akas,this.DateOfBirths,this.Nationalities,this.PlaceOfBirths});
    SearchResultOfac.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResultStrength = json['ResultStrength'];
        ResultSimilarity = JsonConverters.toDouble(json['ResultSimilarity']);
        ResultResolved = json['ResultResolved'];
        ResultType = json['ResultType'];
        DateUpdated = JsonConverters.fromJson(json['DateUpdated'],'DateTime',context!);
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        Addresses = JsonConverters.fromJson(json['Addresses'],'List<SearchResultOfacAddress>',context!);
        Akas = JsonConverters.fromJson(json['Akas'],'List<SearchResultOfacAka>',context!);
        DateOfBirths = JsonConverters.fromJson(json['DateOfBirths'],'List<SearchResultOfacDateOfBirth>',context!);
        Nationalities = JsonConverters.fromJson(json['Nationalities'],'List<SearchResultOfacNationality>',context!);
        PlaceOfBirths = JsonConverters.fromJson(json['PlaceOfBirths'],'List<SearchResultOfacPlaceOfBirth>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResultStrength': ResultStrength,
        'ResultSimilarity': ResultSimilarity,
        'ResultResolved': ResultResolved,
        'ResultType': ResultType,
        'DateUpdated': JsonConverters.toJson(DateUpdated,'DateTime',context!),
        'FirstName': FirstName,
        'LastName': LastName,
        'Addresses': JsonConverters.toJson(Addresses,'List<SearchResultOfacAddress>',context!),
        'Akas': JsonConverters.toJson(Akas,'List<SearchResultOfacAka>',context!),
        'DateOfBirths': JsonConverters.toJson(DateOfBirths,'List<SearchResultOfacDateOfBirth>',context!),
        'Nationalities': JsonConverters.toJson(Nationalities,'List<SearchResultOfacNationality>',context!),
        'PlaceOfBirths': JsonConverters.toJson(PlaceOfBirths,'List<SearchResultOfacPlaceOfBirth>',context!)
    };

    getTypeName() => "SearchResultOfac";
    TypeContext? context = _ctx;
}

class SearchResults implements IConvertible
{
    List<SearchResultHmTreasury>? HMTResults;
    List<SearchResultOfac>? OfacResults;

    SearchResults({this.HMTResults,this.OfacResults});
    SearchResults.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        HMTResults = JsonConverters.fromJson(json['HMTResults'],'List<SearchResultHmTreasury>',context!);
        OfacResults = JsonConverters.fromJson(json['OfacResults'],'List<SearchResultOfac>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'HMTResults': JsonConverters.toJson(HMTResults,'List<SearchResultHmTreasury>',context!),
        'OfacResults': JsonConverters.toJson(OfacResults,'List<SearchResultOfac>',context!)
    };

    getTypeName() => "SearchResults";
    TypeContext? context = _ctx;
}

class SearchRecord implements IConvertible
{
    int? Id;
    String? SearchType;
    DateTime? DateSearched;
    DateTime? DateUpdated;
    int? NumOfResults;
    bool? ClientInResults;
    bool? ClientNotInResults;
    bool? AffectedByUpdate;
    SearchCriteria? SearchCriteria;
    SearchResults? SearchResults;

    SearchRecord({this.Id,this.SearchType,this.DateSearched,this.DateUpdated,this.NumOfResults,this.ClientInResults,this.ClientNotInResults,this.AffectedByUpdate,this.SearchCriteria,this.SearchResults});
    SearchRecord.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        SearchType = json['SearchType'];
        DateSearched = JsonConverters.fromJson(json['DateSearched'],'DateTime',context!);
        DateUpdated = JsonConverters.fromJson(json['DateUpdated'],'DateTime',context!);
        NumOfResults = json['NumOfResults'];
        ClientInResults = json['ClientInResults'];
        ClientNotInResults = json['ClientNotInResults'];
        AffectedByUpdate = json['AffectedByUpdate'];
        SearchCriteria = JsonConverters.fromJson(json['SearchCriteria'],'SearchCriteria',context!);
        SearchResults = JsonConverters.fromJson(json['SearchResults'],'SearchResults',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'SearchType': SearchType,
        'DateSearched': JsonConverters.toJson(DateSearched,'DateTime',context!),
        'DateUpdated': JsonConverters.toJson(DateUpdated,'DateTime',context!),
        'NumOfResults': NumOfResults,
        'ClientInResults': ClientInResults,
        'ClientNotInResults': ClientNotInResults,
        'AffectedByUpdate': AffectedByUpdate,
        'SearchCriteria': JsonConverters.toJson(SearchCriteria,'SearchCriteria',context!),
        'SearchResults': JsonConverters.toJson(SearchResults,'SearchResults',context!)
    };

    getTypeName() => "SearchRecord";
    TypeContext? context = _ctx;
}

// @DataContract
class AddIndividualSearchData implements IBaseDataResponse, IHasResponseStatus, IConvertible
{
    // @DataMember
    ResponseStatus? ResponseStatus;

    // @DataMember
    SearchRecord? SearchRecord;

    AddIndividualSearchData({this.ResponseStatus,this.SearchRecord});
    AddIndividualSearchData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        SearchRecord = JsonConverters.fromJson(json['SearchRecord'],'SearchRecord',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'SearchRecord': JsonConverters.toJson(SearchRecord,'SearchRecord',context!)
    };

    getTypeName() => "AddIndividualSearchData";
    TypeContext? context = _ctx;
}

abstract class IAuthentication
{
    String? ApiUserId;
    String? ApiUserKey;
    String? UserId;
}

abstract class IBaseDataResponse
{
    ResponseStatus? ResponseStatus;
}

abstract class IHasResponseStatus
{
    ResponseStatus? ResponseStatus;
}

// @DataContract
class AddIndividualSearchResponse implements IConvertible
{
    // @DataMember
    AddIndividualSearchData? Data;

    AddIndividualSearchResponse({this.Data});
    AddIndividualSearchResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Data = JsonConverters.fromJson(json['Data'],'AddIndividualSearchData',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Data': JsonConverters.toJson(Data,'AddIndividualSearchData',context!)
    };

    getTypeName() => "AddIndividualSearchResponse";
    TypeContext? context = _ctx;
}

/**
* Create a new sanctions search for a person. SanctionsListId: valid values: HMTSL and OFACL
*/
// @Route("/sanctions/individual/create", "POST")
// @Api(Description="Create a new sanctions search for a person. SanctionsListId: valid values: HMTSL and OFACL")
// @ApiResponse(Description="Your request is successful if the \"<em>Data.ResponseStatus.Message</em>\" field is \"<b>Success</b>\".", StatusCode=200)
// @DataContract
class AddIndividualSearch implements IReturn<AddIndividualSearchResponse>, IBaseRequest, IConvertible, IPost
{
    // @DataMember
    Authentication? Authentication;

    // @DataMember
    SearchIndividualRequest? Request;

    AddIndividualSearch({this.Authentication,this.Request});
    AddIndividualSearch.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Authentication = JsonConverters.fromJson(json['Authentication'],'Authentication',context!);
        Request = JsonConverters.fromJson(json['Request'],'SearchIndividualRequest',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Authentication': JsonConverters.toJson(Authentication,'Authentication',context!),
        'Request': JsonConverters.toJson(Request,'SearchIndividualRequest',context!)
    };

    createResponse() => AddIndividualSearchResponse();
    getResponseTypeName() => "AddIndividualSearchResponse";
    getTypeName() => "AddIndividualSearch";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: <String, TypeInfo> {
    'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()),
    'IBaseRequest': TypeInfo(TypeOf.Interface),
    'ArrayOfSanctionsLists': TypeInfo(TypeOf.Class, create:() => ArrayOfSanctionsLists()),
    'SearchIndividualRequest': TypeInfo(TypeOf.Class, create:() => SearchIndividualRequest()),
    'SearchCriteria': TypeInfo(TypeOf.Class, create:() => SearchCriteria()),
    'SearchResultHmTreasury': TypeInfo(TypeOf.Class, create:() => SearchResultHmTreasury()),
    'SearchResultOfacAddress': TypeInfo(TypeOf.Class, create:() => SearchResultOfacAddress()),
    'SearchResultOfacAka': TypeInfo(TypeOf.Class, create:() => SearchResultOfacAka()),
    'SearchResultOfacDateOfBirth': TypeInfo(TypeOf.Class, create:() => SearchResultOfacDateOfBirth()),
    'SearchResultOfacNationality': TypeInfo(TypeOf.Class, create:() => SearchResultOfacNationality()),
    'SearchResultOfacPlaceOfBirth': TypeInfo(TypeOf.Class, create:() => SearchResultOfacPlaceOfBirth()),
    'SearchResultOfac': TypeInfo(TypeOf.Class, create:() => SearchResultOfac()),
    'List<SearchResultOfacAddress>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacAddress>[]),
    'List<SearchResultOfacAka>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacAka>[]),
    'List<SearchResultOfacDateOfBirth>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacDateOfBirth>[]),
    'List<SearchResultOfacNationality>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacNationality>[]),
    'List<SearchResultOfacPlaceOfBirth>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacPlaceOfBirth>[]),
    'SearchResults': TypeInfo(TypeOf.Class, create:() => SearchResults()),
    'List<SearchResultHmTreasury>': TypeInfo(TypeOf.Class, create:() => <SearchResultHmTreasury>[]),
    'List<SearchResultOfac>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfac>[]),
    'SearchRecord': TypeInfo(TypeOf.Class, create:() => SearchRecord()),
    'AddIndividualSearchData': TypeInfo(TypeOf.Class, create:() => AddIndividualSearchData()),
    'IAuthentication': TypeInfo(TypeOf.Interface),
    'IBaseDataResponse': TypeInfo(TypeOf.Interface),
    'IHasResponseStatus': TypeInfo(TypeOf.Interface),
    'AddIndividualSearchResponse': TypeInfo(TypeOf.Class, create:() => AddIndividualSearchResponse()),
    'AddIndividualSearch': TypeInfo(TypeOf.Class, create:() => AddIndividualSearch()),
});