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

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

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("ssidIdList")
  @Valid
  private List<String> ssidIdList = new ArrayList<>();

  @JsonProperty("ruleCombine")
  @Valid
  private List<VlanOuiModeOpenApiVo> ruleCombine = new ArrayList<>();

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

  /**
   * Ap Rule state.
   * @return enable
  */
  @ApiModelProperty(required = true, value = "Ap Rule state.")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

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

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

  /**
   * Ap Rule name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "Ap Rule 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;
  }

  public OuiBasedVlanApOpenApiVo ssidIdList(List<String> ssidIdList) {
    this.ssidIdList = ssidIdList;
    return this;
  }

  public OuiBasedVlanApOpenApiVo addSsidIdListItem(String ssidIdListItem) {
    this.ssidIdList.add(ssidIdListItem);
    return this;
  }

  /**
   * Configured ssid list.
   * @return ssidIdList
  */
  @ApiModelProperty(required = true, value = "Configured ssid list.")
  @NotNull


  public List<String> getSsidIdList() {
    return ssidIdList;
  }

  public void setSsidIdList(List<String> ssidIdList) {
    this.ssidIdList = ssidIdList;
  }

  public OuiBasedVlanApOpenApiVo ruleCombine(List<VlanOuiModeOpenApiVo> ruleCombine) {
    this.ruleCombine = ruleCombine;
    return this;
  }

  public OuiBasedVlanApOpenApiVo addRuleCombineItem(VlanOuiModeOpenApiVo ruleCombineItem) {
    this.ruleCombine.add(ruleCombineItem);
    return this;
  }

  /**
   * Basic vlan-oui-priority configuration of oui based vlan rule. Cannot be empty.
   * @return ruleCombine
  */
  @ApiModelProperty(required = true, value = "Basic vlan-oui-priority configuration of oui based vlan rule. Cannot be empty.")
  @NotNull

  @Valid

  public List<VlanOuiModeOpenApiVo> getRuleCombine() {
    return ruleCombine;
  }

  public void setRuleCombine(List<VlanOuiModeOpenApiVo> ruleCombine) {
    this.ruleCombine = ruleCombine;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OuiBasedVlanApOpenApiVo ouiBasedVlanApOpenApiVo = (OuiBasedVlanApOpenApiVo) o;
    return Objects.equals(this.enable, ouiBasedVlanApOpenApiVo.enable) &&
        Objects.equals(this.name, ouiBasedVlanApOpenApiVo.name) &&
        Objects.equals(this.ssidIdList, ouiBasedVlanApOpenApiVo.ssidIdList) &&
        Objects.equals(this.ruleCombine, ouiBasedVlanApOpenApiVo.ruleCombine);
  }

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

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

