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

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

public class OuiBasedVlanSwitchInfoOpenApiVo   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("mac")
  private String mac;

  @JsonProperty("oldFirmwareDevice")
  private Boolean oldFirmwareDevice;

  @JsonProperty("configuredInOuiId")
  private String configuredInOuiId;

  @JsonProperty("portNum")
  private Integer portNum;

  @JsonProperty("lags")
  @Valid
  private List<LagInfoOpenApiVo> lags = null;

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

  /**
   * Device name.
   * @return name
  */
  @ApiModelProperty(value = "Device name.")


  public String getName() {
    return name;
  }

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

  public OuiBasedVlanSwitchInfoOpenApiVo mac(String mac) {
    this.mac = mac;
    return this;
  }

  /**
   * Device mac.
   * @return mac
  */
  @ApiModelProperty(value = "Device mac.")


  public String getMac() {
    return mac;
  }

  public void setMac(String mac) {
    this.mac = mac;
  }

  public OuiBasedVlanSwitchInfoOpenApiVo oldFirmwareDevice(Boolean oldFirmwareDevice) {
    this.oldFirmwareDevice = oldFirmwareDevice;
    return this;
  }

  /**
   * If switch supports only one oui combine, this key word is \"true\"
   * @return oldFirmwareDevice
  */
  @ApiModelProperty(value = "If switch supports only one oui combine, this key word is \"true\"")


  public Boolean getOldFirmwareDevice() {
    return oldFirmwareDevice;
  }

  public void setOldFirmwareDevice(Boolean oldFirmwareDevice) {
    this.oldFirmwareDevice = oldFirmwareDevice;
  }

  public OuiBasedVlanSwitchInfoOpenApiVo configuredInOuiId(String configuredInOuiId) {
    this.configuredInOuiId = configuredInOuiId;
    return this;
  }

  /**
   * Indicate ID of \"oldFirmwareDevice\" is configured in specific oui based vlan.
   * @return configuredInOuiId
  */
  @ApiModelProperty(value = "Indicate ID of \"oldFirmwareDevice\" is configured in specific oui based vlan.")


  public String getConfiguredInOuiId() {
    return configuredInOuiId;
  }

  public void setConfiguredInOuiId(String configuredInOuiId) {
    this.configuredInOuiId = configuredInOuiId;
  }

  public OuiBasedVlanSwitchInfoOpenApiVo portNum(Integer portNum) {
    this.portNum = portNum;
    return this;
  }

  /**
   * Switch port number. Valid port range is from 1 to \"portNum\"
   * @return portNum
  */
  @ApiModelProperty(value = "Switch port number. Valid port range is from 1 to \"portNum\"")


  public Integer getPortNum() {
    return portNum;
  }

  public void setPortNum(Integer portNum) {
    this.portNum = portNum;
  }

  public OuiBasedVlanSwitchInfoOpenApiVo lags(List<LagInfoOpenApiVo> lags) {
    this.lags = lags;
    return this;
  }

  public OuiBasedVlanSwitchInfoOpenApiVo addLagsItem(LagInfoOpenApiVo lagsItem) {
    if (this.lags == null) {
      this.lags = new ArrayList<>();
    }
    this.lags.add(lagsItem);
    return this;
  }

  /**
   * Switch lag info list.
   * @return lags
  */
  @ApiModelProperty(value = "Switch lag info list.")

  @Valid

  public List<LagInfoOpenApiVo> getLags() {
    return lags;
  }

  public void setLags(List<LagInfoOpenApiVo> lags) {
    this.lags = lags;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OuiBasedVlanSwitchInfoOpenApiVo ouiBasedVlanSwitchInfoOpenApiVo = (OuiBasedVlanSwitchInfoOpenApiVo) o;
    return Objects.equals(this.name, ouiBasedVlanSwitchInfoOpenApiVo.name) &&
        Objects.equals(this.mac, ouiBasedVlanSwitchInfoOpenApiVo.mac) &&
        Objects.equals(this.oldFirmwareDevice, ouiBasedVlanSwitchInfoOpenApiVo.oldFirmwareDevice) &&
        Objects.equals(this.configuredInOuiId, ouiBasedVlanSwitchInfoOpenApiVo.configuredInOuiId) &&
        Objects.equals(this.portNum, ouiBasedVlanSwitchInfoOpenApiVo.portNum) &&
        Objects.equals(this.lags, ouiBasedVlanSwitchInfoOpenApiVo.lags);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, mac, oldFirmwareDevice, configuredInOuiId, portNum, lags);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class OuiBasedVlanSwitchInfoOpenApiVo {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
    sb.append("    oldFirmwareDevice: ").append(toIndentedString(oldFirmwareDevice)).append("\n");
    sb.append("    configuredInOuiId: ").append(toIndentedString(configuredInOuiId)).append("\n");
    sb.append("    portNum: ").append(toIndentedString(portNum)).append("\n");
    sb.append("    lags: ").append(toIndentedString(lags)).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    ");
  }
}

