// 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 java.util.Map; 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 (PPTX) extraction result. * * Contains extracted slide content, metadata, and embedded images/tables. */ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PptxExtractionResult.Builder.class) public record PptxExtractionResult( /** * Extracted text content from all slides */ @JsonProperty("content") String content, /** * Presentation metadata */ @JsonProperty("metadata") PptxMetadata metadata, /** * Total number of slides */ @JsonProperty("slide_count") long slideCount, /** * Total number of embedded images */ @JsonProperty("image_count") long imageCount, /** * Total number of tables */ @JsonProperty("table_count") long tableCount, /** * Extracted images from the presentation */ @JsonProperty("images") List images, /** * Slide structure with boundaries (when page tracking is enabled) */ @Nullable @JsonProperty("page_structure") PageStructure pageStructure, /** * Per-slide content (when page tracking is enabled) */ @Nullable @JsonProperty("page_contents") List pageContents, /** * Structured document representation */ @Nullable @JsonProperty("document") DocumentStructure document, /** * Hyperlinks discovered in slides as (url, optional_label) pairs. */ @Nullable @JsonProperty("hyperlinks") List hyperlinks, /** * Office metadata extracted from docProps/core.xml and docProps/app.xml. * * Contains keys like "title", "author", "created_by", "subject", "keywords", * "modified_by", "created_at", "modified_at", etc. */ @Nullable @JsonProperty("office_metadata") Map officeMetadata, /** * Slide comments as revisions. * * Each {@code <p:cm>} element in {@code ppt/comments/comment{N}.xml} becomes a * {@code DocumentRevision { kind: Comment }} with author (resolved from * {@code ppt/commentAuthors.xml}), ISO-8601 timestamp, and * {@code RevisionAnchor.Slide { index }}. {@code None} when no comment XML parts exist. */ @Nullable @JsonProperty("revisions") List revisions ) { public static Builder builder() { return new Builder(); } // CPD-OFF @JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build") public static final class Builder { private String content = ""; private PptxMetadata metadata = null; @JsonProperty("slide_count") private long slideCount = 0; @JsonProperty("image_count") private long imageCount = 0; @JsonProperty("table_count") private long tableCount = 0; private List images = List.of(); @JsonProperty("page_structure") private PageStructure pageStructure = null; @JsonProperty("page_contents") private List pageContents = null; private DocumentStructure document = null; private List hyperlinks = null; @JsonProperty("office_metadata") private Map officeMetadata = null; private List revisions = null; /** Sets the content field. */ @JsonProperty("content") public Builder withContent(final String value) { this.content = value; return this; } /** Sets the metadata field. */ @JsonProperty("metadata") public Builder withMetadata(final PptxMetadata value) { this.metadata = value; return this; } /** Sets the slideCount field. */ @JsonProperty("slide_count") public Builder withSlideCount(final long value) { this.slideCount = value; return this; } /** Sets the imageCount field. */ @JsonProperty("image_count") public Builder withImageCount(final long value) { this.imageCount = value; return this; } /** Sets the tableCount field. */ @JsonProperty("table_count") public Builder withTableCount(final long value) { this.tableCount = value; return this; } /** Sets the images field. */ @JsonProperty("images") public Builder withImages(final List value) { this.images = value; return this; } /** Sets the pageStructure field. */ @JsonProperty("page_structure") public Builder withPageStructure(final @Nullable PageStructure value) { this.pageStructure = value; return this; } /** Sets the pageContents field. */ @JsonProperty("page_contents") public Builder withPageContents(final @Nullable List value) { this.pageContents = value; return this; } /** Sets the document field. */ @JsonProperty("document") public Builder withDocument(final @Nullable DocumentStructure value) { this.document = value; return this; } /** Sets the hyperlinks field. */ @JsonProperty("hyperlinks") public Builder withHyperlinks(final @Nullable List value) { this.hyperlinks = value; return this; } /** Sets the officeMetadata field. */ @JsonProperty("office_metadata") public Builder withOfficeMetadata(final @Nullable Map value) { this.officeMetadata = value; return this; } /** Sets the revisions field. */ @JsonProperty("revisions") public Builder withRevisions(final @Nullable List value) { this.revisions = value; return this; } /** Builds the PptxExtractionResult instance. */ public PptxExtractionResult build() { return new PptxExtractionResult( content, metadata, slideCount, imageCount, tableCount, images, pageStructure, pageContents, document, hyperlinks, officeMetadata, revisions ); } } // CPD-ON }