// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go_gapic. DO NOT EDIT. package contactcenterinsights_test import ( "context" contactcenterinsights "cloud.google.com/go/contactcenterinsights/apiv1" contactcenterinsightspb "cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" "google.golang.org/api/iterator" ) func ExampleNewClient() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c } func ExampleNewRESTClient() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c } func ExampleClient_BulkAnalyzeConversations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.BulkAnalyzeConversationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkAnalyzeConversationsRequest. } op, err := c.BulkAnalyzeConversations(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_BulkDeleteConversations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.BulkDeleteConversationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkDeleteConversationsRequest. } op, err := c.BulkDeleteConversations(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_BulkDownloadFeedbackLabels() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.BulkDownloadFeedbackLabelsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkDownloadFeedbackLabelsRequest. } op, err := c.BulkDownloadFeedbackLabels(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_BulkUploadFeedbackLabels() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.BulkUploadFeedbackLabelsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkUploadFeedbackLabelsRequest. } op, err := c.BulkUploadFeedbackLabels(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CalculateIssueModelStats() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CalculateIssueModelStatsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CalculateIssueModelStatsRequest. } resp, err := c.CalculateIssueModelStats(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CalculateStats() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CalculateStatsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CalculateStatsRequest. } resp, err := c.CalculateStats(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateAnalysis() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateAnalysisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateAnalysisRequest. } op, err := c.CreateAnalysis(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateAnalysisRule() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateAnalysisRuleRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateAnalysisRuleRequest. } resp, err := c.CreateAnalysisRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateConversation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateConversationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateConversationRequest. } resp, err := c.CreateConversation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateFeedbackLabel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateFeedbackLabelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateFeedbackLabelRequest. } resp, err := c.CreateFeedbackLabel(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateIssueModelRequest. } op, err := c.CreateIssueModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreatePhraseMatcher() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreatePhraseMatcherRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreatePhraseMatcherRequest. } resp, err := c.CreatePhraseMatcher(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateQaQuestion() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateQaQuestionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateQaQuestionRequest. } resp, err := c.CreateQaQuestion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateQaScorecard() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateQaScorecardRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateQaScorecardRequest. } resp, err := c.CreateQaScorecard(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateQaScorecardRevision() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateQaScorecardRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateQaScorecardRevisionRequest. } resp, err := c.CreateQaScorecardRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CreateView() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.CreateViewRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateViewRequest. } resp, err := c.CreateView(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_DeleteAnalysis() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteAnalysisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteAnalysisRequest. } err = c.DeleteAnalysis(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteAnalysisRule() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteAnalysisRuleRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteAnalysisRuleRequest. } err = c.DeleteAnalysisRule(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteConversation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteConversationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteConversationRequest. } err = c.DeleteConversation(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteFeedbackLabel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteFeedbackLabelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteFeedbackLabelRequest. } err = c.DeleteFeedbackLabel(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteIssue() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteIssueRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteIssueRequest. } err = c.DeleteIssue(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteIssueModelRequest. } op, err := c.DeleteIssueModel(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } } func ExampleClient_DeletePhraseMatcher() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeletePhraseMatcherRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeletePhraseMatcherRequest. } err = c.DeletePhraseMatcher(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteQaQuestion() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteQaQuestionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteQaQuestionRequest. } err = c.DeleteQaQuestion(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteQaScorecard() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteQaScorecardRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteQaScorecardRequest. } err = c.DeleteQaScorecard(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteQaScorecardRevision() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteQaScorecardRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteQaScorecardRevisionRequest. } err = c.DeleteQaScorecardRevision(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeleteView() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeleteViewRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteViewRequest. } err = c.DeleteView(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_DeployIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeployIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeployIssueModelRequest. } op, err := c.DeployIssueModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_DeployQaScorecardRevision() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.DeployQaScorecardRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeployQaScorecardRevisionRequest. } resp, err := c.DeployQaScorecardRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_ExportInsightsData() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ExportInsightsDataRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ExportInsightsDataRequest. } op, err := c.ExportInsightsData(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_ExportIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ExportIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ExportIssueModelRequest. } op, err := c.ExportIssueModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetAnalysis() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetAnalysisRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetAnalysisRequest. } resp, err := c.GetAnalysis(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetAnalysisRule() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetAnalysisRuleRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetAnalysisRuleRequest. } resp, err := c.GetAnalysisRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetConversation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetConversationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetConversationRequest. } resp, err := c.GetConversation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetEncryptionSpec() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetEncryptionSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetEncryptionSpecRequest. } resp, err := c.GetEncryptionSpec(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetFeedbackLabel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetFeedbackLabelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetFeedbackLabelRequest. } resp, err := c.GetFeedbackLabel(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetIssue() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetIssueRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetIssueRequest. } resp, err := c.GetIssue(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetIssueModelRequest. } resp, err := c.GetIssueModel(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetPhraseMatcher() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetPhraseMatcherRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetPhraseMatcherRequest. } resp, err := c.GetPhraseMatcher(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetQaQuestion() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetQaQuestionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetQaQuestionRequest. } resp, err := c.GetQaQuestion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetQaScorecard() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetQaScorecardRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetQaScorecardRequest. } resp, err := c.GetQaScorecard(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetQaScorecardRevision() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetQaScorecardRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetQaScorecardRevisionRequest. } resp, err := c.GetQaScorecardRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetSettings() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetSettingsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetSettingsRequest. } resp, err := c.GetSettings(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_GetView() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.GetViewRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetViewRequest. } resp, err := c.GetView(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_ImportIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ImportIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ImportIssueModelRequest. } op, err := c.ImportIssueModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_IngestConversations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.IngestConversationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#IngestConversationsRequest. } op, err := c.IngestConversations(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_InitializeEncryptionSpec() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.InitializeEncryptionSpecRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#InitializeEncryptionSpecRequest. } op, err := c.InitializeEncryptionSpec(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_ListAllFeedbackLabels() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListAllFeedbackLabelsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListAllFeedbackLabelsRequest. } it := c.ListAllFeedbackLabels(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListAllFeedbackLabelsResponse) } } func ExampleClient_ListAnalyses() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListAnalysesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListAnalysesRequest. } it := c.ListAnalyses(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListAnalysesResponse) } } func ExampleClient_ListAnalysisRules() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListAnalysisRulesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListAnalysisRulesRequest. } it := c.ListAnalysisRules(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListAnalysisRulesResponse) } } func ExampleClient_ListConversations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListConversationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListConversationsRequest. } it := c.ListConversations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListConversationsResponse) } } func ExampleClient_ListFeedbackLabels() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListFeedbackLabelsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListFeedbackLabelsRequest. } it := c.ListFeedbackLabels(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListFeedbackLabelsResponse) } } func ExampleClient_ListIssueModels() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListIssueModelsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListIssueModelsRequest. } resp, err := c.ListIssueModels(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_ListIssues() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListIssuesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListIssuesRequest. } resp, err := c.ListIssues(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_ListPhraseMatchers() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListPhraseMatchersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListPhraseMatchersRequest. } it := c.ListPhraseMatchers(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListPhraseMatchersResponse) } } func ExampleClient_ListQaQuestions() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListQaQuestionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListQaQuestionsRequest. } it := c.ListQaQuestions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListQaQuestionsResponse) } } func ExampleClient_ListQaScorecardRevisions() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListQaScorecardRevisionsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListQaScorecardRevisionsRequest. } it := c.ListQaScorecardRevisions(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListQaScorecardRevisionsResponse) } } func ExampleClient_ListQaScorecards() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListQaScorecardsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListQaScorecardsRequest. } it := c.ListQaScorecards(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListQaScorecardsResponse) } } func ExampleClient_ListViews() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.ListViewsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListViewsRequest. } it := c.ListViews(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*contactcenterinsightspb.ListViewsResponse) } } func ExampleClient_QueryMetrics() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.QueryMetricsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#QueryMetricsRequest. } op, err := c.QueryMetrics(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_TuneQaScorecardRevision() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.TuneQaScorecardRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#TuneQaScorecardRevisionRequest. } op, err := c.TuneQaScorecardRevision(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UndeployIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UndeployIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UndeployIssueModelRequest. } op, err := c.UndeployIssueModel(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UndeployQaScorecardRevision() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UndeployQaScorecardRevisionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UndeployQaScorecardRevisionRequest. } resp, err := c.UndeployQaScorecardRevision(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateAnalysisRule() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateAnalysisRuleRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateAnalysisRuleRequest. } resp, err := c.UpdateAnalysisRule(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateConversation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateConversationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateConversationRequest. } resp, err := c.UpdateConversation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateFeedbackLabel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateFeedbackLabelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateFeedbackLabelRequest. } resp, err := c.UpdateFeedbackLabel(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateIssue() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateIssueRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateIssueRequest. } resp, err := c.UpdateIssue(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateIssueModel() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateIssueModelRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateIssueModelRequest. } resp, err := c.UpdateIssueModel(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdatePhraseMatcher() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdatePhraseMatcherRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdatePhraseMatcherRequest. } resp, err := c.UpdatePhraseMatcher(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateQaQuestion() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateQaQuestionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateQaQuestionRequest. } resp, err := c.UpdateQaQuestion(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateQaScorecard() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateQaScorecardRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateQaScorecardRequest. } resp, err := c.UpdateQaScorecard(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateSettings() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateSettingsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateSettingsRequest. } resp, err := c.UpdateSettings(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UpdateView() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UpdateViewRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateViewRequest. } resp, err := c.UpdateView(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_UploadConversation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &contactcenterinsightspb.UploadConversationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UploadConversationRequest. } op, err := c.UploadConversation(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_CancelOperation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } } func ExampleClient_GetOperation() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } func ExampleClient_ListOperations() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*longrunningpb.ListOperationsResponse) } }