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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.privatedns.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Describes a Private DNS zone. */
@Fluent
public final class PrivateZoneInner extends Resource {
    /*
     * The ETag of the zone.
     */
    @JsonProperty(value = "etag")
    private String etag;

    /*
     * Properties of the Private DNS zone.
     */
    @JsonProperty(value = "properties")
    private PrivateZoneProperties innerProperties;

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

    /**
     * Get the etag property: The ETag of the zone.
     *
     * @return the etag value.
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Set the etag property: The ETag of the zone.
     *
     * @param etag the etag value to set.
     * @return the PrivateZoneInner object itself.
     */
    public PrivateZoneInner withEtag(String etag) {
        this.etag = etag;
        return this;
    }

    /**
     * Get the innerProperties property: Properties of the Private DNS zone.
     *
     * @return the innerProperties value.
     */
    private PrivateZoneProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public PrivateZoneInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public PrivateZoneInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the maxNumberOfRecordSets property: The maximum number of record sets that can be created in this Private DNS
     * zone. This is a read-only property and any attempt to set this value will be ignored.
     *
     * @return the maxNumberOfRecordSets value.
     */
    public Long maxNumberOfRecordSets() {
        return this.innerProperties() == null ? null : this.innerProperties().maxNumberOfRecordSets();
    }

    /**
     * Get the numberOfRecordSets property: The current number of record sets in this Private DNS zone. This is a
     * read-only property and any attempt to set this value will be ignored.
     *
     * @return the numberOfRecordSets value.
     */
    public Long numberOfRecordSets() {
        return this.innerProperties() == null ? null : this.innerProperties().numberOfRecordSets();
    }

    /**
     * Get the maxNumberOfVirtualNetworkLinks property: The maximum number of virtual networks that can be linked to
     * this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.
     *
     * @return the maxNumberOfVirtualNetworkLinks value.
     */
    public Long maxNumberOfVirtualNetworkLinks() {
        return this.innerProperties() == null ? null : this.innerProperties().maxNumberOfVirtualNetworkLinks();
    }

    /**
     * Get the numberOfVirtualNetworkLinks property: The current number of virtual networks that are linked to this
     * Private DNS zone. This is a read-only property and any attempt to set this value will be ignored.
     *
     * @return the numberOfVirtualNetworkLinks value.
     */
    public Long numberOfVirtualNetworkLinks() {
        return this.innerProperties() == null ? null : this.innerProperties().numberOfVirtualNetworkLinks();
    }

    /**
     * Get the maxNumberOfVirtualNetworkLinksWithRegistration property: The maximum number of virtual networks that can
     * be linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set
     * this value will be ignored.
     *
     * @return the maxNumberOfVirtualNetworkLinksWithRegistration value.
     */
    public Long maxNumberOfVirtualNetworkLinksWithRegistration() {
        return this.innerProperties() == null
            ? null
            : this.innerProperties().maxNumberOfVirtualNetworkLinksWithRegistration();
    }

    /**
     * Get the numberOfVirtualNetworkLinksWithRegistration property: The current number of virtual networks that are
     * linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set
     * this value will be ignored.
     *
     * @return the numberOfVirtualNetworkLinksWithRegistration value.
     */
    public Long numberOfVirtualNetworkLinksWithRegistration() {
        return this.innerProperties() == null
            ? null
            : this.innerProperties().numberOfVirtualNetworkLinksWithRegistration();
    }

    /**
     * Get the provisioningState property: The provisioning state of the resource. This is a read-only property and any
     * attempt to set this value will be ignored.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the internalId property: Private zone internal Id.
     *
     * @return the internalId value.
     */
    public String internalId() {
        return this.innerProperties() == null ? null : this.innerProperties().internalId();
    }

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