{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-sql-database/json-schema/microsoft-azure-sql-database-data-masking-rule-list-result-schema.json",
  "title": "DataMaskingRuleListResult",
  "description": "The response of a DataMaskingRule list operation.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-sql-database-datamaskingrules-api-openapi.yml#/components/schemas/DataMaskingRuleListResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The DataMaskingRule items on this page",
      "items": {
        "$ref": "#/$defs/DataMaskingRule"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "DataMaskingFunction": {
      "type": "string",
      "description": "The masking function that is used for the data masking rule.",
      "enum": [
        "Default",
        "CCN",
        "Email",
        "Number",
        "SSN",
        "Text"
      ],
      "x-ms-enum": {
        "name": "DataMaskingFunction",
        "modelAsString": false,
        "values": [
          {
            "name": "Default",
            "value": "Default",
            "description": "Default"
          },
          {
            "name": "CCN",
            "value": "CCN",
            "description": "CCN"
          },
          {
            "name": "Email",
            "value": "Email",
            "description": "Email"
          },
          {
            "name": "Number",
            "value": "Number",
            "description": "Number"
          },
          {
            "name": "SSN",
            "value": "SSN",
            "description": "SSN"
          },
          {
            "name": "Text",
            "value": "Text",
            "description": "Text"
          }
        ]
      }
    },
    "DataMaskingRule": {
      "type": "object",
      "description": "A database data masking rule.",
      "properties": {
        "location": {
          "type": "string",
          "description": "The location of the data masking rule.",
          "readOnly": true
        },
        "kind": {
          "type": "string",
          "description": "The kind of Data Masking Rule. Metadata, used for Azure portal.",
          "readOnly": true
        },
        "properties": {
          "$ref": "#/$defs/DataMaskingRuleProperties",
          "description": "Resource properties.",
          "x-ms-client-flatten": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "DataMaskingRuleProperties": {
      "type": "object",
      "description": "The properties of a database data masking rule.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The rule Id.",
          "readOnly": true
        },
        "ruleState": {
          "$ref": "#/$defs/DataMaskingRuleState",
          "description": "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."
        },
        "schemaName": {
          "type": "string",
          "description": "The schema name on which the data masking rule is applied."
        },
        "tableName": {
          "type": "string",
          "description": "The table name on which the data masking rule is applied."
        },
        "columnName": {
          "type": "string",
          "description": "The column name on which the data masking rule is applied."
        },
        "aliasName": {
          "type": "string",
          "description": "The alias name. This is a legacy parameter and is no longer used."
        },
        "maskingFunction": {
          "$ref": "#/$defs/DataMaskingFunction",
          "description": "The masking function that is used for the data masking rule."
        },
        "numberFrom": {
          "type": "string",
          "description": "The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored."
        },
        "numberTo": {
          "type": "string",
          "description": "The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored."
        },
        "prefixSize": {
          "type": "string",
          "description": "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."
        },
        "suffixSize": {
          "type": "string",
          "description": "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."
        },
        "replacementString": {
          "type": "string",
          "description": "If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored."
        }
      },
      "required": [
        "schemaName",
        "tableName",
        "columnName",
        "maskingFunction"
      ]
    },
    "DataMaskingRuleState": {
      "type": "string",
      "description": "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.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "DataMaskingRuleState",
        "modelAsString": false,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Enabled"
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Disabled"
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}