toMetricName method

MetricName toMetricName()

Implementation

MetricName toMetricName() {
  switch (this) {
    case 'ActivatingGameSessions':
      return MetricName.activatingGameSessions;
    case 'ActiveGameSessions':
      return MetricName.activeGameSessions;
    case 'ActiveInstances':
      return MetricName.activeInstances;
    case 'AvailableGameSessions':
      return MetricName.availableGameSessions;
    case 'AvailablePlayerSessions':
      return MetricName.availablePlayerSessions;
    case 'CurrentPlayerSessions':
      return MetricName.currentPlayerSessions;
    case 'IdleInstances':
      return MetricName.idleInstances;
    case 'PercentAvailableGameSessions':
      return MetricName.percentAvailableGameSessions;
    case 'PercentIdleInstances':
      return MetricName.percentIdleInstances;
    case 'QueueDepth':
      return MetricName.queueDepth;
    case 'WaitTime':
      return MetricName.waitTime;
  }
  throw Exception('$this is not known in enum MetricName');
}