// 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.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.scvmm.fluent.models.VirtualMachineInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of VirtualMachine. */
public interface VirtualMachine {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the location property: The geo-location where the resource lives.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the tags property: Resource tags.
     *
     * @return the tags value.
     */
    Map<String, String> tags();

    /**
     * Gets the systemData property: The system data.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the extendedLocation property: The extended location.
     *
     * @return the extendedLocation value.
     */
    ExtendedLocation extendedLocation();

    /**
     * Gets the inventoryItemId property: Gets or sets the inventory Item ID for the resource.
     *
     * @return the inventoryItemId value.
     */
    String inventoryItemId();

    /**
     * Gets the vmmServerId property: ARM Id of the vmmServer resource in which this resource resides.
     *
     * @return the vmmServerId value.
     */
    String vmmServerId();

    /**
     * Gets the cloudId property: ARM Id of the cloud resource to use for deploying the vm.
     *
     * @return the cloudId value.
     */
    String cloudId();

    /**
     * Gets the templateId property: ARM Id of the template resource to use for deploying the vm.
     *
     * @return the templateId value.
     */
    String templateId();

    /**
     * Gets the checkpointType property: Type of checkpoint supported for the vm.
     *
     * @return the checkpointType value.
     */
    String checkpointType();

    /**
     * Gets the checkpoints property: Checkpoints in the vm.
     *
     * @return the checkpoints value.
     */
    List<Checkpoint> checkpoints();

    /**
     * Gets the availabilitySets property: Availability Sets in vm.
     *
     * @return the availabilitySets value.
     */
    List<AvailabilitySetListItem> availabilitySets();

    /**
     * Gets the osProfile property: OS properties.
     *
     * @return the osProfile value.
     */
    OsProfile osProfile();

    /**
     * Gets the hardwareProfile property: Hardware properties.
     *
     * @return the hardwareProfile value.
     */
    HardwareProfile hardwareProfile();

    /**
     * Gets the networkProfile property: Network properties.
     *
     * @return the networkProfile value.
     */
    NetworkProfile networkProfile();

    /**
     * Gets the storageProfile property: Storage properties.
     *
     * @return the storageProfile value.
     */
    StorageProfile storageProfile();

    /**
     * Gets the vmName property: VMName is the name of VM on the SCVMM server.
     *
     * @return the vmName value.
     */
    String vmName();

    /**
     * Gets the uuid property: Unique ID of the virtual machine.
     *
     * @return the uuid value.
     */
    String uuid();

    /**
     * Gets the generation property: Gets or sets the generation for the vm.
     *
     * @return the generation value.
     */
    Integer generation();

    /**
     * Gets the powerState property: Gets the power state of the virtual machine.
     *
     * @return the powerState value.
     */
    String powerState();

    /**
     * Gets the provisioningState property: Gets or sets the provisioning state.
     *
     * @return the provisioningState value.
     */
    String provisioningState();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

    /**
     * Gets the inner com.azure.resourcemanager.scvmm.fluent.models.VirtualMachineInner object.
     *
     * @return the inner object.
     */
    VirtualMachineInner innerModel();

