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

package com.azure.resourcemanager.workloads.models;

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

/**
 * The SAP Disk Configuration contains 'recommended disk' details and list of supported disks detail for a volume type.
 */
@Fluent
public final class SapDiskConfiguration {
    /*
     * The recommended disk details for a given VM Sku.
     */
    @JsonProperty(value = "recommendedConfiguration")
    private DiskVolumeConfiguration recommendedConfiguration;

    /*
     * The list of supported disks for a given VM Sku.
     */
    @JsonProperty(value = "supportedConfigurations")
    private List<DiskDetails> supportedConfigurations;

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

    /**
     * Get the recommendedConfiguration property: The recommended disk details for a given VM Sku.
     *
     * @return the recommendedConfiguration value.
     */
    public DiskVolumeConfiguration recommendedConfiguration() {
        return this.recommendedConfiguration;
    }

    /**
     * Set the recommendedConfiguration property: The recommended disk details for a given VM Sku.
     *
     * @param recommendedConfiguration the recommendedConfiguration value to set.
     * @return the SapDiskConfiguration object itself.
     */
    public SapDiskConfiguration withRecommendedConfiguration(DiskVolumeConfiguration recommendedConfiguration) {
        this.recommendedConfiguration = recommendedConfiguration;
        return this;
    }

    /**
     * Get the supportedConfigurations property: The list of supported disks for a given VM Sku.
     *
     * @return the supportedConfigurations value.
     */
    public List<DiskDetails> supportedConfigurations() {
        return this.supportedConfigurations;
    }

    /**
     * Set the supportedConfigurations property: The list of supported disks for a given VM Sku.
     *
     * @param supportedConfigurations the supportedConfigurations value to set.
     * @return the SapDiskConfiguration object itself.
     */
    public SapDiskConfiguration withSupportedConfigurations(List<DiskDetails> supportedConfigurations) {
        this.supportedConfigurations = supportedConfigurations;
        return this;
    }

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