/// <summary> /// Initializes a new instance of the CreateLabProperties class. /// </summary> /// <param name="labCreationParameters">Settings related to creating a /// lab</param> /// <param name="name">The name of the resource</param> /// <param name="environmentSettingCreationParameters">Settings related /// to creating an environment setting</param> /// <param name="location">The location of the resource</param> /// <param name="tags">The tags of the resource.</param> public CreateLabProperties(LabCreationParameters labCreationParameters, string name, EnvironmentSettingCreationParameters environmentSettingCreationParameters = default(EnvironmentSettingCreationParameters), string location = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>)) { EnvironmentSettingCreationParameters = environmentSettingCreationParameters; LabCreationParameters = labCreationParameters; Name = name; Location = location; Tags = tags; CustomInit(); }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (LabCreationParameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "LabCreationParameters"); } if (Name == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } if (EnvironmentSettingCreationParameters != null) { EnvironmentSettingCreationParameters.Validate(); } }