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

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

import java.util.Objects;

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

public class GatewayQosServiceDetailOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("defaultProfile")
  private Boolean defaultProfile;

  @JsonProperty("name")
  private String name;

  @JsonProperty("protocol")
  private Integer protocol;

  @JsonProperty("sourceStartPort")
  private Integer sourceStartPort;

  @JsonProperty("sourceEndPort")
  private Integer sourceEndPort;

  @JsonProperty("destStartPort")
  private Integer destStartPort;

  @JsonProperty("destEndPort")
  private Integer destEndPort;

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("code")
  private Integer code;

  @JsonProperty("protoNum")
  private Integer protoNum;

  @JsonProperty("description")
  private String description;

  public GatewayQosServiceDetailOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * The ID of Gateway QoS Service.
   * @return id
  */
  @ApiModelProperty(value = "The ID of Gateway QoS Service.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public GatewayQosServiceDetailOpenApiVo defaultProfile(Boolean defaultProfile) {
    this.defaultProfile = defaultProfile;
    return this;
  }

  /**
   * Indicating that the profile is the default which cannot be modified.
   * @return defaultProfile
  */
  @ApiModelProperty(value = "Indicating that the profile is the default which cannot be modified.")


  public Boolean getDefaultProfile() {
    return defaultProfile;
  }

  public void setDefaultProfile(Boolean defaultProfile) {
    this.defaultProfile = defaultProfile;
  }

  public GatewayQosServiceDetailOpenApiVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * The name of Gateway QoS Service should contain 1 to 64 characters.
   * @return name
  */
  @ApiModelProperty(value = "The name of Gateway QoS Service should contain 1 to 64 characters.")


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public GatewayQosServiceDetailOpenApiVo protocol(Integer protocol) {
    this.protocol = protocol;
    return this;
  }

  /**
   * The protocol of Gateway QoS Service should be a value as follows: 0: TCP, 1: UDP, 2: TCP/UDP, 3: ICMP, 4: Other.
   * @return protocol
  */
  @ApiModelProperty(value = "The protocol of Gateway QoS Service should be a value as follows: 0: TCP, 1: UDP, 2: TCP/UDP, 3: ICMP, 4: Other.")


  public Integer getProtocol() {
    return protocol;
  }

  public void setProtocol(Integer protocol) {
    this.protocol = protocol;
  }

  public GatewayQosServiceDetailOpenApiVo sourceStartPort(Integer sourceStartPort) {
    this.sourceStartPort = sourceStartPort;
    return this;
  }

  /**
   * The start port of Source Port Range. It must be less than the end port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).
   * @return sourceStartPort
  */
  @ApiModelProperty(value = "The start port of Source Port Range. It must be less than the end port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).")


  public Integer getSourceStartPort() {
    return sourceStartPort;
  }

  public void setSourceStartPort(Integer sourceStartPort) {
    this.sourceStartPort = sourceStartPort;
  }

  public GatewayQosServiceDetailOpenApiVo sourceEndPort(Integer sourceEndPort) {
    this.sourceEndPort = sourceEndPort;
    return this;
  }

  /**
   * The end port of Source Port Range. It must be more than the start port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).
   * @return sourceEndPort
  */
  @ApiModelProperty(value = "The end port of Source Port Range. It must be more than the start port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).")


  public Integer getSourceEndPort() {
    return sourceEndPort;
  }

  public void setSourceEndPort(Integer sourceEndPort) {
    this.sourceEndPort = sourceEndPort;
  }

  public GatewayQosServiceDetailOpenApiVo destStartPort(Integer destStartPort) {
    this.destStartPort = destStartPort;
    return this;
  }

  /**
   * The start port of Destination Port Range. It must be less than the end port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).
   * @return destStartPort
  */
  @ApiModelProperty(value = "The start port of Destination Port Range. It must be less than the end port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).")


  public Integer getDestStartPort() {
    return destStartPort;
  }

  public void setDestStartPort(Integer destStartPort) {
    this.destStartPort = destStartPort;
  }

  public GatewayQosServiceDetailOpenApiVo destEndPort(Integer destEndPort) {
    this.destEndPort = destEndPort;
    return this;
  }

  /**
   * The end port of Destination Port Range. It must be more than the start port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).
   * @return destEndPort
  */
  @ApiModelProperty(value = "The end port of Destination Port Range. It must be more than the start port. It should be within the range of 0-65535 when protocol is 0(TCP), 1(UDP) or 2(TCP/UDP).")


  public Integer getDestEndPort() {
    return destEndPort;
  }

  public void setDestEndPort(Integer destEndPort) {
    this.destEndPort = destEndPort;
  }

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

  /**
   * The type cannot be null and should be within the range of 0-255 when protocol is 3(ICMP).
   * @return type
  */
  @ApiModelProperty(value = "The type cannot be null and should be within the range of 0-255 when protocol is 3(ICMP).")


  public Integer getType() {
    return type;
  }

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

  public GatewayQosServiceDetailOpenApiVo code(Integer code) {
    this.code = code;
    return this;
  }

  /**
   * The code cannot be null and should be within the range of 0-255 when protocol is 3(ICMP).
   * @return code
  */
  @ApiModelProperty(value = "The code cannot be null and should be within the range of 0-255 when protocol is 3(ICMP).")


  public Integer getCode() {
    return code;
  }

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

  public GatewayQosServiceDetailOpenApiVo protoNum(Integer protoNum) {
    this.protoNum = protoNum;
    return this;
  }

  /**
   * The protoNum cannot be null and should be within the range of 1-255 when protocol is 4(Other).
   * @return protoNum
  */
  @ApiModelProperty(value = "The protoNum cannot be null and should be within the range of 1-255 when protocol is 4(Other).")


  public Integer getProtoNum() {
    return protoNum;
  }

  public void setProtoNum(Integer protoNum) {
    this.protoNum = protoNum;
  }

  public GatewayQosServiceDetailOpenApiVo description(String description) {
    this.description = description;
    return this;
  }

  /**
   * The description of Gateway QoS Service should contain 0 to 128 characters.
   * @return description
  */
  @ApiModelProperty(value = "The description of Gateway QoS Service should contain 0 to 128 characters.")


  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GatewayQosServiceDetailOpenApiVo gatewayQosServiceDetailOpenApiVo = (GatewayQosServiceDetailOpenApiVo) o;
    return Objects.equals(this.id, gatewayQosServiceDetailOpenApiVo.id) &&
        Objects.equals(this.defaultProfile, gatewayQosServiceDetailOpenApiVo.defaultProfile) &&
        Objects.equals(this.name, gatewayQosServiceDetailOpenApiVo.name) &&
        Objects.equals(this.protocol, gatewayQosServiceDetailOpenApiVo.protocol) &&
        Objects.equals(this.sourceStartPort, gatewayQosServiceDetailOpenApiVo.sourceStartPort) &&
        Objects.equals(this.sourceEndPort, gatewayQosServiceDetailOpenApiVo.sourceEndPort) &&
        Objects.equals(this.destStartPort, gatewayQosServiceDetailOpenApiVo.destStartPort) &&
        Objects.equals(this.destEndPort, gatewayQosServiceDetailOpenApiVo.destEndPort) &&
        Objects.equals(this.type, gatewayQosServiceDetailOpenApiVo.type) &&
        Objects.equals(this.code, gatewayQosServiceDetailOpenApiVo.code) &&
        Objects.equals(this.protoNum, gatewayQosServiceDetailOpenApiVo.protoNum) &&
        Objects.equals(this.description, gatewayQosServiceDetailOpenApiVo.description);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, defaultProfile, name, protocol, sourceStartPort, sourceEndPort, destStartPort, destEndPort, type, code, protoNum, description);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GatewayQosServiceDetailOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    defaultProfile: ").append(toIndentedString(defaultProfile)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    protocol: ").append(toIndentedString(protocol)).append("\n");
    sb.append("    sourceStartPort: ").append(toIndentedString(sourceStartPort)).append("\n");
    sb.append("    sourceEndPort: ").append(toIndentedString(sourceEndPort)).append("\n");
    sb.append("    destStartPort: ").append(toIndentedString(destStartPort)).append("\n");
    sb.append("    destEndPort: ").append(toIndentedString(destEndPort)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("    protoNum: ").append(toIndentedString(protoNum)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).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    ");
  }
}

