SemanticConfiguration.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. /** Defines a specific configuration to be used in the context of semantic capabilities. */
  12. @Fluent
  13. public final class SemanticConfiguration {
  14.     /*
  15.      * The name of the semantic configuration.
  16.      */
  17.     @JsonProperty(value = "name", required = true)
  18.     private String name;

  19.     /*
  20.      * Describes the title, content, and keyword fields to be used for semantic
  21.      * ranking, captions, highlights, and answers. At least one of the three
  22.      * sub properties (titleField, prioritizedKeywordsFields and
  23.      * prioritizedContentFields) need to be set.
  24.      */
  25.     @JsonProperty(value = "prioritizedFields", required = true)
  26.     private PrioritizedFields prioritizedFields;

  27.     /**
  28.      * Creates an instance of SemanticConfiguration class.
  29.      *
  30.      * @param name the name value to set.
  31.      * @param prioritizedFields the prioritizedFields value to set.
  32.      */
  33.     @JsonCreator
  34.     public SemanticConfiguration(
  35.             @JsonProperty(value = "name", required = true) String name,
  36.             @JsonProperty(value = "prioritizedFields", required = true) PrioritizedFields prioritizedFields) {
  37.         this.name = name;
  38.         this.prioritizedFields = prioritizedFields;
  39.     }

  40.     /**
  41.      * Get the name property: The name of the semantic configuration.
  42.      *
  43.      * @return the name value.
  44.      */
  45.     public String getName() {
  46.         return this.name;
  47.     }

  48.     /**
  49.      * Get the prioritizedFields property: Describes the title, content, and keyword fields to be used for semantic
  50.      * ranking, captions, highlights, and answers. At least one of the three sub properties (titleField,
  51.      * prioritizedKeywordsFields and prioritizedContentFields) need to be set.
  52.      *
  53.      * @return the prioritizedFields value.
  54.      */
  55.     public PrioritizedFields getPrioritizedFields() {
  56.         return this.prioritizedFields;
  57.     }
  58. }