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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.labservices.models.AutoShutdownProfile;
import com.azure.resourcemanager.labservices.models.ConnectionProfile;
import com.azure.resourcemanager.labservices.models.RosterProfile;
import com.azure.resourcemanager.labservices.models.SecurityProfile;
import com.azure.resourcemanager.labservices.models.VirtualMachineProfile;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties of a lab resource used for updates. */
@Fluent
public class LabUpdateProperties {
    /*
     * The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that
     * are sitting idle.
     */
    @JsonProperty(value = "autoShutdownProfile")
    private AutoShutdownProfile autoShutdownProfile;

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

    /*
     * The profile used for creating lab virtual machines.
     */
    @JsonProperty(value = "virtualMachineProfile")
    private VirtualMachineProfile virtualMachineProfile;

    /*
     * The lab security profile.
     */
    @JsonProperty(value = "securityProfile")
    private SecurityProfile securityProfile;

    /*
     * The lab user list management profile.
     */
    @JsonProperty(value = "rosterProfile")
    private RosterProfile rosterProfile;

    /*
     * 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..
     */
    @JsonProperty(value = "labPlanId")
    private String labPlanId;

    /*
     * The title of the lab.
     */
    @JsonProperty(value = "title")
    private String title;

    /*
     * The description of the lab.
     */
    @JsonProperty(value = "description")
    private String description;

    /**
     * Get 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.
     */
    public AutoShutdownProfile autoShutdownProfile() {
        return this.autoShutdownProfile;
    }

    /**
     * Set 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 autoShutdownProfile value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withAutoShutdownProfile(AutoShutdownProfile autoShutdownProfile) {
        this.autoShutdownProfile = autoShutdownProfile;
        return this;
    }

    /**
     * Get 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.
     */
    public ConnectionProfile connectionProfile() {
        return this.connectionProfile;
    }

    /**
     * Set 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 connectionProfile value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withConnectionProfile(ConnectionProfile connectionProfile) {
        this.connectionProfile = connectionProfile;
        return this;
    }

    /**
     * Get the virtualMachineProfile property: The profile used for creating lab virtual machines.
     *
     * @return the virtualMachineProfile value.
     */
    public VirtualMachineProfile virtualMachineProfile() {
        return this.virtualMachineProfile;
    }

    /**
     * Set the virtualMachineProfile property: The profile used for creating lab virtual machines.
     *
     * @param virtualMachineProfile the virtualMachineProfile value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile) {
        this.virtualMachineProfile = virtualMachineProfile;
        return this;
    }

    /**
     * Get the securityProfile property: The lab security profile.
     *
     * @return the securityProfile value.
     */
    public SecurityProfile securityProfile() {
        return this.securityProfile;
    }

    /**
     * Set the securityProfile property: The lab security profile.
     *
     * @param securityProfile the securityProfile value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withSecurityProfile(SecurityProfile securityProfile) {
        this.securityProfile = securityProfile;
        return this;
    }

    /**
     * Get the rosterProfile property: The lab user list management profile.
     *
     * @return the rosterProfile value.
     */
    public RosterProfile rosterProfile() {
        return this.rosterProfile;
    }

    /**
     * Set the rosterProfile property: The lab user list management profile.
     *
     * @param rosterProfile the rosterProfile value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withRosterProfile(RosterProfile rosterProfile) {
        this.rosterProfile = rosterProfile;
        return this;
    }

    /**
     * Get 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.
     */
    public String labPlanId() {
        return this.labPlanId;
    }

    /**
     * Set 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 labPlanId value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withLabPlanId(String labPlanId) {
        this.labPlanId = labPlanId;
        return this;
    }

    /**
     * Get the title property: The title of the lab.
     *
     * @return the title value.
     */
    public String title() {
        return this.title;
    }

    /**
     * Set the title property: The title of the lab.
     *
     * @param title the title value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withTitle(String title) {
        this.title = title;
        return this;
    }

    /**
     * Get the description property: The description of the lab.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: The description of the lab.
     *
     * @param description the description value to set.
     * @return the LabUpdateProperties object itself.
     */
    public LabUpdateProperties withDescription(String description) {
        this.description = description;
        return this;
    }

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