Example #1
0
        /// <summary>Snippet for DeleteKnowledgeBaseAsync</summary>
        public async Task DeleteKnowledgeBaseAsync()
        {
            // Snippet: DeleteKnowledgeBaseAsync(string, CallSettings)
            // Additional: DeleteKnowledgeBaseAsync(string, CancellationToken)
            // Create client
            KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();

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

            // End snippet
        }
Example #2
0
        /// <summary>Snippet for DeleteKnowledgeBaseAsync</summary>
        public async Task DeleteKnowledgeBaseResourceNamesAsync()
        {
            // Snippet: DeleteKnowledgeBaseAsync(KnowledgeBaseName, CallSettings)
            // Additional: DeleteKnowledgeBaseAsync(KnowledgeBaseName, CancellationToken)
            // Create client
            KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();

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

            // End snippet
        }
Example #3
0
        /// <summary>Snippet for DeleteKnowledgeBaseAsync</summary>
        public async Task DeleteKnowledgeBaseRequestObjectAsync()
        {
            // Snippet: DeleteKnowledgeBaseAsync(DeleteKnowledgeBaseRequest, CallSettings)
            // Additional: DeleteKnowledgeBaseAsync(DeleteKnowledgeBaseRequest, CancellationToken)
            // Create client
            KnowledgeBasesClient knowledgeBasesClient = await KnowledgeBasesClient.CreateAsync();

            // Initialize request argument(s)
            DeleteKnowledgeBaseRequest request = new DeleteKnowledgeBaseRequest
            {
                KnowledgeBaseName = KnowledgeBaseName.FromProjectKnowledgeBase("[PROJECT]", "[KNOWLEDGE_BASE]"),
                Force             = false,
            };
            // Make the request
            await knowledgeBasesClient.DeleteKnowledgeBaseAsync(request);

            // End snippet
        }