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

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

public class DnsSecSettingOpenApiVo   {
  @JsonProperty("servers")
  @Valid
  private List<String> servers = new ArrayList<>();

  @JsonProperty("replyPolicy")
  private Integer replyPolicy;

  public DnsSecSettingOpenApiVo servers(List<String> servers) {
    this.servers = servers;
    return this;
  }

  public DnsSecSettingOpenApiVo addServersItem(String serversItem) {
    this.servers.add(serversItem);
    return this;
  }

  /**
   * DNS Server IP list, Up to 2 entries are allowed for the server list
   * @return servers
  */
  @ApiModelProperty(required = true, value = "DNS Server IP list, Up to 2 entries are allowed for the server list")
  @NotNull


  public List<String> getServers() {
    return servers;
  }

  public void setServers(List<String> servers) {
    this.servers = servers;
  }

  public DnsSecSettingOpenApiVo replyPolicy(Integer replyPolicy) {
    this.replyPolicy = replyPolicy;
    return this;
  }

  /**
   * Bogus DNS reply policy type. ReplyPolicy should be a value as follows: 0: Pass, 1: Drop
   * @return replyPolicy
  */
  @ApiModelProperty(required = true, value = "Bogus DNS reply policy type. ReplyPolicy should be a value as follows: 0: Pass, 1: Drop")
  @NotNull


  public Integer getReplyPolicy() {
    return replyPolicy;
  }

  public void setReplyPolicy(Integer replyPolicy) {
    this.replyPolicy = replyPolicy;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DnsSecSettingOpenApiVo dnsSecSettingOpenApiVo = (DnsSecSettingOpenApiVo) o;
    return Objects.equals(this.servers, dnsSecSettingOpenApiVo.servers) &&
        Objects.equals(this.replyPolicy, dnsSecSettingOpenApiVo.replyPolicy);
  }

  @Override
  public int hashCode() {
    return Objects.hash(servers, replyPolicy);
  }

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

