/* Options: Date: 2026-06-20 22:16:01 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.simplified.id/v2 //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetPepSearch.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/peps/get", "POST") // @DataContract public class GetPepSearch : BaseRequest, IReturn { public typealias Return = GetPepSearchResponse // @DataMember public var request:GetPepSearchRequest? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case request } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) request = try container.decodeIfPresent(GetPepSearchRequest.self, forKey: .request) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if request != nil { try container.encode(request, forKey: .request) } } } // @DataContract public class GetPepSearchResponse : Codable { // @DataMember public var data:GetPepSearchData? required public init(){} } // @DataContract public class Authentication : Codable { /** * The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User) */ // @DataMember // @ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body") public var apiUserId:String? /** * The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key) */ // @DataMember // @ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body") public var apiUserKey:String? /** * The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id). */ // @DataMember // @ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body") public var userId:String? required public init(){} } // @DataContract public class BaseRequest : IBaseRequest, Codable { /** * The authentication credentials */ // @DataMember // @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body") public var authentication:Authentication? required public init(){} } public protocol IBaseRequest { var authentication:Authentication? { get set } } public class GetPepSearchRequest : Codable { /** * If the search was created against a single Sub User account, specify their username here */ // @ApiMember(Description="If the search was created against a single Sub User account, specify their username here") public var subUserName:String? /** * If set to true, the response will exclude resolved search results, it will only include unresolved results */ // @ApiMember(Description="If set to true, the response will exclude resolved search results, it will only include unresolved results") public var onlyShowUnresolvedResults:Bool? public var id:Int? required public init(){} } public class GetPepSearchData : BaseResponse, IBaseSearchResponse { public var linkedTo:ArrayOfLinkedTo? public var searchRecord:PepSearchRecord? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case linkedTo case searchRecord } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) linkedTo = try container.decodeIfPresent(ArrayOfLinkedTo.self, forKey: .linkedTo) searchRecord = try container.decodeIfPresent(PepSearchRecord.self, forKey: .searchRecord) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if linkedTo != nil { try container.encode(linkedTo, forKey: .linkedTo) } if searchRecord != nil { try container.encode(searchRecord, forKey: .searchRecord) } } } public class ArrayOfLinkedTo : List { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class BaseResponse : IBaseDataResponse, IHasResponseStatus, Codable { /** * The status of the response */ // @ApiMember(Description="The status of the response") public var responseStatus:ResponseStatus? required public init(){} } public protocol IBaseDataResponse { var responseStatus:ResponseStatus? { get set } } public protocol IHasResponseStatus { var responseStatus:ResponseStatus? { get set } } public protocol IBaseSearchResponse : IBaseDataResponse { var linkedTo:ArrayOfLinkedTo? { get set } } public class PepSearchRecord : Codable { public var id:Int? public var searchType:String? public var dateSearched:Date? public var dateUpdated:Date? public var dateRenewal:Date? public var dateArchived:Date? public var isArchived:Bool? public var numOfResults:Int? public var clientInResults:Bool? public var clientNotInResults:Bool? public var affectedByUpdate:Bool? public var isDayOneSearch:Bool? public var searchCriteria:SearchCriteria? public var searchResults:PepSearchResults? required public init(){} } public class LinkedTo : Codable { public var clientId:Int? public var id:Int? public var type:String? public var subtype:String? public var status:String? public var Description:String? public var isArchived:Bool? public var name:String? public var date:Date? required public init(){} } public class ArrayOfResponseError : List { required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class SearchCriteria : Codable { public var name:String? public var address:String? public var country:String? public var dateOfBirth:String? public var nationality:String? public var reference:String? required public init(){} } public class PepSearchResults : Codable { public var results:[PepSearchResult]? required public init(){} } public class PepSearchResult : Codable { public var resultSimilarity:Double? public var resultResolved:Bool? public var dateLastUpdated:Date? public var resultIsClient:Bool? public var id:Int? public var type:String? public var title:String? public var forename:String? public var middlename:String? public var surname:String? public var softDelete:Bool? public var dateOfSoftDelete:Date? public var dateOfCapture:Date? public var dateOfBirth:Date? public var dateOfDeath:Date? public var yearOfBirth:Int? public var yearOfDeath:Int? public var gender:String? public var homeTelephone:String? public var businessTelephone:String? public var mobileTelephone:String? public var fax:String? public var email:String? public var nationality:String? public var source:String? public var category:String? public var picture:String? public var alternateTitle:String? public var businessName:String? public var Description:String? public var telephone:String? public var website:String? public var pepTier:Int? public var faceIsMatch:Bool? public var faceIsMatchConfidence:Double? public var addresses:[PepSearchResultAddress]? public var aliases:[PepSearchResultAlias]? public var articles:[PepSearchResultArticle]? public var associations:[PepSearchResultIndividualAssociation]? public var businessAssociations:[PepSearchResultBusinessAssociation]? public var notes:[PepSearchResultNote]? public var politicalPositions:[PepSearchResultPoliticalPosition]? required public init(){} } public class PepSearchResultAddress : Codable { public var addressLine1:String? public var addressLine2:String? public var addressLine3:String? public var addressLine4:String? public var town:String? public var county:String? public var postCode:String? public var country:String? public var isoCountry:String? public var softDelete:Bool? public var dateLastUpdated:Date? required public init(){} } public class PepSearchResultAlias : Codable { public var forename:String? public var middleName:String? public var surname:String? public var softDelete:Bool? public var dateOfSoftDelete:Date? public var dateLastUpdated:Date? public var title:String? public var alternateTitle:String? public var businessName:String? required public init(){} } public class PepSearchResultArticle : Codable { public var url:String? public var originalUrl:String? public var source:String? public var dateOfCapture:Date? public var dateLastUpdated:Date? public var snippets:[PepSearchResultArticleSnippet]? required public init(){} } public class PepSearchResultIndividualAssociation : Codable { public var linkDescription:String? public var softDelete:Bool? public var dateLastUpdated:Date? public var fullName:String? required public init(){} } public class PepSearchResultBusinessAssociation : Codable { public var linkDescription:String? public var softDelete:Bool? public var dateLastUpdated:Date? public var businessName:String? required public init(){} } public class PepSearchResultNote : Codable { public var source:String? public var notes:String? public var softDelete:Bool? public var dateLastUpdated:Date? required public init(){} } public class PepSearchResultPoliticalPosition : Codable { public var Description:String? public var from:String? public var to:String? public var country:String? public var softDelete:Bool? public var dateLastUpdated:Date? required public init(){} } public class PepSearchResultArticleSnippet : Codable { public var title:String? public var text:String? public var adverseTerms:String? required public init(){} }