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

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

public class OuiBasedVlanApQueryOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("name")
  private String name;

  @JsonProperty("ssidList")
  @Valid
  private List<SsidOuiModeOpenApiVo> ssidList = null;

  @JsonProperty("ruleCombine")
  @Valid
  private List<VlanOuiModeQueryOpenApiVo> ruleCombine = null;

  public OuiBasedVlanApQueryOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Rule ID
   * @return id
  */
  @ApiModelProperty(value = "Rule ID")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

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

  /**
   * Ap Rule state.
   * @return enable
  */
  @ApiModelProperty(value = "Ap Rule state.")


  public Boolean getEnable() {
    return enable;
  }

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

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

  /**
   * Ap Rule name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(value = "Ap Rule name should contain 1 to 128 characters.")

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

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

  public OuiBasedVlanApQueryOpenApiVo ssidList(List<SsidOuiModeOpenApiVo> ssidList) {
    this.ssidList = ssidList;
    return this;
  }

  public OuiBasedVlanApQueryOpenApiVo addSsidListItem(SsidOuiModeOpenApiVo ssidListItem) {
    if (this.ssidList == null) {
      this.ssidList = new ArrayList<>();
    }
    this.ssidList.add(ssidListItem);
    return this;
  }

  /**
   * Configured ssid list.
   * @return ssidList
  */
  @ApiModelProperty(value = "Configured ssid list.")

  @Valid

  public List<SsidOuiModeOpenApiVo> getSsidList() {
    return ssidList;
  }

  public void setSsidList(List<SsidOuiModeOpenApiVo> ssidList) {
    this.ssidList = ssidList;
  }

  public OuiBasedVlanApQueryOpenApiVo ruleCombine(List<VlanOuiModeQueryOpenApiVo> ruleCombine) {
    this.ruleCombine = ruleCombine;
    return this;
  }

  public OuiBasedVlanApQueryOpenApiVo addRuleCombineItem(VlanOuiModeQueryOpenApiVo ruleCombineItem) {
    if (this.ruleCombine == null) {
      this.ruleCombine = new ArrayList<>();
    }
    this.ruleCombine.add(ruleCombineItem);
    return this;
  }

  /**
   * Basic vlan-oui-priority configuration of oui based rule.
   * @return ruleCombine
  */
  @ApiModelProperty(value = "Basic vlan-oui-priority configuration of oui based rule.")

  @Valid

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

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


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

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

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

