StopAnalyzer.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. /**
  17.  * Divides text at non-letters; Applies the lowercase and stopword token filters. This analyzer is implemented using
  18.  * Apache Lucene.
  19.  */
  20. @JsonTypeInfo(
  21.         use = JsonTypeInfo.Id.NAME,
  22.         include = JsonTypeInfo.As.EXISTING_PROPERTY,
  23.         property = "@odata.type",
  24.         visible = true)
  25. @JsonTypeName("#Microsoft.Azure.Search.StopAnalyzer")
  26. @Fluent
  27. public final class StopAnalyzer extends LexicalAnalyzer {

  28.     /*
  29.      * Identifies the concrete type of the analyzer.
  30.      */
  31.     @JsonTypeId
  32.     @JsonProperty(value = "@odata.type", required = true)
  33.     private String odataType = "#Microsoft.Azure.Search.StopAnalyzer";

  34.     /*
  35.      * A list of stopwords.
  36.      */
  37.     @JsonProperty(value = "stopwords")
  38.     private List<String> stopwords;

  39.     /**
  40.      * Creates an instance of StopAnalyzer class.
  41.      *
  42.      * @param name the name value to set.
  43.      */
  44.     @JsonCreator
  45.     public StopAnalyzer(@JsonProperty(value = "name", required = true) String name) {
  46.         super(name);
  47.     }

  48.     /**
  49.      * Get the stopwords property: A list of stopwords.
  50.      *
  51.      * @return the stopwords value.
  52.      */
  53.     public List<String> getStopwords() {
  54.         return this.stopwords;
  55.     }

  56.     /**
  57.      * Set the stopwords property: A list of stopwords.
  58.      *
  59.      * @param stopwords the stopwords value to set.
  60.      * @return the StopAnalyzer object itself.
  61.      */
  62.     @JsonSetter
  63.     public StopAnalyzer setStopwords(List<String> stopwords) {
  64.         this.stopwords = stopwords;
  65.         return this;
  66.     }

  67.     /**
  68.      * Set the stopwords property: A list of stopwords.
  69.      *
  70.      * @param stopwords the stopwords value to set.
  71.      * @return the StopAnalyzer object itself.
  72.      */
  73.     public StopAnalyzer setStopwords(String... stopwords) {
  74.         this.stopwords = (stopwords == null) ? null : java.util.Arrays.asList(stopwords);
  75.         return this;
  76.     }
  77. }