toOperatingSystem method

OperatingSystem toOperatingSystem()

Implementation

OperatingSystem toOperatingSystem() {
  switch (this) {
    case 'WINDOWS':
      return OperatingSystem.windows;
    case 'AMAZON_LINUX':
      return OperatingSystem.amazonLinux;
    case 'AMAZON_LINUX_2':
      return OperatingSystem.amazonLinux_2;
    case 'UBUNTU':
      return OperatingSystem.ubuntu;
    case 'REDHAT_ENTERPRISE_LINUX':
      return OperatingSystem.redhatEnterpriseLinux;
    case 'SUSE':
      return OperatingSystem.suse;
    case 'CENTOS':
      return OperatingSystem.centos;
    case 'ORACLE_LINUX':
      return OperatingSystem.oracleLinux;
    case 'DEBIAN':
      return OperatingSystem.debian;
    case 'MACOS':
      return OperatingSystem.macos;
  }
  throw Exception('$this is not known in enum OperatingSystem');
}