LanguageDetectionSkill.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. /**
  16.  * A skill that detects the language of input text and reports a single language code for every document submitted on
  17.  * the request. The language code is paired with a score indicating the confidence of the analysis.
  18.  */
  19. @JsonTypeInfo(
  20.         use = JsonTypeInfo.Id.NAME,
  21.         include = JsonTypeInfo.As.EXISTING_PROPERTY,
  22.         property = "@odata.type",
  23.         visible = true)
  24. @JsonTypeName("#Microsoft.Skills.Text.LanguageDetectionSkill")
  25. @Fluent
  26. public final class LanguageDetectionSkill extends SearchIndexerSkill {

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

  33.     /*
  34.      * A country code to use as a hint to the language detection model if it
  35.      * cannot disambiguate the language.
  36.      */
  37.     @JsonProperty(value = "defaultCountryHint")
  38.     private String defaultCountryHint;

  39.     /*
  40.      * The version of the model to use when calling the Text Analytics service.
  41.      * It will default to the latest available when not specified. We recommend
  42.      * you do not specify this value unless absolutely necessary.
  43.      */
  44.     @JsonProperty(value = "modelVersion")
  45.     private String modelVersion;

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

  58.     /**
  59.      * Get the defaultCountryHint property: A country code to use as a hint to the language detection model if it cannot
  60.      * disambiguate the language.
  61.      *
  62.      * @return the defaultCountryHint value.
  63.      */
  64.     public String getDefaultCountryHint() {
  65.         return this.defaultCountryHint;
  66.     }

  67.     /**
  68.      * Set the defaultCountryHint property: A country code to use as a hint to the language detection model if it cannot
  69.      * disambiguate the language.
  70.      *
  71.      * @param defaultCountryHint the defaultCountryHint value to set.
  72.      * @return the LanguageDetectionSkill object itself.
  73.      */
  74.     public LanguageDetectionSkill setDefaultCountryHint(String defaultCountryHint) {
  75.         this.defaultCountryHint = defaultCountryHint;
  76.         return this;
  77.     }

  78.     /**
  79.      * Get the modelVersion property: The version of the model to use when calling the Text Analytics service. It will
  80.      * default to the latest available when not specified. We recommend you do not specify this value unless absolutely
  81.      * necessary.
  82.      *
  83.      * @return the modelVersion value.
  84.      */
  85.     public String getModelVersion() {
  86.         return this.modelVersion;
  87.     }

  88.     /**
  89.      * Set the modelVersion property: The version of the model to use when calling the Text Analytics service. It will
  90.      * default to the latest available when not specified. We recommend you do not specify this value unless absolutely
  91.      * necessary.
  92.      *
  93.      * @param modelVersion the modelVersion value to set.
  94.      * @return the LanguageDetectionSkill object itself.
  95.      */
  96.     public LanguageDetectionSkill setModelVersion(String modelVersion) {
  97.         this.modelVersion = modelVersion;
  98.         return this;
  99.     }
  100. }