toFleetErrorCode method

FleetErrorCode toFleetErrorCode()

Implementation

FleetErrorCode toFleetErrorCode() {
  switch (this) {
    case 'IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION':
      return FleetErrorCode.iamServiceRoleMissingEniDescribeAction;
    case 'IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION':
      return FleetErrorCode.iamServiceRoleMissingEniCreateAction;
    case 'IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION':
      return FleetErrorCode.iamServiceRoleMissingEniDeleteAction;
    case 'NETWORK_INTERFACE_LIMIT_EXCEEDED':
      return FleetErrorCode.networkInterfaceLimitExceeded;
    case 'INTERNAL_SERVICE_ERROR':
      return FleetErrorCode.internalServiceError;
    case 'IAM_SERVICE_ROLE_IS_MISSING':
      return FleetErrorCode.iamServiceRoleIsMissing;
    case 'MACHINE_ROLE_IS_MISSING':
      return FleetErrorCode.machineRoleIsMissing;
    case 'STS_DISABLED_IN_REGION':
      return FleetErrorCode.stsDisabledInRegion;
    case 'SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES':
      return FleetErrorCode.subnetHasInsufficientIpAddresses;
    case 'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION':
      return FleetErrorCode.iamServiceRoleMissingDescribeSubnetAction;
    case 'SUBNET_NOT_FOUND':
      return FleetErrorCode.subnetNotFound;
    case 'IMAGE_NOT_FOUND':
      return FleetErrorCode.imageNotFound;
    case 'INVALID_SUBNET_CONFIGURATION':
      return FleetErrorCode.invalidSubnetConfiguration;
    case 'SECURITY_GROUPS_NOT_FOUND':
      return FleetErrorCode.securityGroupsNotFound;
    case 'IGW_NOT_ATTACHED':
      return FleetErrorCode.igwNotAttached;
    case 'IAM_SERVICE_ROLE_MISSING_DESCRIBE_SECURITY_GROUPS_ACTION':
      return FleetErrorCode.iamServiceRoleMissingDescribeSecurityGroupsAction;
    case 'DOMAIN_JOIN_ERROR_FILE_NOT_FOUND':
      return FleetErrorCode.domainJoinErrorFileNotFound;
    case 'DOMAIN_JOIN_ERROR_ACCESS_DENIED':
      return FleetErrorCode.domainJoinErrorAccessDenied;
    case 'DOMAIN_JOIN_ERROR_LOGON_FAILURE':
      return FleetErrorCode.domainJoinErrorLogonFailure;
    case 'DOMAIN_JOIN_ERROR_INVALID_PARAMETER':
      return FleetErrorCode.domainJoinErrorInvalidParameter;
    case 'DOMAIN_JOIN_ERROR_MORE_DATA':
      return FleetErrorCode.domainJoinErrorMoreData;
    case 'DOMAIN_JOIN_ERROR_NO_SUCH_DOMAIN':
      return FleetErrorCode.domainJoinErrorNoSuchDomain;
    case 'DOMAIN_JOIN_ERROR_NOT_SUPPORTED':
      return FleetErrorCode.domainJoinErrorNotSupported;
    case 'DOMAIN_JOIN_NERR_INVALID_WORKGROUP_NAME':
      return FleetErrorCode.domainJoinNerrInvalidWorkgroupName;
    case 'DOMAIN_JOIN_NERR_WORKSTATION_NOT_STARTED':
      return FleetErrorCode.domainJoinNerrWorkstationNotStarted;
    case 'DOMAIN_JOIN_ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED':
      return FleetErrorCode.domainJoinErrorDsMachineAccountQuotaExceeded;
    case 'DOMAIN_JOIN_NERR_PASSWORD_EXPIRED':
      return FleetErrorCode.domainJoinNerrPasswordExpired;
    case 'DOMAIN_JOIN_INTERNAL_SERVICE_ERROR':
      return FleetErrorCode.domainJoinInternalServiceError;
  }
  throw Exception('$this is not known in enum FleetErrorCode');
}