{
  "type": "record",
  "Aspect": {
    "name": "formInfo"
  },
  "name": "FormInfo",
  "namespace": "com.linkedin.pegasus2avro.form",
  "fields": [
    {
      "Searchable": {
        "fieldType": "TEXT_PARTIAL"
      },
      "type": "string",
      "name": "name",
      "doc": "Display name of the form"
    },
    {
      "type": [
        "null",
        "string"
      ],
      "name": "description",
      "default": null,
      "doc": "Description of the form"
    },
    {
      "Searchable": {
        "fieldType": "KEYWORD"
      },
      "type": {
        "type": "enum",
        "symbolDocs": {
          "COMPLETION": "A form simply used for collecting metadata fields for an entity.",
          "VERIFICATION": "This form is used for \"verifying\" that entities comply with a policy via presence of a specific set of metadata fields."
        },
        "name": "FormType",
        "namespace": "com.linkedin.pegasus2avro.form",
        "symbols": [
          "COMPLETION",
          "VERIFICATION"
        ]
      },
      "name": "type",
      "default": "COMPLETION",
      "doc": "The type of this form"
    },
    {
      "type": {
        "type": "array",
        "items": {
          "type": "record",
          "name": "FormPrompt",
          "namespace": "com.linkedin.pegasus2avro.form",
          "fields": [
            {
              "Searchable": {
                "fieldName": "promptId",
                "fieldType": "KEYWORD",
                "queryByDefault": false
              },
              "type": "string",
              "name": "id",
              "doc": "The unique id for this prompt. This must be GLOBALLY unique."
            },
            {
              "type": "string",
              "name": "title",
              "doc": "The title of this prompt"
            },
            {
              "type": [
                "null",
                "string"
              ],
              "name": "description",
              "default": null,
              "doc": "The description of this prompt"
            },
            {
              "type": {
                "type": "enum",
                "symbolDocs": {
                  "DOCUMENTATION": "This prompt is meant to apply documentation to an entity",
                  "DOMAIN": "This prompt is meant to apply a domain to an entity",
                  "FIELDS_DOCUMENTATION": "This prompt is meant to apply documentation to a schema field entity",
                  "FIELDS_GLOSSARY_TERMS": "This prompt is meant to apply glossary terms to a schema field entity",
                  "FIELDS_STRUCTURED_PROPERTY": "This prompt is meant to apply a structured property to a schema field entity",
                  "GLOSSARY_TERMS": "This prompt is meant to apply glossary terms to an entity",
                  "OWNERSHIP": "This prompt is meant to apply ownership to an entity",
                  "STRUCTURED_PROPERTY": "This prompt is meant to apply a structured property to an entity"
                },
                "name": "FormPromptType",
                "namespace": "com.linkedin.pegasus2avro.form",
                "symbols": [
                  "STRUCTURED_PROPERTY",
                  "FIELDS_STRUCTURED_PROPERTY",
                  "OWNERSHIP",
                  "DOCUMENTATION",
                  "FIELDS_DOCUMENTATION",
                  "GLOSSARY_TERMS",
                  "FIELDS_GLOSSARY_TERMS",
                  "DOMAIN"
                ]
              },
              "name": "type",
              "doc": "The type of prompt"
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "StructuredPropertyParams",
                  "namespace": "com.linkedin.pegasus2avro.form",
                  "fields": [
                    {
                      "Searchable": {
                        "fieldName": "structuredPropertyPromptUrns",
                        "fieldType": "URN"
                      },
                      "java": {
                        "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                      },
                      "type": "string",
                      "name": "urn",
                      "doc": "The structured property that is required on this entity",
                      "Urn": "Urn"
                    }
                  ]
                }
              ],
              "name": "structuredPropertyParams",
              "default": null,
              "doc": "An optional set of information specific to structured properties prompts.\nThis should be filled out if the prompt is type STRUCTURED_PROPERTY or FIELDS_STRUCTURED_PROPERTY."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "OwnershipParams",
                  "namespace": "com.linkedin.pegasus2avro.form",
                  "fields": [
                    {
                      "type": {
                        "type": "enum",
                        "symbolDocs": {
                          "MULTIPLE": "The prompt accepts multiple values as a response",
                          "SINGLE": "The prompt accepts a singular value as a response"
                        },
                        "name": "PromptCardinality",
                        "namespace": "com.linkedin.pegasus2avro.form",
                        "symbols": [
                          "SINGLE",
                          "MULTIPLE"
                        ],
                        "doc": "The cardinality of the prompt."
                      },
                      "name": "cardinality",
                      "default": "MULTIPLE",
                      "doc": "Whether one or multiple owners are accepted as a response."
                    },
                    {
                      "Relationship": {
                        "/*": {
                          "entityTypes": [
                            "corpuser",
                            "corpGroup"
                          ],
                          "name": "allowedOwnerOn"
                        }
                      },
                      "type": [
                        "null",
                        {
                          "type": "array",
                          "items": "string"
                        }
                      ],
                      "name": "allowedOwners",
                      "default": null,
                      "doc": "An optional list of allowed owners to choose from",
                      "Urn": "Urn",
                      "urn_is_array": true
                    },
                    {
                      "Relationship": {
                        "/*": {
                          "entityTypes": [
                            "ownershipType"
                          ],
                          "name": "allowedOwnershipTypeOn"
                        }
                      },
                      "type": [
                        "null",
                        {
                          "type": "array",
                          "items": "string"
                        }
                      ],
                      "name": "allowedOwnershipTypes",
                      "default": null,
                      "doc": "An optional list of ownership type urns to choose from. If this is empty, all types will be allowed.\nIf only one type is provided, the user will be required to set that type when responding.",
                      "Urn": "Urn",
                      "urn_is_array": true
                    }
                  ],
                  "doc": "Information specific to glossary terms prompts."
                }
              ],
              "name": "ownershipParams",
              "default": null,
              "doc": "An optional set of information specific to ownership prompts.\nThis should be filled out if the prompt is type OWNERSHIP."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "GlossaryTermsParams",
                  "namespace": "com.linkedin.pegasus2avro.form",
                  "fields": [
                    {
                      "type": "com.linkedin.pegasus2avro.form.PromptCardinality",
                      "name": "cardinality",
                      "default": "MULTIPLE",
                      "doc": "Whether one or multiple terms are accepted as a response."
                    },
                    {
                      "Relationship": {
                        "/*": {
                          "entityTypes": [
                            "glossaryTerm"
                          ],
                          "name": "allowedTermOn"
                        }
                      },
                      "type": [
                        "null",
                        {
                          "type": "array",
                          "items": "string"
                        }
                      ],
                      "name": "allowedTerms",
                      "default": null,
                      "doc": "An optional list of allowed glossary terms to choose from",
                      "Urn": "Urn",
                      "urn_is_array": true
                    },
                    {
                      "Relationship": {
                        "/*": {
                          "entityTypes": [
                            "glossaryNode"
                          ],
                          "name": "allowedTermGroupOn"
                        }
                      },
                      "type": [
                        "null",
                        {
                          "type": "array",
                          "items": "string"
                        }
                      ],
                      "name": "allowedTermGroups",
                      "default": null,
                      "doc": "An optional list of glossary term groups where a selection set of terms are underneath.\nRight now this is not recursive. Provided a term group, we will display its direct children as options.",
                      "Urn": "Urn",
                      "urn_is_array": true
                    }
                  ],
                  "doc": "Information specific to glossary terms prompts."
                }
              ],
              "name": "glossaryTermsParams",
              "default": null,
              "doc": "An optional set of information specific to glossary terms prompts.\nThis should be filled out if the prompt is type GLOSSARY_TERMS or FIELDS_GLOSSARY_TERM."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "DomainParams",
                  "namespace": "com.linkedin.pegasus2avro.form",
                  "fields": [
                    {
                      "Relationship": {
                        "/*": {
                          "entityTypes": [
                            "domain"
                          ],
                          "name": "allowedDomainOn"
                        }
                      },
                      "type": [
                        "null",
                        {
                          "type": "array",
                          "items": "string"
                        }
                      ],
                      "name": "allowedDomains",
                      "default": null,
                      "doc": "An optional list of allowed domains to choose from",
                      "Urn": "Urn",
                      "urn_is_array": true
                    }
                  ],
                  "doc": "Information specific to glossary terms prompts."
                }
              ],
              "name": "domainParams",
              "default": null,
              "doc": "An optional set of information specific to domain prompts.\nThis should be filled out if the prompt is type DOMAIN."
            },
            {
              "type": "boolean",
              "name": "required",
              "default": false,
              "doc": "Whether the prompt is required to be completed, in order for the form to be marked as complete."
            }
          ],
          "doc": "A prompt to present to the user to encourage filling out metadata"
        }
      },
      "name": "prompts",
      "default": [],
      "doc": "List of prompts to present to the user to encourage filling out metadata"
    },
    {
      "type": {
        "type": "record",
        "name": "FormActorAssignment",
        "namespace": "com.linkedin.pegasus2avro.form",
        "fields": [
          {
            "Searchable": {
              "fieldName": "isOwnershipForm",
              "fieldType": "BOOLEAN"
            },
            "type": "boolean",
            "name": "owners",
            "default": true,
            "doc": "Whether the form should be assigned to the owners of assets that it is applied to.\nThis is the default."
          },
          {
            "Searchable": {
              "/*": {
                "fieldName": "assignedGroups",
                "fieldType": "URN"
              }
            },
            "type": [
              "null",
              {
                "type": "array",
                "items": "string"
              }
            ],
            "name": "groups",
            "default": null,
            "doc": "Optional: Specific set of groups that are targeted by this form assignment.",
            "Urn": "Urn",
            "urn_is_array": true
          },
          {
            "Searchable": {
              "/*": {
                "fieldName": "assignedUsers",
                "fieldType": "URN"
              }
            },
            "type": [
              "null",
              {
                "type": "array",
                "items": "string"
              }
            ],
            "name": "users",
            "default": null,
            "doc": "Optional: Specific set of users that are targeted by this form assignment.",
            "Urn": "Urn",
            "urn_is_array": true
          }
        ]
      },
      "name": "actors",
      "default": {
        "groups": null,
        "owners": true,
        "users": null
      },
      "doc": "Who the form is assigned to, e.g. who should see the form when visiting the entity page or governance center"
    },
    {
      "Searchable": {
        "/state": {
          "fieldName": "formStatus",
          "fieldType": "KEYWORD"
        }
      },
      "type": {
        "type": "record",
        "name": "FormStatus",
        "namespace": "com.linkedin.pegasus2avro.form",
        "fields": [
          {
            "Searchable": {
              "fieldType": "KEYWORD"
            },
            "type": {
              "type": "enum",
              "symbolDocs": {
                "DRAFT": "This form is in draft state and is not viewable by any users",
                "PUBLISHED": "This form is published and viewable by users to fill it out",
                "UNPUBLISHED": "This form is unpublished and is not viewable by users"
              },
              "name": "FormState",
              "namespace": "com.linkedin.pegasus2avro.form",
              "symbols": [
                "DRAFT",
                "PUBLISHED",
                "UNPUBLISHED"
              ]
            },
            "name": "state",
            "doc": "The state of this form. Draft means no users are prompted to fill it out yet and unpublished is hidden.\nPublished forms are out in the world for users to see. Setting default to PUBLISHED for old data."
          },
          {
            "type": [
              "null",
              {
                "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": "lastModified",
            "default": null,
            "doc": "Audit stamp containing who last modified the form state and when."
          }
        ],
        "doc": "Information about the state of a form"
      },
      "name": "status",
      "default": {
        "state": "PUBLISHED",
        "lastModified": null
      },
      "doc": "Information about the state and status of this form"
    },
    {
      "Searchable": {
        "/time": {
          "fieldName": "createdTime",
          "fieldType": "DATETIME"
        }
      },
      "type": [
        "null",
        "com.linkedin.pegasus2avro.common.AuditStamp"
      ],
      "name": "created",
      "default": null,
      "doc": "Created Audit stamp"
    },
    {
      "Searchable": {
        "/time": {
          "fieldName": "lastModified",
          "fieldType": "DATETIME"
        }
      },
      "type": [
        "null",
        "com.linkedin.pegasus2avro.common.AuditStamp"
      ],
      "name": "lastModified",
      "default": null,
      "doc": "Last Modified Audit stamp"
    }
  ],
  "doc": "Information about a form to help with filling out metadata on entities."
}