Debian Codegraph @

visionai/apiv1/auxiliary.go

raw
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 visionai
18
19 import (
20 "context"
21 "time"
22
23 "cloud.google.com/go/longrunning"
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 visionaipb "cloud.google.com/go/visionai/apiv1/visionaipb"
26 gax "github.com/googleapis/gax-go/v2"
27 "google.golang.org/api/iterator"
28 )
29
30 // AddApplicationStreamInputOperation manages a long-running operation from AddApplicationStreamInput.
31 type AddApplicationStreamInputOperation 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 *AddApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, error) {
40 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
41 var resp visionaipb.AddApplicationStreamInputResponse
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 *AddApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AddApplicationStreamInputResponse, error) {
58 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
59 var resp visionaipb.AddApplicationStreamInputResponse
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 *AddApplicationStreamInputOperation) Metadata() (*visionaipb.OperationMetadata, error) {
74 var meta visionaipb.OperationMetadata
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 *AddApplicationStreamInputOperation) 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 *AddApplicationStreamInputOperation) Name() string {
91 return op.lro.Name()
92 }
93
94 // AnalyzeAssetOperation manages a long-running operation from AnalyzeAsset.
95 type AnalyzeAssetOperation 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 *AnalyzeAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, error) {
104 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
105 var resp visionaipb.AnalyzeAssetResponse
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 *AnalyzeAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeAssetResponse, error) {
122 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
123 var resp visionaipb.AnalyzeAssetResponse
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 *AnalyzeAssetOperation) Metadata() (*visionaipb.AnalyzeAssetMetadata, error) {
138 var meta visionaipb.AnalyzeAssetMetadata
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 *AnalyzeAssetOperation) 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 *AnalyzeAssetOperation) Name() string {
155 return op.lro.Name()
156 }
157
158 // AnalyzeCorpusOperation manages a long-running operation from AnalyzeCorpus.
159 type AnalyzeCorpusOperation 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 *AnalyzeCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, error) {
168 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
169 var resp visionaipb.AnalyzeCorpusResponse
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 *AnalyzeCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.AnalyzeCorpusResponse, error) {
186 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
187 var resp visionaipb.AnalyzeCorpusResponse
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 *AnalyzeCorpusOperation) Metadata() (*visionaipb.AnalyzeCorpusMetadata, error) {
202 var meta visionaipb.AnalyzeCorpusMetadata
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 *AnalyzeCorpusOperation) 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 *AnalyzeCorpusOperation) Name() string {
219 return op.lro.Name()
220 }
221
222 // BatchRunProcessOperation manages a long-running operation from BatchRunProcess.
223 type BatchRunProcessOperation 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 *BatchRunProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, error) {
232 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
233 var resp visionaipb.BatchRunProcessResponse
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 *BatchRunProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.BatchRunProcessResponse, error) {
250 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
251 var resp visionaipb.BatchRunProcessResponse
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 *BatchRunProcessOperation) Metadata() (*visionaipb.OperationMetadata, error) {
266 var meta visionaipb.OperationMetadata
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 *BatchRunProcessOperation) 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 *BatchRunProcessOperation) 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) (*visionaipb.Analysis, error) {
296 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
297 var resp visionaipb.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) (*visionaipb.Analysis, error) {
314 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
315 var resp visionaipb.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() (*visionaipb.OperationMetadata, error) {
330 var meta visionaipb.OperationMetadata
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 // CreateApplicationInstancesOperation manages a long-running operation from CreateApplicationInstances.
351 type CreateApplicationInstancesOperation 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 *CreateApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, error) {
360 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
361 var resp visionaipb.CreateApplicationInstancesResponse
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 *CreateApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.CreateApplicationInstancesResponse, error) {
378 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
379 var resp visionaipb.CreateApplicationInstancesResponse
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 *CreateApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error) {
394 var meta visionaipb.OperationMetadata
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 *CreateApplicationInstancesOperation) 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 *CreateApplicationInstancesOperation) Name() string {
411 return op.lro.Name()
412 }
413
414 // CreateApplicationOperation manages a long-running operation from CreateApplication.
415 type CreateApplicationOperation 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 *CreateApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error) {
424 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
425 var resp visionaipb.Application
426 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
427 return nil, err
428 }
429 return &resp, nil
430 }
431
432 // Poll fetches the latest state of the long-running operation.
433 //
434 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
435 //
436 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
437 // the operation has completed with failure, the error is returned and op.Done will return true.
438 // If Poll succeeds and the operation has completed successfully,
439 // op.Done will return true, and the response of the operation is returned.
440 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
441 func (op *CreateApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error) {
442 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
443 var resp visionaipb.Application
444 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
445 return nil, err
446 }
447 if !op.Done() {
448 return nil, nil
449 }
450 return &resp, nil
451 }
452
453 // Metadata returns metadata associated with the long-running operation.
454 // Metadata itself does not contact the server, but Poll does.
455 // To get the latest metadata, call this method after a successful call to Poll.
456 // If the metadata is not available, the returned metadata and error are both nil.
457 func (op *CreateApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error) {
458 var meta visionaipb.OperationMetadata
459 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
460 return nil, nil
461 } else if err != nil {
462 return nil, err
463 }
464 return &meta, nil
465 }
466
467 // Done reports whether the long-running operation has completed.
468 func (op *CreateApplicationOperation) Done() bool {
469 return op.lro.Done()
470 }
471
472 // Name returns the name of the long-running operation.
473 // The name is assigned by the server and is unique within the service from which the operation is created.
474 func (op *CreateApplicationOperation) Name() string {
475 return op.lro.Name()
476 }
477
478 // CreateClusterOperation manages a long-running operation from CreateCluster.
479 type CreateClusterOperation struct {
480 lro *longrunning.Operation
481 pollPath string
482 }
483
484 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
485 //
486 // See documentation of Poll for error-handling information.
487 func (op *CreateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error) {
488 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
489 var resp visionaipb.Cluster
490 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
491 return nil, err
492 }
493 return &resp, nil
494 }
495
496 // Poll fetches the latest state of the long-running operation.
497 //
498 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
499 //
500 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
501 // the operation has completed with failure, the error is returned and op.Done will return true.
502 // If Poll succeeds and the operation has completed successfully,
503 // op.Done will return true, and the response of the operation is returned.
504 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
505 func (op *CreateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error) {
506 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
507 var resp visionaipb.Cluster
508 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
509 return nil, err
510 }
511 if !op.Done() {
512 return nil, nil
513 }
514 return &resp, nil
515 }
516
517 // Metadata returns metadata associated with the long-running operation.
518 // Metadata itself does not contact the server, but Poll does.
519 // To get the latest metadata, call this method after a successful call to Poll.
520 // If the metadata is not available, the returned metadata and error are both nil.
521 func (op *CreateClusterOperation) Metadata() (*visionaipb.OperationMetadata, error) {
522 var meta visionaipb.OperationMetadata
523 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
524 return nil, nil
525 } else if err != nil {
526 return nil, err
527 }
528 return &meta, nil
529 }
530
531 // Done reports whether the long-running operation has completed.
532 func (op *CreateClusterOperation) Done() bool {
533 return op.lro.Done()
534 }
535
536 // Name returns the name of the long-running operation.
537 // The name is assigned by the server and is unique within the service from which the operation is created.
538 func (op *CreateClusterOperation) Name() string {
539 return op.lro.Name()
540 }
541
542 // CreateCollectionOperation manages a long-running operation from CreateCollection.
543 type CreateCollectionOperation struct {
544 lro *longrunning.Operation
545 pollPath string
546 }
547
548 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
549 //
550 // See documentation of Poll for error-handling information.
551 func (op *CreateCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, error) {
552 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
553 var resp visionaipb.Collection
554 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
555 return nil, err
556 }
557 return &resp, nil
558 }
559
560 // Poll fetches the latest state of the long-running operation.
561 //
562 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
563 //
564 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
565 // the operation has completed with failure, the error is returned and op.Done will return true.
566 // If Poll succeeds and the operation has completed successfully,
567 // op.Done will return true, and the response of the operation is returned.
568 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
569 func (op *CreateCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Collection, error) {
570 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
571 var resp visionaipb.Collection
572 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
573 return nil, err
574 }
575 if !op.Done() {
576 return nil, nil
577 }
578 return &resp, nil
579 }
580
581 // Metadata returns metadata associated with the long-running operation.
582 // Metadata itself does not contact the server, but Poll does.
583 // To get the latest metadata, call this method after a successful call to Poll.
584 // If the metadata is not available, the returned metadata and error are both nil.
585 func (op *CreateCollectionOperation) Metadata() (*visionaipb.CreateCollectionMetadata, error) {
586 var meta visionaipb.CreateCollectionMetadata
587 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
588 return nil, nil
589 } else if err != nil {
590 return nil, err
591 }
592 return &meta, nil
593 }
594
595 // Done reports whether the long-running operation has completed.
596 func (op *CreateCollectionOperation) Done() bool {
597 return op.lro.Done()
598 }
599
600 // Name returns the name of the long-running operation.
601 // The name is assigned by the server and is unique within the service from which the operation is created.
602 func (op *CreateCollectionOperation) Name() string {
603 return op.lro.Name()
604 }
605
606 // CreateCorpusOperation manages a long-running operation from CreateCorpus.
607 type CreateCorpusOperation struct {
608 lro *longrunning.Operation
609 pollPath string
610 }
611
612 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
613 //
614 // See documentation of Poll for error-handling information.
615 func (op *CreateCorpusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, error) {
616 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
617 var resp visionaipb.Corpus
618 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
619 return nil, err
620 }
621 return &resp, nil
622 }
623
624 // Poll fetches the latest state of the long-running operation.
625 //
626 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
627 //
628 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
629 // the operation has completed with failure, the error is returned and op.Done will return true.
630 // If Poll succeeds and the operation has completed successfully,
631 // op.Done will return true, and the response of the operation is returned.
632 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
633 func (op *CreateCorpusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Corpus, error) {
634 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
635 var resp visionaipb.Corpus
636 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
637 return nil, err
638 }
639 if !op.Done() {
640 return nil, nil
641 }
642 return &resp, nil
643 }
644
645 // Metadata returns metadata associated with the long-running operation.
646 // Metadata itself does not contact the server, but Poll does.
647 // To get the latest metadata, call this method after a successful call to Poll.
648 // If the metadata is not available, the returned metadata and error are both nil.
649 func (op *CreateCorpusOperation) Metadata() (*visionaipb.CreateCorpusMetadata, error) {
650 var meta visionaipb.CreateCorpusMetadata
651 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
652 return nil, nil
653 } else if err != nil {
654 return nil, err
655 }
656 return &meta, nil
657 }
658
659 // Done reports whether the long-running operation has completed.
660 func (op *CreateCorpusOperation) Done() bool {
661 return op.lro.Done()
662 }
663
664 // Name returns the name of the long-running operation.
665 // The name is assigned by the server and is unique within the service from which the operation is created.
666 func (op *CreateCorpusOperation) Name() string {
667 return op.lro.Name()
668 }
669
670 // CreateDraftOperation manages a long-running operation from CreateDraft.
671 type CreateDraftOperation struct {
672 lro *longrunning.Operation
673 pollPath string
674 }
675
676 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
677 //
678 // See documentation of Poll for error-handling information.
679 func (op *CreateDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error) {
680 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
681 var resp visionaipb.Draft
682 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
683 return nil, err
684 }
685 return &resp, nil
686 }
687
688 // Poll fetches the latest state of the long-running operation.
689 //
690 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
691 //
692 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
693 // the operation has completed with failure, the error is returned and op.Done will return true.
694 // If Poll succeeds and the operation has completed successfully,
695 // op.Done will return true, and the response of the operation is returned.
696 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
697 func (op *CreateDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error) {
698 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
699 var resp visionaipb.Draft
700 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
701 return nil, err
702 }
703 if !op.Done() {
704 return nil, nil
705 }
706 return &resp, nil
707 }
708
709 // Metadata returns metadata associated with the long-running operation.
710 // Metadata itself does not contact the server, but Poll does.
711 // To get the latest metadata, call this method after a successful call to Poll.
712 // If the metadata is not available, the returned metadata and error are both nil.
713 func (op *CreateDraftOperation) Metadata() (*visionaipb.OperationMetadata, error) {
714 var meta visionaipb.OperationMetadata
715 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
716 return nil, nil
717 } else if err != nil {
718 return nil, err
719 }
720 return &meta, nil
721 }
722
723 // Done reports whether the long-running operation has completed.
724 func (op *CreateDraftOperation) Done() bool {
725 return op.lro.Done()
726 }
727
728 // Name returns the name of the long-running operation.
729 // The name is assigned by the server and is unique within the service from which the operation is created.
730 func (op *CreateDraftOperation) Name() string {
731 return op.lro.Name()
732 }
733
734 // CreateEventOperation manages a long-running operation from CreateEvent.
735 type CreateEventOperation struct {
736 lro *longrunning.Operation
737 pollPath string
738 }
739
740 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
741 //
742 // See documentation of Poll for error-handling information.
743 func (op *CreateEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error) {
744 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
745 var resp visionaipb.Event
746 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
747 return nil, err
748 }
749 return &resp, nil
750 }
751
752 // Poll fetches the latest state of the long-running operation.
753 //
754 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
755 //
756 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
757 // the operation has completed with failure, the error is returned and op.Done will return true.
758 // If Poll succeeds and the operation has completed successfully,
759 // op.Done will return true, and the response of the operation is returned.
760 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
761 func (op *CreateEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error) {
762 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
763 var resp visionaipb.Event
764 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
765 return nil, err
766 }
767 if !op.Done() {
768 return nil, nil
769 }
770 return &resp, nil
771 }
772
773 // Metadata returns metadata associated with the long-running operation.
774 // Metadata itself does not contact the server, but Poll does.
775 // To get the latest metadata, call this method after a successful call to Poll.
776 // If the metadata is not available, the returned metadata and error are both nil.
777 func (op *CreateEventOperation) Metadata() (*visionaipb.OperationMetadata, error) {
778 var meta visionaipb.OperationMetadata
779 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
780 return nil, nil
781 } else if err != nil {
782 return nil, err
783 }
784 return &meta, nil
785 }
786
787 // Done reports whether the long-running operation has completed.
788 func (op *CreateEventOperation) Done() bool {
789 return op.lro.Done()
790 }
791
792 // Name returns the name of the long-running operation.
793 // The name is assigned by the server and is unique within the service from which the operation is created.
794 func (op *CreateEventOperation) Name() string {
795 return op.lro.Name()
796 }
797
798 // CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint.
799 type CreateIndexEndpointOperation struct {
800 lro *longrunning.Operation
801 pollPath string
802 }
803
804 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
805 //
806 // See documentation of Poll for error-handling information.
807 func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error) {
808 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
809 var resp visionaipb.IndexEndpoint
810 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
811 return nil, err
812 }
813 return &resp, nil
814 }
815
816 // Poll fetches the latest state of the long-running operation.
817 //
818 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
819 //
820 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
821 // the operation has completed with failure, the error is returned and op.Done will return true.
822 // If Poll succeeds and the operation has completed successfully,
823 // op.Done will return true, and the response of the operation is returned.
824 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
825 func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error) {
826 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
827 var resp visionaipb.IndexEndpoint
828 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
829 return nil, err
830 }
831 if !op.Done() {
832 return nil, nil
833 }
834 return &resp, nil
835 }
836
837 // Metadata returns metadata associated with the long-running operation.
838 // Metadata itself does not contact the server, but Poll does.
839 // To get the latest metadata, call this method after a successful call to Poll.
840 // If the metadata is not available, the returned metadata and error are both nil.
841 func (op *CreateIndexEndpointOperation) Metadata() (*visionaipb.CreateIndexEndpointMetadata, error) {
842 var meta visionaipb.CreateIndexEndpointMetadata
843 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
844 return nil, nil
845 } else if err != nil {
846 return nil, err
847 }
848 return &meta, nil
849 }
850
851 // Done reports whether the long-running operation has completed.
852 func (op *CreateIndexEndpointOperation) Done() bool {
853 return op.lro.Done()
854 }
855
856 // Name returns the name of the long-running operation.
857 // The name is assigned by the server and is unique within the service from which the operation is created.
858 func (op *CreateIndexEndpointOperation) Name() string {
859 return op.lro.Name()
860 }
861
862 // CreateIndexOperation manages a long-running operation from CreateIndex.
863 type CreateIndexOperation struct {
864 lro *longrunning.Operation
865 pollPath string
866 }
867
868 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
869 //
870 // See documentation of Poll for error-handling information.
871 func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error) {
872 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
873 var resp visionaipb.Index
874 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
875 return nil, err
876 }
877 return &resp, nil
878 }
879
880 // Poll fetches the latest state of the long-running operation.
881 //
882 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
883 //
884 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
885 // the operation has completed with failure, the error is returned and op.Done will return true.
886 // If Poll succeeds and the operation has completed successfully,
887 // op.Done will return true, and the response of the operation is returned.
888 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
889 func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error) {
890 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
891 var resp visionaipb.Index
892 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
893 return nil, err
894 }
895 if !op.Done() {
896 return nil, nil
897 }
898 return &resp, nil
899 }
900
901 // Metadata returns metadata associated with the long-running operation.
902 // Metadata itself does not contact the server, but Poll does.
903 // To get the latest metadata, call this method after a successful call to Poll.
904 // If the metadata is not available, the returned metadata and error are both nil.
905 func (op *CreateIndexOperation) Metadata() (*visionaipb.CreateIndexMetadata, error) {
906 var meta visionaipb.CreateIndexMetadata
907 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
908 return nil, nil
909 } else if err != nil {
910 return nil, err
911 }
912 return &meta, nil
913 }
914
915 // Done reports whether the long-running operation has completed.
916 func (op *CreateIndexOperation) Done() bool {
917 return op.lro.Done()
918 }
919
920 // Name returns the name of the long-running operation.
921 // The name is assigned by the server and is unique within the service from which the operation is created.
922 func (op *CreateIndexOperation) Name() string {
923 return op.lro.Name()
924 }
925
926 // CreateOperatorOperation manages a long-running operation from CreateOperator.
927 type CreateOperatorOperation struct {
928 lro *longrunning.Operation
929 pollPath string
930 }
931
932 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
933 //
934 // See documentation of Poll for error-handling information.
935 func (op *CreateOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error) {
936 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
937 var resp visionaipb.Operator
938 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
939 return nil, err
940 }
941 return &resp, nil
942 }
943
944 // Poll fetches the latest state of the long-running operation.
945 //
946 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
947 //
948 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
949 // the operation has completed with failure, the error is returned and op.Done will return true.
950 // If Poll succeeds and the operation has completed successfully,
951 // op.Done will return true, and the response of the operation is returned.
952 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
953 func (op *CreateOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error) {
954 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
955 var resp visionaipb.Operator
956 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
957 return nil, err
958 }
959 if !op.Done() {
960 return nil, nil
961 }
962 return &resp, nil
963 }
964
965 // Metadata returns metadata associated with the long-running operation.
966 // Metadata itself does not contact the server, but Poll does.
967 // To get the latest metadata, call this method after a successful call to Poll.
968 // If the metadata is not available, the returned metadata and error are both nil.
969 func (op *CreateOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error) {
970 var meta visionaipb.OperationMetadata
971 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
972 return nil, nil
973 } else if err != nil {
974 return nil, err
975 }
976 return &meta, nil
977 }
978
979 // Done reports whether the long-running operation has completed.
980 func (op *CreateOperatorOperation) Done() bool {
981 return op.lro.Done()
982 }
983
984 // Name returns the name of the long-running operation.
985 // The name is assigned by the server and is unique within the service from which the operation is created.
986 func (op *CreateOperatorOperation) Name() string {
987 return op.lro.Name()
988 }
989
990 // CreateProcessOperation manages a long-running operation from CreateProcess.
991 type CreateProcessOperation struct {
992 lro *longrunning.Operation
993 pollPath string
994 }
995
996 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
997 //
998 // See documentation of Poll for error-handling information.
999 func (op *CreateProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error) {
1000 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1001 var resp visionaipb.Process
1002 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1003 return nil, err
1004 }
1005 return &resp, nil
1006 }
1007
1008 // Poll fetches the latest state of the long-running operation.
1009 //
1010 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1011 //
1012 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1013 // the operation has completed with failure, the error is returned and op.Done will return true.
1014 // If Poll succeeds and the operation has completed successfully,
1015 // op.Done will return true, and the response of the operation is returned.
1016 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1017 func (op *CreateProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error) {
1018 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1019 var resp visionaipb.Process
1020 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1021 return nil, err
1022 }
1023 if !op.Done() {
1024 return nil, nil
1025 }
1026 return &resp, nil
1027 }
1028
1029 // Metadata returns metadata associated with the long-running operation.
1030 // Metadata itself does not contact the server, but Poll does.
1031 // To get the latest metadata, call this method after a successful call to Poll.
1032 // If the metadata is not available, the returned metadata and error are both nil.
1033 func (op *CreateProcessOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1034 var meta visionaipb.OperationMetadata
1035 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1036 return nil, nil
1037 } else if err != nil {
1038 return nil, err
1039 }
1040 return &meta, nil
1041 }
1042
1043 // Done reports whether the long-running operation has completed.
1044 func (op *CreateProcessOperation) Done() bool {
1045 return op.lro.Done()
1046 }
1047
1048 // Name returns the name of the long-running operation.
1049 // The name is assigned by the server and is unique within the service from which the operation is created.
1050 func (op *CreateProcessOperation) Name() string {
1051 return op.lro.Name()
1052 }
1053
1054 // CreateProcessorOperation manages a long-running operation from CreateProcessor.
1055 type CreateProcessorOperation struct {
1056 lro *longrunning.Operation
1057 pollPath string
1058 }
1059
1060 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1061 //
1062 // See documentation of Poll for error-handling information.
1063 func (op *CreateProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error) {
1064 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1065 var resp visionaipb.Processor
1066 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1067 return nil, err
1068 }
1069 return &resp, nil
1070 }
1071
1072 // Poll fetches the latest state of the long-running operation.
1073 //
1074 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1075 //
1076 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1077 // the operation has completed with failure, the error is returned and op.Done will return true.
1078 // If Poll succeeds and the operation has completed successfully,
1079 // op.Done will return true, and the response of the operation is returned.
1080 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1081 func (op *CreateProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error) {
1082 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1083 var resp visionaipb.Processor
1084 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1085 return nil, err
1086 }
1087 if !op.Done() {
1088 return nil, nil
1089 }
1090 return &resp, nil
1091 }
1092
1093 // Metadata returns metadata associated with the long-running operation.
1094 // Metadata itself does not contact the server, but Poll does.
1095 // To get the latest metadata, call this method after a successful call to Poll.
1096 // If the metadata is not available, the returned metadata and error are both nil.
1097 func (op *CreateProcessorOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1098 var meta visionaipb.OperationMetadata
1099 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1100 return nil, nil
1101 } else if err != nil {
1102 return nil, err
1103 }
1104 return &meta, nil
1105 }
1106
1107 // Done reports whether the long-running operation has completed.
1108 func (op *CreateProcessorOperation) Done() bool {
1109 return op.lro.Done()
1110 }
1111
1112 // Name returns the name of the long-running operation.
1113 // The name is assigned by the server and is unique within the service from which the operation is created.
1114 func (op *CreateProcessorOperation) Name() string {
1115 return op.lro.Name()
1116 }
1117
1118 // CreateSeriesOperation manages a long-running operation from CreateSeries.
1119 type CreateSeriesOperation struct {
1120 lro *longrunning.Operation
1121 pollPath string
1122 }
1123
1124 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1125 //
1126 // See documentation of Poll for error-handling information.
1127 func (op *CreateSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error) {
1128 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1129 var resp visionaipb.Series
1130 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1131 return nil, err
1132 }
1133 return &resp, nil
1134 }
1135
1136 // Poll fetches the latest state of the long-running operation.
1137 //
1138 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1139 //
1140 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1141 // the operation has completed with failure, the error is returned and op.Done will return true.
1142 // If Poll succeeds and the operation has completed successfully,
1143 // op.Done will return true, and the response of the operation is returned.
1144 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1145 func (op *CreateSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error) {
1146 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1147 var resp visionaipb.Series
1148 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1149 return nil, err
1150 }
1151 if !op.Done() {
1152 return nil, nil
1153 }
1154 return &resp, nil
1155 }
1156
1157 // Metadata returns metadata associated with the long-running operation.
1158 // Metadata itself does not contact the server, but Poll does.
1159 // To get the latest metadata, call this method after a successful call to Poll.
1160 // If the metadata is not available, the returned metadata and error are both nil.
1161 func (op *CreateSeriesOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1162 var meta visionaipb.OperationMetadata
1163 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1164 return nil, nil
1165 } else if err != nil {
1166 return nil, err
1167 }
1168 return &meta, nil
1169 }
1170
1171 // Done reports whether the long-running operation has completed.
1172 func (op *CreateSeriesOperation) Done() bool {
1173 return op.lro.Done()
1174 }
1175
1176 // Name returns the name of the long-running operation.
1177 // The name is assigned by the server and is unique within the service from which the operation is created.
1178 func (op *CreateSeriesOperation) Name() string {
1179 return op.lro.Name()
1180 }
1181
1182 // CreateStreamOperation manages a long-running operation from CreateStream.
1183 type CreateStreamOperation struct {
1184 lro *longrunning.Operation
1185 pollPath string
1186 }
1187
1188 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1189 //
1190 // See documentation of Poll for error-handling information.
1191 func (op *CreateStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error) {
1192 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1193 var resp visionaipb.Stream
1194 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1195 return nil, err
1196 }
1197 return &resp, nil
1198 }
1199
1200 // Poll fetches the latest state of the long-running operation.
1201 //
1202 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1203 //
1204 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1205 // the operation has completed with failure, the error is returned and op.Done will return true.
1206 // If Poll succeeds and the operation has completed successfully,
1207 // op.Done will return true, and the response of the operation is returned.
1208 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1209 func (op *CreateStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error) {
1210 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1211 var resp visionaipb.Stream
1212 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1213 return nil, err
1214 }
1215 if !op.Done() {
1216 return nil, nil
1217 }
1218 return &resp, nil
1219 }
1220
1221 // Metadata returns metadata associated with the long-running operation.
1222 // Metadata itself does not contact the server, but Poll does.
1223 // To get the latest metadata, call this method after a successful call to Poll.
1224 // If the metadata is not available, the returned metadata and error are both nil.
1225 func (op *CreateStreamOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1226 var meta visionaipb.OperationMetadata
1227 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1228 return nil, nil
1229 } else if err != nil {
1230 return nil, err
1231 }
1232 return &meta, nil
1233 }
1234
1235 // Done reports whether the long-running operation has completed.
1236 func (op *CreateStreamOperation) Done() bool {
1237 return op.lro.Done()
1238 }
1239
1240 // Name returns the name of the long-running operation.
1241 // The name is assigned by the server and is unique within the service from which the operation is created.
1242 func (op *CreateStreamOperation) Name() string {
1243 return op.lro.Name()
1244 }
1245
1246 // DeleteAnalysisOperation manages a long-running operation from DeleteAnalysis.
1247 type DeleteAnalysisOperation struct {
1248 lro *longrunning.Operation
1249 pollPath string
1250 }
1251
1252 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1253 //
1254 // See documentation of Poll for error-handling information.
1255 func (op *DeleteAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1256 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1257 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1258 }
1259
1260 // Poll fetches the latest state of the long-running operation.
1261 //
1262 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1263 //
1264 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1265 // the operation has completed with failure, the error is returned and op.Done will return true.
1266 // If Poll succeeds and the operation has completed successfully,
1267 // op.Done will return true, and the response of the operation is returned.
1268 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1269 func (op *DeleteAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1270 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1271 return op.lro.Poll(ctx, nil, opts...)
1272 }
1273
1274 // Metadata returns metadata associated with the long-running operation.
1275 // Metadata itself does not contact the server, but Poll does.
1276 // To get the latest metadata, call this method after a successful call to Poll.
1277 // If the metadata is not available, the returned metadata and error are both nil.
1278 func (op *DeleteAnalysisOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1279 var meta visionaipb.OperationMetadata
1280 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1281 return nil, nil
1282 } else if err != nil {
1283 return nil, err
1284 }
1285 return &meta, nil
1286 }
1287
1288 // Done reports whether the long-running operation has completed.
1289 func (op *DeleteAnalysisOperation) Done() bool {
1290 return op.lro.Done()
1291 }
1292
1293 // Name returns the name of the long-running operation.
1294 // The name is assigned by the server and is unique within the service from which the operation is created.
1295 func (op *DeleteAnalysisOperation) Name() string {
1296 return op.lro.Name()
1297 }
1298
1299 // DeleteApplicationInstancesOperation manages a long-running operation from DeleteApplicationInstances.
1300 type DeleteApplicationInstancesOperation struct {
1301 lro *longrunning.Operation
1302 pollPath string
1303 }
1304
1305 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1306 //
1307 // See documentation of Poll for error-handling information.
1308 func (op *DeleteApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, error) {
1309 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1310 var resp visionaipb.Instance
1311 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1312 return nil, err
1313 }
1314 return &resp, nil
1315 }
1316
1317 // Poll fetches the latest state of the long-running operation.
1318 //
1319 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1320 //
1321 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1322 // the operation has completed with failure, the error is returned and op.Done will return true.
1323 // If Poll succeeds and the operation has completed successfully,
1324 // op.Done will return true, and the response of the operation is returned.
1325 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1326 func (op *DeleteApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Instance, error) {
1327 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1328 var resp visionaipb.Instance
1329 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1330 return nil, err
1331 }
1332 if !op.Done() {
1333 return nil, nil
1334 }
1335 return &resp, nil
1336 }
1337
1338 // Metadata returns metadata associated with the long-running operation.
1339 // Metadata itself does not contact the server, but Poll does.
1340 // To get the latest metadata, call this method after a successful call to Poll.
1341 // If the metadata is not available, the returned metadata and error are both nil.
1342 func (op *DeleteApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1343 var meta visionaipb.OperationMetadata
1344 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1345 return nil, nil
1346 } else if err != nil {
1347 return nil, err
1348 }
1349 return &meta, nil
1350 }
1351
1352 // Done reports whether the long-running operation has completed.
1353 func (op *DeleteApplicationInstancesOperation) Done() bool {
1354 return op.lro.Done()
1355 }
1356
1357 // Name returns the name of the long-running operation.
1358 // The name is assigned by the server and is unique within the service from which the operation is created.
1359 func (op *DeleteApplicationInstancesOperation) Name() string {
1360 return op.lro.Name()
1361 }
1362
1363 // DeleteApplicationOperation manages a long-running operation from DeleteApplication.
1364 type DeleteApplicationOperation struct {
1365 lro *longrunning.Operation
1366 pollPath string
1367 }
1368
1369 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1370 //
1371 // See documentation of Poll for error-handling information.
1372 func (op *DeleteApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1373 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1374 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1375 }
1376
1377 // Poll fetches the latest state of the long-running operation.
1378 //
1379 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1380 //
1381 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1382 // the operation has completed with failure, the error is returned and op.Done will return true.
1383 // If Poll succeeds and the operation has completed successfully,
1384 // op.Done will return true, and the response of the operation is returned.
1385 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1386 func (op *DeleteApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1387 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1388 return op.lro.Poll(ctx, nil, opts...)
1389 }
1390
1391 // Metadata returns metadata associated with the long-running operation.
1392 // Metadata itself does not contact the server, but Poll does.
1393 // To get the latest metadata, call this method after a successful call to Poll.
1394 // If the metadata is not available, the returned metadata and error are both nil.
1395 func (op *DeleteApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1396 var meta visionaipb.OperationMetadata
1397 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1398 return nil, nil
1399 } else if err != nil {
1400 return nil, err
1401 }
1402 return &meta, nil
1403 }
1404
1405 // Done reports whether the long-running operation has completed.
1406 func (op *DeleteApplicationOperation) Done() bool {
1407 return op.lro.Done()
1408 }
1409
1410 // Name returns the name of the long-running operation.
1411 // The name is assigned by the server and is unique within the service from which the operation is created.
1412 func (op *DeleteApplicationOperation) Name() string {
1413 return op.lro.Name()
1414 }
1415
1416 // DeleteAssetOperation manages a long-running operation from DeleteAsset.
1417 type DeleteAssetOperation struct {
1418 lro *longrunning.Operation
1419 pollPath string
1420 }
1421
1422 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1423 //
1424 // See documentation of Poll for error-handling information.
1425 func (op *DeleteAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1426 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1427 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1428 }
1429
1430 // Poll fetches the latest state of the long-running operation.
1431 //
1432 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1433 //
1434 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1435 // the operation has completed with failure, the error is returned and op.Done will return true.
1436 // If Poll succeeds and the operation has completed successfully,
1437 // op.Done will return true, and the response of the operation is returned.
1438 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1439 func (op *DeleteAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1440 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1441 return op.lro.Poll(ctx, nil, opts...)
1442 }
1443
1444 // Metadata returns metadata associated with the long-running operation.
1445 // Metadata itself does not contact the server, but Poll does.
1446 // To get the latest metadata, call this method after a successful call to Poll.
1447 // If the metadata is not available, the returned metadata and error are both nil.
1448 func (op *DeleteAssetOperation) Metadata() (*visionaipb.DeleteAssetMetadata, error) {
1449 var meta visionaipb.DeleteAssetMetadata
1450 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1451 return nil, nil
1452 } else if err != nil {
1453 return nil, err
1454 }
1455 return &meta, nil
1456 }
1457
1458 // Done reports whether the long-running operation has completed.
1459 func (op *DeleteAssetOperation) Done() bool {
1460 return op.lro.Done()
1461 }
1462
1463 // Name returns the name of the long-running operation.
1464 // The name is assigned by the server and is unique within the service from which the operation is created.
1465 func (op *DeleteAssetOperation) Name() string {
1466 return op.lro.Name()
1467 }
1468
1469 // DeleteClusterOperation manages a long-running operation from DeleteCluster.
1470 type DeleteClusterOperation struct {
1471 lro *longrunning.Operation
1472 pollPath string
1473 }
1474
1475 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1476 //
1477 // See documentation of Poll for error-handling information.
1478 func (op *DeleteClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1479 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1480 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1481 }
1482
1483 // Poll fetches the latest state of the long-running operation.
1484 //
1485 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1486 //
1487 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1488 // the operation has completed with failure, the error is returned and op.Done will return true.
1489 // If Poll succeeds and the operation has completed successfully,
1490 // op.Done will return true, and the response of the operation is returned.
1491 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1492 func (op *DeleteClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1493 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1494 return op.lro.Poll(ctx, nil, opts...)
1495 }
1496
1497 // Metadata returns metadata associated with the long-running operation.
1498 // Metadata itself does not contact the server, but Poll does.
1499 // To get the latest metadata, call this method after a successful call to Poll.
1500 // If the metadata is not available, the returned metadata and error are both nil.
1501 func (op *DeleteClusterOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1502 var meta visionaipb.OperationMetadata
1503 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1504 return nil, nil
1505 } else if err != nil {
1506 return nil, err
1507 }
1508 return &meta, nil
1509 }
1510
1511 // Done reports whether the long-running operation has completed.
1512 func (op *DeleteClusterOperation) Done() bool {
1513 return op.lro.Done()
1514 }
1515
1516 // Name returns the name of the long-running operation.
1517 // The name is assigned by the server and is unique within the service from which the operation is created.
1518 func (op *DeleteClusterOperation) Name() string {
1519 return op.lro.Name()
1520 }
1521
1522 // DeleteCollectionOperation manages a long-running operation from DeleteCollection.
1523 type DeleteCollectionOperation struct {
1524 lro *longrunning.Operation
1525 pollPath string
1526 }
1527
1528 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1529 //
1530 // See documentation of Poll for error-handling information.
1531 func (op *DeleteCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1532 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1533 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1534 }
1535
1536 // Poll fetches the latest state of the long-running operation.
1537 //
1538 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1539 //
1540 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1541 // the operation has completed with failure, the error is returned and op.Done will return true.
1542 // If Poll succeeds and the operation has completed successfully,
1543 // op.Done will return true, and the response of the operation is returned.
1544 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1545 func (op *DeleteCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1546 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1547 return op.lro.Poll(ctx, nil, opts...)
1548 }
1549
1550 // Metadata returns metadata associated with the long-running operation.
1551 // Metadata itself does not contact the server, but Poll does.
1552 // To get the latest metadata, call this method after a successful call to Poll.
1553 // If the metadata is not available, the returned metadata and error are both nil.
1554 func (op *DeleteCollectionOperation) Metadata() (*visionaipb.DeleteCollectionMetadata, error) {
1555 var meta visionaipb.DeleteCollectionMetadata
1556 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1557 return nil, nil
1558 } else if err != nil {
1559 return nil, err
1560 }
1561 return &meta, nil
1562 }
1563
1564 // Done reports whether the long-running operation has completed.
1565 func (op *DeleteCollectionOperation) Done() bool {
1566 return op.lro.Done()
1567 }
1568
1569 // Name returns the name of the long-running operation.
1570 // The name is assigned by the server and is unique within the service from which the operation is created.
1571 func (op *DeleteCollectionOperation) Name() string {
1572 return op.lro.Name()
1573 }
1574
1575 // DeleteDraftOperation manages a long-running operation from DeleteDraft.
1576 type DeleteDraftOperation struct {
1577 lro *longrunning.Operation
1578 pollPath string
1579 }
1580
1581 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1582 //
1583 // See documentation of Poll for error-handling information.
1584 func (op *DeleteDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1585 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1586 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1587 }
1588
1589 // Poll fetches the latest state of the long-running operation.
1590 //
1591 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1592 //
1593 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1594 // the operation has completed with failure, the error is returned and op.Done will return true.
1595 // If Poll succeeds and the operation has completed successfully,
1596 // op.Done will return true, and the response of the operation is returned.
1597 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1598 func (op *DeleteDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1599 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1600 return op.lro.Poll(ctx, nil, opts...)
1601 }
1602
1603 // Metadata returns metadata associated with the long-running operation.
1604 // Metadata itself does not contact the server, but Poll does.
1605 // To get the latest metadata, call this method after a successful call to Poll.
1606 // If the metadata is not available, the returned metadata and error are both nil.
1607 func (op *DeleteDraftOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1608 var meta visionaipb.OperationMetadata
1609 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1610 return nil, nil
1611 } else if err != nil {
1612 return nil, err
1613 }
1614 return &meta, nil
1615 }
1616
1617 // Done reports whether the long-running operation has completed.
1618 func (op *DeleteDraftOperation) Done() bool {
1619 return op.lro.Done()
1620 }
1621
1622 // Name returns the name of the long-running operation.
1623 // The name is assigned by the server and is unique within the service from which the operation is created.
1624 func (op *DeleteDraftOperation) Name() string {
1625 return op.lro.Name()
1626 }
1627
1628 // DeleteEventOperation manages a long-running operation from DeleteEvent.
1629 type DeleteEventOperation struct {
1630 lro *longrunning.Operation
1631 pollPath string
1632 }
1633
1634 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1635 //
1636 // See documentation of Poll for error-handling information.
1637 func (op *DeleteEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1638 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1639 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1640 }
1641
1642 // Poll fetches the latest state of the long-running operation.
1643 //
1644 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1645 //
1646 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1647 // the operation has completed with failure, the error is returned and op.Done will return true.
1648 // If Poll succeeds and the operation has completed successfully,
1649 // op.Done will return true, and the response of the operation is returned.
1650 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1651 func (op *DeleteEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1652 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1653 return op.lro.Poll(ctx, nil, opts...)
1654 }
1655
1656 // Metadata returns metadata associated with the long-running operation.
1657 // Metadata itself does not contact the server, but Poll does.
1658 // To get the latest metadata, call this method after a successful call to Poll.
1659 // If the metadata is not available, the returned metadata and error are both nil.
1660 func (op *DeleteEventOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1661 var meta visionaipb.OperationMetadata
1662 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1663 return nil, nil
1664 } else if err != nil {
1665 return nil, err
1666 }
1667 return &meta, nil
1668 }
1669
1670 // Done reports whether the long-running operation has completed.
1671 func (op *DeleteEventOperation) Done() bool {
1672 return op.lro.Done()
1673 }
1674
1675 // Name returns the name of the long-running operation.
1676 // The name is assigned by the server and is unique within the service from which the operation is created.
1677 func (op *DeleteEventOperation) Name() string {
1678 return op.lro.Name()
1679 }
1680
1681 // DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint.
1682 type DeleteIndexEndpointOperation struct {
1683 lro *longrunning.Operation
1684 pollPath string
1685 }
1686
1687 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1688 //
1689 // See documentation of Poll for error-handling information.
1690 func (op *DeleteIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1691 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1692 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1693 }
1694
1695 // Poll fetches the latest state of the long-running operation.
1696 //
1697 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1698 //
1699 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1700 // the operation has completed with failure, the error is returned and op.Done will return true.
1701 // If Poll succeeds and the operation has completed successfully,
1702 // op.Done will return true, and the response of the operation is returned.
1703 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1704 func (op *DeleteIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1705 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1706 return op.lro.Poll(ctx, nil, opts...)
1707 }
1708
1709 // Metadata returns metadata associated with the long-running operation.
1710 // Metadata itself does not contact the server, but Poll does.
1711 // To get the latest metadata, call this method after a successful call to Poll.
1712 // If the metadata is not available, the returned metadata and error are both nil.
1713 func (op *DeleteIndexEndpointOperation) Metadata() (*visionaipb.DeleteIndexEndpointMetadata, error) {
1714 var meta visionaipb.DeleteIndexEndpointMetadata
1715 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1716 return nil, nil
1717 } else if err != nil {
1718 return nil, err
1719 }
1720 return &meta, nil
1721 }
1722
1723 // Done reports whether the long-running operation has completed.
1724 func (op *DeleteIndexEndpointOperation) Done() bool {
1725 return op.lro.Done()
1726 }
1727
1728 // Name returns the name of the long-running operation.
1729 // The name is assigned by the server and is unique within the service from which the operation is created.
1730 func (op *DeleteIndexEndpointOperation) Name() string {
1731 return op.lro.Name()
1732 }
1733
1734 // DeleteIndexOperation manages a long-running operation from DeleteIndex.
1735 type DeleteIndexOperation struct {
1736 lro *longrunning.Operation
1737 pollPath string
1738 }
1739
1740 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1741 //
1742 // See documentation of Poll for error-handling information.
1743 func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1744 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1745 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1746 }
1747
1748 // Poll fetches the latest state of the long-running operation.
1749 //
1750 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1751 //
1752 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1753 // the operation has completed with failure, the error is returned and op.Done will return true.
1754 // If Poll succeeds and the operation has completed successfully,
1755 // op.Done will return true, and the response of the operation is returned.
1756 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1757 func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1758 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1759 return op.lro.Poll(ctx, nil, opts...)
1760 }
1761
1762 // Metadata returns metadata associated with the long-running operation.
1763 // Metadata itself does not contact the server, but Poll does.
1764 // To get the latest metadata, call this method after a successful call to Poll.
1765 // If the metadata is not available, the returned metadata and error are both nil.
1766 func (op *DeleteIndexOperation) Metadata() (*visionaipb.DeleteIndexMetadata, error) {
1767 var meta visionaipb.DeleteIndexMetadata
1768 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1769 return nil, nil
1770 } else if err != nil {
1771 return nil, err
1772 }
1773 return &meta, nil
1774 }
1775
1776 // Done reports whether the long-running operation has completed.
1777 func (op *DeleteIndexOperation) Done() bool {
1778 return op.lro.Done()
1779 }
1780
1781 // Name returns the name of the long-running operation.
1782 // The name is assigned by the server and is unique within the service from which the operation is created.
1783 func (op *DeleteIndexOperation) Name() string {
1784 return op.lro.Name()
1785 }
1786
1787 // DeleteOperatorOperation manages a long-running operation from DeleteOperator.
1788 type DeleteOperatorOperation struct {
1789 lro *longrunning.Operation
1790 pollPath string
1791 }
1792
1793 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1794 //
1795 // See documentation of Poll for error-handling information.
1796 func (op *DeleteOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1797 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1798 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1799 }
1800
1801 // Poll fetches the latest state of the long-running operation.
1802 //
1803 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1804 //
1805 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1806 // the operation has completed with failure, the error is returned and op.Done will return true.
1807 // If Poll succeeds and the operation has completed successfully,
1808 // op.Done will return true, and the response of the operation is returned.
1809 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1810 func (op *DeleteOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1811 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1812 return op.lro.Poll(ctx, nil, opts...)
1813 }
1814
1815 // Metadata returns metadata associated with the long-running operation.
1816 // Metadata itself does not contact the server, but Poll does.
1817 // To get the latest metadata, call this method after a successful call to Poll.
1818 // If the metadata is not available, the returned metadata and error are both nil.
1819 func (op *DeleteOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1820 var meta visionaipb.OperationMetadata
1821 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1822 return nil, nil
1823 } else if err != nil {
1824 return nil, err
1825 }
1826 return &meta, nil
1827 }
1828
1829 // Done reports whether the long-running operation has completed.
1830 func (op *DeleteOperatorOperation) Done() bool {
1831 return op.lro.Done()
1832 }
1833
1834 // Name returns the name of the long-running operation.
1835 // The name is assigned by the server and is unique within the service from which the operation is created.
1836 func (op *DeleteOperatorOperation) Name() string {
1837 return op.lro.Name()
1838 }
1839
1840 // DeleteProcessOperation manages a long-running operation from DeleteProcess.
1841 type DeleteProcessOperation struct {
1842 lro *longrunning.Operation
1843 pollPath string
1844 }
1845
1846 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1847 //
1848 // See documentation of Poll for error-handling information.
1849 func (op *DeleteProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1850 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1851 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1852 }
1853
1854 // Poll fetches the latest state of the long-running operation.
1855 //
1856 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1857 //
1858 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1859 // the operation has completed with failure, the error is returned and op.Done will return true.
1860 // If Poll succeeds and the operation has completed successfully,
1861 // op.Done will return true, and the response of the operation is returned.
1862 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1863 func (op *DeleteProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1864 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1865 return op.lro.Poll(ctx, nil, opts...)
1866 }
1867
1868 // Metadata returns metadata associated with the long-running operation.
1869 // Metadata itself does not contact the server, but Poll does.
1870 // To get the latest metadata, call this method after a successful call to Poll.
1871 // If the metadata is not available, the returned metadata and error are both nil.
1872 func (op *DeleteProcessOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1873 var meta visionaipb.OperationMetadata
1874 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1875 return nil, nil
1876 } else if err != nil {
1877 return nil, err
1878 }
1879 return &meta, nil
1880 }
1881
1882 // Done reports whether the long-running operation has completed.
1883 func (op *DeleteProcessOperation) Done() bool {
1884 return op.lro.Done()
1885 }
1886
1887 // Name returns the name of the long-running operation.
1888 // The name is assigned by the server and is unique within the service from which the operation is created.
1889 func (op *DeleteProcessOperation) Name() string {
1890 return op.lro.Name()
1891 }
1892
1893 // DeleteProcessorOperation manages a long-running operation from DeleteProcessor.
1894 type DeleteProcessorOperation struct {
1895 lro *longrunning.Operation
1896 pollPath string
1897 }
1898
1899 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1900 //
1901 // See documentation of Poll for error-handling information.
1902 func (op *DeleteProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1903 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1904 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1905 }
1906
1907 // Poll fetches the latest state of the long-running operation.
1908 //
1909 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1910 //
1911 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1912 // the operation has completed with failure, the error is returned and op.Done will return true.
1913 // If Poll succeeds and the operation has completed successfully,
1914 // op.Done will return true, and the response of the operation is returned.
1915 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1916 func (op *DeleteProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1917 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1918 return op.lro.Poll(ctx, nil, opts...)
1919 }
1920
1921 // Metadata returns metadata associated with the long-running operation.
1922 // Metadata itself does not contact the server, but Poll does.
1923 // To get the latest metadata, call this method after a successful call to Poll.
1924 // If the metadata is not available, the returned metadata and error are both nil.
1925 func (op *DeleteProcessorOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1926 var meta visionaipb.OperationMetadata
1927 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1928 return nil, nil
1929 } else if err != nil {
1930 return nil, err
1931 }
1932 return &meta, nil
1933 }
1934
1935 // Done reports whether the long-running operation has completed.
1936 func (op *DeleteProcessorOperation) Done() bool {
1937 return op.lro.Done()
1938 }
1939
1940 // Name returns the name of the long-running operation.
1941 // The name is assigned by the server and is unique within the service from which the operation is created.
1942 func (op *DeleteProcessorOperation) Name() string {
1943 return op.lro.Name()
1944 }
1945
1946 // DeleteSeriesOperation manages a long-running operation from DeleteSeries.
1947 type DeleteSeriesOperation struct {
1948 lro *longrunning.Operation
1949 pollPath string
1950 }
1951
1952 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1953 //
1954 // See documentation of Poll for error-handling information.
1955 func (op *DeleteSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1956 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1957 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1958 }
1959
1960 // Poll fetches the latest state of the long-running operation.
1961 //
1962 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1963 //
1964 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1965 // the operation has completed with failure, the error is returned and op.Done will return true.
1966 // If Poll succeeds and the operation has completed successfully,
1967 // op.Done will return true, and the response of the operation is returned.
1968 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1969 func (op *DeleteSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1970 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1971 return op.lro.Poll(ctx, nil, opts...)
1972 }
1973
1974 // Metadata returns metadata associated with the long-running operation.
1975 // Metadata itself does not contact the server, but Poll does.
1976 // To get the latest metadata, call this method after a successful call to Poll.
1977 // If the metadata is not available, the returned metadata and error are both nil.
1978 func (op *DeleteSeriesOperation) Metadata() (*visionaipb.OperationMetadata, error) {
1979 var meta visionaipb.OperationMetadata
1980 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1981 return nil, nil
1982 } else if err != nil {
1983 return nil, err
1984 }
1985 return &meta, nil
1986 }
1987
1988 // Done reports whether the long-running operation has completed.
1989 func (op *DeleteSeriesOperation) Done() bool {
1990 return op.lro.Done()
1991 }
1992
1993 // Name returns the name of the long-running operation.
1994 // The name is assigned by the server and is unique within the service from which the operation is created.
1995 func (op *DeleteSeriesOperation) Name() string {
1996 return op.lro.Name()
1997 }
1998
1999 // DeleteStreamOperation manages a long-running operation from DeleteStream.
2000 type DeleteStreamOperation struct {
2001 lro *longrunning.Operation
2002 pollPath string
2003 }
2004
2005 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2006 //
2007 // See documentation of Poll for error-handling information.
2008 func (op *DeleteStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
2009 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2010 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
2011 }
2012
2013 // Poll fetches the latest state of the long-running operation.
2014 //
2015 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2016 //
2017 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2018 // the operation has completed with failure, the error is returned and op.Done will return true.
2019 // If Poll succeeds and the operation has completed successfully,
2020 // op.Done will return true, and the response of the operation is returned.
2021 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2022 func (op *DeleteStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
2023 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2024 return op.lro.Poll(ctx, nil, opts...)
2025 }
2026
2027 // Metadata returns metadata associated with the long-running operation.
2028 // Metadata itself does not contact the server, but Poll does.
2029 // To get the latest metadata, call this method after a successful call to Poll.
2030 // If the metadata is not available, the returned metadata and error are both nil.
2031 func (op *DeleteStreamOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2032 var meta visionaipb.OperationMetadata
2033 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2034 return nil, nil
2035 } else if err != nil {
2036 return nil, err
2037 }
2038 return &meta, nil
2039 }
2040
2041 // Done reports whether the long-running operation has completed.
2042 func (op *DeleteStreamOperation) Done() bool {
2043 return op.lro.Done()
2044 }
2045
2046 // Name returns the name of the long-running operation.
2047 // The name is assigned by the server and is unique within the service from which the operation is created.
2048 func (op *DeleteStreamOperation) Name() string {
2049 return op.lro.Name()
2050 }
2051
2052 // DeployApplicationOperation manages a long-running operation from DeployApplication.
2053 type DeployApplicationOperation struct {
2054 lro *longrunning.Operation
2055 pollPath string
2056 }
2057
2058 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2059 //
2060 // See documentation of Poll for error-handling information.
2061 func (op *DeployApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployApplicationResponse, error) {
2062 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2063 var resp visionaipb.DeployApplicationResponse
2064 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2065 return nil, err
2066 }
2067 return &resp, nil
2068 }
2069
2070 // Poll fetches the latest state of the long-running operation.
2071 //
2072 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2073 //
2074 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2075 // the operation has completed with failure, the error is returned and op.Done will return true.
2076 // If Poll succeeds and the operation has completed successfully,
2077 // op.Done will return true, and the response of the operation is returned.
2078 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2079 func (op *DeployApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployApplicationResponse, error) {
2080 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2081 var resp visionaipb.DeployApplicationResponse
2082 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2083 return nil, err
2084 }
2085 if !op.Done() {
2086 return nil, nil
2087 }
2088 return &resp, nil
2089 }
2090
2091 // Metadata returns metadata associated with the long-running operation.
2092 // Metadata itself does not contact the server, but Poll does.
2093 // To get the latest metadata, call this method after a successful call to Poll.
2094 // If the metadata is not available, the returned metadata and error are both nil.
2095 func (op *DeployApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2096 var meta visionaipb.OperationMetadata
2097 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2098 return nil, nil
2099 } else if err != nil {
2100 return nil, err
2101 }
2102 return &meta, nil
2103 }
2104
2105 // Done reports whether the long-running operation has completed.
2106 func (op *DeployApplicationOperation) Done() bool {
2107 return op.lro.Done()
2108 }
2109
2110 // Name returns the name of the long-running operation.
2111 // The name is assigned by the server and is unique within the service from which the operation is created.
2112 func (op *DeployApplicationOperation) Name() string {
2113 return op.lro.Name()
2114 }
2115
2116 // DeployIndexOperation manages a long-running operation from DeployIndex.
2117 type DeployIndexOperation struct {
2118 lro *longrunning.Operation
2119 pollPath string
2120 }
2121
2122 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2123 //
2124 // See documentation of Poll for error-handling information.
2125 func (op *DeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployIndexResponse, error) {
2126 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2127 var resp visionaipb.DeployIndexResponse
2128 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2129 return nil, err
2130 }
2131 return &resp, nil
2132 }
2133
2134 // Poll fetches the latest state of the long-running operation.
2135 //
2136 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2137 //
2138 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2139 // the operation has completed with failure, the error is returned and op.Done will return true.
2140 // If Poll succeeds and the operation has completed successfully,
2141 // op.Done will return true, and the response of the operation is returned.
2142 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2143 func (op *DeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.DeployIndexResponse, error) {
2144 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2145 var resp visionaipb.DeployIndexResponse
2146 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2147 return nil, err
2148 }
2149 if !op.Done() {
2150 return nil, nil
2151 }
2152 return &resp, nil
2153 }
2154
2155 // Metadata returns metadata associated with the long-running operation.
2156 // Metadata itself does not contact the server, but Poll does.
2157 // To get the latest metadata, call this method after a successful call to Poll.
2158 // If the metadata is not available, the returned metadata and error are both nil.
2159 func (op *DeployIndexOperation) Metadata() (*visionaipb.DeployIndexMetadata, error) {
2160 var meta visionaipb.DeployIndexMetadata
2161 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2162 return nil, nil
2163 } else if err != nil {
2164 return nil, err
2165 }
2166 return &meta, nil
2167 }
2168
2169 // Done reports whether the long-running operation has completed.
2170 func (op *DeployIndexOperation) Done() bool {
2171 return op.lro.Done()
2172 }
2173
2174 // Name returns the name of the long-running operation.
2175 // The name is assigned by the server and is unique within the service from which the operation is created.
2176 func (op *DeployIndexOperation) Name() string {
2177 return op.lro.Name()
2178 }
2179
2180 // GetStreamThumbnailOperation manages a long-running operation from GetStreamThumbnail.
2181 type GetStreamThumbnailOperation struct {
2182 lro *longrunning.Operation
2183 pollPath string
2184 }
2185
2186 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2187 //
2188 // See documentation of Poll for error-handling information.
2189 func (op *GetStreamThumbnailOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.GetStreamThumbnailResponse, error) {
2190 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2191 var resp visionaipb.GetStreamThumbnailResponse
2192 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2193 return nil, err
2194 }
2195 return &resp, nil
2196 }
2197
2198 // Poll fetches the latest state of the long-running operation.
2199 //
2200 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2201 //
2202 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2203 // the operation has completed with failure, the error is returned and op.Done will return true.
2204 // If Poll succeeds and the operation has completed successfully,
2205 // op.Done will return true, and the response of the operation is returned.
2206 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2207 func (op *GetStreamThumbnailOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.GetStreamThumbnailResponse, error) {
2208 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2209 var resp visionaipb.GetStreamThumbnailResponse
2210 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2211 return nil, err
2212 }
2213 if !op.Done() {
2214 return nil, nil
2215 }
2216 return &resp, nil
2217 }
2218
2219 // Metadata returns metadata associated with the long-running operation.
2220 // Metadata itself does not contact the server, but Poll does.
2221 // To get the latest metadata, call this method after a successful call to Poll.
2222 // If the metadata is not available, the returned metadata and error are both nil.
2223 func (op *GetStreamThumbnailOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2224 var meta visionaipb.OperationMetadata
2225 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2226 return nil, nil
2227 } else if err != nil {
2228 return nil, err
2229 }
2230 return &meta, nil
2231 }
2232
2233 // Done reports whether the long-running operation has completed.
2234 func (op *GetStreamThumbnailOperation) Done() bool {
2235 return op.lro.Done()
2236 }
2237
2238 // Name returns the name of the long-running operation.
2239 // The name is assigned by the server and is unique within the service from which the operation is created.
2240 func (op *GetStreamThumbnailOperation) Name() string {
2241 return op.lro.Name()
2242 }
2243
2244 // ImportAssetsOperation manages a long-running operation from ImportAssets.
2245 type ImportAssetsOperation struct {
2246 lro *longrunning.Operation
2247 pollPath string
2248 }
2249
2250 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2251 //
2252 // See documentation of Poll for error-handling information.
2253 func (op *ImportAssetsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.ImportAssetsResponse, error) {
2254 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2255 var resp visionaipb.ImportAssetsResponse
2256 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2257 return nil, err
2258 }
2259 return &resp, nil
2260 }
2261
2262 // Poll fetches the latest state of the long-running operation.
2263 //
2264 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2265 //
2266 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2267 // the operation has completed with failure, the error is returned and op.Done will return true.
2268 // If Poll succeeds and the operation has completed successfully,
2269 // op.Done will return true, and the response of the operation is returned.
2270 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2271 func (op *ImportAssetsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.ImportAssetsResponse, error) {
2272 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2273 var resp visionaipb.ImportAssetsResponse
2274 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2275 return nil, err
2276 }
2277 if !op.Done() {
2278 return nil, nil
2279 }
2280 return &resp, nil
2281 }
2282
2283 // Metadata returns metadata associated with the long-running operation.
2284 // Metadata itself does not contact the server, but Poll does.
2285 // To get the latest metadata, call this method after a successful call to Poll.
2286 // If the metadata is not available, the returned metadata and error are both nil.
2287 func (op *ImportAssetsOperation) Metadata() (*visionaipb.ImportAssetsMetadata, error) {
2288 var meta visionaipb.ImportAssetsMetadata
2289 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2290 return nil, nil
2291 } else if err != nil {
2292 return nil, err
2293 }
2294 return &meta, nil
2295 }
2296
2297 // Done reports whether the long-running operation has completed.
2298 func (op *ImportAssetsOperation) Done() bool {
2299 return op.lro.Done()
2300 }
2301
2302 // Name returns the name of the long-running operation.
2303 // The name is assigned by the server and is unique within the service from which the operation is created.
2304 func (op *ImportAssetsOperation) Name() string {
2305 return op.lro.Name()
2306 }
2307
2308 // IndexAssetOperation manages a long-running operation from IndexAsset.
2309 type IndexAssetOperation struct {
2310 lro *longrunning.Operation
2311 pollPath string
2312 }
2313
2314 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2315 //
2316 // See documentation of Poll for error-handling information.
2317 func (op *IndexAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexAssetResponse, error) {
2318 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2319 var resp visionaipb.IndexAssetResponse
2320 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2321 return nil, err
2322 }
2323 return &resp, nil
2324 }
2325
2326 // Poll fetches the latest state of the long-running operation.
2327 //
2328 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2329 //
2330 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2331 // the operation has completed with failure, the error is returned and op.Done will return true.
2332 // If Poll succeeds and the operation has completed successfully,
2333 // op.Done will return true, and the response of the operation is returned.
2334 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2335 func (op *IndexAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexAssetResponse, error) {
2336 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2337 var resp visionaipb.IndexAssetResponse
2338 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2339 return nil, err
2340 }
2341 if !op.Done() {
2342 return nil, nil
2343 }
2344 return &resp, nil
2345 }
2346
2347 // Metadata returns metadata associated with the long-running operation.
2348 // Metadata itself does not contact the server, but Poll does.
2349 // To get the latest metadata, call this method after a successful call to Poll.
2350 // If the metadata is not available, the returned metadata and error are both nil.
2351 func (op *IndexAssetOperation) Metadata() (*visionaipb.IndexAssetMetadata, error) {
2352 var meta visionaipb.IndexAssetMetadata
2353 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2354 return nil, nil
2355 } else if err != nil {
2356 return nil, err
2357 }
2358 return &meta, nil
2359 }
2360
2361 // Done reports whether the long-running operation has completed.
2362 func (op *IndexAssetOperation) Done() bool {
2363 return op.lro.Done()
2364 }
2365
2366 // Name returns the name of the long-running operation.
2367 // The name is assigned by the server and is unique within the service from which the operation is created.
2368 func (op *IndexAssetOperation) Name() string {
2369 return op.lro.Name()
2370 }
2371
2372 // MaterializeChannelOperation manages a long-running operation from MaterializeChannel.
2373 type MaterializeChannelOperation struct {
2374 lro *longrunning.Operation
2375 pollPath string
2376 }
2377
2378 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2379 //
2380 // See documentation of Poll for error-handling information.
2381 func (op *MaterializeChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Channel, error) {
2382 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2383 var resp visionaipb.Channel
2384 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2385 return nil, err
2386 }
2387 return &resp, nil
2388 }
2389
2390 // Poll fetches the latest state of the long-running operation.
2391 //
2392 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2393 //
2394 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2395 // the operation has completed with failure, the error is returned and op.Done will return true.
2396 // If Poll succeeds and the operation has completed successfully,
2397 // op.Done will return true, and the response of the operation is returned.
2398 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2399 func (op *MaterializeChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Channel, error) {
2400 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2401 var resp visionaipb.Channel
2402 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2403 return nil, err
2404 }
2405 if !op.Done() {
2406 return nil, nil
2407 }
2408 return &resp, nil
2409 }
2410
2411 // Metadata returns metadata associated with the long-running operation.
2412 // Metadata itself does not contact the server, but Poll does.
2413 // To get the latest metadata, call this method after a successful call to Poll.
2414 // If the metadata is not available, the returned metadata and error are both nil.
2415 func (op *MaterializeChannelOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2416 var meta visionaipb.OperationMetadata
2417 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2418 return nil, nil
2419 } else if err != nil {
2420 return nil, err
2421 }
2422 return &meta, nil
2423 }
2424
2425 // Done reports whether the long-running operation has completed.
2426 func (op *MaterializeChannelOperation) Done() bool {
2427 return op.lro.Done()
2428 }
2429
2430 // Name returns the name of the long-running operation.
2431 // The name is assigned by the server and is unique within the service from which the operation is created.
2432 func (op *MaterializeChannelOperation) Name() string {
2433 return op.lro.Name()
2434 }
2435
2436 // RemoveApplicationStreamInputOperation manages a long-running operation from RemoveApplicationStreamInput.
2437 type RemoveApplicationStreamInputOperation struct {
2438 lro *longrunning.Operation
2439 pollPath string
2440 }
2441
2442 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2443 //
2444 // See documentation of Poll for error-handling information.
2445 func (op *RemoveApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveApplicationStreamInputResponse, error) {
2446 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2447 var resp visionaipb.RemoveApplicationStreamInputResponse
2448 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2449 return nil, err
2450 }
2451 return &resp, nil
2452 }
2453
2454 // Poll fetches the latest state of the long-running operation.
2455 //
2456 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2457 //
2458 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2459 // the operation has completed with failure, the error is returned and op.Done will return true.
2460 // If Poll succeeds and the operation has completed successfully,
2461 // op.Done will return true, and the response of the operation is returned.
2462 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2463 func (op *RemoveApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveApplicationStreamInputResponse, error) {
2464 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2465 var resp visionaipb.RemoveApplicationStreamInputResponse
2466 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2467 return nil, err
2468 }
2469 if !op.Done() {
2470 return nil, nil
2471 }
2472 return &resp, nil
2473 }
2474
2475 // Metadata returns metadata associated with the long-running operation.
2476 // Metadata itself does not contact the server, but Poll does.
2477 // To get the latest metadata, call this method after a successful call to Poll.
2478 // If the metadata is not available, the returned metadata and error are both nil.
2479 func (op *RemoveApplicationStreamInputOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2480 var meta visionaipb.OperationMetadata
2481 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2482 return nil, nil
2483 } else if err != nil {
2484 return nil, err
2485 }
2486 return &meta, nil
2487 }
2488
2489 // Done reports whether the long-running operation has completed.
2490 func (op *RemoveApplicationStreamInputOperation) Done() bool {
2491 return op.lro.Done()
2492 }
2493
2494 // Name returns the name of the long-running operation.
2495 // The name is assigned by the server and is unique within the service from which the operation is created.
2496 func (op *RemoveApplicationStreamInputOperation) Name() string {
2497 return op.lro.Name()
2498 }
2499
2500 // RemoveIndexAssetOperation manages a long-running operation from RemoveIndexAsset.
2501 type RemoveIndexAssetOperation struct {
2502 lro *longrunning.Operation
2503 pollPath string
2504 }
2505
2506 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2507 //
2508 // See documentation of Poll for error-handling information.
2509 func (op *RemoveIndexAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveIndexAssetResponse, error) {
2510 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2511 var resp visionaipb.RemoveIndexAssetResponse
2512 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2513 return nil, err
2514 }
2515 return &resp, nil
2516 }
2517
2518 // Poll fetches the latest state of the long-running operation.
2519 //
2520 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2521 //
2522 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2523 // the operation has completed with failure, the error is returned and op.Done will return true.
2524 // If Poll succeeds and the operation has completed successfully,
2525 // op.Done will return true, and the response of the operation is returned.
2526 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2527 func (op *RemoveIndexAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.RemoveIndexAssetResponse, error) {
2528 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2529 var resp visionaipb.RemoveIndexAssetResponse
2530 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2531 return nil, err
2532 }
2533 if !op.Done() {
2534 return nil, nil
2535 }
2536 return &resp, nil
2537 }
2538
2539 // Metadata returns metadata associated with the long-running operation.
2540 // Metadata itself does not contact the server, but Poll does.
2541 // To get the latest metadata, call this method after a successful call to Poll.
2542 // If the metadata is not available, the returned metadata and error are both nil.
2543 func (op *RemoveIndexAssetOperation) Metadata() (*visionaipb.RemoveIndexAssetMetadata, error) {
2544 var meta visionaipb.RemoveIndexAssetMetadata
2545 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2546 return nil, nil
2547 } else if err != nil {
2548 return nil, err
2549 }
2550 return &meta, nil
2551 }
2552
2553 // Done reports whether the long-running operation has completed.
2554 func (op *RemoveIndexAssetOperation) Done() bool {
2555 return op.lro.Done()
2556 }
2557
2558 // Name returns the name of the long-running operation.
2559 // The name is assigned by the server and is unique within the service from which the operation is created.
2560 func (op *RemoveIndexAssetOperation) Name() string {
2561 return op.lro.Name()
2562 }
2563
2564 // UndeployApplicationOperation manages a long-running operation from UndeployApplication.
2565 type UndeployApplicationOperation struct {
2566 lro *longrunning.Operation
2567 pollPath string
2568 }
2569
2570 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2571 //
2572 // See documentation of Poll for error-handling information.
2573 func (op *UndeployApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployApplicationResponse, error) {
2574 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2575 var resp visionaipb.UndeployApplicationResponse
2576 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2577 return nil, err
2578 }
2579 return &resp, nil
2580 }
2581
2582 // Poll fetches the latest state of the long-running operation.
2583 //
2584 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2585 //
2586 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2587 // the operation has completed with failure, the error is returned and op.Done will return true.
2588 // If Poll succeeds and the operation has completed successfully,
2589 // op.Done will return true, and the response of the operation is returned.
2590 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2591 func (op *UndeployApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployApplicationResponse, error) {
2592 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2593 var resp visionaipb.UndeployApplicationResponse
2594 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2595 return nil, err
2596 }
2597 if !op.Done() {
2598 return nil, nil
2599 }
2600 return &resp, nil
2601 }
2602
2603 // Metadata returns metadata associated with the long-running operation.
2604 // Metadata itself does not contact the server, but Poll does.
2605 // To get the latest metadata, call this method after a successful call to Poll.
2606 // If the metadata is not available, the returned metadata and error are both nil.
2607 func (op *UndeployApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2608 var meta visionaipb.OperationMetadata
2609 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2610 return nil, nil
2611 } else if err != nil {
2612 return nil, err
2613 }
2614 return &meta, nil
2615 }
2616
2617 // Done reports whether the long-running operation has completed.
2618 func (op *UndeployApplicationOperation) Done() bool {
2619 return op.lro.Done()
2620 }
2621
2622 // Name returns the name of the long-running operation.
2623 // The name is assigned by the server and is unique within the service from which the operation is created.
2624 func (op *UndeployApplicationOperation) Name() string {
2625 return op.lro.Name()
2626 }
2627
2628 // UndeployIndexOperation manages a long-running operation from UndeployIndex.
2629 type UndeployIndexOperation struct {
2630 lro *longrunning.Operation
2631 pollPath string
2632 }
2633
2634 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2635 //
2636 // See documentation of Poll for error-handling information.
2637 func (op *UndeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployIndexResponse, error) {
2638 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2639 var resp visionaipb.UndeployIndexResponse
2640 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2641 return nil, err
2642 }
2643 return &resp, nil
2644 }
2645
2646 // Poll fetches the latest state of the long-running operation.
2647 //
2648 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2649 //
2650 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2651 // the operation has completed with failure, the error is returned and op.Done will return true.
2652 // If Poll succeeds and the operation has completed successfully,
2653 // op.Done will return true, and the response of the operation is returned.
2654 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2655 func (op *UndeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UndeployIndexResponse, error) {
2656 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2657 var resp visionaipb.UndeployIndexResponse
2658 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2659 return nil, err
2660 }
2661 if !op.Done() {
2662 return nil, nil
2663 }
2664 return &resp, nil
2665 }
2666
2667 // Metadata returns metadata associated with the long-running operation.
2668 // Metadata itself does not contact the server, but Poll does.
2669 // To get the latest metadata, call this method after a successful call to Poll.
2670 // If the metadata is not available, the returned metadata and error are both nil.
2671 func (op *UndeployIndexOperation) Metadata() (*visionaipb.UndeployIndexMetadata, error) {
2672 var meta visionaipb.UndeployIndexMetadata
2673 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2674 return nil, nil
2675 } else if err != nil {
2676 return nil, err
2677 }
2678 return &meta, nil
2679 }
2680
2681 // Done reports whether the long-running operation has completed.
2682 func (op *UndeployIndexOperation) Done() bool {
2683 return op.lro.Done()
2684 }
2685
2686 // Name returns the name of the long-running operation.
2687 // The name is assigned by the server and is unique within the service from which the operation is created.
2688 func (op *UndeployIndexOperation) Name() string {
2689 return op.lro.Name()
2690 }
2691
2692 // UpdateAnalysisOperation manages a long-running operation from UpdateAnalysis.
2693 type UpdateAnalysisOperation struct {
2694 lro *longrunning.Operation
2695 pollPath string
2696 }
2697
2698 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2699 //
2700 // See documentation of Poll for error-handling information.
2701 func (op *UpdateAnalysisOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error) {
2702 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2703 var resp visionaipb.Analysis
2704 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2705 return nil, err
2706 }
2707 return &resp, nil
2708 }
2709
2710 // Poll fetches the latest state of the long-running operation.
2711 //
2712 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2713 //
2714 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2715 // the operation has completed with failure, the error is returned and op.Done will return true.
2716 // If Poll succeeds and the operation has completed successfully,
2717 // op.Done will return true, and the response of the operation is returned.
2718 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2719 func (op *UpdateAnalysisOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Analysis, error) {
2720 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2721 var resp visionaipb.Analysis
2722 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2723 return nil, err
2724 }
2725 if !op.Done() {
2726 return nil, nil
2727 }
2728 return &resp, nil
2729 }
2730
2731 // Metadata returns metadata associated with the long-running operation.
2732 // Metadata itself does not contact the server, but Poll does.
2733 // To get the latest metadata, call this method after a successful call to Poll.
2734 // If the metadata is not available, the returned metadata and error are both nil.
2735 func (op *UpdateAnalysisOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2736 var meta visionaipb.OperationMetadata
2737 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2738 return nil, nil
2739 } else if err != nil {
2740 return nil, err
2741 }
2742 return &meta, nil
2743 }
2744
2745 // Done reports whether the long-running operation has completed.
2746 func (op *UpdateAnalysisOperation) Done() bool {
2747 return op.lro.Done()
2748 }
2749
2750 // Name returns the name of the long-running operation.
2751 // The name is assigned by the server and is unique within the service from which the operation is created.
2752 func (op *UpdateAnalysisOperation) Name() string {
2753 return op.lro.Name()
2754 }
2755
2756 // UpdateApplicationInstancesOperation manages a long-running operation from UpdateApplicationInstances.
2757 type UpdateApplicationInstancesOperation struct {
2758 lro *longrunning.Operation
2759 pollPath string
2760 }
2761
2762 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2763 //
2764 // See documentation of Poll for error-handling information.
2765 func (op *UpdateApplicationInstancesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationInstancesResponse, error) {
2766 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2767 var resp visionaipb.UpdateApplicationInstancesResponse
2768 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2769 return nil, err
2770 }
2771 return &resp, nil
2772 }
2773
2774 // Poll fetches the latest state of the long-running operation.
2775 //
2776 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2777 //
2778 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2779 // the operation has completed with failure, the error is returned and op.Done will return true.
2780 // If Poll succeeds and the operation has completed successfully,
2781 // op.Done will return true, and the response of the operation is returned.
2782 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2783 func (op *UpdateApplicationInstancesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationInstancesResponse, error) {
2784 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2785 var resp visionaipb.UpdateApplicationInstancesResponse
2786 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2787 return nil, err
2788 }
2789 if !op.Done() {
2790 return nil, nil
2791 }
2792 return &resp, nil
2793 }
2794
2795 // Metadata returns metadata associated with the long-running operation.
2796 // Metadata itself does not contact the server, but Poll does.
2797 // To get the latest metadata, call this method after a successful call to Poll.
2798 // If the metadata is not available, the returned metadata and error are both nil.
2799 func (op *UpdateApplicationInstancesOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2800 var meta visionaipb.OperationMetadata
2801 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2802 return nil, nil
2803 } else if err != nil {
2804 return nil, err
2805 }
2806 return &meta, nil
2807 }
2808
2809 // Done reports whether the long-running operation has completed.
2810 func (op *UpdateApplicationInstancesOperation) Done() bool {
2811 return op.lro.Done()
2812 }
2813
2814 // Name returns the name of the long-running operation.
2815 // The name is assigned by the server and is unique within the service from which the operation is created.
2816 func (op *UpdateApplicationInstancesOperation) Name() string {
2817 return op.lro.Name()
2818 }
2819
2820 // UpdateApplicationOperation manages a long-running operation from UpdateApplication.
2821 type UpdateApplicationOperation struct {
2822 lro *longrunning.Operation
2823 pollPath string
2824 }
2825
2826 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2827 //
2828 // See documentation of Poll for error-handling information.
2829 func (op *UpdateApplicationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error) {
2830 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2831 var resp visionaipb.Application
2832 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2833 return nil, err
2834 }
2835 return &resp, nil
2836 }
2837
2838 // Poll fetches the latest state of the long-running operation.
2839 //
2840 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2841 //
2842 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2843 // the operation has completed with failure, the error is returned and op.Done will return true.
2844 // If Poll succeeds and the operation has completed successfully,
2845 // op.Done will return true, and the response of the operation is returned.
2846 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2847 func (op *UpdateApplicationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Application, error) {
2848 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2849 var resp visionaipb.Application
2850 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2851 return nil, err
2852 }
2853 if !op.Done() {
2854 return nil, nil
2855 }
2856 return &resp, nil
2857 }
2858
2859 // Metadata returns metadata associated with the long-running operation.
2860 // Metadata itself does not contact the server, but Poll does.
2861 // To get the latest metadata, call this method after a successful call to Poll.
2862 // If the metadata is not available, the returned metadata and error are both nil.
2863 func (op *UpdateApplicationOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2864 var meta visionaipb.OperationMetadata
2865 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2866 return nil, nil
2867 } else if err != nil {
2868 return nil, err
2869 }
2870 return &meta, nil
2871 }
2872
2873 // Done reports whether the long-running operation has completed.
2874 func (op *UpdateApplicationOperation) Done() bool {
2875 return op.lro.Done()
2876 }
2877
2878 // Name returns the name of the long-running operation.
2879 // The name is assigned by the server and is unique within the service from which the operation is created.
2880 func (op *UpdateApplicationOperation) Name() string {
2881 return op.lro.Name()
2882 }
2883
2884 // UpdateApplicationStreamInputOperation manages a long-running operation from UpdateApplicationStreamInput.
2885 type UpdateApplicationStreamInputOperation struct {
2886 lro *longrunning.Operation
2887 pollPath string
2888 }
2889
2890 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2891 //
2892 // See documentation of Poll for error-handling information.
2893 func (op *UpdateApplicationStreamInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationStreamInputResponse, error) {
2894 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2895 var resp visionaipb.UpdateApplicationStreamInputResponse
2896 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2897 return nil, err
2898 }
2899 return &resp, nil
2900 }
2901
2902 // Poll fetches the latest state of the long-running operation.
2903 //
2904 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2905 //
2906 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2907 // the operation has completed with failure, the error is returned and op.Done will return true.
2908 // If Poll succeeds and the operation has completed successfully,
2909 // op.Done will return true, and the response of the operation is returned.
2910 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2911 func (op *UpdateApplicationStreamInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UpdateApplicationStreamInputResponse, error) {
2912 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2913 var resp visionaipb.UpdateApplicationStreamInputResponse
2914 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2915 return nil, err
2916 }
2917 if !op.Done() {
2918 return nil, nil
2919 }
2920 return &resp, nil
2921 }
2922
2923 // Metadata returns metadata associated with the long-running operation.
2924 // Metadata itself does not contact the server, but Poll does.
2925 // To get the latest metadata, call this method after a successful call to Poll.
2926 // If the metadata is not available, the returned metadata and error are both nil.
2927 func (op *UpdateApplicationStreamInputOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2928 var meta visionaipb.OperationMetadata
2929 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2930 return nil, nil
2931 } else if err != nil {
2932 return nil, err
2933 }
2934 return &meta, nil
2935 }
2936
2937 // Done reports whether the long-running operation has completed.
2938 func (op *UpdateApplicationStreamInputOperation) Done() bool {
2939 return op.lro.Done()
2940 }
2941
2942 // Name returns the name of the long-running operation.
2943 // The name is assigned by the server and is unique within the service from which the operation is created.
2944 func (op *UpdateApplicationStreamInputOperation) Name() string {
2945 return op.lro.Name()
2946 }
2947
2948 // UpdateClusterOperation manages a long-running operation from UpdateCluster.
2949 type UpdateClusterOperation struct {
2950 lro *longrunning.Operation
2951 pollPath string
2952 }
2953
2954 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2955 //
2956 // See documentation of Poll for error-handling information.
2957 func (op *UpdateClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error) {
2958 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2959 var resp visionaipb.Cluster
2960 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2961 return nil, err
2962 }
2963 return &resp, nil
2964 }
2965
2966 // Poll fetches the latest state of the long-running operation.
2967 //
2968 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2969 //
2970 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2971 // the operation has completed with failure, the error is returned and op.Done will return true.
2972 // If Poll succeeds and the operation has completed successfully,
2973 // op.Done will return true, and the response of the operation is returned.
2974 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2975 func (op *UpdateClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Cluster, error) {
2976 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2977 var resp visionaipb.Cluster
2978 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2979 return nil, err
2980 }
2981 if !op.Done() {
2982 return nil, nil
2983 }
2984 return &resp, nil
2985 }
2986
2987 // Metadata returns metadata associated with the long-running operation.
2988 // Metadata itself does not contact the server, but Poll does.
2989 // To get the latest metadata, call this method after a successful call to Poll.
2990 // If the metadata is not available, the returned metadata and error are both nil.
2991 func (op *UpdateClusterOperation) Metadata() (*visionaipb.OperationMetadata, error) {
2992 var meta visionaipb.OperationMetadata
2993 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2994 return nil, nil
2995 } else if err != nil {
2996 return nil, err
2997 }
2998 return &meta, nil
2999 }
3000
3001 // Done reports whether the long-running operation has completed.
3002 func (op *UpdateClusterOperation) Done() bool {
3003 return op.lro.Done()
3004 }
3005
3006 // Name returns the name of the long-running operation.
3007 // The name is assigned by the server and is unique within the service from which the operation is created.
3008 func (op *UpdateClusterOperation) Name() string {
3009 return op.lro.Name()
3010 }
3011
3012 // UpdateDraftOperation manages a long-running operation from UpdateDraft.
3013 type UpdateDraftOperation struct {
3014 lro *longrunning.Operation
3015 pollPath string
3016 }
3017
3018 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3019 //
3020 // See documentation of Poll for error-handling information.
3021 func (op *UpdateDraftOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error) {
3022 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3023 var resp visionaipb.Draft
3024 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3025 return nil, err
3026 }
3027 return &resp, nil
3028 }
3029
3030 // Poll fetches the latest state of the long-running operation.
3031 //
3032 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3033 //
3034 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3035 // the operation has completed with failure, the error is returned and op.Done will return true.
3036 // If Poll succeeds and the operation has completed successfully,
3037 // op.Done will return true, and the response of the operation is returned.
3038 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3039 func (op *UpdateDraftOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Draft, error) {
3040 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3041 var resp visionaipb.Draft
3042 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3043 return nil, err
3044 }
3045 if !op.Done() {
3046 return nil, nil
3047 }
3048 return &resp, nil
3049 }
3050
3051 // Metadata returns metadata associated with the long-running operation.
3052 // Metadata itself does not contact the server, but Poll does.
3053 // To get the latest metadata, call this method after a successful call to Poll.
3054 // If the metadata is not available, the returned metadata and error are both nil.
3055 func (op *UpdateDraftOperation) Metadata() (*visionaipb.OperationMetadata, error) {
3056 var meta visionaipb.OperationMetadata
3057 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3058 return nil, nil
3059 } else if err != nil {
3060 return nil, err
3061 }
3062 return &meta, nil
3063 }
3064
3065 // Done reports whether the long-running operation has completed.
3066 func (op *UpdateDraftOperation) Done() bool {
3067 return op.lro.Done()
3068 }
3069
3070 // Name returns the name of the long-running operation.
3071 // The name is assigned by the server and is unique within the service from which the operation is created.
3072 func (op *UpdateDraftOperation) Name() string {
3073 return op.lro.Name()
3074 }
3075
3076 // UpdateEventOperation manages a long-running operation from UpdateEvent.
3077 type UpdateEventOperation struct {
3078 lro *longrunning.Operation
3079 pollPath string
3080 }
3081
3082 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3083 //
3084 // See documentation of Poll for error-handling information.
3085 func (op *UpdateEventOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error) {
3086 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3087 var resp visionaipb.Event
3088 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3089 return nil, err
3090 }
3091 return &resp, nil
3092 }
3093
3094 // Poll fetches the latest state of the long-running operation.
3095 //
3096 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3097 //
3098 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3099 // the operation has completed with failure, the error is returned and op.Done will return true.
3100 // If Poll succeeds and the operation has completed successfully,
3101 // op.Done will return true, and the response of the operation is returned.
3102 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3103 func (op *UpdateEventOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Event, error) {
3104 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3105 var resp visionaipb.Event
3106 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3107 return nil, err
3108 }
3109 if !op.Done() {
3110 return nil, nil
3111 }
3112 return &resp, nil
3113 }
3114
3115 // Metadata returns metadata associated with the long-running operation.
3116 // Metadata itself does not contact the server, but Poll does.
3117 // To get the latest metadata, call this method after a successful call to Poll.
3118 // If the metadata is not available, the returned metadata and error are both nil.
3119 func (op *UpdateEventOperation) Metadata() (*visionaipb.OperationMetadata, error) {
3120 var meta visionaipb.OperationMetadata
3121 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3122 return nil, nil
3123 } else if err != nil {
3124 return nil, err
3125 }
3126 return &meta, nil
3127 }
3128
3129 // Done reports whether the long-running operation has completed.
3130 func (op *UpdateEventOperation) Done() bool {
3131 return op.lro.Done()
3132 }
3133
3134 // Name returns the name of the long-running operation.
3135 // The name is assigned by the server and is unique within the service from which the operation is created.
3136 func (op *UpdateEventOperation) Name() string {
3137 return op.lro.Name()
3138 }
3139
3140 // UpdateIndexEndpointOperation manages a long-running operation from UpdateIndexEndpoint.
3141 type UpdateIndexEndpointOperation struct {
3142 lro *longrunning.Operation
3143 pollPath string
3144 }
3145
3146 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3147 //
3148 // See documentation of Poll for error-handling information.
3149 func (op *UpdateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error) {
3150 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3151 var resp visionaipb.IndexEndpoint
3152 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3153 return nil, err
3154 }
3155 return &resp, nil
3156 }
3157
3158 // Poll fetches the latest state of the long-running operation.
3159 //
3160 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3161 //
3162 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3163 // the operation has completed with failure, the error is returned and op.Done will return true.
3164 // If Poll succeeds and the operation has completed successfully,
3165 // op.Done will return true, and the response of the operation is returned.
3166 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3167 func (op *UpdateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.IndexEndpoint, error) {
3168 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3169 var resp visionaipb.IndexEndpoint
3170 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3171 return nil, err
3172 }
3173 if !op.Done() {
3174 return nil, nil
3175 }
3176 return &resp, nil
3177 }
3178
3179 // Metadata returns metadata associated with the long-running operation.
3180 // Metadata itself does not contact the server, but Poll does.
3181 // To get the latest metadata, call this method after a successful call to Poll.
3182 // If the metadata is not available, the returned metadata and error are both nil.
3183 func (op *UpdateIndexEndpointOperation) Metadata() (*visionaipb.UpdateIndexEndpointMetadata, error) {
3184 var meta visionaipb.UpdateIndexEndpointMetadata
3185 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3186 return nil, nil
3187 } else if err != nil {
3188 return nil, err
3189 }
3190 return &meta, nil
3191 }
3192
3193 // Done reports whether the long-running operation has completed.
3194 func (op *UpdateIndexEndpointOperation) Done() bool {
3195 return op.lro.Done()
3196 }
3197
3198 // Name returns the name of the long-running operation.
3199 // The name is assigned by the server and is unique within the service from which the operation is created.
3200 func (op *UpdateIndexEndpointOperation) Name() string {
3201 return op.lro.Name()
3202 }
3203
3204 // UpdateIndexOperation manages a long-running operation from UpdateIndex.
3205 type UpdateIndexOperation struct {
3206 lro *longrunning.Operation
3207 pollPath string
3208 }
3209
3210 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3211 //
3212 // See documentation of Poll for error-handling information.
3213 func (op *UpdateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error) {
3214 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3215 var resp visionaipb.Index
3216 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3217 return nil, err
3218 }
3219 return &resp, nil
3220 }
3221
3222 // Poll fetches the latest state of the long-running operation.
3223 //
3224 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3225 //
3226 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3227 // the operation has completed with failure, the error is returned and op.Done will return true.
3228 // If Poll succeeds and the operation has completed successfully,
3229 // op.Done will return true, and the response of the operation is returned.
3230 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3231 func (op *UpdateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Index, error) {
3232 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3233 var resp visionaipb.Index
3234 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3235 return nil, err
3236 }
3237 if !op.Done() {
3238 return nil, nil
3239 }
3240 return &resp, nil
3241 }
3242
3243 // Metadata returns metadata associated with the long-running operation.
3244 // Metadata itself does not contact the server, but Poll does.
3245 // To get the latest metadata, call this method after a successful call to Poll.
3246 // If the metadata is not available, the returned metadata and error are both nil.
3247 func (op *UpdateIndexOperation) Metadata() (*visionaipb.UpdateIndexMetadata, error) {
3248 var meta visionaipb.UpdateIndexMetadata
3249 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3250 return nil, nil
3251 } else if err != nil {
3252 return nil, err
3253 }
3254 return &meta, nil
3255 }
3256
3257 // Done reports whether the long-running operation has completed.
3258 func (op *UpdateIndexOperation) Done() bool {
3259 return op.lro.Done()
3260 }
3261
3262 // Name returns the name of the long-running operation.
3263 // The name is assigned by the server and is unique within the service from which the operation is created.
3264 func (op *UpdateIndexOperation) Name() string {
3265 return op.lro.Name()
3266 }
3267
3268 // UpdateOperatorOperation manages a long-running operation from UpdateOperator.
3269 type UpdateOperatorOperation struct {
3270 lro *longrunning.Operation
3271 pollPath string
3272 }
3273
3274 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3275 //
3276 // See documentation of Poll for error-handling information.
3277 func (op *UpdateOperatorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error) {
3278 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3279 var resp visionaipb.Operator
3280 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3281 return nil, err
3282 }
3283 return &resp, nil
3284 }
3285
3286 // Poll fetches the latest state of the long-running operation.
3287 //
3288 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3289 //
3290 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3291 // the operation has completed with failure, the error is returned and op.Done will return true.
3292 // If Poll succeeds and the operation has completed successfully,
3293 // op.Done will return true, and the response of the operation is returned.
3294 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3295 func (op *UpdateOperatorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Operator, error) {
3296 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3297 var resp visionaipb.Operator
3298 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3299 return nil, err
3300 }
3301 if !op.Done() {
3302 return nil, nil
3303 }
3304 return &resp, nil
3305 }
3306
3307 // Metadata returns metadata associated with the long-running operation.
3308 // Metadata itself does not contact the server, but Poll does.
3309 // To get the latest metadata, call this method after a successful call to Poll.
3310 // If the metadata is not available, the returned metadata and error are both nil.
3311 func (op *UpdateOperatorOperation) Metadata() (*visionaipb.OperationMetadata, error) {
3312 var meta visionaipb.OperationMetadata
3313 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3314 return nil, nil
3315 } else if err != nil {
3316 return nil, err
3317 }
3318 return &meta, nil
3319 }
3320
3321 // Done reports whether the long-running operation has completed.
3322 func (op *UpdateOperatorOperation) Done() bool {
3323 return op.lro.Done()
3324 }
3325
3326 // Name returns the name of the long-running operation.
3327 // The name is assigned by the server and is unique within the service from which the operation is created.
3328 func (op *UpdateOperatorOperation) Name() string {
3329 return op.lro.Name()
3330 }
3331
3332 // UpdateProcessOperation manages a long-running operation from UpdateProcess.
3333 type UpdateProcessOperation struct {
3334 lro *longrunning.Operation
3335 pollPath string
3336 }
3337
3338 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3339 //
3340 // See documentation of Poll for error-handling information.
3341 func (op *UpdateProcessOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error) {
3342 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3343 var resp visionaipb.Process
3344 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3345 return nil, err
3346 }
3347 return &resp, nil
3348 }
3349
3350 // Poll fetches the latest state of the long-running operation.
3351 //
3352 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3353 //
3354 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3355 // the operation has completed with failure, the error is returned and op.Done will return true.
3356 // If Poll succeeds and the operation has completed successfully,
3357 // op.Done will return true, and the response of the operation is returned.
3358 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3359 func (op *UpdateProcessOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Process, error) {
3360 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3361 var resp visionaipb.Process
3362 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3363 return nil, err
3364 }
3365 if !op.Done() {
3366 return nil, nil
3367 }
3368 return &resp, nil
3369 }
3370
3371 // Metadata returns metadata associated with the long-running operation.
3372 // Metadata itself does not contact the server, but Poll does.
3373 // To get the latest metadata, call this method after a successful call to Poll.
3374 // If the metadata is not available, the returned metadata and error are both nil.
3375 func (op *UpdateProcessOperation) Metadata() (*visionaipb.OperationMetadata, error) {
3376 var meta visionaipb.OperationMetadata
3377 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3378 return nil, nil
3379 } else if err != nil {
3380 return nil, err
3381 }
3382 return &meta, nil
3383 }
3384
3385 // Done reports whether the long-running operation has completed.
3386 func (op *UpdateProcessOperation) Done() bool {
3387 return op.lro.Done()
3388 }
3389
3390 // Name returns the name of the long-running operation.
3391 // The name is assigned by the server and is unique within the service from which the operation is created.
3392 func (op *UpdateProcessOperation) Name() string {
3393 return op.lro.Name()
3394 }
3395
3396 // UpdateProcessorOperation manages a long-running operation from UpdateProcessor.
3397 type UpdateProcessorOperation struct {
3398 lro *longrunning.Operation
3399 pollPath string
3400 }
3401
3402 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3403 //
3404 // See documentation of Poll for error-handling information.
3405 func (op *UpdateProcessorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error) {
3406 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3407 var resp visionaipb.Processor
3408 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3409 return nil, err
3410 }
3411 return &resp, nil
3412 }
3413
3414 // Poll fetches the latest state of the long-running operation.
3415 //
3416 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3417 //
3418 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3419 // the operation has completed with failure, the error is returned and op.Done will return true.
3420 // If Poll succeeds and the operation has completed successfully,
3421 // op.Done will return true, and the response of the operation is returned.
3422 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3423 func (op *UpdateProcessorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Processor, error) {
3424 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3425 var resp visionaipb.Processor
3426 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3427 return nil, err
3428 }
3429 if !op.Done() {
3430 return nil, nil
3431 }
3432 return &resp, nil
3433 }
3434
3435 // Metadata returns metadata associated with the long-running operation.
3436 // Metadata itself does not contact the server, but Poll does.
3437 // To get the latest metadata, call this method after a successful call to Poll.
3438 // If the metadata is not available, the returned metadata and error are both nil.
3439 func (op *UpdateProcessorOperation) Metadata() (*visionaipb.OperationMetadata, error) {
3440 var meta visionaipb.OperationMetadata
3441 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3442 return nil, nil
3443 } else if err != nil {
3444 return nil, err
3445 }
3446 return &meta, nil
3447 }
3448
3449 // Done reports whether the long-running operation has completed.
3450 func (op *UpdateProcessorOperation) Done() bool {
3451 return op.lro.Done()
3452 }
3453
3454 // Name returns the name of the long-running operation.
3455 // The name is assigned by the server and is unique within the service from which the operation is created.
3456 func (op *UpdateProcessorOperation) Name() string {
3457 return op.lro.Name()
3458 }
3459
3460 // UpdateSeriesOperation manages a long-running operation from UpdateSeries.
3461 type UpdateSeriesOperation struct {
3462 lro *longrunning.Operation
3463 pollPath string
3464 }
3465
3466 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3467 //
3468 // See documentation of Poll for error-handling information.
3469 func (op *UpdateSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error) {
3470 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3471 var resp visionaipb.Series
3472 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3473 return nil, err
3474 }
3475 return &resp, nil
3476 }
3477
3478 // Poll fetches the latest state of the long-running operation.
3479 //
3480 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3481 //
3482 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3483 // the operation has completed with failure, the error is returned and op.Done will return true.
3484 // If Poll succeeds and the operation has completed successfully,
3485 // op.Done will return true, and the response of the operation is returned.
3486 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3487 func (op *UpdateSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Series, error) {
3488 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3489 var resp visionaipb.Series
3490 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3491 return nil, err
3492 }
3493 if !op.Done() {
3494 return nil, nil
3495 }
3496 return &resp, nil
3497 }
3498
3499 // Metadata returns metadata associated with the long-running operation.
3500 // Metadata itself does not contact the server, but Poll does.
3501 // To get the latest metadata, call this method after a successful call to Poll.
3502 // If the metadata is not available, the returned metadata and error are both nil.
3503 func (op *UpdateSeriesOperation) Metadata() (*visionaipb.OperationMetadata, error) {
3504 var meta visionaipb.OperationMetadata
3505 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3506 return nil, nil
3507 } else if err != nil {
3508 return nil, err
3509 }
3510 return &meta, nil
3511 }
3512
3513 // Done reports whether the long-running operation has completed.
3514 func (op *UpdateSeriesOperation) Done() bool {
3515 return op.lro.Done()
3516 }
3517
3518 // Name returns the name of the long-running operation.
3519 // The name is assigned by the server and is unique within the service from which the operation is created.
3520 func (op *UpdateSeriesOperation) Name() string {
3521 return op.lro.Name()
3522 }
3523
3524 // UpdateStreamOperation manages a long-running operation from UpdateStream.
3525 type UpdateStreamOperation struct {
3526 lro *longrunning.Operation
3527 pollPath string
3528 }
3529
3530 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3531 //
3532 // See documentation of Poll for error-handling information.
3533 func (op *UpdateStreamOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error) {
3534 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3535 var resp visionaipb.Stream
3536 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3537 return nil, err
3538 }
3539 return &resp, nil
3540 }
3541
3542 // Poll fetches the latest state of the long-running operation.
3543 //
3544 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3545 //
3546 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3547 // the operation has completed with failure, the error is returned and op.Done will return true.
3548 // If Poll succeeds and the operation has completed successfully,
3549 // op.Done will return true, and the response of the operation is returned.
3550 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3551 func (op *UpdateStreamOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.Stream, error) {
3552 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3553 var resp visionaipb.Stream
3554 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3555 return nil, err
3556 }
3557 if !op.Done() {
3558 return nil, nil
3559 }
3560 return &resp, nil
3561 }
3562
3563 // Metadata returns metadata associated with the long-running operation.
3564 // Metadata itself does not contact the server, but Poll does.
3565 // To get the latest metadata, call this method after a successful call to Poll.
3566 // If the metadata is not available, the returned metadata and error are both nil.
3567 func (op *UpdateStreamOperation) Metadata() (*visionaipb.OperationMetadata, error) {
3568 var meta visionaipb.OperationMetadata
3569 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3570 return nil, nil
3571 } else if err != nil {
3572 return nil, err
3573 }
3574 return &meta, nil
3575 }
3576
3577 // Done reports whether the long-running operation has completed.
3578 func (op *UpdateStreamOperation) Done() bool {
3579 return op.lro.Done()
3580 }
3581
3582 // Name returns the name of the long-running operation.
3583 // The name is assigned by the server and is unique within the service from which the operation is created.
3584 func (op *UpdateStreamOperation) Name() string {
3585 return op.lro.Name()
3586 }
3587
3588 // UploadAssetOperation manages a long-running operation from UploadAsset.
3589 type UploadAssetOperation struct {
3590 lro *longrunning.Operation
3591 pollPath string
3592 }
3593
3594 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
3595 //
3596 // See documentation of Poll for error-handling information.
3597 func (op *UploadAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UploadAssetResponse, error) {
3598 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3599 var resp visionaipb.UploadAssetResponse
3600 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
3601 return nil, err
3602 }
3603 return &resp, nil
3604 }
3605
3606 // Poll fetches the latest state of the long-running operation.
3607 //
3608 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
3609 //
3610 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
3611 // the operation has completed with failure, the error is returned and op.Done will return true.
3612 // If Poll succeeds and the operation has completed successfully,
3613 // op.Done will return true, and the response of the operation is returned.
3614 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
3615 func (op *UploadAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*visionaipb.UploadAssetResponse, error) {
3616 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
3617 var resp visionaipb.UploadAssetResponse
3618 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
3619 return nil, err
3620 }
3621 if !op.Done() {
3622 return nil, nil
3623 }
3624 return &resp, nil
3625 }
3626
3627 // Metadata returns metadata associated with the long-running operation.
3628 // Metadata itself does not contact the server, but Poll does.
3629 // To get the latest metadata, call this method after a successful call to Poll.
3630 // If the metadata is not available, the returned metadata and error are both nil.
3631 func (op *UploadAssetOperation) Metadata() (*visionaipb.UploadAssetMetadata, error) {
3632 var meta visionaipb.UploadAssetMetadata
3633 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
3634 return nil, nil
3635 } else if err != nil {
3636 return nil, err
3637 }
3638 return &meta, nil
3639 }
3640
3641 // Done reports whether the long-running operation has completed.
3642 func (op *UploadAssetOperation) Done() bool {
3643 return op.lro.Done()
3644 }
3645
3646 // Name returns the name of the long-running operation.
3647 // The name is assigned by the server and is unique within the service from which the operation is created.
3648 func (op *UploadAssetOperation) Name() string {
3649 return op.lro.Name()
3650 }
3651
3652 // AnalysisIterator manages a stream of *visionaipb.Analysis.
3653 type AnalysisIterator struct {
3654 items []*visionaipb.Analysis
3655 pageInfo *iterator.PageInfo
3656 nextFunc func() error
3657
3658 // Response is the raw response for the current page.
3659 // It must be cast to the RPC response type.
3660 // Calling Next() or InternalFetch() updates this value.
3661 Response interface{}
3662
3663 // InternalFetch is for use by the Google Cloud Libraries only.
3664 // It is not part of the stable interface of this package.
3665 //
3666 // InternalFetch returns results from a single call to the underlying RPC.
3667 // The number of results is no greater than pageSize.
3668 // If there are no more results, nextPageToken is empty and err is nil.
3669 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Analysis, nextPageToken string, err error)
3670 }
3671
3672 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3673 func (it *AnalysisIterator) PageInfo() *iterator.PageInfo {
3674 return it.pageInfo
3675 }
3676
3677 // Next returns the next result. Its second return value is iterator.Done if there are no more
3678 // results. Once Next returns Done, all subsequent calls will return Done.
3679 func (it *AnalysisIterator) Next() (*visionaipb.Analysis, error) {
3680 var item *visionaipb.Analysis
3681 if err := it.nextFunc(); err != nil {
3682 return item, err
3683 }
3684 item = it.items[0]
3685 it.items = it.items[1:]
3686 return item, nil
3687 }
3688
3689 func (it *AnalysisIterator) bufLen() int {
3690 return len(it.items)
3691 }
3692
3693 func (it *AnalysisIterator) takeBuf() interface{} {
3694 b := it.items
3695 it.items = nil
3696 return b
3697 }
3698
3699 // AnnotationIterator manages a stream of *visionaipb.Annotation.
3700 type AnnotationIterator struct {
3701 items []*visionaipb.Annotation
3702 pageInfo *iterator.PageInfo
3703 nextFunc func() error
3704
3705 // Response is the raw response for the current page.
3706 // It must be cast to the RPC response type.
3707 // Calling Next() or InternalFetch() updates this value.
3708 Response interface{}
3709
3710 // InternalFetch is for use by the Google Cloud Libraries only.
3711 // It is not part of the stable interface of this package.
3712 //
3713 // InternalFetch returns results from a single call to the underlying RPC.
3714 // The number of results is no greater than pageSize.
3715 // If there are no more results, nextPageToken is empty and err is nil.
3716 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Annotation, nextPageToken string, err error)
3717 }
3718
3719 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3720 func (it *AnnotationIterator) PageInfo() *iterator.PageInfo {
3721 return it.pageInfo
3722 }
3723
3724 // Next returns the next result. Its second return value is iterator.Done if there are no more
3725 // results. Once Next returns Done, all subsequent calls will return Done.
3726 func (it *AnnotationIterator) Next() (*visionaipb.Annotation, error) {
3727 var item *visionaipb.Annotation
3728 if err := it.nextFunc(); err != nil {
3729 return item, err
3730 }
3731 item = it.items[0]
3732 it.items = it.items[1:]
3733 return item, nil
3734 }
3735
3736 func (it *AnnotationIterator) bufLen() int {
3737 return len(it.items)
3738 }
3739
3740 func (it *AnnotationIterator) takeBuf() interface{} {
3741 b := it.items
3742 it.items = nil
3743 return b
3744 }
3745
3746 // ApplicationIterator manages a stream of *visionaipb.Application.
3747 type ApplicationIterator struct {
3748 items []*visionaipb.Application
3749 pageInfo *iterator.PageInfo
3750 nextFunc func() error
3751
3752 // Response is the raw response for the current page.
3753 // It must be cast to the RPC response type.
3754 // Calling Next() or InternalFetch() updates this value.
3755 Response interface{}
3756
3757 // InternalFetch is for use by the Google Cloud Libraries only.
3758 // It is not part of the stable interface of this package.
3759 //
3760 // InternalFetch returns results from a single call to the underlying RPC.
3761 // The number of results is no greater than pageSize.
3762 // If there are no more results, nextPageToken is empty and err is nil.
3763 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Application, nextPageToken string, err error)
3764 }
3765
3766 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3767 func (it *ApplicationIterator) PageInfo() *iterator.PageInfo {
3768 return it.pageInfo
3769 }
3770
3771 // Next returns the next result. Its second return value is iterator.Done if there are no more
3772 // results. Once Next returns Done, all subsequent calls will return Done.
3773 func (it *ApplicationIterator) Next() (*visionaipb.Application, error) {
3774 var item *visionaipb.Application
3775 if err := it.nextFunc(); err != nil {
3776 return item, err
3777 }
3778 item = it.items[0]
3779 it.items = it.items[1:]
3780 return item, nil
3781 }
3782
3783 func (it *ApplicationIterator) bufLen() int {
3784 return len(it.items)
3785 }
3786
3787 func (it *ApplicationIterator) takeBuf() interface{} {
3788 b := it.items
3789 it.items = nil
3790 return b
3791 }
3792
3793 // AssetIterator manages a stream of *visionaipb.Asset.
3794 type AssetIterator struct {
3795 items []*visionaipb.Asset
3796 pageInfo *iterator.PageInfo
3797 nextFunc func() error
3798
3799 // Response is the raw response for the current page.
3800 // It must be cast to the RPC response type.
3801 // Calling Next() or InternalFetch() updates this value.
3802 Response interface{}
3803
3804 // InternalFetch is for use by the Google Cloud Libraries only.
3805 // It is not part of the stable interface of this package.
3806 //
3807 // InternalFetch returns results from a single call to the underlying RPC.
3808 // The number of results is no greater than pageSize.
3809 // If there are no more results, nextPageToken is empty and err is nil.
3810 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Asset, nextPageToken string, err error)
3811 }
3812
3813 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3814 func (it *AssetIterator) PageInfo() *iterator.PageInfo {
3815 return it.pageInfo
3816 }
3817
3818 // Next returns the next result. Its second return value is iterator.Done if there are no more
3819 // results. Once Next returns Done, all subsequent calls will return Done.
3820 func (it *AssetIterator) Next() (*visionaipb.Asset, error) {
3821 var item *visionaipb.Asset
3822 if err := it.nextFunc(); err != nil {
3823 return item, err
3824 }
3825 item = it.items[0]
3826 it.items = it.items[1:]
3827 return item, nil
3828 }
3829
3830 func (it *AssetIterator) bufLen() int {
3831 return len(it.items)
3832 }
3833
3834 func (it *AssetIterator) takeBuf() interface{} {
3835 b := it.items
3836 it.items = nil
3837 return b
3838 }
3839
3840 // ClusterIterator manages a stream of *visionaipb.Cluster.
3841 type ClusterIterator struct {
3842 items []*visionaipb.Cluster
3843 pageInfo *iterator.PageInfo
3844 nextFunc func() error
3845
3846 // Response is the raw response for the current page.
3847 // It must be cast to the RPC response type.
3848 // Calling Next() or InternalFetch() updates this value.
3849 Response interface{}
3850
3851 // InternalFetch is for use by the Google Cloud Libraries only.
3852 // It is not part of the stable interface of this package.
3853 //
3854 // InternalFetch returns results from a single call to the underlying RPC.
3855 // The number of results is no greater than pageSize.
3856 // If there are no more results, nextPageToken is empty and err is nil.
3857 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Cluster, nextPageToken string, err error)
3858 }
3859
3860 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3861 func (it *ClusterIterator) PageInfo() *iterator.PageInfo {
3862 return it.pageInfo
3863 }
3864
3865 // Next returns the next result. Its second return value is iterator.Done if there are no more
3866 // results. Once Next returns Done, all subsequent calls will return Done.
3867 func (it *ClusterIterator) Next() (*visionaipb.Cluster, error) {
3868 var item *visionaipb.Cluster
3869 if err := it.nextFunc(); err != nil {
3870 return item, err
3871 }
3872 item = it.items[0]
3873 it.items = it.items[1:]
3874 return item, nil
3875 }
3876
3877 func (it *ClusterIterator) bufLen() int {
3878 return len(it.items)
3879 }
3880
3881 func (it *ClusterIterator) takeBuf() interface{} {
3882 b := it.items
3883 it.items = nil
3884 return b
3885 }
3886
3887 // CollectionItemIterator manages a stream of *visionaipb.CollectionItem.
3888 type CollectionItemIterator struct {
3889 items []*visionaipb.CollectionItem
3890 pageInfo *iterator.PageInfo
3891 nextFunc func() error
3892
3893 // Response is the raw response for the current page.
3894 // It must be cast to the RPC response type.
3895 // Calling Next() or InternalFetch() updates this value.
3896 Response interface{}
3897
3898 // InternalFetch is for use by the Google Cloud Libraries only.
3899 // It is not part of the stable interface of this package.
3900 //
3901 // InternalFetch returns results from a single call to the underlying RPC.
3902 // The number of results is no greater than pageSize.
3903 // If there are no more results, nextPageToken is empty and err is nil.
3904 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.CollectionItem, nextPageToken string, err error)
3905 }
3906
3907 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3908 func (it *CollectionItemIterator) PageInfo() *iterator.PageInfo {
3909 return it.pageInfo
3910 }
3911
3912 // Next returns the next result. Its second return value is iterator.Done if there are no more
3913 // results. Once Next returns Done, all subsequent calls will return Done.
3914 func (it *CollectionItemIterator) Next() (*visionaipb.CollectionItem, error) {
3915 var item *visionaipb.CollectionItem
3916 if err := it.nextFunc(); err != nil {
3917 return item, err
3918 }
3919 item = it.items[0]
3920 it.items = it.items[1:]
3921 return item, nil
3922 }
3923
3924 func (it *CollectionItemIterator) bufLen() int {
3925 return len(it.items)
3926 }
3927
3928 func (it *CollectionItemIterator) takeBuf() interface{} {
3929 b := it.items
3930 it.items = nil
3931 return b
3932 }
3933
3934 // CollectionIterator manages a stream of *visionaipb.Collection.
3935 type CollectionIterator struct {
3936 items []*visionaipb.Collection
3937 pageInfo *iterator.PageInfo
3938 nextFunc func() error
3939
3940 // Response is the raw response for the current page.
3941 // It must be cast to the RPC response type.
3942 // Calling Next() or InternalFetch() updates this value.
3943 Response interface{}
3944
3945 // InternalFetch is for use by the Google Cloud Libraries only.
3946 // It is not part of the stable interface of this package.
3947 //
3948 // InternalFetch returns results from a single call to the underlying RPC.
3949 // The number of results is no greater than pageSize.
3950 // If there are no more results, nextPageToken is empty and err is nil.
3951 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Collection, nextPageToken string, err error)
3952 }
3953
3954 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3955 func (it *CollectionIterator) PageInfo() *iterator.PageInfo {
3956 return it.pageInfo
3957 }
3958
3959 // Next returns the next result. Its second return value is iterator.Done if there are no more
3960 // results. Once Next returns Done, all subsequent calls will return Done.
3961 func (it *CollectionIterator) Next() (*visionaipb.Collection, error) {
3962 var item *visionaipb.Collection
3963 if err := it.nextFunc(); err != nil {
3964 return item, err
3965 }
3966 item = it.items[0]
3967 it.items = it.items[1:]
3968 return item, nil
3969 }
3970
3971 func (it *CollectionIterator) bufLen() int {
3972 return len(it.items)
3973 }
3974
3975 func (it *CollectionIterator) takeBuf() interface{} {
3976 b := it.items
3977 it.items = nil
3978 return b
3979 }
3980
3981 // CorpusIterator manages a stream of *visionaipb.Corpus.
3982 type CorpusIterator struct {
3983 items []*visionaipb.Corpus
3984 pageInfo *iterator.PageInfo
3985 nextFunc func() error
3986
3987 // Response is the raw response for the current page.
3988 // It must be cast to the RPC response type.
3989 // Calling Next() or InternalFetch() updates this value.
3990 Response interface{}
3991
3992 // InternalFetch is for use by the Google Cloud Libraries only.
3993 // It is not part of the stable interface of this package.
3994 //
3995 // InternalFetch returns results from a single call to the underlying RPC.
3996 // The number of results is no greater than pageSize.
3997 // If there are no more results, nextPageToken is empty and err is nil.
3998 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Corpus, nextPageToken string, err error)
3999 }
4000
4001 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4002 func (it *CorpusIterator) PageInfo() *iterator.PageInfo {
4003 return it.pageInfo
4004 }
4005
4006 // Next returns the next result. Its second return value is iterator.Done if there are no more
4007 // results. Once Next returns Done, all subsequent calls will return Done.
4008 func (it *CorpusIterator) Next() (*visionaipb.Corpus, error) {
4009 var item *visionaipb.Corpus
4010 if err := it.nextFunc(); err != nil {
4011 return item, err
4012 }
4013 item = it.items[0]
4014 it.items = it.items[1:]
4015 return item, nil
4016 }
4017
4018 func (it *CorpusIterator) bufLen() int {
4019 return len(it.items)
4020 }
4021
4022 func (it *CorpusIterator) takeBuf() interface{} {
4023 b := it.items
4024 it.items = nil
4025 return b
4026 }
4027
4028 // DataSchemaIterator manages a stream of *visionaipb.DataSchema.
4029 type DataSchemaIterator struct {
4030 items []*visionaipb.DataSchema
4031 pageInfo *iterator.PageInfo
4032 nextFunc func() error
4033
4034 // Response is the raw response for the current page.
4035 // It must be cast to the RPC response type.
4036 // Calling Next() or InternalFetch() updates this value.
4037 Response interface{}
4038
4039 // InternalFetch is for use by the Google Cloud Libraries only.
4040 // It is not part of the stable interface of this package.
4041 //
4042 // InternalFetch returns results from a single call to the underlying RPC.
4043 // The number of results is no greater than pageSize.
4044 // If there are no more results, nextPageToken is empty and err is nil.
4045 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.DataSchema, nextPageToken string, err error)
4046 }
4047
4048 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4049 func (it *DataSchemaIterator) PageInfo() *iterator.PageInfo {
4050 return it.pageInfo
4051 }
4052
4053 // Next returns the next result. Its second return value is iterator.Done if there are no more
4054 // results. Once Next returns Done, all subsequent calls will return Done.
4055 func (it *DataSchemaIterator) Next() (*visionaipb.DataSchema, error) {
4056 var item *visionaipb.DataSchema
4057 if err := it.nextFunc(); err != nil {
4058 return item, err
4059 }
4060 item = it.items[0]
4061 it.items = it.items[1:]
4062 return item, nil
4063 }
4064
4065 func (it *DataSchemaIterator) bufLen() int {
4066 return len(it.items)
4067 }
4068
4069 func (it *DataSchemaIterator) takeBuf() interface{} {
4070 b := it.items
4071 it.items = nil
4072 return b
4073 }
4074
4075 // DraftIterator manages a stream of *visionaipb.Draft.
4076 type DraftIterator struct {
4077 items []*visionaipb.Draft
4078 pageInfo *iterator.PageInfo
4079 nextFunc func() error
4080
4081 // Response is the raw response for the current page.
4082 // It must be cast to the RPC response type.
4083 // Calling Next() or InternalFetch() updates this value.
4084 Response interface{}
4085
4086 // InternalFetch is for use by the Google Cloud Libraries only.
4087 // It is not part of the stable interface of this package.
4088 //
4089 // InternalFetch returns results from a single call to the underlying RPC.
4090 // The number of results is no greater than pageSize.
4091 // If there are no more results, nextPageToken is empty and err is nil.
4092 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Draft, nextPageToken string, err error)
4093 }
4094
4095 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4096 func (it *DraftIterator) PageInfo() *iterator.PageInfo {
4097 return it.pageInfo
4098 }
4099
4100 // Next returns the next result. Its second return value is iterator.Done if there are no more
4101 // results. Once Next returns Done, all subsequent calls will return Done.
4102 func (it *DraftIterator) Next() (*visionaipb.Draft, error) {
4103 var item *visionaipb.Draft
4104 if err := it.nextFunc(); err != nil {
4105 return item, err
4106 }
4107 item = it.items[0]
4108 it.items = it.items[1:]
4109 return item, nil
4110 }
4111
4112 func (it *DraftIterator) bufLen() int {
4113 return len(it.items)
4114 }
4115
4116 func (it *DraftIterator) takeBuf() interface{} {
4117 b := it.items
4118 it.items = nil
4119 return b
4120 }
4121
4122 // EventIterator manages a stream of *visionaipb.Event.
4123 type EventIterator struct {
4124 items []*visionaipb.Event
4125 pageInfo *iterator.PageInfo
4126 nextFunc func() error
4127
4128 // Response is the raw response for the current page.
4129 // It must be cast to the RPC response type.
4130 // Calling Next() or InternalFetch() updates this value.
4131 Response interface{}
4132
4133 // InternalFetch is for use by the Google Cloud Libraries only.
4134 // It is not part of the stable interface of this package.
4135 //
4136 // InternalFetch returns results from a single call to the underlying RPC.
4137 // The number of results is no greater than pageSize.
4138 // If there are no more results, nextPageToken is empty and err is nil.
4139 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Event, nextPageToken string, err error)
4140 }
4141
4142 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4143 func (it *EventIterator) PageInfo() *iterator.PageInfo {
4144 return it.pageInfo
4145 }
4146
4147 // Next returns the next result. Its second return value is iterator.Done if there are no more
4148 // results. Once Next returns Done, all subsequent calls will return Done.
4149 func (it *EventIterator) Next() (*visionaipb.Event, error) {
4150 var item *visionaipb.Event
4151 if err := it.nextFunc(); err != nil {
4152 return item, err
4153 }
4154 item = it.items[0]
4155 it.items = it.items[1:]
4156 return item, nil
4157 }
4158
4159 func (it *EventIterator) bufLen() int {
4160 return len(it.items)
4161 }
4162
4163 func (it *EventIterator) takeBuf() interface{} {
4164 b := it.items
4165 it.items = nil
4166 return b
4167 }
4168
4169 // IndexEndpointIterator manages a stream of *visionaipb.IndexEndpoint.
4170 type IndexEndpointIterator struct {
4171 items []*visionaipb.IndexEndpoint
4172 pageInfo *iterator.PageInfo
4173 nextFunc func() error
4174
4175 // Response is the raw response for the current page.
4176 // It must be cast to the RPC response type.
4177 // Calling Next() or InternalFetch() updates this value.
4178 Response interface{}
4179
4180 // InternalFetch is for use by the Google Cloud Libraries only.
4181 // It is not part of the stable interface of this package.
4182 //
4183 // InternalFetch returns results from a single call to the underlying RPC.
4184 // The number of results is no greater than pageSize.
4185 // If there are no more results, nextPageToken is empty and err is nil.
4186 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.IndexEndpoint, nextPageToken string, err error)
4187 }
4188
4189 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4190 func (it *IndexEndpointIterator) PageInfo() *iterator.PageInfo {
4191 return it.pageInfo
4192 }
4193
4194 // Next returns the next result. Its second return value is iterator.Done if there are no more
4195 // results. Once Next returns Done, all subsequent calls will return Done.
4196 func (it *IndexEndpointIterator) Next() (*visionaipb.IndexEndpoint, error) {
4197 var item *visionaipb.IndexEndpoint
4198 if err := it.nextFunc(); err != nil {
4199 return item, err
4200 }
4201 item = it.items[0]
4202 it.items = it.items[1:]
4203 return item, nil
4204 }
4205
4206 func (it *IndexEndpointIterator) bufLen() int {
4207 return len(it.items)
4208 }
4209
4210 func (it *IndexEndpointIterator) takeBuf() interface{} {
4211 b := it.items
4212 it.items = nil
4213 return b
4214 }
4215
4216 // IndexIterator manages a stream of *visionaipb.Index.
4217 type IndexIterator struct {
4218 items []*visionaipb.Index
4219 pageInfo *iterator.PageInfo
4220 nextFunc func() error
4221
4222 // Response is the raw response for the current page.
4223 // It must be cast to the RPC response type.
4224 // Calling Next() or InternalFetch() updates this value.
4225 Response interface{}
4226
4227 // InternalFetch is for use by the Google Cloud Libraries only.
4228 // It is not part of the stable interface of this package.
4229 //
4230 // InternalFetch returns results from a single call to the underlying RPC.
4231 // The number of results is no greater than pageSize.
4232 // If there are no more results, nextPageToken is empty and err is nil.
4233 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Index, nextPageToken string, err error)
4234 }
4235
4236 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4237 func (it *IndexIterator) PageInfo() *iterator.PageInfo {
4238 return it.pageInfo
4239 }
4240
4241 // Next returns the next result. Its second return value is iterator.Done if there are no more
4242 // results. Once Next returns Done, all subsequent calls will return Done.
4243 func (it *IndexIterator) Next() (*visionaipb.Index, error) {
4244 var item *visionaipb.Index
4245 if err := it.nextFunc(); err != nil {
4246 return item, err
4247 }
4248 item = it.items[0]
4249 it.items = it.items[1:]
4250 return item, nil
4251 }
4252
4253 func (it *IndexIterator) bufLen() int {
4254 return len(it.items)
4255 }
4256
4257 func (it *IndexIterator) takeBuf() interface{} {
4258 b := it.items
4259 it.items = nil
4260 return b
4261 }
4262
4263 // IndexedAssetIterator manages a stream of *visionaipb.IndexedAsset.
4264 type IndexedAssetIterator struct {
4265 items []*visionaipb.IndexedAsset
4266 pageInfo *iterator.PageInfo
4267 nextFunc func() error
4268
4269 // Response is the raw response for the current page.
4270 // It must be cast to the RPC response type.
4271 // Calling Next() or InternalFetch() updates this value.
4272 Response interface{}
4273
4274 // InternalFetch is for use by the Google Cloud Libraries only.
4275 // It is not part of the stable interface of this package.
4276 //
4277 // InternalFetch returns results from a single call to the underlying RPC.
4278 // The number of results is no greater than pageSize.
4279 // If there are no more results, nextPageToken is empty and err is nil.
4280 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.IndexedAsset, nextPageToken string, err error)
4281 }
4282
4283 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4284 func (it *IndexedAssetIterator) PageInfo() *iterator.PageInfo {
4285 return it.pageInfo
4286 }
4287
4288 // Next returns the next result. Its second return value is iterator.Done if there are no more
4289 // results. Once Next returns Done, all subsequent calls will return Done.
4290 func (it *IndexedAssetIterator) Next() (*visionaipb.IndexedAsset, error) {
4291 var item *visionaipb.IndexedAsset
4292 if err := it.nextFunc(); err != nil {
4293 return item, err
4294 }
4295 item = it.items[0]
4296 it.items = it.items[1:]
4297 return item, nil
4298 }
4299
4300 func (it *IndexedAssetIterator) bufLen() int {
4301 return len(it.items)
4302 }
4303
4304 func (it *IndexedAssetIterator) takeBuf() interface{} {
4305 b := it.items
4306 it.items = nil
4307 return b
4308 }
4309
4310 // InstanceIterator manages a stream of *visionaipb.Instance.
4311 type InstanceIterator struct {
4312 items []*visionaipb.Instance
4313 pageInfo *iterator.PageInfo
4314 nextFunc func() error
4315
4316 // Response is the raw response for the current page.
4317 // It must be cast to the RPC response type.
4318 // Calling Next() or InternalFetch() updates this value.
4319 Response interface{}
4320
4321 // InternalFetch is for use by the Google Cloud Libraries only.
4322 // It is not part of the stable interface of this package.
4323 //
4324 // InternalFetch returns results from a single call to the underlying RPC.
4325 // The number of results is no greater than pageSize.
4326 // If there are no more results, nextPageToken is empty and err is nil.
4327 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Instance, nextPageToken string, err error)
4328 }
4329
4330 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4331 func (it *InstanceIterator) PageInfo() *iterator.PageInfo {
4332 return it.pageInfo
4333 }
4334
4335 // Next returns the next result. Its second return value is iterator.Done if there are no more
4336 // results. Once Next returns Done, all subsequent calls will return Done.
4337 func (it *InstanceIterator) Next() (*visionaipb.Instance, error) {
4338 var item *visionaipb.Instance
4339 if err := it.nextFunc(); err != nil {
4340 return item, err
4341 }
4342 item = it.items[0]
4343 it.items = it.items[1:]
4344 return item, nil
4345 }
4346
4347 func (it *InstanceIterator) bufLen() int {
4348 return len(it.items)
4349 }
4350
4351 func (it *InstanceIterator) takeBuf() interface{} {
4352 b := it.items
4353 it.items = nil
4354 return b
4355 }
4356
4357 // OperationIterator manages a stream of *longrunningpb.Operation.
4358 type OperationIterator struct {
4359 items []*longrunningpb.Operation
4360 pageInfo *iterator.PageInfo
4361 nextFunc func() error
4362
4363 // Response is the raw response for the current page.
4364 // It must be cast to the RPC response type.
4365 // Calling Next() or InternalFetch() updates this value.
4366 Response interface{}
4367
4368 // InternalFetch is for use by the Google Cloud Libraries only.
4369 // It is not part of the stable interface of this package.
4370 //
4371 // InternalFetch returns results from a single call to the underlying RPC.
4372 // The number of results is no greater than pageSize.
4373 // If there are no more results, nextPageToken is empty and err is nil.
4374 InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
4375 }
4376
4377 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4378 func (it *OperationIterator) PageInfo() *iterator.PageInfo {
4379 return it.pageInfo
4380 }
4381
4382 // Next returns the next result. Its second return value is iterator.Done if there are no more
4383 // results. Once Next returns Done, all subsequent calls will return Done.
4384 func (it *OperationIterator) Next() (*longrunningpb.Operation, error) {
4385 var item *longrunningpb.Operation
4386 if err := it.nextFunc(); err != nil {
4387 return item, err
4388 }
4389 item = it.items[0]
4390 it.items = it.items[1:]
4391 return item, nil
4392 }
4393
4394 func (it *OperationIterator) bufLen() int {
4395 return len(it.items)
4396 }
4397
4398 func (it *OperationIterator) takeBuf() interface{} {
4399 b := it.items
4400 it.items = nil
4401 return b
4402 }
4403
4404 // OperatorIterator manages a stream of *visionaipb.Operator.
4405 type OperatorIterator struct {
4406 items []*visionaipb.Operator
4407 pageInfo *iterator.PageInfo
4408 nextFunc func() error
4409
4410 // Response is the raw response for the current page.
4411 // It must be cast to the RPC response type.
4412 // Calling Next() or InternalFetch() updates this value.
4413 Response interface{}
4414
4415 // InternalFetch is for use by the Google Cloud Libraries only.
4416 // It is not part of the stable interface of this package.
4417 //
4418 // InternalFetch returns results from a single call to the underlying RPC.
4419 // The number of results is no greater than pageSize.
4420 // If there are no more results, nextPageToken is empty and err is nil.
4421 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Operator, nextPageToken string, err error)
4422 }
4423
4424 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4425 func (it *OperatorIterator) PageInfo() *iterator.PageInfo {
4426 return it.pageInfo
4427 }
4428
4429 // Next returns the next result. Its second return value is iterator.Done if there are no more
4430 // results. Once Next returns Done, all subsequent calls will return Done.
4431 func (it *OperatorIterator) Next() (*visionaipb.Operator, error) {
4432 var item *visionaipb.Operator
4433 if err := it.nextFunc(); err != nil {
4434 return item, err
4435 }
4436 item = it.items[0]
4437 it.items = it.items[1:]
4438 return item, nil
4439 }
4440
4441 func (it *OperatorIterator) bufLen() int {
4442 return len(it.items)
4443 }
4444
4445 func (it *OperatorIterator) takeBuf() interface{} {
4446 b := it.items
4447 it.items = nil
4448 return b
4449 }
4450
4451 // ProcessIterator manages a stream of *visionaipb.Process.
4452 type ProcessIterator struct {
4453 items []*visionaipb.Process
4454 pageInfo *iterator.PageInfo
4455 nextFunc func() error
4456
4457 // Response is the raw response for the current page.
4458 // It must be cast to the RPC response type.
4459 // Calling Next() or InternalFetch() updates this value.
4460 Response interface{}
4461
4462 // InternalFetch is for use by the Google Cloud Libraries only.
4463 // It is not part of the stable interface of this package.
4464 //
4465 // InternalFetch returns results from a single call to the underlying RPC.
4466 // The number of results is no greater than pageSize.
4467 // If there are no more results, nextPageToken is empty and err is nil.
4468 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Process, nextPageToken string, err error)
4469 }
4470
4471 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4472 func (it *ProcessIterator) PageInfo() *iterator.PageInfo {
4473 return it.pageInfo
4474 }
4475
4476 // Next returns the next result. Its second return value is iterator.Done if there are no more
4477 // results. Once Next returns Done, all subsequent calls will return Done.
4478 func (it *ProcessIterator) Next() (*visionaipb.Process, error) {
4479 var item *visionaipb.Process
4480 if err := it.nextFunc(); err != nil {
4481 return item, err
4482 }
4483 item = it.items[0]
4484 it.items = it.items[1:]
4485 return item, nil
4486 }
4487
4488 func (it *ProcessIterator) bufLen() int {
4489 return len(it.items)
4490 }
4491
4492 func (it *ProcessIterator) takeBuf() interface{} {
4493 b := it.items
4494 it.items = nil
4495 return b
4496 }
4497
4498 // ProcessorIterator manages a stream of *visionaipb.Processor.
4499 type ProcessorIterator struct {
4500 items []*visionaipb.Processor
4501 pageInfo *iterator.PageInfo
4502 nextFunc func() error
4503
4504 // Response is the raw response for the current page.
4505 // It must be cast to the RPC response type.
4506 // Calling Next() or InternalFetch() updates this value.
4507 Response interface{}
4508
4509 // InternalFetch is for use by the Google Cloud Libraries only.
4510 // It is not part of the stable interface of this package.
4511 //
4512 // InternalFetch returns results from a single call to the underlying RPC.
4513 // The number of results is no greater than pageSize.
4514 // If there are no more results, nextPageToken is empty and err is nil.
4515 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Processor, nextPageToken string, err error)
4516 }
4517
4518 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4519 func (it *ProcessorIterator) PageInfo() *iterator.PageInfo {
4520 return it.pageInfo
4521 }
4522
4523 // Next returns the next result. Its second return value is iterator.Done if there are no more
4524 // results. Once Next returns Done, all subsequent calls will return Done.
4525 func (it *ProcessorIterator) Next() (*visionaipb.Processor, error) {
4526 var item *visionaipb.Processor
4527 if err := it.nextFunc(); err != nil {
4528 return item, err
4529 }
4530 item = it.items[0]
4531 it.items = it.items[1:]
4532 return item, nil
4533 }
4534
4535 func (it *ProcessorIterator) bufLen() int {
4536 return len(it.items)
4537 }
4538
4539 func (it *ProcessorIterator) takeBuf() interface{} {
4540 b := it.items
4541 it.items = nil
4542 return b
4543 }
4544
4545 // SearchConfigIterator manages a stream of *visionaipb.SearchConfig.
4546 type SearchConfigIterator struct {
4547 items []*visionaipb.SearchConfig
4548 pageInfo *iterator.PageInfo
4549 nextFunc func() error
4550
4551 // Response is the raw response for the current page.
4552 // It must be cast to the RPC response type.
4553 // Calling Next() or InternalFetch() updates this value.
4554 Response interface{}
4555
4556 // InternalFetch is for use by the Google Cloud Libraries only.
4557 // It is not part of the stable interface of this package.
4558 //
4559 // InternalFetch returns results from a single call to the underlying RPC.
4560 // The number of results is no greater than pageSize.
4561 // If there are no more results, nextPageToken is empty and err is nil.
4562 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.SearchConfig, nextPageToken string, err error)
4563 }
4564
4565 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4566 func (it *SearchConfigIterator) PageInfo() *iterator.PageInfo {
4567 return it.pageInfo
4568 }
4569
4570 // Next returns the next result. Its second return value is iterator.Done if there are no more
4571 // results. Once Next returns Done, all subsequent calls will return Done.
4572 func (it *SearchConfigIterator) Next() (*visionaipb.SearchConfig, error) {
4573 var item *visionaipb.SearchConfig
4574 if err := it.nextFunc(); err != nil {
4575 return item, err
4576 }
4577 item = it.items[0]
4578 it.items = it.items[1:]
4579 return item, nil
4580 }
4581
4582 func (it *SearchConfigIterator) bufLen() int {
4583 return len(it.items)
4584 }
4585
4586 func (it *SearchConfigIterator) takeBuf() interface{} {
4587 b := it.items
4588 it.items = nil
4589 return b
4590 }
4591
4592 // SearchHypernymIterator manages a stream of *visionaipb.SearchHypernym.
4593 type SearchHypernymIterator struct {
4594 items []*visionaipb.SearchHypernym
4595 pageInfo *iterator.PageInfo
4596 nextFunc func() error
4597
4598 // Response is the raw response for the current page.
4599 // It must be cast to the RPC response type.
4600 // Calling Next() or InternalFetch() updates this value.
4601 Response interface{}
4602
4603 // InternalFetch is for use by the Google Cloud Libraries only.
4604 // It is not part of the stable interface of this package.
4605 //
4606 // InternalFetch returns results from a single call to the underlying RPC.
4607 // The number of results is no greater than pageSize.
4608 // If there are no more results, nextPageToken is empty and err is nil.
4609 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.SearchHypernym, nextPageToken string, err error)
4610 }
4611
4612 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4613 func (it *SearchHypernymIterator) PageInfo() *iterator.PageInfo {
4614 return it.pageInfo
4615 }
4616
4617 // Next returns the next result. Its second return value is iterator.Done if there are no more
4618 // results. Once Next returns Done, all subsequent calls will return Done.
4619 func (it *SearchHypernymIterator) Next() (*visionaipb.SearchHypernym, error) {
4620 var item *visionaipb.SearchHypernym
4621 if err := it.nextFunc(); err != nil {
4622 return item, err
4623 }
4624 item = it.items[0]
4625 it.items = it.items[1:]
4626 return item, nil
4627 }
4628
4629 func (it *SearchHypernymIterator) bufLen() int {
4630 return len(it.items)
4631 }
4632
4633 func (it *SearchHypernymIterator) takeBuf() interface{} {
4634 b := it.items
4635 it.items = nil
4636 return b
4637 }
4638
4639 // SearchResultItemIterator manages a stream of *visionaipb.SearchResultItem.
4640 type SearchResultItemIterator struct {
4641 items []*visionaipb.SearchResultItem
4642 pageInfo *iterator.PageInfo
4643 nextFunc func() error
4644
4645 // Response is the raw response for the current page.
4646 // It must be cast to the RPC response type.
4647 // Calling Next() or InternalFetch() updates this value.
4648 Response interface{}
4649
4650 // InternalFetch is for use by the Google Cloud Libraries only.
4651 // It is not part of the stable interface of this package.
4652 //
4653 // InternalFetch returns results from a single call to the underlying RPC.
4654 // The number of results is no greater than pageSize.
4655 // If there are no more results, nextPageToken is empty and err is nil.
4656 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.SearchResultItem, nextPageToken string, err error)
4657 }
4658
4659 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4660 func (it *SearchResultItemIterator) PageInfo() *iterator.PageInfo {
4661 return it.pageInfo
4662 }
4663
4664 // Next returns the next result. Its second return value is iterator.Done if there are no more
4665 // results. Once Next returns Done, all subsequent calls will return Done.
4666 func (it *SearchResultItemIterator) Next() (*visionaipb.SearchResultItem, error) {
4667 var item *visionaipb.SearchResultItem
4668 if err := it.nextFunc(); err != nil {
4669 return item, err
4670 }
4671 item = it.items[0]
4672 it.items = it.items[1:]
4673 return item, nil
4674 }
4675
4676 func (it *SearchResultItemIterator) bufLen() int {
4677 return len(it.items)
4678 }
4679
4680 func (it *SearchResultItemIterator) takeBuf() interface{} {
4681 b := it.items
4682 it.items = nil
4683 return b
4684 }
4685
4686 // SeriesIterator manages a stream of *visionaipb.Series.
4687 type SeriesIterator struct {
4688 items []*visionaipb.Series
4689 pageInfo *iterator.PageInfo
4690 nextFunc func() error
4691
4692 // Response is the raw response for the current page.
4693 // It must be cast to the RPC response type.
4694 // Calling Next() or InternalFetch() updates this value.
4695 Response interface{}
4696
4697 // InternalFetch is for use by the Google Cloud Libraries only.
4698 // It is not part of the stable interface of this package.
4699 //
4700 // InternalFetch returns results from a single call to the underlying RPC.
4701 // The number of results is no greater than pageSize.
4702 // If there are no more results, nextPageToken is empty and err is nil.
4703 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Series, nextPageToken string, err error)
4704 }
4705
4706 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4707 func (it *SeriesIterator) PageInfo() *iterator.PageInfo {
4708 return it.pageInfo
4709 }
4710
4711 // Next returns the next result. Its second return value is iterator.Done if there are no more
4712 // results. Once Next returns Done, all subsequent calls will return Done.
4713 func (it *SeriesIterator) Next() (*visionaipb.Series, error) {
4714 var item *visionaipb.Series
4715 if err := it.nextFunc(); err != nil {
4716 return item, err
4717 }
4718 item = it.items[0]
4719 it.items = it.items[1:]
4720 return item, nil
4721 }
4722
4723 func (it *SeriesIterator) bufLen() int {
4724 return len(it.items)
4725 }
4726
4727 func (it *SeriesIterator) takeBuf() interface{} {
4728 b := it.items
4729 it.items = nil
4730 return b
4731 }
4732
4733 // StreamIterator manages a stream of *visionaipb.Stream.
4734 type StreamIterator struct {
4735 items []*visionaipb.Stream
4736 pageInfo *iterator.PageInfo
4737 nextFunc func() error
4738
4739 // Response is the raw response for the current page.
4740 // It must be cast to the RPC response type.
4741 // Calling Next() or InternalFetch() updates this value.
4742 Response interface{}
4743
4744 // InternalFetch is for use by the Google Cloud Libraries only.
4745 // It is not part of the stable interface of this package.
4746 //
4747 // InternalFetch returns results from a single call to the underlying RPC.
4748 // The number of results is no greater than pageSize.
4749 // If there are no more results, nextPageToken is empty and err is nil.
4750 InternalFetch func(pageSize int, pageToken string) (results []*visionaipb.Stream, nextPageToken string, err error)
4751 }
4752
4753 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
4754 func (it *StreamIterator) PageInfo() *iterator.PageInfo {
4755 return it.pageInfo
4756 }
4757
4758 // Next returns the next result. Its second return value is iterator.Done if there are no more
4759 // results. Once Next returns Done, all subsequent calls will return Done.
4760 func (it *StreamIterator) Next() (*visionaipb.Stream, error) {
4761 var item *visionaipb.Stream
4762 if err := it.nextFunc(); err != nil {
4763 return item, err
4764 }
4765 item = it.items[0]
4766 it.items = it.items[1:]
4767 return item, nil
4768 }
4769
4770 func (it *StreamIterator) bufLen() int {
4771 return len(it.items)
4772 }
4773
4774 func (it *StreamIterator) takeBuf() interface{} {
4775 b := it.items
4776 it.items = nil
4777 return b
4778 }