    /** The entirety of the VirtualMachine definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithExtendedLocation,
            DefinitionStages.WithCreate {
    }
    /** The VirtualMachine definition stages. */
    interface DefinitionStages {
        /** The first stage of the VirtualMachine definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the VirtualMachine definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(String location);
        }
        /** The stage of the VirtualMachine definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group.
             * @return the next definition stage.
             */
            WithExtendedLocation withExistingResourceGroup(String resourceGroupName);
        }
        /** The stage of the VirtualMachine definition allowing to specify extendedLocation. */
        interface WithExtendedLocation {
            /**
             * Specifies the extendedLocation property: The extended location..
             *
             * @param extendedLocation The extended location.
             * @return the next definition stage.
             */
            WithCreate withExtendedLocation(ExtendedLocation extendedLocation);
        }
        /**
         * The stage of the VirtualMachine definition which contains all the minimum required properties for the
         * resource to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithTags,
                DefinitionStages.WithInventoryItemId,
                DefinitionStages.WithVmmServerId,
                DefinitionStages.WithCloudId,
                DefinitionStages.WithTemplateId,
                DefinitionStages.WithCheckpointType,
                DefinitionStages.WithCheckpoints,
                DefinitionStages.WithAvailabilitySets,
                DefinitionStages.WithOsProfile,
                DefinitionStages.WithHardwareProfile,
                DefinitionStages.WithNetworkProfile,
                DefinitionStages.WithStorageProfile,
                DefinitionStages.WithVmName,
                DefinitionStages.WithUuid,
                DefinitionStages.WithGeneration {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            VirtualMachine create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            VirtualMachine create(Context context);
        }
        /** The stage of the VirtualMachine definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the VirtualMachine definition allowing to specify inventoryItemId. */
        interface WithInventoryItemId {
            /**
             * Specifies the inventoryItemId property: Gets or sets the inventory Item ID for the resource..
             *
             * @param inventoryItemId Gets or sets the inventory Item ID for the resource.
             * @return the next definition stage.
             */
            WithCreate withInventoryItemId(String inventoryItemId);
        }
        /** The stage of the VirtualMachine definition allowing to specify vmmServerId. */
        interface WithVmmServerId {
            /**
             * Specifies the vmmServerId property: ARM Id of the vmmServer resource in which this resource resides..
             *
             * @param vmmServerId ARM Id of the vmmServer resource in which this resource resides.
             * @return the next definition stage.
             */
            WithCreate withVmmServerId(String vmmServerId);
        }
        /** The stage of the VirtualMachine definition allowing to specify cloudId. */
        interface WithCloudId {
            /**
             * Specifies the cloudId property: ARM Id of the cloud resource to use for deploying the vm..
             *
             * @param cloudId ARM Id of the cloud resource to use for deploying the vm.
             * @return the next definition stage.
             */
            WithCreate withCloudId(String cloudId);
        }
        /** The stage of the VirtualMachine definition allowing to specify templateId. */
        interface WithTemplateId {
            /**
             * Specifies the templateId property: ARM Id of the template resource to use for deploying the vm..
             *
             * @param templateId ARM Id of the template resource to use for deploying the vm.
             * @return the next definition stage.
             */
            WithCreate withTemplateId(String templateId);
        }
        /** The stage of the VirtualMachine definition allowing to specify checkpointType. */
        interface WithCheckpointType {
            /**
             * Specifies the checkpointType property: Type of checkpoint supported for the vm..
             *
             * @param checkpointType Type of checkpoint supported for the vm.
             * @return the next definition stage.
             */
            WithCreate withCheckpointType(String checkpointType);
        }
        /** The stage of the VirtualMachine definition allowing to specify checkpoints. */
        interface WithCheckpoints {
            /**
             * Specifies the checkpoints property: Checkpoints in the vm..
             *
             * @param checkpoints Checkpoints in the vm.
             * @return the next definition stage.
             */
            WithCreate withCheckpoints(List<Checkpoint> checkpoints);
        }
        /** The stage of the VirtualMachine definition allowing to specify availabilitySets. */
        interface WithAvailabilitySets {
            /**
             * Specifies the availabilitySets property: Availability Sets in vm..
             *
             * @param availabilitySets Availability Sets in vm.
             * @return the next definition stage.
             */
            WithCreate withAvailabilitySets(List<AvailabilitySetListItem> availabilitySets);
        }
        /** The stage of the VirtualMachine definition allowing to specify osProfile. */
        interface WithOsProfile {
            /**
             * Specifies the osProfile property: OS properties..
             *
             * @param osProfile OS properties.
             * @return the next definition stage.
             */
            WithCreate withOsProfile(OsProfile osProfile);
        }
        /** The stage of the VirtualMachine definition allowing to specify hardwareProfile. */
        interface WithHardwareProfile {
            /**
             * Specifies the hardwareProfile property: Hardware properties..
             *
             * @param hardwareProfile Hardware properties.
             * @return the next definition stage.
             */
            WithCreate withHardwareProfile(HardwareProfile hardwareProfile);
        }
        /** The stage of the VirtualMachine definition allowing to specify networkProfile. */
        interface WithNetworkProfile {
            /**
             * Specifies the networkProfile property: Network properties..
             *
             * @param networkProfile Network properties.
             * @return the next definition stage.
             */
            WithCreate withNetworkProfile(NetworkProfile networkProfile);
        }
        /** The stage of the VirtualMachine definition allowing to specify storageProfile. */
        interface WithStorageProfile {
            /**
             * Specifies the storageProfile property: Storage properties..
             *
             * @param storageProfile Storage properties.
             * @return the next definition stage.
             */
            WithCreate withStorageProfile(StorageProfile storageProfile);
        }
        /** The stage of the VirtualMachine definition allowing to specify vmName. */
        interface WithVmName {
            /**
             * Specifies the vmName property: VMName is the name of VM on the SCVMM server..
             *
             * @param vmName VMName is the name of VM on the SCVMM server.
             * @return the next definition stage.
             */
            WithCreate withVmName(String vmName);
        }
        /** The stage of the VirtualMachine definition allowing to specify uuid. */
        interface WithUuid {
            /**
             * Specifies the uuid property: Unique ID of the virtual machine..
             *
             * @param uuid Unique ID of the virtual machine.
             * @return the next definition stage.
             */
            WithCreate withUuid(String uuid);
        }
        /** The stage of the VirtualMachine definition allowing to specify generation. */
        interface WithGeneration {
            /**
             * Specifies the generation property: Gets or sets the generation for the vm..
             *
             * @param generation Gets or sets the generation for the vm.
             * @return the next definition stage.
             */
            WithCreate withGeneration(Integer generation);
        }
    }
    /**
     * Begins update for the VirtualMachine resource.
     *
     * @return the stage of resource update.
     */
    VirtualMachine.Update update();

    /** The template for VirtualMachine update. */
    interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        VirtualMachine apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        VirtualMachine apply(Context context);
    }
    /** The VirtualMachine update stages. */
    interface UpdateStages {
        /** The stage of the VirtualMachine update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Gets or sets the Resource tags..
             *
             * @param tags Gets or sets the Resource tags.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the VirtualMachine update allowing to specify properties. */
        interface WithProperties {
            /**
             * Specifies the properties property: Defines the resource properties..
             *
             * @param properties Defines the resource properties.
             * @return the next definition stage.
             */
            Update withProperties(VirtualMachineUpdateProperties properties);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    VirtualMachine refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    VirtualMachine refresh(Context context);

    /**
     * Stop virtual machine.
     *
     * @param body Virtualmachine stop action payload.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void stop(StopVirtualMachineOptions body);

    /**
     * Stop virtual machine.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void stop();

    /**
     * Stop virtual machine.
     *
     * @param body Virtualmachine stop action payload.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void stop(StopVirtualMachineOptions body, Context context);

    /**
     * Start virtual machine.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void start();

    /**
     * Start virtual machine.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void start(Context context);

    /**
     * Restart virtual machine.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void restart();

    /**
     * Restart virtual machine.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void restart(Context context);

    /**
     * Creates a checkpoint in virtual machine.
     *
     * @param body Virtualmachine create checkpoint action payload.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void createCheckpoint(VirtualMachineCreateCheckpoint body);

    /**
     * Creates a checkpoint in virtual machine.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void createCheckpoint();

    /**
     * Creates a checkpoint in virtual machine.
     *
     * @param body Virtualmachine create checkpoint action payload.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void createCheckpoint(VirtualMachineCreateCheckpoint body, Context context);

    /**
     * Deletes a checkpoint in virtual machine.
     *
     * @param body Virtualmachine delete checkpoint action payload.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteCheckpoint(VirtualMachineDeleteCheckpoint body);

    /**
     * Deletes a checkpoint in virtual machine.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteCheckpoint();

    /**
     * Deletes a checkpoint in virtual machine.
     *
     * @param body Virtualmachine delete checkpoint action payload.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteCheckpoint(VirtualMachineDeleteCheckpoint body, Context context);

    /**
     * Restores to a checkpoint in virtual machine.
     *
     * @param body Virtualmachine restore checkpoint action payload.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void restoreCheckpoint(VirtualMachineRestoreCheckpoint body);

    /**
     * Restores to a checkpoint in virtual machine.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void restoreCheckpoint();

    /**
     * Restores to a checkpoint in virtual machine.
     *
     * @param body Virtualmachine restore checkpoint action payload.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void restoreCheckpoint(VirtualMachineRestoreCheckpoint body, Context context);
}
