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

/**
 * Application properties from docProps/app.xml for XLSX
 *
 * Contains Excel-specific document metadata.
 */
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = XlsxAppProperties.Builder.class)
public record XlsxAppProperties(
    /**
     * Application name (e.g., "Microsoft Excel")
     */
    @Nullable @JsonProperty("application") String application,
    /**
     * Application version
     */
    @Nullable @JsonProperty("app_version") String appVersion,
    /**
     * 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,
    /**
     * Company name
     */
    @Nullable @JsonProperty("company") String company,
    /**
     * Worksheet names
     */
    @JsonProperty("worksheet_names") List<String> worksheetNames
) {
    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;
        @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;
private String company = null;
        @JsonProperty("worksheet_names")
private List<String> worksheetNames = List.of();

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

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

        /** Sets the worksheetNames field. */
        @JsonProperty("worksheet_names")
        public Builder withWorksheetNames(final List<String> value) {
            this.worksheetNames = value;
            return this;
        }

        /** Builds the XlsxAppProperties instance. */
        public XlsxAppProperties build() {
            return new XlsxAppProperties(
                application,
                appVersion,
                docSecurity,
                scaleCrop,
                linksUpToDate,
                sharedDoc,
                hyperlinksChanged,
                company,
                worksheetNames
            );
        }
    }
    // CPD-ON
}
