Class TargetAddress

    • Method Detail

      • ip

        public final String ip()

        One IPv4 address that you want to forward DNS queries to.

        Returns:
        One IPv4 address that you want to forward DNS queries to.
      • port

        public final Integer port()

        The port at Ip that you want to forward DNS queries to.

        Returns:
        The port at Ip that you want to forward DNS queries to.
      • ipv6

        public final String ipv6()

        One IPv6 address that you want to forward DNS queries to.

        Returns:
        One IPv6 address that you want to forward DNS queries to.
      • protocol

        public final Protocol protocol()

        The protocols for the target address. The protocol you choose needs to be supported by the outbound endpoint of the Resolver rule.

        If the service returns an enum value that is not available in the current SDK version, protocol will return Protocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from protocolAsString().

        Returns:
        The protocols for the target address. The protocol you choose needs to be supported by the outbound endpoint of the Resolver rule.
        See Also:
        Protocol
      • protocolAsString

        public final String protocolAsString()

        The protocols for the target address. The protocol you choose needs to be supported by the outbound endpoint of the Resolver rule.

        If the service returns an enum value that is not available in the current SDK version, protocol will return Protocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from protocolAsString().

        Returns:
        The protocols for the target address. The protocol you choose needs to be supported by the outbound endpoint of the Resolver rule.
        See Also:
        Protocol
      • serverNameIndication

        public final String serverNameIndication()

        The Server Name Indication of the DoH server that you want to forward queries to. This is only used if the Protocol of the TargetAddress is DoH.

        Returns:
        The Server Name Indication of the DoH server that you want to forward queries to. This is only used if the Protocol of the TargetAddress is DoH.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)