// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.dns.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.dns.models.DnsResourceReference;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Represents the properties of the Dns Resource Reference Result. */
@Fluent
public final class DnsResourceReferenceResultInner {
    /*
     * The result of dns resource reference request. Returns a list of dns resource references for each of the azure
     * resource in the request.
     */
    @JsonProperty(value = "properties")
    private DnsResourceReferenceResultProperties innerProperties;

    /** Creates an instance of DnsResourceReferenceResultInner class. */
    public DnsResourceReferenceResultInner() {
    }

    /**
     * Get the innerProperties property: The result of dns resource reference request. Returns a list of dns resource
     * references for each of the azure resource in the request.
     *
     * @return the innerProperties value.
     */
    private DnsResourceReferenceResultProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the dnsResourceReferences property: The result of dns resource reference request. A list of dns resource
     * references for each of the azure resource in the request.
     *
     * @return the dnsResourceReferences value.
     */
    public List<DnsResourceReference> dnsResourceReferences() {
        return this.innerProperties() == null ? null : this.innerProperties().dnsResourceReferences();
    }

    /**
     * Set the dnsResourceReferences property: The result of dns resource reference request. A list of dns resource
     * references for each of the azure resource in the request.
     *
     * @param dnsResourceReferences the dnsResourceReferences value to set.
     * @return the DnsResourceReferenceResultInner object itself.
     */
    public DnsResourceReferenceResultInner withDnsResourceReferences(List<DnsResourceReference> dnsResourceReferences) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DnsResourceReferenceResultProperties();
        }
        this.innerProperties().withDnsResourceReferences(dnsResourceReferences);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}
