package org.wfc.omada.api.device.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class PortNameList   {
  @JsonProperty("portNameList")
  @Valid
  private List<SwitchMultiPortName> portNameList = new ArrayList<>();

  public PortNameList portNameList(List<SwitchMultiPortName> portNameList) {
    this.portNameList = portNameList;
    return this;
  }

  public PortNameList addPortNameListItem(SwitchMultiPortName portNameListItem) {
    this.portNameList.add(portNameListItem);
    return this;
  }

  /**
   * Port name list
   * @return portNameList
  */
  @ApiModelProperty(required = true, value = "Port name list")
  @NotNull

  @Valid
@Size(min=1,max=2147483647) 
  public List<SwitchMultiPortName> getPortNameList() {
    return portNameList;
  }

  public void setPortNameList(List<SwitchMultiPortName> portNameList) {
    this.portNameList = portNameList;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PortNameList portNameList = (PortNameList) o;
    return Objects.equals(this.portNameList, portNameList.portNameList);
  }

  @Override
  public int hashCode() {
    return Objects.hash(portNameList);
  }

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

