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

com.algolia.search.models.rules.Rule Maven / Gradle / Ivy

The newest version!
package com.algolia.search.models.rules;

import com.fasterxml.jackson.annotation.JsonInclude;
import java.io.Serializable;
import java.util.List;

/**
 * Query Rules allows performing pre- and post-processing on queries matching specific patterns.
 *
 * @see Algolia.com
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Rule implements Serializable {

  private String objectID;
  private Condition condition;
  private List conditions;
  private Consequence consequence;
  private String description;
  private Boolean enabled;
  private List validity;

  // For serialization
  public Rule() {}

  public String getObjectID() {
    return objectID;
  }

  public Rule setObjectID(String objectID) {
    this.objectID = objectID;
    return this;
  }

  @Deprecated
  public Condition getCondition() {
    return condition;
  }

  @Deprecated
  public Rule setCondition(Condition condition) {
    this.condition = condition;
    return this;
  }

  public List getConditions() {
    return conditions;
  }

  public Rule setConditions(List conditions) {
    this.conditions = conditions;
    return this;
  }

  public Consequence getConsequence() {
    return consequence;
  }

  public Rule setConsequence(Consequence consequence) {
    this.consequence = consequence;
    return this;
  }

  public String getDescription() {
    return description;
  }

  public Rule setDescription(String description) {
    this.description = description;
    return this;
  }

  public Boolean getEnabled() {
    return enabled;
  }

  public Rule setEnabled(Boolean enabled) {
    this.enabled = enabled;
    return this;
  }

  public List getValidity() {
    return validity;
  }

  public Rule setValidity(List validity) {
    this.validity = validity;
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy