// 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.LabInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of Lab. */
public interface Lab {
    /**
     * 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.
     *
     * @return the systemData value.
     */
    SystemData systemData();

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

    /**
     * Gets the networkProfile property: The network profile for the lab, typically applied via a lab plan. This profile
     * cannot be modified once a lab has been created.
     *
     * @return the networkProfile value.
     */
    LabNetworkProfile networkProfile();

    /**
     * Gets the state property: The lab state.
     *
     * @return the state value.
     */
    LabState state();

    /**
     * Gets the autoShutdownProfile property: The resource auto shutdown configuration for the lab. This controls
     * whether actions are taken on resources that are sitting idle.
     *
     * @return the autoShutdownProfile value.
     */
    AutoShutdownProfile autoShutdownProfile();

    /**
     * Gets the connectionProfile property: The connection profile for the lab. This controls settings such as web
     * access to lab resources or whether RDP or SSH ports are open.
     *
     * @return the connectionProfile value.
     */
    ConnectionProfile connectionProfile();

    /**
     * Gets the virtualMachineProfile property: The profile used for creating lab virtual machines.
     *
     * @return the virtualMachineProfile value.
     */
    VirtualMachineProfile virtualMachineProfile();

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

    /**
     * Gets the rosterProfile property: The lab user list management profile.
     *
     * @return the rosterProfile value.
     */
    RosterProfile rosterProfile();

    /**
     * Gets the labPlanId property: The ID of the lab plan. Used during resource creation to provide defaults and acts
     * as a permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab provides
     * organization..
     *
     * @return the labPlanId value.
     */
    String labPlanId();

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

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

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

