/*
 * appNG REST API
 * The REST API for appNG
 *
 * OpenAPI spec version: 1.0.0
 * Contact: matthias.mueller@appng.org
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package org.appng.api.rest.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.appng.api.rest.model.OptionType;
import org.appng.api.rest.model.Options;
import java.io.Serializable;

/**
 * A filter that applies to a datasource.
 */
@ApiModel(description = "A filter that applies to a datasource.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-09-06T11:11:24.041+02:00")
public class Filter implements Serializable {
  private static final long serialVersionUID = 1L;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("label")
  private String label = null;

  @JsonProperty("type")
  private OptionType type = null;

  @JsonProperty("options")
  private Options options = null;

  public Filter name(String name) {
    this.name = name;
    return this;
  }

   /**
   * The name of the filter.
   * @return name
  **/
  @ApiModelProperty(value = "The name of the filter.")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Filter label(String label) {
    this.label = label;
    return this;
  }

   /**
   * The label iof the filter.
   * @return label
  **/
  @ApiModelProperty(value = "The label iof the filter.")
  public String getLabel() {
    return label;
  }

  public void setLabel(String label) {
    this.label = label;
  }

  public Filter type(OptionType type) {
    this.type = type;
    return this;
  }

   /**
   * The type of the filter.
   * @return type
  **/
  @ApiModelProperty(value = "The type of the filter.")
  public OptionType getType() {
    return type;
  }

  public void setType(OptionType type) {
    this.type = type;
  }

  public Filter options(Options options) {
    this.options = options;
    return this;
  }

   /**
   * The options for this filter.
   * @return options
  **/
  @ApiModelProperty(value = "The options for this filter.")
  public Options getOptions() {
    return options;
  }

  public void setOptions(Options options) {
    this.options = options;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Filter filter = (Filter) o;
    return Objects.equals(this.name, filter.name) &&
        Objects.equals(this.label, filter.label) &&
        Objects.equals(this.type, filter.type) &&
        Objects.equals(this.options, filter.options);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, label, type, options);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Filter {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    label: ").append(toIndentedString(label)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    options: ").append(toIndentedString(options)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

