/* Options: Date: 2026-04-05 19:51:20 SwiftVersion: 6.0 Version: 8.52 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://monitoring.ox2.com/BazeField.Services/api //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetAllocation.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/allocations/{Id}", "GET") public class GetAllocation : IReturn, Codable { public typealias Return = Allocation public var id:Int? required public init(){} } public class Allocation : Codable { public var id:Int? public var turbineId:Int? public var objectId:String? public var turbineName:String? public var turbineTitle:String? public var sourceId:Int? public var sourceName:String? public var rootCause:String? public var triggeredByAlarm:TriggerAlarm? public var category:AllocationCategoryWithType? public var categories:[AllocationCategoryWithType]? public var start:Date? public var end:Date? public var start_Local:Date? public var end_Local:Date? @TimeSpan public var duration:TimeInterval? public var lastModified:Date? public var isUnclassified:Bool? public var manualOverrideLoss:Bool? public var responseTime:Date? public var lostProduction:Double? public var lostProdutionFiltered:Double? public var lostMoney:Double? public var lostMoneyFiltered:Double? public var properties:[AllocationPropertyValue]? public var finished:Bool? public var manual:Bool? public var overridden:Bool? public var reallocated:Bool? public var pending:Bool? public var changeLog:String? public var lastComment:Comment? public var exported:String? public var labels:[Label]? public var suspect:Bool? public var uncertain:Bool? public var eventId:Int? public var hasEvent:Bool? public var holdCategory:Bool? public var approved:Bool? public var sfId:String? public var firstAlarmSfId:String? public var rootCauseAlarmId:Int? required public init(){} } public class Alarm : Codable { public var id:Int? public var code:Int? public var alarmCode:AlarmCode? public var name:String? public var brakePrg:Int? public var canTriggerAllocation:Bool? public var Description:String? public var remarks:String? public var resetPrg:String? public var isOkAlarm:Bool? public var meta:[String:String]? public var alarmType:UInt8? public var type:String? required public init(){} } public class Comment : Codable { public var id:Int? public var turbineId:Int? public var turbineName:String? public var timeStamp:Date? public var text:String? public var createdBy:String? public var createdById:Double? public var lastModified:Date? public var type:CommentType? public var external:Bool? public var sticky:Bool? public var allocationId:Int? public var alarmLogId:Int? public var alarmId:Int? public var commandId:Int? public var relatedInfo:String? public var cleared:Bool? public var labels:[Label]? public var objectId:String? public var relatedStart:Date? public var relatedEnd:Date? required public init(){} } public class TriggerAlarm : Codable { public var alarm:Alarm? public var start:Date? public var end:Date? public var logId:Int? public var sfId:String? required public init(){} } public class AllocationCategoryWithType : AllocationCategory { public var allocationType:AllocationType? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case allocationType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) allocationType = try container.decodeIfPresent(AllocationType.self, forKey: .allocationType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if allocationType != nil { try container.encode(allocationType, forKey: .allocationType) } } } public class AllocationPropertyValue : Codable { public var name:String? public var displayName:String? public var value:Double? public var limitedValue:Double? public var unit:String? public var isOverride:Bool? public var Description:String? required public init(){} } public class Label : Codable { public var id:Int? public var name:String? public var color:String? public var type:LabelType? required public init(){} } public class AllocationType : Codable { public var id:Int? public var name:String? public var acronym:String? public var version:String? public var Description:String? public var sortOrder:Int? public var linkedTypeId:Int? public var subType:Bool? public var groupName:String? public var defaultVisible:Bool? public var domainId:Int? public var disabled:Bool? public var matrix:String? public var certified:Bool? public var allocationTypeClassId:Int? public var variantOfAbstractTypeId:Int? required public init(){} } public class AlarmCode : Codable { public var eventNumber:Int? public var parameter1:Int? public var vendorEventType:String? required public init(){} } public enum CommentType : String, Codable { case Turbine case Allocation case Alarm } public class AllocationCategory : Codable { public var id:Int? public var name:String? public var acronym:String? public var color:String? public var uncategorized:Bool? public var available:Bool? public var typeId:Int? public var group:String? public var sortIndex:UInt8? public var priority:Int? public var enabled:Bool? public var performance:UInt8? public var excluded:Int? public var parentCategoryId:Int? public var parentCategoryName:String? public var code:String? public var variantAlias:String? public var attributes:[String:String]? required public init(){} } public enum LabelType : Int, Codable { case Allocation = 1 case Other = 2 case Alarm = 3 case Case = 4 } public class AllocationCategory : Codable { public var id:Int? public var name:String? public var color:String? public var uncategorized:Bool? public var available:Bool? public var priority:Int? public var performance:UInt8? public var excluded:Int? public var parentCategoryId:Int? public var typeId:Int? public var typeName:String? public var code:String? required public init(){} }