Partilhar via


DhcpOptions Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.DhcpOptions

Implements

public final class DhcpOptions
implements JsonSerializable<DhcpOptions>

DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options.

Constructor Summary

Constructor Description
DhcpOptions()

Creates an instance of DhcpOptions class.

Method Summary

Modifier and Type Method and Description
List<String> dnsServers()

Get the dnsServers property: The list of DNS servers IP addresses.

static DhcpOptions fromJson(JsonReader jsonReader)

Reads an instance of DhcpOptions from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DhcpOptions withDnsServers(List<String> dnsServers)

Set the dnsServers property: The list of DNS servers IP addresses.

Methods inherited from java.lang.Object

Constructor Details

DhcpOptions

public DhcpOptions()

Creates an instance of DhcpOptions class.

Method Details

dnsServers

public List dnsServers()

Get the dnsServers property: The list of DNS servers IP addresses.

Returns:

the dnsServers value.

fromJson

public static DhcpOptions fromJson(JsonReader jsonReader)

Reads an instance of DhcpOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DhcpOptions 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 DhcpOptions.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDnsServers

public DhcpOptions withDnsServers(List dnsServers)

Set the dnsServers property: The list of DNS servers IP addresses.

Parameters:

dnsServers - the dnsServers value to set.

Returns:

the DhcpOptions object itself.

Applies to