70 lines
2.2 KiB
Java
70 lines
2.2 KiB
Java
|
|
// This file is auto-generated by alef — DO NOT EDIT.
|
||
|
|
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
|
||
|
|
// To regenerate: alef generate
|
||
|
|
// To verify freshness: alef verify --exit-code
|
||
|
|
// Issues & docs: https://github.com/kreuzberg-dev/alef
|
||
|
|
package dev.kreuzberg;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||
|
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||
|
|
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
|
||
|
|
import org.jspecify.annotations.Nullable;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Excel/spreadsheet format metadata.
|
||
|
|
*
|
||
|
|
* Identifies the document as a spreadsheet source via the {@code FormatMetadata.Excel}
|
||
|
|
* discriminant. Sheet count and sheet names are stored inside this struct.
|
||
|
|
*/
|
||
|
|
@JsonInclude(JsonInclude.Include.NON_ABSENT)
|
||
|
|
@JsonDeserialize(builder = ExcelMetadata.Builder.class)
|
||
|
|
public record ExcelMetadata(
|
||
|
|
/**
|
||
|
|
* Number of sheets in the workbook.
|
||
|
|
*/
|
||
|
|
@Nullable @JsonProperty("sheet_count") Integer sheetCount,
|
||
|
|
/**
|
||
|
|
* Names of all sheets in the workbook.
|
||
|
|
*/
|
||
|
|
@Nullable @JsonProperty("sheet_names") List<String> sheetNames
|
||
|
|
) {
|
||
|
|
public static Builder builder() {
|
||
|
|
return new Builder();
|
||
|
|
}
|
||
|
|
|
||
|
|
// CPD-OFF
|
||
|
|
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
|
||
|
|
public static final class Builder {
|
||
|
|
|
||
|
|
@JsonProperty("sheet_count")
|
||
|
|
private Integer sheetCount = null;
|
||
|
|
@JsonProperty("sheet_names")
|
||
|
|
private List<String> sheetNames = null;
|
||
|
|
|
||
|
|
/** Sets the sheetCount field. */
|
||
|
|
@JsonProperty("sheet_count")
|
||
|
|
public Builder withSheetCount(final @Nullable int value) {
|
||
|
|
this.sheetCount = value;
|
||
|
|
return this;
|
||
|
|
}
|
||
|
|
|
||
|
|
/** Sets the sheetNames field. */
|
||
|
|
@JsonProperty("sheet_names")
|
||
|
|
public Builder withSheetNames(final @Nullable List<String> value) {
|
||
|
|
this.sheetNames = value;
|
||
|
|
return this;
|
||
|
|
}
|
||
|
|
|
||
|
|
/** Builds the ExcelMetadata instance. */
|
||
|
|
public ExcelMetadata build() {
|
||
|
|
return new ExcelMetadata(
|
||
|
|
sheetCount,
|
||
|
|
sheetNames
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
// CPD-ON
|
||
|
|
}
|