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

package com.azure.resourcemanager.connectedvmware.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.connectedvmware.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 extendedLocation property: Gets or sets the extended location.
     *
     * @return the extendedLocation value.
     */
    ExtendedLocation extendedLocation();

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

    /**
     * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of
     * the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must
     * validate and persist this value.
     *
     * @return the kind value.
     */
    String kind();

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

    /**
     * Gets the resourcePoolId property: Gets or sets the ARM Id of the resourcePool resource on which this virtual
     * machine will deploy.
     *
     * @return the resourcePoolId value.
     */
    String resourcePoolId();

    /**
     * Gets the templateId property: Gets or sets the ARM Id of the template resource to deploy the virtual machine.
     *
     * @return the templateId value.
     */
    String templateId();

    /**
     * Gets the vCenterId property: Gets or sets the ARM Id of the vCenter resource in which this resource pool resides.
     *
     * @return the vCenterId value.
     */
    String vCenterId();

    /**
     * Gets the placementProfile property: Placement properties.
     *
     * @return the placementProfile value.
     */
    PlacementProfile placementProfile();

    /**
     * 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 guestAgentProfile property: Guest agent status properties.
     *
     * @return the guestAgentProfile value.
     */
    GuestAgentProfile guestAgentProfile();

    /**
     * Gets the securityProfile property: Gets the security profile.
     *
     * @return the securityProfile value.
     */
    SecurityProfile securityProfile();

    /**
     * Gets the moRefId property: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine.
     *
     * @return the moRefId value.
     */
    String moRefId();

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

    /**
     * Gets the moName property: Gets or sets the vCenter Managed Object name for the virtual machine.
     *
     * @return the moName value.
     */
    String moName();

    /**
     * Gets the folderPath property: Gets or sets the folder path of the vm.
     *
     * @return the folderPath value.
     */
    String folderPath();

    /**
     * Gets the instanceUuid property: Gets or sets the instance uuid of the vm.
     *
     * @return the instanceUuid value.
     */
    String instanceUuid();

    /**
     * Gets the smbiosUuid property: Gets or sets the SMBIOS UUID of the vm.
     *
     * @return the smbiosUuid value.
     */
    String smbiosUuid();

    /**
     * Gets the firmwareType property: Firmware type.
     *
     * @return the firmwareType value.
     */
    FirmwareType firmwareType();

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

    /**
     * Gets the customResourceName property: Gets the name of the corresponding resource in Kubernetes.
     *
     * @return the customResourceName value.
     */
    String customResourceName();

    /**
     * Gets the uuid property: Gets or sets a unique identifier for this resource.
     *
     * @return the uuid value.
     */
    String uuid();

    /**
     * Gets the statuses property: The resource status information.
     *
     * @return the statuses value.
     */
    List<ResourceStatus> statuses();

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

    /**
     * Gets the vmId property: Gets or sets a unique identifier for the vm resource.
     *
     * @return the vmId value.
     */
    String vmId();

    /**
     * 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 name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.connectedvmware.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.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 Resource Group Name.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * 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.WithExtendedLocation,
                DefinitionStages.WithKind,
                DefinitionStages.WithIdentity,
                DefinitionStages.WithResourcePoolId,
                DefinitionStages.WithTemplateId,
                DefinitionStages.WithVCenterId,
                DefinitionStages.WithPlacementProfile,
                DefinitionStages.WithOsProfile,
                DefinitionStages.WithHardwareProfile,
                DefinitionStages.WithNetworkProfile,
                DefinitionStages.WithStorageProfile,
                DefinitionStages.WithGuestAgentProfile,
                DefinitionStages.WithSecurityProfile,
                DefinitionStages.WithMoRefId,
                DefinitionStages.WithInventoryItemId,
                DefinitionStages.WithSmbiosUuid,
                DefinitionStages.WithFirmwareType {
            /**
             * 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 extendedLocation. */
        interface WithExtendedLocation {
            /**
             * Specifies the extendedLocation property: Gets or sets the extended location..
             *
             * @param extendedLocation Gets or sets the extended location.
             * @return the next definition stage.
             */
            WithCreate withExtendedLocation(ExtendedLocation extendedLocation);
        }
        /** The stage of the VirtualMachine definition allowing to specify kind. */
        interface WithKind {
            /**
             * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for
             * resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the
             * resource provider must validate and persist this value..
             *
             * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the
             *     same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider
             *     must validate and persist this value.
             * @return the next definition stage.
             */
            WithCreate withKind(String kind);
        }
        /** The stage of the VirtualMachine definition allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The identity of the resource..
             *
             * @param identity The identity of the resource.
             * @return the next definition stage.
             */
            WithCreate withIdentity(Identity identity);
        }
        /** The stage of the VirtualMachine definition allowing to specify resourcePoolId. */
        interface WithResourcePoolId {
            /**
             * Specifies the resourcePoolId property: Gets or sets the ARM Id of the resourcePool resource on which this
             * virtual machine will deploy..
             *
             * @param resourcePoolId Gets or sets the ARM Id of the resourcePool resource on which this virtual machine
             *     will deploy.
             * @return the next definition stage.
             */
            WithCreate withResourcePoolId(String resourcePoolId);
        }
        /** The stage of the VirtualMachine definition allowing to specify templateId. */
        interface WithTemplateId {
            /**
             * Specifies the templateId property: Gets or sets the ARM Id of the template resource to deploy the virtual
             * machine..
             *
             * @param templateId Gets or sets the ARM Id of the template resource to deploy the virtual machine.
             * @return the next definition stage.
             */
            WithCreate withTemplateId(String templateId);
        }
        /** The stage of the VirtualMachine definition allowing to specify vCenterId. */
        interface WithVCenterId {
            /**
             * Specifies the vCenterId property: Gets or sets the ARM Id of the vCenter resource in which this resource
             * pool resides..
             *
             * @param vCenterId Gets or sets the ARM Id of the vCenter resource in which this resource pool resides.
             * @return the next definition stage.
             */
            WithCreate withVCenterId(String vCenterId);
        }
        /** The stage of the VirtualMachine definition allowing to specify placementProfile. */
        interface WithPlacementProfile {
            /**
             * Specifies the placementProfile property: Placement properties..
             *
             * @param placementProfile Placement properties.
             * @return the next definition stage.
             */
            WithCreate withPlacementProfile(PlacementProfile placementProfile);
        }
        /** 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 guestAgentProfile. */
        interface WithGuestAgentProfile {
            /**
             * Specifies the guestAgentProfile property: Guest agent status properties..
             *
             * @param guestAgentProfile Guest agent status properties.
             * @return the next definition stage.
             */
            WithCreate withGuestAgentProfile(GuestAgentProfile guestAgentProfile);
        }
        /** The stage of the VirtualMachine definition allowing to specify securityProfile. */
        interface WithSecurityProfile {
            /**
             * Specifies the securityProfile property: Gets the security profile..
             *
             * @param securityProfile Gets the security profile.
             * @return the next definition stage.
             */
            WithCreate withSecurityProfile(SecurityProfile securityProfile);
        }
        /** The stage of the VirtualMachine definition allowing to specify moRefId. */
        interface WithMoRefId {
            /**
             * Specifies the moRefId property: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the
             * virtual machine..
             *
             * @param moRefId Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine.
             * @return the next definition stage.
             */
            WithCreate withMoRefId(String moRefId);
        }
        /** 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 virtual machine..
             *
             * @param inventoryItemId Gets or sets the inventory Item ID for the virtual machine.
             * @return the next definition stage.
             */
            WithCreate withInventoryItemId(String inventoryItemId);
        }
        /** The stage of the VirtualMachine definition allowing to specify smbiosUuid. */
        interface WithSmbiosUuid {
            /**
             * Specifies the smbiosUuid property: Gets or sets the SMBIOS UUID of the vm..
             *
             * @param smbiosUuid Gets or sets the SMBIOS UUID of the vm.
             * @return the next definition stage.
             */
            WithCreate withSmbiosUuid(String smbiosUuid);
        }
        /** The stage of the VirtualMachine definition allowing to specify firmwareType. */
        interface WithFirmwareType {
            /**
             * Specifies the firmwareType property: Firmware type.
             *
             * @param firmwareType Firmware type.
             * @return the next definition stage.
             */
            WithCreate withFirmwareType(FirmwareType firmwareType);
        }
    }
    /**
     * 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.WithIdentity,
            UpdateStages.WithHardwareProfile,
            UpdateStages.WithOsProfile,
            UpdateStages.WithStorageProfile,
            UpdateStages.WithNetworkProfile {
        /**
         * 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 identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The identity of the resource..
             *
             * @param identity The identity of the resource.
             * @return the next definition stage.
             */
            Update withIdentity(Identity identity);
        }
        /** The stage of the VirtualMachine update allowing to specify hardwareProfile. */
        interface WithHardwareProfile {
            /**
             * Specifies the hardwareProfile property: Defines the resource properties..
             *
             * @param hardwareProfile Defines the resource properties.
             * @return the next definition stage.
             */
            Update withHardwareProfile(HardwareProfile hardwareProfile);
        }
        /** The stage of the VirtualMachine update allowing to specify osProfile. */
        interface WithOsProfile {
            /**
             * Specifies the osProfile property: OS properties..
             *
             * @param osProfile OS properties.
             * @return the next definition stage.
             */
            Update withOsProfile(OsProfileUpdate osProfile);
        }
        /** The stage of the VirtualMachine update allowing to specify storageProfile. */
        interface WithStorageProfile {
            /**
             * Specifies the storageProfile property: Defines the resource update properties..
             *
             * @param storageProfile Defines the resource update properties.
             * @return the next definition stage.
             */
            Update withStorageProfile(StorageProfileUpdate storageProfile);
        }
        /** The stage of the VirtualMachine update allowing to specify networkProfile. */
        interface WithNetworkProfile {
            /**
             * Specifies the networkProfile property: Defines the update resource properties..
             *
             * @param networkProfile Defines the update resource properties.
             * @return the next definition stage.
             */
            Update withNetworkProfile(NetworkProfileUpdate networkProfile);
        }
    }
    /**
     * 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);

    /**
     * Implements the operation to stop a virtual machine.
     *
     * <p>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);

    /**
     * Implements the operation to stop a virtual machine.
     *
     * <p>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();

    /**
     * Implements the operation to stop a virtual machine.
     *
     * <p>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);

    /**
     * Implements the operation to start a virtual machine.
     *
     * <p>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();

    /**
     * Implements the operation to start a virtual machine.
     *
     * <p>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);

    /**
     * Implements the operation to restart a virtual machine.
     *
     * <p>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();

    /**
     * Implements the operation to restart a virtual machine.
     *
     * <p>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);
}
