Esempio n. 1
0
        /// <summary>Snippet for CreateAnalysisAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreateAnalysisRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            CreateAnalysisRequest request = new CreateAnalysisRequest
            {
                ParentAsConversationName = ConversationName.FromProjectLocationConversation("[PROJECT]", "[LOCATION]", "[CONVERSATION]"),
                Analysis = new Analysis(),
            };
            // Make the request
            Operation <Analysis, CreateAnalysisOperationMetadata> response = await contactCenterInsightsClient.CreateAnalysisAsync(request);

            // Poll until the returned long-running operation is complete
            Operation <Analysis, CreateAnalysisOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            Analysis result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <Analysis, CreateAnalysisOperationMetadata> retrievedResponse = await contactCenterInsightsClient.PollOnceCreateAnalysisAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Analysis retrievedResult = retrievedResponse.Result;
            }
        }
        /// <summary>Snippet for ExportInsightsDataAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ExportInsightsDataAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]";
            // Make the request
            Operation <ExportInsightsDataResponse, ExportInsightsDataMetadata> response = await contactCenterInsightsClient.ExportInsightsDataAsync(parent);

            // Poll until the returned long-running operation is complete
            Operation <ExportInsightsDataResponse, ExportInsightsDataMetadata> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            ExportInsightsDataResponse result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <ExportInsightsDataResponse, ExportInsightsDataMetadata> retrievedResponse = await contactCenterInsightsClient.PollOnceExportInsightsDataAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                ExportInsightsDataResponse retrievedResult = retrievedResponse.Result;
            }
        }
Esempio n. 3
0
        /// <summary>Snippet for ExportInsightsDataAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ExportInsightsDataRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            ExportInsightsDataRequest request = new ExportInsightsDataRequest
            {
                ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
                BigQueryDestination  = new ExportInsightsDataRequest.Types.BigQueryDestination(),
                Filter = "",
                KmsKey = "",
            };
            // Make the request
            Operation <ExportInsightsDataResponse, ExportInsightsDataMetadata> response = await contactCenterInsightsClient.ExportInsightsDataAsync(request);

            // Poll until the returned long-running operation is complete
            Operation <ExportInsightsDataResponse, ExportInsightsDataMetadata> completedResponse = await response.PollUntilCompletedAsync();

            // Retrieve the operation result
            ExportInsightsDataResponse result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <ExportInsightsDataResponse, ExportInsightsDataMetadata> retrievedResponse = await contactCenterInsightsClient.PollOnceExportInsightsDataAsync(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                ExportInsightsDataResponse retrievedResult = retrievedResponse.Result;
            }
        }
Esempio n. 4
0
        /// <summary>Snippet for DeleteConversationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeleteConversationResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            ConversationName name = ConversationName.FromProjectLocationConversation("[PROJECT]", "[LOCATION]", "[CONVERSATION]");
            // Make the request
            await contactCenterInsightsClient.DeleteConversationAsync(name);
        }
Esempio n. 5
0
        /// <summary>Snippet for GetSettingsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetSettingsAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/settings";
            // Make the request
            Settings response = await contactCenterInsightsClient.GetSettingsAsync(name);
        }
Esempio n. 6
0
        /// <summary>Snippet for CalculateIssueModelStatsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CalculateIssueModelStatsResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            IssueModelName issueModel = IssueModelName.FromProjectLocationIssueModel("[PROJECT]", "[LOCATION]", "[ISSUE_MODEL]");
            // Make the request
            CalculateIssueModelStatsResponse response = await contactCenterInsightsClient.CalculateIssueModelStatsAsync(issueModel);
        }
