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

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

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

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

public class FormAuthOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("title")
  private String title;

  @JsonProperty("name")
  private String name;

  @JsonProperty("note")
  private String note;

  @JsonProperty("authTimeout")
  private AuthTimeOpenApiVo authTimeout;

  @JsonProperty("cardList")
  @Valid
  private List<FormAuthCardOpenApiVo> cardList = null;

  @JsonProperty("isPublished")
  private Boolean isPublished;

  @JsonProperty("createTime")
  private Long createTime;

  @JsonProperty("portals")
  @Valid
  private List<String> portals = null;

  @JsonProperty("answerNum")
  private Long answerNum;

  public FormAuthOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Auth form ID
   * @return id
  */
  @ApiModelProperty(value = "Auth form ID")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

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

  /**
   * Form title (display for the authentication user). It should contain 1-2000 characters.
   * @return title
  */
  @ApiModelProperty(value = "Form title (display for the authentication user). It should contain 1-2000 characters.")


  public String getTitle() {
    return title;
  }

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

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

  /**
   * Form name (display for the controller user). It should contain 1-2000 characters.
   * @return name
  */
  @ApiModelProperty(value = "Form name (display for the controller user). It should contain 1-2000 characters.")


  public String getName() {
    return name;
  }

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

  public FormAuthOpenApiVo note(String note) {
    this.note = note;
    return this;
  }

  /**
   * Note should contain 1-2000 characters.
   * @return note
  */
  @ApiModelProperty(value = "Note should contain 1-2000 characters.")


  public String getNote() {
    return note;
  }

  public void setNote(String note) {
    this.note = note;
  }

  public FormAuthOpenApiVo authTimeout(AuthTimeOpenApiVo authTimeout) {
    this.authTimeout = authTimeout;
    return this;
  }

  /**
   * Get authTimeout
   * @return authTimeout
  */
  @ApiModelProperty(value = "")

  @Valid

  public AuthTimeOpenApiVo getAuthTimeout() {
    return authTimeout;
  }

  public void setAuthTimeout(AuthTimeOpenApiVo authTimeout) {
    this.authTimeout = authTimeout;
  }

  public FormAuthOpenApiVo cardList(List<FormAuthCardOpenApiVo> cardList) {
    this.cardList = cardList;
    return this;
  }

  public FormAuthOpenApiVo addCardListItem(FormAuthCardOpenApiVo cardListItem) {
    if (this.cardList == null) {
      this.cardList = new ArrayList<>();
    }
    this.cardList.add(cardListItem);
    return this;
  }

  /**
   * Form card list.
   * @return cardList
  */
  @ApiModelProperty(value = "Form card list.")

  @Valid

  public List<FormAuthCardOpenApiVo> getCardList() {
    return cardList;
  }

  public void setCardList(List<FormAuthCardOpenApiVo> cardList) {
    this.cardList = cardList;
  }

  public FormAuthOpenApiVo isPublished(Boolean isPublished) {
    this.isPublished = isPublished;
    return this;
  }

  /**
   * Whether to publish.
   * @return isPublished
  */
  @ApiModelProperty(value = "Whether to publish.")


  public Boolean getIsPublished() {
    return isPublished;
  }

  public void setIsPublished(Boolean isPublished) {
    this.isPublished = isPublished;
  }

  public FormAuthOpenApiVo createTime(Long createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * Created time of the form.
   * @return createTime
  */
  @ApiModelProperty(value = "Created time of the form.")


  public Long getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Long createTime) {
    this.createTime = createTime;
  }

  public FormAuthOpenApiVo portals(List<String> portals) {
    this.portals = portals;
    return this;
  }

  public FormAuthOpenApiVo addPortalsItem(String portalsItem) {
    if (this.portals == null) {
      this.portals = new ArrayList<>();
    }
    this.portals.add(portalsItem);
    return this;
  }

  /**
   * Portal names corresponding to the bound portal.
   * @return portals
  */
  @ApiModelProperty(value = "Portal names corresponding to the bound portal.")


  public List<String> getPortals() {
    return portals;
  }

  public void setPortals(List<String> portals) {
    this.portals = portals;
  }

  public FormAuthOpenApiVo answerNum(Long answerNum) {
    this.answerNum = answerNum;
    return this;
  }

  /**
   * The number of form's answers.
   * @return answerNum
  */
  @ApiModelProperty(value = "The number of form's answers.")


  public Long getAnswerNum() {
    return answerNum;
  }

  public void setAnswerNum(Long answerNum) {
    this.answerNum = answerNum;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    FormAuthOpenApiVo formAuthOpenApiVo = (FormAuthOpenApiVo) o;
    return Objects.equals(this.id, formAuthOpenApiVo.id) &&
        Objects.equals(this.title, formAuthOpenApiVo.title) &&
        Objects.equals(this.name, formAuthOpenApiVo.name) &&
        Objects.equals(this.note, formAuthOpenApiVo.note) &&
        Objects.equals(this.authTimeout, formAuthOpenApiVo.authTimeout) &&
        Objects.equals(this.cardList, formAuthOpenApiVo.cardList) &&
        Objects.equals(this.isPublished, formAuthOpenApiVo.isPublished) &&
        Objects.equals(this.createTime, formAuthOpenApiVo.createTime) &&
        Objects.equals(this.portals, formAuthOpenApiVo.portals) &&
        Objects.equals(this.answerNum, formAuthOpenApiVo.answerNum);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, title, name, note, authTimeout, cardList, isPublished, createTime, portals, answerNum);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class FormAuthOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    title: ").append(toIndentedString(title)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    note: ").append(toIndentedString(note)).append("\n");
    sb.append("    authTimeout: ").append(toIndentedString(authTimeout)).append("\n");
    sb.append("    cardList: ").append(toIndentedString(cardList)).append("\n");
    sb.append("    isPublished: ").append(toIndentedString(isPublished)).append("\n");
    sb.append("    createTime: ").append(toIndentedString(createTime)).append("\n");
    sb.append("    portals: ").append(toIndentedString(portals)).append("\n");
    sb.append("    answerNum: ").append(toIndentedString(answerNum)).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    ");
  }
}

