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

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

public class Dot1xEapSettingOpenApiVo   {
  @JsonProperty("mac")
  private String mac;

  @JsonProperty("dot1xPorts")
  @Valid
  private List<String> dot1xPorts = null;

  @JsonProperty("mabPorts")
  @Valid
  private List<String> mabPorts = null;

  public Dot1xEapSettingOpenApiVo mac(String mac) {
    this.mac = mac;
    return this;
  }

  /**
   * MAC address of the EAP
   * @return mac
  */
  @ApiModelProperty(required = true, value = "MAC address of the EAP")
  @NotNull

@Pattern(regexp="[A-Fa-f0-9]{1}[02468aceACE]{1}([-:][A-Fa-f0-9]{2}){5}") 
  public String getMac() {
    return mac;
  }

  public void setMac(String mac) {
    this.mac = mac;
  }

  public Dot1xEapSettingOpenApiVo dot1xPorts(List<String> dot1xPorts) {
    this.dot1xPorts = dot1xPorts;
    return this;
  }

  public Dot1xEapSettingOpenApiVo addDot1xPortsItem(String dot1xPortsItem) {
    if (this.dot1xPorts == null) {
      this.dot1xPorts = new ArrayList<>();
    }
    this.dot1xPorts.add(dot1xPortsItem);
    return this;
  }

  /**
   * EAP 802.1x enabled ports
   * @return dot1xPorts
  */
  @ApiModelProperty(value = "EAP 802.1x enabled ports")


  public List<String> getDot1xPorts() {
    return dot1xPorts;
  }

  public void setDot1xPorts(List<String> dot1xPorts) {
    this.dot1xPorts = dot1xPorts;
  }

  public Dot1xEapSettingOpenApiVo mabPorts(List<String> mabPorts) {
    this.mabPorts = mabPorts;
    return this;
  }

  public Dot1xEapSettingOpenApiVo addMabPortsItem(String mabPortsItem) {
    if (this.mabPorts == null) {
      this.mabPorts = new ArrayList<>();
    }
    this.mabPorts.add(mabPortsItem);
    return this;
  }

  /**
   * EAP MAB enabled ports
   * @return mabPorts
  */
  @ApiModelProperty(value = "EAP MAB enabled ports")


  public List<String> getMabPorts() {
    return mabPorts;
  }

  public void setMabPorts(List<String> mabPorts) {
    this.mabPorts = mabPorts;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Dot1xEapSettingOpenApiVo dot1xEapSettingOpenApiVo = (Dot1xEapSettingOpenApiVo) o;
    return Objects.equals(this.mac, dot1xEapSettingOpenApiVo.mac) &&
        Objects.equals(this.dot1xPorts, dot1xEapSettingOpenApiVo.dot1xPorts) &&
        Objects.equals(this.mabPorts, dot1xEapSettingOpenApiVo.mabPorts);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mac, dot1xPorts, mabPorts);
  }

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

