decode method

  1. @override
Status decode(
  1. dynamic value
)

Implementation

@override
Status decode(dynamic value) {
  switch (value) {
    case "DELIVERED":
      return Status.delivered;
    case "NOT_ADMINISTERED":
      return Status.notAdministered;
    case "VISITED":
      return Status.visited;
    case "NOT_VISITED":
      return Status.notVisited;
    case "BENEFICIARY_REFUSED":
      return Status.beneficiaryRefused;
    case "BENEFICIARY_INELIGIBLE":
      return Status.beneficiaryInEligible;
    case "BENEFICIARY_REFERRED":
      return Status.beneficiaryReferred;
    case "ADMINISTRATION_SUCCESS":
      return Status.administeredSuccess;
    case "ADMINISTRATION_FAILED":
      return Status.administeredFailed;
    case "IN_COMPLETE":
      return Status.inComplete;
    case "TO_ADMINISTER":
      return Status.toAdminister;
    case "REGISTERED":
      return Status.registered;
    case "NOT_REGISTERED":
      return Status.notRegistered;
    case "CLOSED_HOUSEHOLD":
      return Status.closeHousehold;
    default:
      throw MapperException.unknownEnumValue(value);
  }
}