TargetDnsServer Class

  • java.lang.Object
    • com.azure.resourcemanager.dnsresolver.models.TargetDnsServer

Implements

public final class TargetDnsServer
implements JsonSerializable<TargetDnsServer>

Describes a server to forward the DNS queries to.

Constructor Summary

Constructor Description
TargetDnsServer()

Creates an instance of TargetDnsServer class.

Method Summary

Modifier and Type Method and Description
static TargetDnsServer fromJson(JsonReader jsonReader)

Reads an instance of TargetDnsServer from the JsonReader.

String ipAddress()

Get the ipAddress property: DNS server IP address.

Integer port()

Get the port property: DNS server port.

JsonWriter toJson(JsonWriter jsonWriter)
TargetDnsServer withIpAddress(String ipAddress)

Set the ipAddress property: DNS server IP address.

TargetDnsServer withPort(Integer port)

Set the port property: DNS server port.

Methods inherited from java.lang.Object

Constructor Details

TargetDnsServer

public TargetDnsServer()

Creates an instance of TargetDnsServer class.

Method Details

fromJson

public static TargetDnsServer fromJson(JsonReader jsonReader)

Reads an instance of TargetDnsServer from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TargetDnsServer if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

ipAddress

public String ipAddress()

Get the ipAddress property: DNS server IP address.

Returns:

the ipAddress value.

port

public Integer port()

Get the port property: DNS server port.

Returns:

the port value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

withIpAddress

public TargetDnsServer withIpAddress(String ipAddress)

Set the ipAddress property: DNS server IP address.

Parameters:

ipAddress - the ipAddress value to set.

Returns:

the TargetDnsServer object itself.

withPort

public TargetDnsServer withPort(Integer port)

Set the port property: DNS server port.

Parameters:

port - the port value to set.

Returns:

the TargetDnsServer object itself.

Applies to