// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.netapp.models.AccountEncryption;
import com.azure.resourcemanager.netapp.models.ActiveDirectory;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** NetApp account properties. */
@Fluent
public final class AccountProperties {
    /*
     * Azure lifecycle management
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /*
     * Active Directories
     */
    @JsonProperty(value = "activeDirectories")
    private List<ActiveDirectory> activeDirectories;

    /*
     * Encryption settings
     */
    @JsonProperty(value = "encryption")
    private AccountEncryption encryption;

    /*
     * Shows the status of disableShowmount for all volumes under the subscription, null equals false
     */
    @JsonProperty(value = "disableShowmount", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean disableShowmount;

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

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

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

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

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

    /**
     * Set the encryption property: Encryption settings.
     *
     * @param encryption the encryption value to set.
     * @return the AccountProperties object itself.
     */
    public AccountProperties withEncryption(AccountEncryption encryption) {
        this.encryption = 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.disableShowmount;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (activeDirectories() != null) {
            activeDirectories().forEach(e -> e.validate());
        }
        if (encryption() != null) {
            encryption().validate();
        }
    }
}
