/// <summary> /// Initializes a new instance of the DataMaskingRuleInner class. /// </summary> /// <param name="schemaName">The schema name on which the data masking /// rule is applied.</param> /// <param name="tableName">The table name on which the data masking /// rule is applied.</param> /// <param name="columnName">The column name on which the data masking /// rule is applied.</param> /// <param name="maskingFunction">The masking function that is used for /// the data masking rule. Possible values include: 'Default', 'CCN', /// 'Email', 'Number', 'SSN', 'Text'</param> /// <param name="dataMaskingRuleId">The rule Id.</param> /// <param name="aliasName">The alias name. This is a legacy parameter /// and is no longer used.</param> /// <param name="ruleState">The rule state. Used to delete a rule. To /// delete an existing rule, specify the schemaName, tableName, /// columnName, maskingFunction, and specify ruleState as disabled. /// However, if the rule doesn't already exist, the rule will be /// created with ruleState set to enabled, regardless of the provided /// value of ruleState. Possible values include: 'Disabled', /// 'Enabled'</param> /// <param name="numberFrom">The numberFrom property of the masking /// rule. Required if maskingFunction is set to Number, otherwise this /// parameter will be ignored.</param> /// <param name="numberTo">The numberTo property of the data masking /// rule. Required if maskingFunction is set to Number, otherwise this /// parameter will be ignored.</param> /// <param name="prefixSize">If maskingFunction is set to Text, the /// number of characters to show unmasked in the beginning of the /// string. Otherwise, this parameter will be ignored.</param> /// <param name="suffixSize">If maskingFunction is set to Text, the /// number of characters to show unmasked at the end of the string. /// Otherwise, this parameter will be ignored.</param> /// <param name="replacementString">If maskingFunction is set to Text, /// the character to use for masking the unexposed part of the string. /// Otherwise, this parameter will be ignored.</param> /// <param name="location">The location of the data masking /// rule.</param> /// <param name="kind">The kind of Data Masking Rule. Metadata, used /// for Azure portal.</param> public DataMaskingRuleInner(string schemaName, string tableName, string columnName, DataMaskingFunction maskingFunction, string location = default(string), string id = default(string), string name = default(string), string type = default(string), string dataMaskingRuleId = default(string), string aliasName = default(string), DataMaskingRuleState?ruleState = default(DataMaskingRuleState?), string numberFrom = default(string), string numberTo = default(string), string prefixSize = default(string), string suffixSize = default(string), string replacementString = default(string), string kind = default(string)) : base(id, name, type) { DataMaskingRuleId = dataMaskingRuleId; AliasName = aliasName; RuleState = ruleState; SchemaName = schemaName; TableName = tableName; ColumnName = columnName; MaskingFunction = maskingFunction; NumberFrom = numberFrom; NumberTo = numberTo; PrefixSize = prefixSize; SuffixSize = suffixSize; ReplacementString = replacementString; Kind = kind; CustomInit(); }
internal static string ToSerializedValue(this DataMaskingFunction value) { switch (value) { case DataMaskingFunction.Default: return("Default"); case DataMaskingFunction.CCN: return("CCN"); case DataMaskingFunction.Email: return("Email"); case DataMaskingFunction.Number: return("Number"); case DataMaskingFunction.SSN: return("SSN"); case DataMaskingFunction.Text: return("Text"); } return(null); }
public static string ToSerialString(this DataMaskingFunction value) => value switch {