{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-mysql/json-schema/microsoft-azure-mysql-advanced-threat-protection-schema.json",
  "title": "AdvancedThreatProtection",
  "description": "A server's Advanced Threat Protection.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-mysql-advancedthreatprotectionsettings-api-openapi.yml#/components/schemas/AdvancedThreatProtection",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AdvancedThreatProtectionProperties",
      "description": "Resource properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "AdvancedThreatProtectionProperties": {
      "type": "object",
      "description": "Properties of an Advanced Threat Protection setting.",
      "properties": {
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Specifies the UTC creation time of the policy.",
          "readOnly": true
        },
        "state": {
          "$ref": "#/$defs/AdvancedThreatProtectionState",
          "description": "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server."
        },
        "provisioningState": {
          "$ref": "#/$defs/AdvancedThreatProtectionProvisioningState",
          "description": "Provisioning state of the Threat Protection.",
          "readOnly": true
        }
      }
    },
    "AdvancedThreatProtectionProvisioningState": {
      "type": "string",
      "description": "The current provisioning state.",
      "enum": [
        "Succeeded",
        "Updating",
        "Canceled",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "AdvancedThreatProtectionProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded"
          },
          {
            "name": "Updating",
            "value": "Updating"
          },
          {
            "name": "Canceled",
            "value": "Canceled"
          },
          {
            "name": "Failed",
            "value": "Failed"
          }
        ]
      }
    },
    "AdvancedThreatProtectionState": {
      "type": "string",
      "description": "Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled on the server.",
      "enum": [
        "Enabled",
        "Disabled"
      ],
      "x-ms-enum": {
        "name": "AdvancedThreatProtectionState",
        "modelAsString": true,
        "values": [
          {
            "name": "Enabled",
            "value": "Enabled"
          },
          {
            "name": "Disabled",
            "value": "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"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    }
  }
}