/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.camel.component.docling.springboot;

import org.apache.camel.component.docling.AuthenticationScheme;
import org.apache.camel.component.docling.DoclingComponent;
import org.apache.camel.component.docling.DoclingConfiguration;
import org.apache.camel.component.docling.DoclingOperations;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Process documents using Docling library for parsing and conversion.
 * 
 * Generated by camel-package-maven-plugin - do not edit this file!
 */
@ConfigurationProperties(prefix = "camel.component.docling")
public class DoclingComponentConfiguration
        extends
            ComponentConfigurationPropertiesCommon {

    /**
     * Whether to enable auto configuration of the docling component. This is
     * enabled by default.
     */
    private Boolean enabled;
    /**
     * The configuration for the Docling Endpoint. The option is a
     * org.apache.camel.component.docling.DoclingConfiguration type.
     */
    private DoclingConfiguration configuration;
    /**
     * Include the content of the output file in the exchange body and delete
     * the output file
     */
    private Boolean contentInBody = false;
    /**
     * Docling-serve API URL (e.g., http://localhost:5001)
     */
    private String doclingServeUrl = "http://localhost:5001";
    /**
     * Enable OCR processing for scanned documents
     */
    private Boolean enableOCR = true;
    /**
     * Show layout information with bounding boxes
     */
    private Boolean includeLayoutInfo = false;
    /**
     * Whether the producer should be started lazy (on the first message). By
     * starting lazy you can use this to allow CamelContext and routes to
     * startup in situations where a producer may otherwise fail during starting
     * and cause the route to fail being started. By deferring this startup to
     * be lazy then the startup failure can be handled during routing messages
     * via Camel's routing error handlers. Beware that when the first message is
     * processed then creating and starting the producer may take a little time
     * and prolong the total processing time of the processing.
     */
    private Boolean lazyStartProducer = false;
    /**
     * Language code for OCR processing
     */
    private String ocrLanguage = "en";
    /**
     * The operation to perform
     */
    private DoclingOperations operation = DoclingOperations.CONVERT_TO_MARKDOWN;
    /**
     * Output format for document conversion
     */
    private String outputFormat = "markdown";
    /**
     * Use docling-serve API instead of CLI command
     */
    private Boolean useDoclingServe = false;
    /**
     * Abort processing on error
     */
    private Boolean abortOnError = false;
    /**
     * Polling interval for async conversion status in milliseconds
     */
    private Long asyncPollInterval = 2000L;
    /**
     * Maximum time to wait for async conversion completion in milliseconds
     */
    private Long asyncTimeout = 300000L;
    /**
     * Whether autowiring is enabled. This is used for automatic autowiring
     * options (the option must be marked as autowired) by looking up in the
     * registry to find if there is a single instance of matching type, which
     * then gets configured on the component. This can be used for automatic
     * configuring JDBC data sources, JMS connection factories, AWS Clients,
     * etc.
     */
    private Boolean autowiredEnabled = true;
    /**
     * Path to Docling Python executable or command
     */
    private String doclingCommand;
    /**
     * Enable code enrichment in document processing
     */
    private Boolean doCodeEnrichment = false;
    /**
     * Document processing timeout in seconds
     */
    private Long documentTimeout;
    /**
     * Enable formula enrichment in document processing
     */
    private Boolean doFormulaEnrichment = false;
    /**
     * Enable OCR processing in docling-serve API mode. When not set, the server
     * uses its own defaults. Set enableOCR to false to explicitly disable OCR.
     */
    private Boolean doOcr = false;
    /**
     * Enable picture classification in document processing
     */
    private Boolean doPictureClassification = false;
    /**
     * Enable picture description generation in document processing
     */
    private Boolean doPictureDescription = false;
    /**
     * Enable table structure recognition
     */
    private Boolean doTableStructure = false;
    /**
     * Force OCR processing even for digital documents
     */
    private Boolean forceOcr = false;
    /**
     * Image export mode for referenced images
     */
    private String imageExportMode;
    /**
     * Scale factor for exported images
     */
    private Double imagesScale;
    /**
     * Include images in the conversion output
     */
    private Boolean includeImages = false;
    /**
     * Placeholder string for page breaks in markdown output
     */
    private String mdPageBreakPlaceholder;
    /**
     * OCR engine to use
     */
    private String ocrEngine;
    /**
     * PDF parsing backend
     */
    private String pdfBackend;
    /**
     * Processing pipeline to use
     */
    private String pipeline;
    /**
     * Timeout for Docling process execution in milliseconds
     */
    private Long processTimeout = 30000L;
    /**
     * Enable table cell matching post-processing
     */
    private Boolean tableCellMatching = false;
    /**
     * Table structure recognition mode
     */
    private String tableMode;
    /**
     * Use asynchronous conversion mode (docling-serve API only)
     */
    private Boolean useAsyncMode = false;
    /**
     * Working directory for Docling execution
     */
    private String workingDirectory;
    /**
     * Fail entire batch on first error (true) or continue processing remaining
     * documents (false)
     */
    private Boolean batchFailOnFirstError = true;
    /**
     * Number of parallel threads for batch processing
     */
    private Integer batchParallelism = 4;
    /**
     * Maximum number of documents to process in a single batch (batch
     * operations only)
     */
    private Integer batchSize = 10;
    /**
     * Maximum time to wait for batch completion in milliseconds
     */
    private Long batchTimeout = 300000L;
    /**
     * Split batch results into individual exchanges (one per document) instead
     * of single BatchProcessingResults
     */
    private Boolean splitBatchResults = false;
    /**
     * Include metadata in message headers when extracting metadata
     */
    private Boolean includeMetadataInHeaders = true;
    /**
     * Include raw metadata as returned by the parser
     */
    private Boolean includeRawMetadata = false;
    /**
     * Header name for API key authentication
     */
    private String apiKeyHeader = "X-API-Key";
    /**
     * Authentication scheme (BEARER, API_KEY, NONE)
     */
    private AuthenticationScheme authenticationScheme = AuthenticationScheme.NONE;
    /**
     * Authentication token for docling-serve API (Bearer token or API key)
     */
    private String authenticationToken;
    /**
     * Maximum file size in bytes for processing
     */
    private Long maxFileSize = 52428800L;

    public DoclingConfiguration getConfiguration() {
        return configuration;
    }

    public void setConfiguration(DoclingConfiguration configuration) {
        this.configuration = configuration;
    }

    public Boolean getContentInBody() {
        return contentInBody;
    }

    public void setContentInBody(Boolean contentInBody) {
        this.contentInBody = contentInBody;
    }

    public String getDoclingServeUrl() {
        return doclingServeUrl;
    }

    public void setDoclingServeUrl(String doclingServeUrl) {
        this.doclingServeUrl = doclingServeUrl;
    }

    public Boolean getEnableOCR() {
        return enableOCR;
    }

    public void setEnableOCR(Boolean enableOCR) {
        this.enableOCR = enableOCR;
    }

    public Boolean getIncludeLayoutInfo() {
        return includeLayoutInfo;
    }

    public void setIncludeLayoutInfo(Boolean includeLayoutInfo) {
        this.includeLayoutInfo = includeLayoutInfo;
    }

    public Boolean getLazyStartProducer() {
        return lazyStartProducer;
    }

    public void setLazyStartProducer(Boolean lazyStartProducer) {
        this.lazyStartProducer = lazyStartProducer;
    }

    public String getOcrLanguage() {
        return ocrLanguage;
    }

    public void setOcrLanguage(String ocrLanguage) {
        this.ocrLanguage = ocrLanguage;
    }

    public DoclingOperations getOperation() {
        return operation;
    }

    public void setOperation(DoclingOperations operation) {
        this.operation = operation;
    }

    public String getOutputFormat() {
        return outputFormat;
    }

    public void setOutputFormat(String outputFormat) {
        this.outputFormat = outputFormat;
    }

    public Boolean getUseDoclingServe() {
        return useDoclingServe;
    }

    public void setUseDoclingServe(Boolean useDoclingServe) {
        this.useDoclingServe = useDoclingServe;
    }

    public Boolean getAbortOnError() {
        return abortOnError;
    }

    public void setAbortOnError(Boolean abortOnError) {
        this.abortOnError = abortOnError;
    }

    public Long getAsyncPollInterval() {
        return asyncPollInterval;
    }

    public void setAsyncPollInterval(Long asyncPollInterval) {
        this.asyncPollInterval = asyncPollInterval;
    }

    public Long getAsyncTimeout() {
        return asyncTimeout;
    }

    public void setAsyncTimeout(Long asyncTimeout) {
        this.asyncTimeout = asyncTimeout;
    }

    public Boolean getAutowiredEnabled() {
        return autowiredEnabled;
    }

    public void setAutowiredEnabled(Boolean autowiredEnabled) {
        this.autowiredEnabled = autowiredEnabled;
    }

    public String getDoclingCommand() {
        return doclingCommand;
    }

    public void setDoclingCommand(String doclingCommand) {
        this.doclingCommand = doclingCommand;
    }

    public Boolean getDoCodeEnrichment() {
        return doCodeEnrichment;
    }

    public void setDoCodeEnrichment(Boolean doCodeEnrichment) {
        this.doCodeEnrichment = doCodeEnrichment;
    }

    public Long getDocumentTimeout() {
        return documentTimeout;
    }

    public void setDocumentTimeout(Long documentTimeout) {
        this.documentTimeout = documentTimeout;
    }

    public Boolean getDoFormulaEnrichment() {
        return doFormulaEnrichment;
    }

    public void setDoFormulaEnrichment(Boolean doFormulaEnrichment) {
        this.doFormulaEnrichment = doFormulaEnrichment;
    }

    public Boolean getDoOcr() {
        return doOcr;
    }

    public void setDoOcr(Boolean doOcr) {
        this.doOcr = doOcr;
    }

    public Boolean getDoPictureClassification() {
        return doPictureClassification;
    }

    public void setDoPictureClassification(Boolean doPictureClassification) {
        this.doPictureClassification = doPictureClassification;
    }

    public Boolean getDoPictureDescription() {
        return doPictureDescription;
    }

    public void setDoPictureDescription(Boolean doPictureDescription) {
        this.doPictureDescription = doPictureDescription;
    }

    public Boolean getDoTableStructure() {
        return doTableStructure;
    }

    public void setDoTableStructure(Boolean doTableStructure) {
        this.doTableStructure = doTableStructure;
    }

    public Boolean getForceOcr() {
        return forceOcr;
    }

    public void setForceOcr(Boolean forceOcr) {
        this.forceOcr = forceOcr;
    }

    public String getImageExportMode() {
        return imageExportMode;
    }

    public void setImageExportMode(String imageExportMode) {
        this.imageExportMode = imageExportMode;
    }

    public Double getImagesScale() {
        return imagesScale;
    }

    public void setImagesScale(Double imagesScale) {
        this.imagesScale = imagesScale;
    }

    public Boolean getIncludeImages() {
        return includeImages;
    }

    public void setIncludeImages(Boolean includeImages) {
        this.includeImages = includeImages;
    }

    public String getMdPageBreakPlaceholder() {
        return mdPageBreakPlaceholder;
    }

    public void setMdPageBreakPlaceholder(String mdPageBreakPlaceholder) {
        this.mdPageBreakPlaceholder = mdPageBreakPlaceholder;
    }

    public String getOcrEngine() {
        return ocrEngine;
    }

    public void setOcrEngine(String ocrEngine) {
        this.ocrEngine = ocrEngine;
    }

    public String getPdfBackend() {
        return pdfBackend;
    }

    public void setPdfBackend(String pdfBackend) {
        this.pdfBackend = pdfBackend;
    }

    public String getPipeline() {
        return pipeline;
    }

    public void setPipeline(String pipeline) {
        this.pipeline = pipeline;
    }

    public Long getProcessTimeout() {
        return processTimeout;
    }

    public void setProcessTimeout(Long processTimeout) {
        this.processTimeout = processTimeout;
    }

    public Boolean getTableCellMatching() {
        return tableCellMatching;
    }

    public void setTableCellMatching(Boolean tableCellMatching) {
        this.tableCellMatching = tableCellMatching;
    }

    public String getTableMode() {
        return tableMode;
    }

    public void setTableMode(String tableMode) {
        this.tableMode = tableMode;
    }

    public Boolean getUseAsyncMode() {
        return useAsyncMode;
    }

    public void setUseAsyncMode(Boolean useAsyncMode) {
        this.useAsyncMode = useAsyncMode;
    }

    public String getWorkingDirectory() {
        return workingDirectory;
    }

    public void setWorkingDirectory(String workingDirectory) {
        this.workingDirectory = workingDirectory;
    }

    public Boolean getBatchFailOnFirstError() {
        return batchFailOnFirstError;
    }

    public void setBatchFailOnFirstError(Boolean batchFailOnFirstError) {
        this.batchFailOnFirstError = batchFailOnFirstError;
    }

    public Integer getBatchParallelism() {
        return batchParallelism;
    }

    public void setBatchParallelism(Integer batchParallelism) {
        this.batchParallelism = batchParallelism;
    }

    public Integer getBatchSize() {
        return batchSize;
    }

    public void setBatchSize(Integer batchSize) {
        this.batchSize = batchSize;
    }

    public Long getBatchTimeout() {
        return batchTimeout;
    }

    public void setBatchTimeout(Long batchTimeout) {
        this.batchTimeout = batchTimeout;
    }

    public Boolean getSplitBatchResults() {
        return splitBatchResults;
    }

    public void setSplitBatchResults(Boolean splitBatchResults) {
        this.splitBatchResults = splitBatchResults;
    }

    public Boolean getIncludeMetadataInHeaders() {
        return includeMetadataInHeaders;
    }

    public void setIncludeMetadataInHeaders(Boolean includeMetadataInHeaders) {
        this.includeMetadataInHeaders = includeMetadataInHeaders;
    }

    public Boolean getIncludeRawMetadata() {
        return includeRawMetadata;
    }

    public void setIncludeRawMetadata(Boolean includeRawMetadata) {
        this.includeRawMetadata = includeRawMetadata;
    }

    public String getApiKeyHeader() {
        return apiKeyHeader;
    }

    public void setApiKeyHeader(String apiKeyHeader) {
        this.apiKeyHeader = apiKeyHeader;
    }

    public AuthenticationScheme getAuthenticationScheme() {
        return authenticationScheme;
    }

    public void setAuthenticationScheme(
            AuthenticationScheme authenticationScheme) {
        this.authenticationScheme = authenticationScheme;
    }

    public String getAuthenticationToken() {
        return authenticationToken;
    }

    public void setAuthenticationToken(String authenticationToken) {
        this.authenticationToken = authenticationToken;
    }

    public Long getMaxFileSize() {
        return maxFileSize;
    }

    public void setMaxFileSize(Long maxFileSize) {
        this.maxFileSize = maxFileSize;
    }
}