// 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.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.labservices.fluent.models.LabPlanInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of LabPlan. */
public interface LabPlan {
    /**
     * 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: Metadata pertaining to creation and last modification of the lab plan.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the identity property: Managed Identity Information.
     *
     * @return the identity value.
     */
    Identity identity();

    /**
     * Gets the provisioningState property: Current provisioning state of the lab plan.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the defaultConnectionProfile property: The default lab connection profile. This can be changed on a lab
     * resource and only provides a default profile.
     *
     * @return the defaultConnectionProfile value.
     */
    ConnectionProfile defaultConnectionProfile();

    /**
     * Gets the defaultAutoShutdownProfile property: The default lab shutdown profile. This can be changed on a lab
     * resource and only provides a default profile.
     *
     * @return the defaultAutoShutdownProfile value.
     */
    AutoShutdownProfile defaultAutoShutdownProfile();

    /**
     * Gets the defaultNetworkProfile property: The lab plan network profile. To enforce lab network policies they must
     * be defined here and cannot be changed when there are existing labs associated with this lab plan.
     *
     * @return the defaultNetworkProfile value.
     */
    LabPlanNetworkProfile defaultNetworkProfile();

    /**
     * Gets the allowedRegions property: The allowed regions for the lab creator to use when creating labs using this
     * lab plan.
     *
     * @return the allowedRegions value.
     */
    List<String> allowedRegions();

    /**
     * Gets the sharedGalleryId property: Resource ID of the Shared Image Gallery attached to this lab plan. When saving
     * a lab template virtual machine image it will be persisted in this gallery. Shared images from the gallery can be
     * made available to use when creating new labs.
     *
     * @return the sharedGalleryId value.
     */
    String sharedGalleryId();

    /**
     * Gets the supportInfo property: Support contact information and instructions for users of the lab plan. This
     * information is displayed to lab owners and virtual machine users for all labs in the lab plan.
     *
     * @return the supportInfo value.
     */
    SupportInfo supportInfo();

    /**
     * Gets the linkedLmsInstance property: Base Url of the lms instance this lab plan can link lab rosters against.
     *
     * @return the linkedLmsInstance value.
     */
    String linkedLmsInstance();

    /**
     * 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.labservices.fluent.models.LabPlanInner object.
     *
     * @return the inner object.
     */
    LabPlanInner innerModel();

