toMetric method

Metric toMetric()

Implementation

Metric toMetric() {
  switch (this) {
    case 'BLENDED_COST':
      return Metric.blendedCost;
    case 'UNBLENDED_COST':
      return Metric.unblendedCost;
    case 'AMORTIZED_COST':
      return Metric.amortizedCost;
    case 'NET_UNBLENDED_COST':
      return Metric.netUnblendedCost;
    case 'NET_AMORTIZED_COST':
      return Metric.netAmortizedCost;
    case 'USAGE_QUANTITY':
      return Metric.usageQuantity;
    case 'NORMALIZED_USAGE_AMOUNT':
      return Metric.normalizedUsageAmount;
  }
  throw Exception('$this is not known in enum Metric');
}