/* Options: Date: 2024-11-21 03:52:08 SwiftVersion: 5.0 Version: 6.00 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://resourcelibrary.api.ashcompanies.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: HealthCheckRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/health") public class HealthCheckRequest : IReturn, Codable { public typealias Return = HealthReport required public init(){} } // @DataContract public class HealthReport : Codable { // @DataMember public var entries:IReadOnlyDictionary? // @DataMember public var applicationStatus:HealthStatus? // @DataMember @TimeSpan public var duration:TimeInterval? required public init(){} } // @DataContract public class HealthReportEntry : Codable { // @DataMember public var status:HealthStatus? // @DataMember public var Description:String? // @DataMember @TimeSpan public var duration:TimeInterval? // @DataMember public var exception:Exception? // @DataMember public var data:IReadOnlyDictionary? required public init(){} } // @Flags() // @DataContract public enum HealthStatus : Int, Codable { case Healthy = 0 case Degraded = 4 case Unhealthy = 8 }