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

package com.azure.resourcemanager.connectedvmware.models;

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

/** Defines the resource properties. */
@Fluent
public final class StorageProfile {
    /*
     * Gets or sets the list of virtual disks associated with the virtual machine.
     */
    @JsonProperty(value = "disks")
    private List<VirtualDisk> disks;

    /*
     * Gets or sets the list of virtual SCSI controllers associated with the virtual machine.
     */
    @JsonProperty(value = "scsiControllers", access = JsonProperty.Access.WRITE_ONLY)
    private List<VirtualScsiController> scsiControllers;

    /**
     * Get the disks property: Gets or sets the list of virtual disks associated with the virtual machine.
     *
     * @return the disks value.
     */
    public List<VirtualDisk> disks() {
        return this.disks;
    }

    /**
     * Set the disks property: Gets or sets the list of virtual disks associated with the virtual machine.
     *
     * @param disks the disks value to set.
     * @return the StorageProfile object itself.
     */
    public StorageProfile withDisks(List<VirtualDisk> disks) {
        this.disks = disks;
        return this;
    }

    /**
     * Get the scsiControllers property: Gets or sets the list of virtual SCSI controllers associated with the virtual
     * machine.
     *
     * @return the scsiControllers value.
     */
    public List<VirtualScsiController> scsiControllers() {
        return this.scsiControllers;
    }

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