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 List
 */
@ApiModel(description = "Port List")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:26:25.576+08:00[Asia/Shanghai]")

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("profileId")
  private String profileId;

  @JsonProperty("profileName")
  private String profileName;

  @JsonProperty("profileOverrideEnable")
  private Boolean profileOverrideEnable;

  @JsonProperty("poeMode")
  private Integer poeMode;

  @JsonProperty("lagPort")
  private Boolean lagPort;

  @JsonProperty("status")
  private Integer status;

  public PortInfo 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 PortInfo name(String name) {
    this.name = name;
    return this;
  }

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

@Pattern(regexp="^[^ ?\"]$|^[^ ?\"][^?\"]{0,126}[^ ?\"]$") 
  public String getName() {
    return name;
  }

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

  public PortInfo profileId(String profileId) {
    this.profileId = profileId;
    return this;
  }

  /**
   * Profile ID
   * @return profileId
  */
  @ApiModelProperty(required = true, value = "Profile ID")
  @NotNull


  public String getProfileId() {
    return profileId;
  }

  public void setProfileId(String profileId) {
    this.profileId = profileId;
  }

  public PortInfo profileName(String profileName) {
    this.profileName = profileName;
    return this;
  }

  /**
   * Profile Name
   * @return profileName
  */
  @ApiModelProperty(required = true, value = "Profile Name")
  @NotNull


  public String getProfileName() {
    return profileName;
  }

  public void setProfileName(String profileName) {
    this.profileName = profileName;
  }

  public PortInfo profileOverrideEnable(Boolean profileOverrideEnable) {
    this.profileOverrideEnable = profileOverrideEnable;
    return this;
  }

  /**
   * Profile Override Enable
   * @return profileOverrideEnable
  */
  @ApiModelProperty(required = true, value = "Profile Override Enable")
  @NotNull


  public Boolean getProfileOverrideEnable() {
    return profileOverrideEnable;
  }

  public void setProfileOverrideEnable(Boolean profileOverrideEnable) {
    this.profileOverrideEnable = profileOverrideEnable;
  }

  public PortInfo poeMode(Integer poeMode) {
    this.poeMode = poeMode;
    return this;
  }

  /**
   * PoE mode should be a value as follows: 1: on(802.3at/af); 0: off.
   * @return poeMode
  */
  @ApiModelProperty(required = true, value = "PoE mode should be a value as follows: 1: on(802.3at/af); 0: off.")
  @NotNull


  public Integer getPoeMode() {
    return poeMode;
  }

  public void setPoeMode(Integer poeMode) {
    this.poeMode = poeMode;
  }

  public PortInfo lagPort(Boolean lagPort) {
    this.lagPort = lagPort;
    return this;
  }

  /**
   * Whether this port exists in a LAG
   * @return lagPort
  */
  @ApiModelProperty(required = true, value = "Whether this port exists in a LAG")
  @NotNull


  public Boolean getLagPort() {
    return lagPort;
  }

  public void setLagPort(Boolean lagPort) {
    this.lagPort = lagPort;
  }

  public PortInfo status(Integer status) {
    this.status = status;
    return this;
  }

  /**
   * Status should be a value as follows: 0: off; 1: on, only when lagPort is false
   * @return status
  */
  @ApiModelProperty(required = true, value = "Status should be a value as follows: 0: off; 1: on, only when lagPort is false")
  @NotNull


  public Integer getStatus() {
    return status;
  }

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PortInfo portInfo = (PortInfo) o;
    return Objects.equals(this.port, portInfo.port) &&
        Objects.equals(this.name, portInfo.name) &&
        Objects.equals(this.profileId, portInfo.profileId) &&
        Objects.equals(this.profileName, portInfo.profileName) &&
        Objects.equals(this.profileOverrideEnable, portInfo.profileOverrideEnable) &&
        Objects.equals(this.poeMode, portInfo.poeMode) &&
        Objects.equals(this.lagPort, portInfo.lagPort) &&
        Objects.equals(this.status, portInfo.status);
  }

  @Override
  public int hashCode() {
    return Objects.hash(port, name, profileId, profileName, profileOverrideEnable, poeMode, lagPort, status);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PortInfo {\n");
    
    sb.append("    port: ").append(toIndentedString(port)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    profileId: ").append(toIndentedString(profileId)).append("\n");
    sb.append("    profileName: ").append(toIndentedString(profileName)).append("\n");
    sb.append("    profileOverrideEnable: ").append(toIndentedString(profileOverrideEnable)).append("\n");
    sb.append("    poeMode: ").append(toIndentedString(poeMode)).append("\n");
    sb.append("    lagPort: ").append(toIndentedString(lagPort)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).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    ");
  }
}

