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;

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

public class VoucherStatisticsHistoryOpenApiVo   {
  @JsonProperty("summary")
  private Object summary;

  @JsonProperty("usage")
  @Valid
  private List<VoucherUsageOpenApiVo> usage = null;

  public VoucherStatisticsHistoryOpenApiVo summary(Object summary) {
    this.summary = summary;
    return this;
  }

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

  @Valid

  public Object getSummary() {
    return summary;
  }

  public void setSummary(Object summary) {
    this.summary = summary;
  }

  public VoucherStatisticsHistoryOpenApiVo usage(List<VoucherUsageOpenApiVo> usage) {
    this.usage = usage;
    return this;
  }

  public VoucherStatisticsHistoryOpenApiVo addUsageItem(VoucherUsageOpenApiVo usageItem) {
    if (this.usage == null) {
      this.usage = new ArrayList<>();
    }
    this.usage.add(usageItem);
    return this;
  }

  /**
   * Data points of vouchers
   * @return usage
  */
  @ApiModelProperty(value = "Data points of vouchers")

  @Valid

  public List<VoucherUsageOpenApiVo> getUsage() {
    return usage;
  }

  public void setUsage(List<VoucherUsageOpenApiVo> usage) {
    this.usage = usage;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VoucherStatisticsHistoryOpenApiVo voucherStatisticsHistoryOpenApiVo = (VoucherStatisticsHistoryOpenApiVo) o;
    return Objects.equals(this.summary, voucherStatisticsHistoryOpenApiVo.summary) &&
        Objects.equals(this.usage, voucherStatisticsHistoryOpenApiVo.usage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(summary, usage);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VoucherStatisticsHistoryOpenApiVo {\n");
    
    sb.append("    summary: ").append(toIndentedString(summary)).append("\n");
    sb.append("    usage: ").append(toIndentedString(usage)).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    ");
  }
}

