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

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

public class MeshSettingVo   {
  @JsonProperty("meshEnable")
  private Boolean meshEnable;

  @JsonProperty("autoFailoverEnable")
  private Boolean autoFailoverEnable;

  @JsonProperty("defGatewayEnable")
  private Boolean defGatewayEnable;

  @JsonProperty("gateway")
  private String gateway;

  @JsonProperty("fullSector")
  private Boolean fullSector;

  public MeshSettingVo meshEnable(Boolean meshEnable) {
    this.meshEnable = meshEnable;
    return this;
  }

  /**
   * Whether to enable mesh
   * @return meshEnable
  */
  @ApiModelProperty(required = true, value = "Whether to enable mesh")
  @NotNull


  public Boolean getMeshEnable() {
    return meshEnable;
  }

  public void setMeshEnable(Boolean meshEnable) {
    this.meshEnable = meshEnable;
  }

  public MeshSettingVo autoFailoverEnable(Boolean autoFailoverEnable) {
    this.autoFailoverEnable = autoFailoverEnable;
    return this;
  }

  /**
   * Whether to enable auto failover
   * @return autoFailoverEnable
  */
  @ApiModelProperty(value = "Whether to enable auto failover")


  public Boolean getAutoFailoverEnable() {
    return autoFailoverEnable;
  }

  public void setAutoFailoverEnable(Boolean autoFailoverEnable) {
    this.autoFailoverEnable = autoFailoverEnable;
  }

  public MeshSettingVo defGatewayEnable(Boolean defGatewayEnable) {
    this.defGatewayEnable = defGatewayEnable;
    return this;
  }

  /**
   * Connectivity detection, parameter defGatewayEnable should be a value as follows: true: Auto(Recommended) ; false: Customer IP
   * @return defGatewayEnable
  */
  @ApiModelProperty(value = "Connectivity detection, parameter defGatewayEnable should be a value as follows: true: Auto(Recommended) ; false: Customer IP")


  public Boolean getDefGatewayEnable() {
    return defGatewayEnable;
  }

  public void setDefGatewayEnable(Boolean defGatewayEnable) {
    this.defGatewayEnable = defGatewayEnable;
  }

  public MeshSettingVo gateway(String gateway) {
    this.gateway = gateway;
    return this;
  }

  /**
   * Customer IP
   * @return gateway
  */
  @ApiModelProperty(value = "Customer IP")

@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])\\b") 
  public String getGateway() {
    return gateway;
  }

  public void setGateway(String gateway) {
    this.gateway = gateway;
  }

  public MeshSettingVo fullSector(Boolean fullSector) {
    this.fullSector = fullSector;
    return this;
  }

  /**
   * Whether to enable full-sector DFS
   * @return fullSector
  */
  @ApiModelProperty(value = "Whether to enable full-sector DFS")


  public Boolean getFullSector() {
    return fullSector;
  }

  public void setFullSector(Boolean fullSector) {
    this.fullSector = fullSector;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MeshSettingVo meshSettingVo = (MeshSettingVo) o;
    return Objects.equals(this.meshEnable, meshSettingVo.meshEnable) &&
        Objects.equals(this.autoFailoverEnable, meshSettingVo.autoFailoverEnable) &&
        Objects.equals(this.defGatewayEnable, meshSettingVo.defGatewayEnable) &&
        Objects.equals(this.gateway, meshSettingVo.gateway) &&
        Objects.equals(this.fullSector, meshSettingVo.fullSector);
  }

  @Override
  public int hashCode() {
    return Objects.hash(meshEnable, autoFailoverEnable, defGatewayEnable, gateway, fullSector);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MeshSettingVo {\n");
    
    sb.append("    meshEnable: ").append(toIndentedString(meshEnable)).append("\n");
    sb.append("    autoFailoverEnable: ").append(toIndentedString(autoFailoverEnable)).append("\n");
    sb.append("    defGatewayEnable: ").append(toIndentedString(defGatewayEnable)).append("\n");
    sb.append("    gateway: ").append(toIndentedString(gateway)).append("\n");
    sb.append("    fullSector: ").append(toIndentedString(fullSector)).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    ");
  }
}

