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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** NSX DNS Zone. */
@Fluent
public final class WorkloadNetworkDnsZoneInner extends ProxyResource {
    /*
     * DNS Zone properties
     */
    @JsonProperty(value = "properties")
    private WorkloadNetworkDnsZoneProperties innerProperties;

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

    /**
     * Get the innerProperties property: DNS Zone properties.
     *
     * @return the innerProperties value.
     */
    private WorkloadNetworkDnsZoneProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the displayName property: Display name of the DNS Zone.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: Display name of the DNS Zone.
     *
     * @param displayName the displayName value to set.
     * @return the WorkloadNetworkDnsZoneInner object itself.
     */
    public WorkloadNetworkDnsZoneInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsZoneProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the domain property: Domain names of the DNS Zone.
     *
     * @return the domain value.
     */
    public List<String> domain() {
        return this.innerProperties() == null ? null : this.innerProperties().domain();
    }

    /**
     * Set the domain property: Domain names of the DNS Zone.
     *
     * @param domain the domain value to set.
     * @return the WorkloadNetworkDnsZoneInner object itself.
     */
    public WorkloadNetworkDnsZoneInner withDomain(List<String> domain) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsZoneProperties();
        }
        this.innerProperties().withDomain(domain);
        return this;
    }

    /**
     * Get the dnsServerIps property: DNS Server IP array of the DNS Zone.
     *
     * @return the dnsServerIps value.
     */
    public List<String> dnsServerIps() {
        return this.innerProperties() == null ? null : this.innerProperties().dnsServerIps();
    }

    /**
     * Set the dnsServerIps property: DNS Server IP array of the DNS Zone.
     *
     * @param dnsServerIps the dnsServerIps value to set.
     * @return the WorkloadNetworkDnsZoneInner object itself.
     */
    public WorkloadNetworkDnsZoneInner withDnsServerIps(List<String> dnsServerIps) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsZoneProperties();
        }
        this.innerProperties().withDnsServerIps(dnsServerIps);
        return this;
    }

    /**
     * Get the sourceIp property: Source IP of the DNS Zone.
     *
     * @return the sourceIp value.
     */
    public String sourceIp() {
        return this.innerProperties() == null ? null : this.innerProperties().sourceIp();
    }

    /**
     * Set the sourceIp property: Source IP of the DNS Zone.
     *
     * @param sourceIp the sourceIp value to set.
     * @return the WorkloadNetworkDnsZoneInner object itself.
     */
    public WorkloadNetworkDnsZoneInner withSourceIp(String sourceIp) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsZoneProperties();
        }
        this.innerProperties().withSourceIp(sourceIp);
        return this;
    }

    /**
     * Get the dnsServices property: Number of DNS Services using the DNS zone.
     *
     * @return the dnsServices value.
     */
    public Long dnsServices() {
        return this.innerProperties() == null ? null : this.innerProperties().dnsServices();
    }

    /**
     * Set the dnsServices property: Number of DNS Services using the DNS zone.
     *
     * @param dnsServices the dnsServices value to set.
     * @return the WorkloadNetworkDnsZoneInner object itself.
     */
    public WorkloadNetworkDnsZoneInner withDnsServices(Long dnsServices) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsZoneProperties();
        }
        this.innerProperties().withDnsServices(dnsServices);
        return this;
    }

    /**
     * Get the provisioningState property: The provisioning state.
     *
     * @return the provisioningState value.
     */
    public WorkloadNetworkDnsZoneProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the revision property: NSX revision number.
     *
     * @return the revision value.
     */
    public Long revision() {
        return this.innerProperties() == null ? null : this.innerProperties().revision();
    }

    /**
     * Set the revision property: NSX revision number.
     *
     * @param revision the revision value to set.
     * @return the WorkloadNetworkDnsZoneInner object itself.
     */
    public WorkloadNetworkDnsZoneInner withRevision(Long revision) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsZoneProperties();
        }
        this.innerProperties().withRevision(revision);
        return this;
    }

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