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;

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

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

  @JsonProperty("mac")
  private String mac;

  @JsonProperty("model")
  private String model;

  @JsonProperty("version")
  private String version;

  @JsonProperty("status")
  private String status;

  @JsonProperty("statusCategory")
  private Integer statusCategory;

  @JsonProperty("addedInAdvanced")
  private Boolean addedInAdvanced;

  @JsonProperty("ports")
  @Valid
  private List<Dot1xPortInfoOpenApiVo> ports = null;

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

  /**
   * Switch name
   * @return name
  */
  @ApiModelProperty(value = "Switch name")


  public String getName() {
    return name;
  }

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

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

  /**
   * Switch MAC address
   * @return mac
  */
  @ApiModelProperty(value = "Switch MAC address")


  public String getMac() {
    return mac;
  }

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

  public Dot1xSwitchInfoOpenApiVo model(String model) {
    this.model = model;
    return this;
  }

  /**
   * Switch model
   * @return model
  */
  @ApiModelProperty(value = "Switch model")


  public String getModel() {
    return model;
  }

  public void setModel(String model) {
    this.model = model;
  }

  public Dot1xSwitchInfoOpenApiVo version(String version) {
    this.version = version;
    return this;
  }

  /**
   * Switch firmwareVersion
   * @return version
  */
  @ApiModelProperty(value = "Switch firmwareVersion")


  public String getVersion() {
    return version;
  }

  public void setVersion(String version) {
    this.version = version;
  }

  public Dot1xSwitchInfoOpenApiVo status(String status) {
    this.status = status;
    return this;
  }

  /**
   * Device status
   * @return status
  */
  @ApiModelProperty(value = "Device status")


  public String getStatus() {
    return status;
  }

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

  public Dot1xSwitchInfoOpenApiVo statusCategory(Integer statusCategory) {
    this.statusCategory = statusCategory;
    return this;
  }

  /**
   * Device status category, 0: Disconnected, 1: Connected, 2: Pending,3: Heartbeat Missed, 4: Isolated
   * @return statusCategory
  */
  @ApiModelProperty(value = "Device status category, 0: Disconnected, 1: Connected, 2: Pending,3: Heartbeat Missed, 4: Isolated")


  public Integer getStatusCategory() {
    return statusCategory;
  }

  public void setStatusCategory(Integer statusCategory) {
    this.statusCategory = statusCategory;
  }

  public Dot1xSwitchInfoOpenApiVo addedInAdvanced(Boolean addedInAdvanced) {
    this.addedInAdvanced = addedInAdvanced;
    return this;
  }

  /**
   * Whether the device is added offline
   * @return addedInAdvanced
  */
  @ApiModelProperty(value = "Whether the device is added offline")


  public Boolean getAddedInAdvanced() {
    return addedInAdvanced;
  }

  public void setAddedInAdvanced(Boolean addedInAdvanced) {
    this.addedInAdvanced = addedInAdvanced;
  }

  public Dot1xSwitchInfoOpenApiVo ports(List<Dot1xPortInfoOpenApiVo> ports) {
    this.ports = ports;
    return this;
  }

  public Dot1xSwitchInfoOpenApiVo addPortsItem(Dot1xPortInfoOpenApiVo portsItem) {
    if (this.ports == null) {
      this.ports = new ArrayList<>();
    }
    this.ports.add(portsItem);
    return this;
  }

  /**
   * Switch port information
   * @return ports
  */
  @ApiModelProperty(value = "Switch port information")

  @Valid

  public List<Dot1xPortInfoOpenApiVo> getPorts() {
    return ports;
  }

  public void setPorts(List<Dot1xPortInfoOpenApiVo> ports) {
    this.ports = ports;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Dot1xSwitchInfoOpenApiVo dot1xSwitchInfoOpenApiVo = (Dot1xSwitchInfoOpenApiVo) o;
    return Objects.equals(this.name, dot1xSwitchInfoOpenApiVo.name) &&
        Objects.equals(this.mac, dot1xSwitchInfoOpenApiVo.mac) &&
        Objects.equals(this.model, dot1xSwitchInfoOpenApiVo.model) &&
        Objects.equals(this.version, dot1xSwitchInfoOpenApiVo.version) &&
        Objects.equals(this.status, dot1xSwitchInfoOpenApiVo.status) &&
        Objects.equals(this.statusCategory, dot1xSwitchInfoOpenApiVo.statusCategory) &&
        Objects.equals(this.addedInAdvanced, dot1xSwitchInfoOpenApiVo.addedInAdvanced) &&
        Objects.equals(this.ports, dot1xSwitchInfoOpenApiVo.ports);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, mac, model, version, status, statusCategory, addedInAdvanced, ports);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Dot1xSwitchInfoOpenApiVo {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
    sb.append("    model: ").append(toIndentedString(model)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    statusCategory: ").append(toIndentedString(statusCategory)).append("\n");
    sb.append("    addedInAdvanced: ").append(toIndentedString(addedInAdvanced)).append("\n");
    sb.append("    ports: ").append(toIndentedString(ports)).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    ");
  }
}

