toMetricsName method

MetricsName toMetricsName()

Implementation

MetricsName toMetricsName() {
  switch (this) {
    case 'IncomingBytes':
      return MetricsName.incomingBytes;
    case 'IncomingRecords':
      return MetricsName.incomingRecords;
    case 'OutgoingBytes':
      return MetricsName.outgoingBytes;
    case 'OutgoingRecords':
      return MetricsName.outgoingRecords;
    case 'WriteProvisionedThroughputExceeded':
      return MetricsName.writeProvisionedThroughputExceeded;
    case 'ReadProvisionedThroughputExceeded':
      return MetricsName.readProvisionedThroughputExceeded;
    case 'IteratorAgeMilliseconds':
      return MetricsName.iteratorAgeMilliseconds;
    case 'ALL':
      return MetricsName.all;
  }
  throw Exception('$this is not known in enum MetricsName');
}