-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
LabPlanData.cs
89 lines (82 loc) · 6.4 KB
/
LabPlanData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.LabServices.Models;
using Azure.ResourceManager.Models;
namespace Azure.ResourceManager.LabServices
{
/// <summary>
/// A class representing the LabPlan data model.
/// Lab Plans act as a permission container for creating labs via labs.azure.com. Additionally, they can provide a set of default configurations that will apply at the time of creating a lab, but these defaults can still be overwritten.
/// </summary>
public partial class LabPlanData : TrackedResourceData
{
/// <summary> Initializes a new instance of <see cref="LabPlanData"/>. </summary>
/// <param name="location"> The location. </param>
public LabPlanData(AzureLocation location) : base(location)
{
AllowedRegions = new ChangeTrackingList<AzureLocation>();
}
/// <summary> Initializes a new instance of <see cref="LabPlanData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="tags"> The tags. </param>
/// <param name="location"> The location. </param>
/// <param name="identity"> Managed Identity Information. Current supported identity types: SystemAssigned. </param>
/// <param name="defaultConnectionProfile"> The default lab connection profile. This can be changed on a lab resource and only provides a default profile. </param>
/// <param name="defaultAutoShutdownProfile"> The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile. </param>
/// <param name="defaultNetworkProfile"> 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>
/// <param name="allowedRegions"> The allowed regions for the lab creator to use when creating labs using this lab plan. </param>
/// <param name="sharedGalleryId"> 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>
/// <param name="supportInfo"> 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>
/// <param name="linkedLmsInstance"> Base Url of the lms instance this lab plan can link lab rosters against. </param>
/// <param name="provisioningState"> Current provisioning state of the lab plan. </param>
internal LabPlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity, LabConnectionProfile defaultConnectionProfile, LabAutoShutdownProfile defaultAutoShutdownProfile, LabPlanNetworkProfile defaultNetworkProfile, IList<AzureLocation> allowedRegions, ResourceIdentifier sharedGalleryId, LabPlanSupportInfo supportInfo, Uri linkedLmsInstance, LabServicesProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location)
{
Identity = identity;
DefaultConnectionProfile = defaultConnectionProfile;
DefaultAutoShutdownProfile = defaultAutoShutdownProfile;
DefaultNetworkProfile = defaultNetworkProfile;
AllowedRegions = allowedRegions;
SharedGalleryId = sharedGalleryId;
SupportInfo = supportInfo;
LinkedLmsInstance = linkedLmsInstance;
ProvisioningState = provisioningState;
}
/// <summary> Managed Identity Information. Current supported identity types: SystemAssigned. </summary>
public ManagedServiceIdentity Identity { get; set; }
/// <summary> The default lab connection profile. This can be changed on a lab resource and only provides a default profile. </summary>
public LabConnectionProfile DefaultConnectionProfile { get; set; }
/// <summary> The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile. </summary>
public LabAutoShutdownProfile DefaultAutoShutdownProfile { get; set; }
/// <summary> 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. </summary>
internal LabPlanNetworkProfile DefaultNetworkProfile { get; set; }
/// <summary> The external subnet resource id. </summary>
public ResourceIdentifier DefaultNetworkSubnetId
{
get => DefaultNetworkProfile is null ? default : DefaultNetworkProfile.SubnetId;
set
{
if (DefaultNetworkProfile is null)
DefaultNetworkProfile = new LabPlanNetworkProfile();
DefaultNetworkProfile.SubnetId = value;
}
}
/// <summary> The allowed regions for the lab creator to use when creating labs using this lab plan. </summary>
public IList<AzureLocation> AllowedRegions { get; }
/// <summary> 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. </summary>
public ResourceIdentifier SharedGalleryId { get; set; }
/// <summary> 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. </summary>
public LabPlanSupportInfo SupportInfo { get; set; }
/// <summary> Base Url of the lms instance this lab plan can link lab rosters against. </summary>
public Uri LinkedLmsInstance { get; set; }
/// <summary> Current provisioning state of the lab plan. </summary>
public LabServicesProvisioningState? ProvisioningState { get; }
}
}