97 lines
2.9 KiB
Java
Generated
97 lines
2.9 KiB
Java
Generated
// 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;
|
|
|
|
/**
|
|
* PowerPoint presentation metadata.
|
|
*
|
|
* Extracted from PPTX files containing slide counts and presentation details.
|
|
*/
|
|
@JsonInclude(JsonInclude.Include.NON_ABSENT)
|
|
@JsonDeserialize(builder = PptxMetadata.Builder.class)
|
|
public record PptxMetadata(
|
|
/**
|
|
* Total number of slides in the presentation
|
|
*/
|
|
@JsonProperty("slide_count") int slideCount,
|
|
/**
|
|
* Names of slides (if available)
|
|
*/
|
|
@JsonProperty("slide_names") List<String> slideNames,
|
|
/**
|
|
* Number of embedded images
|
|
*/
|
|
@Nullable @JsonProperty("image_count") Integer imageCount,
|
|
/**
|
|
* Number of tables
|
|
*/
|
|
@Nullable @JsonProperty("table_count") Integer tableCount
|
|
) {
|
|
public static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
// CPD-OFF
|
|
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
|
|
public static final class Builder {
|
|
|
|
@JsonProperty("slide_count")
|
|
private int slideCount = 0;
|
|
@JsonProperty("slide_names")
|
|
private List<String> slideNames = List.of();
|
|
@JsonProperty("image_count")
|
|
private Integer imageCount = null;
|
|
@JsonProperty("table_count")
|
|
private Integer tableCount = null;
|
|
|
|
/** Sets the slideCount field. */
|
|
@JsonProperty("slide_count")
|
|
public Builder withSlideCount(final int value) {
|
|
this.slideCount = value;
|
|
return this;
|
|
}
|
|
|
|
/** Sets the slideNames field. */
|
|
@JsonProperty("slide_names")
|
|
public Builder withSlideNames(final List<String> value) {
|
|
this.slideNames = value;
|
|
return this;
|
|
}
|
|
|
|
/** Sets the imageCount field. */
|
|
@JsonProperty("image_count")
|
|
public Builder withImageCount(final @Nullable int value) {
|
|
this.imageCount = value;
|
|
return this;
|
|
}
|
|
|
|
/** Sets the tableCount field. */
|
|
@JsonProperty("table_count")
|
|
public Builder withTableCount(final @Nullable int value) {
|
|
this.tableCount = value;
|
|
return this;
|
|
}
|
|
|
|
/** Builds the PptxMetadata instance. */
|
|
public PptxMetadata build() {
|
|
return new PptxMetadata(
|
|
slideCount,
|
|
slideNames,
|
|
imageCount,
|
|
tableCount
|
|
);
|
|
}
|
|
}
|
|
// CPD-ON
|
|
}
|