toMetricName method
Implementation
MetricName toMetricName() {
switch (this) {
case 'Cpu':
return MetricName.cpu;
case 'Memory':
return MetricName.memory;
case 'EBS_READ_OPS_PER_SECOND':
return MetricName.ebsReadOpsPerSecond;
case 'EBS_WRITE_OPS_PER_SECOND':
return MetricName.ebsWriteOpsPerSecond;
case 'EBS_READ_BYTES_PER_SECOND':
return MetricName.ebsReadBytesPerSecond;
case 'EBS_WRITE_BYTES_PER_SECOND':
return MetricName.ebsWriteBytesPerSecond;
}
throw Exception('$this is not known in enum MetricName');
}