/*
 * appNG REST API
 * The REST API for appNG
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: matthias.mueller@appng.org
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.appng.openapi.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.appng.openapi.model.Option;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * A set of selectable options
 */
@ApiModel(description = "A set of selectable options")
@JsonPropertyOrder({
  Options.JSON_PROPERTY_MULTIPLE,
  Options.JSON_PROPERTY_ENTRIES
})
@JsonTypeName("Options")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T11:11:26.226947+02:00[Europe/Berlin]")
public class Options {
  public static final String JSON_PROPERTY_MULTIPLE = "multiple";
  private Boolean multiple;

  public static final String JSON_PROPERTY_ENTRIES = "entries";
  private List<Option> entries = null;


  public Options multiple(Boolean multiple) {
    
    this.multiple = multiple;
    return this;
  }

   /**
   * Whether or not this filter allows multiple options to be selected.
   * @return multiple
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Whether or not this filter allows multiple options to be selected.")
  @JsonProperty(JSON_PROPERTY_MULTIPLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getMultiple() {
    return multiple;
  }


  @JsonProperty(JSON_PROPERTY_MULTIPLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMultiple(Boolean multiple) {
    this.multiple = multiple;
  }


  public Options entries(List<Option> entries) {
    
    this.entries = entries;
    return this;
  }

  public Options addEntriesItem(Option entriesItem) {
    if (this.entries == null) {
      this.entries = new ArrayList<>();
    }
    this.entries.add(entriesItem);
    return this;
  }

   /**
   * A list of options for this filter.
   * @return entries
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A list of options for this filter.")
  @JsonProperty(JSON_PROPERTY_ENTRIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<Option> getEntries() {
    return entries;
  }


  @JsonProperty(JSON_PROPERTY_ENTRIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEntries(List<Option> entries) {
    this.entries = entries;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Options options = (Options) o;
    return Objects.equals(this.multiple, options.multiple) &&
        Objects.equals(this.entries, options.entries);
  }

  @Override
  public int hashCode() {
    return Objects.hash(multiple, entries);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Options {\n");
    sb.append("    multiple: ").append(toIndentedString(multiple)).append("\n");
    sb.append("    entries: ").append(toIndentedString(entries)).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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

