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
12 import java.util.List;
13 import java.util.Map;
14
15 /**
16 * POJOs for Gson serialization/de-serialization.
17 *
18 * See the <a href="https://github.com/github/git-lfs/tree/master/docs/api">LFS
19 * API specification</a>
20 *
21 * @since 4.3
22 */
23 public interface Response {
24 /** Describes an action the client can execute on a single object */
25 class Action {
26 public String href;
27 public Map<String, String> header;
28 }
29
30 /** Describes an error to be returned by the LFS batch API */
31 class Error {
32 public int code;
33 public String message;
34 }
35
36 /** Describes the actions the LFS server offers for a single object */
37 class ObjectInfo {
38 public String oid;
39 public long size;
40 public Map<String, Action> actions;
41 public Error error;
42 }
43
44 /** Describes the body of a LFS batch API response */
45 class Body {
46 public List<ObjectInfo> objects;
47 }
48 }