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

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

public class GatewayPortSettingConfig   {
  @JsonProperty("linkSpeed")
  private Integer linkSpeed;

  @JsonProperty("duplex")
  private Integer duplex;

  @JsonProperty("mirrorEnable")
  private Boolean mirrorEnable;

  @JsonProperty("mirroredPorts")
  @Valid
  private List<Integer> mirroredPorts = null;

  @JsonProperty("mirrorMode")
  private Integer mirrorMode;

  @JsonProperty("pvid")
  private Integer pvid;

  @JsonProperty("flowControl")
  private Boolean flowControl;

  @JsonProperty("status")
  private Integer status;

  @JsonProperty("poeMode")
  private Integer poeMode;

  @JsonProperty("dslSettings")
  private DslSettings dslSettings;

  public GatewayPortSettingConfig linkSpeed(Integer linkSpeed) {
    this.linkSpeed = linkSpeed;
    return this;
  }

  /**
   * Port link speed should be a value as follows: 0: Auto; 1: 10M; 2: 100M; 3: 1000M; 4: 2500M; 5: 10G; 6: 5G
   * @return linkSpeed
  */
  @ApiModelProperty(value = "Port link speed should be a value as follows: 0: Auto; 1: 10M; 2: 100M; 3: 1000M; 4: 2500M; 5: 10G; 6: 5G")


  public Integer getLinkSpeed() {
    return linkSpeed;
  }

  public void setLinkSpeed(Integer linkSpeed) {
    this.linkSpeed = linkSpeed;
  }

  public GatewayPortSettingConfig duplex(Integer duplex) {
    this.duplex = duplex;
    return this;
  }

  /**
   * Port duplex mode should be a value as follows: 0: Auto; 1: Half; 2: Full
   * @return duplex
  */
  @ApiModelProperty(value = "Port duplex mode should be a value as follows: 0: Auto; 1: Half; 2: Full")


  public Integer getDuplex() {
    return duplex;
  }

  public void setDuplex(Integer duplex) {
    this.duplex = duplex;
  }

  public GatewayPortSettingConfig mirrorEnable(Boolean mirrorEnable) {
    this.mirrorEnable = mirrorEnable;
    return this;
  }

  /**
   * Port enabled mirror or not
   * @return mirrorEnable
  */
  @ApiModelProperty(value = "Port enabled mirror or not")


  public Boolean getMirrorEnable() {
    return mirrorEnable;
  }

  public void setMirrorEnable(Boolean mirrorEnable) {
    this.mirrorEnable = mirrorEnable;
  }

  public GatewayPortSettingConfig mirroredPorts(List<Integer> mirroredPorts) {
    this.mirroredPorts = mirroredPorts;
    return this;
  }

  public GatewayPortSettingConfig addMirroredPortsItem(Integer mirroredPortsItem) {
    if (this.mirroredPorts == null) {
      this.mirroredPorts = new ArrayList<>();
    }
    this.mirroredPorts.add(mirroredPortsItem);
    return this;
  }

  /**
   * Mirrored Ports Set
   * @return mirroredPorts
  */
  @ApiModelProperty(value = "Mirrored Ports Set")


  public List<Integer> getMirroredPorts() {
    return mirroredPorts;
  }

  public void setMirroredPorts(List<Integer> mirroredPorts) {
    this.mirroredPorts = mirroredPorts;
  }

  public GatewayPortSettingConfig mirrorMode(Integer mirrorMode) {
    this.mirrorMode = mirrorMode;
    return this;
  }

  /**
   * Port mirror mode should be a value as follow: 0: ingress; 1: egress; 2: ingress and egress.
   * @return mirrorMode
  */
  @ApiModelProperty(value = "Port mirror mode should be a value as follow: 0: ingress; 1: egress; 2: ingress and egress.")


  public Integer getMirrorMode() {
    return mirrorMode;
  }

  public void setMirrorMode(Integer mirrorMode) {
    this.mirrorMode = mirrorMode;
  }

  public GatewayPortSettingConfig pvid(Integer pvid) {
    this.pvid = pvid;
    return this;
  }

