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

package com.azure.resourcemanager.scvmm.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Virtual disk model. */
@Fluent
public final class VirtualDiskUpdate {
    /*
     * Gets or sets the name of the disk.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Gets or sets the disk id.
     */
    @JsonProperty(value = "diskId")
    private String diskId;

    /*
     * Gets or sets the disk total size.
     */
    @JsonProperty(value = "diskSizeGB")
    private Integer diskSizeGB;

    /*
     * Gets or sets the disk bus.
     */
    @JsonProperty(value = "bus")
    private Integer bus;

    /*
     * Gets or sets the disk lun.
     */
    @JsonProperty(value = "lun")
    private Integer lun;

    /*
     * Gets or sets the disk bus type.
     */
    @JsonProperty(value = "busType")
    private String busType;

    /*
     * Gets or sets the disk vhd type.
     */
    @JsonProperty(value = "vhdType")
    private String vhdType;

    /*
     * The QoS policy for the disk.
     */
    @JsonProperty(value = "storageQoSPolicy")
    private StorageQoSPolicyDetails storageQoSPolicy;

    /**
     * Get the name property: Gets or sets the name of the disk.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Gets or sets the name of the disk.
     *
     * @param name the name value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the diskId property: Gets or sets the disk id.
     *
     * @return the diskId value.
     */
    public String diskId() {
        return this.diskId;
    }

    /**
     * Set the diskId property: Gets or sets the disk id.
     *
     * @param diskId the diskId value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withDiskId(String diskId) {
        this.diskId = diskId;
        return this;
    }

    /**
     * Get the diskSizeGB property: Gets or sets the disk total size.
     *
     * @return the diskSizeGB value.
     */
    public Integer diskSizeGB() {
        return this.diskSizeGB;
    }

    /**
     * Set the diskSizeGB property: Gets or sets the disk total size.
     *
     * @param diskSizeGB the diskSizeGB value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withDiskSizeGB(Integer diskSizeGB) {
        this.diskSizeGB = diskSizeGB;
        return this;
    }

    /**
     * Get the bus property: Gets or sets the disk bus.
     *
     * @return the bus value.
     */
    public Integer bus() {
        return this.bus;
    }

    /**
     * Set the bus property: Gets or sets the disk bus.
     *
     * @param bus the bus value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withBus(Integer bus) {
        this.bus = bus;
        return this;
    }

    /**
     * Get the lun property: Gets or sets the disk lun.
     *
     * @return the lun value.
     */
    public Integer lun() {
        return this.lun;
    }

    /**
     * Set the lun property: Gets or sets the disk lun.
     *
     * @param lun the lun value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withLun(Integer lun) {
        this.lun = lun;
        return this;
    }

    /**
     * Get the busType property: Gets or sets the disk bus type.
     *
     * @return the busType value.
     */
    public String busType() {
        return this.busType;
    }

    /**
     * Set the busType property: Gets or sets the disk bus type.
     *
     * @param busType the busType value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withBusType(String busType) {
        this.busType = busType;
        return this;
    }

    /**
     * Get the vhdType property: Gets or sets the disk vhd type.
     *
     * @return the vhdType value.
     */
    public String vhdType() {
        return this.vhdType;
    }

    /**
     * Set the vhdType property: Gets or sets the disk vhd type.
     *
     * @param vhdType the vhdType value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withVhdType(String vhdType) {
        this.vhdType = vhdType;
        return this;
    }

    /**
     * Get the storageQoSPolicy property: The QoS policy for the disk.
     *
     * @return the storageQoSPolicy value.
     */
    public StorageQoSPolicyDetails storageQoSPolicy() {
        return this.storageQoSPolicy;
    }

    /**
     * Set the storageQoSPolicy property: The QoS policy for the disk.
     *
     * @param storageQoSPolicy the storageQoSPolicy value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withStorageQoSPolicy(StorageQoSPolicyDetails storageQoSPolicy) {
        this.storageQoSPolicy = storageQoSPolicy;
        return this;
    }

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