// 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 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;

/**
 * Application properties from docProps/app.xml for DOCX
 *
 * Contains Word-specific document statistics and metadata.
 */
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = DocxAppProperties.Builder.class)
public record DocxAppProperties(
    /**
     * Application name (e.g., "Microsoft Office Word")
     */
    @Nullable @JsonProperty("application") String application,
    /**
     * Application version
     */
    @Nullable @JsonProperty("app_version") String appVersion,
    /**
     * Template filename
     */
    @Nullable @JsonProperty("template") String template,
    /**
     * Total editing time in minutes
     */
    @Nullable @JsonProperty("total_time") Integer totalTime,
    /**
     * Number of pages
     */
    @Nullable @JsonProperty("pages") Integer pages,
    /**
     * Number of words
     */
    @Nullable @JsonProperty("words") Integer words,
    /**
     * Number of characters (excluding spaces)
     */
    @Nullable @JsonProperty("characters") Integer characters,
    /**
     * Number of characters (including spaces)
     */
    @Nullable @JsonProperty("characters_with_spaces") Integer charactersWithSpaces,
    /**
     * Number of lines
     */
    @Nullable @JsonProperty("lines") Integer lines,
    /**
     * Number of paragraphs
     */
    @Nullable @JsonProperty("paragraphs") Integer paragraphs,
    /**
     * Company name
     */
    @Nullable @JsonProperty("company") String company,
    /**
     * Document security level
     */
    @Nullable @JsonProperty("doc_security") Integer docSecurity,
    /**
     * Scale crop flag
     */
    @Nullable @JsonProperty("scale_crop") Boolean scaleCrop,
    /**
     * Links up to date flag
     */
    @Nullable @JsonProperty("links_up_to_date") Boolean linksUpToDate,
    /**
     * Shared document flag
     */
    @Nullable @JsonProperty("shared_doc") Boolean sharedDoc,
    /**
     * Hyperlinks changed flag
     */
    @Nullable @JsonProperty("hyperlinks_changed") Boolean hyperlinksChanged
) {
    public static Builder builder() {
        return new Builder();
    }

    // CPD-OFF
    @JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
    public static final class Builder {

private String application = null;
        @JsonProperty("app_version")
private String appVersion = null;
private String template = null;
        @JsonProperty("total_time")
private Integer totalTime = null;
private Integer pages = null;
private Integer words = null;
private Integer characters = null;
        @JsonProperty("characters_with_spaces")
private Integer charactersWithSpaces = null;
private Integer lines = null;
private Integer paragraphs = null;
private String company = null;
        @JsonProperty("doc_security")
private Integer docSecurity = null;
        @JsonProperty("scale_crop")
private Boolean scaleCrop = null;
        @JsonProperty("links_up_to_date")
private Boolean linksUpToDate = null;
        @JsonProperty("shared_doc")
private Boolean sharedDoc = null;
        @JsonProperty("hyperlinks_changed")
private Boolean hyperlinksChanged = null;

        /** Sets the application field. */
        @JsonProperty("application")
        public Builder withApplication(final @Nullable String value) {
            this.application = value;
            return this;
        }

        /** Sets the appVersion field. */
        @JsonProperty("app_version")
        public Builder withAppVersion(final @Nullable String value) {
            this.appVersion = value;
            return this;
        }

        /** Sets the template field. */
        @JsonProperty("template")
        public Builder withTemplate(final @Nullable String value) {
            this.template = value;
            return this;
        }

        /** Sets the totalTime field. */
        @JsonProperty("total_time")
        public Builder withTotalTime(final @Nullable int value) {
            this.totalTime = value;
            return this;
        }

        /** Sets the pages field. */
        @JsonProperty("pages")
        public Builder withPages(final @Nullable int value) {
            this.pages = value;
            return this;
        }

        /** Sets the words field. */
        @JsonProperty("words")
        public Builder withWords(final @Nullable int value) {
            this.words = value;
            return this;
        }

        /** Sets the characters field. */
        @JsonProperty("characters")
        public Builder withCharacters(final @Nullable int value) {
            this.characters = value;
            return this;
        }

        /** Sets the charactersWithSpaces field. */
        @JsonProperty("characters_with_spaces")
        public Builder withCharactersWithSpaces(final @Nullable int value) {
            this.charactersWithSpaces = value;
            return this;
        }

        /** Sets the lines field. */
        @JsonProperty("lines")
        public Builder withLines(final @Nullable int value) {
            this.lines = value;
            return this;
        }

        /** Sets the paragraphs field. */
        @JsonProperty("paragraphs")
        public Builder withParagraphs(final @Nullable int value) {
            this.paragraphs = value;
            return this;
        }

        /** Sets the company field. */
        @JsonProperty("company")
        public Builder withCompany(final @Nullable String value) {
            this.company = value;
            return this;
        }

        /** Sets the docSecurity field. */
        @JsonProperty("doc_security")
        public Builder withDocSecurity(final @Nullable int value) {
            this.docSecurity = value;
            return this;
        }

        /** Sets the scaleCrop field. */
        @JsonProperty("scale_crop")
        public Builder withScaleCrop(final @Nullable boolean value) {
            this.scaleCrop = value;
            return this;
        }

        /** Sets the linksUpToDate field. */
        @JsonProperty("links_up_to_date")
        public Builder withLinksUpToDate(final @Nullable boolean value) {
            this.linksUpToDate = value;
            return this;
        }

        /** Sets the sharedDoc field. */
        @JsonProperty("shared_doc")
        public Builder withSharedDoc(final @Nullable boolean value) {
            this.sharedDoc = value;
            return this;
        }

        /** Sets the hyperlinksChanged field. */
        @JsonProperty("hyperlinks_changed")
        public Builder withHyperlinksChanged(final @Nullable boolean value) {
            this.hyperlinksChanged = value;
            return this;
        }

        /** Builds the DocxAppProperties instance. */
        public DocxAppProperties build() {
            return new DocxAppProperties(
                application,
                appVersion,
                template,
                totalTime,
                pages,
                words,
                characters,
                charactersWithSpaces,
                lines,
                paragraphs,
                company,
                docSecurity,
                scaleCrop,
                linksUpToDate,
                sharedDoc,
                hyperlinksChanged
            );
        }
    }
    // CPD-ON
}
