CustomEntityLookupSkill.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.JsonSetter;
  12. import com.fasterxml.jackson.annotation.JsonTypeId;
  13. import com.fasterxml.jackson.annotation.JsonTypeInfo;
  14. import com.fasterxml.jackson.annotation.JsonTypeName;
  15. import java.util.List;

  16. /** A skill looks for text from a custom, user-defined list of words and phrases. */
  17. @JsonTypeInfo(
  18.         use = JsonTypeInfo.Id.NAME,
  19.         include = JsonTypeInfo.As.EXISTING_PROPERTY,
  20.         property = "@odata.type",
  21.         visible = true)
  22. @JsonTypeName("#Microsoft.Skills.Text.CustomEntityLookupSkill")
  23. @Fluent
  24. public final class CustomEntityLookupSkill 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.Text.CustomEntityLookupSkill";

  31.     /*
  32.      * A value indicating which language code to use. Default is en.
  33.      */
  34.     @JsonProperty(value = "defaultLanguageCode")
  35.     private CustomEntityLookupSkillLanguage defaultLanguageCode;

  36.     /*
  37.      * Path to a JSON or CSV file containing all the target text to match
  38.      * against. This entity definition is read at the beginning of an indexer
  39.      * run. Any updates to this file during an indexer run will not take effect
  40.      * until subsequent runs. This config must be accessible over HTTPS.
  41.      */
  42.     @JsonProperty(value = "entitiesDefinitionUri")
  43.     private String entitiesDefinitionUri;

  44.     /*
  45.      * The inline CustomEntity definition.
  46.      */
  47.     @JsonProperty(value = "inlineEntitiesDefinition")
  48.     private List<CustomEntity> inlineEntitiesDefinition;

  49.     /*
  50.      * A global flag for CaseSensitive. If CaseSensitive is not set in
  51.      * CustomEntity, this value will be the default value.
  52.      */
  53.     @JsonProperty(value = "globalDefaultCaseSensitive")
  54.     private Boolean globalDefaultCaseSensitive;

  55.     /*
  56.      * A global flag for AccentSensitive. If AccentSensitive is not set in
  57.      * CustomEntity, this value will be the default value.
  58.      */
  59.     @JsonProperty(value = "globalDefaultAccentSensitive")
  60.     private Boolean globalDefaultAccentSensitive;

  61.     /*
  62.      * A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in
  63.      * CustomEntity, this value will be the default value.
  64.      */
  65.     @JsonProperty(value = "globalDefaultFuzzyEditDistance")
  66.     private Integer globalDefaultFuzzyEditDistance;

  67.     /**
  68.      * Creates an instance of CustomEntityLookupSkill class.
  69.      *
  70.      * @param inputs the inputs value to set.
  71.      * @param outputs the outputs value to set.
  72.      */
  73.     @JsonCreator
  74.     public CustomEntityLookupSkill(
  75.             @JsonProperty(value = "inputs", required = true) List<InputFieldMappingEntry> inputs,
  76.             @JsonProperty(value = "outputs", required = true) List<OutputFieldMappingEntry> outputs) {
  77.         super(inputs, outputs);
  78.     }

  79.     /**
  80.      * Get the defaultLanguageCode property: A value indicating which language code to use. Default is en.
  81.      *
  82.      * @return the defaultLanguageCode value.
  83.      */
  84.     public CustomEntityLookupSkillLanguage getDefaultLanguageCode() {
  85.         return this.defaultLanguageCode;
  86.     }

  87.     /**
  88.      * Set the defaultLanguageCode property: A value indicating which language code to use. Default is en.
  89.      *
  90.      * @param defaultLanguageCode the defaultLanguageCode value to set.
  91.      * @return the CustomEntityLookupSkill object itself.
  92.      */
  93.     public CustomEntityLookupSkill setDefaultLanguageCode(CustomEntityLookupSkillLanguage defaultLanguageCode) {
  94.         this.defaultLanguageCode = defaultLanguageCode;
  95.         return this;
  96.     }

  97.     /**
  98.      * Get the entitiesDefinitionUri property: Path to a JSON or CSV file containing all the target text to match
  99.      * against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an
  100.      * indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS.
  101.      *
  102.      * @return the entitiesDefinitionUri value.
  103.      */
  104.     public String getEntitiesDefinitionUri() {
  105.         return this.entitiesDefinitionUri;
  106.     }

  107.     /**
  108.      * Set the entitiesDefinitionUri property: Path to a JSON or CSV file containing all the target text to match
  109.      * against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an
  110.      * indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS.
  111.      *
  112.      * @param entitiesDefinitionUri the entitiesDefinitionUri value to set.
  113.      * @return the CustomEntityLookupSkill object itself.
  114.      */
  115.     public CustomEntityLookupSkill setEntitiesDefinitionUri(String entitiesDefinitionUri) {
  116.         this.entitiesDefinitionUri = entitiesDefinitionUri;
  117.         return this;
  118.     }

  119.     /**
  120.      * Get the inlineEntitiesDefinition property: The inline CustomEntity definition.
  121.      *
  122.      * @return the inlineEntitiesDefinition value.
  123.      */
  124.     public List<CustomEntity> getInlineEntitiesDefinition() {
  125.         return this.inlineEntitiesDefinition;
  126.     }

  127.     /**
  128.      * Set the inlineEntitiesDefinition property: The inline CustomEntity definition.
  129.      *
  130.      * @param inlineEntitiesDefinition the inlineEntitiesDefinition value to set.
  131.      * @return the CustomEntityLookupSkill object itself.
  132.      */
  133.     @JsonSetter
  134.     public CustomEntityLookupSkill setInlineEntitiesDefinition(List<CustomEntity> inlineEntitiesDefinition) {
  135.         this.inlineEntitiesDefinition = inlineEntitiesDefinition;
  136.         return this;
  137.     }

  138.     /**
  139.      * Get the globalDefaultCaseSensitive property: A global flag for CaseSensitive. If CaseSensitive is not set in
  140.      * CustomEntity, this value will be the default value.
  141.      *
  142.      * @return the globalDefaultCaseSensitive value.
  143.      */
  144.     public Boolean isGlobalDefaultCaseSensitive() {
  145.         return this.globalDefaultCaseSensitive;
  146.     }

  147.     /**
  148.      * Set the globalDefaultCaseSensitive property: A global flag for CaseSensitive. If CaseSensitive is not set in
  149.      * CustomEntity, this value will be the default value.
  150.      *
  151.      * @param globalDefaultCaseSensitive the globalDefaultCaseSensitive value to set.
  152.      * @return the CustomEntityLookupSkill object itself.
  153.      */
  154.     public CustomEntityLookupSkill setGlobalDefaultCaseSensitive(Boolean globalDefaultCaseSensitive) {
  155.         this.globalDefaultCaseSensitive = globalDefaultCaseSensitive;
  156.         return this;
  157.     }

  158.     /**
  159.      * Get the globalDefaultAccentSensitive property: A global flag for AccentSensitive. If AccentSensitive is not set
  160.      * in CustomEntity, this value will be the default value.
  161.      *
  162.      * @return the globalDefaultAccentSensitive value.
  163.      */
  164.     public Boolean isGlobalDefaultAccentSensitive() {
  165.         return this.globalDefaultAccentSensitive;
  166.     }

  167.     /**
  168.      * Set the globalDefaultAccentSensitive property: A global flag for AccentSensitive. If AccentSensitive is not set
  169.      * in CustomEntity, this value will be the default value.
  170.      *
  171.      * @param globalDefaultAccentSensitive the globalDefaultAccentSensitive value to set.
  172.      * @return the CustomEntityLookupSkill object itself.
  173.      */
  174.     public CustomEntityLookupSkill setGlobalDefaultAccentSensitive(Boolean globalDefaultAccentSensitive) {
  175.         this.globalDefaultAccentSensitive = globalDefaultAccentSensitive;
  176.         return this;
  177.     }

  178.     /**
  179.      * Get the globalDefaultFuzzyEditDistance property: A global flag for FuzzyEditDistance. If FuzzyEditDistance is not
  180.      * set in CustomEntity, this value will be the default value.
  181.      *
  182.      * @return the globalDefaultFuzzyEditDistance value.
  183.      */
  184.     public Integer getGlobalDefaultFuzzyEditDistance() {
  185.         return this.globalDefaultFuzzyEditDistance;
  186.     }

  187.     /**
  188.      * Set the globalDefaultFuzzyEditDistance property: A global flag for FuzzyEditDistance. If FuzzyEditDistance is not
  189.      * set in CustomEntity, this value will be the default value.
  190.      *
  191.      * @param globalDefaultFuzzyEditDistance the globalDefaultFuzzyEditDistance value to set.
  192.      * @return the CustomEntityLookupSkill object itself.
  193.      */
  194.     public CustomEntityLookupSkill setGlobalDefaultFuzzyEditDistance(Integer globalDefaultFuzzyEditDistance) {
  195.         this.globalDefaultFuzzyEditDistance = globalDefaultFuzzyEditDistance;
  196.         return this;
  197.     }

  198.     /**
  199.      * Set the inlineEntitiesDefinition property: The inline CustomEntity definition.
  200.      *
  201.      * @param inlineEntitiesDefinition the inlineEntitiesDefinition value to set.
  202.      * @return the CustomEntityLookupSkill object itself.
  203.      */
  204.     public CustomEntityLookupSkill setInlineEntitiesDefinition(CustomEntity... inlineEntitiesDefinition) {
  205.         this.inlineEntitiesDefinition =
  206.                 (inlineEntitiesDefinition == null) ? null : java.util.Arrays.asList(inlineEntitiesDefinition);
  207.         return this;
  208.     }
  209. }