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;

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

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("purpose")
  private Integer purpose;

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

  @JsonProperty("vlanType")
  private Integer vlanType;

  @JsonProperty("vlans")
  private String vlans;

  @JsonProperty("vlan")
  private Integer vlan;

  @JsonProperty("application")
  private Integer application;

  @JsonProperty("gatewaySubnet")
  private String gatewaySubnet;

  @JsonProperty("dhcpSettingsVO")
  private DhcpSettings dhcpSettingsVO;

  @JsonProperty("domain")
  private String domain;

  @JsonProperty("igmpSnoopEnable")
  private Boolean igmpSnoopEnable;

  @JsonProperty("mldSnoopEnable")
  private Boolean mldSnoopEnable;

  @JsonProperty("dhcpL2RelayEnable")
  private Boolean dhcpL2RelayEnable;

  @JsonProperty("dhcpGuard")
  private DhcpServersSetting dhcpGuard;

  @JsonProperty("dhcpv6Guard")
  private Dhcpv6ServersSetting dhcpv6Guard;

  @JsonProperty("portal")
  private Boolean portal;

  @JsonProperty("portalId")
  private String portalId;

  @JsonProperty("portalName")
  private String portalName;

  @JsonProperty("accessControlRule")
  private Boolean accessControlRule;

  @JsonProperty("rateLimit")
  private Boolean rateLimit;

  @JsonProperty("lanNeworkIpv6Config")
  private LanNetworkIpv6Config lanNeworkIpv6Config;

  @JsonProperty("allLan")
  private Boolean allLan;

  @JsonProperty("primary")
  private Boolean primary;

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

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


  public String getId() {
    return id;
  }

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

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

  /**
   * LAN network name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "LAN network 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 LanNetworkQueryOpenApiVo purpose(Integer purpose) {
    this.purpose = purpose;
    return this;
  }

  /**
   * LAN network purpose, 0: VLAN, 1: interface
   * @return purpose
  */
  @ApiModelProperty(required = true, value = "LAN network purpose, 0: VLAN, 1: interface")
  @NotNull


  public Integer getPurpose() {
    return purpose;
  }

  public void setPurpose(Integer purpose) {
    this.purpose = purpose;
  }

  public LanNetworkQueryOpenApiVo interfaceIds(List<String> interfaceIds) {
    this.interfaceIds = interfaceIds;
    return this;
  }

  public LanNetworkQueryOpenApiVo addInterfaceIdsItem(String interfaceIdsItem) {
    if (this.interfaceIds == null) {
      this.interfaceIds = new ArrayList<>();
    }
    this.interfaceIds.add(interfaceIdsItem);
    return this;
  }

  /**
   * Gateway LAN port IDs (acquired from \"Check WAN/LAN status\")
   * @return interfaceIds
  */
  @ApiModelProperty(value = "Gateway LAN port IDs (acquired from \"Check WAN/LAN status\")")


  public List<String> getInterfaceIds() {
    return interfaceIds;
  }

  public void setInterfaceIds(List<String> interfaceIds) {
    this.interfaceIds = interfaceIds;
  }

  public LanNetworkQueryOpenApiVo vlanType(Integer vlanType) {
    this.vlanType = vlanType;
    return this;
  }

  /**
   * When purpose is interface, VLANType is valid. 0: Single; 1: Multiple
   * @return vlanType
  */
  @ApiModelProperty(value = "When purpose is interface, VLANType is valid. 0: Single; 1: Multiple")


  public Integer getVlanType() {
    return vlanType;
  }

  public void setVlanType(Integer vlanType) {
    this.vlanType = vlanType;
  }

  public LanNetworkQueryOpenApiVo vlans(String vlans) {
    this.vlans = vlans;
    return this;
  }

  /**
   * When purpose is interface and VLANType is 1, batch create VLANs. VLAN format: 200, 1-100.
   * @return vlans
  */
  @ApiModelProperty(value = "When purpose is interface and VLANType is 1, batch create VLANs. VLAN format: 200, 1-100.")

