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.Objects;

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

public class CreateVlaNs   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("vlans")
  private String vlans;

  @JsonProperty("igmpSnoopEnable")
  private Boolean igmpSnoopEnable;

  @JsonProperty("dhcpL2RelayEnable")
  private Boolean dhcpL2RelayEnable;

  @JsonProperty("dhcpGuard")
  private DhcpServersSetting dhcpGuard;

  @JsonProperty("mldSnoopEnable")
  private Boolean mldSnoopEnable;

  @JsonProperty("dhcpv6Guard")
  private Dhcpv6ServersSetting dhcpv6Guard;

  @JsonProperty("application")
  private Integer application;

  public CreateVlaNs 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 CreateVlaNs vlans(String vlans) {
    this.vlans = vlans;
    return this;
  }

  /**
   * Support batch VLAN creation. VLAN format: 200, 1-100.
   * @return vlans
  */
  @ApiModelProperty(required = true, value = "Support batch VLAN creation. VLAN format: 200, 1-100.")
  @NotNull

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

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

  public CreateVlaNs 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 CreateVlaNs 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 CreateVlaNs 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 CreateVlaNs 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 CreateVlaNs 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 CreateVlaNs application(Integer application) {
    this.application = application;
    return this;
  }

  /**
   * Effective device type should be a value as follows: 0: Gateway and Switch; 1: Switch
   * @return application
  */
  @ApiModelProperty(value = "Effective device type should be a value as follows: 0: Gateway and Switch; 1: Switch")


  public Integer getApplication() {
    return application;
  }

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateVlaNs createVlaNs = (CreateVlaNs) o;
    return Objects.equals(this.name, createVlaNs.name) &&
        Objects.equals(this.vlans, createVlaNs.vlans) &&
        Objects.equals(this.igmpSnoopEnable, createVlaNs.igmpSnoopEnable) &&
        Objects.equals(this.dhcpL2RelayEnable, createVlaNs.dhcpL2RelayEnable) &&
        Objects.equals(this.dhcpGuard, createVlaNs.dhcpGuard) &&
        Objects.equals(this.mldSnoopEnable, createVlaNs.mldSnoopEnable) &&
        Objects.equals(this.dhcpv6Guard, createVlaNs.dhcpv6Guard) &&
        Objects.equals(this.application, createVlaNs.application);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, vlans, igmpSnoopEnable, dhcpL2RelayEnable, dhcpGuard, mldSnoopEnable, dhcpv6Guard, application);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateVlaNs {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    vlans: ").append(toIndentedString(vlans)).append("\n");
    sb.append("    igmpSnoopEnable: ").append(toIndentedString(igmpSnoopEnable)).append("\n");
    sb.append("    dhcpL2RelayEnable: ").append(toIndentedString(dhcpL2RelayEnable)).append("\n");
    sb.append("    dhcpGuard: ").append(toIndentedString(dhcpGuard)).append("\n");
    sb.append("    mldSnoopEnable: ").append(toIndentedString(mldSnoopEnable)).append("\n");
    sb.append("    dhcpv6Guard: ").append(toIndentedString(dhcpv6Guard)).append("\n");
    sb.append("    application: ").append(toIndentedString(application)).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    ");
  }
}

