toDeviceStatusDetailCode method

DeviceStatusDetailCode toDeviceStatusDetailCode()

Implementation

DeviceStatusDetailCode toDeviceStatusDetailCode() {
  switch (this) {
    case 'DEVICE_SOFTWARE_UPDATE_NEEDED':
      return DeviceStatusDetailCode.deviceSoftwareUpdateNeeded;
    case 'DEVICE_WAS_OFFLINE':
      return DeviceStatusDetailCode.deviceWasOffline;
    case 'CREDENTIALS_ACCESS_FAILURE':
      return DeviceStatusDetailCode.credentialsAccessFailure;
    case 'TLS_VERSION_MISMATCH':
      return DeviceStatusDetailCode.tlsVersionMismatch;
    case 'ASSOCIATION_REJECTION':
      return DeviceStatusDetailCode.associationRejection;
    case 'AUTHENTICATION_FAILURE':
      return DeviceStatusDetailCode.authenticationFailure;
    case 'DHCP_FAILURE':
      return DeviceStatusDetailCode.dhcpFailure;
    case 'INTERNET_UNAVAILABLE':
      return DeviceStatusDetailCode.internetUnavailable;
    case 'DNS_FAILURE':
      return DeviceStatusDetailCode.dnsFailure;
    case 'UNKNOWN_FAILURE':
      return DeviceStatusDetailCode.unknownFailure;
    case 'CERTIFICATE_ISSUING_LIMIT_EXCEEDED':
      return DeviceStatusDetailCode.certificateIssuingLimitExceeded;
    case 'INVALID_CERTIFICATE_AUTHORITY':
      return DeviceStatusDetailCode.invalidCertificateAuthority;
    case 'NETWORK_PROFILE_NOT_FOUND':
      return DeviceStatusDetailCode.networkProfileNotFound;
    case 'INVALID_PASSWORD_STATE':
      return DeviceStatusDetailCode.invalidPasswordState;
    case 'PASSWORD_NOT_FOUND':
      return DeviceStatusDetailCode.passwordNotFound;
    case 'PASSWORD_MANAGER_ACCESS_DENIED':
      return DeviceStatusDetailCode.passwordManagerAccessDenied;
    case 'CERTIFICATE_AUTHORITY_ACCESS_DENIED':
      return DeviceStatusDetailCode.certificateAuthorityAccessDenied;
  }
  throw Exception('$this is not known in enum DeviceStatusDetailCode');
}