/* Options: Date: 2026-06-20 21:19:33 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: AddSearchNote.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/sanctions/notes/add", "POST") // @DataContract public class AddSearchNote : BaseRequest, IReturn { public typealias Return = AddSearchNoteResponse // @DataMember public var request:AddSearchNoteRequest? 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(AddSearchNoteRequest.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 AddSearchNoteResponse : Codable { // @DataMember public var data:AddSearchNoteData? 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 AddSearchNoteRequest : ISearchNoteRequest, Codable { public var id:Int? public var note:String? public var subUserName:String? required public init(){} } public class AddSearchNoteData : BaseResponse { public var success:Bool? public var notes:ArrayOfSearchNote? public var id:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case success case notes case id } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) success = try container.decodeIfPresent(Bool.self, forKey: .success) notes = try container.decodeIfPresent(ArrayOfSearchNote.self, forKey: .notes) id = try container.decodeIfPresent(Int.self, forKey: .id) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if success != nil { try container.encode(success, forKey: .success) } if notes != nil { try container.encode(notes, forKey: .notes) } if id != nil { try container.encode(id, forKey: .id) } } } public protocol ISearchNoteRequest { var id:Int? { get set } var subUserName:String? { get set } } 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 class ArrayOfSearchNote : 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 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 SearchNote : Codable { public var name:String? public var date:Date? public var content:String? required public init(){} }