All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.management.sql.implementation.DataMaskingRuleInner Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure Sql Management SDK. A new set of management libraries are now Generally Available. For documentation on how to use the new libraries, please see https://aka.ms/azsdk/java/mgmt

There is a newer version: 1.41.4
Show newest version
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.management.sql.implementation;

import com.microsoft.azure.management.sql.DataMaskingRuleState;
import com.microsoft.azure.management.sql.DataMaskingFunction;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.ProxyResource;

/**
 * Represents a database data masking rule.
 */
@JsonFlatten
public class DataMaskingRuleInner extends ProxyResource {
    /**
     * The rule Id.
     */
    @JsonProperty(value = "properties.id", access = JsonProperty.Access.WRITE_ONLY)
    private String dataMaskingRuleId;

    /**
     * The alias name. This is a legacy parameter and is no longer used.
     */
    @JsonProperty(value = "properties.aliasName")
    private String aliasName;

    /**
     * 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'.
     */
    @JsonProperty(value = "properties.ruleState")
    private DataMaskingRuleState ruleState;

    /**
     * The schema name on which the data masking rule is applied.
     */
    @JsonProperty(value = "properties.schemaName", required = true)
    private String schemaName;

    /**
     * The table name on which the data masking rule is applied.
     */
    @JsonProperty(value = "properties.tableName", required = true)
    private String tableName;

    /**
     * The column name on which the data masking rule is applied.
     */
    @JsonProperty(value = "properties.columnName", required = true)
    private String columnName;

    /**
     * The masking function that is used for the data masking rule. Possible
     * values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text'.
     */
    @JsonProperty(value = "properties.maskingFunction", required = true)
    private DataMaskingFunction maskingFunction;

    /**
     * The numberFrom property of the masking rule. Required if maskingFunction
     * is set to Number, otherwise this parameter will be ignored.
     */
    @JsonProperty(value = "properties.numberFrom")
    private String numberFrom;

    /**
     * The numberTo property of the data masking rule. Required if
     * maskingFunction is set to Number, otherwise this parameter will be
     * ignored.
     */
    @JsonProperty(value = "properties.numberTo")
    private String numberTo;

    /**
     * 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.
     */
    @JsonProperty(value = "properties.prefixSize")
    private String prefixSize;

    /**
     * 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.
     */
    @JsonProperty(value = "properties.suffixSize")
    private String suffixSize;

    /**
     * If maskingFunction is set to Text, the character to use for masking the
     * unexposed part of the string. Otherwise, this parameter will be ignored.
     */
    @JsonProperty(value = "properties.replacementString")
    private String replacementString;

    /**
     * The location of the data masking rule.
     */
    @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
    private String location;

    /**
     * The kind of Data Masking Rule. Metadata, used for Azure portal.
     */
    @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
    private String kind;

    /**
     * Get the rule Id.
     *
     * @return the dataMaskingRuleId value
     */
    public String dataMaskingRuleId() {
        return this.dataMaskingRuleId;
    }

    /**
     * Get the alias name. This is a legacy parameter and is no longer used.
     *
     * @return the aliasName value
     */
    public String aliasName() {
        return this.aliasName;
    }

    /**
     * Set the alias name. This is a legacy parameter and is no longer used.
     *
     * @param aliasName the aliasName value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withAliasName(String aliasName) {
        this.aliasName = aliasName;
        return this;
    }

    /**
     * Get 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'.
     *
     * @return the ruleState value
     */
    public DataMaskingRuleState ruleState() {
        return this.ruleState;
    }

    /**
     * Set 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 ruleState the ruleState value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withRuleState(DataMaskingRuleState ruleState) {
        this.ruleState = ruleState;
        return this;
    }

    /**
     * Get the schema name on which the data masking rule is applied.
     *
     * @return the schemaName value
     */
    public String schemaName() {
        return this.schemaName;
    }

    /**
     * Set the schema name on which the data masking rule is applied.
     *
     * @param schemaName the schemaName value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withSchemaName(String schemaName) {
        this.schemaName = schemaName;
        return this;
    }

    /**
     * Get the table name on which the data masking rule is applied.
     *
     * @return the tableName value
     */
    public String tableName() {
        return this.tableName;
    }

    /**
     * Set the table name on which the data masking rule is applied.
     *
     * @param tableName the tableName value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withTableName(String tableName) {
        this.tableName = tableName;
        return this;
    }

    /**
     * Get the column name on which the data masking rule is applied.
     *
     * @return the columnName value
     */
    public String columnName() {
        return this.columnName;
    }

    /**
     * Set the column name on which the data masking rule is applied.
     *
     * @param columnName the columnName value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withColumnName(String columnName) {
        this.columnName = columnName;
        return this;
    }

    /**
     * Get the masking function that is used for the data masking rule. Possible values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text'.
     *
     * @return the maskingFunction value
     */
    public DataMaskingFunction maskingFunction() {
        return this.maskingFunction;
    }

    /**
     * Set the masking function that is used for the data masking rule. Possible values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text'.
     *
     * @param maskingFunction the maskingFunction value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withMaskingFunction(DataMaskingFunction maskingFunction) {
        this.maskingFunction = maskingFunction;
        return this;
    }

    /**
     * Get the numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
     *
     * @return the numberFrom value
     */
    public String numberFrom() {
        return this.numberFrom;
    }

    /**
     * Set the numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
     *
     * @param numberFrom the numberFrom value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withNumberFrom(String numberFrom) {
        this.numberFrom = numberFrom;
        return this;
    }

    /**
     * Get the numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
     *
     * @return the numberTo value
     */
    public String numberTo() {
        return this.numberTo;
    }

    /**
     * Set the numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.
     *
     * @param numberTo the numberTo value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withNumberTo(String numberTo) {
        this.numberTo = numberTo;
        return this;
    }

    /**
     * Get 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.
     *
     * @return the prefixSize value
     */
    public String prefixSize() {
        return this.prefixSize;
    }

    /**
     * Set 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 prefixSize the prefixSize value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withPrefixSize(String prefixSize) {
        this.prefixSize = prefixSize;
        return this;
    }

    /**
     * Get 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.
     *
     * @return the suffixSize value
     */
    public String suffixSize() {
        return this.suffixSize;
    }

    /**
     * Set 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 suffixSize the suffixSize value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withSuffixSize(String suffixSize) {
        this.suffixSize = suffixSize;
        return this;
    }

    /**
     * Get if maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored.
     *
     * @return the replacementString value
     */
    public String replacementString() {
        return this.replacementString;
    }

    /**
     * Set 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 replacementString the replacementString value to set
     * @return the DataMaskingRuleInner object itself.
     */
    public DataMaskingRuleInner withReplacementString(String replacementString) {
        this.replacementString = replacementString;
        return this;
    }

    /**
     * Get the location of the data masking rule.
     *
     * @return the location value
     */
    public String location() {
        return this.location;
    }

    /**
     * Get the kind of Data Masking Rule. Metadata, used for Azure portal.
     *
     * @return the kind value
     */
    public String kind() {
        return this.kind;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy