Class FieldMappingFunction

java.lang.Object
com.azure.search.documents.indexes.models.FieldMappingFunction
All Implemented Interfaces:
com.azure.json.JsonSerializable<FieldMappingFunction>

public final class FieldMappingFunction extends Object implements com.azure.json.JsonSerializable<FieldMappingFunction>
Represents a function that transforms a value from a data source before indexing.
  • Constructor Details

    • FieldMappingFunction

      public FieldMappingFunction(String name)
      Creates an instance of FieldMappingFunction class.
      Parameters:
      name - the name value to set.
  • Method Details

    • getName

      public String getName()
      Get the name property: The name of the field mapping function.
      Returns:
      the name value.
    • getParameters

      public Map<String,Object> getParameters()
      Get the parameters property: A dictionary of parameter name/value pairs to pass to the function. Each value must be of a primitive type.
      Returns:
      the parameters value.
    • setParameters

      public FieldMappingFunction setParameters(Map<String,Object> parameters)
      Set the parameters property: A dictionary of parameter name/value pairs to pass to the function. Each value must be of a primitive type.
      Parameters:
      parameters - the parameters value to set.
      Returns:
      the FieldMappingFunction object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<FieldMappingFunction>
      Throws:
      IOException
    • fromJson

      public static FieldMappingFunction fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of FieldMappingFunction from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of FieldMappingFunction if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the FieldMappingFunction.