// 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 update properties. */
@Fluent
public final class StorageProfileUpdate {
    /*
     * Gets or sets the list of virtual disks associated with the virtual machine.
     */
    @JsonProperty(value = "disks")
    private List<VirtualDiskUpdate> disks;

    /**
     * Get the disks property: Gets or sets the list of virtual disks associated with the virtual machine.
     *
     * @return the disks value.
     */
    public List<VirtualDiskUpdate> 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 StorageProfileUpdate object itself.
     */
    public StorageProfileUpdate withDisks(List<VirtualDiskUpdate> disks) {
        this.disks = disks;
        return this;
    }

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