LexicalNormalizer.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.JsonSubTypes;
  12. import com.fasterxml.jackson.annotation.JsonTypeInfo;
  13. import com.fasterxml.jackson.annotation.JsonTypeName;

  14. /** Base type for normalizers. */
  15. @JsonTypeInfo(
  16.         use = JsonTypeInfo.Id.NAME,
  17.         include = JsonTypeInfo.As.PROPERTY,
  18.         property = "@odata.type",
  19.         defaultImpl = LexicalNormalizer.class,
  20.         visible = true)
  21. @JsonTypeName("LexicalNormalizer")
  22. @JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Azure.Search.CustomNormalizer", value = CustomNormalizer.class)})
  23. @Fluent
  24. public class LexicalNormalizer {
  25.     /*
  26.      * The name of the normalizer. It must only contain letters, digits,
  27.      * spaces, dashes or underscores, can only start and end with alphanumeric
  28.      * characters, and is limited to 128 characters. It cannot end in
  29.      * '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard',
  30.      * 'lowercase', 'uppercase', or 'elision'.
  31.      */
  32.     @JsonProperty(value = "name", required = true)
  33.     private String name;

  34.     /**
  35.      * Creates an instance of LexicalNormalizer class.
  36.      *
  37.      * @param name the name value to set.
  38.      */
  39.     @JsonCreator
  40.     public LexicalNormalizer(@JsonProperty(value = "name", required = true) String name) {
  41.         this.name = name;
  42.     }

  43.     /**
  44.      * Get the name property: The name of the normalizer. It must only contain letters, digits, spaces, dashes or
  45.      * underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end
  46.      * in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'.
  47.      *
  48.      * @return the name value.
  49.      */
  50.     public String getName() {
  51.         return this.name;
  52.     }
  53. }