    /** The entirety of the Lab definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithCreate {
    }
    /** The Lab definition stages. */
    interface DefinitionStages {
        /** The first stage of the Lab definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the Lab 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 Lab 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 Lab 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.WithNetworkProfile,
                DefinitionStages.WithAutoShutdownProfile,
                DefinitionStages.WithConnectionProfile,
                DefinitionStages.WithVirtualMachineProfile,
                DefinitionStages.WithSecurityProfile,
                DefinitionStages.WithRosterProfile,
                DefinitionStages.WithLabPlanId,
                DefinitionStages.WithTitle,
                DefinitionStages.WithDescription {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Lab create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Lab create(Context context);
        }
        /** The stage of the Lab 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 Lab definition allowing to specify networkProfile. */
        interface WithNetworkProfile {
            /**
             * Specifies the networkProfile property: The network profile for the lab, typically applied via a lab plan.
             * This profile cannot be modified once a lab has been created..
             *
             * @param networkProfile The network profile for the lab, typically applied via a lab plan. This profile
             *     cannot be modified once a lab has been created.
             * @return the next definition stage.
             */
            WithCreate withNetworkProfile(LabNetworkProfile networkProfile);
        }
        /** The stage of the Lab definition allowing to specify autoShutdownProfile. */
        interface WithAutoShutdownProfile {
            /**
             * Specifies the autoShutdownProfile property: The resource auto shutdown configuration for the lab. This
             * controls whether actions are taken on resources that are sitting idle..
             *
             * @param autoShutdownProfile The resource auto shutdown configuration for the lab. This controls whether
             *     actions are taken on resources that are sitting idle.
             * @return the next definition stage.
             */
            WithCreate withAutoShutdownProfile(AutoShutdownProfile autoShutdownProfile);
        }
        /** The stage of the Lab definition allowing to specify connectionProfile. */
        interface WithConnectionProfile {
            /**
             * Specifies the connectionProfile property: The connection profile for the lab. This controls settings such
             * as web access to lab resources or whether RDP or SSH ports are open..
             *
             * @param connectionProfile The connection profile for the lab. This controls settings such as web access to
             *     lab resources or whether RDP or SSH ports are open.
             * @return the next definition stage.
             */
            WithCreate withConnectionProfile(ConnectionProfile connectionProfile);
        }
        /** The stage of the Lab definition allowing to specify virtualMachineProfile. */
        interface WithVirtualMachineProfile {
            /**
             * Specifies the virtualMachineProfile property: The profile used for creating lab virtual machines..
             *
             * @param virtualMachineProfile The profile used for creating lab virtual machines.
             * @return the next definition stage.
             */
            WithCreate withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile);
        }
        /** The stage of the Lab definition allowing to specify securityProfile. */
        interface WithSecurityProfile {
            /**
             * Specifies the securityProfile property: The lab security profile..
             *
             * @param securityProfile The lab security profile.
             * @return the next definition stage.
             */
            WithCreate withSecurityProfile(SecurityProfile securityProfile);
        }
        /** The stage of the Lab definition allowing to specify rosterProfile. */
        interface WithRosterProfile {
            /**
             * Specifies the rosterProfile property: The lab user list management profile..
             *
             * @param rosterProfile The lab user list management profile.
             * @return the next definition stage.
             */
            WithCreate withRosterProfile(RosterProfile rosterProfile);
        }
        /** The stage of the Lab definition allowing to specify labPlanId. */
        interface WithLabPlanId {
            /**
             * Specifies the labPlanId property: The ID of the lab plan. Used during resource creation to provide
             * defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId
             * on an existing lab provides organization...
             *
             * @param labPlanId The ID of the lab plan. Used during resource creation to provide defaults and acts as a
             *     permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab
             *     provides organization..
             * @return the next definition stage.
             */
            WithCreate withLabPlanId(String labPlanId);
        }
        /** The stage of the Lab definition allowing to specify title. */
        interface WithTitle {
            /**
             * Specifies the title property: The title of the lab..
             *
             * @param title The title of the lab.
             * @return the next definition stage.
             */
            WithCreate withTitle(String title);
        }
        /** The stage of the Lab definition allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: The description of the lab..
             *
             * @param description The description of the lab.
             * @return the next definition stage.
             */
            WithCreate withDescription(String description);
        }
    }
    /**
     * Begins update for the Lab resource.
     *
     * @return the stage of resource update.
     */
    Lab.Update update();

    /** The template for Lab update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithAutoShutdownProfile,
            UpdateStages.WithConnectionProfile,
            UpdateStages.WithVirtualMachineProfile,
            UpdateStages.WithSecurityProfile,
            UpdateStages.WithRosterProfile,
            UpdateStages.WithLabPlanId,
            UpdateStages.WithTitle,
            UpdateStages.WithDescription {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        Lab apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Lab apply(Context context);
    }
    /** The Lab update stages. */
    interface UpdateStages {
        /** The stage of the Lab 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 Lab update allowing to specify autoShutdownProfile. */
        interface WithAutoShutdownProfile {
            /**
             * Specifies the autoShutdownProfile property: The resource auto shutdown configuration for the lab. This
             * controls whether actions are taken on resources that are sitting idle..
             *
             * @param autoShutdownProfile The resource auto shutdown configuration for the lab. This controls whether
             *     actions are taken on resources that are sitting idle.
             * @return the next definition stage.
             */
            Update withAutoShutdownProfile(AutoShutdownProfile autoShutdownProfile);
        }
        /** The stage of the Lab update allowing to specify connectionProfile. */
        interface WithConnectionProfile {
            /**
             * Specifies the connectionProfile property: The connection profile for the lab. This controls settings such
             * as web access to lab resources or whether RDP or SSH ports are open..
             *
             * @param connectionProfile The connection profile for the lab. This controls settings such as web access to
             *     lab resources or whether RDP or SSH ports are open.
             * @return the next definition stage.
             */
            Update withConnectionProfile(ConnectionProfile connectionProfile);
        }
        /** The stage of the Lab update allowing to specify virtualMachineProfile. */
        interface WithVirtualMachineProfile {
            /**
             * Specifies the virtualMachineProfile property: The profile used for creating lab virtual machines..
             *
             * @param virtualMachineProfile The profile used for creating lab virtual machines.
             * @return the next definition stage.
             */
            Update withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile);
        }
        /** The stage of the Lab update allowing to specify securityProfile. */
        interface WithSecurityProfile {
            /**
             * Specifies the securityProfile property: The lab security profile..
             *
             * @param securityProfile The lab security profile.
             * @return the next definition stage.
             */
            Update withSecurityProfile(SecurityProfile securityProfile);
        }
        /** The stage of the Lab update allowing to specify rosterProfile. */
        interface WithRosterProfile {
            /**
             * Specifies the rosterProfile property: The lab user list management profile..
             *
             * @param rosterProfile The lab user list management profile.
             * @return the next definition stage.
             */
            Update withRosterProfile(RosterProfile rosterProfile);
        }
        /** The stage of the Lab update allowing to specify labPlanId. */
        interface WithLabPlanId {
            /**
             * Specifies the labPlanId property: The ID of the lab plan. Used during resource creation to provide
             * defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId
             * on an existing lab provides organization...
             *
             * @param labPlanId The ID of the lab plan. Used during resource creation to provide defaults and acts as a
             *     permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab
             *     provides organization..
             * @return the next definition stage.
             */
            Update withLabPlanId(String labPlanId);
        }
        /** The stage of the Lab update allowing to specify title. */
        interface WithTitle {
            /**
             * Specifies the title property: The title of the lab..
             *
             * @param title The title of the lab.
             * @return the next definition stage.
             */
            Update withTitle(String title);
        }
        /** The stage of the Lab update allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: The description of the lab..
             *
             * @param description The description of the lab.
             * @return the next definition stage.
             */
            Update withDescription(String description);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Lab refresh();

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

    /**
     * Publish or re-publish a lab.
     *
     * <p>Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines.
     *
     * @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 publish();

    /**
     * Publish or re-publish a lab.
     *
     * <p>Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines.
     *
     * @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 publish(Context context);

    /**
     * Manually sync the lab group.
     *
     * <p>Action used to manually kick off an AAD group sync job.
     *
     * @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 syncGroup();

    /**
     * Manually sync the lab group.
     *
     * <p>Action used to manually kick off an AAD group sync job.
     *
     * @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 syncGroup(Context context);
}
