Class MxRecord

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

public final class MxRecord extends Object
An MX record.
  • Constructor Details

    • MxRecord

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

    • preference

      public Integer preference()
      Get the preference property: The preference value for this MX record.
      Returns:
      the preference value.
    • 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.
    • exchange

      public String exchange()
      Get the exchange property: The domain name of the mail host for this MX record.
      Returns:
      the exchange value.
    • 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.
    • validate

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