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

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

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Objects;

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

public class RateLimitOpenApiVo   {
  @JsonProperty("mode")
  private Integer mode;

  @JsonProperty("rateLimitProfileId")
  private String rateLimitProfileId;

  @JsonProperty("customRateLimit")
  private CustomRateLimitOpenApiVo customRateLimit;

  public RateLimitOpenApiVo mode(Integer mode) {
    this.mode = mode;
    return this;
  }

  /**
   * Mode of configure rate limit should be a value as follows: 0: customRateLimit; 1: rateLimitProfileId.
   * @return mode
  */
  @ApiModelProperty(required = true, value = "Mode of configure rate limit should be a value as follows: 0: customRateLimit; 1: rateLimitProfileId.")
  @NotNull


  public Integer getMode() {
    return mode;
  }

  public void setMode(Integer mode) {
    this.mode = mode;
  }

  public RateLimitOpenApiVo rateLimitProfileId(String rateLimitProfileId) {
    this.rateLimitProfileId = rateLimitProfileId;
    return this;
  }

  /**
   * This field represents Rate limit profile ID. Rate limit profile can be created using 'Create rate limit profile' interface, and Rate limit profile ID can be obtained from 'Get rate limit profile list' interface
   * @return rateLimitProfileId
  */
  @ApiModelProperty(value = "This field represents Rate limit profile ID. Rate limit profile can be created using 'Create rate limit profile' interface, and Rate limit profile ID can be obtained from 'Get rate limit profile list' interface")


  public String getRateLimitProfileId() {
    return rateLimitProfileId;
  }

  public void setRateLimitProfileId(String rateLimitProfileId) {
    this.rateLimitProfileId = rateLimitProfileId;
  }

  public RateLimitOpenApiVo customRateLimit(CustomRateLimitOpenApiVo customRateLimit) {
    this.customRateLimit = customRateLimit;
    return this;
  }

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

  @Valid

  public CustomRateLimitOpenApiVo getCustomRateLimit() {
    return customRateLimit;
  }

  public void setCustomRateLimit(CustomRateLimitOpenApiVo customRateLimit) {
    this.customRateLimit = customRateLimit;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RateLimitOpenApiVo rateLimitOpenApiVo = (RateLimitOpenApiVo) o;
    return Objects.equals(this.mode, rateLimitOpenApiVo.mode) &&
        Objects.equals(this.rateLimitProfileId, rateLimitOpenApiVo.rateLimitProfileId) &&
        Objects.equals(this.customRateLimit, rateLimitOpenApiVo.customRateLimit);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mode, rateLimitProfileId, customRateLimit);
  }

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

