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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the enableProxy property: Enable DNS Proxy on Firewalls attached to the Firewall Policy.static DnsSettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DnsSettings from the JsonReader.Get the requireProxyForNetworkRules property: FQDNs in Network Rules are supported when set to true.servers()Get the servers property: List of Custom DNS Servers.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withEnableProxy(Boolean enableProxy) Set the enableProxy property: Enable DNS Proxy on Firewalls attached to the Firewall Policy.withRequireProxyForNetworkRules(Boolean requireProxyForNetworkRules) Set the requireProxyForNetworkRules property: FQDNs in Network Rules are supported when set to true.withServers(List<String> servers) Set the servers property: List of Custom DNS Servers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DnsSettings
public DnsSettings()Creates an instance of DnsSettings class.
-
-
Method Details
-
servers
Get the servers property: List of Custom DNS Servers.- Returns:
- the servers value.
-
withServers
Set the servers property: List of Custom DNS Servers.- Parameters:
servers- the servers value to set.- Returns:
- the DnsSettings object itself.
-
enableProxy
Get the enableProxy property: Enable DNS Proxy on Firewalls attached to the Firewall Policy.- Returns:
- the enableProxy value.
-
withEnableProxy
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
Get the requireProxyForNetworkRules property: FQDNs in Network Rules are supported when set to true.- Returns:
- the requireProxyForNetworkRules value.
-
withRequireProxyForNetworkRules
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DnsSettings>- Throws:
IOException
-
fromJson
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.
-