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

/** Lab plan resource properties for updates. */
@Fluent
public class LabPlanUpdateProperties {
    /*
     * The default lab connection profile. This can be changed on a lab resource and only provides a default profile.
     */
    @JsonProperty(value = "defaultConnectionProfile")
    private ConnectionProfile defaultConnectionProfile;

    /*
     * The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile.
     */
    @JsonProperty(value = "defaultAutoShutdownProfile")
    private AutoShutdownProfile defaultAutoShutdownProfile;

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

    /*
     * The allowed regions for the lab creator to use when creating labs using this lab plan.
     */
    @JsonProperty(value = "allowedRegions")
    private List<String> allowedRegions;

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

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

    /*
     * Base Url of the lms instance this lab plan can link lab rosters against.
     */
    @JsonProperty(value = "linkedLmsInstance")
    private String linkedLmsInstance;

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

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

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

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

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

    /**
     * Set 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 defaultNetworkProfile value to set.
     * @return the LabPlanUpdateProperties object itself.
     */
    public LabPlanUpdateProperties withDefaultNetworkProfile(LabPlanNetworkProfile defaultNetworkProfile) {
        this.defaultNetworkProfile = defaultNetworkProfile;
        return this;
    }

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

    /**
     * Set the allowedRegions property: The allowed regions for the lab creator to use when creating labs using this lab
     * plan.
     *
     * @param allowedRegions the allowedRegions value to set.
     * @return the LabPlanUpdateProperties object itself.
     */
    public LabPlanUpdateProperties withAllowedRegions(List<String> allowedRegions) {
        this.allowedRegions = allowedRegions;
        return this;
    }

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

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

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

    /**
     * Set 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 the supportInfo value to set.
     * @return the LabPlanUpdateProperties object itself.
     */
    public LabPlanUpdateProperties withSupportInfo(SupportInfo supportInfo) {
        this.supportInfo = supportInfo;
        return this;
    }

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

    /**
     * Set the linkedLmsInstance property: Base Url of the lms instance this lab plan can link lab rosters against.
     *
     * @param linkedLmsInstance the linkedLmsInstance value to set.
     * @return the LabPlanUpdateProperties object itself.
     */
    public LabPlanUpdateProperties withLinkedLmsInstance(String linkedLmsInstance) {
        this.linkedLmsInstance = linkedLmsInstance;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (defaultConnectionProfile() != null) {
            defaultConnectionProfile().validate();
        }
        if (defaultAutoShutdownProfile() != null) {
            defaultAutoShutdownProfile().validate();
        }
        if (defaultNetworkProfile() != null) {
            defaultNetworkProfile().validate();
        }
        if (supportInfo() != null) {
            supportInfo().validate();
        }
    }
}
