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

package com.azure.resourcemanager.batchai.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** File Server creation parameters. */
@JsonFlatten
@Fluent
public class FileServerCreateParameters {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(FileServerCreateParameters.class);

    /*
     * The size of the virtual machine for the File Server. For information
     * about available VM sizes from the Virtual Machines Marketplace, see
     * Sizes for Virtual Machines (Linux).
     */
    @JsonProperty(value = "properties.vmSize")
    private String vmSize;

    /*
     * SSH configuration for the File Server node.
     */
    @JsonProperty(value = "properties.sshConfiguration")
    private SshConfiguration sshConfiguration;

    /*
     * Settings for the data disks which will be created for the File Server.
     */
    @JsonProperty(value = "properties.dataDisks")
    private DataDisks dataDisks;

    /*
     * Identifier of an existing virtual network subnet to put the File Server
     * in. If not provided, a new virtual network and subnet will be created.
     */
    @JsonProperty(value = "properties.subnet")
    private ResourceId subnet;

    /**
     * Get the vmSize property: The size of the virtual machine for the File Server. For information about available VM
     * sizes from the Virtual Machines Marketplace, see Sizes for Virtual Machines (Linux).
     *
     * @return the vmSize value.
     */
    public String vmSize() {
        return this.vmSize;
    }

    /**
     * Set the vmSize property: The size of the virtual machine for the File Server. For information about available VM
     * sizes from the Virtual Machines Marketplace, see Sizes for Virtual Machines (Linux).
     *
     * @param vmSize the vmSize value to set.
     * @return the FileServerCreateParameters object itself.
     */
    public FileServerCreateParameters withVmSize(String vmSize) {
        this.vmSize = vmSize;
        return this;
    }

    /**
     * Get the sshConfiguration property: SSH configuration for the File Server node.
     *
     * @return the sshConfiguration value.
     */
    public SshConfiguration sshConfiguration() {
        return this.sshConfiguration;
    }

    /**
     * Set the sshConfiguration property: SSH configuration for the File Server node.
     *
     * @param sshConfiguration the sshConfiguration value to set.
     * @return the FileServerCreateParameters object itself.
     */
    public FileServerCreateParameters withSshConfiguration(SshConfiguration sshConfiguration) {
        this.sshConfiguration = sshConfiguration;
        return this;
    }

    /**
     * Get the dataDisks property: Settings for the data disks which will be created for the File Server.
     *
     * @return the dataDisks value.
     */
    public DataDisks dataDisks() {
        return this.dataDisks;
    }

    /**
     * Set the dataDisks property: Settings for the data disks which will be created for the File Server.
     *
     * @param dataDisks the dataDisks value to set.
     * @return the FileServerCreateParameters object itself.
     */
    public FileServerCreateParameters withDataDisks(DataDisks dataDisks) {
        this.dataDisks = dataDisks;
        return this;
    }

    /**
     * Get the subnet property: Identifier of an existing virtual network subnet to put the File Server in. If not
     * provided, a new virtual network and subnet will be created.
     *
     * @return the subnet value.
     */
    public ResourceId subnet() {
        return this.subnet;
    }

    /**
     * Set the subnet property: Identifier of an existing virtual network subnet to put the File Server in. If not
     * provided, a new virtual network and subnet will be created.
     *
     * @param subnet the subnet value to set.
     * @return the FileServerCreateParameters object itself.
     */
    public FileServerCreateParameters withSubnet(ResourceId subnet) {
        this.subnet = subnet;
        return this;
    }

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