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

package com.azure.resourcemanager.labservices.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.labservices.models.ProvisioningState;
import com.azure.resourcemanager.labservices.models.VirtualMachineConnectionProfile;
import com.azure.resourcemanager.labservices.models.VirtualMachineState;
import com.azure.resourcemanager.labservices.models.VirtualMachineType;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Virtual machine resource properties. */
@Immutable
public final class VirtualMachineProperties {
    /*
     * Current provisioning state of the virtual machine.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * The current state of the virtual machine
     */
    @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
    private VirtualMachineState state;

    /*
     * Profile for information about connecting to the virtual machine.
     */
    @JsonProperty(value = "connectionProfile", access = JsonProperty.Access.WRITE_ONLY)
    private VirtualMachineConnectionProfile connectionProfile;

    /*
     * The lab user ID (not the PUID!) of who claimed the virtual machine.
     */
    @JsonProperty(value = "claimedByUserId", access = JsonProperty.Access.WRITE_ONLY)
    private String claimedByUserId;

    /*
     * The type of this VM resource
     */
    @JsonProperty(value = "vmType", access = JsonProperty.Access.WRITE_ONLY)
    private VirtualMachineType vmType;

    /**
     * Get the provisioningState property: Current provisioning state of the virtual machine.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the state property: The current state of the virtual machine.
     *
     * @return the state value.
     */
    public VirtualMachineState state() {
        return this.state;
    }

    /**
     * Get the connectionProfile property: Profile for information about connecting to the virtual machine.
     *
     * @return the connectionProfile value.
     */
    public VirtualMachineConnectionProfile connectionProfile() {
        return this.connectionProfile;
    }

    /**
     * Get the claimedByUserId property: The lab user ID (not the PUID!) of who claimed the virtual machine.
     *
     * @return the claimedByUserId value.
     */
    public String claimedByUserId() {
        return this.claimedByUserId;
    }

    /**
     * Get the vmType property: The type of this VM resource.
     *
     * @return the vmType value.
     */
    public VirtualMachineType vmType() {
        return this.vmType;
    }

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