Class DnsResourceReference

java.lang.Object
com.azure.resourcemanager.dns.models.DnsResourceReference
All Implemented Interfaces:
com.azure.json.JsonSerializable<DnsResourceReference>

public final class DnsResourceReference extends Object implements com.azure.json.JsonSerializable<DnsResourceReference>
Represents a single Azure resource and its referencing DNS records.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of DnsResourceReference class.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.azure.core.management.SubResource>
    Get the dnsResources property: A list of dns Records.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of DnsResourceReference from the JsonReader.
    com.azure.core.management.SubResource
    Get the targetResource property: A reference to an azure resource from where the dns resource value is taken.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withDnsResources(List<com.azure.core.management.SubResource> dnsResources)
    Set the dnsResources property: A list of dns Records.
    withTargetResource(com.azure.core.management.SubResource targetResource)
    Set the targetResource property: A reference to an azure resource from where the dns resource value is taken.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • DnsResourceReference

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

    • dnsResources

      public List<com.azure.core.management.SubResource> dnsResources()
      Get the dnsResources property: A list of dns Records.
      Returns:
      the dnsResources value.
    • withDnsResources

      public DnsResourceReference withDnsResources(List<com.azure.core.management.SubResource> dnsResources)
      Set the dnsResources property: A list of dns Records.
      Parameters:
      dnsResources - the dnsResources value to set.
      Returns:
      the DnsResourceReference object itself.
    • targetResource

      public com.azure.core.management.SubResource targetResource()
      Get the targetResource property: A reference to an azure resource from where the dns resource value is taken.
      Returns:
      the targetResource value.
    • withTargetResource

      public DnsResourceReference withTargetResource(com.azure.core.management.SubResource targetResource)
      Set the targetResource property: A reference to an azure resource from where the dns resource value is taken.
      Parameters:
      targetResource - the targetResource value to set.
      Returns:
      the DnsResourceReference object itself.
    • validate

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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DnsResourceReference>
      Throws:
      IOException
    • fromJson

      public static DnsResourceReference fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DnsResourceReference from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DnsResourceReference 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 DnsResourceReference.