/* Options: Date: 2024-11-16 18:30:33 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: http://54.235.149.200 //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: HealthCheckRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum ExecutionMode { Basic, Standard, Advanced, } enum ServerType { App, Sql, FtpApi, Ftp, Batch, Identity, Qc, XcodeV, XcodeC, MsgVast, AsgVast, Mongo, Agents, } class ServerState implements IConvertible { String? ServerName; double? TotalRamInMb; double? AvailableRamInMb; double? UsedCpuPercent; ServerState({this.ServerName,this.TotalRamInMb,this.AvailableRamInMb,this.UsedCpuPercent}); ServerState.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ServerName = json['ServerName']; TotalRamInMb = JsonConverters.toDouble(json['TotalRamInMb']); AvailableRamInMb = JsonConverters.toDouble(json['AvailableRamInMb']); UsedCpuPercent = JsonConverters.toDouble(json['UsedCpuPercent']); return this; } Map toJson() => { 'ServerName': ServerName, 'TotalRamInMb': TotalRamInMb, 'AvailableRamInMb': AvailableRamInMb, 'UsedCpuPercent': UsedCpuPercent }; getTypeName() => "ServerState"; TypeContext? context = _ctx; } enum MonitoringStatus { Success, Failure, } class MonitoringResult implements IConvertible { String? MonitoringName; MonitoringStatus? Status; String? StatusMessage; List? ErrorMessages; MonitoringResult({this.MonitoringName,this.Status,this.StatusMessage,this.ErrorMessages}); MonitoringResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { MonitoringName = json['MonitoringName']; Status = JsonConverters.fromJson(json['Status'],'MonitoringStatus',context!); StatusMessage = json['StatusMessage']; ErrorMessages = JsonConverters.fromJson(json['ErrorMessages'],'List',context!); return this; } Map toJson() => { 'MonitoringName': MonitoringName, 'Status': JsonConverters.toJson(Status,'MonitoringStatus',context!), 'StatusMessage': StatusMessage, 'ErrorMessages': JsonConverters.toJson(ErrorMessages,'List',context!) }; getTypeName() => "MonitoringResult"; TypeContext? context = _ctx; } class MonitorSummary implements IConvertible { String? MonitorName; MonitoringStatus? Status; List? Results; List? ErrorMessages; MonitorSummary({this.MonitorName,this.Status,this.Results,this.ErrorMessages}); MonitorSummary.fromJson(Map json) { fromMap(json); } fromMap(Map json) { MonitorName = json['MonitorName']; Status = JsonConverters.fromJson(json['Status'],'MonitoringStatus',context!); Results = JsonConverters.fromJson(json['Results'],'List',context!); ErrorMessages = JsonConverters.fromJson(json['ErrorMessages'],'List',context!); return this; } Map toJson() => { 'MonitorName': MonitorName, 'Status': JsonConverters.toJson(Status,'MonitoringStatus',context!), 'Results': JsonConverters.toJson(Results,'List',context!), 'ErrorMessages': JsonConverters.toJson(ErrorMessages,'List',context!) }; getTypeName() => "MonitorSummary"; TypeContext? context = _ctx; } class MonitorExecutionMetrics implements IConvertible { DateTime? StartDateTime; DateTime? EndDateTime; Duration? Duration; MonitorExecutionMetrics({this.StartDateTime,this.EndDateTime,this.Duration}); MonitorExecutionMetrics.fromJson(Map json) { fromMap(json); } fromMap(Map json) { StartDateTime = JsonConverters.fromJson(json['StartDateTime'],'DateTime',context!); EndDateTime = JsonConverters.fromJson(json['EndDateTime'],'DateTime',context!); Duration = JsonConverters.fromJson(json['Duration'],'Duration',context!); return this; } Map toJson() => { 'StartDateTime': JsonConverters.toJson(StartDateTime,'DateTime',context!), 'EndDateTime': JsonConverters.toJson(EndDateTime,'DateTime',context!), 'Duration': JsonConverters.toJson(Duration,'Duration',context!) }; getTypeName() => "MonitorExecutionMetrics"; TypeContext? context = _ctx; } class HealthCheckResponse implements IConvertible { ServerState? ServerState; MonitoringStatus? Status; String? StatusMessage; String? CorrelationId; int? FailedMonitorCount; List? MonitorSummaries; MonitorExecutionMetrics? ExecutionMetrics; HealthCheckResponse({this.ServerState,this.Status,this.StatusMessage,this.CorrelationId,this.FailedMonitorCount,this.MonitorSummaries,this.ExecutionMetrics}); HealthCheckResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ServerState = JsonConverters.fromJson(json['ServerState'],'ServerState',context!); Status = JsonConverters.fromJson(json['Status'],'MonitoringStatus',context!); StatusMessage = json['StatusMessage']; CorrelationId = json['CorrelationId']; FailedMonitorCount = json['FailedMonitorCount']; MonitorSummaries = JsonConverters.fromJson(json['MonitorSummaries'],'List',context!); ExecutionMetrics = JsonConverters.fromJson(json['ExecutionMetrics'],'MonitorExecutionMetrics',context!); return this; } Map toJson() => { 'ServerState': JsonConverters.toJson(ServerState,'ServerState',context!), 'Status': JsonConverters.toJson(Status,'MonitoringStatus',context!), 'StatusMessage': StatusMessage, 'CorrelationId': CorrelationId, 'FailedMonitorCount': FailedMonitorCount, 'MonitorSummaries': JsonConverters.toJson(MonitorSummaries,'List',context!), 'ExecutionMetrics': JsonConverters.toJson(ExecutionMetrics,'MonitorExecutionMetrics',context!) }; getTypeName() => "HealthCheckResponse"; TypeContext? context = _ctx; } // @Route("/healthcheck", "GET") class HealthCheckRequest implements IReturn, IConvertible { /** * The mode used to determine what level of health check to perform. */ // @ApiMember(DataType="ExecutionMode", Description="The mode used to determine what level of health check to perform.", IsRequired=true, ParameterType="query") ExecutionMode? ExecutionMode; /** * The type of server that will be used to determine which monitors will be run. */ // @ApiMember(DataType="ServerType", Description="The type of server that will be used to determine which monitors will be run.", IsRequired=true, ParameterType="query") ServerType? ServerType; /** * Indicates whether or not to include server state information in the response. */ // @ApiMember(DataType="boolean", Description="Indicates whether or not to include server state information in the response.", ParameterType="query") bool? IncludeServerStateInformation; /** * Indicates whether or not to suppress returning error codes. This will always return a 200 code to the caller, which is required for PRTG to process the JSON response properly. */ // @ApiMember(DataType="boolean", Description="Indicates whether or not to suppress returning error codes. This will always return a 200 code to the caller, which is required for PRTG to process the JSON response properly.", ParameterType="query") bool? SuppressErrorCodes; /** * Indicates whether or not to suppress deployment-related errors. */ // @ApiMember(DataType="boolean", Description="Indicates whether or not to suppress deployment-related errors.", ParameterType="query") bool? SuppressDeploymentErrors; HealthCheckRequest({this.ExecutionMode,this.ServerType,this.IncludeServerStateInformation,this.SuppressErrorCodes,this.SuppressDeploymentErrors}); HealthCheckRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ExecutionMode = JsonConverters.fromJson(json['ExecutionMode'],'ExecutionMode',context!); ServerType = JsonConverters.fromJson(json['ServerType'],'ServerType',context!); IncludeServerStateInformation = json['IncludeServerStateInformation']; SuppressErrorCodes = json['SuppressErrorCodes']; SuppressDeploymentErrors = json['SuppressDeploymentErrors']; return this; } Map toJson() => { 'ExecutionMode': JsonConverters.toJson(ExecutionMode,'ExecutionMode',context!), 'ServerType': JsonConverters.toJson(ServerType,'ServerType',context!), 'IncludeServerStateInformation': IncludeServerStateInformation, 'SuppressErrorCodes': SuppressErrorCodes, 'SuppressDeploymentErrors': SuppressDeploymentErrors }; createResponse() => HealthCheckResponse(); getResponseTypeName() => "HealthCheckResponse"; getTypeName() => "HealthCheckRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: '54.235.149.200', types: { 'ExecutionMode': TypeInfo(TypeOf.Enum, enumValues:ExecutionMode.values), 'ServerType': TypeInfo(TypeOf.Enum, enumValues:ServerType.values), 'ServerState': TypeInfo(TypeOf.Class, create:() => ServerState()), 'MonitoringStatus': TypeInfo(TypeOf.Enum, enumValues:MonitoringStatus.values), 'MonitoringResult': TypeInfo(TypeOf.Class, create:() => MonitoringResult()), 'MonitorSummary': TypeInfo(TypeOf.Class, create:() => MonitorSummary()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'MonitorExecutionMetrics': TypeInfo(TypeOf.Class, create:() => MonitorExecutionMetrics()), 'HealthCheckResponse': TypeInfo(TypeOf.Class, create:() => HealthCheckResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'HealthCheckRequest': TypeInfo(TypeOf.Class, create:() => HealthCheckRequest()), });