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

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

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

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

public class Dot1xSwitchOpenApiVo   {
  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("radiusProfileId")
  private String radiusProfileId;

  @JsonProperty("authMode")
  private Integer authMode;

  @JsonProperty("authType")
  private Integer authType;

  @JsonProperty("vlanAssign")
  private Boolean vlanAssign;

  @JsonProperty("mab")
  private Boolean mab;

  @JsonProperty("macFormat")
  private Integer macFormat;

  @JsonProperty("switches")
  @Valid
  private List<Dot1xSwitchSettingOpenApiVo> switches = null;

  public Dot1xSwitchOpenApiVo enable(Boolean enable) {
    this.enable = enable;
    return this;
  }

  /**
   * Switch 802.1x function enable status
   * @return enable
  */
  @ApiModelProperty(required = true, value = "Switch 802.1x function enable status")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

  public void setEnable(Boolean enable) {
    this.enable = enable;
  }

  public Dot1xSwitchOpenApiVo radiusProfileId(String radiusProfileId) {
    this.radiusProfileId = radiusProfileId;
    return this;
  }

  /**
   * This field represents radius profile ID. Radius profile can be created using 'Create a new Radius profile' ('Create a new Radius profile template') interface, and radius profile ID can be obtained from 'Get Radius profile list' ('Get Radius profile template list') interface
   * @return radiusProfileId
  */
  @ApiModelProperty(value = "This field represents radius profile ID. Radius profile can be created using 'Create a new Radius profile' ('Create a new Radius profile template') interface, and radius profile ID can be obtained from 'Get Radius profile list' ('Get Radius profile template list') interface")


  public String getRadiusProfileId() {
    return radiusProfileId;
  }

  public void setRadiusProfileId(String radiusProfileId) {
    this.radiusProfileId = radiusProfileId;
  }

  public Dot1xSwitchOpenApiVo authMode(Integer authMode) {
    this.authMode = authMode;
    return this;
  }

  /**
   * Mode of authentication protocol. AuthMode should be a value as follows: 0: PAP, 1: EAP
   * @return authMode
  */
  @ApiModelProperty(value = "Mode of authentication protocol. AuthMode should be a value as follows: 0: PAP, 1: EAP")


  public Integer getAuthMode() {
    return authMode;
  }

  public void setAuthMode(Integer authMode) {
    this.authMode = authMode;
  }

  public Dot1xSwitchOpenApiVo authType(Integer authType) {
    this.authType = authType;
    return this;
  }

  /**
   * Type of the authentication. AuthType should be a value as follows: 0: MAC based, 1: Port based
   * @return authType
  */
  @ApiModelProperty(value = "Type of the authentication. AuthType should be a value as follows: 0: MAC based, 1: Port based")


  public Integer getAuthType() {
    return authType;
  }

  public void setAuthType(Integer authType) {
    this.authType = authType;
  }

  public Dot1xSwitchOpenApiVo vlanAssign(Boolean vlanAssign) {
    this.vlanAssign = vlanAssign;
    return this;
  }

  /**
   * VLAN Assignment enable status
   * @return vlanAssign
  */
  @ApiModelProperty(value = "VLAN Assignment enable status")


  public Boolean getVlanAssign() {
    return vlanAssign;
  }

  public void setVlanAssign(Boolean vlanAssign) {
    this.vlanAssign = vlanAssign;
  }

  public Dot1xSwitchOpenApiVo mab(Boolean mab) {
    this.mab = mab;
    return this;
  }

  /**
   * MAB enable status
   * @return mab
  */
  @ApiModelProperty(value = "MAB enable status")


  public Boolean getMab() {
    return mab;
  }

  public void setMab(Boolean mab) {
    this.mab = mab;
  }

  public Dot1xSwitchOpenApiVo macFormat(Integer macFormat) {
    this.macFormat = macFormat;
    return this;
  }

  /**
   * Format of the MAC address. MacFormat should be a value as follows: 0: aabbccddeeff, 1: aa-bb-cc-dd-ee-ff, 2: aa:bb:cc:dd:ee:ff, 3: AABBCCDDEEFF, 4: AA-BB-CC-DD-EE-FF, 5: AA:BB:CC:DD:EE:FF
   * @return macFormat
  */
  @ApiModelProperty(value = "Format of the MAC address. MacFormat should be a value as follows: 0: aabbccddeeff, 1: aa-bb-cc-dd-ee-ff, 2: aa:bb:cc:dd:ee:ff, 3: AABBCCDDEEFF, 4: AA-BB-CC-DD-EE-FF, 5: AA:BB:CC:DD:EE:FF")


  public Integer getMacFormat() {
    return macFormat;
  }

  public void setMacFormat(Integer macFormat) {
    this.macFormat = macFormat;
  }

  public Dot1xSwitchOpenApiVo switches(List<Dot1xSwitchSettingOpenApiVo> switches) {
    this.switches = switches;
    return this;
  }

  public Dot1xSwitchOpenApiVo addSwitchesItem(Dot1xSwitchSettingOpenApiVo switchesItem) {
    if (this.switches == null) {
      this.switches = new ArrayList<>();
    }
    this.switches.add(switchesItem);
    return this;
  }

  /**
   * Enabled switch ports, optional when update switch 802.1x setting
   * @return switches
  */
  @ApiModelProperty(value = "Enabled switch ports, optional when update switch 802.1x setting")

  @Valid

  public List<Dot1xSwitchSettingOpenApiVo> getSwitches() {
    return switches;
  }

  public void setSwitches(List<Dot1xSwitchSettingOpenApiVo> switches) {
    this.switches = switches;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Dot1xSwitchOpenApiVo dot1xSwitchOpenApiVo = (Dot1xSwitchOpenApiVo) o;
    return Objects.equals(this.enable, dot1xSwitchOpenApiVo.enable) &&
        Objects.equals(this.radiusProfileId, dot1xSwitchOpenApiVo.radiusProfileId) &&
        Objects.equals(this.authMode, dot1xSwitchOpenApiVo.authMode) &&
        Objects.equals(this.authType, dot1xSwitchOpenApiVo.authType) &&
        Objects.equals(this.vlanAssign, dot1xSwitchOpenApiVo.vlanAssign) &&
        Objects.equals(this.mab, dot1xSwitchOpenApiVo.mab) &&
        Objects.equals(this.macFormat, dot1xSwitchOpenApiVo.macFormat) &&
        Objects.equals(this.switches, dot1xSwitchOpenApiVo.switches);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, radiusProfileId, authMode, authType, vlanAssign, mab, macFormat, switches);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Dot1xSwitchOpenApiVo {\n");
    
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    radiusProfileId: ").append(toIndentedString(radiusProfileId)).append("\n");
    sb.append("    authMode: ").append(toIndentedString(authMode)).append("\n");
    sb.append("    authType: ").append(toIndentedString(authType)).append("\n");
    sb.append("    vlanAssign: ").append(toIndentedString(vlanAssign)).append("\n");
    sb.append("    mab: ").append(toIndentedString(mab)).append("\n");
    sb.append("    macFormat: ").append(toIndentedString(macFormat)).append("\n");
    sb.append("    switches: ").append(toIndentedString(switches)).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    ");
  }
}

