def create_document(project_id, knowledge_base_id, display_name, mime_type,<EOL>knowledge_type, content_uri):
import dialogflow_v2beta1 as dialogflow<EOL>client = dialogflow.DocumentsClient()<EOL>knowledge_base_path = client.knowledge_base_path(project_id,<EOL>knowledge_base_id)<EOL>document = dialogflow.types.Document(<EOL>display_name=display_name, mime_type=mime_type,<EOL>content_uri=content_uri)<EOL>document.knowledge_types.append(<EOL>dialogflow.types.Document.KnowledgeType.Value(knowledge_type))<EOL>response = client.create_document(knowledge_base_path, document)<EOL>print('<STR_LIT>')<EOL>document = response.result(timeout=<NUM_LIT>)<EOL>print('<STR_LIT>')<EOL>print('<STR_LIT>'.format(document.display_name))<EOL>print('<STR_LIT>'.format(document.name))<EOL>print('<STR_LIT>'.format(document.mime_type))<EOL>print('<STR_LIT>')<EOL>for knowledge_type in document.knowledge_types:<EOL><INDENT>print('<STR_LIT>'.format(KNOWLEDGE_TYPES[knowledge_type]))<EOL><DEDENT>print('<STR_LIT>'.format(document.content_uri))<EOL>
Creates a Document.

    Args:
        project_id: The GCP project linked with the agent.
        knowledge_base_id: Id of the Knowledge base.
        display_name: The display name of the Document.
        mime_type: The mime_type of the Document. e.g. text/csv, text/html,
            text/plain, text/pdf etc.
        knowledge_type: The Knowledge type of the Document. e.g. FAQ,
            EXTRACTIVE_QA.
        content_uri: Uri of the document, e.g. gs://path/mydoc.csv,
            http://mypage.com/faq.html.