/* Options: Date: 2024-12-22 10:57:51 SwiftVersion: 6.0 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://techstacks.io //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: FindTechnologies.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/technology/search") // @AutoQueryViewer(DefaultSearchField="Tier", DefaultSearchText="Data", DefaultSearchType="=", Description="Explore different Technologies", IconUrl="octicon:database", Title="Find Technologies") public class FindTechnologies : QueryDb2, IReturn { public typealias Return = QueryResponse public var ids:[Int]? public var name:String? public var vendorName:String? public var nameContains:String? public var vendorNameContains:String? public var descriptionContains:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case ids case name case vendorName case nameContains case vendorNameContains case descriptionContains } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) ids = try container.decodeIfPresent([Int].self, forKey: .ids) ?? [] name = try container.decodeIfPresent(String.self, forKey: .name) vendorName = try container.decodeIfPresent(String.self, forKey: .vendorName) nameContains = try container.decodeIfPresent(String.self, forKey: .nameContains) vendorNameContains = try container.decodeIfPresent(String.self, forKey: .vendorNameContains) descriptionContains = try container.decodeIfPresent(String.self, forKey: .descriptionContains) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if ids != nil { try container.encode(ids, forKey: .ids) } if name != nil { try container.encode(name, forKey: .name) } if vendorName != nil { try container.encode(vendorName, forKey: .vendorName) } if nameContains != nil { try container.encode(nameContains, forKey: .nameContains) } if vendorNameContains != nil { try container.encode(vendorNameContains, forKey: .vendorNameContains) } if descriptionContains != nil { try container.encode(descriptionContains, forKey: .descriptionContains) } } } public class Technology : TechnologyBase { 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 TechnologyView : Codable { public var id:Int? public var name:String? public var vendorName:String? public var vendorUrl:String? public var productUrl:String? public var logoUrl:String? public var Description:String? public var created:Date? public var createdBy:String? public var lastModified:Date? public var lastModifiedBy:String? public var ownerId:String? public var slug:String? public var logoApproved:Bool? public var isLocked:Bool? public var tier:TechnologyTier? public var lastStatusUpdate:Date? public var organizationId:Int? public var commentsPostId:Int? public var viewCount:Int? public var favCount:Int? required public init(){} } public enum TechnologyTier : String, Codable { case ProgrammingLanguage case Client case Http case Server case Data case SoftwareInfrastructure case OperatingSystem case HardwareInfrastructure case ThirdPartyServices } public class TechnologyBase : Codable { public var id:Int? public var name:String? public var vendorName:String? public var vendorUrl:String? public var productUrl:String? public var logoUrl:String? public var Description:String? public var created:Date? public var createdBy:String? public var lastModified:Date? public var lastModifiedBy:String? public var ownerId:String? public var slug:String? public var logoApproved:Bool? public var isLocked:Bool? public var tier:TechnologyTier? public var lastStatusUpdate:Date? public var organizationId:Int? public var commentsPostId:Int? public var viewCount:Int? public var favCount:Int? required public init(){} }