/* Options: Date: 2026-09-09 11:05:21 SwiftVersion: 6.0 Version: 10.08 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://services.acct.2service.nl //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetSearchParts.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/dealers/parts/search", "GET") public class GetSearchParts : AuthenticatedRequest, IReturn { public typealias Return = OperationResult_1 /** * Keyword(s) */ // @ApiMember(Description="Keyword(s)", IsRequired=true) public var searchText:String? /** * Article type (1=part, 2=accessory, 3=tool, 4=device) */ // @ApiMember(Description="Article type (1=part, 2=accessory, 3=tool, 4=device)", IsRequired=true) public var articleType:Int? /** * Number of parts to return (max 100). */ // @ApiMember(Description="Number of parts to return (max 100).", IsRequired=true) public var pageSize:Int? /** * Page number. */ // @ApiMember(Description="Page number.", IsRequired=true) public var page:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case searchText case articleType case pageSize case page } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) searchText = try container.decodeIfPresent(String.self, forKey: .searchText) articleType = try container.decodeIfPresent(Int.self, forKey: .articleType) pageSize = try container.decodeIfPresent(Int.self, forKey: .pageSize) page = try container.decodeIfPresent(Int.self, forKey: .page) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if searchText != nil { try container.encode(searchText, forKey: .searchText) } if articleType != nil { try container.encode(articleType, forKey: .articleType) } if pageSize != nil { try container.encode(pageSize, forKey: .pageSize) } if page != nil { try container.encode(page, forKey: .page) } } } public class OperationResult_1 : OperationResult { /** * Result value */ // @ApiMember(Description="Result value", ParameterType="model") public var result:PartResults? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case result } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) result = try container.decodeIfPresent(PartResults.self, forKey: .result) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if result != nil { try container.encode(result, forKey: .result) } } } public class AuthenticatedRequest : Codable { /** * Session token received from successful authentication. */ // @ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query") public var sessionToken:String? required public init(){} } public class OperationResult : Codable { /** * Specifies if the operation was successful. */ // @ApiMember(Description="Specifies if the operation was successful.", ParameterType="model") public var isSuccessful:Bool? /** * States error message in case of unsuccessful operation. */ // @ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model") public var errorMessage:String? required public init(){} }