/* Options: Date: 2024-11-21 03:19:37 Version: 6.00 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://resourcelibrary.api.ashcompanies.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: HealthCheckRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; // @flags() // @DataContract class HealthStatus { static const HealthStatus Healthy = const HealthStatus._(0); static const HealthStatus Degraded = const HealthStatus._(4); static const HealthStatus Unhealthy = const HealthStatus._(8); final int _value; const HealthStatus._(this._value); int get value => _value; static List get values => const [Healthy,Degraded,Unhealthy]; } // @DataContract class HealthReportEntry implements IConvertible { // @DataMember HealthStatus? status; // @DataMember String? description; // @DataMember Duration? duration; // @DataMember Exception? exception; // @DataMember IReadOnlyDictionary? data; HealthReportEntry({this.status,this.description,this.duration,this.exception,this.data}); HealthReportEntry.fromJson(Map json) { fromMap(json); } fromMap(Map json) { status = JsonConverters.fromJson(json['status'],'HealthStatus',context!); description = json['description']; duration = JsonConverters.fromJson(json['duration'],'Duration',context!); exception = JsonConverters.fromJson(json['exception'],'Exception',context!); data = JsonConverters.fromJson(json['data'],'IReadOnlyDictionary',context!); return this; } Map toJson() => { 'status': JsonConverters.toJson(status,'HealthStatus',context!), 'description': description, 'duration': JsonConverters.toJson(duration,'Duration',context!), 'exception': JsonConverters.toJson(exception,'Exception',context!), 'data': JsonConverters.toJson(data,'IReadOnlyDictionary',context!) }; getTypeName() => "HealthReportEntry"; TypeContext? context = _ctx; } // @DataContract class HealthReport implements IConvertible { // @DataMember IReadOnlyDictionary? entries; // @DataMember HealthStatus? applicationStatus; // @DataMember Duration? duration; HealthReport({this.entries,this.applicationStatus,this.duration}); HealthReport.fromJson(Map json) { fromMap(json); } fromMap(Map json) { entries = JsonConverters.fromJson(json['entries'],'IReadOnlyDictionary',context!); applicationStatus = JsonConverters.fromJson(json['applicationStatus'],'HealthStatus',context!); duration = JsonConverters.fromJson(json['duration'],'Duration',context!); return this; } Map toJson() => { 'entries': JsonConverters.toJson(entries,'IReadOnlyDictionary',context!), 'applicationStatus': JsonConverters.toJson(applicationStatus,'HealthStatus',context!), 'duration': JsonConverters.toJson(duration,'Duration',context!) }; getTypeName() => "HealthReport"; TypeContext? context = _ctx; } // @Route("/health") class HealthCheckRequest implements IReturn, IConvertible { HealthCheckRequest(); HealthCheckRequest.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => HealthReport(); getResponseTypeName() => "HealthReport"; getTypeName() => "HealthCheckRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'resourcelibrary.api.ashcompanies.com', types: { 'HealthStatus': TypeInfo(TypeOf.Enum, enumValues:HealthStatus.values), 'HealthReportEntry': TypeInfo(TypeOf.Class, create:() => HealthReportEntry()), 'Exception': TypeInfo(TypeOf.Class, create:() => Exception()), 'IReadOnlyDictionary': TypeInfo(TypeOf.Class, create:() => IReadOnlyDictionary()), 'HealthReport': TypeInfo(TypeOf.Class, create:() => HealthReport()), 'IReadOnlyDictionary': TypeInfo(TypeOf.Class, create:() => IReadOnlyDictionary()), 'HealthCheckRequest': TypeInfo(TypeOf.Class, create:() => HealthCheckRequest()), });