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.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

public class SwitchMultiPortName   {
  @JsonProperty("port")
  private Integer port;

  @JsonProperty("name")
  private String name;

  public SwitchMultiPortName port(Integer port) {
    this.port = port;
    return this;
  }

  /**
   * Port ID
   * @return port
  */
  @ApiModelProperty(required = true, value = "Port ID")
  @NotNull


  public Integer getPort() {
    return port;
  }

  public void setPort(Integer port) {
    this.port = port;
  }

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

  /**
   * Port name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "Port name should contain 1 to 128 characters.")
  @NotNull

@Pattern(regexp="^[^ ?\"]$|^[^ ?\"][^?\"]{0,126}[^ ?\"]$") 
  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;
    }
    SwitchMultiPortName switchMultiPortName = (SwitchMultiPortName) o;
    return Objects.equals(this.port, switchMultiPortName.port) &&
        Objects.equals(this.name, switchMultiPortName.name);
  }

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

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

