/// <summary> /// Provides a SQL pool Vulnerability Assessment Rule Baseline model for the given SQL pool /// </summary> public VulnerabilityAssessmentRuleBaselineModel GetVulnerabilityAssessmentRuleBaseline(string resourceGroup, string workspaceName, string sqlPoolName, string ruleId, bool ruleAppliesToMaster, ApplyToType applyToType) { var vulnerabilityAssessmentRuleBaseline = (applyToType == ApplyToType.SqlPool) ? VulnerabilityAssessmentCommunicator.GetSqlPoolVulnerabilityAssessmentRuleBaseline(resourceGroup, workspaceName, sqlPoolName, ruleId, ruleAppliesToMaster) : throw new NotSupportedException(Resources.VulnerabilityAssessmentTypeNotSupported); var ruleBaselineModel = new VulnerabilityAssessmentRuleBaselineModel() { ResourceGroupName = resourceGroup, RuleId = ruleId, RuleAppliesToMaster = ruleAppliesToMaster || sqlPoolName == "master" }; ruleBaselineModel.BaselineResult = new List <VulnerabilityAssessmentRuleBaselineRowModel>(); foreach (var baselineResult in vulnerabilityAssessmentRuleBaseline.BaselineResults) { var ruleBaselineItem = new VulnerabilityAssessmentRuleBaselineRowModel() { Result = baselineResult.Result }; ruleBaselineModel.BaselineResult.Add(ruleBaselineItem); } return(ruleBaselineModel); }