package org.wfc.omada.api.sitesetting.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;

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

public class WanPortIpv4SettingOpenApiVo   {
  @JsonProperty("protoType")
  private Integer protoType;

  @JsonProperty("vlanId")
  private Integer vlanId;

  @JsonProperty("qosTag")
  private Boolean qosTag;

  @JsonProperty("vlanPriority")
  private Integer vlanPriority;

  @JsonProperty("ipv4Static")
  private Ipv4StaticOpenApiVo ipv4Static;

  @JsonProperty("ipv4Dhcp")
  private Ipv4DhcpOpenApiVo ipv4Dhcp;

  @JsonProperty("ipv4Pppoe")
  private Ipv4PppoeOpenApiVo ipv4Pppoe;

  @JsonProperty("ipv4L2tp")
  private Ipv4L2tpOpenApiVo ipv4L2tp;

  @JsonProperty("ipv4Pptp")
  private Ipv4PptpOpenApiVo ipv4Pptp;

  @JsonProperty("ipv4Pppoa")
  private Ipv4PppoaOpenApiVo ipv4Pppoa;

  @JsonProperty("ipv4Ipoa")
  private Ipv4IpoaOpenApiVo ipv4Ipoa;

  public WanPortIpv4SettingOpenApiVo protoType(Integer protoType) {
    this.protoType = protoType;
    return this;
  }

  /**
   * IPv4 connection type should be a value as follows: 0:static; 1:DHCP; 2:PPPoE; 3:L2TP; 4:PPTP.
   * @return protoType
  */
  @ApiModelProperty(required = true, value = "IPv4 connection type should be a value as follows: 0:static; 1:DHCP; 2:PPPoE; 3:L2TP; 4:PPTP.")
  @NotNull


  public Integer getProtoType() {
    return protoType;
  }

  public void setProtoType(Integer protoType) {
    this.protoType = protoType;
  }

  public WanPortIpv4SettingOpenApiVo vlanId(Integer vlanId) {
    this.vlanId = vlanId;
    return this;
  }

  /**
   * VLAN ID should be within the range of 0–4094, 0 means disable.
   * @return vlanId
  */
  @ApiModelProperty(required = true, value = "VLAN ID should be within the range of 0–4094, 0 means disable.")
  @NotNull


  public Integer getVlanId() {
    return vlanId;
  }

  public void setVlanId(Integer vlanId) {
    this.vlanId = vlanId;
  }

  public WanPortIpv4SettingOpenApiVo qosTag(Boolean qosTag) {
    this.qosTag = qosTag;
    return this;
  }

  /**
   * 802.1Q Tag. It takes effect when [vlanId] is not 0.
   * @return qosTag
  */
  @ApiModelProperty(value = "802.1Q Tag. It takes effect when [vlanId] is not 0.")


  public Boolean getQosTag() {
    return qosTag;
  }

  public void setQosTag(Boolean qosTag) {
    this.qosTag = qosTag;
  }

  public WanPortIpv4SettingOpenApiVo vlanPriority(Integer vlanPriority) {
    this.vlanPriority = vlanPriority;
    return this;
  }

  /**
   * Vlan Priority. It takes effect when [vlanId] is not 0, and it should be within the range of 0–7.
   * @return vlanPriority
  */
  @ApiModelProperty(value = "Vlan Priority. It takes effect when [vlanId] is not 0, and it should be within the range of 0–7.")


  public Integer getVlanPriority() {
    return vlanPriority;
  }

  public void setVlanPriority(Integer vlanPriority) {
    this.vlanPriority = vlanPriority;
  }

  public WanPortIpv4SettingOpenApiVo ipv4Static(Ipv4StaticOpenApiVo ipv4Static) {
    this.ipv4Static = ipv4Static;
    return this;
  }

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

  @Valid

  public Ipv4StaticOpenApiVo getIpv4Static() {
    return ipv4Static;
  }

  public void setIpv4Static(Ipv4StaticOpenApiVo ipv4Static) {
    this.ipv4Static = ipv4Static;
  }

  public WanPortIpv4SettingOpenApiVo ipv4Dhcp(Ipv4DhcpOpenApiVo ipv4Dhcp) {
    this.ipv4Dhcp = ipv4Dhcp;
    return this;
  }

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

  @Valid

  public Ipv4DhcpOpenApiVo getIpv4Dhcp() {
    return ipv4Dhcp;
  }

  public void setIpv4Dhcp(Ipv4DhcpOpenApiVo ipv4Dhcp) {
    this.ipv4Dhcp = ipv4Dhcp;
  }

  public WanPortIpv4SettingOpenApiVo ipv4Pppoe(Ipv4PppoeOpenApiVo ipv4Pppoe) {
    this.ipv4Pppoe = ipv4Pppoe;
    return this;
  }

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

  @Valid

  public Ipv4PppoeOpenApiVo getIpv4Pppoe() {
    return ipv4Pppoe;
  }

  public void setIpv4Pppoe(Ipv4PppoeOpenApiVo ipv4Pppoe) {
    this.ipv4Pppoe = ipv4Pppoe;
  }

