{
  "type": "record",
  "Event": {
    "name": "notificationRequest"
  },
  "name": "NotificationRequest",
  "namespace": "com.linkedin.pegasus2avro.event.notification",
  "fields": [
    {
      "type": {
        "type": "record",
        "name": "NotificationMessage",
        "namespace": "com.linkedin.pegasus2avro.event.notification",
        "fields": [
          {
            "type": {
              "type": "enum",
              "symbolDocs": {
                "BROADCAST_ACTION_WORKFLOW_FORM_REQUEST_STATUS_CHANGE": "Broadcast that an action workflow form request has been completed (approved or denied).",
                "BROADCAST_ASSERTION_STATUS_CHANGE": "Assertion change notification template.",
                "BROADCAST_NEW_ACTION_WORKFLOW_FORM_REQUEST": "Broadcast that a new action workflow form request has been created or needs review.",
                "BROADCAST_NEW_INCIDENT_UPDATE": "Updates the broadcasted incident if possible.",
                "CUSTOM": "Legacy template types to support backwards compatibility.",
                "OWNERSHIP_CHANGE": "Ownership change notification template."
              },
              "name": "NotificationTemplateType",
              "namespace": "com.linkedin.pegasus2avro.event.notification.template",
              "symbols": [
                "OWNERSHIP_CHANGE",
                "BROADCAST_ASSERTION_STATUS_CHANGE",
                "CUSTOM",
                "BROADCAST_NEW_INCIDENT",
                "BROADCAST_NEW_INCIDENT_UPDATE",
                "BROADCAST_INCIDENT_STATUS_CHANGE",
                "BROADCAST_ENTITY_CHANGE",
                "BROADCAST_INGESTION_RUN_CHANGE",
                "BROADCAST_NEW_PROPOSAL",
                "BROADCAST_PROPOSAL_STATUS_CHANGE",
                "BROADCAST_COMPLIANCE_FORM_PUBLISH",
                "BROADCAST_NEW_ACTION_WORKFLOW_FORM_REQUEST",
                "BROADCAST_ACTION_WORKFLOW_FORM_REQUEST_STATUS_CHANGE",
                "INVALID_TEMPLATE"
              ],
              "doc": "Possible notification template types."
            },
            "name": "template",
            "doc": "The name of a notification template to use, e.g. INCIDENT_CREATED, INCIDENT_STATUS_UPDATED, CUSTOM.\nEach sink may support a different set of template types."
          },
          {
            "type": [
              "null",
              {
                "type": "map",
                "values": "string"
              }
            ],
            "name": "parameters",
            "default": null,
            "doc": "Parameters serving as input to the template, validated and substituted based on the selected template."
          },
          {
            "type": [
              "null",
              {
                "type": "record",
                "name": "OwnershipParameters",
                "namespace": "com.linkedin.pegasus2avro.event.notification.template",
                "fields": [
                  {
                    "type": [
                      "null",
                      {
                        "type": "array",
                        "items": {
                          "type": "record",
                          "name": "Owner",
                          "namespace": "com.linkedin.pegasus2avro.common",
                          "fields": [
                            {
                              "Relationship": {
                                "entityTypes": [
                                  "corpuser",
                                  "corpGroup"
                                ],
                                "name": "OwnedBy"
                              },
                              "Searchable": {
                                "addToFilters": true,
                                "fieldName": "owners",
                                "fieldType": "URN",
                                "filterNameOverride": "Owned By",
                                "hasValuesFieldName": "hasOwners",
                                "queryByDefault": false
                              },
                              "java": {
                                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                              },
                              "type": "string",
                              "name": "owner",
                              "doc": "Owner URN, e.g. urn:li:corpuser:ldap, urn:li:corpGroup:group_name, and urn:li:multiProduct:mp_name\n(Caveat: only corpuser is currently supported in the frontend.)",
                              "Urn": "Urn",
                              "entityTypes": [
                                "corpuser",
                                "corpGroup"
                              ]
                            },
                            {
                              "deprecated": true,
                              "type": {
                                "type": "enum",
                                "symbolDocs": {
                                  "BUSINESS_OWNER": "A person or group who is responsible for logical, or business related, aspects of the asset.",
                                  "CONSUMER": "A person, group, or service that consumes the data\nDeprecated! Use TECHNICAL_OWNER or BUSINESS_OWNER instead.",
                                  "CUSTOM": "Set when ownership type is unknown or a when new one is specified as an ownership type entity for which we have no\nenum value for. This is used for backwards compatibility",
                                  "DATAOWNER": "A person or group that is owning the data\nDeprecated! Use TECHNICAL_OWNER instead.",
                                  "DATA_STEWARD": "A steward, expert, or delegate responsible for the asset.",
                                  "DELEGATE": "A person or a group that overseas the operation, e.g. a DBA or SRE.\nDeprecated! Use TECHNICAL_OWNER instead.",
                                  "DEVELOPER": "A person or group that is in charge of developing the code\nDeprecated! Use TECHNICAL_OWNER instead.",
                                  "NONE": "No specific type associated to the owner.",
                                  "PRODUCER": "A person, group, or service that produces/generates the data\nDeprecated! Use TECHNICAL_OWNER instead.",
                                  "STAKEHOLDER": "A person or a group that has direct business interest\nDeprecated! Use TECHNICAL_OWNER, BUSINESS_OWNER, or STEWARD instead.",
                                  "TECHNICAL_OWNER": "person or group who is responsible for technical aspects of the asset."
                                },
                                "deprecatedSymbols": {
                                  "CONSUMER": true,
                                  "DATAOWNER": true,
                                  "DELEGATE": true,
                                  "DEVELOPER": true,
                                  "PRODUCER": true,
                                  "STAKEHOLDER": true
                                },
                                "name": "OwnershipType",
                                "namespace": "com.linkedin.pegasus2avro.common",
                                "symbols": [
                                  "CUSTOM",
                                  "TECHNICAL_OWNER",
                                  "BUSINESS_OWNER",
                                  "DATA_STEWARD",
                                  "NONE",
                                  "DEVELOPER",
                                  "DATAOWNER",
                                  "DELEGATE",
                                  "PRODUCER",
                                  "CONSUMER",
                                  "STAKEHOLDER"
                                ],
                                "doc": "Asset owner types"
                              },
                              "name": "type",
                              "doc": "The type of the ownership"
                            },
                            {
                              "Relationship": {
                                "entityTypes": [
                                  "ownershipType"
                                ],
                                "name": "ownershipType"
                              },
                              "Searchable": {
                                "fieldName": "ownershipTypeUrn",
                                "fieldType": "URN",
                                "queryByDefault": false
                              },
                              "java": {
                                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                              },
                              "type": [
                                "null",
                                "string"
                              ],
                              "name": "typeUrn",
                              "default": null,
                              "doc": "The type of the ownership\nUrn of type O",
                              "Urn": "Urn",
                              "entityTypes": [
                                "ownershipType"
                              ]
                            },
                            {
                              "type": [
                                "null",
                                {
                                  "type": "record",
                                  "name": "OwnershipSource",
                                  "namespace": "com.linkedin.pegasus2avro.common",
                                  "fields": [
                                    {
                                      "type": {
                                        "type": "enum",
                                        "symbolDocs": {
                                          "AUDIT": "Auditing system or audit logs",
                                          "DATABASE": "Database, e.g. GRANTS table",
                                          "FILE_SYSTEM": "File system, e.g. file/directory owner",
                                          "ISSUE_TRACKING_SYSTEM": "Issue tracking system, e.g. Jira",
                                          "MANUAL": "Manually provided by a user",
                                          "OTHER": "Other sources",
                                          "SERVICE": "Other ownership-like service, e.g. Nuage, ACL service etc",
                                          "SOURCE_CONTROL": "SCM system, e.g. GIT, SVN"
                                        },
                                        "name": "OwnershipSourceType",
                                        "namespace": "com.linkedin.pegasus2avro.common",
                                        "symbols": [
                                          "AUDIT",
                                          "DATABASE",
                                          "FILE_SYSTEM",
                                          "ISSUE_TRACKING_SYSTEM",
                                          "MANUAL",
                                          "SERVICE",
                                          "SOURCE_CONTROL",
                                          "OTHER"
                                        ]
                                      },
                                      "name": "type",
                                      "doc": "The type of the source"
                                    },
                                    {
                                      "type": [
                                        "null",
                                        "string"
                                      ],
                                      "name": "url",
                                      "default": null,
                                      "doc": "A reference URL for the source"
                                    }
                                  ],
                                  "doc": "Source/provider of the ownership information"
                                }
                              ],
                              "name": "source",
                              "default": null,
                              "doc": "Source information for the ownership"
                            }
                          ],
                          "doc": "Ownership information"
                        }
                      }
                    ],
                    "name": "ownersAdded",
                    "default": null,
                    "doc": "The owners that were added."
                  },
                  {
                    "type": [
                      "null",
                      {
                        "type": "array",
                        "items": "com.linkedin.pegasus2avro.common.Owner"
                      }
                    ],
                    "name": "ownersRemoved",
                    "default": null,
                    "doc": "The owners that were removed."
                  }
                ],
                "doc": "A message to send via notification."
              }
            ],
            "name": "ownershipParameters",
            "default": null,
            "doc": "Input parameters for ownership notification template. Only filled when templateType is OWNERSHIP_CHANGE."
          }
        ],
        "doc": "A message to send via notification."
      },
      "name": "message",
      "doc": "A message to send."
    },
    {
      "type": {
        "type": "array",
        "items": {
          "type": "record",
          "name": "NotificationRecipient",
          "namespace": "com.linkedin.pegasus2avro.event.notification",
          "fields": [
            {
              "type": {
                "type": "enum",
                "symbolDocs": {
                  "CUSTOM": "A custom target, e.g. a slack channel or dm, that a specific sink can handle. Sinks are expected to handle custom\ntypes appropriately.",
                  "EMAIL": "A specific email address to send a notification to.",
                  "SLACK_CHANNEL": "A slack channel to send a notification to.",
                  "SLACK_DM": "A slack member to send a notification to.",
                  "USER": "Deprecated! A DataHub user (via urn.). Currently this is NOT USED and may be removed in future versions.\nRecipient type should correspond to the sink type, and the sink should understand how to handle the recipient type appropriately.\nInstead, typically notifications have specific recipients as Slack handles, slack channels, or email addresses."
                },
                "name": "NotificationRecipientType",
                "namespace": "com.linkedin.pegasus2avro.event.notification",
                "symbols": [
                  "EMAIL",
                  "SLACK_CHANNEL",
                  "SLACK_DM",
                  "CUSTOM",
                  "USER"
                ],
                "doc": "A type of target (recipient) channel for a notification. Typically a single recipient\nmaps to a single sink type. Each sink can support one or more recipient types.\n\nEach type of Notification Sink exposes the recipient types that they support sinking to. This\nis used by the notification manager to filter out recipients that are not supported by a given sink."
              },
              "name": "type",
              "doc": "The type of a notification recipient, e.g. the channel type."
            },
            {
              "type": [
                "null",
                "string"
              ],
              "name": "customType",
              "default": null,
              "doc": "A custom notification recipient type. Required if recipient type is CUSTOM."
            },
            {
              "type": [
                "null",
                "string"
              ],
              "name": "id",
              "default": null,
              "doc": "A unique channel / target id that the sink can pick up.\nFor slack sink, this will contain the channel or user id to send to.\nFor email sink, this will contain the email address to send to."
            },
            {
              "type": [
                "null",
                {
                  "type": "enum",
                  "symbolDocs": {
                    "ACTOR_NOTIFICATION": "The notification originated from an actor-oriented default notification.\nFor example, proposal task or ownership assignment notifications.",
                    "GLOBAL_NOTIFICATION": "The notification originated from a global change.",
                    "SUBSCRIPTION": "The notification originated from a subscription."
                  },
                  "name": "NotificationRecipientOriginType",
                  "namespace": "com.linkedin.pegasus2avro.event.notification",
                  "symbols": [
                    "SUBSCRIPTION",
                    "GLOBAL_NOTIFICATION",
                    "ACTOR_NOTIFICATION"
                  ]
                }
              ],
              "name": "origin",
              "default": null,
              "doc": "The origin of the recipient notification, for tracking."
            },
            {
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              },
              "type": [
                "null",
                "string"
              ],
              "name": "actor",
              "default": null,
              "doc": "The URN of the actor associated with the recipient (personal or subscription related notifications).",
              "Urn": "Urn"
            },
            {
              "type": [
                "null",
                "string"
              ],
              "name": "displayName",
              "default": null,
              "doc": "An optional display name to use when addressing the recipient. Available only for subscription or personal notifications."
            }
          ],
          "doc": "The targeted recipient of a notification, either a specific User or a specific channel."
        }
      },
      "name": "recipients",
      "doc": "The target (receiver) of the notification, in DataHub Terms."
    },
    {
      "type": [
        "null",
        {
          "type": "array",
          "items": {
            "type": "record",
            "name": "NotificationSink",
            "namespace": "com.linkedin.pegasus2avro.event.notification",
            "fields": [
              {
                "type": {
                  "type": "enum",
                  "symbolDocs": {
                    "EMAIL": "Email target type.",
                    "SLACK": "Slack target type."
                  },
                  "name": "NotificationSinkType",
                  "namespace": "com.linkedin.pegasus2avro.event.notification",
                  "symbols": [
                    "SLACK",
                    "EMAIL"
                  ],
                  "doc": "A type of sink / platform to send a notification to."
                },
                "name": "type",
                "doc": "The type of the sink."
              }
            ],
            "doc": "Information about the sink of a notification, e.g. HOW the notification is sent."
          }
        }
      ],
      "name": "sinks",
      "default": null,
      "doc": "Optional: A specific sink / set of sinks to send to. If not specified, all enabled sinks\nwill be attemped and will be expected to handle the notification if they are able to send\nto a given recipient type."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "NotificationContext",
          "namespace": "com.linkedin.pegasus2avro.event.notification",
          "fields": [
            {
              "type": [
                "null",
                "string"
              ],
              "name": "runId",
              "default": null,
              "doc": "The run-id that triggered the notification. If it was triggered by a manual action,\nthis may be set to the default \"no-run-id-provided\" value."
            }
          ],
          "doc": "Additional context about the notification."
        }
      ],
      "name": "context",
      "default": null,
      "doc": "Additional context about the notification."
    }
  ],
  "doc": "A request to send a notification."
}