// 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.annotation.Fluent;
import com.azure.resourcemanager.labservices.fluent.models.LabUpdateProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The lab resource for updates. */
@Fluent
public final class LabUpdate extends TrackedResourceUpdate {
    /*
     * Lab resource properties
     */
    @JsonProperty(value = "properties")
    private LabUpdateProperties innerProperties;

    /**
     * Get the innerProperties property: Lab resource properties.
     *
     * @return the innerProperties value.
     */
    private LabUpdateProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public LabUpdate withTags(List<String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * 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.innerProperties() == null ? null : this.innerProperties().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 LabUpdate object itself.
     */
    public LabUpdate withAutoShutdownProfile(AutoShutdownProfile autoShutdownProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabUpdateProperties();
        }
        this.innerProperties().withAutoShutdownProfile(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.innerProperties() == null ? null : this.innerProperties().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 LabUpdate object itself.
     */
    public LabUpdate withConnectionProfile(ConnectionProfile connectionProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabUpdateProperties();
        }
        this.innerProperties().withConnectionProfile(connectionProfile);
        return this;
    }

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

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

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

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

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

    /**
     * Set the rosterProfile property: The lab user list management profile.
     *
     * @param rosterProfile the rosterProfile value to set.
     * @return the LabUpdate object itself.
     */
    public LabUpdate withRosterProfile(RosterProfile rosterProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabUpdateProperties();
        }
        this.innerProperties().withRosterProfile(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.innerProperties() == null ? null : this.innerProperties().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 LabUpdate object itself.
     */
    public LabUpdate withLabPlanId(String labPlanId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabUpdateProperties();
        }
        this.innerProperties().withLabPlanId(labPlanId);
        return this;
    }

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

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

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

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

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}
