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.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * When mode is 0, should configure device info.
 */
@ApiModel(description = "When mode is 0, should configure device info.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class DeviceOuiModeOpenApiVo   {
  @JsonProperty("deviceMac")
  private String deviceMac;

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

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

  public DeviceOuiModeOpenApiVo deviceMac(String deviceMac) {
    this.deviceMac = deviceMac;
    return this;
  }

  /**
   * Device MAC. E.g. AA-BB-CC-DD-11-22 . When \"oldFirmwareDevice\" is true, deivce should configure in only one OUI Based VLAN rule.
   * @return deviceMac
  */
  @ApiModelProperty(required = true, value = "Device MAC. E.g. AA-BB-CC-DD-11-22 . When \"oldFirmwareDevice\" is true, deivce should configure in only one OUI Based VLAN rule.")
  @NotNull


  public String getDeviceMac() {
    return deviceMac;
  }

  public void setDeviceMac(String deviceMac) {
    this.deviceMac = deviceMac;
  }

  public DeviceOuiModeOpenApiVo portList(List<Integer> portList) {
    this.portList = portList;
    return this;
  }

  public DeviceOuiModeOpenApiVo addPortListItem(Integer portListItem) {
    if (this.portList == null) {
      this.portList = new ArrayList<>();
    }
    this.portList.add(portListItem);
    return this;
  }

  /**
   * Device port list.
   * @return portList
  */
  @ApiModelProperty(value = "Device port list.")


  public List<Integer> getPortList() {
    return portList;
  }

  public void setPortList(List<Integer> portList) {
    this.portList = portList;
  }

  public DeviceOuiModeOpenApiVo lagList(List<Integer> lagList) {
    this.lagList = lagList;
    return this;
  }

  public DeviceOuiModeOpenApiVo addLagListItem(Integer lagListItem) {
    if (this.lagList == null) {
      this.lagList = new ArrayList<>();
    }
    this.lagList.add(lagListItem);
    return this;
  }

  /**
   * Device lag list.
   * @return lagList
  */
  @ApiModelProperty(value = "Device lag list.")


  public List<Integer> getLagList() {
    return lagList;
  }

  public void setLagList(List<Integer> lagList) {
    this.lagList = lagList;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DeviceOuiModeOpenApiVo deviceOuiModeOpenApiVo = (DeviceOuiModeOpenApiVo) o;
    return Objects.equals(this.deviceMac, deviceOuiModeOpenApiVo.deviceMac) &&
        Objects.equals(this.portList, deviceOuiModeOpenApiVo.portList) &&
        Objects.equals(this.lagList, deviceOuiModeOpenApiVo.lagList);
  }

  @Override
  public int hashCode() {
    return Objects.hash(deviceMac, portList, lagList);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DeviceOuiModeOpenApiVo {\n");
    
    sb.append("    deviceMac: ").append(toIndentedString(deviceMac)).append("\n");
    sb.append("    portList: ").append(toIndentedString(portList)).append("\n");
    sb.append("    lagList: ").append(toIndentedString(lagList)).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    ");
  }
}

