/* Convert numeric value in Redfish format to HII value. */
EFI_STATUS RedfishNumericToHiiValue(IN EDKII_REDFISH_VALUE *RedfishValue, OUT HII_STATEMENT_VALUE *Value)
/* Convert numeric value in Redfish format to HII value. */
EFI_STATUS RedfishNumericToHiiValue(IN EDKII_REDFISH_VALUE *RedfishValue, OUT HII_STATEMENT_VALUE *Value)
{
  if ((Value == NULL) || (RedfishValue == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  switch (RedfishValue->Type) {
    case RedfishValueTypeInteger:
      Value->Type      = EFI_IFR_TYPE_NUM_SIZE_64;
      Value->Value.u64 = (UINT64)RedfishValue->Value.Integer;
      break;
    case RedfishValueTypeBoolean:
      Value->Type    = EFI_IFR_TYPE_BOOLEAN;
      Value->Value.b = RedfishValue->Value.Boolean;
      break;
    default:
      Value->Type = EFI_IFR_TYPE_UNDEFINED;
      break;
  }
  return EFI_SUCCESS;
}