/* Options: Date: 2025-12-06 07:09:41 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.dev.dynamics.trendsic.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: AllAgentTaskRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/v1/AllAgentTask", "GET,POST,PUT,OPTIONS") public class AllAgentTaskRequest : IReturn, Codable { public typealias Return = AllAgentTaskResponse required public init(){} } public class AllAgentTaskResponse : Codable { public var responseStatus:ResponseStatus? public var task:[AgentTaskExtended] = [] required public init(){} } public class AgentTaskExtended : AgentTask { public var assignedToName:String? public var relatedToName:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case assignedToName case relatedToName } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) assignedToName = try container.decodeIfPresent(String.self, forKey: .assignedToName) relatedToName = try container.decodeIfPresent(String.self, forKey: .relatedToName) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if assignedToName != nil { try container.encode(assignedToName, forKey: .assignedToName) } if relatedToName != nil { try container.encode(relatedToName, forKey: .relatedToName) } } } public class AgentTask : Codable { public var taskId:String? public var Description:String? public var dueDate:Date? public var assignedToAgentId:Int? public var relatedToAgentId:Int? public var createdBy:Int? public var dateCreated:Date? public var dateCompleted:Date? public var completedBy:Int? public var dateDeleted:Date? public var deletedBy:Int? required public init(){} }