/// <summary> /// Initializes a new instance of the LabUpdate class. /// </summary> /// <param name="tags">Resource tags.</param> /// <param name="autoShutdownProfile">The resource auto shutdown /// configuration for the lab. This controls whether actions are taken /// on resources that are sitting idle.</param> /// <param name="connectionProfile">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> /// <param name="virtualMachineProfile">The profile used for creating /// lab virtual machines.</param> /// <param name="securityProfile">The lab security profile.</param> /// <param name="rosterProfile">The lab user list management /// profile.</param> /// <param name="labPlanId">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> /// <param name="title">The title of the lab.</param> /// <param name="description">The description of the lab.</param> public LabUpdate(IList <string> tags = default(IList <string>), AutoShutdownProfile autoShutdownProfile = default(AutoShutdownProfile), ConnectionProfile connectionProfile = default(ConnectionProfile), VirtualMachineProfile virtualMachineProfile = default(VirtualMachineProfile), SecurityProfile securityProfile = default(SecurityProfile), RosterProfile rosterProfile = default(RosterProfile), string labPlanId = default(string), string title = default(string), string description = default(string)) : base(tags) { AutoShutdownProfile = autoShutdownProfile; ConnectionProfile = connectionProfile; VirtualMachineProfile = virtualMachineProfile; SecurityProfile = securityProfile; RosterProfile = rosterProfile; LabPlanId = labPlanId; Title = title; Description = description; CustomInit(); }
/// <summary> /// Initializes a new instance of the Lab class. /// </summary> /// <param name="location">The geo-location where the resource /// lives</param> /// <param name="id">Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}</param> /// <param name="name">The name of the resource</param> /// <param name="type">The type of the resource. E.g. /// "Microsoft.Compute/virtualMachines" or /// "Microsoft.Storage/storageAccounts"</param> /// <param name="tags">Resource tags.</param> /// <param name="systemData">Metadata pertaining to creation and last /// modification of the lab.</param> /// <param name="autoShutdownProfile">The resource auto shutdown /// configuration for the lab. This controls whether actions are taken /// on resources that are sitting idle.</param> /// <param name="connectionProfile">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> /// <param name="virtualMachineProfile">The profile used for creating /// lab virtual machines.</param> /// <param name="securityProfile">The lab security profile.</param> /// <param name="rosterProfile">The lab user list management /// profile.</param> /// <param name="labPlanId">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> /// <param name="title">The title of the lab.</param> /// <param name="description">The description of the lab.</param> /// <param name="provisioningState">Current provisioning state of the /// lab. Possible values include: 'Creating', 'Updating', 'Deleting', /// 'Succeeded', 'Failed', 'Locked'</param> /// <param name="networkProfile">The network profile for the lab, /// typically applied via a lab plan. This profile cannot be modified /// once a lab has been created.</param> /// <param name="state">The lab state. Possible values include: /// 'Draft', 'Publishing', 'Scaling', 'Syncing', 'Published'</param> public Lab(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), SystemData systemData = default(SystemData), AutoShutdownProfile autoShutdownProfile = default(AutoShutdownProfile), ConnectionProfile connectionProfile = default(ConnectionProfile), VirtualMachineProfile virtualMachineProfile = default(VirtualMachineProfile), SecurityProfile securityProfile = default(SecurityProfile), RosterProfile rosterProfile = default(RosterProfile), string labPlanId = default(string), string title = default(string), string description = default(string), ProvisioningState?provisioningState = default(ProvisioningState?), LabNetworkProfile networkProfile = default(LabNetworkProfile), LabState?state = default(LabState?)) : base(location, id, name, type, tags) { SystemData = systemData; AutoShutdownProfile = autoShutdownProfile; ConnectionProfile = connectionProfile; VirtualMachineProfile = virtualMachineProfile; SecurityProfile = securityProfile; RosterProfile = rosterProfile; LabPlanId = labPlanId; Title = title; Description = description; ProvisioningState = provisioningState; NetworkProfile = networkProfile; State = state; CustomInit(); }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (VirtualMachineProfile != null) { VirtualMachineProfile.Validate(); } if (Title != null) { if (Title.Length > 120) { throw new ValidationException(ValidationRules.MaxLength, "Title", 120); } if (Title.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "Title", 1); } } }