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

import com.fasterxml.jackson.annotation.JsonProperty;
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;

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

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

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

  @JsonProperty("searchKey")
  private String searchKey;

  @JsonProperty("timeStart")
  private Long timeStart;

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

  /**
   * Select type. It should be a value as follows: 0: Represents selecting all voucher groups, this selection does not pass parameter [groupIds]. 1: Parameter [groupIds] includes the IDs of the voucher groups to be selected. 2: Parameter [groupIds] includes the IDs of the voucher groups not to be selected
   * @return type
  */
  @ApiModelProperty(required = true, value = "Select type. It should be a value as follows: 0: Represents selecting all voucher groups, this selection does not pass parameter [groupIds]. 1: Parameter [groupIds] includes the IDs of the voucher groups to be selected. 2: Parameter [groupIds] includes the IDs of the voucher groups not to be selected")
  @NotNull


  public Integer getType() {
    return type;
  }

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

  public SelectVoucherGroupOpenApiVo groupIds(List<String> groupIds) {
    this.groupIds = groupIds;
    return this;
  }

  public SelectVoucherGroupOpenApiVo addGroupIdsItem(String groupIdsItem) {
    if (this.groupIds == null) {
      this.groupIds = new ArrayList<>();
    }
    this.groupIds.add(groupIdsItem);
    return this;
  }

  /**
   * ID list of voucher groups. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface
   * @return groupIds
  */
  @ApiModelProperty(value = "ID list of voucher groups. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface")


  public List<String> getGroupIds() {
    return groupIds;
  }

  public void setGroupIds(List<String> groupIds) {
    this.groupIds = groupIds;
  }

  public SelectVoucherGroupOpenApiVo searchKey(String searchKey) {
    this.searchKey = searchKey;
    return this;
  }

  /**
   * Fuzzy query parameters, support field: voucher group name, voucher code
   * @return searchKey
  */
  @ApiModelProperty(value = "Fuzzy query parameters, support field: voucher group name, voucher code")


  public String getSearchKey() {
    return searchKey;
  }

  public void setSearchKey(String searchKey) {
    this.searchKey = searchKey;
  }

  public SelectVoucherGroupOpenApiVo timeStart(Long timeStart) {
    this.timeStart = timeStart;
    return this;
  }

  /**
   * End timestamp filter query parameters, unit: MS
   * @return timeStart
  */
  @ApiModelProperty(value = "End timestamp filter query parameters, unit: MS")


  public Long getTimeStart() {
    return timeStart;
  }

  public void setTimeStart(Long timeStart) {
    this.timeStart = timeStart;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SelectVoucherGroupOpenApiVo selectVoucherGroupOpenApiVo = (SelectVoucherGroupOpenApiVo) o;
    return Objects.equals(this.type, selectVoucherGroupOpenApiVo.type) &&
        Objects.equals(this.groupIds, selectVoucherGroupOpenApiVo.groupIds) &&
        Objects.equals(this.searchKey, selectVoucherGroupOpenApiVo.searchKey) &&
        Objects.equals(this.timeStart, selectVoucherGroupOpenApiVo.timeStart);
  }

  @Override
  public int hashCode() {
    return Objects.hash(type, groupIds, searchKey, timeStart);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SelectVoucherGroupOpenApiVo {\n");
    
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    groupIds: ").append(toIndentedString(groupIds)).append("\n");
    sb.append("    searchKey: ").append(toIndentedString(searchKey)).append("\n");
    sb.append("    timeStart: ").append(toIndentedString(timeStart)).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    ");
  }
}