@Pattern(regexp="^[\\d|\\d-\\d]+(,[\\d|\\d-\\d]+)*$") 
  public String getVlans() {
    return vlans;
  }

  public void setVlans(String vlans) {
    this.vlans = vlans;
  }

  public LanNetworkQueryOpenApiVo vlan(Integer vlan) {
    this.vlan = vlan;
    return this;
  }

  /**
   * When purpose is \"VLAN\" or purpose is \"interface\" and VLANType is 0, create VLAN. VLAN range 1 to 4090.
   * @return vlan
  */
  @ApiModelProperty(value = "When purpose is \"VLAN\" or purpose is \"interface\" and VLANType is 0, create VLAN. VLAN range 1 to 4090.")


  public Integer getVlan() {
    return vlan;
  }

  public void setVlan(Integer vlan) {
    this.vlan = vlan;
  }

  public LanNetworkQueryOpenApiVo application(Integer application) {
    this.application = application;
    return this;
  }

  /**
   * Effective device type. 0: Gateway, Switch; 1: Switch
   * @return application
  */
  @ApiModelProperty(value = "Effective device type. 0: Gateway, Switch; 1: Switch")


  public Integer getApplication() {
    return application;
  }

  public void setApplication(Integer application) {
    this.application = application;
  }

  public LanNetworkQueryOpenApiVo gatewaySubnet(String gatewaySubnet) {
    this.gatewaySubnet = gatewaySubnet;
    return this;
  }

  /**
   * When purpose is interface, gateway subnet is needed. Format: IP/Mask
   * @return gatewaySubnet
  */
  @ApiModelProperty(value = "When purpose is interface, gateway subnet is needed. Format: IP/Mask")

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])/(\\d|((1|2)\\d)|(30))\\b") 
  public String getGatewaySubnet() {
    return gatewaySubnet;
  }

  public void setGatewaySubnet(String gatewaySubnet) {
    this.gatewaySubnet = gatewaySubnet;
  }

  public LanNetworkQueryOpenApiVo dhcpSettingsVO(DhcpSettings dhcpSettingsVO) {
    this.dhcpSettingsVO = dhcpSettingsVO;
    return this;
  }

  /**
   * Get dhcpSettingsVO
   * @return dhcpSettingsVO
  */
  @ApiModelProperty(value = "")

  @Valid

  public DhcpSettings getDhcpSettingsVO() {
    return dhcpSettingsVO;
  }

  public void setDhcpSettingsVO(DhcpSettings dhcpSettingsVO) {
    this.dhcpSettingsVO = dhcpSettingsVO;
  }

  public LanNetworkQueryOpenApiVo domain(String domain) {
    this.domain = domain;
    return this;
  }

  /**
   * The domain of this network
   * @return domain
  */
  @ApiModelProperty(value = "The domain of this network")

