Exemplo n.º 1
0
        /// <summary>Snippet for GetKnowledgeBaseAsync</summary>
        public async Task GetKnowledgeBaseResourceNamesAsync()
        {
            // Snippet: GetKnowledgeBaseAsync(KnowledgeBaseName, CallSettings)
            // Additional: GetKnowledgeBaseAsync(KnowledgeBaseName, CancellationToken)
            // Create client
            KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();

            // Initialize request argument(s)
            KnowledgeBaseName name = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]");
            // Make the request
            KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(name);

            // End snippet
        }
Exemplo n.º 2
0
        /// <summary>Snippet for GetKnowledgeBaseAsync</summary>
        public async Task GetKnowledgeBaseAsync()
        {
            // Snippet: GetKnowledgeBaseAsync(string, CallSettings)
            // Additional: GetKnowledgeBaseAsync(string, CancellationToken)
            // Create client
            KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/knowledgeBases/[KNOWLEDGE_BASE]";
            // Make the request
            KnowledgeBase response = await knowledgeBasesClient.GetKnowledgeBaseAsync(name);

            // End snippet
        }