package org.wfc.omada.api.hotspot.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Form card list.
 */
@ApiModel(description = "Form card list.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:35:35.496+08:00[Asia/Shanghai]")

public class FormAuthCardOpenApiVo   {
  @JsonProperty("type")
  private Integer type;

  @JsonProperty("required")
  private Boolean required;

  @JsonProperty("title")
  private String title;

  @JsonProperty("choices")
  @Valid
  private List<String> choices = new ArrayList<>();

  @JsonProperty("others")
  private String others;

  @JsonProperty("scoreNotes")
  @Valid
  private List<String> scoreNotes = new ArrayList<>();

  public FormAuthCardOpenApiVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Card type should be a value as follows: 0: single choice (single choice); 1: multiple choice (multiple choice); 2: ComboBox (drop-down menu); 3: input (input box); 4: score (score); 5: prompt frame
   * @return type
  */
  @ApiModelProperty(required = true, value = "Card type should be a value as follows: 0: single choice (single choice); 1: multiple choice (multiple choice); 2: ComboBox (drop-down menu); 3: input (input box); 4: score (score); 5: prompt frame")
  @NotNull


  public Integer getType() {
    return type;
  }

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

  public FormAuthCardOpenApiVo required(Boolean required) {
    this.required = required;
    return this;
  }

  /**
   * Indicates whether the card is required (cardType is 5, meaningless in the prompt box).
   * @return required
  */
  @ApiModelProperty(required = true, value = "Indicates whether the card is required (cardType is 5, meaningless in the prompt box).")
  @NotNull


  public Boolean getRequired() {
    return required;
  }

  public void setRequired(Boolean required) {
    this.required = required;
  }

  public FormAuthCardOpenApiVo title(String title) {
    this.title = title;
    return this;
  }

  /**
   * Title should contain 1-2000 characters
   * @return title
  */
  @ApiModelProperty(required = true, value = "Title should contain 1-2000 characters")
  @NotNull


  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public FormAuthCardOpenApiVo choices(List<String> choices) {
    this.choices = choices;
    return this;
  }

  public FormAuthCardOpenApiVo addChoicesItem(String choicesItem) {
    this.choices.add(choicesItem);
    return this;
  }

  /**
   * Drop-down menu or list of options for multiple-choice questions (exist if and only if cardType is 0, 1, 2), excluding questions with other options. Choices should contain 1-2000 characters
   * @return choices
  */
  @ApiModelProperty(required = true, value = "Drop-down menu or list of options for multiple-choice questions (exist if and only if cardType is 0, 1, 2), excluding questions with other options. Choices should contain 1-2000 characters")
  @NotNull


  public List<String> getChoices() {
    return choices;
  }

  public void setChoices(List<String> choices) {
    this.choices = choices;
  }

  public FormAuthCardOpenApiVo others(String others) {
    this.others = others;
    return this;
  }

  /**
   * The question of the other options. Exists if and only if type is 0, 1. Others should contain 1-2000 characters
   * @return others
  */
  @ApiModelProperty(value = "The question of the other options. Exists if and only if type is 0, 1. Others should contain 1-2000 characters")


  public String getOthers() {
    return others;
  }

  public void setOthers(String others) {
    this.others = others;
  }

  public FormAuthCardOpenApiVo scoreNotes(List<String> scoreNotes) {
    this.scoreNotes = scoreNotes;
    return this;
  }

  public FormAuthCardOpenApiVo addScoreNotesItem(String scoreNotesItem) {
    this.scoreNotes.add(scoreNotesItem);
    return this;
  }

  /**
   * The prompt text corresponding to different scores of the scoring card. Exists when the cardType is 4 and needs to be transmitted in order. The subscript 0 corresponds to the score 1.
   * @return scoreNotes
  */
  @ApiModelProperty(required = true, value = "The prompt text corresponding to different scores of the scoring card. Exists when the cardType is 4 and needs to be transmitted in order. The subscript 0 corresponds to the score 1.")
  @NotNull


  public List<String> getScoreNotes() {
    return scoreNotes;
  }

  public void setScoreNotes(List<String> scoreNotes) {
    this.scoreNotes = scoreNotes;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    FormAuthCardOpenApiVo formAuthCardOpenApiVo = (FormAuthCardOpenApiVo) o;
    return Objects.equals(this.type, formAuthCardOpenApiVo.type) &&
        Objects.equals(this.required, formAuthCardOpenApiVo.required) &&
        Objects.equals(this.title, formAuthCardOpenApiVo.title) &&
        Objects.equals(this.choices, formAuthCardOpenApiVo.choices) &&
        Objects.equals(this.others, formAuthCardOpenApiVo.others) &&
        Objects.equals(this.scoreNotes, formAuthCardOpenApiVo.scoreNotes);
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, required, title, choices, others, scoreNotes);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class FormAuthCardOpenApiVo {\n");
    
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    required: ").append(toIndentedString(required)).append("\n");
    sb.append("    title: ").append(toIndentedString(title)).append("\n");
    sb.append("    choices: ").append(toIndentedString(choices)).append("\n");
    sb.append("    others: ").append(toIndentedString(others)).append("\n");
    sb.append("    scoreNotes: ").append(toIndentedString(scoreNotes)).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    ");
  }
}

