toMetricName method

MetricName toMetricName()

Implementation

MetricName toMetricName() {
  switch (this) {
    case 'CPUUtilization':
      return MetricName.cPUUtilization;
    case 'NetworkIn':
      return MetricName.networkIn;
    case 'NetworkOut':
      return MetricName.networkOut;
    case 'StatusCheckFailed':
      return MetricName.statusCheckFailed;
    case 'StatusCheckFailed_Instance':
      return MetricName.statusCheckFailedInstance;
    case 'StatusCheckFailed_System':
      return MetricName.statusCheckFailedSystem;
    case 'ClientTLSNegotiationErrorCount':
      return MetricName.clientTLSNegotiationErrorCount;
    case 'HealthyHostCount':
      return MetricName.healthyHostCount;
    case 'UnhealthyHostCount':
      return MetricName.unhealthyHostCount;
    case 'HTTPCode_LB_4XX_Count':
      return MetricName.hTTPCodeLb_4xxCount;
    case 'HTTPCode_LB_5XX_Count':
      return MetricName.hTTPCodeLb_5xxCount;
    case 'HTTPCode_Instance_2XX_Count':
      return MetricName.hTTPCodeInstance_2xxCount;
    case 'HTTPCode_Instance_3XX_Count':
      return MetricName.hTTPCodeInstance_3xxCount;
    case 'HTTPCode_Instance_4XX_Count':
      return MetricName.hTTPCodeInstance_4xxCount;
    case 'HTTPCode_Instance_5XX_Count':
      return MetricName.hTTPCodeInstance_5xxCount;
    case 'InstanceResponseTime':
      return MetricName.instanceResponseTime;
    case 'RejectedConnectionCount':
      return MetricName.rejectedConnectionCount;
    case 'RequestCount':
      return MetricName.requestCount;
    case 'DatabaseConnections':
      return MetricName.databaseConnections;
    case 'DiskQueueDepth':
      return MetricName.diskQueueDepth;
    case 'FreeStorageSpace':
      return MetricName.freeStorageSpace;
    case 'NetworkReceiveThroughput':
      return MetricName.networkReceiveThroughput;
    case 'NetworkTransmitThroughput':
      return MetricName.networkTransmitThroughput;
    case 'BurstCapacityTime':
      return MetricName.burstCapacityTime;
    case 'BurstCapacityPercentage':
      return MetricName.burstCapacityPercentage;
  }
  throw Exception('$this is not known in enum MetricName');
}