    /** The entirety of the LabPlan definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithCreate {
    }
    /** The LabPlan definition stages. */
    interface DefinitionStages {
        /** The first stage of the LabPlan definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the LabPlan 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 LabPlan definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * The stage of the LabPlan 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.WithIdentity,
                DefinitionStages.WithDefaultConnectionProfile,
                DefinitionStages.WithDefaultAutoShutdownProfile,
                DefinitionStages.WithDefaultNetworkProfile,
                DefinitionStages.WithAllowedRegions,
                DefinitionStages.WithSharedGalleryId,
                DefinitionStages.WithSupportInfo,
                DefinitionStages.WithLinkedLmsInstance {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            LabPlan create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            LabPlan create(Context context);
        }
        /** The stage of the LabPlan 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 LabPlan definition allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: Managed Identity Information.
             *
             * @param identity Managed Identity Information.
             * @return the next definition stage.
             */
            WithCreate withIdentity(Identity identity);
        }
        /** The stage of the LabPlan definition allowing to specify defaultConnectionProfile. */
        interface WithDefaultConnectionProfile {
            /**
             * Specifies the defaultConnectionProfile property: The default lab connection profile. This can be changed
             * on a lab resource and only provides a default profile..
             *
             * @param defaultConnectionProfile The default lab connection profile. This can be changed on a lab resource
             *     and only provides a default profile.
             * @return the next definition stage.
             */
            WithCreate withDefaultConnectionProfile(ConnectionProfile defaultConnectionProfile);
        }
        /** The stage of the LabPlan definition allowing to specify defaultAutoShutdownProfile. */
        interface WithDefaultAutoShutdownProfile {
            /**
             * Specifies the defaultAutoShutdownProfile property: The default lab shutdown profile. This can be changed
             * on a lab resource and only provides a default profile..
             *
             * @param defaultAutoShutdownProfile The default lab shutdown profile. This can be changed on a lab resource
             *     and only provides a default profile.
             * @return the next definition stage.
             */
            WithCreate withDefaultAutoShutdownProfile(AutoShutdownProfile defaultAutoShutdownProfile);
        }
        /** The stage of the LabPlan definition allowing to specify defaultNetworkProfile. */
        interface WithDefaultNetworkProfile {
            /**
             * Specifies the defaultNetworkProfile property: The lab plan network profile. To enforce lab network
             * policies they must be defined here and cannot be changed when there are existing labs associated with
             * this lab plan..
             *
             * @param defaultNetworkProfile The lab plan network profile. To enforce lab network policies they must be
             *     defined here and cannot be changed when there are existing labs associated with this lab plan.
             * @return the next definition stage.
             */
            WithCreate withDefaultNetworkProfile(LabPlanNetworkProfile defaultNetworkProfile);
        }
        /** The stage of the LabPlan definition allowing to specify allowedRegions. */
        interface WithAllowedRegions {
            /**
             * Specifies the allowedRegions property: The allowed regions for the lab creator to use when creating labs
             * using this lab plan..
             *
             * @param allowedRegions The allowed regions for the lab creator to use when creating labs using this lab
             *     plan.
             * @return the next definition stage.
             */
            WithCreate withAllowedRegions(List<String> allowedRegions);
        }
        /** The stage of the LabPlan definition allowing to specify sharedGalleryId. */
        interface WithSharedGalleryId {
            /**
             * Specifies the sharedGalleryId property: Resource ID of the Shared Image Gallery attached to this lab
             * plan. When saving a lab template virtual machine image it will be persisted in this gallery. Shared
             * images from the gallery can be made available to use when creating new labs..
             *
             * @param sharedGalleryId Resource ID of the Shared Image Gallery attached to this lab plan. When saving a
             *     lab template virtual machine image it will be persisted in this gallery. Shared images from the
             *     gallery can be made available to use when creating new labs.
             * @return the next definition stage.
             */
            WithCreate withSharedGalleryId(String sharedGalleryId);
        }
        /** The stage of the LabPlan definition allowing to specify supportInfo. */
        interface WithSupportInfo {
            /**
             * Specifies the supportInfo property: Support contact information and instructions for users of the lab
             * plan. This information is displayed to lab owners and virtual machine users for all labs in the lab
             * plan..
             *
             * @param supportInfo Support contact information and instructions for users of the lab plan. This
             *     information is displayed to lab owners and virtual machine users for all labs in the lab plan.
             * @return the next definition stage.
             */
            WithCreate withSupportInfo(SupportInfo supportInfo);
        }
        /** The stage of the LabPlan definition allowing to specify linkedLmsInstance. */
        interface WithLinkedLmsInstance {
            /**
             * Specifies the linkedLmsInstance property: Base Url of the lms instance this lab plan can link lab rosters
             * against..
             *
             * @param linkedLmsInstance Base Url of the lms instance this lab plan can link lab rosters against.
             * @return the next definition stage.
             */
            WithCreate withLinkedLmsInstance(String linkedLmsInstance);
        }
    }
    /**
     * Begins update for the LabPlan resource.
     *
     * @return the stage of resource update.
     */
    LabPlan.Update update();

    /** The template for LabPlan update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithIdentity,
            UpdateStages.WithDefaultConnectionProfile,
            UpdateStages.WithDefaultAutoShutdownProfile,
            UpdateStages.WithDefaultNetworkProfile,
            UpdateStages.WithAllowedRegions,
            UpdateStages.WithSharedGalleryId,
            UpdateStages.WithSupportInfo,
            UpdateStages.WithLinkedLmsInstance {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        LabPlan apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        LabPlan apply(Context context);
    }
    /** The LabPlan update stages. */
    interface UpdateStages {
        /** The stage of the LabPlan update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            Update withTags(List<String> tags);
        }
        /** The stage of the LabPlan update allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: Managed Identity Information.
             *
             * @param identity Managed Identity Information.
             * @return the next definition stage.
             */
            Update withIdentity(Identity identity);
        }
        /** The stage of the LabPlan update allowing to specify defaultConnectionProfile. */
        interface WithDefaultConnectionProfile {
            /**
             * Specifies the defaultConnectionProfile property: The default lab connection profile. This can be changed
             * on a lab resource and only provides a default profile..
             *
             * @param defaultConnectionProfile The default lab connection profile. This can be changed on a lab resource
             *     and only provides a default profile.
             * @return the next definition stage.
             */
            Update withDefaultConnectionProfile(ConnectionProfile defaultConnectionProfile);
        }
        /** The stage of the LabPlan update allowing to specify defaultAutoShutdownProfile. */
        interface WithDefaultAutoShutdownProfile {
            /**
             * Specifies the defaultAutoShutdownProfile property: The default lab shutdown profile. This can be changed
             * on a lab resource and only provides a default profile..
             *
             * @param defaultAutoShutdownProfile The default lab shutdown profile. This can be changed on a lab resource
             *     and only provides a default profile.
             * @return the next definition stage.
             */
            Update withDefaultAutoShutdownProfile(AutoShutdownProfile defaultAutoShutdownProfile);
        }
        /** The stage of the LabPlan update allowing to specify defaultNetworkProfile. */
        interface WithDefaultNetworkProfile {
            /**
             * Specifies the defaultNetworkProfile property: The lab plan network profile. To enforce lab network
             * policies they must be defined here and cannot be changed when there are existing labs associated with
             * this lab plan..
             *
             * @param defaultNetworkProfile The lab plan network profile. To enforce lab network policies they must be
             *     defined here and cannot be changed when there are existing labs associated with this lab plan.
             * @return the next definition stage.
             */
            Update withDefaultNetworkProfile(LabPlanNetworkProfile defaultNetworkProfile);
        }
        /** The stage of the LabPlan update allowing to specify allowedRegions. */
        interface WithAllowedRegions {
            /**
             * Specifies the allowedRegions property: The allowed regions for the lab creator to use when creating labs
             * using this lab plan..
             *
             * @param allowedRegions The allowed regions for the lab creator to use when creating labs using this lab
             *     plan.
             * @return the next definition stage.
             */
            Update withAllowedRegions(List<String> allowedRegions);
        }
        /** The stage of the LabPlan update allowing to specify sharedGalleryId. */
        interface WithSharedGalleryId {
            /**
             * Specifies the sharedGalleryId property: Resource ID of the Shared Image Gallery attached to this lab
             * plan. When saving a lab template virtual machine image it will be persisted in this gallery. Shared
             * images from the gallery can be made available to use when creating new labs..
             *
             * @param sharedGalleryId Resource ID of the Shared Image Gallery attached to this lab plan. When saving a
             *     lab template virtual machine image it will be persisted in this gallery. Shared images from the
             *     gallery can be made available to use when creating new labs.
             * @return the next definition stage.
             */
            Update withSharedGalleryId(String sharedGalleryId);
        }
        /** The stage of the LabPlan update allowing to specify supportInfo. */
        interface WithSupportInfo {
            /**
             * Specifies the supportInfo property: Support contact information and instructions for users of the lab
             * plan. This information is displayed to lab owners and virtual machine users for all labs in the lab
             * plan..
             *
             * @param supportInfo Support contact information and instructions for users of the lab plan. This
             *     information is displayed to lab owners and virtual machine users for all labs in the lab plan.
             * @return the next definition stage.
             */
            Update withSupportInfo(SupportInfo supportInfo);
        }
        /** The stage of the LabPlan update allowing to specify linkedLmsInstance. */
        interface WithLinkedLmsInstance {
            /**
             * Specifies the linkedLmsInstance property: Base Url of the lms instance this lab plan can link lab rosters
             * against..
             *
             * @param linkedLmsInstance Base Url of the lms instance this lab plan can link lab rosters against.
             * @return the next definition stage.
             */
            Update withLinkedLmsInstance(String linkedLmsInstance);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    LabPlan refresh();

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

    /**
     * Save an image from a lab VM to the attached shared image gallery.
     *
     * <p>Saves an image from a lab VM to the attached shared image gallery.
     *
     * @param body The request body.
     * @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 saveImage(SaveImageBody body);

    /**
     * Save an image from a lab VM to the attached shared image gallery.
     *
     * <p>Saves an image from a lab VM to the attached shared image gallery.
     *
     * @param body The request body.
     * @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 saveImage(SaveImageBody body, Context context);
}
