{
  "type": "record",
  "name": "NotebookContent",
  "namespace": "com.linkedin.pegasus2avro.notebook",
  "doc": "Content in a Notebook\nNote: This is IN BETA version",
  "fields": [
    {
      "name": "cells",
      "type": {
        "type": "array",
        "items": {
          "type": "record",
          "name": "NotebookCell",
          "doc": "A record of all supported cells for a Notebook. Only one type of cell will be non-null.",
          "fields": [
            {
              "name": "textCell",
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "TextCell",
                  "doc": "Text cell in a Notebook, which will present content in text format",
                  "fields": [
                    {
                      "name": "cellTitle",
                      "type": [
                        "null",
                        "string"
                      ],
                      "doc": "Title of the cell",
                      "default": null
                    },
                    {
                      "name": "cellId",
                      "type": "string",
                      "doc": "Unique id for the cell. This id should be globally unique for a Notebook tool even when there are multiple deployments of it. As an example, Notebook URL could be used here for QueryBook such as 'querybook.com/notebook/773/?cellId=1234'"
                    },
                    {
                      "name": "changeAuditStamps",
                      "type": {
                        "type": "record",
                        "name": "ChangeAuditStamps",
                        "namespace": "com.linkedin.pegasus2avro.common",
                        "doc": "Data captured on a resource/association/sub-resource level giving insight into when that resource/association/sub-resource moved into various lifecycle stages, and who acted to move it into those lifecycle stages. The recommended best practice is to include this record in your record schema, and annotate its fields as @readOnly in your resource. See https://github.com/linkedin/rest.li/wiki/Validation-in-Rest.li#restli-validation-annotations",
                        "fields": [
                          {
                            "name": "created",
                            "type": {
                              "type": "record",
                              "name": "AuditStamp",
                              "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.",
                              "fields": [
                                {
                                  "name": "time",
                                  "type": "long",
                                  "doc": "When did the resource/association/sub-resource move into the specific lifecycle stage represented by this AuditEvent."
                                },
                                {
                                  "name": "actor",
                                  "type": "string",
                                  "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.",
                                  "java": {
                                    "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                                  }
                                },
                                {
                                  "name": "impersonator",
                                  "type": [
                                    "null",
                                    "string"
                                  ],
                                  "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.",
                                  "default": null,
                                  "java": {
                                    "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                                  }
                                },
                                {
                                  "name": "message",
                                  "type": [
                                    "null",
                                    "string"
                                  ],
                                  "doc": "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually.",
                                  "default": null
                                }
                              ]
                            },
                            "doc": "An AuditStamp corresponding to the creation of this resource/association/sub-resource. A value of 0 for time indicates missing data.",
                            "default": {
                              "actor": "urn:li:corpuser:unknown",
                              "impersonator": null,
                              "time": 0,
                              "message": null
                            }
                          },
                          {
                            "name": "lastModified",
                            "type": "AuditStamp",
                            "doc": "An AuditStamp corresponding to the last modification of this resource/association/sub-resource. If no modification has happened since creation, lastModified should be the same as created. A value of 0 for time indicates missing data.",
                            "default": {
                              "actor": "urn:li:corpuser:unknown",
                              "impersonator": null,
                              "time": 0,
                              "message": null
                            }
                          },
                          {
                            "name": "deleted",
                            "type": [
                              "null",
                              "AuditStamp"
                            ],
                            "doc": "An AuditStamp corresponding to the deletion of this resource/association/sub-resource. Logically, deleted MUST have a later timestamp than creation. It may or may not have the same time as lastModified depending upon the resource/association/sub-resource semantics.",
                            "default": null
                          }
                        ]
                      },
                      "doc": "Captures information about who created/last modified/deleted this Notebook cell and when"
                    },
                    {
                      "name": "text",
                      "type": "string",
                      "doc": "The actual text in a TextCell in a Notebook"
                    }
                  ]
                }
              ],
              "doc": "The text cell content. The will be non-null only when all other cell field is null.",
              "default": null
            },
            {
              "name": "queryCell",
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "QueryCell",
                  "doc": "Query cell in a Notebook, which will present content in query format",
                  "fields": [
                    {
                      "name": "cellTitle",
                      "type": [
                        "null",
                        "string"
                      ],
                      "doc": "Title of the cell",
                      "default": null
                    },
                    {
                      "name": "cellId",
                      "type": "string",
                      "doc": "Unique id for the cell. This id should be globally unique for a Notebook tool even when there are multiple deployments of it. As an example, Notebook URL could be used here for QueryBook such as 'querybook.com/notebook/773/?cellId=1234'"
                    },
                    {
                      "name": "changeAuditStamps",
                      "type": "com.linkedin.pegasus2avro.common.ChangeAuditStamps",
                      "doc": "Captures information about who created/last modified/deleted this Notebook cell and when"
                    },
                    {
                      "name": "rawQuery",
                      "type": "string",
                      "doc": "Raw query to explain some specific logic in a Notebook"
                    },
                    {
                      "name": "lastExecuted",
                      "type": [
                        "null",
                        "com.linkedin.pegasus2avro.common.AuditStamp"
                      ],
                      "doc": "Captures information about who last executed this query cell and when",
                      "default": null
                    }
                  ]
                }
              ],
              "doc": "The query cell content. The will be non-null only when all other cell field is null.",
              "default": null
            },
            {
              "name": "chartCell",
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "ChartCell",
                  "doc": "Chart cell in a notebook, which will present content in chart format",
                  "fields": [
                    {
                      "name": "cellTitle",
                      "type": [
                        "null",
                        "string"
                      ],
                      "doc": "Title of the cell",
                      "default": null
                    },
                    {
                      "name": "cellId",
                      "type": "string",
                      "doc": "Unique id for the cell. This id should be globally unique for a Notebook tool even when there are multiple deployments of it. As an example, Notebook URL could be used here for QueryBook such as 'querybook.com/notebook/773/?cellId=1234'"
                    },
                    {
                      "name": "changeAuditStamps",
                      "type": "com.linkedin.pegasus2avro.common.ChangeAuditStamps",
                      "doc": "Captures information about who created/last modified/deleted this Notebook cell and when"
                    }
                  ]
                }
              ],
              "doc": "The chart cell content. The will be non-null only when all other cell field is null.",
              "default": null
            },
            {
              "name": "type",
              "type": {
                "type": "enum",
                "name": "NotebookCellType",
                "doc": "Type of Notebook Cell",
                "symbols": [
                  "TEXT_CELL",
                  "QUERY_CELL",
                  "CHART_CELL"
                ],
                "symbolDocs": {
                  "CHART_CELL": "CHART Notebook cell type. The cell content is chart only.",
                  "QUERY_CELL": "QUERY Notebook cell type. The cell context is query only.",
                  "TEXT_CELL": "TEXT Notebook cell type. The cell context is text only."
                }
              },
              "doc": "The type of this Notebook cell"
            }
          ]
        }
      },
      "doc": "The content of a Notebook which is composed by a list of NotebookCell",
      "default": []
    }
  ],
  "Aspect": {
    "name": "notebookContent"
  }
}