{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.2/bridging/privateChannelBroadcastAgentRequest.schema.json",
  "title": "PrivateChannelBroadcast Agent Request",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/PrivateChannelBroadcastRequestBase"
    },
    {
      "$ref": "agentRequest.schema.json"
    }
  ],
  "$defs": {
    "PrivateChannelBroadcastRequestBase": {
      "title": "PrivateChannelBroadcast Request",
      "type": "object",
      "description": "A request to broadcast on a PrivateChannel.",
      "properties": {
        "type": {
          "title": "Private Channel Broadcast Message type",
          "const": "PrivateChannel.broadcast"
        },
        "payload": {
          "title": "PrivateChannelBroadcast Request Payload",
          "type": "object",
          "properties": {
            "channelId": {
              "type": "string",
              "title": "Channel Id",
              "description": "The Id of the PrivateChannel that the broadcast was sent on"
            },
            "context": {
              "$ref": "../context/context.schema.json",
              "title": "Context",
              "description": "The context object that was the payload of a broadcast message."
            }
          },
          "additionalProperties": false,
          "required": ["channelId", "context"]
        },
        "meta": {
          "title": "PrivateChannelBroadcast Request Metadata",
          "type": "object",
          "properties": {
            "requestUuid": true,
            "timestamp": true,
            "source": {
              "$ref": "common.schema.json#/$defs/AppRequestSource"
            },
            "destination": {
              "$ref": "common.schema.json#/$defs/AppDestination"
            }
          },
          "unevaluatedProperties": false
        }
      },
      "additionalProperties": false
    }
  }
}
