KeyPhraseExtractionSkill.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. /** A skill that uses text analytics for key phrase extraction. */
  16. @JsonTypeInfo(
  17.         use = JsonTypeInfo.Id.NAME,
  18.         include = JsonTypeInfo.As.EXISTING_PROPERTY,
  19.         property = "@odata.type",
  20.         visible = true)
  21. @JsonTypeName("#Microsoft.Skills.Text.KeyPhraseExtractionSkill")
  22. @Fluent
  23. public final class KeyPhraseExtractionSkill extends SearchIndexerSkill {

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

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

  35.     /*
  36.      * A number indicating how many key phrases to return. If absent, all
  37.      * identified key phrases will be returned.
  38.      */
  39.     @JsonProperty(value = "maxKeyPhraseCount")
  40.     private Integer maxKeyPhraseCount;

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

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

  60.     /**
  61.      * Get the defaultLanguageCode property: A value indicating which language code to use. Default is en.
  62.      *
  63.      * @return the defaultLanguageCode value.
  64.      */
  65.     public KeyPhraseExtractionSkillLanguage getDefaultLanguageCode() {
  66.         return this.defaultLanguageCode;
  67.     }

  68.     /**
  69.      * Set the defaultLanguageCode property: A value indicating which language code to use. Default is en.
  70.      *
  71.      * @param defaultLanguageCode the defaultLanguageCode value to set.
  72.      * @return the KeyPhraseExtractionSkill object itself.
  73.      */
  74.     public KeyPhraseExtractionSkill setDefaultLanguageCode(KeyPhraseExtractionSkillLanguage defaultLanguageCode) {
  75.         this.defaultLanguageCode = defaultLanguageCode;
  76.         return this;
  77.     }

  78.     /**
  79.      * Get the maxKeyPhraseCount property: A number indicating how many key phrases to return. If absent, all identified
  80.      * key phrases will be returned.
  81.      *
  82.      * @return the maxKeyPhraseCount value.
  83.      */
  84.     public Integer getMaxKeyPhraseCount() {
  85.         return this.maxKeyPhraseCount;
  86.     }

  87.     /**
  88.      * Set the maxKeyPhraseCount property: A number indicating how many key phrases to return. If absent, all identified
  89.      * key phrases will be returned.
  90.      *
  91.      * @param maxKeyPhraseCount the maxKeyPhraseCount value to set.
  92.      * @return the KeyPhraseExtractionSkill object itself.
  93.      */
  94.     public KeyPhraseExtractionSkill setMaxKeyPhraseCount(Integer maxKeyPhraseCount) {
  95.         this.maxKeyPhraseCount = maxKeyPhraseCount;
  96.         return this;
  97.     }

  98.     /**
  99.      * Get the modelVersion property: The version of the model to use when calling the Text Analytics service. It will
  100.      * default to the latest available when not specified. We recommend you do not specify this value unless absolutely
  101.      * necessary.
  102.      *
  103.      * @return the modelVersion value.
  104.      */
  105.     public String getModelVersion() {
  106.         return this.modelVersion;
  107.     }

  108.     /**
  109.      * Set the modelVersion property: The version of the model to use when calling the Text Analytics service. It will
  110.      * default to the latest available when not specified. We recommend you do not specify this value unless absolutely
  111.      * necessary.
  112.      *
  113.      * @param modelVersion the modelVersion value to set.
  114.      * @return the KeyPhraseExtractionSkill object itself.
  115.      */
  116.     public KeyPhraseExtractionSkill setModelVersion(String modelVersion) {
  117.         this.modelVersion = modelVersion;
  118.         return this;
  119.     }
  120. }