IndexingParametersConfiguration.java

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. //
  4. // Code generated by Microsoft (R) AutoRest Code Generator.
  5. // Changes may cause incorrect behavior and will be lost if the code is
  6. // regenerated.

  7. package com.azure.search.documents.indexes.models;

  8. import com.azure.core.annotation.Fluent;
  9. import com.fasterxml.jackson.annotation.JsonAnyGetter;
  10. import com.fasterxml.jackson.annotation.JsonAnySetter;
  11. import com.fasterxml.jackson.annotation.JsonIgnore;
  12. import com.fasterxml.jackson.annotation.JsonProperty;
  13. import java.util.HashMap;
  14. import java.util.Map;

  15. /**
  16.  * A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value
  17.  * must be of a primitive type.
  18.  */
  19. @Fluent
  20. public final class IndexingParametersConfiguration {
  21.     /*
  22.      * Represents the parsing mode for indexing from an Azure blob data source.
  23.      */
  24.     @JsonProperty(value = "parsingMode")
  25.     private BlobIndexerParsingMode parsingMode;

  26.     /*
  27.      * Comma-delimited list of filename extensions to ignore when processing
  28.      * from Azure blob storage.  For example, you could exclude ".png, .mp4" to
  29.      * skip over those files during indexing.
  30.      */
  31.     @JsonProperty(value = "excludedFileNameExtensions")
  32.     private String excludedFileNameExtensions;

  33.     /*
  34.      * Comma-delimited list of filename extensions to select when processing
  35.      * from Azure blob storage.  For example, you could focus indexing on
  36.      * specific application files ".docx, .pptx, .msg" to specifically include
  37.      * those file types.
  38.      */
  39.     @JsonProperty(value = "indexedFileNameExtensions")
  40.     private String indexedFileNameExtensions;

  41.     /*
  42.      * For Azure blobs, set to false if you want to continue indexing when an
  43.      * unsupported content type is encountered, and you don't know all the
  44.      * content types (file extensions) in advance.
  45.      */
  46.     @JsonProperty(value = "failOnUnsupportedContentType")
  47.     private Boolean failOnUnsupportedContentType;

  48.     /*
  49.      * For Azure blobs, set to false if you want to continue indexing if a
  50.      * document fails indexing.
  51.      */
  52.     @JsonProperty(value = "failOnUnprocessableDocument")
  53.     private Boolean failOnUnprocessableDocument;

  54.     /*
  55.      * For Azure blobs, set this property to true to still index storage
  56.      * metadata for blob content that is too large to process. Oversized blobs
  57.      * are treated as errors by default. For limits on blob size, see
  58.      * https://docs.microsoft.com/azure/search/search-limits-quotas-capacity.
  59.      */
  60.     @JsonProperty(value = "indexStorageMetadataOnlyForOversizedDocuments")
  61.     private Boolean indexStorageMetadataOnlyForOversizedDocuments;

  62.     /*
  63.      * For CSV blobs, specifies a comma-delimited list of column headers,
  64.      * useful for mapping source fields to destination fields in an index.
  65.      */
  66.     @JsonProperty(value = "delimitedTextHeaders")
  67.     private String delimitedTextHeaders;

  68.     /*
  69.      * For CSV blobs, specifies the end-of-line single-character delimiter for
  70.      * CSV files where each line starts a new document (for example, "|").
  71.      */
  72.     @JsonProperty(value = "delimitedTextDelimiter")
  73.     private String delimitedTextDelimiter;

  74.     /*
  75.      * For CSV blobs, indicates that the first (non-blank) line of each blob
  76.      * contains headers.
  77.      */
  78.     @JsonProperty(value = "firstLineContainsHeaders")
  79.     private Boolean firstLineContainsHeaders;

  80.     /*
  81.      * For JSON arrays, given a structured or semi-structured document, you can
  82.      * specify a path to the array using this property.
  83.      */
  84.     @JsonProperty(value = "documentRoot")
  85.     private String documentRoot;

  86.     /*
  87.      * Specifies the data to extract from Azure blob storage and tells the
  88.      * indexer which data to extract from image content when "imageAction" is
  89.      * set to a value other than "none".  This applies to embedded image
  90.      * content in a .PDF or other application, or image files such as .jpg and
  91.      * .png, in Azure blobs.
  92.      */
  93.     @JsonProperty(value = "dataToExtract")
  94.     private BlobIndexerDataToExtract dataToExtract;

  95.     /*
  96.      * Determines how to process embedded images and image files in Azure blob
  97.      * storage.  Setting the "imageAction" configuration to any value other
  98.      * than "none" requires that a skillset also be attached to that indexer.
  99.      */
  100.     @JsonProperty(value = "imageAction")
  101.     private BlobIndexerImageAction imageAction;

  102.     /*
  103.      * If true, will create a path //document//file_data that is an object
  104.      * representing the original file data downloaded from your blob data
  105.      * source.  This allows you to pass the original file data to a custom
  106.      * skill for processing within the enrichment pipeline, or to the Document
  107.      * Extraction skill.
  108.      */
  109.     @JsonProperty(value = "allowSkillsetToReadFileData")
  110.     private Boolean allowSkillsetToReadFileData;

  111.     /*
  112.      * Determines algorithm for text extraction from PDF files in Azure blob
  113.      * storage.
  114.      */
  115.     @JsonProperty(value = "pdfTextRotationAlgorithm")
  116.     private BlobIndexerPdfTextRotationAlgorithm pdfTextRotationAlgorithm;

  117.     /*
  118.      * Specifies the environment in which the indexer should execute.
  119.      */
  120.     @JsonProperty(value = "executionEnvironment")
  121.     private IndexerExecutionEnvironment executionEnvironment;

  122.     /*
  123.      * Increases the timeout beyond the 5-minute default for Azure SQL database
  124.      * data sources, specified in the format "hh:mm:ss".
  125.      */
  126.     @JsonProperty(value = "queryTimeout")
  127.     private String queryTimeout;

  128.     /*
  129.      * A dictionary of indexer-specific configuration properties. Each name is
  130.      * the name of a specific property. Each value must be of a primitive type.
  131.      */
  132.     @JsonIgnore private Map<String, Object> additionalProperties;

  133.     /**
  134.      * Get the parsingMode property: Represents the parsing mode for indexing from an Azure blob data source.
  135.      *
  136.      * @return the parsingMode value.
  137.      */
  138.     public BlobIndexerParsingMode getParsingMode() {
  139.         return this.parsingMode;
  140.     }

  141.     /**
  142.      * Set the parsingMode property: Represents the parsing mode for indexing from an Azure blob data source.
  143.      *
  144.      * @param parsingMode the parsingMode value to set.
  145.      * @return the IndexingParametersConfiguration object itself.
  146.      */
  147.     public IndexingParametersConfiguration setParsingMode(BlobIndexerParsingMode parsingMode) {
  148.         this.parsingMode = parsingMode;
  149.         return this;
  150.     }

  151.     /**
  152.      * Get the excludedFileNameExtensions property: Comma-delimited list of filename extensions to ignore when
  153.      * processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip over those files during
  154.      * indexing.
  155.      *
  156.      * @return the excludedFileNameExtensions value.
  157.      */
  158.     public String getExcludedFileNameExtensions() {
  159.         return this.excludedFileNameExtensions;
  160.     }

  161.     /**
  162.      * Set the excludedFileNameExtensions property: Comma-delimited list of filename extensions to ignore when
  163.      * processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip over those files during
  164.      * indexing.
  165.      *
  166.      * @param excludedFileNameExtensions the excludedFileNameExtensions value to set.
  167.      * @return the IndexingParametersConfiguration object itself.
  168.      */
  169.     public IndexingParametersConfiguration setExcludedFileNameExtensions(String excludedFileNameExtensions) {
  170.         this.excludedFileNameExtensions = excludedFileNameExtensions;
  171.         return this;
  172.     }

  173.     /**
  174.      * Get the indexedFileNameExtensions property: Comma-delimited list of filename extensions to select when processing
  175.      * from Azure blob storage. For example, you could focus indexing on specific application files ".docx, .pptx, .msg"
  176.      * to specifically include those file types.
  177.      *
  178.      * @return the indexedFileNameExtensions value.
  179.      */
  180.     public String getIndexedFileNameExtensions() {
  181.         return this.indexedFileNameExtensions;
  182.     }

  183.     /**
  184.      * Set the indexedFileNameExtensions property: Comma-delimited list of filename extensions to select when processing
  185.      * from Azure blob storage. For example, you could focus indexing on specific application files ".docx, .pptx, .msg"
  186.      * to specifically include those file types.
  187.      *
  188.      * @param indexedFileNameExtensions the indexedFileNameExtensions value to set.
  189.      * @return the IndexingParametersConfiguration object itself.
  190.      */
  191.     public IndexingParametersConfiguration setIndexedFileNameExtensions(String indexedFileNameExtensions) {
  192.         this.indexedFileNameExtensions = indexedFileNameExtensions;
  193.         return this;
  194.     }

  195.     /**
  196.      * Get the failOnUnsupportedContentType property: For Azure blobs, set to false if you want to continue indexing
  197.      * when an unsupported content type is encountered, and you don't know all the content types (file extensions) in
  198.      * advance.
  199.      *
  200.      * @return the failOnUnsupportedContentType value.
  201.      */
  202.     public Boolean isFailOnUnsupportedContentType() {
  203.         return this.failOnUnsupportedContentType;
  204.     }

  205.     /**
  206.      * Set the failOnUnsupportedContentType property: For Azure blobs, set to false if you want to continue indexing
  207.      * when an unsupported content type is encountered, and you don't know all the content types (file extensions) in
  208.      * advance.
  209.      *
  210.      * @param failOnUnsupportedContentType the failOnUnsupportedContentType value to set.
  211.      * @return the IndexingParametersConfiguration object itself.
  212.      */
  213.     public IndexingParametersConfiguration setFailOnUnsupportedContentType(Boolean failOnUnsupportedContentType) {
  214.         this.failOnUnsupportedContentType = failOnUnsupportedContentType;
  215.         return this;
  216.     }

  217.     /**
  218.      * Get the failOnUnprocessableDocument property: For Azure blobs, set to false if you want to continue indexing if a
  219.      * document fails indexing.
  220.      *
  221.      * @return the failOnUnprocessableDocument value.
  222.      */
  223.     public Boolean isFailOnUnprocessableDocument() {
  224.         return this.failOnUnprocessableDocument;
  225.     }

  226.     /**
  227.      * Set the failOnUnprocessableDocument property: For Azure blobs, set to false if you want to continue indexing if a
  228.      * document fails indexing.
  229.      *
  230.      * @param failOnUnprocessableDocument the failOnUnprocessableDocument value to set.
  231.      * @return the IndexingParametersConfiguration object itself.
  232.      */
  233.     public IndexingParametersConfiguration setFailOnUnprocessableDocument(Boolean failOnUnprocessableDocument) {
  234.         this.failOnUnprocessableDocument = failOnUnprocessableDocument;
  235.         return this;
  236.     }

  237.     /**
  238.      * Get the indexStorageMetadataOnlyForOversizedDocuments property: For Azure blobs, set this property to true to
  239.      * still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors
  240.      * by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity.
  241.      *
  242.      * @return the indexStorageMetadataOnlyForOversizedDocuments value.
  243.      */
  244.     public Boolean isIndexStorageMetadataOnlyForOversizedDocuments() {
  245.         return this.indexStorageMetadataOnlyForOversizedDocuments;
  246.     }

  247.     /**
  248.      * Set the indexStorageMetadataOnlyForOversizedDocuments property: For Azure blobs, set this property to true to
  249.      * still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors
  250.      * by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity.
  251.      *
  252.      * @param indexStorageMetadataOnlyForOversizedDocuments the indexStorageMetadataOnlyForOversizedDocuments value to
  253.      *     set.
  254.      * @return the IndexingParametersConfiguration object itself.
  255.      */
  256.     public IndexingParametersConfiguration setIndexStorageMetadataOnlyForOversizedDocuments(
  257.             Boolean indexStorageMetadataOnlyForOversizedDocuments) {
  258.         this.indexStorageMetadataOnlyForOversizedDocuments = indexStorageMetadataOnlyForOversizedDocuments;
  259.         return this;
  260.     }

  261.     /**
  262.      * Get the delimitedTextHeaders property: For CSV blobs, specifies a comma-delimited list of column headers, useful
  263.      * for mapping source fields to destination fields in an index.
  264.      *
  265.      * @return the delimitedTextHeaders value.
  266.      */
  267.     public String getDelimitedTextHeaders() {
  268.         return this.delimitedTextHeaders;
  269.     }

  270.     /**
  271.      * Set the delimitedTextHeaders property: For CSV blobs, specifies a comma-delimited list of column headers, useful
  272.      * for mapping source fields to destination fields in an index.
  273.      *
  274.      * @param delimitedTextHeaders the delimitedTextHeaders value to set.
  275.      * @return the IndexingParametersConfiguration object itself.
  276.      */
  277.     public IndexingParametersConfiguration setDelimitedTextHeaders(String delimitedTextHeaders) {
  278.         this.delimitedTextHeaders = delimitedTextHeaders;
  279.         return this;
  280.     }

  281.     /**
  282.      * Get the delimitedTextDelimiter property: For CSV blobs, specifies the end-of-line single-character delimiter for
  283.      * CSV files where each line starts a new document (for example, "|").
  284.      *
  285.      * @return the delimitedTextDelimiter value.
  286.      */
  287.     public String getDelimitedTextDelimiter() {
  288.         return this.delimitedTextDelimiter;
  289.     }

  290.     /**
  291.      * Set the delimitedTextDelimiter property: For CSV blobs, specifies the end-of-line single-character delimiter for
  292.      * CSV files where each line starts a new document (for example, "|").
  293.      *
  294.      * @param delimitedTextDelimiter the delimitedTextDelimiter value to set.
  295.      * @return the IndexingParametersConfiguration object itself.
  296.      */
  297.     public IndexingParametersConfiguration setDelimitedTextDelimiter(String delimitedTextDelimiter) {
  298.         this.delimitedTextDelimiter = delimitedTextDelimiter;
  299.         return this;
  300.     }

  301.     /**
  302.      * Get the firstLineContainsHeaders property: For CSV blobs, indicates that the first (non-blank) line of each blob
  303.      * contains headers.
  304.      *
  305.      * @return the firstLineContainsHeaders value.
  306.      */
  307.     public Boolean isFirstLineContainsHeaders() {
  308.         return this.firstLineContainsHeaders;
  309.     }

  310.     /**
  311.      * Set the firstLineContainsHeaders property: For CSV blobs, indicates that the first (non-blank) line of each blob
  312.      * contains headers.
  313.      *
  314.      * @param firstLineContainsHeaders the firstLineContainsHeaders value to set.
  315.      * @return the IndexingParametersConfiguration object itself.
  316.      */
  317.     public IndexingParametersConfiguration setFirstLineContainsHeaders(Boolean firstLineContainsHeaders) {
  318.         this.firstLineContainsHeaders = firstLineContainsHeaders;
  319.         return this;
  320.     }

  321.     /**
  322.      * Get the documentRoot property: For JSON arrays, given a structured or semi-structured document, you can specify a
  323.      * path to the array using this property.
  324.      *
  325.      * @return the documentRoot value.
  326.      */
  327.     public String getDocumentRoot() {
  328.         return this.documentRoot;
  329.     }

  330.     /**
  331.      * Set the documentRoot property: For JSON arrays, given a structured or semi-structured document, you can specify a
  332.      * path to the array using this property.
  333.      *
  334.      * @param documentRoot the documentRoot value to set.
  335.      * @return the IndexingParametersConfiguration object itself.
  336.      */
  337.     public IndexingParametersConfiguration setDocumentRoot(String documentRoot) {
  338.         this.documentRoot = documentRoot;
  339.         return this;
  340.     }

  341.     /**
  342.      * Get the dataToExtract property: Specifies the data to extract from Azure blob storage and tells the indexer which
  343.      * data to extract from image content when "imageAction" is set to a value other than "none". This applies to
  344.      * embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs.
  345.      *
  346.      * @return the dataToExtract value.
  347.      */
  348.     public BlobIndexerDataToExtract getDataToExtract() {
  349.         return this.dataToExtract;
  350.     }

  351.     /**
  352.      * Set the dataToExtract property: Specifies the data to extract from Azure blob storage and tells the indexer which
  353.      * data to extract from image content when "imageAction" is set to a value other than "none". This applies to
  354.      * embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs.
  355.      *
  356.      * @param dataToExtract the dataToExtract value to set.
  357.      * @return the IndexingParametersConfiguration object itself.
  358.      */
  359.     public IndexingParametersConfiguration setDataToExtract(BlobIndexerDataToExtract dataToExtract) {
  360.         this.dataToExtract = dataToExtract;
  361.         return this;
  362.     }

  363.     /**
  364.      * Get the imageAction property: Determines how to process embedded images and image files in Azure blob storage.
  365.      * Setting the "imageAction" configuration to any value other than "none" requires that a skillset also be attached
  366.      * to that indexer.
  367.      *
  368.      * @return the imageAction value.
  369.      */
  370.     public BlobIndexerImageAction getImageAction() {
  371.         return this.imageAction;
  372.     }

  373.     /**
  374.      * Set the imageAction property: Determines how to process embedded images and image files in Azure blob storage.
  375.      * Setting the "imageAction" configuration to any value other than "none" requires that a skillset also be attached
  376.      * to that indexer.
  377.      *
  378.      * @param imageAction the imageAction value to set.
  379.      * @return the IndexingParametersConfiguration object itself.
  380.      */
  381.     public IndexingParametersConfiguration setImageAction(BlobIndexerImageAction imageAction) {
  382.         this.imageAction = imageAction;
  383.         return this;
  384.     }

  385.     /**
  386.      * Get the allowSkillsetToReadFileData property: If true, will create a path //document//file_data that is an object
  387.      * representing the original file data downloaded from your blob data source. This allows you to pass the original
  388.      * file data to a custom skill for processing within the enrichment pipeline, or to the Document Extraction skill.
  389.      *
  390.      * @return the allowSkillsetToReadFileData value.
  391.      */
  392.     public Boolean isAllowSkillsetToReadFileData() {
  393.         return this.allowSkillsetToReadFileData;
  394.     }

  395.     /**
  396.      * Set the allowSkillsetToReadFileData property: If true, will create a path //document//file_data that is an object
  397.      * representing the original file data downloaded from your blob data source. This allows you to pass the original
  398.      * file data to a custom skill for processing within the enrichment pipeline, or to the Document Extraction skill.
  399.      *
  400.      * @param allowSkillsetToReadFileData the allowSkillsetToReadFileData value to set.
  401.      * @return the IndexingParametersConfiguration object itself.
  402.      */
  403.     public IndexingParametersConfiguration setAllowSkillsetToReadFileData(Boolean allowSkillsetToReadFileData) {
  404.         this.allowSkillsetToReadFileData = allowSkillsetToReadFileData;
  405.         return this;
  406.     }

  407.     /**
  408.      * Get the pdfTextRotationAlgorithm property: Determines algorithm for text extraction from PDF files in Azure blob
  409.      * storage.
  410.      *
  411.      * @return the pdfTextRotationAlgorithm value.
  412.      */
  413.     public BlobIndexerPdfTextRotationAlgorithm getPdfTextRotationAlgorithm() {
  414.         return this.pdfTextRotationAlgorithm;
  415.     }

  416.     /**
  417.      * Set the pdfTextRotationAlgorithm property: Determines algorithm for text extraction from PDF files in Azure blob
  418.      * storage.
  419.      *
  420.      * @param pdfTextRotationAlgorithm the pdfTextRotationAlgorithm value to set.
  421.      * @return the IndexingParametersConfiguration object itself.
  422.      */
  423.     public IndexingParametersConfiguration setPdfTextRotationAlgorithm(
  424.             BlobIndexerPdfTextRotationAlgorithm pdfTextRotationAlgorithm) {
  425.         this.pdfTextRotationAlgorithm = pdfTextRotationAlgorithm;
  426.         return this;
  427.     }

  428.     /**
  429.      * Get the executionEnvironment property: Specifies the environment in which the indexer should execute.
  430.      *
  431.      * @return the executionEnvironment value.
  432.      */
  433.     public IndexerExecutionEnvironment getExecutionEnvironment() {
  434.         return this.executionEnvironment;
  435.     }

  436.     /**
  437.      * Set the executionEnvironment property: Specifies the environment in which the indexer should execute.
  438.      *
  439.      * @param executionEnvironment the executionEnvironment value to set.
  440.      * @return the IndexingParametersConfiguration object itself.
  441.      */
  442.     public IndexingParametersConfiguration setExecutionEnvironment(IndexerExecutionEnvironment executionEnvironment) {
  443.         this.executionEnvironment = executionEnvironment;
  444.         return this;
  445.     }

  446.     /**
  447.      * Get the queryTimeout property: Increases the timeout beyond the 5-minute default for Azure SQL database data
  448.      * sources, specified in the format "hh:mm:ss".
  449.      *
  450.      * @return the queryTimeout value.
  451.      */
  452.     public String getQueryTimeout() {
  453.         return this.queryTimeout;
  454.     }

  455.     /**
  456.      * Set the queryTimeout property: Increases the timeout beyond the 5-minute default for Azure SQL database data
  457.      * sources, specified in the format "hh:mm:ss".
  458.      *
  459.      * @param queryTimeout the queryTimeout value to set.
  460.      * @return the IndexingParametersConfiguration object itself.
  461.      */
  462.     public IndexingParametersConfiguration setQueryTimeout(String queryTimeout) {
  463.         this.queryTimeout = queryTimeout;
  464.         return this;
  465.     }

  466.     /**
  467.      * Get the additionalProperties property: A dictionary of indexer-specific configuration properties. Each name is
  468.      * the name of a specific property. Each value must be of a primitive type.
  469.      *
  470.      * @return the additionalProperties value.
  471.      */
  472.     @JsonAnyGetter
  473.     public Map<String, Object> getAdditionalProperties() {
  474.         return this.additionalProperties;
  475.     }

  476.     /**
  477.      * Set the additionalProperties property: A dictionary of indexer-specific configuration properties. Each name is
  478.      * the name of a specific property. Each value must be of a primitive type.
  479.      *
  480.      * @param additionalProperties the additionalProperties value to set.
  481.      * @return the IndexingParametersConfiguration object itself.
  482.      */
  483.     public IndexingParametersConfiguration setAdditionalProperties(Map<String, Object> additionalProperties) {
  484.         this.additionalProperties = additionalProperties;
  485.         return this;
  486.     }

  487.     @JsonAnySetter
  488.     void setAdditionalProperties(String key, Object value) {
  489.         if (additionalProperties == null) {
  490.             additionalProperties = new HashMap<>();
  491.         }
  492.         additionalProperties.put(key, value);
  493.     }
  494. }