{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-purview/json-schema/microsoft-purview-kafka-configuration-schema.json",
  "title": "KafkaConfiguration",
  "description": "The configuration of the event streaming service resource attached to the Purview account for kafka notifications.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-purview-kafkaconfiguration-api-openapi.yml#/components/schemas/KafkaConfiguration",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/KafkaConfigurationProperties",
      "description": "Gets or sets the kafka configuration properties.",
      "x-ms-client-flatten": true
    }
  },
  "$defs": {
    "Credentials": {
      "description": "Credentials to access the event streaming service attached to the purview account.",
      "type": "object",
      "properties": {
        "identityId": {
          "description": "Identity identifier for UserAssign type.",
          "type": "string"
        },
        "type": {
          "description": "Identity Type.",
          "enum": [
            "None",
            "SystemAssigned",
            "UserAssigned"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "CredentialsType",
            "modelAsString": true
          }
        }
      }
    },
    "KafkaConfigurationProperties": {
      "description": "The kafka configuration properties of the event streaming service attached to the Purview account for kafka notifications.",
      "type": "object",
      "properties": {
        "consumerGroup": {
          "description": "Consumer group for hook event hub.",
          "type": "string"
        },
        "credentials": {
          "$ref": "#/$defs/Credentials",
          "description": "Credentials to access event hub."
        },
        "eventHubResourceId": {
          "type": "string",
          "format": "arm-id",
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.EventHub/namespaces/eventHubs"
              }
            ]
          }
        },
        "eventHubType": {
          "description": "The event hub type.",
          "enum": [
            "Notification",
            "Hook"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "eventHubType",
            "modelAsString": true
          }
        },
        "eventStreamingState": {
          "description": "The state of the event streaming service",
          "default": "Enabled",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "eventStreamingState",
            "modelAsString": true
          }
        },
        "eventStreamingType": {
          "description": "The event streaming service type",
          "default": "None",
          "enum": [
            "None",
            "Managed",
            "Azure"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "eventStreamingType",
            "modelAsString": true
          }
        },
        "eventHubPartitionId": {
          "description": "Optional partition Id for notification event hub. If not set, all partitions will be leveraged.",
          "type": "string"
        }
      }
    },
    "ProxyResource": {
      "description": "Proxy Azure Resource",
      "type": "object",
      "properties": {
        "id": {
          "description": "Gets or sets the identifier.",
          "type": "string",
          "readOnly": true
        },
        "name": {
          "description": "Gets or sets the name.",
          "type": "string",
          "readOnly": true
        },
        "systemData": {
          "description": "Metadata pertaining to creation and last modification of the resource.",
          "allOf": [
            {
              "$ref": "#/$defs/SystemData"
            }
          ],
          "readOnly": true
        },
        "type": {
          "description": "Gets or sets the type.",
          "type": "string",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "SystemData": {
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "type": "object",
      "properties": {
        "createdAt": {
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC).",
          "type": "string",
          "readOnly": true
        },
        "createdBy": {
          "description": "The identity that created the resource.",
          "type": "string",
          "readOnly": true
        },
        "createdByType": {
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "type": "string",
          "readOnly": true,
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "format": "date-time",
          "description": "The timestamp of the last modification the resource (UTC).",
          "type": "string",
          "readOnly": true
        },
        "lastModifiedBy": {
          "description": "The identity that last modified the resource.",
          "type": "string",
          "readOnly": true
        },
        "lastModifiedByType": {
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "type": "string",
          "readOnly": true,
          "x-ms-enum": {
            "name": "lastModifiedByType",
            "modelAsString": true
          }
        }
      }
    }
  }
}