Partager via


MxRecord Class

  • java.lang.Object
    • com.azure.resourcemanager.dns.models.MxRecord

Implements

public final class MxRecord
implements JsonSerializable<MxRecord>

An MX record.

Constructor Summary

Constructor Description
MxRecord()

Creates an instance of MxRecord class.

Method Summary

Modifier and Type Method and Description
String exchange()

Get the exchange property: The domain name of the mail host for this MX record.

static MxRecord fromJson(JsonReader jsonReader)

Reads an instance of MxRecord from the JsonReader.

Integer preference()

Get the preference property: The preference value for this MX record.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MxRecord withExchange(String exchange)

Set the exchange property: The domain name of the mail host for this MX record.

MxRecord withPreference(Integer preference)

Set the preference property: The preference value for this MX record.

Methods inherited from java.lang.Object

Constructor Details

MxRecord

public MxRecord()

Creates an instance of MxRecord class.

Method Details

exchange

public String exchange()

Get the exchange property: The domain name of the mail host for this MX record.

Returns:

the exchange value.

fromJson

public static MxRecord fromJson(JsonReader jsonReader)

Reads an instance of MxRecord from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

preference

public Integer preference()

Get the preference property: The preference value for this MX record.

Returns:

the preference value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withExchange

public MxRecord withExchange(String exchange)

Set the exchange property: The domain name of the mail host for this MX record.

Parameters:

exchange - the exchange value to set.

Returns:

the MxRecord object itself.

withPreference

public MxRecord withPreference(Integer preference)

Set the preference property: The preference value for this MX record.

Parameters:

preference - the preference value to set.

Returns:

the MxRecord object itself.

Applies to