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

package com.azure.resourcemanager.hybridnetwork.models;

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

/**
 * Specifies information about the operating system disk used by the virtual machine. &lt;br&gt;&lt;br&gt; For more
 * information about disks, see [About disks and VHDs for Azure virtual
 * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
 */
@Fluent
public final class OsDisk {
    /*
     * The OS type.
     */
    @JsonProperty(value = "osType")
    private OperatingSystemTypes osType;

    /*
     * The VHD name.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The virtual hard disk.
     */
    @JsonProperty(value = "vhd")
    private VirtualHardDisk vhd;

    /*
     * Specifies the size of os disk in gigabytes. This is the fully expanded disk size needed of the VHD image on the
     * ASE. This disk size should be greater than the size of the VHD provided in vhdUri.
     */
    @JsonProperty(value = "diskSizeGB")
    private Integer diskSizeGB;

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

    /**
     * Get the osType property: The OS type.
     *
     * @return the osType value.
     */
    public OperatingSystemTypes osType() {
        return this.osType;
    }

    /**
     * Set the osType property: The OS type.
     *
     * @param osType the osType value to set.
     * @return the OsDisk object itself.
     */
    public OsDisk withOsType(OperatingSystemTypes osType) {
        this.osType = osType;
        return this;
    }

    /**
     * Get the name property: The VHD name.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The VHD name.
     *
     * @param name the name value to set.
     * @return the OsDisk object itself.
     */
    public OsDisk withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the vhd property: The virtual hard disk.
     *
     * @return the vhd value.
     */
    public VirtualHardDisk vhd() {
        return this.vhd;
    }

    /**
     * Set the vhd property: The virtual hard disk.
     *
     * @param vhd the vhd value to set.
     * @return the OsDisk object itself.
     */
    public OsDisk withVhd(VirtualHardDisk vhd) {
        this.vhd = vhd;
        return this;
    }

    /**
     * Get the diskSizeGB property: Specifies the size of os disk in gigabytes. This is the fully expanded disk size
     * needed of the VHD image on the ASE. This disk size should be greater than the size of the VHD provided in vhdUri.
     *
     * @return the diskSizeGB value.
     */
    public Integer diskSizeGB() {
        return this.diskSizeGB;
    }

    /**
     * Set the diskSizeGB property: Specifies the size of os disk in gigabytes. This is the fully expanded disk size
     * needed of the VHD image on the ASE. This disk size should be greater than the size of the VHD provided in vhdUri.
     *
     * @param diskSizeGB the diskSizeGB value to set.
     * @return the OsDisk object itself.
     */
    public OsDisk withDiskSizeGB(Integer diskSizeGB) {
        this.diskSizeGB = diskSizeGB;
        return this;
    }

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