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

package com.azure.resourcemanager.baremetalinfrastructure.models;

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

/** Specifies the storage settings for the AzureBareMetal instance disks. */
@Fluent
public final class StorageProfile {
    /*
     * IP Address to connect to storage.
     */
    @JsonProperty(value = "nfsIpAddress", access = JsonProperty.Access.WRITE_ONLY)
    private String nfsIpAddress;

    /*
     * Specifies information about the operating system disk used by baremetal instance.
     */
    @JsonProperty(value = "osDisks")
    private List<Disk> osDisks;

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

    /**
     * Get the nfsIpAddress property: IP Address to connect to storage.
     *
     * @return the nfsIpAddress value.
     */
    public String nfsIpAddress() {
        return this.nfsIpAddress;
    }

    /**
     * Get the osDisks property: Specifies information about the operating system disk used by baremetal instance.
     *
     * @return the osDisks value.
     */
    public List<Disk> osDisks() {
        return this.osDisks;
    }

    /**
     * Set the osDisks property: Specifies information about the operating system disk used by baremetal instance.
     *
     * @param osDisks the osDisks value to set.
     * @return the StorageProfile object itself.
     */
    public StorageProfile withOsDisks(List<Disk> osDisks) {
        this.osDisks = osDisks;
        return this;
    }

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