  public WanPortIpv4SettingOpenApiVo ipv4L2tp(Ipv4L2tpOpenApiVo ipv4L2tp) {
    this.ipv4L2tp = ipv4L2tp;
    return this;
  }

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

  @Valid

  public Ipv4L2tpOpenApiVo getIpv4L2tp() {
    return ipv4L2tp;
  }

  public void setIpv4L2tp(Ipv4L2tpOpenApiVo ipv4L2tp) {
    this.ipv4L2tp = ipv4L2tp;
  }

  public WanPortIpv4SettingOpenApiVo ipv4Pptp(Ipv4PptpOpenApiVo ipv4Pptp) {
    this.ipv4Pptp = ipv4Pptp;
    return this;
  }

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

  @Valid

  public Ipv4PptpOpenApiVo getIpv4Pptp() {
    return ipv4Pptp;
  }

  public void setIpv4Pptp(Ipv4PptpOpenApiVo ipv4Pptp) {
    this.ipv4Pptp = ipv4Pptp;
  }

  public WanPortIpv4SettingOpenApiVo ipv4Pppoa(Ipv4PppoaOpenApiVo ipv4Pppoa) {
    this.ipv4Pppoa = ipv4Pppoa;
    return this;
  }

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

  @Valid

  public Ipv4PppoaOpenApiVo getIpv4Pppoa() {
    return ipv4Pppoa;
  }

  public void setIpv4Pppoa(Ipv4PppoaOpenApiVo ipv4Pppoa) {
    this.ipv4Pppoa = ipv4Pppoa;
  }

  public WanPortIpv4SettingOpenApiVo ipv4Ipoa(Ipv4IpoaOpenApiVo ipv4Ipoa) {
    this.ipv4Ipoa = ipv4Ipoa;
    return this;
  }

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

  @Valid

  public Ipv4IpoaOpenApiVo getIpv4Ipoa() {
    return ipv4Ipoa;
  }

  public void setIpv4Ipoa(Ipv4IpoaOpenApiVo ipv4Ipoa) {
    this.ipv4Ipoa = ipv4Ipoa;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    WanPortIpv4SettingOpenApiVo wanPortIpv4SettingOpenApiVo = (WanPortIpv4SettingOpenApiVo) o;
    return Objects.equals(this.protoType, wanPortIpv4SettingOpenApiVo.protoType) &&
        Objects.equals(this.vlanId, wanPortIpv4SettingOpenApiVo.vlanId) &&
        Objects.equals(this.qosTag, wanPortIpv4SettingOpenApiVo.qosTag) &&
        Objects.equals(this.vlanPriority, wanPortIpv4SettingOpenApiVo.vlanPriority) &&
        Objects.equals(this.ipv4Static, wanPortIpv4SettingOpenApiVo.ipv4Static) &&
        Objects.equals(this.ipv4Dhcp, wanPortIpv4SettingOpenApiVo.ipv4Dhcp) &&
        Objects.equals(this.ipv4Pppoe, wanPortIpv4SettingOpenApiVo.ipv4Pppoe) &&
        Objects.equals(this.ipv4L2tp, wanPortIpv4SettingOpenApiVo.ipv4L2tp) &&
        Objects.equals(this.ipv4Pptp, wanPortIpv4SettingOpenApiVo.ipv4Pptp) &&
        Objects.equals(this.ipv4Pppoa, wanPortIpv4SettingOpenApiVo.ipv4Pppoa) &&
        Objects.equals(this.ipv4Ipoa, wanPortIpv4SettingOpenApiVo.ipv4Ipoa);
  }

  @Override
  public int hashCode() {
    return Objects.hash(protoType, vlanId, qosTag, vlanPriority, ipv4Static, ipv4Dhcp, ipv4Pppoe, ipv4L2tp, ipv4Pptp, ipv4Pppoa, ipv4Ipoa);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WanPortIpv4SettingOpenApiVo {\n");
    
    sb.append("    protoType: ").append(toIndentedString(protoType)).append("\n");
    sb.append("    vlanId: ").append(toIndentedString(vlanId)).append("\n");
    sb.append("    qosTag: ").append(toIndentedString(qosTag)).append("\n");
    sb.append("    vlanPriority: ").append(toIndentedString(vlanPriority)).append("\n");
    sb.append("    ipv4Static: ").append(toIndentedString(ipv4Static)).append("\n");
    sb.append("    ipv4Dhcp: ").append(toIndentedString(ipv4Dhcp)).append("\n");
    sb.append("    ipv4Pppoe: ").append(toIndentedString(ipv4Pppoe)).append("\n");
    sb.append("    ipv4L2tp: ").append(toIndentedString(ipv4L2tp)).append("\n");
    sb.append("    ipv4Pptp: ").append(toIndentedString(ipv4Pptp)).append("\n");
    sb.append("    ipv4Pppoa: ").append(toIndentedString(ipv4Pppoa)).append("\n");
    sb.append("    ipv4Ipoa: ").append(toIndentedString(ipv4Ipoa)).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    ");
  }
}

