code: public static DownloadBean unmarshallDownload(Map<String, Object> source) {
          if (source == null) {
              return null;
          }
          DownloadBean bean = new DownloadBean();
          bean.setId(asString(source.get("id")));
          bean.setPath(asString(source.get("path")));
          bean.setType(asEnum(source.get("type"), DownloadType.class));
          bean.setExpires(asDate(source.get("expires")));
          postMarshall(bean);
          return bean;
      }
docs: Unmarshals the given map source into a bean.
  @param source the source
  @return the gateway bean