You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Response.java 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2015, Sasa Zivkov <sasa.zivkov@sap.com> and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.lfs.server;
  11. import java.util.List;
  12. import java.util.Map;
  13. /**
  14. * POJOs for Gson serialization/de-serialization.
  15. *
  16. * See the <a href="https://github.com/github/git-lfs/tree/master/docs/api">LFS
  17. * API specification</a>
  18. *
  19. * @since 4.3
  20. */
  21. public interface Response {
  22. /** Describes an action the client can execute on a single object */
  23. class Action {
  24. public String href;
  25. public Map<String, String> header;
  26. }
  27. /** Describes an error to be returned by the LFS batch API */
  28. class Error {
  29. public int code;
  30. public String message;
  31. }
  32. /** Describes the actions the LFS server offers for a single object */
  33. class ObjectInfo {
  34. public String oid;
  35. public long size;
  36. public Map<String, Action> actions;
  37. public Error error;
  38. }
  39. /** Describes the body of a LFS batch API response */
  40. class Body {
  41. public List<ObjectInfo> objects;
  42. }
  43. }