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

package com.azure.resourcemanager.netapp.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.netapp.fluent.models.AccountProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** NetApp account patch resource. */
@Fluent
public final class NetAppAccountPatch extends Resource {
    /*
     * NetApp Account properties
     */
    @JsonProperty(value = "properties")
    private AccountProperties innerProperties;

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

    /**
     * Get the innerProperties property: NetApp Account properties.
     *
     * @return the innerProperties value.
     */
    private AccountProperties innerProperties() {
        return this.innerProperties;
    }

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

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

    /**
     * Get the provisioningState property: Azure lifecycle management.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the activeDirectories property: Active Directories.
     *
     * @return the activeDirectories value.
     */
    public List<ActiveDirectory> activeDirectories() {
        return this.innerProperties() == null ? null : this.innerProperties().activeDirectories();
    }

    /**
     * Set the activeDirectories property: Active Directories.
     *
     * @param activeDirectories the activeDirectories value to set.
     * @return the NetAppAccountPatch object itself.
     */
    public NetAppAccountPatch withActiveDirectories(List<ActiveDirectory> activeDirectories) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AccountProperties();
        }
        this.innerProperties().withActiveDirectories(activeDirectories);
        return this;
    }

    /**
     * Get the encryption property: Encryption settings.
     *
     * @return the encryption value.
     */
    public AccountEncryption encryption() {
        return this.innerProperties() == null ? null : this.innerProperties().encryption();
    }

    /**
     * Set the encryption property: Encryption settings.
     *
     * @param encryption the encryption value to set.
     * @return the NetAppAccountPatch object itself.
     */
    public NetAppAccountPatch withEncryption(AccountEncryption encryption) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AccountProperties();
        }
        this.innerProperties().withEncryption(encryption);
        return this;
    }

    /**
     * Get the disableShowmount property: Shows the status of disableShowmount for all volumes under the subscription,
     * null equals false.
     *
     * @return the disableShowmount value.
     */
    public Boolean disableShowmount() {
        return this.innerProperties() == null ? null : this.innerProperties().disableShowmount();
    }

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