{
  "type": "record",
  "Aspect": {
    "name": "corpUserSettings"
  },
  "name": "CorpUserSettings",
  "namespace": "com.linkedin.pegasus2avro.identity",
  "fields": [
    {
      "type": {
        "type": "record",
        "name": "CorpUserAppearanceSettings",
        "namespace": "com.linkedin.pegasus2avro.identity",
        "fields": [
          {
            "type": [
              "null",
              "boolean"
            ],
            "name": "showSimplifiedHomepage",
            "default": null,
            "doc": "Flag whether the user should see a homepage with only datasets, charts and dashboards. Intended for users\nwho have less operational use cases for the datahub tool."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "name": "showThemeV2",
            "default": null,
            "doc": "Flag controlling whether the V2 UI for DataHub is shown."
          }
        ],
        "doc": "Settings for a user around the appearance of their DataHub UI"
      },
      "name": "appearance",
      "doc": "Settings for a user around the appearance of their DataHub UI"
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "CorpUserViewsSettings",
          "namespace": "com.linkedin.pegasus2avro.identity",
          "fields": [
            {
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              },
              "type": [
                "null",
                "string"
              ],
              "name": "defaultView",
              "default": null,
              "doc": "The default View which is selected for the user.\nIf none is chosen, then this value will be left blank.",
              "Urn": "Urn"
            }
          ],
          "doc": "Settings related to the 'Views' feature."
        }
      ],
      "name": "views",
      "default": null,
      "doc": "User preferences for the Views feature."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "NotificationSettings",
          "namespace": "com.linkedin.pegasus2avro.event.notification.settings",
          "fields": [
            {
              "type": {
                "type": "array",
                "items": {
                  "type": "enum",
                  "symbolDocs": {
                    "EMAIL": "Email target type.",
                    "SLACK": "Slack target type.",
                    "TEAMS": "Microsoft Teams target type."
                  },
                  "name": "NotificationSinkType",
                  "namespace": "com.linkedin.pegasus2avro.event.notification",
                  "symbols": [
                    "SLACK",
                    "EMAIL",
                    "TEAMS"
                  ],
                  "doc": "A type of sink / platform to send a notification to."
                }
              },
              "name": "sinkTypes",
              "doc": "Sink types that notifications are sent to. This is a top-level on/off switch."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "SlackNotificationSettings",
                  "namespace": "com.linkedin.pegasus2avro.event.notification.settings",
                  "fields": [
                    {
                      "type": [
                        "null",
                        "string"
                      ],
                      "name": "userHandle",
                      "default": null,
                      "doc": "Optional user handle"
                    },
                    {
                      "type": [
                        "null",
                        {
                          "type": "array",
                          "items": "string"
                        }
                      ],
                      "name": "channels",
                      "default": null,
                      "doc": "Optional list of channels to send notifications to"
                    }
                  ],
                  "doc": "Slack Notification settings for an actor."
                }
              ],
              "name": "slackSettings",
              "default": null,
              "doc": "Slack Notification Settings"
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "EmailNotificationSettings",
                  "namespace": "com.linkedin.pegasus2avro.event.notification.settings",
                  "fields": [
                    {
                      "type": "string",
                      "name": "email",
                      "doc": "Optional user or group email address"
                    }
                  ],
                  "doc": "Email Notification settings for an actor."
                }
              ],
              "name": "emailSettings",
              "default": null,
              "doc": "Email Notification Settings"
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "TeamsNotificationSettings",
                  "namespace": "com.linkedin.pegasus2avro.event.notification.settings",
                  "fields": [
                    {
                      "type": [
                        "null",
                        {
                          "type": "record",
                          "name": "TeamsUser",
                          "namespace": "com.linkedin.pegasus2avro.settings.global",
                          "fields": [
                            {
                              "type": [
                                "null",
                                "string"
                              ],
                              "name": "teamsUserId",
                              "default": null,
                              "doc": "The Teams user ID (internal Teams identifier).\nThis is the primary identifier used for Teams messaging."
                            },
                            {
                              "Searchable": {
                                "fieldType": "KEYWORD",
                                "queryByDefault": false
                              },
                              "type": [
                                "null",
                                "string"
                              ],
                              "name": "azureUserId",
                              "default": null,
                              "doc": "The Azure AD user ID (Azure Active Directory object ID).\nThis is the primary identifier for Azure AD operations and Microsoft Graph API calls."
                            },
                            {
                              "type": [
                                "null",
                                "string"
                              ],
                              "name": "email",
                              "default": null,
                              "doc": "The user's email address (fallback identifier).\nUsed when other IDs are not available or for email-based user resolution."
                            },
                            {
                              "type": [
                                "null",
                                "string"
                              ],
                              "name": "displayName",
                              "default": null,
                              "doc": "The user's display name (cached value, may be stale).\nRetrieved from Microsoft Graph API and cached for performance."
                            },
                            {
                              "type": [
                                "null",
                                "long"
                              ],
                              "name": "lastUpdated",
                              "default": null,
                              "doc": "The timestamp when the cached display name was last updated.\nUsed for TTL-based cache invalidation (milliseconds since epoch)."
                            }
                          ],
                          "doc": "Teams user information with cached display name and multiple ID support.\nFollows the same caching pattern as TeamsChannel for consistency."
                        }
                      ],
                      "name": "user",
                      "default": null,
                      "doc": "Optional structured user information with cached metadata.\nSupports both Azure AD user ID and Teams user ID with cached display name."
                    },
                    {
                      "type": [
                        "null",
                        {
                          "type": "array",
                          "items": {
                            "type": "record",
                            "name": "TeamsChannel",
                            "namespace": "com.linkedin.pegasus2avro.settings.global",
                            "fields": [
                              {
                                "type": "string",
                                "name": "id",
                                "doc": "The Teams channel ID (internal Teams identifier)."
                              },
                              {
                                "type": [
                                  "null",
                                  "string"
                                ],
                                "name": "name",
                                "default": null,
                                "doc": "The Teams channel display name (cached value, may be stale)."
                              },
                              {
                                "type": [
                                  "null",
                                  "long"
                                ],
                                "name": "lastUpdated",
                                "default": null,
                                "doc": "The timestamp when the cached name was last updated.\nUsed for TTL-based cache invalidation."
                              }
                            ],
                            "doc": "Teams channel information with cached display name."
                          }
                        }
                      ],
                      "name": "channels",
                      "default": null,
                      "doc": "Optional list of structured channels with cached metadata"
                    }
                  ],
                  "doc": "Microsoft Teams Notification settings for an actor."
                }
              ],
              "name": "teamsSettings",
              "default": null,
              "doc": "Microsoft Teams Notification Settings"
            },
            {
              "type": [
                "null",
                {
                  "type": "map",
                  "values": {
                    "type": "record",
                    "name": "NotificationSetting",
                    "namespace": "com.linkedin.pegasus2avro.settings",
                    "fields": [
                      {
                        "type": {
                          "type": "enum",
                          "symbolDocs": {
                            "DISABLED": "Setting is disabled.",
                            "ENABLED": "Setting is enabled."
                          },
                          "name": "NotificationSettingValue",
                          "namespace": "com.linkedin.pegasus2avro.settings",
                          "symbols": [
                            "ENABLED",
                            "DISABLED"
                          ]
                        },
                        "name": "value",
                        "doc": "Integrations between DataHub & other platforms."
                      },
                      {
                        "type": [
                          "null",
                          {
                            "type": "map",
                            "values": "string"
                          }
                        ],
                        "name": "params",
                        "default": null,
                        "doc": "Custom set of setting parameters.\nCurrently used to store sink enabled / disabled settings.\nE.g. slack.enabled = true, email.enabled = false"
                      }
                    ]
                  }
                }
              ],
              "name": "settings",
              "default": null,
              "doc": "User or Group Notification Scenario Settings.\n\nA map of notification scenario type to the settings associated with it.\nFor a list of all scenario types to notify on, check out NotificationScenarioType enum."
            }
          ],
          "doc": "Notification settings for an actor or subscription."
        }
      ],
      "name": "notificationSettings",
      "default": null,
      "doc": "Notification settings for a user"
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "CorpUserHomePageSettings",
          "namespace": "com.linkedin.pegasus2avro.identity",
          "fields": [
            {
              "Relationship": {
                "entityTypes": [
                  "dataHubPageTemplate"
                ],
                "name": "HasPersonalPageTemplate"
              },
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              },
              "type": [
                "null",
                "string"
              ],
              "name": "pageTemplate",
              "default": null,
              "doc": "The page template that will be rendered in the UI by default for this user",
              "Urn": "Urn",
              "entityTypes": [
                "dataHubPageTemplate"
              ]
            },
            {
              "type": [
                "null",
                {
                  "type": "array",
                  "items": "string"
                }
              ],
              "name": "dismissedAnnouncements",
              "default": null,
              "doc": "The list of announcement urns that have been dismissed by the user"
            }
          ],
          "doc": "Settings related to the home page for a user"
        }
      ],
      "name": "homePage",
      "default": null,
      "doc": "Settings related to the home page for a user"
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "AiAssistantSettings",
          "namespace": "com.linkedin.pegasus2avro.settings.global",
          "fields": [
            {
              "type": {
                "type": "array",
                "items": {
                  "type": "record",
                  "name": "AiInstruction",
                  "namespace": "com.linkedin.pegasus2avro.settings.global",
                  "fields": [
                    {
                      "type": "string",
                      "name": "id",
                      "doc": "A unique identifier for this instruction.\nThis will enable users to manage multiple versions of the same instruction in the future."
                    },
                    {
                      "type": {
                        "type": "enum",
                        "symbolDocs": {
                          "GENERAL_CONTEXT": "General context to customize the AI assistant's behavior globally or personally. This is the only supported type currently."
                        },
                        "name": "AiInstructionType",
                        "namespace": "com.linkedin.pegasus2avro.settings.global",
                        "symbols": [
                          "GENERAL_CONTEXT"
                        ]
                      },
                      "name": "type",
                      "doc": "A unique identifier for this instruction.\nThis will enable users to manage multiple versions of the same instruction in the future."
                    },
                    {
                      "type": {
                        "type": "enum",
                        "symbolDocs": {
                          "ACTIVE": "The instruction is active and will be used by the AI assistant.",
                          "INACTIVE": "The instruction is inactive and will not be used by the AI assistant."
                        },
                        "name": "AiInstructionState",
                        "namespace": "com.linkedin.pegasus2avro.settings.global",
                        "symbols": [
                          "ACTIVE",
                          "INACTIVE"
                        ]
                      },
                      "name": "state",
                      "doc": "The state of the instruction"
                    },
                    {
                      "type": "string",
                      "name": "instruction",
                      "doc": "Custom instruction text to be sent to the AI model."
                    },
                    {
                      "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": "The actor + timestamp of when this instruction was created."
                    },
                    {
                      "type": "com.linkedin.pegasus2avro.common.AuditStamp",
                      "name": "lastModified",
                      "doc": "The actor + timestamp of when this instruction was last modified."
                    }
                  ],
                  "doc": "An object representing custom AI instructions for the AI assistant.\nGenerally, these are injected into the prompt sent to the AI model.\n\nIn the future we extend this to include positive examples, negative examples,\nand other parameters to customize the AI model's behavior."
                }
              },
              "name": "instructions",
              "default": [],
              "doc": "Custom instructions to inject into the AI assistant prompt"
            }
          ],
          "doc": "Settings related to the AI assistant (Ask DataHub) feature"
        }
      ],
      "name": "aiAssistant",
      "default": null,
      "doc": "Settings related to AI-powered chat assistant (Ask DataHub)."
    }
  ],
  "doc": "Settings that a user can customize through the DataHub UI"
}