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

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

import java.util.Objects;

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

public class VoucherDurationDistributionOpenApiVo   {
  @JsonProperty("duration")
  private Long duration;

  @JsonProperty("durationType")
  private Integer durationType;

  @JsonProperty("totalDuration")
  private Long totalDuration;

  @JsonProperty("usedCount")
  private Integer usedCount;

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

  /**
   * Duration of single voucher, unit: minutes
   * @return duration
  */
  @ApiModelProperty(value = "Duration of single voucher, unit: minutes")


  public Long getDuration() {
    return duration;
  }

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

  public VoucherDurationDistributionOpenApiVo 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 VoucherDurationDistributionOpenApiVo totalDuration(Long totalDuration) {
    this.totalDuration = totalDuration;
    return this;
  }

  /**
   * Total duration of vouchers, unit: minutes
   * @return totalDuration
  */
  @ApiModelProperty(value = "Total duration of vouchers, unit: minutes")


  public Long getTotalDuration() {
    return totalDuration;
  }

  public void setTotalDuration(Long totalDuration) {
    this.totalDuration = totalDuration;
  }

  public VoucherDurationDistributionOpenApiVo usedCount(Integer usedCount) {
    this.usedCount = usedCount;
    return this;
  }

  /**
   * Used count of vouchers
   * @return usedCount
  */
  @ApiModelProperty(value = "Used count of vouchers")


  public Integer getUsedCount() {
    return usedCount;
  }

  public void setUsedCount(Integer usedCount) {
    this.usedCount = usedCount;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VoucherDurationDistributionOpenApiVo voucherDurationDistributionOpenApiVo = (VoucherDurationDistributionOpenApiVo) o;
    return Objects.equals(this.duration, voucherDurationDistributionOpenApiVo.duration) &&
        Objects.equals(this.durationType, voucherDurationDistributionOpenApiVo.durationType) &&
        Objects.equals(this.totalDuration, voucherDurationDistributionOpenApiVo.totalDuration) &&
        Objects.equals(this.usedCount, voucherDurationDistributionOpenApiVo.usedCount);
  }

  @Override
  public int hashCode() {
    return Objects.hash(duration, durationType, totalDuration, usedCount);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VoucherDurationDistributionOpenApiVo {\n");
    
    sb.append("    duration: ").append(toIndentedString(duration)).append("\n");
    sb.append("    durationType: ").append(toIndentedString(durationType)).append("\n");
    sb.append("    totalDuration: ").append(toIndentedString(totalDuration)).append("\n");
    sb.append("    usedCount: ").append(toIndentedString(usedCount)).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    ");
  }
}

