docs: public static XContentBuilder marshall(DownloadBean bean) throws StorageException {
          try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
              preMarshall(bean);
              builder
                  .startObject()
                      .field("id", bean.getId())
                      .field("type", bean.getType().name())
                      .field("path", bean.getPath())
                      .field("expires", bean.getExpires().getTime())
                  .endObject();
              postMarshall(bean);
              return builder;
          } catch (IOException e) {
              throw new StorageException(e);
          }
      }