Debian Codegraph @

contactcenterinsights/apiv1/contact_center_insights_client_example_test.go

raw symbols SCIP
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go_gapic. DO NOT EDIT.
16
17 package contactcenterinsights_test
18
19 import (
20 "context"
21
22 contactcenterinsights "cloud.google.com/go/contactcenterinsights/apiv1"
23 contactcenterinsightspb "cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb"
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 "google.golang.org/api/iterator"
26 )
27
28 func ExampleNewClient() {
29 ctx := context.Background()
30 // This snippet has been automatically generated and should be regarded as a code template only.
31 // It will require modifications to work:
32 // - It may require correct/in-range values for request initialization.
33 // - It may require specifying regional endpoints when creating the service client as shown in:
34 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
35 c, err := contactcenterinsights.NewClient(ctx)
36 if err != nil {
37 // TODO: Handle error.
38 }
39 defer c.Close()
40
41 // TODO: Use client.
42 _ = c
43 }
44
45 func ExampleNewRESTClient() {
46 ctx := context.Background()
47 // This snippet has been automatically generated and should be regarded as a code template only.
48 // It will require modifications to work:
49 // - It may require correct/in-range values for request initialization.
50 // - It may require specifying regional endpoints when creating the service client as shown in:
51 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
52 c, err := contactcenterinsights.NewRESTClient(ctx)
53 if err != nil {
54 // TODO: Handle error.
55 }
56 defer c.Close()
57
58 // TODO: Use client.
59 _ = c
60 }
61
62 func ExampleClient_BulkAnalyzeConversations() {
63 ctx := context.Background()
64 // This snippet has been automatically generated and should be regarded as a code template only.
65 // It will require modifications to work:
66 // - It may require correct/in-range values for request initialization.
67 // - It may require specifying regional endpoints when creating the service client as shown in:
68 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
69 c, err := contactcenterinsights.NewClient(ctx)
70 if err != nil {
71 // TODO: Handle error.
72 }
73 defer c.Close()
74
75 req := &contactcenterinsightspb.BulkAnalyzeConversationsRequest{
76 // TODO: Fill request struct fields.
77 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkAnalyzeConversationsRequest.
78 }
79 op, err := c.BulkAnalyzeConversations(ctx, req)
80 if err != nil {
81 // TODO: Handle error.
82 }
83
84 resp, err := op.Wait(ctx)
85 if err != nil {
86 // TODO: Handle error.
87 }
88 // TODO: Use resp.
89 _ = resp
90 }
91
92 func ExampleClient_BulkDeleteConversations() {
93 ctx := context.Background()
94 // This snippet has been automatically generated and should be regarded as a code template only.
95 // It will require modifications to work:
96 // - It may require correct/in-range values for request initialization.
97 // - It may require specifying regional endpoints when creating the service client as shown in:
98 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
99 c, err := contactcenterinsights.NewClient(ctx)
100 if err != nil {
101 // TODO: Handle error.
102 }
103 defer c.Close()
104
105 req := &contactcenterinsightspb.BulkDeleteConversationsRequest{
106 // TODO: Fill request struct fields.
107 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkDeleteConversationsRequest.
108 }
109 op, err := c.BulkDeleteConversations(ctx, req)
110 if err != nil {
111 // TODO: Handle error.
112 }
113
114 resp, err := op.Wait(ctx)
115 if err != nil {
116 // TODO: Handle error.
117 }
118 // TODO: Use resp.
119 _ = resp
120 }
121
122 func ExampleClient_BulkDownloadFeedbackLabels() {
123 ctx := context.Background()
124 // This snippet has been automatically generated and should be regarded as a code template only.
125 // It will require modifications to work:
126 // - It may require correct/in-range values for request initialization.
127 // - It may require specifying regional endpoints when creating the service client as shown in:
128 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
129 c, err := contactcenterinsights.NewClient(ctx)
130 if err != nil {
131 // TODO: Handle error.
132 }
133 defer c.Close()
134
135 req := &contactcenterinsightspb.BulkDownloadFeedbackLabelsRequest{
136 // TODO: Fill request struct fields.
137 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkDownloadFeedbackLabelsRequest.
138 }
139 op, err := c.BulkDownloadFeedbackLabels(ctx, req)
140 if err != nil {
141 // TODO: Handle error.
142 }
143
144 resp, err := op.Wait(ctx)
145 if err != nil {
146 // TODO: Handle error.
147 }
148 // TODO: Use resp.
149 _ = resp
150 }
151
152 func ExampleClient_BulkUploadFeedbackLabels() {
153 ctx := context.Background()
154 // This snippet has been automatically generated and should be regarded as a code template only.
155 // It will require modifications to work:
156 // - It may require correct/in-range values for request initialization.
157 // - It may require specifying regional endpoints when creating the service client as shown in:
158 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
159 c, err := contactcenterinsights.NewClient(ctx)
160 if err != nil {
161 // TODO: Handle error.
162 }
163 defer c.Close()
164
165 req := &contactcenterinsightspb.BulkUploadFeedbackLabelsRequest{
166 // TODO: Fill request struct fields.
167 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#BulkUploadFeedbackLabelsRequest.
168 }
169 op, err := c.BulkUploadFeedbackLabels(ctx, req)
170 if err != nil {
171 // TODO: Handle error.
172 }
173
174 resp, err := op.Wait(ctx)
175 if err != nil {
176 // TODO: Handle error.
177 }
178 // TODO: Use resp.
179 _ = resp
180 }
181
182 func ExampleClient_CalculateIssueModelStats() {
183 ctx := context.Background()
184 // This snippet has been automatically generated and should be regarded as a code template only.
185 // It will require modifications to work:
186 // - It may require correct/in-range values for request initialization.
187 // - It may require specifying regional endpoints when creating the service client as shown in:
188 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
189 c, err := contactcenterinsights.NewClient(ctx)
190 if err != nil {
191 // TODO: Handle error.
192 }
193 defer c.Close()
194
195 req := &contactcenterinsightspb.CalculateIssueModelStatsRequest{
196 // TODO: Fill request struct fields.
197 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CalculateIssueModelStatsRequest.
198 }
199 resp, err := c.CalculateIssueModelStats(ctx, req)
200 if err != nil {
201 // TODO: Handle error.
202 }
203 // TODO: Use resp.
204 _ = resp
205 }
206
207 func ExampleClient_CalculateStats() {
208 ctx := context.Background()
209 // This snippet has been automatically generated and should be regarded as a code template only.
210 // It will require modifications to work:
211 // - It may require correct/in-range values for request initialization.
212 // - It may require specifying regional endpoints when creating the service client as shown in:
213 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
214 c, err := contactcenterinsights.NewClient(ctx)
215 if err != nil {
216 // TODO: Handle error.
217 }
218 defer c.Close()
219
220 req := &contactcenterinsightspb.CalculateStatsRequest{
221 // TODO: Fill request struct fields.
222 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CalculateStatsRequest.
223 }
224 resp, err := c.CalculateStats(ctx, req)
225 if err != nil {
226 // TODO: Handle error.
227 }
228 // TODO: Use resp.
229 _ = resp
230 }
231
232 func ExampleClient_CreateAnalysis() {
233 ctx := context.Background()
234 // This snippet has been automatically generated and should be regarded as a code template only.
235 // It will require modifications to work:
236 // - It may require correct/in-range values for request initialization.
237 // - It may require specifying regional endpoints when creating the service client as shown in:
238 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
239 c, err := contactcenterinsights.NewClient(ctx)
240 if err != nil {
241 // TODO: Handle error.
242 }
243 defer c.Close()
244
245 req := &contactcenterinsightspb.CreateAnalysisRequest{
246 // TODO: Fill request struct fields.
247 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateAnalysisRequest.
248 }
249 op, err := c.CreateAnalysis(ctx, req)
250 if err != nil {
251 // TODO: Handle error.
252 }
253
254 resp, err := op.Wait(ctx)
255 if err != nil {
256 // TODO: Handle error.
257 }
258 // TODO: Use resp.
259 _ = resp
260 }
261
262 func ExampleClient_CreateAnalysisRule() {
263 ctx := context.Background()
264 // This snippet has been automatically generated and should be regarded as a code template only.
265 // It will require modifications to work:
266 // - It may require correct/in-range values for request initialization.
267 // - It may require specifying regional endpoints when creating the service client as shown in:
268 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
269 c, err := contactcenterinsights.NewClient(ctx)
270 if err != nil {
271 // TODO: Handle error.
272 }
273 defer c.Close()
274
275 req := &contactcenterinsightspb.CreateAnalysisRuleRequest{
276 // TODO: Fill request struct fields.
277 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateAnalysisRuleRequest.
278 }
279 resp, err := c.CreateAnalysisRule(ctx, req)
280 if err != nil {
281 // TODO: Handle error.
282 }
283 // TODO: Use resp.
284 _ = resp
285 }
286
287 func ExampleClient_CreateConversation() {
288 ctx := context.Background()
289 // This snippet has been automatically generated and should be regarded as a code template only.
290 // It will require modifications to work:
291 // - It may require correct/in-range values for request initialization.
292 // - It may require specifying regional endpoints when creating the service client as shown in:
293 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
294 c, err := contactcenterinsights.NewClient(ctx)
295 if err != nil {
296 // TODO: Handle error.
297 }
298 defer c.Close()
299
300 req := &contactcenterinsightspb.CreateConversationRequest{
301 // TODO: Fill request struct fields.
302 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateConversationRequest.
303 }
304 resp, err := c.CreateConversation(ctx, req)
305 if err != nil {
306 // TODO: Handle error.
307 }
308 // TODO: Use resp.
309 _ = resp
310 }
311
312 func ExampleClient_CreateFeedbackLabel() {
313 ctx := context.Background()
314 // This snippet has been automatically generated and should be regarded as a code template only.
315 // It will require modifications to work:
316 // - It may require correct/in-range values for request initialization.
317 // - It may require specifying regional endpoints when creating the service client as shown in:
318 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
319 c, err := contactcenterinsights.NewClient(ctx)
320 if err != nil {
321 // TODO: Handle error.
322 }
323 defer c.Close()
324
325 req := &contactcenterinsightspb.CreateFeedbackLabelRequest{
326 // TODO: Fill request struct fields.
327 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateFeedbackLabelRequest.
328 }
329 resp, err := c.CreateFeedbackLabel(ctx, req)
330 if err != nil {
331 // TODO: Handle error.
332 }
333 // TODO: Use resp.
334 _ = resp
335 }
336
337 func ExampleClient_CreateIssueModel() {
338 ctx := context.Background()
339 // This snippet has been automatically generated and should be regarded as a code template only.
340 // It will require modifications to work:
341 // - It may require correct/in-range values for request initialization.
342 // - It may require specifying regional endpoints when creating the service client as shown in:
343 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
344 c, err := contactcenterinsights.NewClient(ctx)
345 if err != nil {
346 // TODO: Handle error.
347 }
348 defer c.Close()
349
350 req := &contactcenterinsightspb.CreateIssueModelRequest{
351 // TODO: Fill request struct fields.
352 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateIssueModelRequest.
353 }
354 op, err := c.CreateIssueModel(ctx, req)
355 if err != nil {
356 // TODO: Handle error.
357 }
358
359 resp, err := op.Wait(ctx)
360 if err != nil {
361 // TODO: Handle error.
362 }
363 // TODO: Use resp.
364 _ = resp
365 }
366
367 func ExampleClient_CreatePhraseMatcher() {
368 ctx := context.Background()
369 // This snippet has been automatically generated and should be regarded as a code template only.
370 // It will require modifications to work:
371 // - It may require correct/in-range values for request initialization.
372 // - It may require specifying regional endpoints when creating the service client as shown in:
373 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
374 c, err := contactcenterinsights.NewClient(ctx)
375 if err != nil {
376 // TODO: Handle error.
377 }
378 defer c.Close()
379
380 req := &contactcenterinsightspb.CreatePhraseMatcherRequest{
381 // TODO: Fill request struct fields.
382 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreatePhraseMatcherRequest.
383 }
384 resp, err := c.CreatePhraseMatcher(ctx, req)
385 if err != nil {
386 // TODO: Handle error.
387 }
388 // TODO: Use resp.
389 _ = resp
390 }
391
392 func ExampleClient_CreateQaQuestion() {
393 ctx := context.Background()
394 // This snippet has been automatically generated and should be regarded as a code template only.
395 // It will require modifications to work:
396 // - It may require correct/in-range values for request initialization.
397 // - It may require specifying regional endpoints when creating the service client as shown in:
398 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
399 c, err := contactcenterinsights.NewClient(ctx)
400 if err != nil {
401 // TODO: Handle error.
402 }
403 defer c.Close()
404
405 req := &contactcenterinsightspb.CreateQaQuestionRequest{
406 // TODO: Fill request struct fields.
407 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateQaQuestionRequest.
408 }
409 resp, err := c.CreateQaQuestion(ctx, req)
410 if err != nil {
411 // TODO: Handle error.
412 }
413 // TODO: Use resp.
414 _ = resp
415 }
416
417 func ExampleClient_CreateQaScorecard() {
418 ctx := context.Background()
419 // This snippet has been automatically generated and should be regarded as a code template only.
420 // It will require modifications to work:
421 // - It may require correct/in-range values for request initialization.
422 // - It may require specifying regional endpoints when creating the service client as shown in:
423 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
424 c, err := contactcenterinsights.NewClient(ctx)
425 if err != nil {
426 // TODO: Handle error.
427 }
428 defer c.Close()
429
430 req := &contactcenterinsightspb.CreateQaScorecardRequest{
431 // TODO: Fill request struct fields.
432 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateQaScorecardRequest.
433 }
434 resp, err := c.CreateQaScorecard(ctx, req)
435 if err != nil {
436 // TODO: Handle error.
437 }
438 // TODO: Use resp.
439 _ = resp
440 }
441
442 func ExampleClient_CreateQaScorecardRevision() {
443 ctx := context.Background()
444 // This snippet has been automatically generated and should be regarded as a code template only.
445 // It will require modifications to work:
446 // - It may require correct/in-range values for request initialization.
447 // - It may require specifying regional endpoints when creating the service client as shown in:
448 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
449 c, err := contactcenterinsights.NewClient(ctx)
450 if err != nil {
451 // TODO: Handle error.
452 }
453 defer c.Close()
454
455 req := &contactcenterinsightspb.CreateQaScorecardRevisionRequest{
456 // TODO: Fill request struct fields.
457 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateQaScorecardRevisionRequest.
458 }
459 resp, err := c.CreateQaScorecardRevision(ctx, req)
460 if err != nil {
461 // TODO: Handle error.
462 }
463 // TODO: Use resp.
464 _ = resp
465 }
466
467 func ExampleClient_CreateView() {
468 ctx := context.Background()
469 // This snippet has been automatically generated and should be regarded as a code template only.
470 // It will require modifications to work:
471 // - It may require correct/in-range values for request initialization.
472 // - It may require specifying regional endpoints when creating the service client as shown in:
473 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
474 c, err := contactcenterinsights.NewClient(ctx)
475 if err != nil {
476 // TODO: Handle error.
477 }
478 defer c.Close()
479
480 req := &contactcenterinsightspb.CreateViewRequest{
481 // TODO: Fill request struct fields.
482 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#CreateViewRequest.
483 }
484 resp, err := c.CreateView(ctx, req)
485 if err != nil {
486 // TODO: Handle error.
487 }
488 // TODO: Use resp.
489 _ = resp
490 }
491
492 func ExampleClient_DeleteAnalysis() {
493 ctx := context.Background()
494 // This snippet has been automatically generated and should be regarded as a code template only.
495 // It will require modifications to work:
496 // - It may require correct/in-range values for request initialization.
497 // - It may require specifying regional endpoints when creating the service client as shown in:
498 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
499 c, err := contactcenterinsights.NewClient(ctx)
500 if err != nil {
501 // TODO: Handle error.
502 }
503 defer c.Close()
504
505 req := &contactcenterinsightspb.DeleteAnalysisRequest{
506 // TODO: Fill request struct fields.
507 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteAnalysisRequest.
508 }
509 err = c.DeleteAnalysis(ctx, req)
510 if err != nil {
511 // TODO: Handle error.
512 }
513 }
514
515 func ExampleClient_DeleteAnalysisRule() {
516 ctx := context.Background()
517 // This snippet has been automatically generated and should be regarded as a code template only.
518 // It will require modifications to work:
519 // - It may require correct/in-range values for request initialization.
520 // - It may require specifying regional endpoints when creating the service client as shown in:
521 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
522 c, err := contactcenterinsights.NewClient(ctx)
523 if err != nil {
524 // TODO: Handle error.
525 }
526 defer c.Close()
527
528 req := &contactcenterinsightspb.DeleteAnalysisRuleRequest{
529 // TODO: Fill request struct fields.
530 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteAnalysisRuleRequest.
531 }
532 err = c.DeleteAnalysisRule(ctx, req)
533 if err != nil {
534 // TODO: Handle error.
535 }
536 }
537
538 func ExampleClient_DeleteConversation() {
539 ctx := context.Background()
540 // This snippet has been automatically generated and should be regarded as a code template only.
541 // It will require modifications to work:
542 // - It may require correct/in-range values for request initialization.
543 // - It may require specifying regional endpoints when creating the service client as shown in:
544 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
545 c, err := contactcenterinsights.NewClient(ctx)
546 if err != nil {
547 // TODO: Handle error.
548 }
549 defer c.Close()
550
551 req := &contactcenterinsightspb.DeleteConversationRequest{
552 // TODO: Fill request struct fields.
553 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteConversationRequest.
554 }
555 err = c.DeleteConversation(ctx, req)
556 if err != nil {
557 // TODO: Handle error.
558 }
559 }
560
561 func ExampleClient_DeleteFeedbackLabel() {
562 ctx := context.Background()
563 // This snippet has been automatically generated and should be regarded as a code template only.
564 // It will require modifications to work:
565 // - It may require correct/in-range values for request initialization.
566 // - It may require specifying regional endpoints when creating the service client as shown in:
567 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
568 c, err := contactcenterinsights.NewClient(ctx)
569 if err != nil {
570 // TODO: Handle error.
571 }
572 defer c.Close()
573
574 req := &contactcenterinsightspb.DeleteFeedbackLabelRequest{
575 // TODO: Fill request struct fields.
576 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteFeedbackLabelRequest.
577 }
578 err = c.DeleteFeedbackLabel(ctx, req)
579 if err != nil {
580 // TODO: Handle error.
581 }
582 }
583
584 func ExampleClient_DeleteIssue() {
585 ctx := context.Background()
586 // This snippet has been automatically generated and should be regarded as a code template only.
587 // It will require modifications to work:
588 // - It may require correct/in-range values for request initialization.
589 // - It may require specifying regional endpoints when creating the service client as shown in:
590 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
591 c, err := contactcenterinsights.NewClient(ctx)
592 if err != nil {
593 // TODO: Handle error.
594 }
595 defer c.Close()
596
597 req := &contactcenterinsightspb.DeleteIssueRequest{
598 // TODO: Fill request struct fields.
599 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteIssueRequest.
600 }
601 err = c.DeleteIssue(ctx, req)
602 if err != nil {
603 // TODO: Handle error.
604 }
605 }
606
607 func ExampleClient_DeleteIssueModel() {
608 ctx := context.Background()
609 // This snippet has been automatically generated and should be regarded as a code template only.
610 // It will require modifications to work:
611 // - It may require correct/in-range values for request initialization.
612 // - It may require specifying regional endpoints when creating the service client as shown in:
613 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
614 c, err := contactcenterinsights.NewClient(ctx)
615 if err != nil {
616 // TODO: Handle error.
617 }
618 defer c.Close()
619
620 req := &contactcenterinsightspb.DeleteIssueModelRequest{
621 // TODO: Fill request struct fields.
622 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteIssueModelRequest.
623 }
624 op, err := c.DeleteIssueModel(ctx, req)
625 if err != nil {
626 // TODO: Handle error.
627 }
628
629 err = op.Wait(ctx)
630 if err != nil {
631 // TODO: Handle error.
632 }
633 }
634
635 func ExampleClient_DeletePhraseMatcher() {
636 ctx := context.Background()
637 // This snippet has been automatically generated and should be regarded as a code template only.
638 // It will require modifications to work:
639 // - It may require correct/in-range values for request initialization.
640 // - It may require specifying regional endpoints when creating the service client as shown in:
641 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
642 c, err := contactcenterinsights.NewClient(ctx)
643 if err != nil {
644 // TODO: Handle error.
645 }
646 defer c.Close()
647
648 req := &contactcenterinsightspb.DeletePhraseMatcherRequest{
649 // TODO: Fill request struct fields.
650 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeletePhraseMatcherRequest.
651 }
652 err = c.DeletePhraseMatcher(ctx, req)
653 if err != nil {
654 // TODO: Handle error.
655 }
656 }
657
658 func ExampleClient_DeleteQaQuestion() {
659 ctx := context.Background()
660 // This snippet has been automatically generated and should be regarded as a code template only.
661 // It will require modifications to work:
662 // - It may require correct/in-range values for request initialization.
663 // - It may require specifying regional endpoints when creating the service client as shown in:
664 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
665 c, err := contactcenterinsights.NewClient(ctx)
666 if err != nil {
667 // TODO: Handle error.
668 }
669 defer c.Close()
670
671 req := &contactcenterinsightspb.DeleteQaQuestionRequest{
672 // TODO: Fill request struct fields.
673 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteQaQuestionRequest.
674 }
675 err = c.DeleteQaQuestion(ctx, req)
676 if err != nil {
677 // TODO: Handle error.
678 }
679 }
680
681 func ExampleClient_DeleteQaScorecard() {
682 ctx := context.Background()
683 // This snippet has been automatically generated and should be regarded as a code template only.
684 // It will require modifications to work:
685 // - It may require correct/in-range values for request initialization.
686 // - It may require specifying regional endpoints when creating the service client as shown in:
687 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
688 c, err := contactcenterinsights.NewClient(ctx)
689 if err != nil {
690 // TODO: Handle error.
691 }
692 defer c.Close()
693
694 req := &contactcenterinsightspb.DeleteQaScorecardRequest{
695 // TODO: Fill request struct fields.
696 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteQaScorecardRequest.
697 }
698 err = c.DeleteQaScorecard(ctx, req)
699 if err != nil {
700 // TODO: Handle error.
701 }
702 }
703
704 func ExampleClient_DeleteQaScorecardRevision() {
705 ctx := context.Background()
706 // This snippet has been automatically generated and should be regarded as a code template only.
707 // It will require modifications to work:
708 // - It may require correct/in-range values for request initialization.
709 // - It may require specifying regional endpoints when creating the service client as shown in:
710 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
711 c, err := contactcenterinsights.NewClient(ctx)
712 if err != nil {
713 // TODO: Handle error.
714 }
715 defer c.Close()
716
717 req := &contactcenterinsightspb.DeleteQaScorecardRevisionRequest{
718 // TODO: Fill request struct fields.
719 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteQaScorecardRevisionRequest.
720 }
721 err = c.DeleteQaScorecardRevision(ctx, req)
722 if err != nil {
723 // TODO: Handle error.
724 }
725 }
726
727 func ExampleClient_DeleteView() {
728 ctx := context.Background()
729 // This snippet has been automatically generated and should be regarded as a code template only.
730 // It will require modifications to work:
731 // - It may require correct/in-range values for request initialization.
732 // - It may require specifying regional endpoints when creating the service client as shown in:
733 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
734 c, err := contactcenterinsights.NewClient(ctx)
735 if err != nil {
736 // TODO: Handle error.
737 }
738 defer c.Close()
739
740 req := &contactcenterinsightspb.DeleteViewRequest{
741 // TODO: Fill request struct fields.
742 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeleteViewRequest.
743 }
744 err = c.DeleteView(ctx, req)
745 if err != nil {
746 // TODO: Handle error.
747 }
748 }
749
750 func ExampleClient_DeployIssueModel() {
751 ctx := context.Background()
752 // This snippet has been automatically generated and should be regarded as a code template only.
753 // It will require modifications to work:
754 // - It may require correct/in-range values for request initialization.
755 // - It may require specifying regional endpoints when creating the service client as shown in:
756 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
757 c, err := contactcenterinsights.NewClient(ctx)
758 if err != nil {
759 // TODO: Handle error.
760 }
761 defer c.Close()
762
763 req := &contactcenterinsightspb.DeployIssueModelRequest{
764 // TODO: Fill request struct fields.
765 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeployIssueModelRequest.
766 }
767 op, err := c.DeployIssueModel(ctx, req)
768 if err != nil {
769 // TODO: Handle error.
770 }
771
772 resp, err := op.Wait(ctx)
773 if err != nil {
774 // TODO: Handle error.
775 }
776 // TODO: Use resp.
777 _ = resp
778 }
779
780 func ExampleClient_DeployQaScorecardRevision() {
781 ctx := context.Background()
782 // This snippet has been automatically generated and should be regarded as a code template only.
783 // It will require modifications to work:
784 // - It may require correct/in-range values for request initialization.
785 // - It may require specifying regional endpoints when creating the service client as shown in:
786 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
787 c, err := contactcenterinsights.NewClient(ctx)
788 if err != nil {
789 // TODO: Handle error.
790 }
791 defer c.Close()
792
793 req := &contactcenterinsightspb.DeployQaScorecardRevisionRequest{
794 // TODO: Fill request struct fields.
795 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#DeployQaScorecardRevisionRequest.
796 }
797 resp, err := c.DeployQaScorecardRevision(ctx, req)
798 if err != nil {
799 // TODO: Handle error.
800 }
801 // TODO: Use resp.
802 _ = resp
803 }
804
805 func ExampleClient_ExportInsightsData() {
806 ctx := context.Background()
807 // This snippet has been automatically generated and should be regarded as a code template only.
808 // It will require modifications to work:
809 // - It may require correct/in-range values for request initialization.
810 // - It may require specifying regional endpoints when creating the service client as shown in:
811 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
812 c, err := contactcenterinsights.NewClient(ctx)
813 if err != nil {
814 // TODO: Handle error.
815 }
816 defer c.Close()
817
818 req := &contactcenterinsightspb.ExportInsightsDataRequest{
819 // TODO: Fill request struct fields.
820 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ExportInsightsDataRequest.
821 }
822 op, err := c.ExportInsightsData(ctx, req)
823 if err != nil {
824 // TODO: Handle error.
825 }
826
827 resp, err := op.Wait(ctx)
828 if err != nil {
829 // TODO: Handle error.
830 }
831 // TODO: Use resp.
832 _ = resp
833 }
834
835 func ExampleClient_ExportIssueModel() {
836 ctx := context.Background()
837 // This snippet has been automatically generated and should be regarded as a code template only.
838 // It will require modifications to work:
839 // - It may require correct/in-range values for request initialization.
840 // - It may require specifying regional endpoints when creating the service client as shown in:
841 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
842 c, err := contactcenterinsights.NewClient(ctx)
843 if err != nil {
844 // TODO: Handle error.
845 }
846 defer c.Close()
847
848 req := &contactcenterinsightspb.ExportIssueModelRequest{
849 // TODO: Fill request struct fields.
850 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ExportIssueModelRequest.
851 }
852 op, err := c.ExportIssueModel(ctx, req)
853 if err != nil {
854 // TODO: Handle error.
855 }
856
857 resp, err := op.Wait(ctx)
858 if err != nil {
859 // TODO: Handle error.
860 }
861 // TODO: Use resp.
862 _ = resp
863 }
864
865 func ExampleClient_GetAnalysis() {
866 ctx := context.Background()
867 // This snippet has been automatically generated and should be regarded as a code template only.
868 // It will require modifications to work:
869 // - It may require correct/in-range values for request initialization.
870 // - It may require specifying regional endpoints when creating the service client as shown in:
871 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
872 c, err := contactcenterinsights.NewClient(ctx)
873 if err != nil {
874 // TODO: Handle error.
875 }
876 defer c.Close()
877
878 req := &contactcenterinsightspb.GetAnalysisRequest{
879 // TODO: Fill request struct fields.
880 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetAnalysisRequest.
881 }
882 resp, err := c.GetAnalysis(ctx, req)
883 if err != nil {
884 // TODO: Handle error.
885 }
886 // TODO: Use resp.
887 _ = resp
888 }
889
890 func ExampleClient_GetAnalysisRule() {
891 ctx := context.Background()
892 // This snippet has been automatically generated and should be regarded as a code template only.
893 // It will require modifications to work:
894 // - It may require correct/in-range values for request initialization.
895 // - It may require specifying regional endpoints when creating the service client as shown in:
896 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
897 c, err := contactcenterinsights.NewClient(ctx)
898 if err != nil {
899 // TODO: Handle error.
900 }
901 defer c.Close()
902
903 req := &contactcenterinsightspb.GetAnalysisRuleRequest{
904 // TODO: Fill request struct fields.
905 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetAnalysisRuleRequest.
906 }
907 resp, err := c.GetAnalysisRule(ctx, req)
908 if err != nil {
909 // TODO: Handle error.
910 }
911 // TODO: Use resp.
912 _ = resp
913 }
914
915 func ExampleClient_GetConversation() {
916 ctx := context.Background()
917 // This snippet has been automatically generated and should be regarded as a code template only.
918 // It will require modifications to work:
919 // - It may require correct/in-range values for request initialization.
920 // - It may require specifying regional endpoints when creating the service client as shown in:
921 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
922 c, err := contactcenterinsights.NewClient(ctx)
923 if err != nil {
924 // TODO: Handle error.
925 }
926 defer c.Close()
927
928 req := &contactcenterinsightspb.GetConversationRequest{
929 // TODO: Fill request struct fields.
930 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetConversationRequest.
931 }
932 resp, err := c.GetConversation(ctx, req)
933 if err != nil {
934 // TODO: Handle error.
935 }
936 // TODO: Use resp.
937 _ = resp
938 }
939
940 func ExampleClient_GetEncryptionSpec() {
941 ctx := context.Background()
942 // This snippet has been automatically generated and should be regarded as a code template only.
943 // It will require modifications to work:
944 // - It may require correct/in-range values for request initialization.
945 // - It may require specifying regional endpoints when creating the service client as shown in:
946 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
947 c, err := contactcenterinsights.NewClient(ctx)
948 if err != nil {
949 // TODO: Handle error.
950 }
951 defer c.Close()
952
953 req := &contactcenterinsightspb.GetEncryptionSpecRequest{
954 // TODO: Fill request struct fields.
955 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetEncryptionSpecRequest.
956 }
957 resp, err := c.GetEncryptionSpec(ctx, req)
958 if err != nil {
959 // TODO: Handle error.
960 }
961 // TODO: Use resp.
962 _ = resp
963 }
964
965 func ExampleClient_GetFeedbackLabel() {
966 ctx := context.Background()
967 // This snippet has been automatically generated and should be regarded as a code template only.
968 // It will require modifications to work:
969 // - It may require correct/in-range values for request initialization.
970 // - It may require specifying regional endpoints when creating the service client as shown in:
971 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
972 c, err := contactcenterinsights.NewClient(ctx)
973 if err != nil {
974 // TODO: Handle error.
975 }
976 defer c.Close()
977
978 req := &contactcenterinsightspb.GetFeedbackLabelRequest{
979 // TODO: Fill request struct fields.
980 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetFeedbackLabelRequest.
981 }
982 resp, err := c.GetFeedbackLabel(ctx, req)
983 if err != nil {
984 // TODO: Handle error.
985 }
986 // TODO: Use resp.
987 _ = resp
988 }
989
990 func ExampleClient_GetIssue() {
991 ctx := context.Background()
992 // This snippet has been automatically generated and should be regarded as a code template only.
993 // It will require modifications to work:
994 // - It may require correct/in-range values for request initialization.
995 // - It may require specifying regional endpoints when creating the service client as shown in:
996 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
997 c, err := contactcenterinsights.NewClient(ctx)
998 if err != nil {
999 // TODO: Handle error.
1000 }
1001 defer c.Close()
1002
1003 req := &contactcenterinsightspb.GetIssueRequest{
1004 // TODO: Fill request struct fields.
1005 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetIssueRequest.
1006 }
1007 resp, err := c.GetIssue(ctx, req)
1008 if err != nil {
1009 // TODO: Handle error.
1010 }
1011 // TODO: Use resp.
1012 _ = resp
1013 }
1014
1015 func ExampleClient_GetIssueModel() {
1016 ctx := context.Background()
1017 // This snippet has been automatically generated and should be regarded as a code template only.
1018 // It will require modifications to work:
1019 // - It may require correct/in-range values for request initialization.
1020 // - It may require specifying regional endpoints when creating the service client as shown in:
1021 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1022 c, err := contactcenterinsights.NewClient(ctx)
1023 if err != nil {
1024 // TODO: Handle error.
1025 }
1026 defer c.Close()
1027
1028 req := &contactcenterinsightspb.GetIssueModelRequest{
1029 // TODO: Fill request struct fields.
1030 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetIssueModelRequest.
1031 }
1032 resp, err := c.GetIssueModel(ctx, req)
1033 if err != nil {
1034 // TODO: Handle error.
1035 }
1036 // TODO: Use resp.
1037 _ = resp
1038 }
1039
1040 func ExampleClient_GetPhraseMatcher() {
1041 ctx := context.Background()
1042 // This snippet has been automatically generated and should be regarded as a code template only.
1043 // It will require modifications to work:
1044 // - It may require correct/in-range values for request initialization.
1045 // - It may require specifying regional endpoints when creating the service client as shown in:
1046 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1047 c, err := contactcenterinsights.NewClient(ctx)
1048 if err != nil {
1049 // TODO: Handle error.
1050 }
1051 defer c.Close()
1052
1053 req := &contactcenterinsightspb.GetPhraseMatcherRequest{
1054 // TODO: Fill request struct fields.
1055 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetPhraseMatcherRequest.
1056 }
1057 resp, err := c.GetPhraseMatcher(ctx, req)
1058 if err != nil {
1059 // TODO: Handle error.
1060 }
1061 // TODO: Use resp.
1062 _ = resp
1063 }
1064
1065 func ExampleClient_GetQaQuestion() {
1066 ctx := context.Background()
1067 // This snippet has been automatically generated and should be regarded as a code template only.
1068 // It will require modifications to work:
1069 // - It may require correct/in-range values for request initialization.
1070 // - It may require specifying regional endpoints when creating the service client as shown in:
1071 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1072 c, err := contactcenterinsights.NewClient(ctx)
1073 if err != nil {
1074 // TODO: Handle error.
1075 }
1076 defer c.Close()
1077
1078 req := &contactcenterinsightspb.GetQaQuestionRequest{
1079 // TODO: Fill request struct fields.
1080 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetQaQuestionRequest.
1081 }
1082 resp, err := c.GetQaQuestion(ctx, req)
1083 if err != nil {
1084 // TODO: Handle error.
1085 }
1086 // TODO: Use resp.
1087 _ = resp
1088 }
1089
1090 func ExampleClient_GetQaScorecard() {
1091 ctx := context.Background()
1092 // This snippet has been automatically generated and should be regarded as a code template only.
1093 // It will require modifications to work:
1094 // - It may require correct/in-range values for request initialization.
1095 // - It may require specifying regional endpoints when creating the service client as shown in:
1096 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1097 c, err := contactcenterinsights.NewClient(ctx)
1098 if err != nil {
1099 // TODO: Handle error.
1100 }
1101 defer c.Close()
1102
1103 req := &contactcenterinsightspb.GetQaScorecardRequest{
1104 // TODO: Fill request struct fields.
1105 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetQaScorecardRequest.
1106 }
1107 resp, err := c.GetQaScorecard(ctx, req)
1108 if err != nil {
1109 // TODO: Handle error.
1110 }
1111 // TODO: Use resp.
1112 _ = resp
1113 }
1114
1115 func ExampleClient_GetQaScorecardRevision() {
1116 ctx := context.Background()
1117 // This snippet has been automatically generated and should be regarded as a code template only.
1118 // It will require modifications to work:
1119 // - It may require correct/in-range values for request initialization.
1120 // - It may require specifying regional endpoints when creating the service client as shown in:
1121 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1122 c, err := contactcenterinsights.NewClient(ctx)
1123 if err != nil {
1124 // TODO: Handle error.
1125 }
1126 defer c.Close()
1127
1128 req := &contactcenterinsightspb.GetQaScorecardRevisionRequest{
1129 // TODO: Fill request struct fields.
1130 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetQaScorecardRevisionRequest.
1131 }
1132 resp, err := c.GetQaScorecardRevision(ctx, req)
1133 if err != nil {
1134 // TODO: Handle error.
1135 }
1136 // TODO: Use resp.
1137 _ = resp
1138 }
1139
1140 func ExampleClient_GetSettings() {
1141 ctx := context.Background()
1142 // This snippet has been automatically generated and should be regarded as a code template only.
1143 // It will require modifications to work:
1144 // - It may require correct/in-range values for request initialization.
1145 // - It may require specifying regional endpoints when creating the service client as shown in:
1146 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1147 c, err := contactcenterinsights.NewClient(ctx)
1148 if err != nil {
1149 // TODO: Handle error.
1150 }
1151 defer c.Close()
1152
1153 req := &contactcenterinsightspb.GetSettingsRequest{
1154 // TODO: Fill request struct fields.
1155 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetSettingsRequest.
1156 }
1157 resp, err := c.GetSettings(ctx, req)
1158 if err != nil {
1159 // TODO: Handle error.
1160 }
1161 // TODO: Use resp.
1162 _ = resp
1163 }
1164
1165 func ExampleClient_GetView() {
1166 ctx := context.Background()
1167 // This snippet has been automatically generated and should be regarded as a code template only.
1168 // It will require modifications to work:
1169 // - It may require correct/in-range values for request initialization.
1170 // - It may require specifying regional endpoints when creating the service client as shown in:
1171 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1172 c, err := contactcenterinsights.NewClient(ctx)
1173 if err != nil {
1174 // TODO: Handle error.
1175 }
1176 defer c.Close()
1177
1178 req := &contactcenterinsightspb.GetViewRequest{
1179 // TODO: Fill request struct fields.
1180 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#GetViewRequest.
1181 }
1182 resp, err := c.GetView(ctx, req)
1183 if err != nil {
1184 // TODO: Handle error.
1185 }
1186 // TODO: Use resp.
1187 _ = resp
1188 }
1189
1190 func ExampleClient_ImportIssueModel() {
1191 ctx := context.Background()
1192 // This snippet has been automatically generated and should be regarded as a code template only.
1193 // It will require modifications to work:
1194 // - It may require correct/in-range values for request initialization.
1195 // - It may require specifying regional endpoints when creating the service client as shown in:
1196 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1197 c, err := contactcenterinsights.NewClient(ctx)
1198 if err != nil {
1199 // TODO: Handle error.
1200 }
1201 defer c.Close()
1202
1203 req := &contactcenterinsightspb.ImportIssueModelRequest{
1204 // TODO: Fill request struct fields.
1205 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ImportIssueModelRequest.
1206 }
1207 op, err := c.ImportIssueModel(ctx, req)
1208 if err != nil {
1209 // TODO: Handle error.
1210 }
1211
1212 resp, err := op.Wait(ctx)
1213 if err != nil {
1214 // TODO: Handle error.
1215 }
1216 // TODO: Use resp.
1217 _ = resp
1218 }
1219
1220 func ExampleClient_IngestConversations() {
1221 ctx := context.Background()
1222 // This snippet has been automatically generated and should be regarded as a code template only.
1223 // It will require modifications to work:
1224 // - It may require correct/in-range values for request initialization.
1225 // - It may require specifying regional endpoints when creating the service client as shown in:
1226 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1227 c, err := contactcenterinsights.NewClient(ctx)
1228 if err != nil {
1229 // TODO: Handle error.
1230 }
1231 defer c.Close()
1232
1233 req := &contactcenterinsightspb.IngestConversationsRequest{
1234 // TODO: Fill request struct fields.
1235 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#IngestConversationsRequest.
1236 }
1237 op, err := c.IngestConversations(ctx, req)
1238 if err != nil {
1239 // TODO: Handle error.
1240 }
1241
1242 resp, err := op.Wait(ctx)
1243 if err != nil {
1244 // TODO: Handle error.
1245 }
1246 // TODO: Use resp.
1247 _ = resp
1248 }
1249
1250 func ExampleClient_InitializeEncryptionSpec() {
1251 ctx := context.Background()
1252 // This snippet has been automatically generated and should be regarded as a code template only.
1253 // It will require modifications to work:
1254 // - It may require correct/in-range values for request initialization.
1255 // - It may require specifying regional endpoints when creating the service client as shown in:
1256 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1257 c, err := contactcenterinsights.NewClient(ctx)
1258 if err != nil {
1259 // TODO: Handle error.
1260 }
1261 defer c.Close()
1262
1263 req := &contactcenterinsightspb.InitializeEncryptionSpecRequest{
1264 // TODO: Fill request struct fields.
1265 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#InitializeEncryptionSpecRequest.
1266 }
1267 op, err := c.InitializeEncryptionSpec(ctx, req)
1268 if err != nil {
1269 // TODO: Handle error.
1270 }
1271
1272 resp, err := op.Wait(ctx)
1273 if err != nil {
1274 // TODO: Handle error.
1275 }
1276 // TODO: Use resp.
1277 _ = resp
1278 }
1279
1280 func ExampleClient_ListAllFeedbackLabels() {
1281 ctx := context.Background()
1282 // This snippet has been automatically generated and should be regarded as a code template only.
1283 // It will require modifications to work:
1284 // - It may require correct/in-range values for request initialization.
1285 // - It may require specifying regional endpoints when creating the service client as shown in:
1286 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1287 c, err := contactcenterinsights.NewClient(ctx)
1288 if err != nil {
1289 // TODO: Handle error.
1290 }
1291 defer c.Close()
1292
1293 req := &contactcenterinsightspb.ListAllFeedbackLabelsRequest{
1294 // TODO: Fill request struct fields.
1295 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListAllFeedbackLabelsRequest.
1296 }
1297 it := c.ListAllFeedbackLabels(ctx, req)
1298 for {
1299 resp, err := it.Next()
1300 if err == iterator.Done {
1301 break
1302 }
1303 if err != nil {
1304 // TODO: Handle error.
1305 }
1306 // TODO: Use resp.
1307 _ = resp
1308
1309 // If you need to access the underlying RPC response,
1310 // you can do so by casting the `Response` as below.
1311 // Otherwise, remove this line. Only populated after
1312 // first call to Next(). Not safe for concurrent access.
1313 _ = it.Response.(*contactcenterinsightspb.ListAllFeedbackLabelsResponse)
1314 }
1315 }
1316
1317 func ExampleClient_ListAnalyses() {
1318 ctx := context.Background()
1319 // This snippet has been automatically generated and should be regarded as a code template only.
1320 // It will require modifications to work:
1321 // - It may require correct/in-range values for request initialization.
1322 // - It may require specifying regional endpoints when creating the service client as shown in:
1323 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1324 c, err := contactcenterinsights.NewClient(ctx)
1325 if err != nil {
1326 // TODO: Handle error.
1327 }
1328 defer c.Close()
1329
1330 req := &contactcenterinsightspb.ListAnalysesRequest{
1331 // TODO: Fill request struct fields.
1332 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListAnalysesRequest.
1333 }
1334 it := c.ListAnalyses(ctx, req)
1335 for {
1336 resp, err := it.Next()
1337 if err == iterator.Done {
1338 break
1339 }
1340 if err != nil {
1341 // TODO: Handle error.
1342 }
1343 // TODO: Use resp.
1344 _ = resp
1345
1346 // If you need to access the underlying RPC response,
1347 // you can do so by casting the `Response` as below.
1348 // Otherwise, remove this line. Only populated after
1349 // first call to Next(). Not safe for concurrent access.
1350 _ = it.Response.(*contactcenterinsightspb.ListAnalysesResponse)
1351 }
1352 }
1353
1354 func ExampleClient_ListAnalysisRules() {
1355 ctx := context.Background()
1356 // This snippet has been automatically generated and should be regarded as a code template only.
1357 // It will require modifications to work:
1358 // - It may require correct/in-range values for request initialization.
1359 // - It may require specifying regional endpoints when creating the service client as shown in:
1360 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1361 c, err := contactcenterinsights.NewClient(ctx)
1362 if err != nil {
1363 // TODO: Handle error.
1364 }
1365 defer c.Close()
1366
1367 req := &contactcenterinsightspb.ListAnalysisRulesRequest{
1368 // TODO: Fill request struct fields.
1369 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListAnalysisRulesRequest.
1370 }
1371 it := c.ListAnalysisRules(ctx, req)
1372 for {
1373 resp, err := it.Next()
1374 if err == iterator.Done {
1375 break
1376 }
1377 if err != nil {
1378 // TODO: Handle error.
1379 }
1380 // TODO: Use resp.
1381 _ = resp
1382
1383 // If you need to access the underlying RPC response,
1384 // you can do so by casting the `Response` as below.
1385 // Otherwise, remove this line. Only populated after
1386 // first call to Next(). Not safe for concurrent access.
1387 _ = it.Response.(*contactcenterinsightspb.ListAnalysisRulesResponse)
1388 }
1389 }
1390
1391 func ExampleClient_ListConversations() {
1392 ctx := context.Background()
1393 // This snippet has been automatically generated and should be regarded as a code template only.
1394 // It will require modifications to work:
1395 // - It may require correct/in-range values for request initialization.
1396 // - It may require specifying regional endpoints when creating the service client as shown in:
1397 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1398 c, err := contactcenterinsights.NewClient(ctx)
1399 if err != nil {
1400 // TODO: Handle error.
1401 }
1402 defer c.Close()
1403
1404 req := &contactcenterinsightspb.ListConversationsRequest{
1405 // TODO: Fill request struct fields.
1406 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListConversationsRequest.
1407 }
1408 it := c.ListConversations(ctx, req)
1409 for {
1410 resp, err := it.Next()
1411 if err == iterator.Done {
1412 break
1413 }
1414 if err != nil {
1415 // TODO: Handle error.
1416 }
1417 // TODO: Use resp.
1418 _ = resp
1419
1420 // If you need to access the underlying RPC response,
1421 // you can do so by casting the `Response` as below.
1422 // Otherwise, remove this line. Only populated after
1423 // first call to Next(). Not safe for concurrent access.
1424 _ = it.Response.(*contactcenterinsightspb.ListConversationsResponse)
1425 }
1426 }
1427
1428 func ExampleClient_ListFeedbackLabels() {
1429 ctx := context.Background()
1430 // This snippet has been automatically generated and should be regarded as a code template only.
1431 // It will require modifications to work:
1432 // - It may require correct/in-range values for request initialization.
1433 // - It may require specifying regional endpoints when creating the service client as shown in:
1434 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1435 c, err := contactcenterinsights.NewClient(ctx)
1436 if err != nil {
1437 // TODO: Handle error.
1438 }
1439 defer c.Close()
1440
1441 req := &contactcenterinsightspb.ListFeedbackLabelsRequest{
1442 // TODO: Fill request struct fields.
1443 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListFeedbackLabelsRequest.
1444 }
1445 it := c.ListFeedbackLabels(ctx, req)
1446 for {
1447 resp, err := it.Next()
1448 if err == iterator.Done {
1449 break
1450 }
1451 if err != nil {
1452 // TODO: Handle error.
1453 }
1454 // TODO: Use resp.
1455 _ = resp
1456
1457 // If you need to access the underlying RPC response,
1458 // you can do so by casting the `Response` as below.
1459 // Otherwise, remove this line. Only populated after
1460 // first call to Next(). Not safe for concurrent access.
1461 _ = it.Response.(*contactcenterinsightspb.ListFeedbackLabelsResponse)
1462 }
1463 }
1464
1465 func ExampleClient_ListIssueModels() {
1466 ctx := context.Background()
1467 // This snippet has been automatically generated and should be regarded as a code template only.
1468 // It will require modifications to work:
1469 // - It may require correct/in-range values for request initialization.
1470 // - It may require specifying regional endpoints when creating the service client as shown in:
1471 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1472 c, err := contactcenterinsights.NewClient(ctx)
1473 if err != nil {
1474 // TODO: Handle error.
1475 }
1476 defer c.Close()
1477
1478 req := &contactcenterinsightspb.ListIssueModelsRequest{
1479 // TODO: Fill request struct fields.
1480 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListIssueModelsRequest.
1481 }
1482 resp, err := c.ListIssueModels(ctx, req)
1483 if err != nil {
1484 // TODO: Handle error.
1485 }
1486 // TODO: Use resp.
1487 _ = resp
1488 }
1489
1490 func ExampleClient_ListIssues() {
1491 ctx := context.Background()
1492 // This snippet has been automatically generated and should be regarded as a code template only.
1493 // It will require modifications to work:
1494 // - It may require correct/in-range values for request initialization.
1495 // - It may require specifying regional endpoints when creating the service client as shown in:
1496 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1497 c, err := contactcenterinsights.NewClient(ctx)
1498 if err != nil {
1499 // TODO: Handle error.
1500 }
1501 defer c.Close()
1502
1503 req := &contactcenterinsightspb.ListIssuesRequest{
1504 // TODO: Fill request struct fields.
1505 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListIssuesRequest.
1506 }
1507 resp, err := c.ListIssues(ctx, req)
1508 if err != nil {
1509 // TODO: Handle error.
1510 }
1511 // TODO: Use resp.
1512 _ = resp
1513 }
1514
1515 func ExampleClient_ListPhraseMatchers() {
1516 ctx := context.Background()
1517 // This snippet has been automatically generated and should be regarded as a code template only.
1518 // It will require modifications to work:
1519 // - It may require correct/in-range values for request initialization.
1520 // - It may require specifying regional endpoints when creating the service client as shown in:
1521 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1522 c, err := contactcenterinsights.NewClient(ctx)
1523 if err != nil {
1524 // TODO: Handle error.
1525 }
1526 defer c.Close()
1527
1528 req := &contactcenterinsightspb.ListPhraseMatchersRequest{
1529 // TODO: Fill request struct fields.
1530 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListPhraseMatchersRequest.
1531 }
1532 it := c.ListPhraseMatchers(ctx, req)
1533 for {
1534 resp, err := it.Next()
1535 if err == iterator.Done {
1536 break
1537 }
1538 if err != nil {
1539 // TODO: Handle error.
1540 }
1541 // TODO: Use resp.
1542 _ = resp
1543
1544 // If you need to access the underlying RPC response,
1545 // you can do so by casting the `Response` as below.
1546 // Otherwise, remove this line. Only populated after
1547 // first call to Next(). Not safe for concurrent access.
1548 _ = it.Response.(*contactcenterinsightspb.ListPhraseMatchersResponse)
1549 }
1550 }
1551
1552 func ExampleClient_ListQaQuestions() {
1553 ctx := context.Background()
1554 // This snippet has been automatically generated and should be regarded as a code template only.
1555 // It will require modifications to work:
1556 // - It may require correct/in-range values for request initialization.
1557 // - It may require specifying regional endpoints when creating the service client as shown in:
1558 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1559 c, err := contactcenterinsights.NewClient(ctx)
1560 if err != nil {
1561 // TODO: Handle error.
1562 }
1563 defer c.Close()
1564
1565 req := &contactcenterinsightspb.ListQaQuestionsRequest{
1566 // TODO: Fill request struct fields.
1567 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListQaQuestionsRequest.
1568 }
1569 it := c.ListQaQuestions(ctx, req)
1570 for {
1571 resp, err := it.Next()
1572 if err == iterator.Done {
1573 break
1574 }
1575 if err != nil {
1576 // TODO: Handle error.
1577 }
1578 // TODO: Use resp.
1579 _ = resp
1580
1581 // If you need to access the underlying RPC response,
1582 // you can do so by casting the `Response` as below.
1583 // Otherwise, remove this line. Only populated after
1584 // first call to Next(). Not safe for concurrent access.
1585 _ = it.Response.(*contactcenterinsightspb.ListQaQuestionsResponse)
1586 }
1587 }
1588
1589 func ExampleClient_ListQaScorecardRevisions() {
1590 ctx := context.Background()
1591 // This snippet has been automatically generated and should be regarded as a code template only.
1592 // It will require modifications to work:
1593 // - It may require correct/in-range values for request initialization.
1594 // - It may require specifying regional endpoints when creating the service client as shown in:
1595 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1596 c, err := contactcenterinsights.NewClient(ctx)
1597 if err != nil {
1598 // TODO: Handle error.
1599 }
1600 defer c.Close()
1601
1602 req := &contactcenterinsightspb.ListQaScorecardRevisionsRequest{
1603 // TODO: Fill request struct fields.
1604 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListQaScorecardRevisionsRequest.
1605 }
1606 it := c.ListQaScorecardRevisions(ctx, req)
1607 for {
1608 resp, err := it.Next()
1609 if err == iterator.Done {
1610 break
1611 }
1612 if err != nil {
1613 // TODO: Handle error.
1614 }
1615 // TODO: Use resp.
1616 _ = resp
1617
1618 // If you need to access the underlying RPC response,
1619 // you can do so by casting the `Response` as below.
1620 // Otherwise, remove this line. Only populated after
1621 // first call to Next(). Not safe for concurrent access.
1622 _ = it.Response.(*contactcenterinsightspb.ListQaScorecardRevisionsResponse)
1623 }
1624 }
1625
1626 func ExampleClient_ListQaScorecards() {
1627 ctx := context.Background()
1628 // This snippet has been automatically generated and should be regarded as a code template only.
1629 // It will require modifications to work:
1630 // - It may require correct/in-range values for request initialization.
1631 // - It may require specifying regional endpoints when creating the service client as shown in:
1632 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1633 c, err := contactcenterinsights.NewClient(ctx)
1634 if err != nil {
1635 // TODO: Handle error.
1636 }
1637 defer c.Close()
1638
1639 req := &contactcenterinsightspb.ListQaScorecardsRequest{
1640 // TODO: Fill request struct fields.
1641 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListQaScorecardsRequest.
1642 }
1643 it := c.ListQaScorecards(ctx, req)
1644 for {
1645 resp, err := it.Next()
1646 if err == iterator.Done {
1647 break
1648 }
1649 if err != nil {
1650 // TODO: Handle error.
1651 }
1652 // TODO: Use resp.
1653 _ = resp
1654
1655 // If you need to access the underlying RPC response,
1656 // you can do so by casting the `Response` as below.
1657 // Otherwise, remove this line. Only populated after
1658 // first call to Next(). Not safe for concurrent access.
1659 _ = it.Response.(*contactcenterinsightspb.ListQaScorecardsResponse)
1660 }
1661 }
1662
1663 func ExampleClient_ListViews() {
1664 ctx := context.Background()
1665 // This snippet has been automatically generated and should be regarded as a code template only.
1666 // It will require modifications to work:
1667 // - It may require correct/in-range values for request initialization.
1668 // - It may require specifying regional endpoints when creating the service client as shown in:
1669 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1670 c, err := contactcenterinsights.NewClient(ctx)
1671 if err != nil {
1672 // TODO: Handle error.
1673 }
1674 defer c.Close()
1675
1676 req := &contactcenterinsightspb.ListViewsRequest{
1677 // TODO: Fill request struct fields.
1678 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#ListViewsRequest.
1679 }
1680 it := c.ListViews(ctx, req)
1681 for {
1682 resp, err := it.Next()
1683 if err == iterator.Done {
1684 break
1685 }
1686 if err != nil {
1687 // TODO: Handle error.
1688 }
1689 // TODO: Use resp.
1690 _ = resp
1691
1692 // If you need to access the underlying RPC response,
1693 // you can do so by casting the `Response` as below.
1694 // Otherwise, remove this line. Only populated after
1695 // first call to Next(). Not safe for concurrent access.
1696 _ = it.Response.(*contactcenterinsightspb.ListViewsResponse)
1697 }
1698 }
1699
1700 func ExampleClient_QueryMetrics() {
1701 ctx := context.Background()
1702 // This snippet has been automatically generated and should be regarded as a code template only.
1703 // It will require modifications to work:
1704 // - It may require correct/in-range values for request initialization.
1705 // - It may require specifying regional endpoints when creating the service client as shown in:
1706 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1707 c, err := contactcenterinsights.NewClient(ctx)
1708 if err != nil {
1709 // TODO: Handle error.
1710 }
1711 defer c.Close()
1712
1713 req := &contactcenterinsightspb.QueryMetricsRequest{
1714 // TODO: Fill request struct fields.
1715 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#QueryMetricsRequest.
1716 }
1717 op, err := c.QueryMetrics(ctx, req)
1718 if err != nil {
1719 // TODO: Handle error.
1720 }
1721
1722 resp, err := op.Wait(ctx)
1723 if err != nil {
1724 // TODO: Handle error.
1725 }
1726 // TODO: Use resp.
1727 _ = resp
1728 }
1729
1730 func ExampleClient_TuneQaScorecardRevision() {
1731 ctx := context.Background()
1732 // This snippet has been automatically generated and should be regarded as a code template only.
1733 // It will require modifications to work:
1734 // - It may require correct/in-range values for request initialization.
1735 // - It may require specifying regional endpoints when creating the service client as shown in:
1736 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1737 c, err := contactcenterinsights.NewClient(ctx)
1738 if err != nil {
1739 // TODO: Handle error.
1740 }
1741 defer c.Close()
1742
1743 req := &contactcenterinsightspb.TuneQaScorecardRevisionRequest{
1744 // TODO: Fill request struct fields.
1745 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#TuneQaScorecardRevisionRequest.
1746 }
1747 op, err := c.TuneQaScorecardRevision(ctx, req)
1748 if err != nil {
1749 // TODO: Handle error.
1750 }
1751
1752 resp, err := op.Wait(ctx)
1753 if err != nil {
1754 // TODO: Handle error.
1755 }
1756 // TODO: Use resp.
1757 _ = resp
1758 }
1759
1760 func ExampleClient_UndeployIssueModel() {
1761 ctx := context.Background()
1762 // This snippet has been automatically generated and should be regarded as a code template only.
1763 // It will require modifications to work:
1764 // - It may require correct/in-range values for request initialization.
1765 // - It may require specifying regional endpoints when creating the service client as shown in:
1766 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1767 c, err := contactcenterinsights.NewClient(ctx)
1768 if err != nil {
1769 // TODO: Handle error.
1770 }
1771 defer c.Close()
1772
1773 req := &contactcenterinsightspb.UndeployIssueModelRequest{
1774 // TODO: Fill request struct fields.
1775 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UndeployIssueModelRequest.
1776 }
1777 op, err := c.UndeployIssueModel(ctx, req)
1778 if err != nil {
1779 // TODO: Handle error.
1780 }
1781
1782 resp, err := op.Wait(ctx)
1783 if err != nil {
1784 // TODO: Handle error.
1785 }
1786 // TODO: Use resp.
1787 _ = resp
1788 }
1789
1790 func ExampleClient_UndeployQaScorecardRevision() {
1791 ctx := context.Background()
1792 // This snippet has been automatically generated and should be regarded as a code template only.
1793 // It will require modifications to work:
1794 // - It may require correct/in-range values for request initialization.
1795 // - It may require specifying regional endpoints when creating the service client as shown in:
1796 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1797 c, err := contactcenterinsights.NewClient(ctx)
1798 if err != nil {
1799 // TODO: Handle error.
1800 }
1801 defer c.Close()
1802
1803 req := &contactcenterinsightspb.UndeployQaScorecardRevisionRequest{
1804 // TODO: Fill request struct fields.
1805 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UndeployQaScorecardRevisionRequest.
1806 }
1807 resp, err := c.UndeployQaScorecardRevision(ctx, req)
1808 if err != nil {
1809 // TODO: Handle error.
1810 }
1811 // TODO: Use resp.
1812 _ = resp
1813 }
1814
1815 func ExampleClient_UpdateAnalysisRule() {
1816 ctx := context.Background()
1817 // This snippet has been automatically generated and should be regarded as a code template only.
1818 // It will require modifications to work:
1819 // - It may require correct/in-range values for request initialization.
1820 // - It may require specifying regional endpoints when creating the service client as shown in:
1821 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1822 c, err := contactcenterinsights.NewClient(ctx)
1823 if err != nil {
1824 // TODO: Handle error.
1825 }
1826 defer c.Close()
1827
1828 req := &contactcenterinsightspb.UpdateAnalysisRuleRequest{
1829 // TODO: Fill request struct fields.
1830 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateAnalysisRuleRequest.
1831 }
1832 resp, err := c.UpdateAnalysisRule(ctx, req)
1833 if err != nil {
1834 // TODO: Handle error.
1835 }
1836 // TODO: Use resp.
1837 _ = resp
1838 }
1839
1840 func ExampleClient_UpdateConversation() {
1841 ctx := context.Background()
1842 // This snippet has been automatically generated and should be regarded as a code template only.
1843 // It will require modifications to work:
1844 // - It may require correct/in-range values for request initialization.
1845 // - It may require specifying regional endpoints when creating the service client as shown in:
1846 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1847 c, err := contactcenterinsights.NewClient(ctx)
1848 if err != nil {
1849 // TODO: Handle error.
1850 }
1851 defer c.Close()
1852
1853 req := &contactcenterinsightspb.UpdateConversationRequest{
1854 // TODO: Fill request struct fields.
1855 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateConversationRequest.
1856 }
1857 resp, err := c.UpdateConversation(ctx, req)
1858 if err != nil {
1859 // TODO: Handle error.
1860 }
1861 // TODO: Use resp.
1862 _ = resp
1863 }
1864
1865 func ExampleClient_UpdateFeedbackLabel() {
1866 ctx := context.Background()
1867 // This snippet has been automatically generated and should be regarded as a code template only.
1868 // It will require modifications to work:
1869 // - It may require correct/in-range values for request initialization.
1870 // - It may require specifying regional endpoints when creating the service client as shown in:
1871 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1872 c, err := contactcenterinsights.NewClient(ctx)
1873 if err != nil {
1874 // TODO: Handle error.
1875 }
1876 defer c.Close()
1877
1878 req := &contactcenterinsightspb.UpdateFeedbackLabelRequest{
1879 // TODO: Fill request struct fields.
1880 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateFeedbackLabelRequest.
1881 }
1882 resp, err := c.UpdateFeedbackLabel(ctx, req)
1883 if err != nil {
1884 // TODO: Handle error.
1885 }
1886 // TODO: Use resp.
1887 _ = resp
1888 }
1889
1890 func ExampleClient_UpdateIssue() {
1891 ctx := context.Background()
1892 // This snippet has been automatically generated and should be regarded as a code template only.
1893 // It will require modifications to work:
1894 // - It may require correct/in-range values for request initialization.
1895 // - It may require specifying regional endpoints when creating the service client as shown in:
1896 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1897 c, err := contactcenterinsights.NewClient(ctx)
1898 if err != nil {
1899 // TODO: Handle error.
1900 }
1901 defer c.Close()
1902
1903 req := &contactcenterinsightspb.UpdateIssueRequest{
1904 // TODO: Fill request struct fields.
1905 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateIssueRequest.
1906 }
1907 resp, err := c.UpdateIssue(ctx, req)
1908 if err != nil {
1909 // TODO: Handle error.
1910 }
1911 // TODO: Use resp.
1912 _ = resp
1913 }
1914
1915 func ExampleClient_UpdateIssueModel() {
1916 ctx := context.Background()
1917 // This snippet has been automatically generated and should be regarded as a code template only.
1918 // It will require modifications to work:
1919 // - It may require correct/in-range values for request initialization.
1920 // - It may require specifying regional endpoints when creating the service client as shown in:
1921 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1922 c, err := contactcenterinsights.NewClient(ctx)
1923 if err != nil {
1924 // TODO: Handle error.
1925 }
1926 defer c.Close()
1927
1928 req := &contactcenterinsightspb.UpdateIssueModelRequest{
1929 // TODO: Fill request struct fields.
1930 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateIssueModelRequest.
1931 }
1932 resp, err := c.UpdateIssueModel(ctx, req)
1933 if err != nil {
1934 // TODO: Handle error.
1935 }
1936 // TODO: Use resp.
1937 _ = resp
1938 }
1939
1940 func ExampleClient_UpdatePhraseMatcher() {
1941 ctx := context.Background()
1942 // This snippet has been automatically generated and should be regarded as a code template only.
1943 // It will require modifications to work:
1944 // - It may require correct/in-range values for request initialization.
1945 // - It may require specifying regional endpoints when creating the service client as shown in:
1946 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1947 c, err := contactcenterinsights.NewClient(ctx)
1948 if err != nil {
1949 // TODO: Handle error.
1950 }
1951 defer c.Close()
1952
1953 req := &contactcenterinsightspb.UpdatePhraseMatcherRequest{
1954 // TODO: Fill request struct fields.
1955 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdatePhraseMatcherRequest.
1956 }
1957 resp, err := c.UpdatePhraseMatcher(ctx, req)
1958 if err != nil {
1959 // TODO: Handle error.
1960 }
1961 // TODO: Use resp.
1962 _ = resp
1963 }
1964
1965 func ExampleClient_UpdateQaQuestion() {
1966 ctx := context.Background()
1967 // This snippet has been automatically generated and should be regarded as a code template only.
1968 // It will require modifications to work:
1969 // - It may require correct/in-range values for request initialization.
1970 // - It may require specifying regional endpoints when creating the service client as shown in:
1971 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1972 c, err := contactcenterinsights.NewClient(ctx)
1973 if err != nil {
1974 // TODO: Handle error.
1975 }
1976 defer c.Close()
1977
1978 req := &contactcenterinsightspb.UpdateQaQuestionRequest{
1979 // TODO: Fill request struct fields.
1980 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateQaQuestionRequest.
1981 }
1982 resp, err := c.UpdateQaQuestion(ctx, req)
1983 if err != nil {
1984 // TODO: Handle error.
1985 }
1986 // TODO: Use resp.
1987 _ = resp
1988 }
1989
1990 func ExampleClient_UpdateQaScorecard() {
1991 ctx := context.Background()
1992 // This snippet has been automatically generated and should be regarded as a code template only.
1993 // It will require modifications to work:
1994 // - It may require correct/in-range values for request initialization.
1995 // - It may require specifying regional endpoints when creating the service client as shown in:
1996 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1997 c, err := contactcenterinsights.NewClient(ctx)
1998 if err != nil {
1999 // TODO: Handle error.
2000 }
2001 defer c.Close()
2002
2003 req := &contactcenterinsightspb.UpdateQaScorecardRequest{
2004 // TODO: Fill request struct fields.
2005 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateQaScorecardRequest.
2006 }
2007 resp, err := c.UpdateQaScorecard(ctx, req)
2008 if err != nil {
2009 // TODO: Handle error.
2010 }
2011 // TODO: Use resp.
2012 _ = resp
2013 }
2014
2015 func ExampleClient_UpdateSettings() {
2016 ctx := context.Background()
2017 // This snippet has been automatically generated and should be regarded as a code template only.
2018 // It will require modifications to work:
2019 // - It may require correct/in-range values for request initialization.
2020 // - It may require specifying regional endpoints when creating the service client as shown in:
2021 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
2022 c, err := contactcenterinsights.NewClient(ctx)
2023 if err != nil {
2024 // TODO: Handle error.
2025 }
2026 defer c.Close()
2027
2028 req := &contactcenterinsightspb.UpdateSettingsRequest{
2029 // TODO: Fill request struct fields.
2030 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateSettingsRequest.
2031 }
2032 resp, err := c.UpdateSettings(ctx, req)
2033 if err != nil {
2034 // TODO: Handle error.
2035 }
2036 // TODO: Use resp.
2037 _ = resp
2038 }
2039
2040 func ExampleClient_UpdateView() {
2041 ctx := context.Background()
2042 // This snippet has been automatically generated and should be regarded as a code template only.
2043 // It will require modifications to work:
2044 // - It may require correct/in-range values for request initialization.
2045 // - It may require specifying regional endpoints when creating the service client as shown in:
2046 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
2047 c, err := contactcenterinsights.NewClient(ctx)
2048 if err != nil {
2049 // TODO: Handle error.
2050 }
2051 defer c.Close()
2052
2053 req := &contactcenterinsightspb.UpdateViewRequest{
2054 // TODO: Fill request struct fields.
2055 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UpdateViewRequest.
2056 }
2057 resp, err := c.UpdateView(ctx, req)
2058 if err != nil {
2059 // TODO: Handle error.
2060 }
2061 // TODO: Use resp.
2062 _ = resp
2063 }
2064
2065 func ExampleClient_UploadConversation() {
2066 ctx := context.Background()
2067 // This snippet has been automatically generated and should be regarded as a code template only.
2068 // It will require modifications to work:
2069 // - It may require correct/in-range values for request initialization.
2070 // - It may require specifying regional endpoints when creating the service client as shown in:
2071 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
2072 c, err := contactcenterinsights.NewClient(ctx)
2073 if err != nil {
2074 // TODO: Handle error.
2075 }
2076 defer c.Close()
2077
2078 req := &contactcenterinsightspb.UploadConversationRequest{
2079 // TODO: Fill request struct fields.
2080 // See https://pkg.go.dev/cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb#UploadConversationRequest.
2081 }
2082 op, err := c.UploadConversation(ctx, req)
2083 if err != nil {
2084 // TODO: Handle error.
2085 }
2086
2087 resp, err := op.Wait(ctx)
2088 if err != nil {
2089 // TODO: Handle error.
2090 }
2091 // TODO: Use resp.
2092 _ = resp
2093 }
2094
2095 func ExampleClient_CancelOperation() {
2096 ctx := context.Background()
2097 // This snippet has been automatically generated and should be regarded as a code template only.
2098 // It will require modifications to work:
2099 // - It may require correct/in-range values for request initialization.
2100 // - It may require specifying regional endpoints when creating the service client as shown in:
2101 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
2102 c, err := contactcenterinsights.NewClient(ctx)
2103 if err != nil {
2104 // TODO: Handle error.
2105 }
2106 defer c.Close()
2107
2108 req := &longrunningpb.CancelOperationRequest{
2109 // TODO: Fill request struct fields.
2110 // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
2111 }
2112 err = c.CancelOperation(ctx, req)
2113 if err != nil {
2114 // TODO: Handle error.
2115 }
2116 }
2117
2118 func ExampleClient_GetOperation() {
2119 ctx := context.Background()
2120 // This snippet has been automatically generated and should be regarded as a code template only.
2121 // It will require modifications to work:
2122 // - It may require correct/in-range values for request initialization.
2123 // - It may require specifying regional endpoints when creating the service client as shown in:
2124 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
2125 c, err := contactcenterinsights.NewClient(ctx)
2126 if err != nil {
2127 // TODO: Handle error.
2128 }
2129 defer c.Close()
2130
2131 req := &longrunningpb.GetOperationRequest{
2132 // TODO: Fill request struct fields.
2133 // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
2134 }
2135 resp, err := c.GetOperation(ctx, req)
2136 if err != nil {
2137 // TODO: Handle error.
2138 }
2139 // TODO: Use resp.
2140 _ = resp
2141 }
2142
2143 func ExampleClient_ListOperations() {
2144 ctx := context.Background()
2145 // This snippet has been automatically generated and should be regarded as a code template only.
2146 // It will require modifications to work:
2147 // - It may require correct/in-range values for request initialization.
2148 // - It may require specifying regional endpoints when creating the service client as shown in:
2149 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
2150 c, err := contactcenterinsights.NewClient(ctx)
2151 if err != nil {
2152 // TODO: Handle error.
2153 }
2154 defer c.Close()
2155
2156 req := &longrunningpb.ListOperationsRequest{
2157 // TODO: Fill request struct fields.
2158 // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
2159 }
2160 it := c.ListOperations(ctx, req)
2161 for {
2162 resp, err := it.Next()
2163 if err == iterator.Done {
2164 break
2165 }
2166 if err != nil {
2167 // TODO: Handle error.
2168 }
2169 // TODO: Use resp.
2170 _ = resp
2171
2172 // If you need to access the underlying RPC response,
2173 // you can do so by casting the `Response` as below.
2174 // Otherwise, remove this line. Only populated after
2175 // first call to Next(). Not safe for concurrent access.
2176 _ = it.Response.(*longrunningpb.ListOperationsResponse)
2177 }
2178 }