// 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.DnsServiceLogLevelEnum;
import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum;
import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** NSX DNS Service. */
@Fluent
public final class WorkloadNetworkDnsServiceInner extends ProxyResource {
    /*
     * DNS Service properties
     */
    @JsonProperty(value = "properties")
    private WorkloadNetworkDnsServiceProperties innerProperties;

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

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

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

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

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

    /**
     * Set the dnsServiceIp property: DNS service IP of the DNS Service.
     *
     * @param dnsServiceIp the dnsServiceIp value to set.
     * @return the WorkloadNetworkDnsServiceInner object itself.
     */
    public WorkloadNetworkDnsServiceInner withDnsServiceIp(String dnsServiceIp) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsServiceProperties();
        }
        this.innerProperties().withDnsServiceIp(dnsServiceIp);
        return this;
    }

    /**
     * Get the defaultDnsZone property: Default DNS zone of the DNS Service.
     *
     * @return the defaultDnsZone value.
     */
    public String defaultDnsZone() {
        return this.innerProperties() == null ? null : this.innerProperties().defaultDnsZone();
    }

    /**
     * Set the defaultDnsZone property: Default DNS zone of the DNS Service.
     *
     * @param defaultDnsZone the defaultDnsZone value to set.
     * @return the WorkloadNetworkDnsServiceInner object itself.
     */
    public WorkloadNetworkDnsServiceInner withDefaultDnsZone(String defaultDnsZone) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsServiceProperties();
        }
        this.innerProperties().withDefaultDnsZone(defaultDnsZone);
        return this;
    }

    /**
     * Get the fqdnZones property: FQDN zones of the DNS Service.
     *
     * @return the fqdnZones value.
     */
    public List<String> fqdnZones() {
        return this.innerProperties() == null ? null : this.innerProperties().fqdnZones();
    }

    /**
     * Set the fqdnZones property: FQDN zones of the DNS Service.
     *
     * @param fqdnZones the fqdnZones value to set.
     * @return the WorkloadNetworkDnsServiceInner object itself.
     */
    public WorkloadNetworkDnsServiceInner withFqdnZones(List<String> fqdnZones) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsServiceProperties();
        }
        this.innerProperties().withFqdnZones(fqdnZones);
        return this;
    }

    /**
     * Get the logLevel property: DNS Service log level.
     *
     * @return the logLevel value.
     */
    public DnsServiceLogLevelEnum logLevel() {
        return this.innerProperties() == null ? null : this.innerProperties().logLevel();
    }

    /**
     * Set the logLevel property: DNS Service log level.
     *
     * @param logLevel the logLevel value to set.
     * @return the WorkloadNetworkDnsServiceInner object itself.
     */
    public WorkloadNetworkDnsServiceInner withLogLevel(DnsServiceLogLevelEnum logLevel) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsServiceProperties();
        }
        this.innerProperties().withLogLevel(logLevel);
        return this;
    }

    /**
     * Get the status property: DNS Service status.
     *
     * @return the status value.
     */
    public DnsServiceStatusEnum status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the provisioningState property: The provisioning state.
     *
     * @return the provisioningState value.
     */
    public WorkloadNetworkDnsServiceProvisioningState 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 WorkloadNetworkDnsServiceInner object itself.
     */
    public WorkloadNetworkDnsServiceInner withRevision(Long revision) {
        if (this.innerProperties() == null) {
            this.innerProperties = new WorkloadNetworkDnsServiceProperties();
        }
        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();
        }
    }
}