Esempio n. 7
0
        /// <summary>Snippet for GetSettingsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetSettingsResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            SettingsName name = SettingsName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            // Make the request
            Settings response = await contactCenterInsightsClient.GetSettingsAsync(name);
        }
        /// <summary>Snippet for GetAnalysisAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetAnalysisAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/conversations/[CONVERSATION]/analyses/[ANALYSIS]";
            // Make the request
            Analysis response = await contactCenterInsightsClient.GetAnalysisAsync(name);
        }
        /// <summary>Snippet for CalculateIssueModelStatsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CalculateIssueModelStatsAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string issueModel = "projects/[PROJECT]/locations/[LOCATION]/issueModels/[ISSUE_MODEL]";
            // Make the request
            CalculateIssueModelStatsResponse response = await contactCenterInsightsClient.CalculateIssueModelStatsAsync(issueModel);
        }
Esempio n. 10
0
        /// <summary>Snippet for GetAnalysisAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetAnalysisResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            AnalysisName name = AnalysisName.FromProjectLocationConversationAnalysis("[PROJECT]", "[LOCATION]", "[CONVERSATION]", "[ANALYSIS]");
            // Make the request
            Analysis response = await contactCenterInsightsClient.GetAnalysisAsync(name);
        }
        /// <summary>Snippet for GetIssueAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetIssueResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            IssueName name = IssueName.FromProjectLocationIssueModelIssue("[PROJECT]", "[LOCATION]", "[ISSUE_MODEL]", "[ISSUE]");
            // Make the request
            Issue response = await contactCenterInsightsClient.GetIssueAsync(name);
        }
Esempio n. 12
0
        /// <summary>Snippet for DeletePhraseMatcherAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeletePhraseMatcherAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/phraseMatchers/[PHRASE_MATCHER]";
            // Make the request
            await contactCenterInsightsClient.DeletePhraseMatcherAsync(name);
        }
Esempio n. 13
0
        /// <summary>Snippet for ListIssueModelsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ListIssueModelsAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]";
            // Make the request
            ListIssueModelsResponse response = await contactCenterInsightsClient.ListIssueModelsAsync(parent);
        }
Esempio n. 14
0
        /// <summary>Snippet for DeletePhraseMatcherAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeletePhraseMatcherResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            PhraseMatcherName name = PhraseMatcherName.FromProjectLocationPhraseMatcher("[PROJECT]", "[LOCATION]", "[PHRASE_MATCHER]");
            // Make the request
            await contactCenterInsightsClient.DeletePhraseMatcherAsync(name);
        }
        /// <summary>Snippet for GetIssueModelAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetIssueModelAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/issueModels/[ISSUE_MODEL]";
            // Make the request
            IssueModel response = await contactCenterInsightsClient.GetIssueModelAsync(name);
        }
        /// <summary>Snippet for CalculateStatsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CalculateStatsAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string location = "projects/[PROJECT]/locations/[LOCATION]";
            // Make the request
            CalculateStatsResponse response = await contactCenterInsightsClient.CalculateStatsAsync(location);
        }
Esempio n. 17
0
        /// <summary>Snippet for DeleteConversationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeleteConversationAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/conversations/[CONVERSATION]";
            // Make the request
            await contactCenterInsightsClient.DeleteConversationAsync(name);
        }
        /// <summary>Snippet for CalculateStatsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CalculateStatsResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            LocationName location = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            // Make the request
            CalculateStatsResponse response = await contactCenterInsightsClient.CalculateStatsAsync(location);
        }
Esempio n. 19
0
        /// <summary>Snippet for ListIssueModelsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ListIssueModelsResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            // Make the request
            ListIssueModelsResponse response = await contactCenterInsightsClient.ListIssueModelsAsync(parent);
        }
Esempio n. 20
0
        /// <summary>Snippet for CreatePhraseMatcherAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreatePhraseMatcherAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string        parent        = "projects/[PROJECT]/locations/[LOCATION]";
            PhraseMatcher phraseMatcher = new PhraseMatcher();
            // Make the request
            PhraseMatcher response = await contactCenterInsightsClient.CreatePhraseMatcherAsync(parent, phraseMatcher);
        }
