13bae524fSMatthias Sohn /* 2*5c5f7c6bSMatthias Sohn * Copyright (C) 2015, Sasa Zivkov <sasa.zivkov@sap.com> and others 33bae524fSMatthias Sohn * 4*5c5f7c6bSMatthias Sohn * This program and the accompanying materials are made available under the 5*5c5f7c6bSMatthias Sohn * terms of the Eclipse Distribution License v. 1.0 which is available at 6*5c5f7c6bSMatthias Sohn * https://www.eclipse.org/org/documents/edl-v10.php. 73bae524fSMatthias Sohn * 8*5c5f7c6bSMatthias Sohn * SPDX-License-Identifier: BSD-3-Clause 93bae524fSMatthias Sohn */ 103bae524fSMatthias Sohn package org.eclipse.jgit.lfs.server; 113bae524fSMatthias Sohn 123bae524fSMatthias Sohn import java.util.List; 133bae524fSMatthias Sohn import java.util.Map; 143bae524fSMatthias Sohn 153bae524fSMatthias Sohn /** 162464fa44SMatthias Sohn * POJOs for Gson serialization/de-serialization. 173bae524fSMatthias Sohn * 182464fa44SMatthias Sohn * See the <a href="https://github.com/github/git-lfs/tree/master/docs/api">LFS 192464fa44SMatthias Sohn * API specification</a> 203bae524fSMatthias Sohn * 213bae524fSMatthias Sohn * @since 4.3 223bae524fSMatthias Sohn */ 233bae524fSMatthias Sohn public interface Response { 243bae524fSMatthias Sohn /** Describes an action the client can execute on a single object */ 253bae524fSMatthias Sohn class Action { 263bae524fSMatthias Sohn public String href; 273bae524fSMatthias Sohn public Map<String, String> header; 283bae524fSMatthias Sohn } 293bae524fSMatthias Sohn 303bae524fSMatthias Sohn /** Describes an error to be returned by the LFS batch API */ 313bae524fSMatthias Sohn class Error { 323bae524fSMatthias Sohn public int code; 333bae524fSMatthias Sohn public String message; 343bae524fSMatthias Sohn } 353bae524fSMatthias Sohn 363bae524fSMatthias Sohn /** Describes the actions the LFS server offers for a single object */ 373bae524fSMatthias Sohn class ObjectInfo { 383bae524fSMatthias Sohn public String oid; 393bae524fSMatthias Sohn public long size; 403bae524fSMatthias Sohn public Map<String, Action> actions; 413bae524fSMatthias Sohn public Error error; 423bae524fSMatthias Sohn } 433bae524fSMatthias Sohn 443bae524fSMatthias Sohn /** Describes the body of a LFS batch API response */ 453bae524fSMatthias Sohn class Body { 463bae524fSMatthias Sohn public List<ObjectInfo> objects; 473bae524fSMatthias Sohn } 483bae524fSMatthias Sohn } 49