{
  "type": "record",
  "Aspect": {
    "name": "incidentNotes"
  },
  "name": "IncidentNotes",
  "namespace": "com.linkedin.pegasus2avro.incident",
  "fields": [
    {
      "type": {
        "type": "array",
        "items": {
          "type": "record",
          "name": "IncidentNote",
          "namespace": "com.linkedin.pegasus2avro.incident",
          "fields": [
            {
              "Searchable": {
                "fieldType": "TEXT"
              },
              "type": "string",
              "name": "message",
              "doc": "The content of the note. Rendered as markdown in the UI."
            },
            {
              "type": {
                "type": "record",
                "name": "AuditStamp",
                "namespace": "com.linkedin.pegasus2avro.common",
                "fields": [
                  {
                    "type": "long",
                    "name": "time",
                    "doc": "When did the resource/association/sub-resource move into the specific lifecycle stage represented by this AuditEvent."
                  },
                  {
                    "java": {
                      "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                    },
                    "type": "string",
                    "name": "actor",
                    "doc": "The entity (e.g. a member URN) which will be credited for moving the resource/association/sub-resource into the specific lifecycle stage. It is also the one used to authorize the change.",
                    "Urn": "Urn"
                  },
                  {
                    "java": {
                      "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                    },
                    "type": [
                      "null",
                      "string"
                    ],
                    "name": "impersonator",
                    "default": null,
                    "doc": "The entity (e.g. a service URN) which performs the change on behalf of the Actor and must be authorized to act as the Actor.",
                    "Urn": "Urn"
                  },
                  {
                    "type": [
                      "null",
                      "string"
                    ],
                    "name": "message",
                    "default": null,
                    "doc": "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually."
                  }
                ],
                "doc": "Data captured on a resource/association/sub-resource level giving insight into when that resource/association/sub-resource moved into a particular lifecycle stage, and who acted to move it into that specific lifecycle stage."
              },
              "name": "created",
              "doc": "When the note was created, and the actor who created it."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "IncidentNoteSource",
                  "namespace": "com.linkedin.pegasus2avro.incident",
                  "fields": [
                    {
                      "type": [
                        "null",
                        {
                          "type": "enum",
                          "symbolDocs": {
                            "EXTERNAL": "Synced from an external incident management or ticketing system.",
                            "NATIVE": "Created via the DataHub UI or API."
                          },
                          "name": "IncidentNoteSourceType",
                          "namespace": "com.linkedin.pegasus2avro.incident",
                          "symbols": [
                            "NATIVE",
                            "EXTERNAL"
                          ],
                          "doc": "The source type of an incident note, indicating whether it was created natively\nin DataHub or synced from an external system."
                        }
                      ],
                      "name": "sourceType",
                      "default": null,
                      "doc": "The type of system this note originated from. Optional \u2014 inferred from externalId presence\nwhen absent, but useful for explicit filtering and future third-party source types."
                    },
                    {
                      "Searchable": {
                        "fieldType": "KEYWORD",
                        "queryByDefault": false
                      },
                      "type": [
                        "null",
                        "string"
                      ],
                      "name": "externalUrl",
                      "default": null,
                      "doc": "URL to the note in the external system (e.g., a Jira comment permalink)."
                    },
                    {
                      "Searchable": {
                        "fieldType": "KEYWORD",
                        "queryByDefault": false
                      },
                      "type": [
                        "null",
                        "string"
                      ],
                      "name": "externalId",
                      "default": null,
                      "doc": "Unique identifier for the note in the external system, used for deduplication.\nFor example, a Jira comment ID."
                    }
                  ],
                  "doc": "The source of an incident note, indicating whether it was created natively in DataHub\nor synced from an external system (e.g., Jira, ServiceNow)."
                }
              ],
              "name": "source",
              "default": null,
              "doc": "The source of this note. Absent if the note was created natively in DataHub."
            }
          ],
          "doc": "A note or update added to an incident, either by a user in DataHub or synced from an\nexternal incident management system."
        }
      },
      "name": "notes",
      "default": [],
      "doc": "The list of notes associated with this incident, ordered by creation time ascending."
    }
  ],
  "doc": "A collection of notes and updates added to an incident over its lifetime, by users\nin DataHub or synced from external systems. Stored as a separate aspect so that\ningestion sources that UPSERT IncidentInfo do not accidentally overwrite user-authored notes."
}