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

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

public class LagInfoOpenApiVo   {
  @JsonProperty("lag")
  private Integer lag;

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

  @JsonProperty("name")
  private String name;

  public LagInfoOpenApiVo lag(Integer lag) {
    this.lag = lag;
    return this;
  }

  /**
   * Lag number.
   * @return lag
  */
  @ApiModelProperty(value = "Lag number.")


  public Integer getLag() {
    return lag;
  }

  public void setLag(Integer lag) {
    this.lag = lag;
  }

  public LagInfoOpenApiVo ports(List<Integer> ports) {
    this.ports = ports;
    return this;
  }

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

  /**
   * Ports in lag
   * @return ports
  */
  @ApiModelProperty(value = "Ports in lag")


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

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

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

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


  public String getName() {
    return name;
  }

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LagInfoOpenApiVo lagInfoOpenApiVo = (LagInfoOpenApiVo) o;
    return Objects.equals(this.lag, lagInfoOpenApiVo.lag) &&
        Objects.equals(this.ports, lagInfoOpenApiVo.ports) &&
        Objects.equals(this.name, lagInfoOpenApiVo.name);
  }

  @Override
  public int hashCode() {
    return Objects.hash(lag, ports, name);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LagInfoOpenApiVo {\n");
    
    sb.append("    lag: ").append(toIndentedString(lag)).append("\n");
    sb.append("    ports: ").append(toIndentedString(ports)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).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    ");
  }
}

