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;

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

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

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

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

  @JsonProperty("imbPass")
  private Boolean imbPass;

  @JsonProperty("garp")
  private Boolean garp;

  @JsonProperty("interval")
  private Integer interval;

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

  /**
   * Enable of the IP MAC binding general setting, If applied, fill in at least one of LAN and WAN.
   * @return enable
  */
  @ApiModelProperty(required = true, value = "Enable of the IP MAC binding general setting, If applied, fill in at least one of LAN and WAN.")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

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

  public IpMacBindingGeneralSetting lanIds(List<String> lanIds) {
    this.lanIds = lanIds;
    return this;
  }

  public IpMacBindingGeneralSetting addLanIdsItem(String lanIdsItem) {
    if (this.lanIds == null) {
      this.lanIds = new ArrayList<>();
    }
    this.lanIds.add(lanIdsItem);
    return this;
  }

  /**
   * LANs of the IP MAC binding general setting. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface.
   * @return lanIds
  */
  @ApiModelProperty(value = "LANs of the IP MAC binding general setting. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface.")


  public List<String> getLanIds() {
    return lanIds;
  }

  public void setLanIds(List<String> lanIds) {
    this.lanIds = lanIds;
  }

  public IpMacBindingGeneralSetting wanIds(List<String> wanIds) {
    this.wanIds = wanIds;
    return this;
  }

  public IpMacBindingGeneralSetting addWanIdsItem(String wanIdsItem) {
    if (this.wanIds == null) {
      this.wanIds = new ArrayList<>();
    }
    this.wanIds.add(wanIdsItem);
    return this;
  }

  /**
   * WANs of the IP MAC binding general setting. WAN port ID can be obtained from 'Get internet basic info' interface.
   * @return wanIds
  */
  @ApiModelProperty(value = "WANs of the IP MAC binding general setting. WAN port ID can be obtained from 'Get internet basic info' interface.")


  public List<String> getWanIds() {
    return wanIds;
  }

  public void setWanIds(List<String> wanIds) {
    this.wanIds = wanIds;
  }

  public IpMacBindingGeneralSetting imbPass(Boolean imbPass) {
    this.imbPass = imbPass;
    return this;
  }

  /**
   * ImbPass of the IP MAC binding general setting.
   * @return imbPass
  */
  @ApiModelProperty(value = "ImbPass of the IP MAC binding general setting.")


  public Boolean getImbPass() {
    return imbPass;
  }

  public void setImbPass(Boolean imbPass) {
    this.imbPass = imbPass;
  }

  public IpMacBindingGeneralSetting garp(Boolean garp) {
    this.garp = garp;
    return this;
  }

  /**
   * GARP of the IP MAC binding general setting.
   * @return garp
  */
  @ApiModelProperty(value = "GARP of the IP MAC binding general setting.")


  public Boolean getGarp() {
    return garp;
  }

  public void setGarp(Boolean garp) {
    this.garp = garp;
  }

  public IpMacBindingGeneralSetting interval(Integer interval) {
    this.interval = interval;
    return this;
  }

  /**
   * Interval should be within the range of 1–10000.
   * @return interval
  */
  @ApiModelProperty(value = "Interval should be within the range of 1–10000.")


  public Integer getInterval() {
    return interval;
  }

  public void setInterval(Integer interval) {
    this.interval = interval;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IpMacBindingGeneralSetting ipMacBindingGeneralSetting = (IpMacBindingGeneralSetting) o;
    return Objects.equals(this.enable, ipMacBindingGeneralSetting.enable) &&
        Objects.equals(this.lanIds, ipMacBindingGeneralSetting.lanIds) &&
        Objects.equals(this.wanIds, ipMacBindingGeneralSetting.wanIds) &&
        Objects.equals(this.imbPass, ipMacBindingGeneralSetting.imbPass) &&
        Objects.equals(this.garp, ipMacBindingGeneralSetting.garp) &&
        Objects.equals(this.interval, ipMacBindingGeneralSetting.interval);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, lanIds, wanIds, imbPass, garp, interval);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IpMacBindingGeneralSetting {\n");
    
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    lanIds: ").append(toIndentedString(lanIds)).append("\n");
    sb.append("    wanIds: ").append(toIndentedString(wanIds)).append("\n");
    sb.append("    imbPass: ").append(toIndentedString(imbPass)).append("\n");
    sb.append("    garp: ").append(toIndentedString(garp)).append("\n");
    sb.append("    interval: ").append(toIndentedString(interval)).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    ");
  }
}

