/* This function returns the string of Redfish service version. */
EFI_STATUS RedfishBuildRedpathUseId(IN CHAR8 *ServiceVersionStr, IN CHAR8 *Url, IN CHAR8 *Id, OUT CHAR8 **Redpath)
/* This function returns the string of Redfish service version. */
EFI_STATUS RedfishBuildRedpathUseId(IN CHAR8 *ServiceVersionStr, IN CHAR8 *Url, IN CHAR8 *Id, OUT CHAR8 **Redpath)
{
  UINTN  RedpathSize;
  if ((Redpath == NULL) || (ServiceVersionStr == NULL) || (Url == NULL) || (Id == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  RedpathSize = AsciiStrLen ("/") +
                AsciiStrLen (ServiceVersionStr) +
                AsciiStrLen (Url) +
                AsciiStrLen ("[Id=]") +
                AsciiStrLen (Id) + 1;
  *Redpath = AllocatePool (RedpathSize);
  if (*Redpath == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }
  AsciiSPrint (*Redpath, RedpathSize, "/%a%a[Id=%a]", ServiceVersionStr, Url, Id);
  return EFI_SUCCESS;
}