  /**
   * Pvid(only for lan port.)
   * @return pvid
  */
  @ApiModelProperty(value = "Pvid(only for lan port.)")


  public Integer getPvid() {
    return pvid;
  }

  public void setPvid(Integer pvid) {
    this.pvid = pvid;
  }

  public GatewayPortSettingConfig flowControl(Boolean flowControl) {
    this.flowControl = flowControl;
    return this;
  }

  /**
   * Enable flow control or not.(When the port supports flow control.)
   * @return flowControl
  */
  @ApiModelProperty(value = "Enable flow control or not.(When the port supports flow control.)")


  public Boolean getFlowControl() {
    return flowControl;
  }

  public void setFlowControl(Boolean flowControl) {
    this.flowControl = flowControl;
  }

  public GatewayPortSettingConfig status(Integer status) {
    this.status = status;
    return this;
  }

  /**
   * Enable port or not, status should be a value as follows: 0: disable; 1: enable.(When the port supports status.)
   * @return status
  */
  @ApiModelProperty(value = "Enable port or not, status should be a value as follows: 0: disable; 1: enable.(When the port supports status.)")


  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  public GatewayPortSettingConfig poeMode(Integer poeMode) {
    this.poeMode = poeMode;
    return this;
  }

  /**
   * Enter a value as follows: 0: off; 1: 802.3at/af.
   * @return poeMode
  */
  @ApiModelProperty(value = "Enter a value as follows: 0: off; 1: 802.3at/af.")


  public Integer getPoeMode() {
    return poeMode;
  }

  public void setPoeMode(Integer poeMode) {
    this.poeMode = poeMode;
  }

  public GatewayPortSettingConfig dslSettings(DslSettings dslSettings) {
    this.dslSettings = dslSettings;
    return this;
  }

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

  @Valid

  public DslSettings getDslSettings() {
    return dslSettings;
  }

  public void setDslSettings(DslSettings dslSettings) {
    this.dslSettings = dslSettings;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GatewayPortSettingConfig gatewayPortSettingConfig = (GatewayPortSettingConfig) o;
    return Objects.equals(this.linkSpeed, gatewayPortSettingConfig.linkSpeed) &&
        Objects.equals(this.duplex, gatewayPortSettingConfig.duplex) &&
        Objects.equals(this.mirrorEnable, gatewayPortSettingConfig.mirrorEnable) &&
        Objects.equals(this.mirroredPorts, gatewayPortSettingConfig.mirroredPorts) &&
        Objects.equals(this.mirrorMode, gatewayPortSettingConfig.mirrorMode) &&
        Objects.equals(this.pvid, gatewayPortSettingConfig.pvid) &&
        Objects.equals(this.flowControl, gatewayPortSettingConfig.flowControl) &&
        Objects.equals(this.status, gatewayPortSettingConfig.status) &&
        Objects.equals(this.poeMode, gatewayPortSettingConfig.poeMode) &&
        Objects.equals(this.dslSettings, gatewayPortSettingConfig.dslSettings);
  }

  @Override
  public int hashCode() {
    return Objects.hash(linkSpeed, duplex, mirrorEnable, mirroredPorts, mirrorMode, pvid, flowControl, status, poeMode, dslSettings);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GatewayPortSettingConfig {\n");
    
    sb.append("    linkSpeed: ").append(toIndentedString(linkSpeed)).append("\n");
    sb.append("    duplex: ").append(toIndentedString(duplex)).append("\n");
    sb.append("    mirrorEnable: ").append(toIndentedString(mirrorEnable)).append("\n");
    sb.append("    mirroredPorts: ").append(toIndentedString(mirroredPorts)).append("\n");
    sb.append("    mirrorMode: ").append(toIndentedString(mirrorMode)).append("\n");
    sb.append("    pvid: ").append(toIndentedString(pvid)).append("\n");
    sb.append("    flowControl: ").append(toIndentedString(flowControl)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    poeMode: ").append(toIndentedString(poeMode)).append("\n");
    sb.append("    dslSettings: ").append(toIndentedString(dslSettings)).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    ");
  }
}

