// 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;

/** The error details provided when the checkAmlFSSubnets call fails. */
@Fluent
public final class AmlFilesystemCheckSubnetError {
    /*
     * The error details for the AML file system's subnet.
     */
    @JsonProperty(value = "filesystemSubnet")
    private AmlFilesystemCheckSubnetErrorFilesystemSubnet filesystemSubnet;

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

    /**
     * Get the filesystemSubnet property: The error details for the AML file system's subnet.
     *
     * @return the filesystemSubnet value.
     */
    public AmlFilesystemCheckSubnetErrorFilesystemSubnet filesystemSubnet() {
        return this.filesystemSubnet;
    }

    /**
     * Set the filesystemSubnet property: The error details for the AML file system's subnet.
     *
     * @param filesystemSubnet the filesystemSubnet value to set.
     * @return the AmlFilesystemCheckSubnetError object itself.
     */
    public AmlFilesystemCheckSubnetError withFilesystemSubnet(
        AmlFilesystemCheckSubnetErrorFilesystemSubnet filesystemSubnet) {
        this.filesystemSubnet = filesystemSubnet;
        return this;
    }

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