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

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

import java.util.Objects;

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

public class VoucherBriefOpenApiVo   {
  @JsonProperty("code")
  private String code;

  @JsonProperty("limitType")
  private Integer limitType;

  @JsonProperty("limitNum")
  private Integer limitNum;

  @JsonProperty("durationType")
  private Integer durationType;

  @JsonProperty("duration")
  private Long duration;

  @JsonProperty("unitPrice")
  private String unitPrice;

  @JsonProperty("currency")
  private String currency;

  @JsonProperty("validity")
  private String validity;

  @JsonProperty("printComments")
  private String printComments;

  public VoucherBriefOpenApiVo code(String code) {
    this.code = code;
    return this;
  }

  /**
   * Voucher code
   * @return code
  */
  @ApiModelProperty(value = "Voucher code")


  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public VoucherBriefOpenApiVo limitType(Integer limitType) {
    this.limitType = limitType;
    return this;
  }

  /**
   * The limitations of the voucher. It should be a value as follows: 0: Limited Usage Counts, 1: Limited Online Users, 2: Unlimited
   * @return limitType
  */
  @ApiModelProperty(value = "The limitations of the voucher. It should be a value as follows: 0: Limited Usage Counts, 1: Limited Online Users, 2: Unlimited")


  public Integer getLimitType() {
    return limitType;
  }

  public void setLimitType(Integer limitType) {
    this.limitType = limitType;
  }

  public VoucherBriefOpenApiVo limitNum(Integer limitNum) {
    this.limitNum = limitNum;
    return this;
  }

  /**
   * The number of limitations. It should be within the range of 1–999. If Parameter [limitType] is 0 or 1, [limitNum] should not be null.When Parameter [limitType] is 0, [limitNum] represents the maximum number of times this voucher can be used.When Parameter [limitType] is 1, [limitNum] represents the maximum number of users this voucher can be used at the same time.
   * @return limitNum
  */
  @ApiModelProperty(value = "The number of limitations. It should be within the range of 1–999. If Parameter [limitType] is 0 or 1, [limitNum] should not be null.When Parameter [limitType] is 0, [limitNum] represents the maximum number of times this voucher can be used.When Parameter [limitType] is 1, [limitNum] represents the maximum number of users this voucher can be used at the same time.")


  public Integer getLimitNum() {
    return limitNum;
  }

  public void setLimitNum(Integer limitNum) {
    this.limitNum = limitNum;
  }

  public VoucherBriefOpenApiVo durationType(Integer durationType) {
    this.durationType = durationType;
    return this;
  }

  /**
   * The duration type of the voucher. It should be a value as follows: 0: Client duration, each client expires after the duration is used. 1: Voucher duration, after reaching the voucher duration, clients using the voucher will expire
   * @return durationType
  */
  @ApiModelProperty(value = "The duration type of the voucher. It should be a value as follows: 0: Client duration, each client expires after the duration is used. 1: Voucher duration, after reaching the voucher duration, clients using the voucher will expire")


  public Integer getDurationType() {
    return durationType;
  }

  public void setDurationType(Integer durationType) {
    this.durationType = durationType;
  }

  public VoucherBriefOpenApiVo duration(Long duration) {
    this.duration = duration;
    return this;
  }

  /**
   * Duration of one use, unit: minute. It should be within the range of 1–14400000.
   * @return duration
  */
  @ApiModelProperty(value = "Duration of one use, unit: minute. It should be within the range of 1–14400000.")


  public Long getDuration() {
    return duration;
  }

  public void setDuration(Long duration) {
    this.duration = duration;
  }

  public VoucherBriefOpenApiVo unitPrice(String unitPrice) {
    this.unitPrice = unitPrice;
    return this;
  }

  /**
   * Price of single voucher. It should be within the range of 1–999999999
   * @return unitPrice
  */
  @ApiModelProperty(value = "Price of single voucher. It should be within the range of 1–999999999")


  public String getUnitPrice() {
    return unitPrice;
  }

  public void setUnitPrice(String unitPrice) {
    this.unitPrice = unitPrice;
  }

  public VoucherBriefOpenApiVo currency(String currency) {
    this.currency = currency;
    return this;
  }

  /**
   * Currency Short Code of voucher. For the values of Currency Short Code, refer to section 5.4.2 of the Open API Access Guide.
   * @return currency
  */
  @ApiModelProperty(value = "Currency Short Code of voucher. For the values of Currency Short Code, refer to section 5.4.2 of the Open API Access Guide.")


  public String getCurrency() {
    return currency;
  }

  public void setCurrency(String currency) {
    this.currency = currency;
  }

  public VoucherBriefOpenApiVo validity(String validity) {
    this.validity = validity;
    return this;
  }

  /**
   * The validity period information of the voucher
   * @return validity
  */
  @ApiModelProperty(value = "The validity period information of the voucher")


  public String getValidity() {
    return validity;
  }

  public void setValidity(String validity) {
    this.validity = validity;
  }

  public VoucherBriefOpenApiVo printComments(String printComments) {
    this.printComments = printComments;
    return this;
  }

  /**
   * Print comments of the voucher
   * @return printComments
  */
  @ApiModelProperty(value = "Print comments of the voucher")


  public String getPrintComments() {
    return printComments;
  }

  public void setPrintComments(String printComments) {
    this.printComments = printComments;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VoucherBriefOpenApiVo voucherBriefOpenApiVo = (VoucherBriefOpenApiVo) o;
    return Objects.equals(this.code, voucherBriefOpenApiVo.code) &&
        Objects.equals(this.limitType, voucherBriefOpenApiVo.limitType) &&
        Objects.equals(this.limitNum, voucherBriefOpenApiVo.limitNum) &&
        Objects.equals(this.durationType, voucherBriefOpenApiVo.durationType) &&
        Objects.equals(this.duration, voucherBriefOpenApiVo.duration) &&
        Objects.equals(this.unitPrice, voucherBriefOpenApiVo.unitPrice) &&
        Objects.equals(this.currency, voucherBriefOpenApiVo.currency) &&
        Objects.equals(this.validity, voucherBriefOpenApiVo.validity) &&
        Objects.equals(this.printComments, voucherBriefOpenApiVo.printComments);
  }

  @Override
  public int hashCode() {
    return Objects.hash(code, limitType, limitNum, durationType, duration, unitPrice, currency, validity, printComments);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VoucherBriefOpenApiVo {\n");
    
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    limitType: ").append(toIndentedString(limitType)).append("\n");
    sb.append("    limitNum: ").append(toIndentedString(limitNum)).append("\n");
    sb.append("    durationType: ").append(toIndentedString(durationType)).append("\n");
    sb.append("    duration: ").append(toIndentedString(duration)).append("\n");
    sb.append("    unitPrice: ").append(toIndentedString(unitPrice)).append("\n");
    sb.append("    currency: ").append(toIndentedString(currency)).append("\n");
    sb.append("    validity: ").append(toIndentedString(validity)).append("\n");
    sb.append("    printComments: ").append(toIndentedString(printComments)).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    ");
  }
}

