// 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.LabNetworkProfile;
import com.azure.resourcemanager.labservices.models.LabState;
import com.azure.resourcemanager.labservices.models.ProvisioningState;
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. */
@Fluent
public final class LabProperties extends LabUpdateProperties {
    /*
     * Current provisioning state of the lab.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * The network profile for the lab, typically applied via a lab plan. This profile cannot be modified once a lab
     * has been created.
     */
    @JsonProperty(value = "networkProfile")
    private LabNetworkProfile networkProfile;

    /*
     * The lab state.
     */
    @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
    private LabState state;

    /**
     * Get the provisioningState property: Current provisioning state of the lab.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

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

    /**
     * Set 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 networkProfile value to set.
     * @return the LabProperties object itself.
     */
    public LabProperties withNetworkProfile(LabNetworkProfile networkProfile) {
        this.networkProfile = networkProfile;
        return this;
    }

    /**
     * Get the state property: The lab state.
     *
     * @return the state value.
     */
    public LabState state() {
        return this.state;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withAutoShutdownProfile(AutoShutdownProfile autoShutdownProfile) {
        super.withAutoShutdownProfile(autoShutdownProfile);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withConnectionProfile(ConnectionProfile connectionProfile) {
        super.withConnectionProfile(connectionProfile);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile) {
        super.withVirtualMachineProfile(virtualMachineProfile);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withSecurityProfile(SecurityProfile securityProfile) {
        super.withSecurityProfile(securityProfile);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withRosterProfile(RosterProfile rosterProfile) {
        super.withRosterProfile(rosterProfile);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withLabPlanId(String labPlanId) {
        super.withLabPlanId(labPlanId);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withTitle(String title) {
        super.withTitle(title);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public LabProperties withDescription(String description) {
        super.withDescription(description);
        return this;
    }

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