Esempio n. 21
0
        /// <summary>Snippet for UpdateConversationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task UpdateConversationAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            Conversation conversation = new Conversation();
            FieldMask    updateMask   = new FieldMask();
            // Make the request
            Conversation response = await contactCenterInsightsClient.UpdateConversationAsync(conversation, updateMask);
        }
        /// <summary>Snippet for CreatePhraseMatcherAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreatePhraseMatcherResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            LocationName  parent        = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            PhraseMatcher phraseMatcher = new PhraseMatcher();
            // Make the request
            PhraseMatcher response = await contactCenterInsightsClient.CreatePhraseMatcherAsync(parent, phraseMatcher);
        }
Esempio n. 23
0
        /// <summary>Snippet for UpdateSettingsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task UpdateSettingsAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            Settings  settings   = new Settings();
            FieldMask updateMask = new FieldMask();
            // Make the request
            Settings response = await contactCenterInsightsClient.UpdateSettingsAsync(settings, updateMask);
        }
Esempio n. 24
0
        /// <summary>Snippet for CreateConversationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreateConversationResourceNamesAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            LocationName parent         = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            Conversation conversation   = new Conversation();
            string       conversationId = "";
            // Make the request
            Conversation response = await contactCenterInsightsClient.CreateConversationAsync(parent, conversation, conversationId);
        }
Esempio n. 25
0
        /// <summary>Snippet for CreateConversationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreateConversationAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            string       parent         = "projects/[PROJECT]/locations/[LOCATION]";
            Conversation conversation   = new Conversation();
            string       conversationId = "";
            // Make the request
            Conversation response = await contactCenterInsightsClient.CreateConversationAsync(parent, conversation, conversationId);
        }
Esempio n. 26
0
        /// <summary>Snippet for DeleteAnalysisAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeleteAnalysisRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            DeleteAnalysisRequest request = new DeleteAnalysisRequest
            {
                AnalysisName = AnalysisName.FromProjectLocationConversationAnalysis("[PROJECT]", "[LOCATION]", "[CONVERSATION]", "[ANALYSIS]"),
            };
            // Make the request
            await contactCenterInsightsClient.DeleteAnalysisAsync(request);
        }
Esempio n. 27
0
        /// <summary>Snippet for GetPhraseMatcherAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetPhraseMatcherRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            GetPhraseMatcherRequest request = new GetPhraseMatcherRequest
            {
                PhraseMatcherName = PhraseMatcherName.FromProjectLocationPhraseMatcher("[PROJECT]", "[LOCATION]", "[PHRASE_MATCHER]"),
            };
            // Make the request
            PhraseMatcher response = await contactCenterInsightsClient.GetPhraseMatcherAsync(request);
        }
Esempio n. 28
0
        /// <summary>Snippet for CalculateIssueModelStatsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CalculateIssueModelStatsRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            CalculateIssueModelStatsRequest request = new CalculateIssueModelStatsRequest
            {
                IssueModelAsIssueModelName = IssueModelName.FromProjectLocationIssueModel("[PROJECT]", "[LOCATION]", "[ISSUE_MODEL]"),
            };
            // Make the request
            CalculateIssueModelStatsResponse response = await contactCenterInsightsClient.CalculateIssueModelStatsAsync(request);
        }
        /// <summary>Snippet for ListIssueModelsAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task ListIssueModelsRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            ListIssueModelsRequest request = new ListIssueModelsRequest
            {
                ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            };
            // Make the request
            ListIssueModelsResponse response = await contactCenterInsightsClient.ListIssueModelsAsync(request);
        }
Esempio n. 30
0
        /// <summary>Snippet for CreatePhraseMatcherAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreatePhraseMatcherRequestObjectAsync()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = await ContactCenterInsightsClient.CreateAsync();

            // Initialize request argument(s)
            CreatePhraseMatcherRequest request = new CreatePhraseMatcherRequest
            {
                ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
                PhraseMatcher        = new PhraseMatcher(),
            };
            // Make the request
            PhraseMatcher response = await contactCenterInsightsClient.CreatePhraseMatcherAsync(request);
        }