@Pattern(regexp="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])){3}|([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})") 
  public String getDomain() {
    return domain;
  }

  public void setDomain(String domain) {
    this.domain = domain;
  }

  public LanNetworkQueryOpenApiVo igmpSnoopEnable(Boolean igmpSnoopEnable) {
    this.igmpSnoopEnable = igmpSnoopEnable;
    return this;
  }

  /**
   * Enable IGMP snooping
   * @return igmpSnoopEnable
  */
  @ApiModelProperty(required = true, value = "Enable IGMP snooping")
  @NotNull


  public Boolean getIgmpSnoopEnable() {
    return igmpSnoopEnable;
  }

  public void setIgmpSnoopEnable(Boolean igmpSnoopEnable) {
    this.igmpSnoopEnable = igmpSnoopEnable;
  }

  public LanNetworkQueryOpenApiVo mldSnoopEnable(Boolean mldSnoopEnable) {
    this.mldSnoopEnable = mldSnoopEnable;
    return this;
  }

  /**
   * Enable MLD snooping
   * @return mldSnoopEnable
  */
  @ApiModelProperty(value = "Enable MLD snooping")


  public Boolean getMldSnoopEnable() {
    return mldSnoopEnable;
  }

  public void setMldSnoopEnable(Boolean mldSnoopEnable) {
    this.mldSnoopEnable = mldSnoopEnable;
  }

  public LanNetworkQueryOpenApiVo dhcpL2RelayEnable(Boolean dhcpL2RelayEnable) {
    this.dhcpL2RelayEnable = dhcpL2RelayEnable;
    return this;
  }

  /**
   * The switch of DHCP L2 relay
   * @return dhcpL2RelayEnable
  */
  @ApiModelProperty(value = "The switch of DHCP L2 relay")


  public Boolean getDhcpL2RelayEnable() {
    return dhcpL2RelayEnable;
  }

  public void setDhcpL2RelayEnable(Boolean dhcpL2RelayEnable) {
    this.dhcpL2RelayEnable = dhcpL2RelayEnable;
  }

  public LanNetworkQueryOpenApiVo dhcpGuard(DhcpServersSetting dhcpGuard) {
    this.dhcpGuard = dhcpGuard;
    return this;
  }

  /**
   * Get dhcpGuard
   * @return dhcpGuard
  */
  @ApiModelProperty(value = "")

  @Valid

  public DhcpServersSetting getDhcpGuard() {
    return dhcpGuard;
  }

  public void setDhcpGuard(DhcpServersSetting dhcpGuard) {
    this.dhcpGuard = dhcpGuard;
  }

  public LanNetworkQueryOpenApiVo dhcpv6Guard(Dhcpv6ServersSetting dhcpv6Guard) {
    this.dhcpv6Guard = dhcpv6Guard;
    return this;
  }

  /**
   * Get dhcpv6Guard
   * @return dhcpv6Guard
  */
  @ApiModelProperty(value = "")

  @Valid

  public Dhcpv6ServersSetting getDhcpv6Guard() {
    return dhcpv6Guard;
  }

  public void setDhcpv6Guard(Dhcpv6ServersSetting dhcpv6Guard) {
    this.dhcpv6Guard = dhcpv6Guard;
  }

  public LanNetworkQueryOpenApiVo portal(Boolean portal) {
    this.portal = portal;
    return this;
  }

  /**
   * Show portal is enabled or not
   * @return portal
  */
  @ApiModelProperty(value = "Show portal is enabled or not")


  public Boolean getPortal() {
    return portal;
  }

  public void setPortal(Boolean portal) {
    this.portal = portal;
  }

  public LanNetworkQueryOpenApiVo portalId(String portalId) {
    this.portalId = portalId;
    return this;
  }

  /**
   * Show portal ID
   * @return portalId
  */
  @ApiModelProperty(value = "Show portal ID")


  public String getPortalId() {
    return portalId;
  }

  public void setPortalId(String portalId) {
    this.portalId = portalId;
  }

  public LanNetworkQueryOpenApiVo portalName(String portalName) {
    this.portalName = portalName;
    return this;
  }

  /**
   * Show related portal name
   * @return portalName
  */
  @ApiModelProperty(value = "Show related portal name")


  public String getPortalName() {
    return portalName;
  }

  public void setPortalName(String portalName) {
    this.portalName = portalName;
  }

  public LanNetworkQueryOpenApiVo accessControlRule(Boolean accessControlRule) {
    this.accessControlRule = accessControlRule;
    return this;
  }

  /**
   * Show AccessControlRule is enabled or not
   * @return accessControlRule
  */
  @ApiModelProperty(value = "Show AccessControlRule is enabled or not")


  public Boolean getAccessControlRule() {
    return accessControlRule;
  }

  public void setAccessControlRule(Boolean accessControlRule) {
    this.accessControlRule = accessControlRule;
  }

  public LanNetworkQueryOpenApiVo rateLimit(Boolean rateLimit) {
    this.rateLimit = rateLimit;
    return this;
  }

  /**
   * Show RateLimit is enabled or not
   * @return rateLimit
  */
  @ApiModelProperty(value = "Show RateLimit is enabled or not")


  public Boolean getRateLimit() {
    return rateLimit;
  }

  public void setRateLimit(Boolean rateLimit) {
    this.rateLimit = rateLimit;
  }

  public LanNetworkQueryOpenApiVo lanNeworkIpv6Config(LanNetworkIpv6Config lanNeworkIpv6Config) {
    this.lanNeworkIpv6Config = lanNeworkIpv6Config;
    return this;
  }

  /**
   * Get lanNeworkIpv6Config
   * @return lanNeworkIpv6Config
  */
  @ApiModelProperty(value = "")

  @Valid

  public LanNetworkIpv6Config getLanNeworkIpv6Config() {
    return lanNeworkIpv6Config;
  }

  public void setLanNeworkIpv6Config(LanNetworkIpv6Config lanNeworkIpv6Config) {
    this.lanNeworkIpv6Config = lanNeworkIpv6Config;
  }

  public LanNetworkQueryOpenApiVo allLan(Boolean allLan) {
    this.allLan = allLan;
    return this;
  }

  /**
   * When Internet pre-config is closed or Internet pre-config is Universal, allLAN is \"true\"; after adopting gateway, allLAN is \"false\".
   * @return allLan
  */
  @ApiModelProperty(value = "When Internet pre-config is closed or Internet pre-config is Universal, allLAN is \"true\"; after adopting gateway, allLAN is \"false\".")


  public Boolean getAllLan() {
    return allLan;
  }

  public void setAllLan(Boolean allLan) {
    this.allLan = allLan;
  }

  public LanNetworkQueryOpenApiVo primary(Boolean primary) {
    this.primary = primary;
    return this;
  }

  /**
   * Primary
   * @return primary
  */
  @ApiModelProperty(value = "Primary")


  public Boolean getPrimary() {
    return primary;
  }

  public void setPrimary(Boolean primary) {
    this.primary = primary;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LanNetworkQueryOpenApiVo lanNetworkQueryOpenApiVo = (LanNetworkQueryOpenApiVo) o;
    return Objects.equals(this.id, lanNetworkQueryOpenApiVo.id) &&
        Objects.equals(this.name, lanNetworkQueryOpenApiVo.name) &&
        Objects.equals(this.purpose, lanNetworkQueryOpenApiVo.purpose) &&
        Objects.equals(this.interfaceIds, lanNetworkQueryOpenApiVo.interfaceIds) &&
        Objects.equals(this.vlanType, lanNetworkQueryOpenApiVo.vlanType) &&
        Objects.equals(this.vlans, lanNetworkQueryOpenApiVo.vlans) &&
        Objects.equals(this.vlan, lanNetworkQueryOpenApiVo.vlan) &&
        Objects.equals(this.application, lanNetworkQueryOpenApiVo.application) &&
        Objects.equals(this.gatewaySubnet, lanNetworkQueryOpenApiVo.gatewaySubnet) &&
        Objects.equals(this.dhcpSettingsVO, lanNetworkQueryOpenApiVo.dhcpSettingsVO) &&
        Objects.equals(this.domain, lanNetworkQueryOpenApiVo.domain) &&
        Objects.equals(this.igmpSnoopEnable, lanNetworkQueryOpenApiVo.igmpSnoopEnable) &&
        Objects.equals(this.mldSnoopEnable, lanNetworkQueryOpenApiVo.mldSnoopEnable) &&
        Objects.equals(this.dhcpL2RelayEnable, lanNetworkQueryOpenApiVo.dhcpL2RelayEnable) &&
        Objects.equals(this.dhcpGuard, lanNetworkQueryOpenApiVo.dhcpGuard) &&
        Objects.equals(this.dhcpv6Guard, lanNetworkQueryOpenApiVo.dhcpv6Guard) &&
        Objects.equals(this.portal, lanNetworkQueryOpenApiVo.portal) &&
        Objects.equals(this.portalId, lanNetworkQueryOpenApiVo.portalId) &&
        Objects.equals(this.portalName, lanNetworkQueryOpenApiVo.portalName) &&
        Objects.equals(this.accessControlRule, lanNetworkQueryOpenApiVo.accessControlRule) &&
        Objects.equals(this.rateLimit, lanNetworkQueryOpenApiVo.rateLimit) &&
        Objects.equals(this.lanNeworkIpv6Config, lanNetworkQueryOpenApiVo.lanNeworkIpv6Config) &&
        Objects.equals(this.allLan, lanNetworkQueryOpenApiVo.allLan) &&
        Objects.equals(this.primary, lanNetworkQueryOpenApiVo.primary);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, purpose, interfaceIds, vlanType, vlans, vlan, application, gatewaySubnet, dhcpSettingsVO, domain, igmpSnoopEnable, mldSnoopEnable, dhcpL2RelayEnable, dhcpGuard, dhcpv6Guard, portal, portalId, portalName, accessControlRule, rateLimit, lanNeworkIpv6Config, allLan, primary);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LanNetworkQueryOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    purpose: ").append(toIndentedString(purpose)).append("\n");
    sb.append("    interfaceIds: ").append(toIndentedString(interfaceIds)).append("\n");
    sb.append("    vlanType: ").append(toIndentedString(vlanType)).append("\n");
    sb.append("    vlans: ").append(toIndentedString(vlans)).append("\n");
    sb.append("    vlan: ").append(toIndentedString(vlan)).append("\n");
    sb.append("    application: ").append(toIndentedString(application)).append("\n");
    sb.append("    gatewaySubnet: ").append(toIndentedString(gatewaySubnet)).append("\n");
    sb.append("    dhcpSettingsVO: ").append(toIndentedString(dhcpSettingsVO)).append("\n");
    sb.append("    domain: ").append(toIndentedString(domain)).append("\n");
    sb.append("    igmpSnoopEnable: ").append(toIndentedString(igmpSnoopEnable)).append("\n");
    sb.append("    mldSnoopEnable: ").append(toIndentedString(mldSnoopEnable)).append("\n");
    sb.append("    dhcpL2RelayEnable: ").append(toIndentedString(dhcpL2RelayEnable)).append("\n");
    sb.append("    dhcpGuard: ").append(toIndentedString(dhcpGuard)).append("\n");
    sb.append("    dhcpv6Guard: ").append(toIndentedString(dhcpv6Guard)).append("\n");
    sb.append("    portal: ").append(toIndentedString(portal)).append("\n");
    sb.append("    portalId: ").append(toIndentedString(portalId)).append("\n");
    sb.append("    portalName: ").append(toIndentedString(portalName)).append("\n");
    sb.append("    accessControlRule: ").append(toIndentedString(accessControlRule)).append("\n");
    sb.append("    rateLimit: ").append(toIndentedString(rateLimit)).append("\n");
    sb.append("    lanNeworkIpv6Config: ").append(toIndentedString(lanNeworkIpv6Config)).append("\n");
    sb.append("    allLan: ").append(toIndentedString(allLan)).append("\n");
    sb.append("    primary: ").append(toIndentedString(primary)).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    ");
  }
}

