// 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.DatastoreProvisioningState;
import com.azure.resourcemanager.avs.models.DatastoreStatus;
import com.azure.resourcemanager.avs.models.DiskPoolVolume;
import com.azure.resourcemanager.avs.models.NetAppVolume;
import com.fasterxml.jackson.annotation.JsonProperty;

/** A datastore resource. */
@Fluent
public final class DatastoreInner extends ProxyResource {
    /*
     * The properties of a datastore resource
     */
    @JsonProperty(value = "properties")
    private DatastoreProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of a datastore resource.
     *
     * @return the innerProperties value.
     */
    private DatastoreProperties innerProperties() {
        return this.innerProperties;
    }

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

    /**
     * Get the netAppVolume property: An Azure NetApp Files volume.
     *
     * @return the netAppVolume value.
     */
    public NetAppVolume netAppVolume() {
        return this.innerProperties() == null ? null : this.innerProperties().netAppVolume();
    }

    /**
     * Set the netAppVolume property: An Azure NetApp Files volume.
     *
     * @param netAppVolume the netAppVolume value to set.
     * @return the DatastoreInner object itself.
     */
    public DatastoreInner withNetAppVolume(NetAppVolume netAppVolume) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DatastoreProperties();
        }
        this.innerProperties().withNetAppVolume(netAppVolume);
        return this;
    }

    /**
     * Get the diskPoolVolume property: An iSCSI volume.
     *
     * @return the diskPoolVolume value.
     */
    public DiskPoolVolume diskPoolVolume() {
        return this.innerProperties() == null ? null : this.innerProperties().diskPoolVolume();
    }

    /**
     * Set the diskPoolVolume property: An iSCSI volume.
     *
     * @param diskPoolVolume the diskPoolVolume value to set.
     * @return the DatastoreInner object itself.
     */
    public DatastoreInner withDiskPoolVolume(DiskPoolVolume diskPoolVolume) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DatastoreProperties();
        }
        this.innerProperties().withDiskPoolVolume(diskPoolVolume);
        return this;
    }

    /**
     * Get the status property: The operational status of the datastore.
     *
     * @return the status value.
     */
    public DatastoreStatus status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

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