Share via


DataMaskingRuleProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleProperties

Implements

public final class DataMaskingRuleProperties
implements JsonSerializable<DataMaskingRuleProperties>

The properties of a database data masking rule.

Constructor Summary

Constructor Description
DataMaskingRuleProperties()

Creates an instance of DataMaskingRuleProperties class.

Method Summary

Modifier and Type Method and Description
String aliasName()

Get the aliasName property: The alias name.

String columnName()

Get the columnName property: The column name on which the data masking rule is applied.

static DataMaskingRuleProperties fromJson(JsonReader jsonReader)

Reads an instance of DataMaskingRuleProperties from the JsonReader.

String id()

Get the id property: The rule Id.

DataMaskingFunction maskingFunction()

Get the maskingFunction property: The masking function that is used for the data masking rule.

String numberFrom()

Get the numberFrom property: The numberFrom property of the masking rule.

String numberTo()

Get the numberTo property: The numberTo property of the data masking rule.

String prefixSize()

Get the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string.

String replacementString()

Get the replacementString property: If maskingFunction is set to Text, the character to use for masking the unexposed part of the string.

DataMaskingRuleState ruleState()

Get the ruleState property: The rule state.

String schemaName()

Get the schemaName property: The schema name on which the data masking rule is applied.

String suffixSize()

Get the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string.

String tableName()

Get the tableName property: The table name on which the data masking rule is applied.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DataMaskingRuleProperties withAliasName(String aliasName)

Set the aliasName property: The alias name.

DataMaskingRuleProperties withColumnName(String columnName)

Set the columnName property: The column name on which the data masking rule is applied.

DataMaskingRuleProperties withMaskingFunction(DataMaskingFunction maskingFunction)

Set the maskingFunction property: The masking function that is used for the data masking rule.

DataMaskingRuleProperties withNumberFrom(String numberFrom)

Set the numberFrom property: The numberFrom property of the masking rule.

DataMaskingRuleProperties withNumberTo(String numberTo)

Set the numberTo property: The numberTo property of the data masking rule.

DataMaskingRuleProperties withPrefixSize(String prefixSize)

Set the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string.

DataMaskingRuleProperties withReplacementString(String replacementString)

Set the replacementString property: If maskingFunction is set to Text, the character to use for masking the unexposed part of the string.

DataMaskingRuleProperties withRuleState(DataMaskingRuleState ruleState)

Set the ruleState property: The rule state.

DataMaskingRuleProperties withSchemaName(String schemaName)

Set the schemaName property: The schema name on which the data masking rule is applied.

DataMaskingRuleProperties withSuffixSize(String suffixSize)

Set the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string.

DataMaskingRuleProperties withTableName(String tableName)

Set the tableName property: The table name on which the data masking rule is applied.

Methods inherited from java.lang.Object

Constructor Details

DataMaskingRuleProperties

public DataMaskingRuleProperties()

Creates an instance of DataMaskingRuleProperties class.

Method Details

aliasName

public String aliasName()

Get the aliasName property: The alias name. This is a legacy parameter and is no longer used.

Returns:

the aliasName value.

columnName

public String columnName()

Get the columnName property: The column name on which the data masking rule is applied.

Returns:

the columnName value.

fromJson

public static DataMaskingRuleProperties fromJson(JsonReader jsonReader)

Reads an instance of DataMaskingRuleProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DataMaskingRuleProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: The rule Id.

Returns:

the id value.

maskingFunction

public DataMaskingFunction maskingFunction()

Get the maskingFunction property: The masking function that is used for the data masking rule.

Returns:

the maskingFunction value.

numberFrom

public String numberFrom()

Get the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

Returns:

the numberFrom value.

numberTo

public String numberTo()

Get the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

Returns:

the numberTo value.

prefixSize

public String prefixSize()

Get the prefixSize property: 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.

Returns:

the prefixSize value.

replacementString

public String replacementString()

Get the replacementString property: If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored.

Returns:

the replacementString value.

ruleState

public DataMaskingRuleState ruleState()

Get the ruleState property: 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.

Returns:

the ruleState value.

schemaName

public String schemaName()

Get the schemaName property: The schema name on which the data masking rule is applied.

Returns:

the schemaName value.

suffixSize

public String suffixSize()

Get the suffixSize property: 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.

Returns:

the suffixSize value.

tableName

public String tableName()

Get the tableName property: The table name on which the data masking rule is applied.

Returns:

the tableName value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAliasName

public DataMaskingRuleProperties withAliasName(String aliasName)

Set the aliasName property: The alias name. This is a legacy parameter and is no longer used.

Parameters:

aliasName - the aliasName value to set.

Returns:

the DataMaskingRuleProperties object itself.

withColumnName

public DataMaskingRuleProperties withColumnName(String columnName)

Set the columnName property: The column name on which the data masking rule is applied.

Parameters:

columnName - the columnName value to set.

Returns:

the DataMaskingRuleProperties object itself.

withMaskingFunction

public DataMaskingRuleProperties withMaskingFunction(DataMaskingFunction maskingFunction)

Set the maskingFunction property: The masking function that is used for the data masking rule.

Parameters:

maskingFunction - the maskingFunction value to set.

Returns:

the DataMaskingRuleProperties object itself.

withNumberFrom

public DataMaskingRuleProperties withNumberFrom(String numberFrom)

Set the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

Parameters:

numberFrom - the numberFrom value to set.

Returns:

the DataMaskingRuleProperties object itself.

withNumberTo

public DataMaskingRuleProperties withNumberTo(String numberTo)

Set the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

Parameters:

numberTo - the numberTo value to set.

Returns:

the DataMaskingRuleProperties object itself.

withPrefixSize

public DataMaskingRuleProperties withPrefixSize(String prefixSize)

Set the prefixSize property: 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.

Parameters:

prefixSize - the prefixSize value to set.

Returns:

the DataMaskingRuleProperties object itself.

withReplacementString

public DataMaskingRuleProperties withReplacementString(String replacementString)

Set the replacementString property: If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored.

Parameters:

replacementString - the replacementString value to set.

Returns:

the DataMaskingRuleProperties object itself.

withRuleState

public DataMaskingRuleProperties withRuleState(DataMaskingRuleState ruleState)

Set the ruleState property: 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.

Parameters:

ruleState - the ruleState value to set.

Returns:

the DataMaskingRuleProperties object itself.

withSchemaName

public DataMaskingRuleProperties withSchemaName(String schemaName)

Set the schemaName property: The schema name on which the data masking rule is applied.

Parameters:

schemaName - the schemaName value to set.

Returns:

the DataMaskingRuleProperties object itself.

withSuffixSize

public DataMaskingRuleProperties withSuffixSize(String suffixSize)

Set the suffixSize property: 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.

Parameters:

suffixSize - the suffixSize value to set.

Returns:

the DataMaskingRuleProperties object itself.

withTableName

public DataMaskingRuleProperties withTableName(String tableName)

Set the tableName property: The table name on which the data masking rule is applied.

Parameters:

tableName - the tableName value to set.

Returns:

the DataMaskingRuleProperties object itself.

Applies to