DocumentExtractionSkill.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.JsonCreator;
  10. import com.fasterxml.jackson.annotation.JsonProperty;
  11. import com.fasterxml.jackson.annotation.JsonTypeId;
  12. import com.fasterxml.jackson.annotation.JsonTypeInfo;
  13. import com.fasterxml.jackson.annotation.JsonTypeName;
  14. import java.util.List;
  15. import java.util.Map;

  16. /** A skill that extracts content from a file within the enrichment pipeline. */
  17. @JsonTypeInfo(
  18.         use = JsonTypeInfo.Id.NAME,
  19.         include = JsonTypeInfo.As.EXISTING_PROPERTY,
  20.         property = "@odata.type",
  21.         visible = true)
  22. @JsonTypeName("#Microsoft.Skills.Util.DocumentExtractionSkill")
  23. @Fluent
  24. public final class DocumentExtractionSkill extends SearchIndexerSkill {

  25.     /*
  26.      * Identifies the concrete type of the skill.
  27.      */
  28.     @JsonTypeId
  29.     @JsonProperty(value = "@odata.type", required = true)
  30.     private String odataType = "#Microsoft.Skills.Util.DocumentExtractionSkill";

  31.     /*
  32.      * The parsingMode for the skill. Will be set to 'default' if not defined.
  33.      */
  34.     @JsonProperty(value = "parsingMode")
  35.     private String parsingMode;

  36.     /*
  37.      * The type of data to be extracted for the skill. Will be set to
  38.      * 'contentAndMetadata' if not defined.
  39.      */
  40.     @JsonProperty(value = "dataToExtract")
  41.     private String dataToExtract;

  42.     /*
  43.      * A dictionary of configurations for the skill.
  44.      */
  45.     @JsonProperty(value = "configuration")
  46.     private Map<String, Object> configuration;

  47.     /**
  48.      * Creates an instance of DocumentExtractionSkill class.
  49.      *
  50.      * @param inputs the inputs value to set.
  51.      * @param outputs the outputs value to set.
  52.      */
  53.     @JsonCreator
  54.     public DocumentExtractionSkill(
  55.             @JsonProperty(value = "inputs", required = true) List<InputFieldMappingEntry> inputs,
  56.             @JsonProperty(value = "outputs", required = true) List<OutputFieldMappingEntry> outputs) {
  57.         super(inputs, outputs);
  58.     }

  59.     /**
  60.      * Get the parsingMode property: The parsingMode for the skill. Will be set to 'default' if not defined.
  61.      *
  62.      * @return the parsingMode value.
  63.      */
  64.     public String getParsingMode() {
  65.         return this.parsingMode;
  66.     }

  67.     /**
  68.      * Set the parsingMode property: The parsingMode for the skill. Will be set to 'default' if not defined.
  69.      *
  70.      * @param parsingMode the parsingMode value to set.
  71.      * @return the DocumentExtractionSkill object itself.
  72.      */
  73.     public DocumentExtractionSkill setParsingMode(String parsingMode) {
  74.         this.parsingMode = parsingMode;
  75.         return this;
  76.     }

  77.     /**
  78.      * Get the dataToExtract property: The type of data to be extracted for the skill. Will be set to
  79.      * 'contentAndMetadata' if not defined.
  80.      *
  81.      * @return the dataToExtract value.
  82.      */
  83.     public String getDataToExtract() {
  84.         return this.dataToExtract;
  85.     }

  86.     /**
  87.      * Set the dataToExtract property: The type of data to be extracted for the skill. Will be set to
  88.      * 'contentAndMetadata' if not defined.
  89.      *
  90.      * @param dataToExtract the dataToExtract value to set.
  91.      * @return the DocumentExtractionSkill object itself.
  92.      */
  93.     public DocumentExtractionSkill setDataToExtract(String dataToExtract) {
  94.         this.dataToExtract = dataToExtract;
  95.         return this;
  96.     }

  97.     /**
  98.      * Get the configuration property: A dictionary of configurations for the skill.
  99.      *
  100.      * @return the configuration value.
  101.      */
  102.     public Map<String, Object> getConfiguration() {
  103.         return this.configuration;
  104.     }

  105.     /**
  106.      * Set the configuration property: A dictionary of configurations for the skill.
  107.      *
  108.      * @param configuration the configuration value to set.
  109.      * @return the DocumentExtractionSkill object itself.
  110.      */
  111.     public DocumentExtractionSkill setConfiguration(Map<String, Object> configuration) {
  112.         this.configuration = configuration;
  113.         return this;
  114.     }
  115. }