Class DnsSettings

java.lang.Object
com.azure.resourcemanager.network.models.DnsSettings
All Implemented Interfaces:
com.azure.json.JsonSerializable<DnsSettings>

public final class DnsSettings extends Object implements com.azure.json.JsonSerializable<DnsSettings>
DNS Proxy Settings in Firewall Policy.
  • Constructor Details

    • DnsSettings

      public DnsSettings()
      Creates an instance of DnsSettings class.
  • Method Details

    • servers

      public List<String> servers()
      Get the servers property: List of Custom DNS Servers.
      Returns:
      the servers value.
    • withServers

      public DnsSettings withServers(List<String> servers)
      Set the servers property: List of Custom DNS Servers.
      Parameters:
      servers - the servers value to set.
      Returns:
      the DnsSettings object itself.
    • enableProxy

      public Boolean enableProxy()
      Get the enableProxy property: Enable DNS Proxy on Firewalls attached to the Firewall Policy.
      Returns:
      the enableProxy value.
    • withEnableProxy

      public DnsSettings withEnableProxy(Boolean enableProxy)
      Set the enableProxy property: Enable DNS Proxy on Firewalls attached to the Firewall Policy.
      Parameters:
      enableProxy - the enableProxy value to set.
      Returns:
      the DnsSettings object itself.
    • requireProxyForNetworkRules

      public Boolean requireProxyForNetworkRules()
      Get the requireProxyForNetworkRules property: FQDNs in Network Rules are supported when set to true.
      Returns:
      the requireProxyForNetworkRules value.
    • withRequireProxyForNetworkRules

      public DnsSettings withRequireProxyForNetworkRules(Boolean requireProxyForNetworkRules)
      Set the requireProxyForNetworkRules property: FQDNs in Network Rules are supported when set to true.
      Parameters:
      requireProxyForNetworkRules - the requireProxyForNetworkRules value to set.
      Returns:
      the DnsSettings object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DnsSettings>
      Throws:
      IOException
    • fromJson

      public static DnsSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DnsSettings from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DnsSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the DnsSettings.