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

/**
 * DNS proxy DoH setting, valid when parameter [type] is 1
 */
@ApiModel(description = "DNS proxy DoH setting, valid when parameter [type] is 1")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class DohSettingOpenApiVo   {
  @JsonProperty("defaultServers")
  @Valid
  private List<Integer> defaultServers = null;

  @JsonProperty("customizedServers")
  @Valid
  private List<DohCustomizedServerOpenApiVo> customizedServers = null;

  public DohSettingOpenApiVo defaultServers(List<Integer> defaultServers) {
    this.defaultServers = defaultServers;
    return this;
  }

  public DohSettingOpenApiVo addDefaultServersItem(Integer defaultServersItem) {
    if (this.defaultServers == null) {
      this.defaultServers = new ArrayList<>();
    }
    this.defaultServers.add(defaultServersItem);
    return this;
  }

  /**
   * Preconfigured Server List. DefaultServers should be a value as follows: 0:Google, 1：Cloudflare, 4：CleanBrowsing, 5：Quad9_1, 6: Quad9_2. Up to 2 DoH default and custom servers can be selected. For example, defaultServers : [0, 1] represents that you have selected default services Google and Cloudflare
   * @return defaultServers
  */
  @ApiModelProperty(value = "Preconfigured Server List. DefaultServers should be a value as follows: 0:Google, 1：Cloudflare, 4：CleanBrowsing, 5：Quad9_1, 6: Quad9_2. Up to 2 DoH default and custom servers can be selected. For example, defaultServers : [0, 1] represents that you have selected default services Google and Cloudflare")


  public List<Integer> getDefaultServers() {
    return defaultServers;
  }

  public void setDefaultServers(List<Integer> defaultServers) {
    this.defaultServers = defaultServers;
  }

  public DohSettingOpenApiVo customizedServers(List<DohCustomizedServerOpenApiVo> customizedServers) {
    this.customizedServers = customizedServers;
    return this;
  }

  public DohSettingOpenApiVo addCustomizedServersItem(DohCustomizedServerOpenApiVo customizedServersItem) {
    if (this.customizedServers == null) {
      this.customizedServers = new ArrayList<>();
    }
    this.customizedServers.add(customizedServersItem);
    return this;
  }

  /**
   * Custom Service list. Up to 2 DoH default and custom Servers can be selected, setting the parameter [enable] to true indicates the selection of the custom server. Up to 8 custom servers can be configured
   * @return customizedServers
  */
  @ApiModelProperty(value = "Custom Service list. Up to 2 DoH default and custom Servers can be selected, setting the parameter [enable] to true indicates the selection of the custom server. Up to 8 custom servers can be configured")

  @Valid

  public List<DohCustomizedServerOpenApiVo> getCustomizedServers() {
    return customizedServers;
  }

  public void setCustomizedServers(List<DohCustomizedServerOpenApiVo> customizedServers) {
    this.customizedServers = customizedServers;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DohSettingOpenApiVo dohSettingOpenApiVo = (DohSettingOpenApiVo) o;
    return Objects.equals(this.defaultServers, dohSettingOpenApiVo.defaultServers) &&
        Objects.equals(this.customizedServers, dohSettingOpenApiVo.customizedServers);
  }

  @Override
  public int hashCode() {
    return Objects.hash(defaultServers, customizedServers);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DohSettingOpenApiVo {\n");
    
    sb.append("    defaultServers: ").append(toIndentedString(defaultServers)).append("\n");
    sb.append("    customizedServers: ").append(toIndentedString(customizedServers)).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    ");
  }
}

