{
  "type": "record",
  "Aspect": {
    "name": "recommendationModule"
  },
  "name": "RecommendationModule",
  "namespace": "com.linkedin.pegasus2avro.metadata.recommendation",
  "fields": [
    {
      "type": "string",
      "name": "title",
      "doc": "Title of the module to display"
    },
    {
      "type": "string",
      "name": "moduleId",
      "doc": "Unique id of the module being recommended"
    },
    {
      "type": {
        "type": "enum",
        "symbolDocs": {
          "DOMAIN_SEARCH_LIST": "List of domains to search",
          "ENTITY_NAME_LIST": "Simple list of entities",
          "GLOSSARY_TERM_SEARCH_LIST": "Glossary term search list",
          "PLATFORM_SEARCH_LIST": "List of platforms to search",
          "SEARCH_QUERY_LIST": "A list of recommended searches",
          "TAG_SEARCH_LIST": "Tag search list"
        },
        "name": "RecommendationRenderType",
        "namespace": "com.linkedin.pegasus2avro.metadata.recommendation",
        "symbols": [
          "ENTITY_NAME_LIST",
          "PLATFORM_SEARCH_LIST",
          "TAG_SEARCH_LIST",
          "GLOSSARY_TERM_SEARCH_LIST",
          "SEARCH_QUERY_LIST",
          "DOMAIN_SEARCH_LIST"
        ],
        "doc": "Enum that defines how the modules should be rendered.\nThere should be two frontend implementation of large and small modules per type."
      },
      "name": "renderType",
      "doc": "Type of rendering that defines how the module should be rendered"
    },
    {
      "type": {
        "type": "array",
        "items": {
          "type": "record",
          "name": "RecommendationContent",
          "namespace": "com.linkedin.pegasus2avro.metadata.recommendation",
          "fields": [
            {
              "type": "string",
              "name": "value",
              "doc": "String representation of content"
            },
            {
              "java": {
                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
              },
              "type": [
                "null",
                "string"
              ],
              "name": "entity",
              "default": null,
              "doc": "Entity being recommended. Empty if the content being recommended is not an entity",
              "Urn": "Urn"
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "RecommendationParams",
                  "namespace": "com.linkedin.pegasus2avro.metadata.recommendation",
                  "fields": [
                    {
                      "type": [
                        "null",
                        {
                          "type": "record",
                          "name": "SearchParams",
                          "namespace": "com.linkedin.pegasus2avro.metadata.recommendation",
                          "fields": [
                            {
                              "type": {
                                "type": "array",
                                "items": "string"
                              },
                              "name": "types",
                              "default": [],
                              "doc": "Entity types to be searched. If this is not provided, all entities will be searched."
                            },
                            {
                              "type": "string",
                              "name": "query",
                              "doc": "Search query"
                            },
                            {
                              "type": {
                                "type": "array",
                                "items": {
                                  "type": "record",
                                  "name": "Criterion",
                                  "namespace": "com.linkedin.pegasus2avro.metadata.query.filter",
                                  "fields": [
                                    {
                                      "type": "string",
                                      "name": "field",
                                      "doc": "The name of the field that the criterion refers to"
                                    },
                                    {
                                      "type": "string",
                                      "name": "value",
                                      "doc": "The value of the intended field"
                                    },
                                    {
                                      "type": {
                                        "type": "array",
                                        "items": "string"
                                      },
                                      "name": "values",
                                      "default": [],
                                      "doc": "Values. one of which the intended field should match\nNote, if values is set, the above \"value\" field will be ignored"
                                    },
                                    {
                                      "type": {
                                        "type": "enum",
                                        "symbolDocs": {
                                          "ANCESTORS_INCL": "Represent the relation: URN field matches any nested parent in addition to the given URN",
                                          "CONTAIN": "Represent the relation: String field contains value, e.g. name contains Profile",
                                          "DESCENDANTS_INCL": "Represent the relation: URN field any nested children in addition to the given URN",
                                          "END_WITH": "Represent the relation: String field ends with value, e.g. name ends with Event",
                                          "EQUAL": "Represent the relation: field = value, e.g. platform = hdfs",
                                          "EXISTS": "Represents the relation: field exists and is non-empty, e.g. owners is not null and != [] (empty)",
                                          "GREATER_THAN": "Represent the relation greater than, e.g. ownerCount > 5",
                                          "GREATER_THAN_OR_EQUAL_TO": "Represent the relation greater than or equal to, e.g. ownerCount >= 5",
                                          "IN": "Represent the relation: String field is one of the array values to, e.g. name in [\"Profile\", \"Event\"]",
                                          "IS_NULL": "Represent the relation: field is null, e.g. platform is null",
                                          "LESS_THAN": "Represent the relation less than, e.g. ownerCount < 3",
                                          "LESS_THAN_OR_EQUAL_TO": "Represent the relation less than or equal to, e.g. ownerCount <= 3",
                                          "RELATED_INCL": "Represent the relation: URN field matches any nested child or parent in addition to the given URN",
                                          "START_WITH": "Represent the relation: String field starts with value, e.g. name starts with PageView"
                                        },
                                        "name": "Condition",
                                        "namespace": "com.linkedin.pegasus2avro.metadata.query.filter",
                                        "symbols": [
                                          "CONTAIN",
                                          "END_WITH",
                                          "EQUAL",
                                          "IS_NULL",
                                          "EXISTS",
                                          "GREATER_THAN",
                                          "GREATER_THAN_OR_EQUAL_TO",
                                          "IN",
                                          "LESS_THAN",
                                          "LESS_THAN_OR_EQUAL_TO",
                                          "START_WITH",
                                          "DESCENDANTS_INCL",
                                          "ANCESTORS_INCL",
                                          "RELATED_INCL"
                                        ],
                                        "doc": "The matching condition in a filter criterion"
                                      },
                                      "name": "condition",
                                      "default": "EQUAL",
                                      "doc": "The condition for the criterion, e.g. EQUAL, START_WITH"
                                    },
                                    {
                                      "type": "boolean",
                                      "name": "negated",
                                      "default": false,
                                      "doc": "Whether the condition should be negated"
                                    }
                                  ],
                                  "doc": "A criterion for matching a field with given value"
                                }
                              },
                              "name": "filters",
                              "default": [],
                              "doc": "Filters"
                            }
                          ],
                          "doc": "Context to define the search recommendations"
                        }
                      ],
                      "name": "searchParams",
                      "default": null,
                      "doc": "Context to define the search recommendations"
                    },
                    {
                      "type": [
                        "null",
                        {
                          "type": "record",
                          "name": "EntityProfileParams",
                          "namespace": "com.linkedin.pegasus2avro.metadata.recommendation",
                          "fields": [
                            {
                              "java": {
                                "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                              },
                              "type": "string",
                              "name": "urn",
                              "doc": "Urn of the entity being shown",
                              "Urn": "Urn"
                            }
                          ],
                          "doc": "Context to define the entity profile page"
                        }
                      ],
                      "name": "entityProfileParams",
                      "default": null,
                      "doc": "Context to define the entity profile page"
                    },
                    {
                      "type": [
                        "null",
                        {
                          "type": "record",
                          "name": "ContentParams",
                          "namespace": "com.linkedin.pegasus2avro.metadata.recommendation",
                          "fields": [
                            {
                              "type": "long",
                              "name": "count",
                              "doc": "Number of entities corresponding to the recommended content"
                            }
                          ],
                          "doc": "Params about the recommended content"
                        }
                      ],
                      "name": "contentParams",
                      "default": null,
                      "doc": "Context about the recommendation"
                    }
                  ],
                  "doc": "Parameters required to render a recommendation of a given type"
                }
              ],
              "name": "params",
              "default": null,
              "doc": "Additional context required to generate the the recommendation"
            }
          ],
          "doc": "Content to display within each recommendation module"
        }
      },
      "name": "content",
      "doc": "List of content to display inside the module"
    }
  ]
}