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

package com.azure.resourcemanager.storagecache.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Hydration and archive settings and status. */
@Fluent
public final class AmlFilesystemPropertiesHsm {
    /*
     * Specifies HSM settings of the AML file system.
     */
    @JsonProperty(value = "settings")
    private AmlFilesystemHsmSettings settings;

    /*
     * Archive status
     */
    @JsonProperty(value = "archiveStatus", access = JsonProperty.Access.WRITE_ONLY)
    private List<AmlFilesystemArchive> archiveStatus;

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

    /**
     * Get the settings property: Specifies HSM settings of the AML file system.
     *
     * @return the settings value.
     */
    public AmlFilesystemHsmSettings settings() {
        return this.settings;
    }

    /**
     * Set the settings property: Specifies HSM settings of the AML file system.
     *
     * @param settings the settings value to set.
     * @return the AmlFilesystemPropertiesHsm object itself.
     */
    public AmlFilesystemPropertiesHsm withSettings(AmlFilesystemHsmSettings settings) {
        this.settings = settings;
        return this;
    }

    /**
     * Get the archiveStatus property: Archive status.
     *
     * @return the archiveStatus value.
     */
    public List<AmlFilesystemArchive> archiveStatus() {
        return this.archiveStatus;
    }

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