All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.api.model.Bias Maven / Gradle / Ivy

There is a newer version: 198
Show newest version
package com.groupbyinc.api.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;

/**
 * 
 * A bias specifies a field and value to match in a search. If a record matches the bias,
 * the position of the record in the page of results is adjusted based on the strength provided.
 * 
 */
public class Bias {

  public enum Strength {
    Absolute_Increase,
    Strong_Increase,
    Medium_Increase,
    Weak_Increase,
    Leave_Unchanged,
    Weak_Decrease,
    Medium_Decrease,
    Strong_Decrease,
    Absolute_Decrease
  }

  private String name;
  private String content;

  @JsonProperty private Strength strength;

  /**
   * @return The name of the field to bias on
   */
  public String getName() {
    return name;
  }

  /**
   * 
   * Set the field name to bias on
   * 
   *
   * @param name
   *         The name of the field to bias on
   */
  public com.groupbyinc.api.model.Bias setName(String name) {
    this.name = name;
    return this;
  }

  /**
   * @return The value of the field to bias on
   */
  public String getContent() {
    return content;
  }

  /**
   * 
   * Set the field name to bias on
   * 
   *
   * @param content
   *         The value of the field to bias on
   */
  public com.groupbyinc.api.model.Bias setContent(String content) {
    this.content = content;
    return this;
  }

  /**
   * @return The strength of the bias
   */
  public Strength getStrength() {
    return strength;
  }

  /**
   * 
   * Set the field name to bias on
   * 
   *
   * @param strength
   *         The strength of the bias, if applied
   */
  @JsonSetter
  public com.groupbyinc.api.model.Bias setStrength(String strength) {
    this.strength = Strength.valueOf(strength);
    return this;
  }

  @JsonIgnore
  public com.groupbyinc.api.model.Bias setStrength(Strength strength) {
    this.strength = strength;
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy