Debian Codegraph @

financialservices/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 financialservices
18
19 import (
20 "context"
21 "time"
22
23 financialservicespb "cloud.google.com/go/financialservices/apiv1/financialservicespb"
24 "cloud.google.com/go/longrunning"
25 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
26 gax "github.com/googleapis/gax-go/v2"
27 "google.golang.org/api/iterator"
28 locationpb "google.golang.org/genproto/googleapis/cloud/location"
29 )
30
31 // CreateBacktestResultOperation manages a long-running operation from CreateBacktestResult.
32 type CreateBacktestResultOperation struct {
33 lro *longrunning.Operation
34 pollPath string
35 }
36
37 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
38 //
39 // See documentation of Poll for error-handling information.
40 func (op *CreateBacktestResultOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.BacktestResult, error) {
41 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
42 var resp financialservicespb.BacktestResult
43 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
44 return nil, err
45 }
46 return &resp, nil
47 }
48
49 // Poll fetches the latest state of the long-running operation.
50 //
51 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
52 //
53 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
54 // the operation has completed with failure, the error is returned and op.Done will return true.
55 // If Poll succeeds and the operation has completed successfully,
56 // op.Done will return true, and the response of the operation is returned.
57 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
58 func (op *CreateBacktestResultOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.BacktestResult, error) {
59 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
60 var resp financialservicespb.BacktestResult
61 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
62 return nil, err
63 }
64 if !op.Done() {
65 return nil, nil
66 }
67 return &resp, nil
68 }
69
70 // Metadata returns metadata associated with the long-running operation.
71 // Metadata itself does not contact the server, but Poll does.
72 // To get the latest metadata, call this method after a successful call to Poll.
73 // If the metadata is not available, the returned metadata and error are both nil.
74 func (op *CreateBacktestResultOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
75 var meta financialservicespb.OperationMetadata
76 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
77 return nil, nil
78 } else if err != nil {
79 return nil, err
80 }
81 return &meta, nil
82 }
83
84 // Done reports whether the long-running operation has completed.
85 func (op *CreateBacktestResultOperation) Done() bool {
86 return op.lro.Done()
87 }
88
89 // Name returns the name of the long-running operation.
90 // The name is assigned by the server and is unique within the service from which the operation is created.
91 func (op *CreateBacktestResultOperation) Name() string {
92 return op.lro.Name()
93 }
94
95 // CreateDatasetOperation manages a long-running operation from CreateDataset.
96 type CreateDatasetOperation struct {
97 lro *longrunning.Operation
98 pollPath string
99 }
100
101 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
102 //
103 // See documentation of Poll for error-handling information.
104 func (op *CreateDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Dataset, error) {
105 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
106 var resp financialservicespb.Dataset
107 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
108 return nil, err
109 }
110 return &resp, nil
111 }
112
113 // Poll fetches the latest state of the long-running operation.
114 //
115 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
116 //
117 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
118 // the operation has completed with failure, the error is returned and op.Done will return true.
119 // If Poll succeeds and the operation has completed successfully,
120 // op.Done will return true, and the response of the operation is returned.
121 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
122 func (op *CreateDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Dataset, error) {
123 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
124 var resp financialservicespb.Dataset
125 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
126 return nil, err
127 }
128 if !op.Done() {
129 return nil, nil
130 }
131 return &resp, nil
132 }
133
134 // Metadata returns metadata associated with the long-running operation.
135 // Metadata itself does not contact the server, but Poll does.
136 // To get the latest metadata, call this method after a successful call to Poll.
137 // If the metadata is not available, the returned metadata and error are both nil.
138 func (op *CreateDatasetOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
139 var meta financialservicespb.OperationMetadata
140 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
141 return nil, nil
142 } else if err != nil {
143 return nil, err
144 }
145 return &meta, nil
146 }
147
148 // Done reports whether the long-running operation has completed.
149 func (op *CreateDatasetOperation) Done() bool {
150 return op.lro.Done()
151 }
152
153 // Name returns the name of the long-running operation.
154 // The name is assigned by the server and is unique within the service from which the operation is created.
155 func (op *CreateDatasetOperation) Name() string {
156 return op.lro.Name()
157 }
158
159 // CreateEngineConfigOperation manages a long-running operation from CreateEngineConfig.
160 type CreateEngineConfigOperation struct {
161 lro *longrunning.Operation
162 pollPath string
163 }
164
165 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
166 //
167 // See documentation of Poll for error-handling information.
168 func (op *CreateEngineConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.EngineConfig, error) {
169 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
170 var resp financialservicespb.EngineConfig
171 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
172 return nil, err
173 }
174 return &resp, nil
175 }
176
177 // Poll fetches the latest state of the long-running operation.
178 //
179 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
180 //
181 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
182 // the operation has completed with failure, the error is returned and op.Done will return true.
183 // If Poll succeeds and the operation has completed successfully,
184 // op.Done will return true, and the response of the operation is returned.
185 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
186 func (op *CreateEngineConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.EngineConfig, error) {
187 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
188 var resp financialservicespb.EngineConfig
189 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
190 return nil, err
191 }
192 if !op.Done() {
193 return nil, nil
194 }
195 return &resp, nil
196 }
197
198 // Metadata returns metadata associated with the long-running operation.
199 // Metadata itself does not contact the server, but Poll does.
200 // To get the latest metadata, call this method after a successful call to Poll.
201 // If the metadata is not available, the returned metadata and error are both nil.
202 func (op *CreateEngineConfigOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
203 var meta financialservicespb.OperationMetadata
204 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
205 return nil, nil
206 } else if err != nil {
207 return nil, err
208 }
209 return &meta, nil
210 }
211
212 // Done reports whether the long-running operation has completed.
213 func (op *CreateEngineConfigOperation) Done() bool {
214 return op.lro.Done()
215 }
216
217 // Name returns the name of the long-running operation.
218 // The name is assigned by the server and is unique within the service from which the operation is created.
219 func (op *CreateEngineConfigOperation) Name() string {
220 return op.lro.Name()
221 }
222
223 // CreateInstanceOperation manages a long-running operation from CreateInstance.
224 type CreateInstanceOperation struct {
225 lro *longrunning.Operation
226 pollPath string
227 }
228
229 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
230 //
231 // See documentation of Poll for error-handling information.
232 func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Instance, error) {
233 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
234 var resp financialservicespb.Instance
235 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
236 return nil, err
237 }
238 return &resp, nil
239 }
240
241 // Poll fetches the latest state of the long-running operation.
242 //
243 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
244 //
245 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
246 // the operation has completed with failure, the error is returned and op.Done will return true.
247 // If Poll succeeds and the operation has completed successfully,
248 // op.Done will return true, and the response of the operation is returned.
249 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
250 func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Instance, error) {
251 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
252 var resp financialservicespb.Instance
253 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
254 return nil, err
255 }
256 if !op.Done() {
257 return nil, nil
258 }
259 return &resp, nil
260 }
261
262 // Metadata returns metadata associated with the long-running operation.
263 // Metadata itself does not contact the server, but Poll does.
264 // To get the latest metadata, call this method after a successful call to Poll.
265 // If the metadata is not available, the returned metadata and error are both nil.
266 func (op *CreateInstanceOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
267 var meta financialservicespb.OperationMetadata
268 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
269 return nil, nil
270 } else if err != nil {
271 return nil, err
272 }
273 return &meta, nil
274 }
275
276 // Done reports whether the long-running operation has completed.
277 func (op *CreateInstanceOperation) Done() bool {
278 return op.lro.Done()
279 }
280
281 // Name returns the name of the long-running operation.
282 // The name is assigned by the server and is unique within the service from which the operation is created.
283 func (op *CreateInstanceOperation) Name() string {
284 return op.lro.Name()
285 }
286
287 // CreateModelOperation manages a long-running operation from CreateModel.
288 type CreateModelOperation struct {
289 lro *longrunning.Operation
290 pollPath string
291 }
292
293 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
294 //
295 // See documentation of Poll for error-handling information.
296 func (op *CreateModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Model, error) {
297 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
298 var resp financialservicespb.Model
299 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
300 return nil, err
301 }
302 return &resp, nil
303 }
304
305 // Poll fetches the latest state of the long-running operation.
306 //
307 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
308 //
309 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
310 // the operation has completed with failure, the error is returned and op.Done will return true.
311 // If Poll succeeds and the operation has completed successfully,
312 // op.Done will return true, and the response of the operation is returned.
313 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
314 func (op *CreateModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Model, error) {
315 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
316 var resp financialservicespb.Model
317 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
318 return nil, err
319 }
320 if !op.Done() {
321 return nil, nil
322 }
323 return &resp, nil
324 }
325
326 // Metadata returns metadata associated with the long-running operation.
327 // Metadata itself does not contact the server, but Poll does.
328 // To get the latest metadata, call this method after a successful call to Poll.
329 // If the metadata is not available, the returned metadata and error are both nil.
330 func (op *CreateModelOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
331 var meta financialservicespb.OperationMetadata
332 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
333 return nil, nil
334 } else if err != nil {
335 return nil, err
336 }
337 return &meta, nil
338 }
339
340 // Done reports whether the long-running operation has completed.
341 func (op *CreateModelOperation) Done() bool {
342 return op.lro.Done()
343 }
344
345 // Name returns the name of the long-running operation.
346 // The name is assigned by the server and is unique within the service from which the operation is created.
347 func (op *CreateModelOperation) Name() string {
348 return op.lro.Name()
349 }
350
351 // CreatePredictionResultOperation manages a long-running operation from CreatePredictionResult.
352 type CreatePredictionResultOperation struct {
353 lro *longrunning.Operation
354 pollPath string
355 }
356
357 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
358 //
359 // See documentation of Poll for error-handling information.
360 func (op *CreatePredictionResultOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.PredictionResult, error) {
361 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
362 var resp financialservicespb.PredictionResult
363 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
364 return nil, err
365 }
366 return &resp, nil
367 }
368
369 // Poll fetches the latest state of the long-running operation.
370 //
371 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
372 //
373 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
374 // the operation has completed with failure, the error is returned and op.Done will return true.
375 // If Poll succeeds and the operation has completed successfully,
376 // op.Done will return true, and the response of the operation is returned.
377 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
378 func (op *CreatePredictionResultOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.PredictionResult, error) {
379 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
380 var resp financialservicespb.PredictionResult
381 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
382 return nil, err
383 }
384 if !op.Done() {
385 return nil, nil
386 }
387 return &resp, nil
388 }
389
390 // Metadata returns metadata associated with the long-running operation.
391 // Metadata itself does not contact the server, but Poll does.
392 // To get the latest metadata, call this method after a successful call to Poll.
393 // If the metadata is not available, the returned metadata and error are both nil.
394 func (op *CreatePredictionResultOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
395 var meta financialservicespb.OperationMetadata
396 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
397 return nil, nil
398 } else if err != nil {
399 return nil, err
400 }
401 return &meta, nil
402 }
403
404 // Done reports whether the long-running operation has completed.
405 func (op *CreatePredictionResultOperation) Done() bool {
406 return op.lro.Done()
407 }
408
409 // Name returns the name of the long-running operation.
410 // The name is assigned by the server and is unique within the service from which the operation is created.
411 func (op *CreatePredictionResultOperation) Name() string {
412 return op.lro.Name()
413 }
414
415 // DeleteBacktestResultOperation manages a long-running operation from DeleteBacktestResult.
416 type DeleteBacktestResultOperation struct {
417 lro *longrunning.Operation
418 pollPath string
419 }
420
421 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
422 //
423 // See documentation of Poll for error-handling information.
424 func (op *DeleteBacktestResultOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
425 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
426 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
427 }
428
429 // Poll fetches the latest state of the long-running operation.
430 //
431 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
432 //
433 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
434 // the operation has completed with failure, the error is returned and op.Done will return true.
435 // If Poll succeeds and the operation has completed successfully,
436 // op.Done will return true, and the response of the operation is returned.
437 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
438 func (op *DeleteBacktestResultOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
439 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
440 return op.lro.Poll(ctx, nil, opts...)
441 }
442
443 // Metadata returns metadata associated with the long-running operation.
444 // Metadata itself does not contact the server, but Poll does.
445 // To get the latest metadata, call this method after a successful call to Poll.
446 // If the metadata is not available, the returned metadata and error are both nil.
447 func (op *DeleteBacktestResultOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
448 var meta financialservicespb.OperationMetadata
449 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
450 return nil, nil
451 } else if err != nil {
452 return nil, err
453 }
454 return &meta, nil
455 }
456
457 // Done reports whether the long-running operation has completed.
458 func (op *DeleteBacktestResultOperation) Done() bool {
459 return op.lro.Done()
460 }
461
462 // Name returns the name of the long-running operation.
463 // The name is assigned by the server and is unique within the service from which the operation is created.
464 func (op *DeleteBacktestResultOperation) Name() string {
465 return op.lro.Name()
466 }
467
468 // DeleteDatasetOperation manages a long-running operation from DeleteDataset.
469 type DeleteDatasetOperation struct {
470 lro *longrunning.Operation
471 pollPath string
472 }
473
474 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
475 //
476 // See documentation of Poll for error-handling information.
477 func (op *DeleteDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
478 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
479 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
480 }
481
482 // Poll fetches the latest state of the long-running operation.
483 //
484 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
485 //
486 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
487 // the operation has completed with failure, the error is returned and op.Done will return true.
488 // If Poll succeeds and the operation has completed successfully,
489 // op.Done will return true, and the response of the operation is returned.
490 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
491 func (op *DeleteDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
492 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
493 return op.lro.Poll(ctx, nil, opts...)
494 }
495
496 // Metadata returns metadata associated with the long-running operation.
497 // Metadata itself does not contact the server, but Poll does.
498 // To get the latest metadata, call this method after a successful call to Poll.
499 // If the metadata is not available, the returned metadata and error are both nil.
500 func (op *DeleteDatasetOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
501 var meta financialservicespb.OperationMetadata
502 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
503 return nil, nil
504 } else if err != nil {
505 return nil, err
506 }
507 return &meta, nil
508 }
509
510 // Done reports whether the long-running operation has completed.
511 func (op *DeleteDatasetOperation) Done() bool {
512 return op.lro.Done()
513 }
514
515 // Name returns the name of the long-running operation.
516 // The name is assigned by the server and is unique within the service from which the operation is created.
517 func (op *DeleteDatasetOperation) Name() string {
518 return op.lro.Name()
519 }
520
521 // DeleteEngineConfigOperation manages a long-running operation from DeleteEngineConfig.
522 type DeleteEngineConfigOperation struct {
523 lro *longrunning.Operation
524 pollPath string
525 }
526
527 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
528 //
529 // See documentation of Poll for error-handling information.
530 func (op *DeleteEngineConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
531 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
532 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
533 }
534
535 // Poll fetches the latest state of the long-running operation.
536 //
537 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
538 //
539 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
540 // the operation has completed with failure, the error is returned and op.Done will return true.
541 // If Poll succeeds and the operation has completed successfully,
542 // op.Done will return true, and the response of the operation is returned.
543 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
544 func (op *DeleteEngineConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
545 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
546 return op.lro.Poll(ctx, nil, opts...)
547 }
548
549 // Metadata returns metadata associated with the long-running operation.
550 // Metadata itself does not contact the server, but Poll does.
551 // To get the latest metadata, call this method after a successful call to Poll.
552 // If the metadata is not available, the returned metadata and error are both nil.
553 func (op *DeleteEngineConfigOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
554 var meta financialservicespb.OperationMetadata
555 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
556 return nil, nil
557 } else if err != nil {
558 return nil, err
559 }
560 return &meta, nil
561 }
562
563 // Done reports whether the long-running operation has completed.
564 func (op *DeleteEngineConfigOperation) Done() bool {
565 return op.lro.Done()
566 }
567
568 // Name returns the name of the long-running operation.
569 // The name is assigned by the server and is unique within the service from which the operation is created.
570 func (op *DeleteEngineConfigOperation) Name() string {
571 return op.lro.Name()
572 }
573
574 // DeleteInstanceOperation manages a long-running operation from DeleteInstance.
575 type DeleteInstanceOperation struct {
576 lro *longrunning.Operation
577 pollPath string
578 }
579
580 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
581 //
582 // See documentation of Poll for error-handling information.
583 func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
584 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
585 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
586 }
587
588 // Poll fetches the latest state of the long-running operation.
589 //
590 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
591 //
592 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
593 // the operation has completed with failure, the error is returned and op.Done will return true.
594 // If Poll succeeds and the operation has completed successfully,
595 // op.Done will return true, and the response of the operation is returned.
596 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
597 func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
598 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
599 return op.lro.Poll(ctx, nil, opts...)
600 }
601
602 // Metadata returns metadata associated with the long-running operation.
603 // Metadata itself does not contact the server, but Poll does.
604 // To get the latest metadata, call this method after a successful call to Poll.
605 // If the metadata is not available, the returned metadata and error are both nil.
606 func (op *DeleteInstanceOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
607 var meta financialservicespb.OperationMetadata
608 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
609 return nil, nil
610 } else if err != nil {
611 return nil, err
612 }
613 return &meta, nil
614 }
615
616 // Done reports whether the long-running operation has completed.
617 func (op *DeleteInstanceOperation) Done() bool {
618 return op.lro.Done()
619 }
620
621 // Name returns the name of the long-running operation.
622 // The name is assigned by the server and is unique within the service from which the operation is created.
623 func (op *DeleteInstanceOperation) Name() string {
624 return op.lro.Name()
625 }
626
627 // DeleteModelOperation manages a long-running operation from DeleteModel.
628 type DeleteModelOperation struct {
629 lro *longrunning.Operation
630 pollPath string
631 }
632
633 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
634 //
635 // See documentation of Poll for error-handling information.
636 func (op *DeleteModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
637 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
638 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
639 }
640
641 // Poll fetches the latest state of the long-running operation.
642 //
643 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
644 //
645 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
646 // the operation has completed with failure, the error is returned and op.Done will return true.
647 // If Poll succeeds and the operation has completed successfully,
648 // op.Done will return true, and the response of the operation is returned.
649 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
650 func (op *DeleteModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
651 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
652 return op.lro.Poll(ctx, nil, opts...)
653 }
654
655 // Metadata returns metadata associated with the long-running operation.
656 // Metadata itself does not contact the server, but Poll does.
657 // To get the latest metadata, call this method after a successful call to Poll.
658 // If the metadata is not available, the returned metadata and error are both nil.
659 func (op *DeleteModelOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
660 var meta financialservicespb.OperationMetadata
661 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
662 return nil, nil
663 } else if err != nil {
664 return nil, err
665 }
666 return &meta, nil
667 }
668
669 // Done reports whether the long-running operation has completed.
670 func (op *DeleteModelOperation) Done() bool {
671 return op.lro.Done()
672 }
673
674 // Name returns the name of the long-running operation.
675 // The name is assigned by the server and is unique within the service from which the operation is created.
676 func (op *DeleteModelOperation) Name() string {
677 return op.lro.Name()
678 }
679
680 // DeletePredictionResultOperation manages a long-running operation from DeletePredictionResult.
681 type DeletePredictionResultOperation struct {
682 lro *longrunning.Operation
683 pollPath string
684 }
685
686 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
687 //
688 // See documentation of Poll for error-handling information.
689 func (op *DeletePredictionResultOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
690 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
691 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
692 }
693
694 // Poll fetches the latest state of the long-running operation.
695 //
696 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
697 //
698 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
699 // the operation has completed with failure, the error is returned and op.Done will return true.
700 // If Poll succeeds and the operation has completed successfully,
701 // op.Done will return true, and the response of the operation is returned.
702 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
703 func (op *DeletePredictionResultOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
704 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
705 return op.lro.Poll(ctx, nil, opts...)
706 }
707
708 // Metadata returns metadata associated with the long-running operation.
709 // Metadata itself does not contact the server, but Poll does.
710 // To get the latest metadata, call this method after a successful call to Poll.
711 // If the metadata is not available, the returned metadata and error are both nil.
712 func (op *DeletePredictionResultOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
713 var meta financialservicespb.OperationMetadata
714 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
715 return nil, nil
716 } else if err != nil {
717 return nil, err
718 }
719 return &meta, nil
720 }
721
722 // Done reports whether the long-running operation has completed.
723 func (op *DeletePredictionResultOperation) Done() bool {
724 return op.lro.Done()
725 }
726
727 // Name returns the name of the long-running operation.
728 // The name is assigned by the server and is unique within the service from which the operation is created.
729 func (op *DeletePredictionResultOperation) Name() string {
730 return op.lro.Name()
731 }
732
733 // ExportBacktestResultMetadataOperation manages a long-running operation from ExportBacktestResultMetadata.
734 type ExportBacktestResultMetadataOperation struct {
735 lro *longrunning.Operation
736 pollPath string
737 }
738
739 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
740 //
741 // See documentation of Poll for error-handling information.
742 func (op *ExportBacktestResultMetadataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportBacktestResultMetadataResponse, error) {
743 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
744 var resp financialservicespb.ExportBacktestResultMetadataResponse
745 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
746 return nil, err
747 }
748 return &resp, nil
749 }
750
751 // Poll fetches the latest state of the long-running operation.
752 //
753 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
754 //
755 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
756 // the operation has completed with failure, the error is returned and op.Done will return true.
757 // If Poll succeeds and the operation has completed successfully,
758 // op.Done will return true, and the response of the operation is returned.
759 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
760 func (op *ExportBacktestResultMetadataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportBacktestResultMetadataResponse, error) {
761 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
762 var resp financialservicespb.ExportBacktestResultMetadataResponse
763 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
764 return nil, err
765 }
766 if !op.Done() {
767 return nil, nil
768 }
769 return &resp, nil
770 }
771
772 // Metadata returns metadata associated with the long-running operation.
773 // Metadata itself does not contact the server, but Poll does.
774 // To get the latest metadata, call this method after a successful call to Poll.
775 // If the metadata is not available, the returned metadata and error are both nil.
776 func (op *ExportBacktestResultMetadataOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
777 var meta financialservicespb.OperationMetadata
778 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
779 return nil, nil
780 } else if err != nil {
781 return nil, err
782 }
783 return &meta, nil
784 }
785
786 // Done reports whether the long-running operation has completed.
787 func (op *ExportBacktestResultMetadataOperation) Done() bool {
788 return op.lro.Done()
789 }
790
791 // Name returns the name of the long-running operation.
792 // The name is assigned by the server and is unique within the service from which the operation is created.
793 func (op *ExportBacktestResultMetadataOperation) Name() string {
794 return op.lro.Name()
795 }
796
797 // ExportEngineConfigMetadataOperation manages a long-running operation from ExportEngineConfigMetadata.
798 type ExportEngineConfigMetadataOperation struct {
799 lro *longrunning.Operation
800 pollPath string
801 }
802
803 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
804 //
805 // See documentation of Poll for error-handling information.
806 func (op *ExportEngineConfigMetadataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportEngineConfigMetadataResponse, error) {
807 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
808 var resp financialservicespb.ExportEngineConfigMetadataResponse
809 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
810 return nil, err
811 }
812 return &resp, nil
813 }
814
815 // Poll fetches the latest state of the long-running operation.
816 //
817 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
818 //
819 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
820 // the operation has completed with failure, the error is returned and op.Done will return true.
821 // If Poll succeeds and the operation has completed successfully,
822 // op.Done will return true, and the response of the operation is returned.
823 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
824 func (op *ExportEngineConfigMetadataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportEngineConfigMetadataResponse, error) {
825 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
826 var resp financialservicespb.ExportEngineConfigMetadataResponse
827 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
828 return nil, err
829 }
830 if !op.Done() {
831 return nil, nil
832 }
833 return &resp, nil
834 }
835
836 // Metadata returns metadata associated with the long-running operation.
837 // Metadata itself does not contact the server, but Poll does.
838 // To get the latest metadata, call this method after a successful call to Poll.
839 // If the metadata is not available, the returned metadata and error are both nil.
840 func (op *ExportEngineConfigMetadataOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
841 var meta financialservicespb.OperationMetadata
842 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
843 return nil, nil
844 } else if err != nil {
845 return nil, err
846 }
847 return &meta, nil
848 }
849
850 // Done reports whether the long-running operation has completed.
851 func (op *ExportEngineConfigMetadataOperation) Done() bool {
852 return op.lro.Done()
853 }
854
855 // Name returns the name of the long-running operation.
856 // The name is assigned by the server and is unique within the service from which the operation is created.
857 func (op *ExportEngineConfigMetadataOperation) Name() string {
858 return op.lro.Name()
859 }
860
861 // ExportModelMetadataOperation manages a long-running operation from ExportModelMetadata.
862 type ExportModelMetadataOperation struct {
863 lro *longrunning.Operation
864 pollPath string
865 }
866
867 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
868 //
869 // See documentation of Poll for error-handling information.
870 func (op *ExportModelMetadataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportModelMetadataResponse, error) {
871 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
872 var resp financialservicespb.ExportModelMetadataResponse
873 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
874 return nil, err
875 }
876 return &resp, nil
877 }
878
879 // Poll fetches the latest state of the long-running operation.
880 //
881 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
882 //
883 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
884 // the operation has completed with failure, the error is returned and op.Done will return true.
885 // If Poll succeeds and the operation has completed successfully,
886 // op.Done will return true, and the response of the operation is returned.
887 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
888 func (op *ExportModelMetadataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportModelMetadataResponse, error) {
889 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
890 var resp financialservicespb.ExportModelMetadataResponse
891 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
892 return nil, err
893 }
894 if !op.Done() {
895 return nil, nil
896 }
897 return &resp, nil
898 }
899
900 // Metadata returns metadata associated with the long-running operation.
901 // Metadata itself does not contact the server, but Poll does.
902 // To get the latest metadata, call this method after a successful call to Poll.
903 // If the metadata is not available, the returned metadata and error are both nil.
904 func (op *ExportModelMetadataOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
905 var meta financialservicespb.OperationMetadata
906 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
907 return nil, nil
908 } else if err != nil {
909 return nil, err
910 }
911 return &meta, nil
912 }
913
914 // Done reports whether the long-running operation has completed.
915 func (op *ExportModelMetadataOperation) Done() bool {
916 return op.lro.Done()
917 }
918
919 // Name returns the name of the long-running operation.
920 // The name is assigned by the server and is unique within the service from which the operation is created.
921 func (op *ExportModelMetadataOperation) Name() string {
922 return op.lro.Name()
923 }
924
925 // ExportPredictionResultMetadataOperation manages a long-running operation from ExportPredictionResultMetadata.
926 type ExportPredictionResultMetadataOperation struct {
927 lro *longrunning.Operation
928 pollPath string
929 }
930
931 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
932 //
933 // See documentation of Poll for error-handling information.
934 func (op *ExportPredictionResultMetadataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportPredictionResultMetadataResponse, error) {
935 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
936 var resp financialservicespb.ExportPredictionResultMetadataResponse
937 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
938 return nil, err
939 }
940 return &resp, nil
941 }
942
943 // Poll fetches the latest state of the long-running operation.
944 //
945 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
946 //
947 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
948 // the operation has completed with failure, the error is returned and op.Done will return true.
949 // If Poll succeeds and the operation has completed successfully,
950 // op.Done will return true, and the response of the operation is returned.
951 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
952 func (op *ExportPredictionResultMetadataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportPredictionResultMetadataResponse, error) {
953 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
954 var resp financialservicespb.ExportPredictionResultMetadataResponse
955 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
956 return nil, err
957 }
958 if !op.Done() {
959 return nil, nil
960 }
961 return &resp, nil
962 }
963
964 // Metadata returns metadata associated with the long-running operation.
965 // Metadata itself does not contact the server, but Poll does.
966 // To get the latest metadata, call this method after a successful call to Poll.
967 // If the metadata is not available, the returned metadata and error are both nil.
968 func (op *ExportPredictionResultMetadataOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
969 var meta financialservicespb.OperationMetadata
970 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
971 return nil, nil
972 } else if err != nil {
973 return nil, err
974 }
975 return &meta, nil
976 }
977
978 // Done reports whether the long-running operation has completed.
979 func (op *ExportPredictionResultMetadataOperation) Done() bool {
980 return op.lro.Done()
981 }
982
983 // Name returns the name of the long-running operation.
984 // The name is assigned by the server and is unique within the service from which the operation is created.
985 func (op *ExportPredictionResultMetadataOperation) Name() string {
986 return op.lro.Name()
987 }
988
989 // ExportRegisteredPartiesOperation manages a long-running operation from ExportRegisteredParties.
990 type ExportRegisteredPartiesOperation struct {
991 lro *longrunning.Operation
992 pollPath string
993 }
994
995 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
996 //
997 // See documentation of Poll for error-handling information.
998 func (op *ExportRegisteredPartiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportRegisteredPartiesResponse, error) {
999 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1000 var resp financialservicespb.ExportRegisteredPartiesResponse
1001 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1002 return nil, err
1003 }
1004 return &resp, nil
1005 }
1006
1007 // Poll fetches the latest state of the long-running operation.
1008 //
1009 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1010 //
1011 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1012 // the operation has completed with failure, the error is returned and op.Done will return true.
1013 // If Poll succeeds and the operation has completed successfully,
1014 // op.Done will return true, and the response of the operation is returned.
1015 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1016 func (op *ExportRegisteredPartiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ExportRegisteredPartiesResponse, error) {
1017 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1018 var resp financialservicespb.ExportRegisteredPartiesResponse
1019 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1020 return nil, err
1021 }
1022 if !op.Done() {
1023 return nil, nil
1024 }
1025 return &resp, nil
1026 }
1027
1028 // Metadata returns metadata associated with the long-running operation.
1029 // Metadata itself does not contact the server, but Poll does.
1030 // To get the latest metadata, call this method after a successful call to Poll.
1031 // If the metadata is not available, the returned metadata and error are both nil.
1032 func (op *ExportRegisteredPartiesOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1033 var meta financialservicespb.OperationMetadata
1034 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1035 return nil, nil
1036 } else if err != nil {
1037 return nil, err
1038 }
1039 return &meta, nil
1040 }
1041
1042 // Done reports whether the long-running operation has completed.
1043 func (op *ExportRegisteredPartiesOperation) Done() bool {
1044 return op.lro.Done()
1045 }
1046
1047 // Name returns the name of the long-running operation.
1048 // The name is assigned by the server and is unique within the service from which the operation is created.
1049 func (op *ExportRegisteredPartiesOperation) Name() string {
1050 return op.lro.Name()
1051 }
1052
1053 // ImportRegisteredPartiesOperation manages a long-running operation from ImportRegisteredParties.
1054 type ImportRegisteredPartiesOperation struct {
1055 lro *longrunning.Operation
1056 pollPath string
1057 }
1058
1059 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1060 //
1061 // See documentation of Poll for error-handling information.
1062 func (op *ImportRegisteredPartiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ImportRegisteredPartiesResponse, error) {
1063 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1064 var resp financialservicespb.ImportRegisteredPartiesResponse
1065 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1066 return nil, err
1067 }
1068 return &resp, nil
1069 }
1070
1071 // Poll fetches the latest state of the long-running operation.
1072 //
1073 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1074 //
1075 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1076 // the operation has completed with failure, the error is returned and op.Done will return true.
1077 // If Poll succeeds and the operation has completed successfully,
1078 // op.Done will return true, and the response of the operation is returned.
1079 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1080 func (op *ImportRegisteredPartiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.ImportRegisteredPartiesResponse, error) {
1081 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1082 var resp financialservicespb.ImportRegisteredPartiesResponse
1083 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1084 return nil, err
1085 }
1086 if !op.Done() {
1087 return nil, nil
1088 }
1089 return &resp, nil
1090 }
1091
1092 // Metadata returns metadata associated with the long-running operation.
1093 // Metadata itself does not contact the server, but Poll does.
1094 // To get the latest metadata, call this method after a successful call to Poll.
1095 // If the metadata is not available, the returned metadata and error are both nil.
1096 func (op *ImportRegisteredPartiesOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1097 var meta financialservicespb.OperationMetadata
1098 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1099 return nil, nil
1100 } else if err != nil {
1101 return nil, err
1102 }
1103 return &meta, nil
1104 }
1105
1106 // Done reports whether the long-running operation has completed.
1107 func (op *ImportRegisteredPartiesOperation) Done() bool {
1108 return op.lro.Done()
1109 }
1110
1111 // Name returns the name of the long-running operation.
1112 // The name is assigned by the server and is unique within the service from which the operation is created.
1113 func (op *ImportRegisteredPartiesOperation) Name() string {
1114 return op.lro.Name()
1115 }
1116
1117 // UpdateBacktestResultOperation manages a long-running operation from UpdateBacktestResult.
1118 type UpdateBacktestResultOperation struct {
1119 lro *longrunning.Operation
1120 pollPath string
1121 }
1122
1123 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1124 //
1125 // See documentation of Poll for error-handling information.
1126 func (op *UpdateBacktestResultOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.BacktestResult, error) {
1127 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1128 var resp financialservicespb.BacktestResult
1129 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1130 return nil, err
1131 }
1132 return &resp, nil
1133 }
1134
1135 // Poll fetches the latest state of the long-running operation.
1136 //
1137 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1138 //
1139 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1140 // the operation has completed with failure, the error is returned and op.Done will return true.
1141 // If Poll succeeds and the operation has completed successfully,
1142 // op.Done will return true, and the response of the operation is returned.
1143 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1144 func (op *UpdateBacktestResultOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.BacktestResult, error) {
1145 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1146 var resp financialservicespb.BacktestResult
1147 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1148 return nil, err
1149 }
1150 if !op.Done() {
1151 return nil, nil
1152 }
1153 return &resp, nil
1154 }
1155
1156 // Metadata returns metadata associated with the long-running operation.
1157 // Metadata itself does not contact the server, but Poll does.
1158 // To get the latest metadata, call this method after a successful call to Poll.
1159 // If the metadata is not available, the returned metadata and error are both nil.
1160 func (op *UpdateBacktestResultOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1161 var meta financialservicespb.OperationMetadata
1162 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1163 return nil, nil
1164 } else if err != nil {
1165 return nil, err
1166 }
1167 return &meta, nil
1168 }
1169
1170 // Done reports whether the long-running operation has completed.
1171 func (op *UpdateBacktestResultOperation) Done() bool {
1172 return op.lro.Done()
1173 }
1174
1175 // Name returns the name of the long-running operation.
1176 // The name is assigned by the server and is unique within the service from which the operation is created.
1177 func (op *UpdateBacktestResultOperation) Name() string {
1178 return op.lro.Name()
1179 }
1180
1181 // UpdateDatasetOperation manages a long-running operation from UpdateDataset.
1182 type UpdateDatasetOperation struct {
1183 lro *longrunning.Operation
1184 pollPath string
1185 }
1186
1187 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1188 //
1189 // See documentation of Poll for error-handling information.
1190 func (op *UpdateDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Dataset, error) {
1191 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1192 var resp financialservicespb.Dataset
1193 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1194 return nil, err
1195 }
1196 return &resp, nil
1197 }
1198
1199 // Poll fetches the latest state of the long-running operation.
1200 //
1201 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1202 //
1203 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1204 // the operation has completed with failure, the error is returned and op.Done will return true.
1205 // If Poll succeeds and the operation has completed successfully,
1206 // op.Done will return true, and the response of the operation is returned.
1207 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1208 func (op *UpdateDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Dataset, error) {
1209 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1210 var resp financialservicespb.Dataset
1211 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1212 return nil, err
1213 }
1214 if !op.Done() {
1215 return nil, nil
1216 }
1217 return &resp, nil
1218 }
1219
1220 // Metadata returns metadata associated with the long-running operation.
1221 // Metadata itself does not contact the server, but Poll does.
1222 // To get the latest metadata, call this method after a successful call to Poll.
1223 // If the metadata is not available, the returned metadata and error are both nil.
1224 func (op *UpdateDatasetOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1225 var meta financialservicespb.OperationMetadata
1226 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1227 return nil, nil
1228 } else if err != nil {
1229 return nil, err
1230 }
1231 return &meta, nil
1232 }
1233
1234 // Done reports whether the long-running operation has completed.
1235 func (op *UpdateDatasetOperation) Done() bool {
1236 return op.lro.Done()
1237 }
1238
1239 // Name returns the name of the long-running operation.
1240 // The name is assigned by the server and is unique within the service from which the operation is created.
1241 func (op *UpdateDatasetOperation) Name() string {
1242 return op.lro.Name()
1243 }
1244
1245 // UpdateEngineConfigOperation manages a long-running operation from UpdateEngineConfig.
1246 type UpdateEngineConfigOperation struct {
1247 lro *longrunning.Operation
1248 pollPath string
1249 }
1250
1251 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1252 //
1253 // See documentation of Poll for error-handling information.
1254 func (op *UpdateEngineConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.EngineConfig, error) {
1255 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1256 var resp financialservicespb.EngineConfig
1257 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1258 return nil, err
1259 }
1260 return &resp, nil
1261 }
1262
1263 // Poll fetches the latest state of the long-running operation.
1264 //
1265 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1266 //
1267 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1268 // the operation has completed with failure, the error is returned and op.Done will return true.
1269 // If Poll succeeds and the operation has completed successfully,
1270 // op.Done will return true, and the response of the operation is returned.
1271 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1272 func (op *UpdateEngineConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.EngineConfig, error) {
1273 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1274 var resp financialservicespb.EngineConfig
1275 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1276 return nil, err
1277 }
1278 if !op.Done() {
1279 return nil, nil
1280 }
1281 return &resp, nil
1282 }
1283
1284 // Metadata returns metadata associated with the long-running operation.
1285 // Metadata itself does not contact the server, but Poll does.
1286 // To get the latest metadata, call this method after a successful call to Poll.
1287 // If the metadata is not available, the returned metadata and error are both nil.
1288 func (op *UpdateEngineConfigOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1289 var meta financialservicespb.OperationMetadata
1290 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1291 return nil, nil
1292 } else if err != nil {
1293 return nil, err
1294 }
1295 return &meta, nil
1296 }
1297
1298 // Done reports whether the long-running operation has completed.
1299 func (op *UpdateEngineConfigOperation) Done() bool {
1300 return op.lro.Done()
1301 }
1302
1303 // Name returns the name of the long-running operation.
1304 // The name is assigned by the server and is unique within the service from which the operation is created.
1305 func (op *UpdateEngineConfigOperation) Name() string {
1306 return op.lro.Name()
1307 }
1308
1309 // UpdateInstanceOperation manages a long-running operation from UpdateInstance.
1310 type UpdateInstanceOperation struct {
1311 lro *longrunning.Operation
1312 pollPath string
1313 }
1314
1315 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1316 //
1317 // See documentation of Poll for error-handling information.
1318 func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Instance, error) {
1319 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1320 var resp financialservicespb.Instance
1321 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1322 return nil, err
1323 }
1324 return &resp, nil
1325 }
1326
1327 // Poll fetches the latest state of the long-running operation.
1328 //
1329 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1330 //
1331 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1332 // the operation has completed with failure, the error is returned and op.Done will return true.
1333 // If Poll succeeds and the operation has completed successfully,
1334 // op.Done will return true, and the response of the operation is returned.
1335 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1336 func (op *UpdateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Instance, error) {
1337 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1338 var resp financialservicespb.Instance
1339 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1340 return nil, err
1341 }
1342 if !op.Done() {
1343 return nil, nil
1344 }
1345 return &resp, nil
1346 }
1347
1348 // Metadata returns metadata associated with the long-running operation.
1349 // Metadata itself does not contact the server, but Poll does.
1350 // To get the latest metadata, call this method after a successful call to Poll.
1351 // If the metadata is not available, the returned metadata and error are both nil.
1352 func (op *UpdateInstanceOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1353 var meta financialservicespb.OperationMetadata
1354 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1355 return nil, nil
1356 } else if err != nil {
1357 return nil, err
1358 }
1359 return &meta, nil
1360 }
1361
1362 // Done reports whether the long-running operation has completed.
1363 func (op *UpdateInstanceOperation) Done() bool {
1364 return op.lro.Done()
1365 }
1366
1367 // Name returns the name of the long-running operation.
1368 // The name is assigned by the server and is unique within the service from which the operation is created.
1369 func (op *UpdateInstanceOperation) Name() string {
1370 return op.lro.Name()
1371 }
1372
1373 // UpdateModelOperation manages a long-running operation from UpdateModel.
1374 type UpdateModelOperation struct {
1375 lro *longrunning.Operation
1376 pollPath string
1377 }
1378
1379 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1380 //
1381 // See documentation of Poll for error-handling information.
1382 func (op *UpdateModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Model, error) {
1383 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1384 var resp financialservicespb.Model
1385 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1386 return nil, err
1387 }
1388 return &resp, nil
1389 }
1390
1391 // Poll fetches the latest state of the long-running operation.
1392 //
1393 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1394 //
1395 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1396 // the operation has completed with failure, the error is returned and op.Done will return true.
1397 // If Poll succeeds and the operation has completed successfully,
1398 // op.Done will return true, and the response of the operation is returned.
1399 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1400 func (op *UpdateModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.Model, error) {
1401 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1402 var resp financialservicespb.Model
1403 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1404 return nil, err
1405 }
1406 if !op.Done() {
1407 return nil, nil
1408 }
1409 return &resp, nil
1410 }
1411
1412 // Metadata returns metadata associated with the long-running operation.
1413 // Metadata itself does not contact the server, but Poll does.
1414 // To get the latest metadata, call this method after a successful call to Poll.
1415 // If the metadata is not available, the returned metadata and error are both nil.
1416 func (op *UpdateModelOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1417 var meta financialservicespb.OperationMetadata
1418 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1419 return nil, nil
1420 } else if err != nil {
1421 return nil, err
1422 }
1423 return &meta, nil
1424 }
1425
1426 // Done reports whether the long-running operation has completed.
1427 func (op *UpdateModelOperation) Done() bool {
1428 return op.lro.Done()
1429 }
1430
1431 // Name returns the name of the long-running operation.
1432 // The name is assigned by the server and is unique within the service from which the operation is created.
1433 func (op *UpdateModelOperation) Name() string {
1434 return op.lro.Name()
1435 }
1436
1437 // UpdatePredictionResultOperation manages a long-running operation from UpdatePredictionResult.
1438 type UpdatePredictionResultOperation struct {
1439 lro *longrunning.Operation
1440 pollPath string
1441 }
1442
1443 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1444 //
1445 // See documentation of Poll for error-handling information.
1446 func (op *UpdatePredictionResultOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.PredictionResult, error) {
1447 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1448 var resp financialservicespb.PredictionResult
1449 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1450 return nil, err
1451 }
1452 return &resp, nil
1453 }
1454
1455 // Poll fetches the latest state of the long-running operation.
1456 //
1457 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1458 //
1459 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1460 // the operation has completed with failure, the error is returned and op.Done will return true.
1461 // If Poll succeeds and the operation has completed successfully,
1462 // op.Done will return true, and the response of the operation is returned.
1463 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1464 func (op *UpdatePredictionResultOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*financialservicespb.PredictionResult, error) {
1465 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1466 var resp financialservicespb.PredictionResult
1467 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1468 return nil, err
1469 }
1470 if !op.Done() {
1471 return nil, nil
1472 }
1473 return &resp, nil
1474 }
1475
1476 // Metadata returns metadata associated with the long-running operation.
1477 // Metadata itself does not contact the server, but Poll does.
1478 // To get the latest metadata, call this method after a successful call to Poll.
1479 // If the metadata is not available, the returned metadata and error are both nil.
1480 func (op *UpdatePredictionResultOperation) Metadata() (*financialservicespb.OperationMetadata, error) {
1481 var meta financialservicespb.OperationMetadata
1482 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1483 return nil, nil
1484 } else if err != nil {
1485 return nil, err
1486 }
1487 return &meta, nil
1488 }
1489
1490 // Done reports whether the long-running operation has completed.
1491 func (op *UpdatePredictionResultOperation) Done() bool {
1492 return op.lro.Done()
1493 }
1494
1495 // Name returns the name of the long-running operation.
1496 // The name is assigned by the server and is unique within the service from which the operation is created.
1497 func (op *UpdatePredictionResultOperation) Name() string {
1498 return op.lro.Name()
1499 }
1500
1501 // BacktestResultIterator manages a stream of *financialservicespb.BacktestResult.
1502 type BacktestResultIterator struct {
1503 items []*financialservicespb.BacktestResult
1504 pageInfo *iterator.PageInfo
1505 nextFunc func() error
1506
1507 // Response is the raw response for the current page.
1508 // It must be cast to the RPC response type.
1509 // Calling Next() or InternalFetch() updates this value.
1510 Response interface{}
1511
1512 // InternalFetch is for use by the Google Cloud Libraries only.
1513 // It is not part of the stable interface of this package.
1514 //
1515 // InternalFetch returns results from a single call to the underlying RPC.
1516 // The number of results is no greater than pageSize.
1517 // If there are no more results, nextPageToken is empty and err is nil.
1518 InternalFetch func(pageSize int, pageToken string) (results []*financialservicespb.BacktestResult, nextPageToken string, err error)
1519 }
1520
1521 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1522 func (it *BacktestResultIterator) PageInfo() *iterator.PageInfo {
1523 return it.pageInfo
1524 }
1525
1526 // Next returns the next result. Its second return value is iterator.Done if there are no more
1527 // results. Once Next returns Done, all subsequent calls will return Done.
1528 func (it *BacktestResultIterator) Next() (*financialservicespb.BacktestResult, error) {
1529 var item *financialservicespb.BacktestResult
1530 if err := it.nextFunc(); err != nil {
1531 return item, err
1532 }
1533 item = it.items[0]
1534 it.items = it.items[1:]
1535 return item, nil
1536 }
1537
1538 func (it *BacktestResultIterator) bufLen() int {
1539 return len(it.items)
1540 }
1541
1542 func (it *BacktestResultIterator) takeBuf() interface{} {
1543 b := it.items
1544 it.items = nil
1545 return b
1546 }
1547
1548 // DatasetIterator manages a stream of *financialservicespb.Dataset.
1549 type DatasetIterator struct {
1550 items []*financialservicespb.Dataset
1551 pageInfo *iterator.PageInfo
1552 nextFunc func() error
1553
1554 // Response is the raw response for the current page.
1555 // It must be cast to the RPC response type.
1556 // Calling Next() or InternalFetch() updates this value.
1557 Response interface{}
1558
1559 // InternalFetch is for use by the Google Cloud Libraries only.
1560 // It is not part of the stable interface of this package.
1561 //
1562 // InternalFetch returns results from a single call to the underlying RPC.
1563 // The number of results is no greater than pageSize.
1564 // If there are no more results, nextPageToken is empty and err is nil.
1565 InternalFetch func(pageSize int, pageToken string) (results []*financialservicespb.Dataset, nextPageToken string, err error)
1566 }
1567
1568 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1569 func (it *DatasetIterator) PageInfo() *iterator.PageInfo {
1570 return it.pageInfo
1571 }
1572
1573 // Next returns the next result. Its second return value is iterator.Done if there are no more
1574 // results. Once Next returns Done, all subsequent calls will return Done.
1575 func (it *DatasetIterator) Next() (*financialservicespb.Dataset, error) {
1576 var item *financialservicespb.Dataset
1577 if err := it.nextFunc(); err != nil {
1578 return item, err
1579 }
1580 item = it.items[0]
1581 it.items = it.items[1:]
1582 return item, nil
1583 }
1584
1585 func (it *DatasetIterator) bufLen() int {
1586 return len(it.items)
1587 }
1588
1589 func (it *DatasetIterator) takeBuf() interface{} {
1590 b := it.items
1591 it.items = nil
1592 return b
1593 }
1594
1595 // EngineConfigIterator manages a stream of *financialservicespb.EngineConfig.
1596 type EngineConfigIterator struct {
1597 items []*financialservicespb.EngineConfig
1598 pageInfo *iterator.PageInfo
1599 nextFunc func() error
1600
1601 // Response is the raw response for the current page.
1602 // It must be cast to the RPC response type.
1603 // Calling Next() or InternalFetch() updates this value.
1604 Response interface{}
1605
1606 // InternalFetch is for use by the Google Cloud Libraries only.
1607 // It is not part of the stable interface of this package.
1608 //
1609 // InternalFetch returns results from a single call to the underlying RPC.
1610 // The number of results is no greater than pageSize.
1611 // If there are no more results, nextPageToken is empty and err is nil.
1612 InternalFetch func(pageSize int, pageToken string) (results []*financialservicespb.EngineConfig, nextPageToken string, err error)
1613 }
1614
1615 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1616 func (it *EngineConfigIterator) PageInfo() *iterator.PageInfo {
1617 return it.pageInfo
1618 }
1619
1620 // Next returns the next result. Its second return value is iterator.Done if there are no more
1621 // results. Once Next returns Done, all subsequent calls will return Done.
1622 func (it *EngineConfigIterator) Next() (*financialservicespb.EngineConfig, error) {
1623 var item *financialservicespb.EngineConfig
1624 if err := it.nextFunc(); err != nil {
1625 return item, err
1626 }
1627 item = it.items[0]
1628 it.items = it.items[1:]
1629 return item, nil
1630 }
1631
1632 func (it *EngineConfigIterator) bufLen() int {
1633 return len(it.items)
1634 }
1635
1636 func (it *EngineConfigIterator) takeBuf() interface{} {
1637 b := it.items
1638 it.items = nil
1639 return b
1640 }
1641
1642 // EngineVersionIterator manages a stream of *financialservicespb.EngineVersion.
1643 type EngineVersionIterator struct {
1644 items []*financialservicespb.EngineVersion
1645 pageInfo *iterator.PageInfo
1646 nextFunc func() error
1647
1648 // Response is the raw response for the current page.
1649 // It must be cast to the RPC response type.
1650 // Calling Next() or InternalFetch() updates this value.
1651 Response interface{}
1652
1653 // InternalFetch is for use by the Google Cloud Libraries only.
1654 // It is not part of the stable interface of this package.
1655 //
1656 // InternalFetch returns results from a single call to the underlying RPC.
1657 // The number of results is no greater than pageSize.
1658 // If there are no more results, nextPageToken is empty and err is nil.
1659 InternalFetch func(pageSize int, pageToken string) (results []*financialservicespb.EngineVersion, nextPageToken string, err error)
1660 }
1661
1662 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1663 func (it *EngineVersionIterator) PageInfo() *iterator.PageInfo {
1664 return it.pageInfo
1665 }
1666
1667 // Next returns the next result. Its second return value is iterator.Done if there are no more
1668 // results. Once Next returns Done, all subsequent calls will return Done.
1669 func (it *EngineVersionIterator) Next() (*financialservicespb.EngineVersion, error) {
1670 var item *financialservicespb.EngineVersion
1671 if err := it.nextFunc(); err != nil {
1672 return item, err
1673 }
1674 item = it.items[0]
1675 it.items = it.items[1:]
1676 return item, nil
1677 }
1678
1679 func (it *EngineVersionIterator) bufLen() int {
1680 return len(it.items)
1681 }
1682
1683 func (it *EngineVersionIterator) takeBuf() interface{} {
1684 b := it.items
1685 it.items = nil
1686 return b
1687 }
1688
1689 // InstanceIterator manages a stream of *financialservicespb.Instance.
1690 type InstanceIterator struct {
1691 items []*financialservicespb.Instance
1692 pageInfo *iterator.PageInfo
1693 nextFunc func() error
1694
1695 // Response is the raw response for the current page.
1696 // It must be cast to the RPC response type.
1697 // Calling Next() or InternalFetch() updates this value.
1698 Response interface{}
1699
1700 // InternalFetch is for use by the Google Cloud Libraries only.
1701 // It is not part of the stable interface of this package.
1702 //
1703 // InternalFetch returns results from a single call to the underlying RPC.
1704 // The number of results is no greater than pageSize.
1705 // If there are no more results, nextPageToken is empty and err is nil.
1706 InternalFetch func(pageSize int, pageToken string) (results []*financialservicespb.Instance, nextPageToken string, err error)
1707 }
1708
1709 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1710 func (it *InstanceIterator) PageInfo() *iterator.PageInfo {
1711 return it.pageInfo
1712 }
1713
1714 // Next returns the next result. Its second return value is iterator.Done if there are no more
1715 // results. Once Next returns Done, all subsequent calls will return Done.
1716 func (it *InstanceIterator) Next() (*financialservicespb.Instance, error) {
1717 var item *financialservicespb.Instance
1718 if err := it.nextFunc(); err != nil {
1719 return item, err
1720 }
1721 item = it.items[0]
1722 it.items = it.items[1:]
1723 return item, nil
1724 }
1725
1726 func (it *InstanceIterator) bufLen() int {
1727 return len(it.items)
1728 }
1729
1730 func (it *InstanceIterator) takeBuf() interface{} {
1731 b := it.items
1732 it.items = nil
1733 return b
1734 }
1735
1736 // LocationIterator manages a stream of *locationpb.Location.
1737 type LocationIterator struct {
1738 items []*locationpb.Location
1739 pageInfo *iterator.PageInfo
1740 nextFunc func() error
1741
1742 // Response is the raw response for the current page.
1743 // It must be cast to the RPC response type.
1744 // Calling Next() or InternalFetch() updates this value.
1745 Response interface{}
1746
1747 // InternalFetch is for use by the Google Cloud Libraries only.
1748 // It is not part of the stable interface of this package.
1749 //
1750 // InternalFetch returns results from a single call to the underlying RPC.
1751 // The number of results is no greater than pageSize.
1752 // If there are no more results, nextPageToken is empty and err is nil.
1753 InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
1754 }
1755
1756 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1757 func (it *LocationIterator) PageInfo() *iterator.PageInfo {
1758 return it.pageInfo
1759 }
1760
1761 // Next returns the next result. Its second return value is iterator.Done if there are no more
1762 // results. Once Next returns Done, all subsequent calls will return Done.
1763 func (it *LocationIterator) Next() (*locationpb.Location, error) {
1764 var item *locationpb.Location
1765 if err := it.nextFunc(); err != nil {
1766 return item, err
1767 }
1768 item = it.items[0]
1769 it.items = it.items[1:]
1770 return item, nil
1771 }
1772
1773 func (it *LocationIterator) bufLen() int {
1774 return len(it.items)
1775 }
1776
1777 func (it *LocationIterator) takeBuf() interface{} {
1778 b := it.items
1779 it.items = nil
1780 return b
1781 }
1782
1783 // ModelIterator manages a stream of *financialservicespb.Model.
1784 type ModelIterator struct {
1785 items []*financialservicespb.Model
1786 pageInfo *iterator.PageInfo
1787 nextFunc func() error
1788
1789 // Response is the raw response for the current page.
1790 // It must be cast to the RPC response type.
1791 // Calling Next() or InternalFetch() updates this value.
1792 Response interface{}
1793
1794 // InternalFetch is for use by the Google Cloud Libraries only.
1795 // It is not part of the stable interface of this package.
1796 //
1797 // InternalFetch returns results from a single call to the underlying RPC.
1798 // The number of results is no greater than pageSize.
1799 // If there are no more results, nextPageToken is empty and err is nil.
1800 InternalFetch func(pageSize int, pageToken string) (results []*financialservicespb.Model, nextPageToken string, err error)
1801 }
1802
1803 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1804 func (it *ModelIterator) PageInfo() *iterator.PageInfo {
1805 return it.pageInfo
1806 }
1807
1808 // Next returns the next result. Its second return value is iterator.Done if there are no more
1809 // results. Once Next returns Done, all subsequent calls will return Done.
1810 func (it *ModelIterator) Next() (*financialservicespb.Model, error) {
1811 var item *financialservicespb.Model
1812 if err := it.nextFunc(); err != nil {
1813 return item, err
1814 }
1815 item = it.items[0]
1816 it.items = it.items[1:]
1817 return item, nil
1818 }
1819
1820 func (it *ModelIterator) bufLen() int {
1821 return len(it.items)
1822 }
1823
1824 func (it *ModelIterator) takeBuf() interface{} {
1825 b := it.items
1826 it.items = nil
1827 return b
1828 }
1829
1830 // OperationIterator manages a stream of *longrunningpb.Operation.
1831 type OperationIterator struct {
1832 items []*longrunningpb.Operation
1833 pageInfo *iterator.PageInfo
1834 nextFunc func() error
1835
1836 // Response is the raw response for the current page.
1837 // It must be cast to the RPC response type.
1838 // Calling Next() or InternalFetch() updates this value.
1839 Response interface{}
1840
1841 // InternalFetch is for use by the Google Cloud Libraries only.
1842 // It is not part of the stable interface of this package.
1843 //
1844 // InternalFetch returns results from a single call to the underlying RPC.
1845 // The number of results is no greater than pageSize.
1846 // If there are no more results, nextPageToken is empty and err is nil.
1847 InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
1848 }
1849
1850 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1851 func (it *OperationIterator) PageInfo() *iterator.PageInfo {
1852 return it.pageInfo
1853 }
1854
1855 // Next returns the next result. Its second return value is iterator.Done if there are no more
1856 // results. Once Next returns Done, all subsequent calls will return Done.
1857 func (it *OperationIterator) Next() (*longrunningpb.Operation, error) {
1858 var item *longrunningpb.Operation
1859 if err := it.nextFunc(); err != nil {
1860 return item, err
1861 }
1862 item = it.items[0]
1863 it.items = it.items[1:]
1864 return item, nil
1865 }
1866
1867 func (it *OperationIterator) bufLen() int {
1868 return len(it.items)
1869 }
1870
1871 func (it *OperationIterator) takeBuf() interface{} {
1872 b := it.items
1873 it.items = nil
1874 return b
1875 }
1876
1877 // PredictionResultIterator manages a stream of *financialservicespb.PredictionResult.
1878 type PredictionResultIterator struct {
1879 items []*financialservicespb.PredictionResult
1880 pageInfo *iterator.PageInfo
1881 nextFunc func() error
1882
1883 // Response is the raw response for the current page.
1884 // It must be cast to the RPC response type.
1885 // Calling Next() or InternalFetch() updates this value.
1886 Response interface{}
1887
1888 // InternalFetch is for use by the Google Cloud Libraries only.
1889 // It is not part of the stable interface of this package.
1890 //
1891 // InternalFetch returns results from a single call to the underlying RPC.
1892 // The number of results is no greater than pageSize.
1893 // If there are no more results, nextPageToken is empty and err is nil.
1894 InternalFetch func(pageSize int, pageToken string) (results []*financialservicespb.PredictionResult, nextPageToken string, err error)
1895 }
1896
1897 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1898 func (it *PredictionResultIterator) PageInfo() *iterator.PageInfo {
1899 return it.pageInfo
1900 }
1901
1902 // Next returns the next result. Its second return value is iterator.Done if there are no more
1903 // results. Once Next returns Done, all subsequent calls will return Done.
1904 func (it *PredictionResultIterator) Next() (*financialservicespb.PredictionResult, error) {
1905 var item *financialservicespb.PredictionResult
1906 if err := it.nextFunc(); err != nil {
1907 return item, err
1908 }
1909 item = it.items[0]
1910 it.items = it.items[1:]
1911 return item, nil
1912 }
1913
1914 func (it *PredictionResultIterator) bufLen() int {
1915 return len(it.items)
1916 }
1917
1918 func (it *PredictionResultIterator) takeBuf() interface{} {
1919 b := it.items
1920 it.items = nil
1921 return b
1922 }