Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Treeverse LakeFS Java SDK Model Diff

From Leeroopedia


Knowledge Sources
Domains Java_SDK, Data_Model
Last Updated 2026-02-08 00:00 GMT

Overview

Concrete data transfer object representing a single diff entry between two references in the lakeFS Java SDK.

Description

The Diff class is an auto-generated model object produced by OpenAPI Generator from the lakeFS API specification. It provides type-safe access to diff entry fields through getter/setter methods and supports JSON serialization via Gson. It includes TypeEnum (ADDED, REMOVED, CHANGED, CONFLICT, PREFIX_CHANGED) and PathTypeEnum (COMMON_PREFIX, OBJECT) inner enums.

Usage

Use this model when working with diff results from comparing branches, commits, or references through the lakeFS Java SDK API classes.

Code Reference

Source Location

Signature

public class Diff {
    // Fields with @SerializedName annotations
    // Getter/setter methods
    // equals, hashCode, toString
    // JSON type adapter
}

Import

import io.lakefs.clients.sdk.model.Diff;

I/O Contract

Inputs

Name Type Required Description
type TypeEnum Yes Type of diff (ADDED, REMOVED, CHANGED, CONFLICT, PREFIX_CHANGED)
path String Yes Object path that was changed
pathType PathTypeEnum Yes Type of path (COMMON_PREFIX or OBJECT)
sizeBytes Long No Size of the object in bytes
right DiffObjectStat No Object statistics for the right side of the diff

Outputs

Name Type Description
JSON String Serialized JSON representation

Usage Examples

Creating an Instance

import io.lakefs.clients.sdk.model.Diff;

Diff obj = new Diff();
obj.setType(Diff.TypeEnum.ADDED);
obj.setPath("data/new-file.csv");
obj.setPathType(Diff.PathTypeEnum.OBJECT);
obj.setSizeBytes(1024L);

Principle

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment