protected override SqlPoolSensitivityClassificationModel ApplyUserInputToModel(SqlPoolSensitivityClassificationModel model) { InformationProtectionPolicy informationProtectionPolicy = ModelAdapter.RetrieveInformationProtectionPolicyAsync().Result; if (ParameterSetName == DataClassificationCommon.ColumnParameterSet || ParameterSetName == DataClassificationCommon.SqlPoolObjectColumnParameterSet) { SensitivityLabelModel sensitivityLabelModel = model.SensitivityLabels.FirstOrDefault(); if (sensitivityLabelModel == null) { sensitivityLabelModel = new SensitivityLabelModel { SchemaName = SchemaName, TableName = TableName, ColumnName = ColumnName, }; model.SensitivityLabels.Add(sensitivityLabelModel); } sensitivityLabelModel.ApplyInput(InformationType, SensitivityLabel, informationProtectionPolicy); } else { model.ApplyModel(ClassificationObject, informationProtectionPolicy); } return(model); }
private static SensitivityLabel ToSensitivityLabel(SensitivityLabelModel sensitivityLabelModel) { return(new SensitivityLabel { LabelName = sensitivityLabelModel.SensitivityLabel, LabelId = sensitivityLabelModel.SensitivityLabelId, InformationType = sensitivityLabelModel.InformationType, InformationTypeId = sensitivityLabelModel.InformationTypeId }); }