code: public DnsNameResolver build() {
          if (eventLoop == null) {
              throw new IllegalStateException("eventLoop should be specified to build a DnsNameResolver.");
          }
  
          if (resolveCache != null && (minTtl != null || maxTtl != null || negativeTtl != null)) {
              throw new IllegalStateException("resolveCache and TTLs are mutually exclusive");
          }
  
          if (authoritativeDnsServerCache != null && (minTtl != null || maxTtl != null || negativeTtl != null)) {
              throw new IllegalStateException("authoritativeDnsServerCache and TTLs are mutually exclusive");
          }
  
          DnsCache resolveCache = this.resolveCache != null ? this.resolveCache : newCache();
          DnsCnameCache cnameCache = this.cnameCache != null ? this.cnameCache : newCnameCache();
          AuthoritativeDnsServerCache authoritativeDnsServerCache = this.authoritativeDnsServerCache != null ?
                  this.authoritativeDnsServerCache : newAuthoritativeDnsServerCache();
          return new DnsNameResolver(
                  eventLoop,
                  channelFactory,
                  resolveCache,
                  cnameCache,
                  authoritativeDnsServerCache,
                  dnsQueryLifecycleObserverFactory,
                  queryTimeoutMillis,
                  resolvedAddressTypes,
                  recursionDesired,
                  maxQueriesPerResolve,
                  traceEnabled,
                  maxPayloadSize,
                  optResourceEnabled,
                  hostsFileEntriesResolver,
                  dnsServerAddressStreamProvider,
                  searchDomains,
                  ndots,
                  decodeIdn);
      }
docs: Returns a new {@link DnsNameResolver} instance.
  
  @return a {@link DnsNameResolver}