FieldMappingFunction.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 java.util.Map;

  12. /** Represents a function that transforms a value from a data source before indexing. */
  13. @Fluent
  14. public final class FieldMappingFunction {
  15.     /*
  16.      * The name of the field mapping function.
  17.      */
  18.     @JsonProperty(value = "name", required = true)
  19.     private String name;

  20.     /*
  21.      * A dictionary of parameter name/value pairs to pass to the function. Each
  22.      * value must be of a primitive type.
  23.      */
  24.     @JsonProperty(value = "parameters")
  25.     private Map<String, Object> parameters;

  26.     /**
  27.      * Creates an instance of FieldMappingFunction class.
  28.      *
  29.      * @param name the name value to set.
  30.      */
  31.     @JsonCreator
  32.     public FieldMappingFunction(@JsonProperty(value = "name", required = true) String name) {
  33.         this.name = name;
  34.     }

  35.     /**
  36.      * Get the name property: The name of the field mapping function.
  37.      *
  38.      * @return the name value.
  39.      */
  40.     public String getName() {
  41.         return this.name;
  42.     }

  43.     /**
  44.      * Get the parameters property: A dictionary of parameter name/value pairs to pass to the function. Each value must
  45.      * be of a primitive type.
  46.      *
  47.      * @return the parameters value.
  48.      */
  49.     public Map<String, Object> getParameters() {
  50.         return this.parameters;
  51.     }

  52.     /**
  53.      * Set the parameters property: A dictionary of parameter name/value pairs to pass to the function. Each value must
  54.      * be of a primitive type.
  55.      *
  56.      * @param parameters the parameters value to set.
  57.      * @return the FieldMappingFunction object itself.
  58.      */
  59.     public FieldMappingFunction setParameters(Map<String, Object> parameters) {
  60.         this.parameters = parameters;
  61.         return this;
  62.     }
  63. }