Debian Codegraph @

contactcenterinsights/apiv1/auxiliary.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
18
19 import (
20 "context"
21 "time"
22
23 contactcenterinsightspb "cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb"
24 "cloud.google.com/go/longrunning"
25 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
26 gax "github.com/googleapis/gax-go/v2"
27 "google.golang.org/api/iterator"
28 )
29
30 // BulkAnalyzeConversationsOperation manages a long-running operation from BulkAnalyzeConversations.
31 type BulkAnalyzeConversationsOperation struct {
32 lro *longrunning.Operation
33 pollPath string
34 }
35
36 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
37 //
38 // See documentation of Poll for error-handling information.
39 func (op *BulkAnalyzeConversationsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkAnalyzeConversationsResponse, error) {
40 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
41 var resp contactcenterinsightspb.BulkAnalyzeConversationsResponse
42 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
43 return nil, err
44 }
45 return &resp, nil
46 }
47
48 // Poll fetches the latest state of the long-running operation.
49 //
50 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
51 //
52 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
53 // the operation has completed with failure, the error is returned and op.Done will return true.
54 // If Poll succeeds and the operation has completed successfully,
55 // op.Done will return true, and the response of the operation is returned.
56 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
57 func (op *BulkAnalyzeConversationsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkAnalyzeConversationsResponse, error) {
58 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
59 var resp contactcenterinsightspb.BulkAnalyzeConversationsResponse
60 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
61 return nil, err
62 }
63 if !op.Done() {
64 return nil, nil
65 }
66 return &resp, nil
67 }
68
69 // Metadata returns metadata associated with the long-running operation.
70 // Metadata itself does not contact the server, but Poll does.
71 // To get the latest metadata, call this method after a successful call to Poll.
72 // If the metadata is not available, the returned metadata and error are both nil.
73 func (op *BulkAnalyzeConversationsOperation) Metadata() (*contactcenterinsightspb.BulkAnalyzeConversationsMetadata, error) {
74 var meta contactcenterinsightspb.BulkAnalyzeConversationsMetadata
75 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
76 return nil, nil
77 } else if err != nil {
78 return nil, err
79 }
80 return &meta, nil
81 }
82
83 // Done reports whether the long-running operation has completed.
84 func (op *BulkAnalyzeConversationsOperation) Done() bool {
85 return op.lro.Done()
86 }
87
88 // Name returns the name of the long-running operation.
89 // The name is assigned by the server and is unique within the service from which the operation is created.
90 func (op *BulkAnalyzeConversationsOperation) Name() string {
91 return op.lro.Name()
92 }
93
94 // BulkDeleteConversationsOperation manages a long-running operation from BulkDeleteConversations.
95 type BulkDeleteConversationsOperation struct {
96 lro *longrunning.Operation
97 pollPath string
98 }
99
100 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
101 //
102 // See documentation of Poll for error-handling information.
103 func (op *BulkDeleteConversationsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkDeleteConversationsResponse, error) {
104 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
105 var resp contactcenterinsightspb.BulkDeleteConversationsResponse
106 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
107 return nil, err
108 }
109 return &resp, nil
110 }
111
112 // Poll fetches the latest state of the long-running operation.
113 //
114 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
115 //
116 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
117 // the operation has completed with failure, the error is returned and op.Done will return true.
118 // If Poll succeeds and the operation has completed successfully,
119 // op.Done will return true, and the response of the operation is returned.
120 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
121 func (op *BulkDeleteConversationsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkDeleteConversationsResponse, error) {
122 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
123 var resp contactcenterinsightspb.BulkDeleteConversationsResponse
124 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
125 return nil, err
126 }
127 if !op.Done() {
128 return nil, nil
129 }
130 return &resp, nil
131 }
132
133 // Metadata returns metadata associated with the long-running operation.
134 // Metadata itself does not contact the server, but Poll does.
135 // To get the latest metadata, call this method after a successful call to Poll.
136 // If the metadata is not available, the returned metadata and error are both nil.
137 func (op *BulkDeleteConversationsOperation) Metadata() (*contactcenterinsightspb.BulkDeleteConversationsMetadata, error) {
138 var meta contactcenterinsightspb.BulkDeleteConversationsMetadata
139 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
140 return nil, nil
141 } else if err != nil {
142 return nil, err
143 }
144 return &meta, nil
145 }
146
147 // Done reports whether the long-running operation has completed.
148 func (op *BulkDeleteConversationsOperation) Done() bool {
149 return op.lro.Done()
150 }
151
152 // Name returns the name of the long-running operation.
153 // The name is assigned by the server and is unique within the service from which the operation is created.
154 func (op *BulkDeleteConversationsOperation) Name() string {
155 return op.lro.Name()
156 }
157
158 // BulkDownloadFeedbackLabelsOperation manages a long-running operation from BulkDownloadFeedbackLabels.
159 type BulkDownloadFeedbackLabelsOperation struct {
160 lro *longrunning.Operation
161 pollPath string
162 }
163
164 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
165 //
166 // See documentation of Poll for error-handling information.
167 func (op *BulkDownloadFeedbackLabelsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkDownloadFeedbackLabelsResponse, error) {
168 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
169 var resp contactcenterinsightspb.BulkDownloadFeedbackLabelsResponse
170 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
171 return nil, err
172 }
173 return &resp, nil
174 }
175
176 // Poll fetches the latest state of the long-running operation.
177 //
178 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
179 //
180 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
181 // the operation has completed with failure, the error is returned and op.Done will return true.
182 // If Poll succeeds and the operation has completed successfully,
183 // op.Done will return true, and the response of the operation is returned.
184 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
185 func (op *BulkDownloadFeedbackLabelsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkDownloadFeedbackLabelsResponse, error) {
186 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
187 var resp contactcenterinsightspb.BulkDownloadFeedbackLabelsResponse
188 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
189 return nil, err
190 }
191 if !op.Done() {
192 return nil, nil
193 }
194 return &resp, nil
195 }
196
197 // Metadata returns metadata associated with the long-running operation.
198 // Metadata itself does not contact the server, but Poll does.
199 // To get the latest metadata, call this method after a successful call to Poll.
200 // If the metadata is not available, the returned metadata and error are both nil.
201 func (op *BulkDownloadFeedbackLabelsOperation) Metadata() (*contactcenterinsightspb.BulkDownloadFeedbackLabelsMetadata, error) {
202 var meta contactcenterinsightspb.BulkDownloadFeedbackLabelsMetadata
203 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
204 return nil, nil
205 } else if err != nil {
206 return nil, err
207 }
208 return &meta, nil
209 }
210
211 // Done reports whether the long-running operation has completed.
212 func (op *BulkDownloadFeedbackLabelsOperation) Done() bool {
213 return op.lro.Done()
214 }
215
216 // Name returns the name of the long-running operation.
217 // The name is assigned by the server and is unique within the service from which the operation is created.
218 func (op *BulkDownloadFeedbackLabelsOperation) Name() string {
219 return op.lro.Name()
220 }
221
222 // BulkUploadFeedbackLabelsOperation manages a long-running operation from BulkUploadFeedbackLabels.
223 type BulkUploadFeedbackLabelsOperation struct {
224 lro *longrunning.Operation
225 pollPath string
226 }
227
228 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
229 //
230 // See documentation of Poll for error-handling information.
231 func (op *BulkUploadFeedbackLabelsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkUploadFeedbackLabelsResponse, error) {
232 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
233 var resp contactcenterinsightspb.BulkUploadFeedbackLabelsResponse
234 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
235 return nil, err
236 }
237 return &resp, nil
238 }
239
240 // Poll fetches the latest state of the long-running operation.
241 //
242 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
243 //
244 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
245 // the operation has completed with failure, the error is returned and op.Done will return true.
246 // If Poll succeeds and the operation has completed successfully,
247 // op.Done will return true, and the response of the operation is returned.
248 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
249 func (op *BulkUploadFeedbackLabelsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.BulkUploadFeedbackLabelsResponse, error) {
250 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
251 var resp contactcenterinsightspb.BulkUploadFeedbackLabelsResponse
252 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
253 return nil, err
254 }
255 if !op.Done() {
256 return nil, nil
257 }
258 return &resp, nil
259 }
260
261 // Metadata returns metadata associated with the long-running operation.
262 // Metadata itself does not contact the server, but Poll does.
263 // To get the latest metadata, call this method after a successful call to Poll.
264 // If the metadata is not available, the returned metadata and error are both nil.
265 func (op *BulkUploadFeedbackLabelsOperation) Metadata() (*contactcenterinsightspb.BulkUploadFeedbackLabelsMetadata, error) {
266 var meta contactcenterinsightspb.BulkUploadFeedbackLabelsMetadata
267 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
268 return nil, nil
269 } else if err != nil {
270 return nil, err
271 }
272 return &meta, nil
273 }
274
275 // Done reports whether the long-running operation has completed.
276 func (op *BulkUploadFeedbackLabelsOperation) Done() bool {
277 return op.lro.Done()
278 }
279
280 // Name returns the name of the long-running operation.
281 // The name is assigned by the server and is unique within the service from which the operation is created.
282 func (op *BulkUploadFeedbackLabelsOperation) Name() string {
283 return op.lro.Name()
284 }
285
286 // CreateAnalysisOperation manages a long-running operation from CreateAnalysis.
287 type CreateAnalysisOperation struct {
288 lro *longrunning.Operation
289 pollPath string
290 }
291
292 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
293 //
294 // See documentation of Poll for error-handling information.
295 func (op *CreateAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.Analysis, error) {
296 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
297 var resp contactcenterinsightspb.Analysis
298 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
299 return nil, err
300 }
301 return &resp, nil
302 }
303
304 // Poll fetches the latest state of the long-running operation.
305 //
306 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
307 //
308 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
309 // the operation has completed with failure, the error is returned and op.Done will return true.
310 // If Poll succeeds and the operation has completed successfully,
311 // op.Done will return true, and the response of the operation is returned.
312 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
313 func (op *CreateAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.Analysis, error) {
314 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
315 var resp contactcenterinsightspb.Analysis
316 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
317 return nil, err
318 }
319 if !op.Done() {
320 return nil, nil
321 }
322 return &resp, nil
323 }
324
325 // Metadata returns metadata associated with the long-running operation.
326 // Metadata itself does not contact the server, but Poll does.
327 // To get the latest metadata, call this method after a successful call to Poll.
328 // If the metadata is not available, the returned metadata and error are both nil.
329 func (op *CreateAnalysisOperation) Metadata() (*contactcenterinsightspb.CreateAnalysisOperationMetadata, error) {
330 var meta contactcenterinsightspb.CreateAnalysisOperationMetadata
331 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
332 return nil, nil
333 } else if err != nil {
334 return nil, err
335 }
336 return &meta, nil
337 }
338
339 // Done reports whether the long-running operation has completed.
340 func (op *CreateAnalysisOperation) Done() bool {
341 return op.lro.Done()
342 }
343
344 // Name returns the name of the long-running operation.
345 // The name is assigned by the server and is unique within the service from which the operation is created.
346 func (op *CreateAnalysisOperation) Name() string {
347 return op.lro.Name()
348 }
349
350 // CreateIssueModelOperation manages a long-running operation from CreateIssueModel.
351 type CreateIssueModelOperation struct {
352 lro *longrunning.Operation
353 pollPath string
354 }
355
356 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
357 //
358 // See documentation of Poll for error-handling information.
359 func (op *CreateIssueModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.IssueModel, error) {
360 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
361 var resp contactcenterinsightspb.IssueModel
362 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
363 return nil, err
364 }
365 return &resp, nil
366 }
367
368 // Poll fetches the latest state of the long-running operation.
369 //
370 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
371 //
372 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
373 // the operation has completed with failure, the error is returned and op.Done will return true.
374 // If Poll succeeds and the operation has completed successfully,
375 // op.Done will return true, and the response of the operation is returned.
376 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
377 func (op *CreateIssueModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.IssueModel, error) {
378 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
379 var resp contactcenterinsightspb.IssueModel
380 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
381 return nil, err
382 }
383 if !op.Done() {
384 return nil, nil
385 }
386 return &resp, nil
387 }
388
389 // Metadata returns metadata associated with the long-running operation.
390 // Metadata itself does not contact the server, but Poll does.
391 // To get the latest metadata, call this method after a successful call to Poll.
392 // If the metadata is not available, the returned metadata and error are both nil.
393 func (op *CreateIssueModelOperation) Metadata() (*contactcenterinsightspb.CreateIssueModelMetadata, error) {
394 var meta contactcenterinsightspb.CreateIssueModelMetadata
395 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
396 return nil, nil
397 } else if err != nil {
398 return nil, err
399 }
400 return &meta, nil
401 }
402
403 // Done reports whether the long-running operation has completed.
404 func (op *CreateIssueModelOperation) Done() bool {
405 return op.lro.Done()
406 }
407
408 // Name returns the name of the long-running operation.
409 // The name is assigned by the server and is unique within the service from which the operation is created.
410 func (op *CreateIssueModelOperation) Name() string {
411 return op.lro.Name()
412 }
413
414 // DeleteIssueModelOperation manages a long-running operation from DeleteIssueModel.
415 type DeleteIssueModelOperation struct {
416 lro *longrunning.Operation
417 pollPath string
418 }
419
420 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
421 //
422 // See documentation of Poll for error-handling information.
423 func (op *DeleteIssueModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
424 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
425 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
426 }
427
428 // Poll fetches the latest state of the long-running operation.
429 //
430 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
431 //
432 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
433 // the operation has completed with failure, the error is returned and op.Done will return true.
434 // If Poll succeeds and the operation has completed successfully,
435 // op.Done will return true, and the response of the operation is returned.
436 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
437 func (op *DeleteIssueModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
438 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
439 return op.lro.Poll(ctx, nil, opts...)
440 }
441
442 // Metadata returns metadata associated with the long-running operation.
443 // Metadata itself does not contact the server, but Poll does.
444 // To get the latest metadata, call this method after a successful call to Poll.
445 // If the metadata is not available, the returned metadata and error are both nil.
446 func (op *DeleteIssueModelOperation) Metadata() (*contactcenterinsightspb.DeleteIssueModelMetadata, error) {
447 var meta contactcenterinsightspb.DeleteIssueModelMetadata
448 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
449 return nil, nil
450 } else if err != nil {
451 return nil, err
452 }
453 return &meta, nil
454 }
455
456 // Done reports whether the long-running operation has completed.
457 func (op *DeleteIssueModelOperation) Done() bool {
458 return op.lro.Done()
459 }
460
461 // Name returns the name of the long-running operation.
462 // The name is assigned by the server and is unique within the service from which the operation is created.
463 func (op *DeleteIssueModelOperation) Name() string {
464 return op.lro.Name()
465 }
466
467 // DeployIssueModelOperation manages a long-running operation from DeployIssueModel.
468 type DeployIssueModelOperation struct {
469 lro *longrunning.Operation
470 pollPath string
471 }
472
473 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
474 //
475 // See documentation of Poll for error-handling information.
476 func (op *DeployIssueModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.DeployIssueModelResponse, error) {
477 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
478 var resp contactcenterinsightspb.DeployIssueModelResponse
479 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
480 return nil, err
481 }
482 return &resp, nil
483 }
484
485 // Poll fetches the latest state of the long-running operation.
486 //
487 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
488 //
489 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
490 // the operation has completed with failure, the error is returned and op.Done will return true.
491 // If Poll succeeds and the operation has completed successfully,
492 // op.Done will return true, and the response of the operation is returned.
493 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
494 func (op *DeployIssueModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.DeployIssueModelResponse, error) {
495 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
496 var resp contactcenterinsightspb.DeployIssueModelResponse
497 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
498 return nil, err
499 }
500 if !op.Done() {
501 return nil, nil
502 }
503 return &resp, nil
504 }
505
506 // Metadata returns metadata associated with the long-running operation.
507 // Metadata itself does not contact the server, but Poll does.
508 // To get the latest metadata, call this method after a successful call to Poll.
509 // If the metadata is not available, the returned metadata and error are both nil.
510 func (op *DeployIssueModelOperation) Metadata() (*contactcenterinsightspb.DeployIssueModelMetadata, error) {
511 var meta contactcenterinsightspb.DeployIssueModelMetadata
512 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
513 return nil, nil
514 } else if err != nil {
515 return nil, err
516 }
517 return &meta, nil
518 }
519
520 // Done reports whether the long-running operation has completed.
521 func (op *DeployIssueModelOperation) Done() bool {
522 return op.lro.Done()
523 }
524
525 // Name returns the name of the long-running operation.
526 // The name is assigned by the server and is unique within the service from which the operation is created.
527 func (op *DeployIssueModelOperation) Name() string {
528 return op.lro.Name()
529 }
530
531 // ExportInsightsDataOperation manages a long-running operation from ExportInsightsData.
532 type ExportInsightsDataOperation struct {
533 lro *longrunning.Operation
534 pollPath string
535 }
536
537 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
538 //
539 // See documentation of Poll for error-handling information.
540 func (op *ExportInsightsDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.ExportInsightsDataResponse, error) {
541 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
542 var resp contactcenterinsightspb.ExportInsightsDataResponse
543 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
544 return nil, err
545 }
546 return &resp, nil
547 }
548
549 // Poll fetches the latest state of the long-running operation.
550 //
551 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
552 //
553 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
554 // the operation has completed with failure, the error is returned and op.Done will return true.
555 // If Poll succeeds and the operation has completed successfully,
556 // op.Done will return true, and the response of the operation is returned.
557 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
558 func (op *ExportInsightsDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.ExportInsightsDataResponse, error) {
559 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
560 var resp contactcenterinsightspb.ExportInsightsDataResponse
561 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
562 return nil, err
563 }
564 if !op.Done() {
565 return nil, nil
566 }
567 return &resp, nil
568 }
569
570 // Metadata returns metadata associated with the long-running operation.
571 // Metadata itself does not contact the server, but Poll does.
572 // To get the latest metadata, call this method after a successful call to Poll.
573 // If the metadata is not available, the returned metadata and error are both nil.
574 func (op *ExportInsightsDataOperation) Metadata() (*contactcenterinsightspb.ExportInsightsDataMetadata, error) {
575 var meta contactcenterinsightspb.ExportInsightsDataMetadata
576 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
577 return nil, nil
578 } else if err != nil {
579 return nil, err
580 }
581 return &meta, nil
582 }
583
584 // Done reports whether the long-running operation has completed.
585 func (op *ExportInsightsDataOperation) Done() bool {
586 return op.lro.Done()
587 }
588
589 // Name returns the name of the long-running operation.
590 // The name is assigned by the server and is unique within the service from which the operation is created.
591 func (op *ExportInsightsDataOperation) Name() string {
592 return op.lro.Name()
593 }
594
595 // ExportIssueModelOperation manages a long-running operation from ExportIssueModel.
596 type ExportIssueModelOperation struct {
597 lro *longrunning.Operation
598 pollPath string
599 }
600
601 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
602 //
603 // See documentation of Poll for error-handling information.
604 func (op *ExportIssueModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.ExportIssueModelResponse, error) {
605 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
606 var resp contactcenterinsightspb.ExportIssueModelResponse
607 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
608 return nil, err
609 }
610 return &resp, nil
611 }
612
613 // Poll fetches the latest state of the long-running operation.
614 //
615 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
616 //
617 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
618 // the operation has completed with failure, the error is returned and op.Done will return true.
619 // If Poll succeeds and the operation has completed successfully,
620 // op.Done will return true, and the response of the operation is returned.
621 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
622 func (op *ExportIssueModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.ExportIssueModelResponse, error) {
623 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
624 var resp contactcenterinsightspb.ExportIssueModelResponse
625 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
626 return nil, err
627 }
628 if !op.Done() {
629 return nil, nil
630 }
631 return &resp, nil
632 }
633
634 // Metadata returns metadata associated with the long-running operation.
635 // Metadata itself does not contact the server, but Poll does.
636 // To get the latest metadata, call this method after a successful call to Poll.
637 // If the metadata is not available, the returned metadata and error are both nil.
638 func (op *ExportIssueModelOperation) Metadata() (*contactcenterinsightspb.ExportIssueModelMetadata, error) {
639 var meta contactcenterinsightspb.ExportIssueModelMetadata
640 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
641 return nil, nil
642 } else if err != nil {
643 return nil, err
644 }
645 return &meta, nil
646 }
647
648 // Done reports whether the long-running operation has completed.
649 func (op *ExportIssueModelOperation) Done() bool {
650 return op.lro.Done()
651 }
652
653 // Name returns the name of the long-running operation.
654 // The name is assigned by the server and is unique within the service from which the operation is created.
655 func (op *ExportIssueModelOperation) Name() string {
656 return op.lro.Name()
657 }
658
659 // ImportIssueModelOperation manages a long-running operation from ImportIssueModel.
660 type ImportIssueModelOperation struct {
661 lro *longrunning.Operation
662 pollPath string
663 }
664
665 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
666 //
667 // See documentation of Poll for error-handling information.
668 func (op *ImportIssueModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.ImportIssueModelResponse, error) {
669 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
670 var resp contactcenterinsightspb.ImportIssueModelResponse
671 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
672 return nil, err
673 }
674 return &resp, nil
675 }
676
677 // Poll fetches the latest state of the long-running operation.
678 //
679 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
680 //
681 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
682 // the operation has completed with failure, the error is returned and op.Done will return true.
683 // If Poll succeeds and the operation has completed successfully,
684 // op.Done will return true, and the response of the operation is returned.
685 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
686 func (op *ImportIssueModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.ImportIssueModelResponse, error) {
687 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
688 var resp contactcenterinsightspb.ImportIssueModelResponse
689 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
690 return nil, err
691 }
692 if !op.Done() {
693 return nil, nil
694 }
695 return &resp, nil
696 }
697
698 // Metadata returns metadata associated with the long-running operation.
699 // Metadata itself does not contact the server, but Poll does.
700 // To get the latest metadata, call this method after a successful call to Poll.
701 // If the metadata is not available, the returned metadata and error are both nil.
702 func (op *ImportIssueModelOperation) Metadata() (*contactcenterinsightspb.ImportIssueModelMetadata, error) {
703 var meta contactcenterinsightspb.ImportIssueModelMetadata
704 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
705 return nil, nil
706 } else if err != nil {
707 return nil, err
708 }
709 return &meta, nil
710 }
711
712 // Done reports whether the long-running operation has completed.
713 func (op *ImportIssueModelOperation) Done() bool {
714 return op.lro.Done()
715 }
716
717 // Name returns the name of the long-running operation.
718 // The name is assigned by the server and is unique within the service from which the operation is created.
719 func (op *ImportIssueModelOperation) Name() string {
720 return op.lro.Name()
721 }
722
723 // IngestConversationsOperation manages a long-running operation from IngestConversations.
724 type IngestConversationsOperation struct {
725 lro *longrunning.Operation
726 pollPath string
727 }
728
729 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
730 //
731 // See documentation of Poll for error-handling information.
732 func (op *IngestConversationsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.IngestConversationsResponse, error) {
733 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
734 var resp contactcenterinsightspb.IngestConversationsResponse
735 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
736 return nil, err
737 }
738 return &resp, nil
739 }
740
741 // Poll fetches the latest state of the long-running operation.
742 //
743 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
744 //
745 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
746 // the operation has completed with failure, the error is returned and op.Done will return true.
747 // If Poll succeeds and the operation has completed successfully,
748 // op.Done will return true, and the response of the operation is returned.
749 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
750 func (op *IngestConversationsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.IngestConversationsResponse, error) {
751 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
752 var resp contactcenterinsightspb.IngestConversationsResponse
753 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
754 return nil, err
755 }
756 if !op.Done() {
757 return nil, nil
758 }
759 return &resp, nil
760 }
761
762 // Metadata returns metadata associated with the long-running operation.
763 // Metadata itself does not contact the server, but Poll does.
764 // To get the latest metadata, call this method after a successful call to Poll.
765 // If the metadata is not available, the returned metadata and error are both nil.
766 func (op *IngestConversationsOperation) Metadata() (*contactcenterinsightspb.IngestConversationsMetadata, error) {
767 var meta contactcenterinsightspb.IngestConversationsMetadata
768 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
769 return nil, nil
770 } else if err != nil {
771 return nil, err
772 }
773 return &meta, nil
774 }
775
776 // Done reports whether the long-running operation has completed.
777 func (op *IngestConversationsOperation) Done() bool {
778 return op.lro.Done()
779 }
780
781 // Name returns the name of the long-running operation.
782 // The name is assigned by the server and is unique within the service from which the operation is created.
783 func (op *IngestConversationsOperation) Name() string {
784 return op.lro.Name()
785 }
786
787 // InitializeEncryptionSpecOperation manages a long-running operation from InitializeEncryptionSpec.
788 type InitializeEncryptionSpecOperation struct {
789 lro *longrunning.Operation
790 pollPath string
791 }
792
793 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
794 //
795 // See documentation of Poll for error-handling information.
796 func (op *InitializeEncryptionSpecOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.InitializeEncryptionSpecResponse, error) {
797 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
798 var resp contactcenterinsightspb.InitializeEncryptionSpecResponse
799 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
800 return nil, err
801 }
802 return &resp, nil
803 }
804
805 // Poll fetches the latest state of the long-running operation.
806 //
807 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
808 //
809 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
810 // the operation has completed with failure, the error is returned and op.Done will return true.
811 // If Poll succeeds and the operation has completed successfully,
812 // op.Done will return true, and the response of the operation is returned.
813 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
814 func (op *InitializeEncryptionSpecOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.InitializeEncryptionSpecResponse, error) {
815 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
816 var resp contactcenterinsightspb.InitializeEncryptionSpecResponse
817 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
818 return nil, err
819 }
820 if !op.Done() {
821 return nil, nil
822 }
823 return &resp, nil
824 }
825
826 // Metadata returns metadata associated with the long-running operation.
827 // Metadata itself does not contact the server, but Poll does.
828 // To get the latest metadata, call this method after a successful call to Poll.
829 // If the metadata is not available, the returned metadata and error are both nil.
830 func (op *InitializeEncryptionSpecOperation) Metadata() (*contactcenterinsightspb.InitializeEncryptionSpecMetadata, error) {
831 var meta contactcenterinsightspb.InitializeEncryptionSpecMetadata
832 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
833 return nil, nil
834 } else if err != nil {
835 return nil, err
836 }
837 return &meta, nil
838 }
839
840 // Done reports whether the long-running operation has completed.
841 func (op *InitializeEncryptionSpecOperation) Done() bool {
842 return op.lro.Done()
843 }
844
845 // Name returns the name of the long-running operation.
846 // The name is assigned by the server and is unique within the service from which the operation is created.
847 func (op *InitializeEncryptionSpecOperation) Name() string {
848 return op.lro.Name()
849 }
850
851 // QueryMetricsOperation manages a long-running operation from QueryMetrics.
852 type QueryMetricsOperation struct {
853 lro *longrunning.Operation
854 pollPath string
855 }
856
857 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
858 //
859 // See documentation of Poll for error-handling information.
860 func (op *QueryMetricsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.QueryMetricsResponse, error) {
861 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
862 var resp contactcenterinsightspb.QueryMetricsResponse
863 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
864 return nil, err
865 }
866 return &resp, nil
867 }
868
869 // Poll fetches the latest state of the long-running operation.
870 //
871 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
872 //
873 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
874 // the operation has completed with failure, the error is returned and op.Done will return true.
875 // If Poll succeeds and the operation has completed successfully,
876 // op.Done will return true, and the response of the operation is returned.
877 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
878 func (op *QueryMetricsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.QueryMetricsResponse, error) {
879 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
880 var resp contactcenterinsightspb.QueryMetricsResponse
881 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
882 return nil, err
883 }
884 if !op.Done() {
885 return nil, nil
886 }
887 return &resp, nil
888 }
889
890 // Metadata returns metadata associated with the long-running operation.
891 // Metadata itself does not contact the server, but Poll does.
892 // To get the latest metadata, call this method after a successful call to Poll.
893 // If the metadata is not available, the returned metadata and error are both nil.
894 func (op *QueryMetricsOperation) Metadata() (*contactcenterinsightspb.QueryMetricsMetadata, error) {
895 var meta contactcenterinsightspb.QueryMetricsMetadata
896 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
897 return nil, nil
898 } else if err != nil {
899 return nil, err
900 }
901 return &meta, nil
902 }
903
904 // Done reports whether the long-running operation has completed.
905 func (op *QueryMetricsOperation) Done() bool {
906 return op.lro.Done()
907 }
908
909 // Name returns the name of the long-running operation.
910 // The name is assigned by the server and is unique within the service from which the operation is created.
911 func (op *QueryMetricsOperation) Name() string {
912 return op.lro.Name()
913 }
914
915 // TuneQaScorecardRevisionOperation manages a long-running operation from TuneQaScorecardRevision.
916 type TuneQaScorecardRevisionOperation struct {
917 lro *longrunning.Operation
918 pollPath string
919 }
920
921 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
922 //
923 // See documentation of Poll for error-handling information.
924 func (op *TuneQaScorecardRevisionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.TuneQaScorecardRevisionResponse, error) {
925 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
926 var resp contactcenterinsightspb.TuneQaScorecardRevisionResponse
927 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
928 return nil, err
929 }
930 return &resp, nil
931 }
932
933 // Poll fetches the latest state of the long-running operation.
934 //
935 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
936 //
937 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
938 // the operation has completed with failure, the error is returned and op.Done will return true.
939 // If Poll succeeds and the operation has completed successfully,
940 // op.Done will return true, and the response of the operation is returned.
941 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
942 func (op *TuneQaScorecardRevisionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.TuneQaScorecardRevisionResponse, error) {
943 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
944 var resp contactcenterinsightspb.TuneQaScorecardRevisionResponse
945 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
946 return nil, err
947 }
948 if !op.Done() {
949 return nil, nil
950 }
951 return &resp, nil
952 }
953
954 // Metadata returns metadata associated with the long-running operation.
955 // Metadata itself does not contact the server, but Poll does.
956 // To get the latest metadata, call this method after a successful call to Poll.
957 // If the metadata is not available, the returned metadata and error are both nil.
958 func (op *TuneQaScorecardRevisionOperation) Metadata() (*contactcenterinsightspb.TuneQaScorecardRevisionMetadata, error) {
959 var meta contactcenterinsightspb.TuneQaScorecardRevisionMetadata
960 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
961 return nil, nil
962 } else if err != nil {
963 return nil, err
964 }
965 return &meta, nil
966 }
967
968 // Done reports whether the long-running operation has completed.
969 func (op *TuneQaScorecardRevisionOperation) Done() bool {
970 return op.lro.Done()
971 }
972
973 // Name returns the name of the long-running operation.
974 // The name is assigned by the server and is unique within the service from which the operation is created.
975 func (op *TuneQaScorecardRevisionOperation) Name() string {
976 return op.lro.Name()
977 }
978
979 // UndeployIssueModelOperation manages a long-running operation from UndeployIssueModel.
980 type UndeployIssueModelOperation struct {
981 lro *longrunning.Operation
982 pollPath string
983 }
984
985 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
986 //
987 // See documentation of Poll for error-handling information.
988 func (op *UndeployIssueModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.UndeployIssueModelResponse, error) {
989 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
990 var resp contactcenterinsightspb.UndeployIssueModelResponse
991 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
992 return nil, err
993 }
994 return &resp, nil
995 }
996
997 // Poll fetches the latest state of the long-running operation.
998 //
999 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1000 //
1001 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1002 // the operation has completed with failure, the error is returned and op.Done will return true.
1003 // If Poll succeeds and the operation has completed successfully,
1004 // op.Done will return true, and the response of the operation is returned.
1005 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1006 func (op *UndeployIssueModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.UndeployIssueModelResponse, error) {
1007 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1008 var resp contactcenterinsightspb.UndeployIssueModelResponse
1009 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1010 return nil, err
1011 }
1012 if !op.Done() {
1013 return nil, nil
1014 }
1015 return &resp, nil
1016 }
1017
1018 // Metadata returns metadata associated with the long-running operation.
1019 // Metadata itself does not contact the server, but Poll does.
1020 // To get the latest metadata, call this method after a successful call to Poll.
1021 // If the metadata is not available, the returned metadata and error are both nil.
1022 func (op *UndeployIssueModelOperation) Metadata() (*contactcenterinsightspb.UndeployIssueModelMetadata, error) {
1023 var meta contactcenterinsightspb.UndeployIssueModelMetadata
1024 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1025 return nil, nil
1026 } else if err != nil {
1027 return nil, err
1028 }
1029 return &meta, nil
1030 }
1031
1032 // Done reports whether the long-running operation has completed.
1033 func (op *UndeployIssueModelOperation) Done() bool {
1034 return op.lro.Done()
1035 }
1036
1037 // Name returns the name of the long-running operation.
1038 // The name is assigned by the server and is unique within the service from which the operation is created.
1039 func (op *UndeployIssueModelOperation) Name() string {
1040 return op.lro.Name()
1041 }
1042
1043 // UploadConversationOperation manages a long-running operation from UploadConversation.
1044 type UploadConversationOperation struct {
1045 lro *longrunning.Operation
1046 pollPath string
1047 }
1048
1049 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1050 //
1051 // See documentation of Poll for error-handling information.
1052 func (op *UploadConversationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.Conversation, error) {
1053 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1054 var resp contactcenterinsightspb.Conversation
1055 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1056 return nil, err
1057 }
1058 return &resp, nil
1059 }
1060
1061 // Poll fetches the latest state of the long-running operation.
1062 //
1063 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1064 //
1065 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1066 // the operation has completed with failure, the error is returned and op.Done will return true.
1067 // If Poll succeeds and the operation has completed successfully,
1068 // op.Done will return true, and the response of the operation is returned.
1069 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1070 func (op *UploadConversationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*contactcenterinsightspb.Conversation, error) {
1071 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1072 var resp contactcenterinsightspb.Conversation
1073 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1074 return nil, err
1075 }
1076 if !op.Done() {
1077 return nil, nil
1078 }
1079 return &resp, nil
1080 }
1081
1082 // Metadata returns metadata associated with the long-running operation.
1083 // Metadata itself does not contact the server, but Poll does.
1084 // To get the latest metadata, call this method after a successful call to Poll.
1085 // If the metadata is not available, the returned metadata and error are both nil.
1086 func (op *UploadConversationOperation) Metadata() (*contactcenterinsightspb.UploadConversationMetadata, error) {
1087 var meta contactcenterinsightspb.UploadConversationMetadata
1088 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1089 return nil, nil
1090 } else if err != nil {
1091 return nil, err
1092 }
1093 return &meta, nil
1094 }
1095
1096 // Done reports whether the long-running operation has completed.
1097 func (op *UploadConversationOperation) Done() bool {
1098 return op.lro.Done()
1099 }
1100
1101 // Name returns the name of the long-running operation.
1102 // The name is assigned by the server and is unique within the service from which the operation is created.
1103 func (op *UploadConversationOperation) Name() string {
1104 return op.lro.Name()
1105 }
1106
1107 // AnalysisIterator manages a stream of *contactcenterinsightspb.Analysis.
1108 type AnalysisIterator struct {
1109 items []*contactcenterinsightspb.Analysis
1110 pageInfo *iterator.PageInfo
1111 nextFunc func() error
1112
1113 // Response is the raw response for the current page.
1114 // It must be cast to the RPC response type.
1115 // Calling Next() or InternalFetch() updates this value.
1116 Response interface{}
1117
1118 // InternalFetch is for use by the Google Cloud Libraries only.
1119 // It is not part of the stable interface of this package.
1120 //
1121 // InternalFetch returns results from a single call to the underlying RPC.
1122 // The number of results is no greater than pageSize.
1123 // If there are no more results, nextPageToken is empty and err is nil.
1124 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.Analysis, nextPageToken string, err error)
1125 }
1126
1127 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1128 func (it *AnalysisIterator) PageInfo() *iterator.PageInfo {
1129 return it.pageInfo
1130 }
1131
1132 // Next returns the next result. Its second return value is iterator.Done if there are no more
1133 // results. Once Next returns Done, all subsequent calls will return Done.
1134 func (it *AnalysisIterator) Next() (*contactcenterinsightspb.Analysis, error) {
1135 var item *contactcenterinsightspb.Analysis
1136 if err := it.nextFunc(); err != nil {
1137 return item, err
1138 }
1139 item = it.items[0]
1140 it.items = it.items[1:]
1141 return item, nil
1142 }
1143
1144 func (it *AnalysisIterator) bufLen() int {
1145 return len(it.items)
1146 }
1147
1148 func (it *AnalysisIterator) takeBuf() interface{} {
1149 b := it.items
1150 it.items = nil
1151 return b
1152 }
1153
1154 // AnalysisRuleIterator manages a stream of *contactcenterinsightspb.AnalysisRule.
1155 type AnalysisRuleIterator struct {
1156 items []*contactcenterinsightspb.AnalysisRule
1157 pageInfo *iterator.PageInfo
1158 nextFunc func() error
1159
1160 // Response is the raw response for the current page.
1161 // It must be cast to the RPC response type.
1162 // Calling Next() or InternalFetch() updates this value.
1163 Response interface{}
1164
1165 // InternalFetch is for use by the Google Cloud Libraries only.
1166 // It is not part of the stable interface of this package.
1167 //
1168 // InternalFetch returns results from a single call to the underlying RPC.
1169 // The number of results is no greater than pageSize.
1170 // If there are no more results, nextPageToken is empty and err is nil.
1171 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.AnalysisRule, nextPageToken string, err error)
1172 }
1173
1174 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1175 func (it *AnalysisRuleIterator) PageInfo() *iterator.PageInfo {
1176 return it.pageInfo
1177 }
1178
1179 // Next returns the next result. Its second return value is iterator.Done if there are no more
1180 // results. Once Next returns Done, all subsequent calls will return Done.
1181 func (it *AnalysisRuleIterator) Next() (*contactcenterinsightspb.AnalysisRule, error) {
1182 var item *contactcenterinsightspb.AnalysisRule
1183 if err := it.nextFunc(); err != nil {
1184 return item, err
1185 }
1186 item = it.items[0]
1187 it.items = it.items[1:]
1188 return item, nil
1189 }
1190
1191 func (it *AnalysisRuleIterator) bufLen() int {
1192 return len(it.items)
1193 }
1194
1195 func (it *AnalysisRuleIterator) takeBuf() interface{} {
1196 b := it.items
1197 it.items = nil
1198 return b
1199 }
1200
1201 // ConversationIterator manages a stream of *contactcenterinsightspb.Conversation.
1202 type ConversationIterator struct {
1203 items []*contactcenterinsightspb.Conversation
1204 pageInfo *iterator.PageInfo
1205 nextFunc func() error
1206
1207 // Response is the raw response for the current page.
1208 // It must be cast to the RPC response type.
1209 // Calling Next() or InternalFetch() updates this value.
1210 Response interface{}
1211
1212 // InternalFetch is for use by the Google Cloud Libraries only.
1213 // It is not part of the stable interface of this package.
1214 //
1215 // InternalFetch returns results from a single call to the underlying RPC.
1216 // The number of results is no greater than pageSize.
1217 // If there are no more results, nextPageToken is empty and err is nil.
1218 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.Conversation, nextPageToken string, err error)
1219 }
1220
1221 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1222 func (it *ConversationIterator) PageInfo() *iterator.PageInfo {
1223 return it.pageInfo
1224 }
1225
1226 // Next returns the next result. Its second return value is iterator.Done if there are no more
1227 // results. Once Next returns Done, all subsequent calls will return Done.
1228 func (it *ConversationIterator) Next() (*contactcenterinsightspb.Conversation, error) {
1229 var item *contactcenterinsightspb.Conversation
1230 if err := it.nextFunc(); err != nil {
1231 return item, err
1232 }
1233 item = it.items[0]
1234 it.items = it.items[1:]
1235 return item, nil
1236 }
1237
1238 func (it *ConversationIterator) bufLen() int {
1239 return len(it.items)
1240 }
1241
1242 func (it *ConversationIterator) takeBuf() interface{} {
1243 b := it.items
1244 it.items = nil
1245 return b
1246 }
1247
1248 // FeedbackLabelIterator manages a stream of *contactcenterinsightspb.FeedbackLabel.
1249 type FeedbackLabelIterator struct {
1250 items []*contactcenterinsightspb.FeedbackLabel
1251 pageInfo *iterator.PageInfo
1252 nextFunc func() error
1253
1254 // Response is the raw response for the current page.
1255 // It must be cast to the RPC response type.
1256 // Calling Next() or InternalFetch() updates this value.
1257 Response interface{}
1258
1259 // InternalFetch is for use by the Google Cloud Libraries only.
1260 // It is not part of the stable interface of this package.
1261 //
1262 // InternalFetch returns results from a single call to the underlying RPC.
1263 // The number of results is no greater than pageSize.
1264 // If there are no more results, nextPageToken is empty and err is nil.
1265 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.FeedbackLabel, nextPageToken string, err error)
1266 }
1267
1268 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1269 func (it *FeedbackLabelIterator) PageInfo() *iterator.PageInfo {
1270 return it.pageInfo
1271 }
1272
1273 // Next returns the next result. Its second return value is iterator.Done if there are no more
1274 // results. Once Next returns Done, all subsequent calls will return Done.
1275 func (it *FeedbackLabelIterator) Next() (*contactcenterinsightspb.FeedbackLabel, error) {
1276 var item *contactcenterinsightspb.FeedbackLabel
1277 if err := it.nextFunc(); err != nil {
1278 return item, err
1279 }
1280 item = it.items[0]
1281 it.items = it.items[1:]
1282 return item, nil
1283 }
1284
1285 func (it *FeedbackLabelIterator) bufLen() int {
1286 return len(it.items)
1287 }
1288
1289 func (it *FeedbackLabelIterator) takeBuf() interface{} {
1290 b := it.items
1291 it.items = nil
1292 return b
1293 }
1294
1295 // OperationIterator manages a stream of *longrunningpb.Operation.
1296 type OperationIterator struct {
1297 items []*longrunningpb.Operation
1298 pageInfo *iterator.PageInfo
1299 nextFunc func() error
1300
1301 // Response is the raw response for the current page.
1302 // It must be cast to the RPC response type.
1303 // Calling Next() or InternalFetch() updates this value.
1304 Response interface{}
1305
1306 // InternalFetch is for use by the Google Cloud Libraries only.
1307 // It is not part of the stable interface of this package.
1308 //
1309 // InternalFetch returns results from a single call to the underlying RPC.
1310 // The number of results is no greater than pageSize.
1311 // If there are no more results, nextPageToken is empty and err is nil.
1312 InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
1313 }
1314
1315 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1316 func (it *OperationIterator) PageInfo() *iterator.PageInfo {
1317 return it.pageInfo
1318 }
1319
1320 // Next returns the next result. Its second return value is iterator.Done if there are no more
1321 // results. Once Next returns Done, all subsequent calls will return Done.
1322 func (it *OperationIterator) Next() (*longrunningpb.Operation, error) {
1323 var item *longrunningpb.Operation
1324 if err := it.nextFunc(); err != nil {
1325 return item, err
1326 }
1327 item = it.items[0]
1328 it.items = it.items[1:]
1329 return item, nil
1330 }
1331
1332 func (it *OperationIterator) bufLen() int {
1333 return len(it.items)
1334 }
1335
1336 func (it *OperationIterator) takeBuf() interface{} {
1337 b := it.items
1338 it.items = nil
1339 return b
1340 }
1341
1342 // PhraseMatcherIterator manages a stream of *contactcenterinsightspb.PhraseMatcher.
1343 type PhraseMatcherIterator struct {
1344 items []*contactcenterinsightspb.PhraseMatcher
1345 pageInfo *iterator.PageInfo
1346 nextFunc func() error
1347
1348 // Response is the raw response for the current page.
1349 // It must be cast to the RPC response type.
1350 // Calling Next() or InternalFetch() updates this value.
1351 Response interface{}
1352
1353 // InternalFetch is for use by the Google Cloud Libraries only.
1354 // It is not part of the stable interface of this package.
1355 //
1356 // InternalFetch returns results from a single call to the underlying RPC.
1357 // The number of results is no greater than pageSize.
1358 // If there are no more results, nextPageToken is empty and err is nil.
1359 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.PhraseMatcher, nextPageToken string, err error)
1360 }
1361
1362 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1363 func (it *PhraseMatcherIterator) PageInfo() *iterator.PageInfo {
1364 return it.pageInfo
1365 }
1366
1367 // Next returns the next result. Its second return value is iterator.Done if there are no more
1368 // results. Once Next returns Done, all subsequent calls will return Done.
1369 func (it *PhraseMatcherIterator) Next() (*contactcenterinsightspb.PhraseMatcher, error) {
1370 var item *contactcenterinsightspb.PhraseMatcher
1371 if err := it.nextFunc(); err != nil {
1372 return item, err
1373 }
1374 item = it.items[0]
1375 it.items = it.items[1:]
1376 return item, nil
1377 }
1378
1379 func (it *PhraseMatcherIterator) bufLen() int {
1380 return len(it.items)
1381 }
1382
1383 func (it *PhraseMatcherIterator) takeBuf() interface{} {
1384 b := it.items
1385 it.items = nil
1386 return b
1387 }
1388
1389 // QaQuestionIterator manages a stream of *contactcenterinsightspb.QaQuestion.
1390 type QaQuestionIterator struct {
1391 items []*contactcenterinsightspb.QaQuestion
1392 pageInfo *iterator.PageInfo
1393 nextFunc func() error
1394
1395 // Response is the raw response for the current page.
1396 // It must be cast to the RPC response type.
1397 // Calling Next() or InternalFetch() updates this value.
1398 Response interface{}
1399
1400 // InternalFetch is for use by the Google Cloud Libraries only.
1401 // It is not part of the stable interface of this package.
1402 //
1403 // InternalFetch returns results from a single call to the underlying RPC.
1404 // The number of results is no greater than pageSize.
1405 // If there are no more results, nextPageToken is empty and err is nil.
1406 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.QaQuestion, nextPageToken string, err error)
1407 }
1408
1409 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1410 func (it *QaQuestionIterator) PageInfo() *iterator.PageInfo {
1411 return it.pageInfo
1412 }
1413
1414 // Next returns the next result. Its second return value is iterator.Done if there are no more
1415 // results. Once Next returns Done, all subsequent calls will return Done.
1416 func (it *QaQuestionIterator) Next() (*contactcenterinsightspb.QaQuestion, error) {
1417 var item *contactcenterinsightspb.QaQuestion
1418 if err := it.nextFunc(); err != nil {
1419 return item, err
1420 }
1421 item = it.items[0]
1422 it.items = it.items[1:]
1423 return item, nil
1424 }
1425
1426 func (it *QaQuestionIterator) bufLen() int {
1427 return len(it.items)
1428 }
1429
1430 func (it *QaQuestionIterator) takeBuf() interface{} {
1431 b := it.items
1432 it.items = nil
1433 return b
1434 }
1435
1436 // QaScorecardIterator manages a stream of *contactcenterinsightspb.QaScorecard.
1437 type QaScorecardIterator struct {
1438 items []*contactcenterinsightspb.QaScorecard
1439 pageInfo *iterator.PageInfo
1440 nextFunc func() error
1441
1442 // Response is the raw response for the current page.
1443 // It must be cast to the RPC response type.
1444 // Calling Next() or InternalFetch() updates this value.
1445 Response interface{}
1446
1447 // InternalFetch is for use by the Google Cloud Libraries only.
1448 // It is not part of the stable interface of this package.
1449 //
1450 // InternalFetch returns results from a single call to the underlying RPC.
1451 // The number of results is no greater than pageSize.
1452 // If there are no more results, nextPageToken is empty and err is nil.
1453 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.QaScorecard, nextPageToken string, err error)
1454 }
1455
1456 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1457 func (it *QaScorecardIterator) PageInfo() *iterator.PageInfo {
1458 return it.pageInfo
1459 }
1460
1461 // Next returns the next result. Its second return value is iterator.Done if there are no more
1462 // results. Once Next returns Done, all subsequent calls will return Done.
1463 func (it *QaScorecardIterator) Next() (*contactcenterinsightspb.QaScorecard, error) {
1464 var item *contactcenterinsightspb.QaScorecard
1465 if err := it.nextFunc(); err != nil {
1466 return item, err
1467 }
1468 item = it.items[0]
1469 it.items = it.items[1:]
1470 return item, nil
1471 }
1472
1473 func (it *QaScorecardIterator) bufLen() int {
1474 return len(it.items)
1475 }
1476
1477 func (it *QaScorecardIterator) takeBuf() interface{} {
1478 b := it.items
1479 it.items = nil
1480 return b
1481 }
1482
1483 // QaScorecardRevisionIterator manages a stream of *contactcenterinsightspb.QaScorecardRevision.
1484 type QaScorecardRevisionIterator struct {
1485 items []*contactcenterinsightspb.QaScorecardRevision
1486 pageInfo *iterator.PageInfo
1487 nextFunc func() error
1488
1489 // Response is the raw response for the current page.
1490 // It must be cast to the RPC response type.
1491 // Calling Next() or InternalFetch() updates this value.
1492 Response interface{}
1493
1494 // InternalFetch is for use by the Google Cloud Libraries only.
1495 // It is not part of the stable interface of this package.
1496 //
1497 // InternalFetch returns results from a single call to the underlying RPC.
1498 // The number of results is no greater than pageSize.
1499 // If there are no more results, nextPageToken is empty and err is nil.
1500 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.QaScorecardRevision, nextPageToken string, err error)
1501 }
1502
1503 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1504 func (it *QaScorecardRevisionIterator) PageInfo() *iterator.PageInfo {
1505 return it.pageInfo
1506 }
1507
1508 // Next returns the next result. Its second return value is iterator.Done if there are no more
1509 // results. Once Next returns Done, all subsequent calls will return Done.
1510 func (it *QaScorecardRevisionIterator) Next() (*contactcenterinsightspb.QaScorecardRevision, error) {
1511 var item *contactcenterinsightspb.QaScorecardRevision
1512 if err := it.nextFunc(); err != nil {
1513 return item, err
1514 }
1515 item = it.items[0]
1516 it.items = it.items[1:]
1517 return item, nil
1518 }
1519
1520 func (it *QaScorecardRevisionIterator) bufLen() int {
1521 return len(it.items)
1522 }
1523
1524 func (it *QaScorecardRevisionIterator) takeBuf() interface{} {
1525 b := it.items
1526 it.items = nil
1527 return b
1528 }
1529
1530 // ViewIterator manages a stream of *contactcenterinsightspb.View.
1531 type ViewIterator struct {
1532 items []*contactcenterinsightspb.View
1533 pageInfo *iterator.PageInfo
1534 nextFunc func() error
1535
1536 // Response is the raw response for the current page.
1537 // It must be cast to the RPC response type.
1538 // Calling Next() or InternalFetch() updates this value.
1539 Response interface{}
1540
1541 // InternalFetch is for use by the Google Cloud Libraries only.
1542 // It is not part of the stable interface of this package.
1543 //
1544 // InternalFetch returns results from a single call to the underlying RPC.
1545 // The number of results is no greater than pageSize.
1546 // If there are no more results, nextPageToken is empty and err is nil.
1547 InternalFetch func(pageSize int, pageToken string) (results []*contactcenterinsightspb.View, nextPageToken string, err error)
1548 }
1549
1550 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1551 func (it *ViewIterator) PageInfo() *iterator.PageInfo {
1552 return it.pageInfo
1553 }
1554
1555 // Next returns the next result. Its second return value is iterator.Done if there are no more
1556 // results. Once Next returns Done, all subsequent calls will return Done.
1557 func (it *ViewIterator) Next() (*contactcenterinsightspb.View, error) {
1558 var item *contactcenterinsightspb.View
1559 if err := it.nextFunc(); err != nil {
1560 return item, err
1561 }
1562 item = it.items[0]
1563 it.items = it.items[1:]
1564 return item, nil
1565 }
1566
1567 func (it *ViewIterator) bufLen() int {
1568 return len(it.items)
1569 }
1570
1571 func (it *ViewIterator) takeBuf() interface{} {
1572 b := it.items
1573 it.items = nil
1574 return b
1575 }