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

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

public class NetworkPortsAssociationVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("name")
  private String name;

  @JsonProperty("vlan")
  private Integer vlan;

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

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

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

  public NetworkPortsAssociationVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Network's ID
   * @return id
  */
  @ApiModelProperty(value = "Network's ID")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

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

  /**
   * Network's name
   * @return name
  */
  @ApiModelProperty(value = "Network's name")


  public String getName() {
    return name;
  }

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

  public NetworkPortsAssociationVo vlan(Integer vlan) {
    this.vlan = vlan;
    return this;
  }

  /**
   * VLAN ID
   * @return vlan
  */
  @ApiModelProperty(value = "VLAN ID")


  public Integer getVlan() {
    return vlan;
  }

  public void setVlan(Integer vlan) {
    this.vlan = vlan;
  }

  public NetworkPortsAssociationVo nativePorts(List<Integer> nativePorts) {
    this.nativePorts = nativePorts;
    return this;
  }

  public NetworkPortsAssociationVo addNativePortsItem(Integer nativePortsItem) {
    if (this.nativePorts == null) {
      this.nativePorts = new ArrayList<>();
    }
    this.nativePorts.add(nativePortsItem);
    return this;
  }

  /**
   * Native ports list
   * @return nativePorts
  */
  @ApiModelProperty(value = "Native ports list")


  public List<Integer> getNativePorts() {
    return nativePorts;
  }

  public void setNativePorts(List<Integer> nativePorts) {
    this.nativePorts = nativePorts;
  }

  public NetworkPortsAssociationVo untaggedPorts(List<Integer> untaggedPorts) {
    this.untaggedPorts = untaggedPorts;
    return this;
  }

  public NetworkPortsAssociationVo addUntaggedPortsItem(Integer untaggedPortsItem) {
    if (this.untaggedPorts == null) {
      this.untaggedPorts = new ArrayList<>();
    }
    this.untaggedPorts.add(untaggedPortsItem);
    return this;
  }

  /**
   * Untagged ports list
   * @return untaggedPorts
  */
  @ApiModelProperty(value = "Untagged ports list")


  public List<Integer> getUntaggedPorts() {
    return untaggedPorts;
  }

  public void setUntaggedPorts(List<Integer> untaggedPorts) {
    this.untaggedPorts = untaggedPorts;
  }

  public NetworkPortsAssociationVo taggedPorts(List<Integer> taggedPorts) {
    this.taggedPorts = taggedPorts;
    return this;
  }

  public NetworkPortsAssociationVo addTaggedPortsItem(Integer taggedPortsItem) {
    if (this.taggedPorts == null) {
      this.taggedPorts = new ArrayList<>();
    }
    this.taggedPorts.add(taggedPortsItem);
    return this;
  }

  /**
   * Tagged ports list
   * @return taggedPorts
  */
  @ApiModelProperty(value = "Tagged ports list")


  public List<Integer> getTaggedPorts() {
    return taggedPorts;
  }

  public void setTaggedPorts(List<Integer> taggedPorts) {
    this.taggedPorts = taggedPorts;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    NetworkPortsAssociationVo networkPortsAssociationVo = (NetworkPortsAssociationVo) o;
    return Objects.equals(this.id, networkPortsAssociationVo.id) &&
        Objects.equals(this.name, networkPortsAssociationVo.name) &&
        Objects.equals(this.vlan, networkPortsAssociationVo.vlan) &&
        Objects.equals(this.nativePorts, networkPortsAssociationVo.nativePorts) &&
        Objects.equals(this.untaggedPorts, networkPortsAssociationVo.untaggedPorts) &&
        Objects.equals(this.taggedPorts, networkPortsAssociationVo.taggedPorts);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, vlan, nativePorts, untaggedPorts, taggedPorts);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class NetworkPortsAssociationVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    vlan: ").append(toIndentedString(vlan)).append("\n");
    sb.append("    nativePorts: ").append(toIndentedString(nativePorts)).append("\n");
    sb.append("    untaggedPorts: ").append(toIndentedString(untaggedPorts)).append("\n");
    sb.append("    taggedPorts: ").append(toIndentedString(taggedPorts)).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    ");
  }
}

