Debian Codegraph @

networkservices/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 networkservices
18
19 import (
20 "context"
21 "time"
22
23 "cloud.google.com/go/longrunning"
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
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 // CreateAuthzExtensionOperation manages a long-running operation from CreateAuthzExtension.
32 type CreateAuthzExtensionOperation 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 *CreateAuthzExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) {
41 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
42 var resp networkservicespb.AuthzExtension
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 *CreateAuthzExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) {
59 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
60 var resp networkservicespb.AuthzExtension
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 *CreateAuthzExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
75 var meta networkservicespb.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 *CreateAuthzExtensionOperation) 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 *CreateAuthzExtensionOperation) Name() string {
92 return op.lro.Name()
93 }
94
95 // CreateEndpointPolicyOperation manages a long-running operation from CreateEndpointPolicy.
96 type CreateEndpointPolicyOperation 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 *CreateEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) {
105 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
106 var resp networkservicespb.EndpointPolicy
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 *CreateEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) {
123 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
124 var resp networkservicespb.EndpointPolicy
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 *CreateEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
139 var meta networkservicespb.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 *CreateEndpointPolicyOperation) 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 *CreateEndpointPolicyOperation) Name() string {
156 return op.lro.Name()
157 }
158
159 // CreateGatewayOperation manages a long-running operation from CreateGateway.
160 type CreateGatewayOperation 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 *CreateGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) {
169 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
170 var resp networkservicespb.Gateway
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 *CreateGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) {
187 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
188 var resp networkservicespb.Gateway
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 *CreateGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
203 var meta networkservicespb.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 *CreateGatewayOperation) 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 *CreateGatewayOperation) Name() string {
220 return op.lro.Name()
221 }
222
223 // CreateGrpcRouteOperation manages a long-running operation from CreateGrpcRoute.
224 type CreateGrpcRouteOperation 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 *CreateGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) {
233 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
234 var resp networkservicespb.GrpcRoute
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 *CreateGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) {
251 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
252 var resp networkservicespb.GrpcRoute
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 *CreateGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
267 var meta networkservicespb.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 *CreateGrpcRouteOperation) 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 *CreateGrpcRouteOperation) Name() string {
284 return op.lro.Name()
285 }
286
287 // CreateHttpRouteOperation manages a long-running operation from CreateHttpRoute.
288 type CreateHttpRouteOperation 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 *CreateHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) {
297 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
298 var resp networkservicespb.HttpRoute
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 *CreateHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) {
315 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
316 var resp networkservicespb.HttpRoute
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 *CreateHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
331 var meta networkservicespb.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 *CreateHttpRouteOperation) 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 *CreateHttpRouteOperation) Name() string {
348 return op.lro.Name()
349 }
350
351 // CreateLbRouteExtensionOperation manages a long-running operation from CreateLbRouteExtension.
352 type CreateLbRouteExtensionOperation 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 *CreateLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) {
361 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
362 var resp networkservicespb.LbRouteExtension
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 *CreateLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) {
379 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
380 var resp networkservicespb.LbRouteExtension
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 *CreateLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
395 var meta networkservicespb.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 *CreateLbRouteExtensionOperation) 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 *CreateLbRouteExtensionOperation) Name() string {
412 return op.lro.Name()
413 }
414
415 // CreateLbTrafficExtensionOperation manages a long-running operation from CreateLbTrafficExtension.
416 type CreateLbTrafficExtensionOperation 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 *CreateLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) {
425 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
426 var resp networkservicespb.LbTrafficExtension
427 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
428 return nil, err
429 }
430 return &resp, nil
431 }
432
433 // Poll fetches the latest state of the long-running operation.
434 //
435 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
436 //
437 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
438 // the operation has completed with failure, the error is returned and op.Done will return true.
439 // If Poll succeeds and the operation has completed successfully,
440 // op.Done will return true, and the response of the operation is returned.
441 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
442 func (op *CreateLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) {
443 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
444 var resp networkservicespb.LbTrafficExtension
445 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
446 return nil, err
447 }
448 if !op.Done() {
449 return nil, nil
450 }
451 return &resp, nil
452 }
453
454 // Metadata returns metadata associated with the long-running operation.
455 // Metadata itself does not contact the server, but Poll does.
456 // To get the latest metadata, call this method after a successful call to Poll.
457 // If the metadata is not available, the returned metadata and error are both nil.
458 func (op *CreateLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
459 var meta networkservicespb.OperationMetadata
460 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
461 return nil, nil
462 } else if err != nil {
463 return nil, err
464 }
465 return &meta, nil
466 }
467
468 // Done reports whether the long-running operation has completed.
469 func (op *CreateLbTrafficExtensionOperation) Done() bool {
470 return op.lro.Done()
471 }
472
473 // Name returns the name of the long-running operation.
474 // The name is assigned by the server and is unique within the service from which the operation is created.
475 func (op *CreateLbTrafficExtensionOperation) Name() string {
476 return op.lro.Name()
477 }
478
479 // CreateMeshOperation manages a long-running operation from CreateMesh.
480 type CreateMeshOperation struct {
481 lro *longrunning.Operation
482 pollPath string
483 }
484
485 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
486 //
487 // See documentation of Poll for error-handling information.
488 func (op *CreateMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) {
489 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
490 var resp networkservicespb.Mesh
491 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
492 return nil, err
493 }
494 return &resp, nil
495 }
496
497 // Poll fetches the latest state of the long-running operation.
498 //
499 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
500 //
501 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
502 // the operation has completed with failure, the error is returned and op.Done will return true.
503 // If Poll succeeds and the operation has completed successfully,
504 // op.Done will return true, and the response of the operation is returned.
505 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
506 func (op *CreateMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) {
507 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
508 var resp networkservicespb.Mesh
509 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
510 return nil, err
511 }
512 if !op.Done() {
513 return nil, nil
514 }
515 return &resp, nil
516 }
517
518 // Metadata returns metadata associated with the long-running operation.
519 // Metadata itself does not contact the server, but Poll does.
520 // To get the latest metadata, call this method after a successful call to Poll.
521 // If the metadata is not available, the returned metadata and error are both nil.
522 func (op *CreateMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
523 var meta networkservicespb.OperationMetadata
524 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
525 return nil, nil
526 } else if err != nil {
527 return nil, err
528 }
529 return &meta, nil
530 }
531
532 // Done reports whether the long-running operation has completed.
533 func (op *CreateMeshOperation) Done() bool {
534 return op.lro.Done()
535 }
536
537 // Name returns the name of the long-running operation.
538 // The name is assigned by the server and is unique within the service from which the operation is created.
539 func (op *CreateMeshOperation) Name() string {
540 return op.lro.Name()
541 }
542
543 // CreateServiceBindingOperation manages a long-running operation from CreateServiceBinding.
544 type CreateServiceBindingOperation struct {
545 lro *longrunning.Operation
546 pollPath string
547 }
548
549 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
550 //
551 // See documentation of Poll for error-handling information.
552 func (op *CreateServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) {
553 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
554 var resp networkservicespb.ServiceBinding
555 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
556 return nil, err
557 }
558 return &resp, nil
559 }
560
561 // Poll fetches the latest state of the long-running operation.
562 //
563 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
564 //
565 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
566 // the operation has completed with failure, the error is returned and op.Done will return true.
567 // If Poll succeeds and the operation has completed successfully,
568 // op.Done will return true, and the response of the operation is returned.
569 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
570 func (op *CreateServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) {
571 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
572 var resp networkservicespb.ServiceBinding
573 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
574 return nil, err
575 }
576 if !op.Done() {
577 return nil, nil
578 }
579 return &resp, nil
580 }
581
582 // Metadata returns metadata associated with the long-running operation.
583 // Metadata itself does not contact the server, but Poll does.
584 // To get the latest metadata, call this method after a successful call to Poll.
585 // If the metadata is not available, the returned metadata and error are both nil.
586 func (op *CreateServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
587 var meta networkservicespb.OperationMetadata
588 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
589 return nil, nil
590 } else if err != nil {
591 return nil, err
592 }
593 return &meta, nil
594 }
595
596 // Done reports whether the long-running operation has completed.
597 func (op *CreateServiceBindingOperation) Done() bool {
598 return op.lro.Done()
599 }
600
601 // Name returns the name of the long-running operation.
602 // The name is assigned by the server and is unique within the service from which the operation is created.
603 func (op *CreateServiceBindingOperation) Name() string {
604 return op.lro.Name()
605 }
606
607 // CreateServiceLbPolicyOperation manages a long-running operation from CreateServiceLbPolicy.
608 type CreateServiceLbPolicyOperation struct {
609 lro *longrunning.Operation
610 pollPath string
611 }
612
613 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
614 //
615 // See documentation of Poll for error-handling information.
616 func (op *CreateServiceLbPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) {
617 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
618 var resp networkservicespb.ServiceLbPolicy
619 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
620 return nil, err
621 }
622 return &resp, nil
623 }
624
625 // Poll fetches the latest state of the long-running operation.
626 //
627 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
628 //
629 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
630 // the operation has completed with failure, the error is returned and op.Done will return true.
631 // If Poll succeeds and the operation has completed successfully,
632 // op.Done will return true, and the response of the operation is returned.
633 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
634 func (op *CreateServiceLbPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) {
635 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
636 var resp networkservicespb.ServiceLbPolicy
637 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
638 return nil, err
639 }
640 if !op.Done() {
641 return nil, nil
642 }
643 return &resp, nil
644 }
645
646 // Metadata returns metadata associated with the long-running operation.
647 // Metadata itself does not contact the server, but Poll does.
648 // To get the latest metadata, call this method after a successful call to Poll.
649 // If the metadata is not available, the returned metadata and error are both nil.
650 func (op *CreateServiceLbPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
651 var meta networkservicespb.OperationMetadata
652 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
653 return nil, nil
654 } else if err != nil {
655 return nil, err
656 }
657 return &meta, nil
658 }
659
660 // Done reports whether the long-running operation has completed.
661 func (op *CreateServiceLbPolicyOperation) Done() bool {
662 return op.lro.Done()
663 }
664
665 // Name returns the name of the long-running operation.
666 // The name is assigned by the server and is unique within the service from which the operation is created.
667 func (op *CreateServiceLbPolicyOperation) Name() string {
668 return op.lro.Name()
669 }
670
671 // CreateTcpRouteOperation manages a long-running operation from CreateTcpRoute.
672 type CreateTcpRouteOperation struct {
673 lro *longrunning.Operation
674 pollPath string
675 }
676
677 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
678 //
679 // See documentation of Poll for error-handling information.
680 func (op *CreateTcpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) {
681 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
682 var resp networkservicespb.TcpRoute
683 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
684 return nil, err
685 }
686 return &resp, nil
687 }
688
689 // Poll fetches the latest state of the long-running operation.
690 //
691 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
692 //
693 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
694 // the operation has completed with failure, the error is returned and op.Done will return true.
695 // If Poll succeeds and the operation has completed successfully,
696 // op.Done will return true, and the response of the operation is returned.
697 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
698 func (op *CreateTcpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) {
699 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
700 var resp networkservicespb.TcpRoute
701 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
702 return nil, err
703 }
704 if !op.Done() {
705 return nil, nil
706 }
707 return &resp, nil
708 }
709
710 // Metadata returns metadata associated with the long-running operation.
711 // Metadata itself does not contact the server, but Poll does.
712 // To get the latest metadata, call this method after a successful call to Poll.
713 // If the metadata is not available, the returned metadata and error are both nil.
714 func (op *CreateTcpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
715 var meta networkservicespb.OperationMetadata
716 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
717 return nil, nil
718 } else if err != nil {
719 return nil, err
720 }
721 return &meta, nil
722 }
723
724 // Done reports whether the long-running operation has completed.
725 func (op *CreateTcpRouteOperation) Done() bool {
726 return op.lro.Done()
727 }
728
729 // Name returns the name of the long-running operation.
730 // The name is assigned by the server and is unique within the service from which the operation is created.
731 func (op *CreateTcpRouteOperation) Name() string {
732 return op.lro.Name()
733 }
734
735 // CreateTlsRouteOperation manages a long-running operation from CreateTlsRoute.
736 type CreateTlsRouteOperation struct {
737 lro *longrunning.Operation
738 pollPath string
739 }
740
741 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
742 //
743 // See documentation of Poll for error-handling information.
744 func (op *CreateTlsRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) {
745 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
746 var resp networkservicespb.TlsRoute
747 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
748 return nil, err
749 }
750 return &resp, nil
751 }
752
753 // Poll fetches the latest state of the long-running operation.
754 //
755 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
756 //
757 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
758 // the operation has completed with failure, the error is returned and op.Done will return true.
759 // If Poll succeeds and the operation has completed successfully,
760 // op.Done will return true, and the response of the operation is returned.
761 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
762 func (op *CreateTlsRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) {
763 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
764 var resp networkservicespb.TlsRoute
765 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
766 return nil, err
767 }
768 if !op.Done() {
769 return nil, nil
770 }
771 return &resp, nil
772 }
773
774 // Metadata returns metadata associated with the long-running operation.
775 // Metadata itself does not contact the server, but Poll does.
776 // To get the latest metadata, call this method after a successful call to Poll.
777 // If the metadata is not available, the returned metadata and error are both nil.
778 func (op *CreateTlsRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
779 var meta networkservicespb.OperationMetadata
780 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
781 return nil, nil
782 } else if err != nil {
783 return nil, err
784 }
785 return &meta, nil
786 }
787
788 // Done reports whether the long-running operation has completed.
789 func (op *CreateTlsRouteOperation) Done() bool {
790 return op.lro.Done()
791 }
792
793 // Name returns the name of the long-running operation.
794 // The name is assigned by the server and is unique within the service from which the operation is created.
795 func (op *CreateTlsRouteOperation) Name() string {
796 return op.lro.Name()
797 }
798
799 // CreateWasmPluginOperation manages a long-running operation from CreateWasmPlugin.
800 type CreateWasmPluginOperation struct {
801 lro *longrunning.Operation
802 pollPath string
803 }
804
805 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
806 //
807 // See documentation of Poll for error-handling information.
808 func (op *CreateWasmPluginOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) {
809 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
810 var resp networkservicespb.WasmPlugin
811 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
812 return nil, err
813 }
814 return &resp, nil
815 }
816
817 // Poll fetches the latest state of the long-running operation.
818 //
819 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
820 //
821 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
822 // the operation has completed with failure, the error is returned and op.Done will return true.
823 // If Poll succeeds and the operation has completed successfully,
824 // op.Done will return true, and the response of the operation is returned.
825 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
826 func (op *CreateWasmPluginOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) {
827 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
828 var resp networkservicespb.WasmPlugin
829 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
830 return nil, err
831 }
832 if !op.Done() {
833 return nil, nil
834 }
835 return &resp, nil
836 }
837
838 // Metadata returns metadata associated with the long-running operation.
839 // Metadata itself does not contact the server, but Poll does.
840 // To get the latest metadata, call this method after a successful call to Poll.
841 // If the metadata is not available, the returned metadata and error are both nil.
842 func (op *CreateWasmPluginOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
843 var meta networkservicespb.OperationMetadata
844 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
845 return nil, nil
846 } else if err != nil {
847 return nil, err
848 }
849 return &meta, nil
850 }
851
852 // Done reports whether the long-running operation has completed.
853 func (op *CreateWasmPluginOperation) Done() bool {
854 return op.lro.Done()
855 }
856
857 // Name returns the name of the long-running operation.
858 // The name is assigned by the server and is unique within the service from which the operation is created.
859 func (op *CreateWasmPluginOperation) Name() string {
860 return op.lro.Name()
861 }
862
863 // CreateWasmPluginVersionOperation manages a long-running operation from CreateWasmPluginVersion.
864 type CreateWasmPluginVersionOperation struct {
865 lro *longrunning.Operation
866 pollPath string
867 }
868
869 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
870 //
871 // See documentation of Poll for error-handling information.
872 func (op *CreateWasmPluginVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPluginVersion, error) {
873 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
874 var resp networkservicespb.WasmPluginVersion
875 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
876 return nil, err
877 }
878 return &resp, nil
879 }
880
881 // Poll fetches the latest state of the long-running operation.
882 //
883 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
884 //
885 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
886 // the operation has completed with failure, the error is returned and op.Done will return true.
887 // If Poll succeeds and the operation has completed successfully,
888 // op.Done will return true, and the response of the operation is returned.
889 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
890 func (op *CreateWasmPluginVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPluginVersion, error) {
891 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
892 var resp networkservicespb.WasmPluginVersion
893 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
894 return nil, err
895 }
896 if !op.Done() {
897 return nil, nil
898 }
899 return &resp, nil
900 }
901
902 // Metadata returns metadata associated with the long-running operation.
903 // Metadata itself does not contact the server, but Poll does.
904 // To get the latest metadata, call this method after a successful call to Poll.
905 // If the metadata is not available, the returned metadata and error are both nil.
906 func (op *CreateWasmPluginVersionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
907 var meta networkservicespb.OperationMetadata
908 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
909 return nil, nil
910 } else if err != nil {
911 return nil, err
912 }
913 return &meta, nil
914 }
915
916 // Done reports whether the long-running operation has completed.
917 func (op *CreateWasmPluginVersionOperation) Done() bool {
918 return op.lro.Done()
919 }
920
921 // Name returns the name of the long-running operation.
922 // The name is assigned by the server and is unique within the service from which the operation is created.
923 func (op *CreateWasmPluginVersionOperation) Name() string {
924 return op.lro.Name()
925 }
926
927 // DeleteAuthzExtensionOperation manages a long-running operation from DeleteAuthzExtension.
928 type DeleteAuthzExtensionOperation struct {
929 lro *longrunning.Operation
930 pollPath string
931 }
932
933 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
934 //
935 // See documentation of Poll for error-handling information.
936 func (op *DeleteAuthzExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
937 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
938 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
939 }
940
941 // Poll fetches the latest state of the long-running operation.
942 //
943 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
944 //
945 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
946 // the operation has completed with failure, the error is returned and op.Done will return true.
947 // If Poll succeeds and the operation has completed successfully,
948 // op.Done will return true, and the response of the operation is returned.
949 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
950 func (op *DeleteAuthzExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
951 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
952 return op.lro.Poll(ctx, nil, opts...)
953 }
954
955 // Metadata returns metadata associated with the long-running operation.
956 // Metadata itself does not contact the server, but Poll does.
957 // To get the latest metadata, call this method after a successful call to Poll.
958 // If the metadata is not available, the returned metadata and error are both nil.
959 func (op *DeleteAuthzExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
960 var meta networkservicespb.OperationMetadata
961 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
962 return nil, nil
963 } else if err != nil {
964 return nil, err
965 }
966 return &meta, nil
967 }
968
969 // Done reports whether the long-running operation has completed.
970 func (op *DeleteAuthzExtensionOperation) Done() bool {
971 return op.lro.Done()
972 }
973
974 // Name returns the name of the long-running operation.
975 // The name is assigned by the server and is unique within the service from which the operation is created.
976 func (op *DeleteAuthzExtensionOperation) Name() string {
977 return op.lro.Name()
978 }
979
980 // DeleteEndpointPolicyOperation manages a long-running operation from DeleteEndpointPolicy.
981 type DeleteEndpointPolicyOperation struct {
982 lro *longrunning.Operation
983 pollPath string
984 }
985
986 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
987 //
988 // See documentation of Poll for error-handling information.
989 func (op *DeleteEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
990 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
991 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
992 }
993
994 // Poll fetches the latest state of the long-running operation.
995 //
996 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
997 //
998 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
999 // the operation has completed with failure, the error is returned and op.Done will return true.
1000 // If Poll succeeds and the operation has completed successfully,
1001 // op.Done will return true, and the response of the operation is returned.
1002 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1003 func (op *DeleteEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1004 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1005 return op.lro.Poll(ctx, nil, opts...)
1006 }
1007
1008 // Metadata returns metadata associated with the long-running operation.
1009 // Metadata itself does not contact the server, but Poll does.
1010 // To get the latest metadata, call this method after a successful call to Poll.
1011 // If the metadata is not available, the returned metadata and error are both nil.
1012 func (op *DeleteEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1013 var meta networkservicespb.OperationMetadata
1014 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1015 return nil, nil
1016 } else if err != nil {
1017 return nil, err
1018 }
1019 return &meta, nil
1020 }
1021
1022 // Done reports whether the long-running operation has completed.
1023 func (op *DeleteEndpointPolicyOperation) Done() bool {
1024 return op.lro.Done()
1025 }
1026
1027 // Name returns the name of the long-running operation.
1028 // The name is assigned by the server and is unique within the service from which the operation is created.
1029 func (op *DeleteEndpointPolicyOperation) Name() string {
1030 return op.lro.Name()
1031 }
1032
1033 // DeleteGatewayOperation manages a long-running operation from DeleteGateway.
1034 type DeleteGatewayOperation struct {
1035 lro *longrunning.Operation
1036 pollPath string
1037 }
1038
1039 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1040 //
1041 // See documentation of Poll for error-handling information.
1042 func (op *DeleteGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1043 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1044 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1045 }
1046
1047 // Poll fetches the latest state of the long-running operation.
1048 //
1049 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1050 //
1051 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1052 // the operation has completed with failure, the error is returned and op.Done will return true.
1053 // If Poll succeeds and the operation has completed successfully,
1054 // op.Done will return true, and the response of the operation is returned.
1055 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1056 func (op *DeleteGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1057 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1058 return op.lro.Poll(ctx, nil, opts...)
1059 }
1060
1061 // Metadata returns metadata associated with the long-running operation.
1062 // Metadata itself does not contact the server, but Poll does.
1063 // To get the latest metadata, call this method after a successful call to Poll.
1064 // If the metadata is not available, the returned metadata and error are both nil.
1065 func (op *DeleteGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1066 var meta networkservicespb.OperationMetadata
1067 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1068 return nil, nil
1069 } else if err != nil {
1070 return nil, err
1071 }
1072 return &meta, nil
1073 }
1074
1075 // Done reports whether the long-running operation has completed.
1076 func (op *DeleteGatewayOperation) Done() bool {
1077 return op.lro.Done()
1078 }
1079
1080 // Name returns the name of the long-running operation.
1081 // The name is assigned by the server and is unique within the service from which the operation is created.
1082 func (op *DeleteGatewayOperation) Name() string {
1083 return op.lro.Name()
1084 }
1085
1086 // DeleteGrpcRouteOperation manages a long-running operation from DeleteGrpcRoute.
1087 type DeleteGrpcRouteOperation struct {
1088 lro *longrunning.Operation
1089 pollPath string
1090 }
1091
1092 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1093 //
1094 // See documentation of Poll for error-handling information.
1095 func (op *DeleteGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1096 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1097 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1098 }
1099
1100 // Poll fetches the latest state of the long-running operation.
1101 //
1102 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1103 //
1104 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1105 // the operation has completed with failure, the error is returned and op.Done will return true.
1106 // If Poll succeeds and the operation has completed successfully,
1107 // op.Done will return true, and the response of the operation is returned.
1108 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1109 func (op *DeleteGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1110 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1111 return op.lro.Poll(ctx, nil, opts...)
1112 }
1113
1114 // Metadata returns metadata associated with the long-running operation.
1115 // Metadata itself does not contact the server, but Poll does.
1116 // To get the latest metadata, call this method after a successful call to Poll.
1117 // If the metadata is not available, the returned metadata and error are both nil.
1118 func (op *DeleteGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1119 var meta networkservicespb.OperationMetadata
1120 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1121 return nil, nil
1122 } else if err != nil {
1123 return nil, err
1124 }
1125 return &meta, nil
1126 }
1127
1128 // Done reports whether the long-running operation has completed.
1129 func (op *DeleteGrpcRouteOperation) Done() bool {
1130 return op.lro.Done()
1131 }
1132
1133 // Name returns the name of the long-running operation.
1134 // The name is assigned by the server and is unique within the service from which the operation is created.
1135 func (op *DeleteGrpcRouteOperation) Name() string {
1136 return op.lro.Name()
1137 }
1138
1139 // DeleteHttpRouteOperation manages a long-running operation from DeleteHttpRoute.
1140 type DeleteHttpRouteOperation struct {
1141 lro *longrunning.Operation
1142 pollPath string
1143 }
1144
1145 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1146 //
1147 // See documentation of Poll for error-handling information.
1148 func (op *DeleteHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1149 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1150 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1151 }
1152
1153 // Poll fetches the latest state of the long-running operation.
1154 //
1155 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1156 //
1157 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1158 // the operation has completed with failure, the error is returned and op.Done will return true.
1159 // If Poll succeeds and the operation has completed successfully,
1160 // op.Done will return true, and the response of the operation is returned.
1161 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1162 func (op *DeleteHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1163 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1164 return op.lro.Poll(ctx, nil, opts...)
1165 }
1166
1167 // Metadata returns metadata associated with the long-running operation.
1168 // Metadata itself does not contact the server, but Poll does.
1169 // To get the latest metadata, call this method after a successful call to Poll.
1170 // If the metadata is not available, the returned metadata and error are both nil.
1171 func (op *DeleteHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1172 var meta networkservicespb.OperationMetadata
1173 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1174 return nil, nil
1175 } else if err != nil {
1176 return nil, err
1177 }
1178 return &meta, nil
1179 }
1180
1181 // Done reports whether the long-running operation has completed.
1182 func (op *DeleteHttpRouteOperation) Done() bool {
1183 return op.lro.Done()
1184 }
1185
1186 // Name returns the name of the long-running operation.
1187 // The name is assigned by the server and is unique within the service from which the operation is created.
1188 func (op *DeleteHttpRouteOperation) Name() string {
1189 return op.lro.Name()
1190 }
1191
1192 // DeleteLbRouteExtensionOperation manages a long-running operation from DeleteLbRouteExtension.
1193 type DeleteLbRouteExtensionOperation struct {
1194 lro *longrunning.Operation
1195 pollPath string
1196 }
1197
1198 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1199 //
1200 // See documentation of Poll for error-handling information.
1201 func (op *DeleteLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1202 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1203 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1204 }
1205
1206 // Poll fetches the latest state of the long-running operation.
1207 //
1208 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1209 //
1210 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1211 // the operation has completed with failure, the error is returned and op.Done will return true.
1212 // If Poll succeeds and the operation has completed successfully,
1213 // op.Done will return true, and the response of the operation is returned.
1214 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1215 func (op *DeleteLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1216 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1217 return op.lro.Poll(ctx, nil, opts...)
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 *DeleteLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1225 var meta networkservicespb.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 *DeleteLbRouteExtensionOperation) 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 *DeleteLbRouteExtensionOperation) Name() string {
1242 return op.lro.Name()
1243 }
1244
1245 // DeleteLbTrafficExtensionOperation manages a long-running operation from DeleteLbTrafficExtension.
1246 type DeleteLbTrafficExtensionOperation 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 *DeleteLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1255 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1256 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1257 }
1258
1259 // Poll fetches the latest state of the long-running operation.
1260 //
1261 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1262 //
1263 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1264 // the operation has completed with failure, the error is returned and op.Done will return true.
1265 // If Poll succeeds and the operation has completed successfully,
1266 // op.Done will return true, and the response of the operation is returned.
1267 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1268 func (op *DeleteLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1269 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1270 return op.lro.Poll(ctx, nil, opts...)
1271 }
1272
1273 // Metadata returns metadata associated with the long-running operation.
1274 // Metadata itself does not contact the server, but Poll does.
1275 // To get the latest metadata, call this method after a successful call to Poll.
1276 // If the metadata is not available, the returned metadata and error are both nil.
1277 func (op *DeleteLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1278 var meta networkservicespb.OperationMetadata
1279 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1280 return nil, nil
1281 } else if err != nil {
1282 return nil, err
1283 }
1284 return &meta, nil
1285 }
1286
1287 // Done reports whether the long-running operation has completed.
1288 func (op *DeleteLbTrafficExtensionOperation) Done() bool {
1289 return op.lro.Done()
1290 }
1291
1292 // Name returns the name of the long-running operation.
1293 // The name is assigned by the server and is unique within the service from which the operation is created.
1294 func (op *DeleteLbTrafficExtensionOperation) Name() string {
1295 return op.lro.Name()
1296 }
1297
1298 // DeleteMeshOperation manages a long-running operation from DeleteMesh.
1299 type DeleteMeshOperation struct {
1300 lro *longrunning.Operation
1301 pollPath string
1302 }
1303
1304 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1305 //
1306 // See documentation of Poll for error-handling information.
1307 func (op *DeleteMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1308 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1309 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1310 }
1311
1312 // Poll fetches the latest state of the long-running operation.
1313 //
1314 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1315 //
1316 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1317 // the operation has completed with failure, the error is returned and op.Done will return true.
1318 // If Poll succeeds and the operation has completed successfully,
1319 // op.Done will return true, and the response of the operation is returned.
1320 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1321 func (op *DeleteMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1322 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1323 return op.lro.Poll(ctx, nil, opts...)
1324 }
1325
1326 // Metadata returns metadata associated with the long-running operation.
1327 // Metadata itself does not contact the server, but Poll does.
1328 // To get the latest metadata, call this method after a successful call to Poll.
1329 // If the metadata is not available, the returned metadata and error are both nil.
1330 func (op *DeleteMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1331 var meta networkservicespb.OperationMetadata
1332 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1333 return nil, nil
1334 } else if err != nil {
1335 return nil, err
1336 }
1337 return &meta, nil
1338 }
1339
1340 // Done reports whether the long-running operation has completed.
1341 func (op *DeleteMeshOperation) Done() bool {
1342 return op.lro.Done()
1343 }
1344
1345 // Name returns the name of the long-running operation.
1346 // The name is assigned by the server and is unique within the service from which the operation is created.
1347 func (op *DeleteMeshOperation) Name() string {
1348 return op.lro.Name()
1349 }
1350
1351 // DeleteServiceBindingOperation manages a long-running operation from DeleteServiceBinding.
1352 type DeleteServiceBindingOperation struct {
1353 lro *longrunning.Operation
1354 pollPath string
1355 }
1356
1357 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1358 //
1359 // See documentation of Poll for error-handling information.
1360 func (op *DeleteServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1361 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1362 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1363 }
1364
1365 // Poll fetches the latest state of the long-running operation.
1366 //
1367 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1368 //
1369 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1370 // the operation has completed with failure, the error is returned and op.Done will return true.
1371 // If Poll succeeds and the operation has completed successfully,
1372 // op.Done will return true, and the response of the operation is returned.
1373 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1374 func (op *DeleteServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1375 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1376 return op.lro.Poll(ctx, nil, opts...)
1377 }
1378
1379 // Metadata returns metadata associated with the long-running operation.
1380 // Metadata itself does not contact the server, but Poll does.
1381 // To get the latest metadata, call this method after a successful call to Poll.
1382 // If the metadata is not available, the returned metadata and error are both nil.
1383 func (op *DeleteServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1384 var meta networkservicespb.OperationMetadata
1385 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1386 return nil, nil
1387 } else if err != nil {
1388 return nil, err
1389 }
1390 return &meta, nil
1391 }
1392
1393 // Done reports whether the long-running operation has completed.
1394 func (op *DeleteServiceBindingOperation) Done() bool {
1395 return op.lro.Done()
1396 }
1397
1398 // Name returns the name of the long-running operation.
1399 // The name is assigned by the server and is unique within the service from which the operation is created.
1400 func (op *DeleteServiceBindingOperation) Name() string {
1401 return op.lro.Name()
1402 }
1403
1404 // DeleteServiceLbPolicyOperation manages a long-running operation from DeleteServiceLbPolicy.
1405 type DeleteServiceLbPolicyOperation struct {
1406 lro *longrunning.Operation
1407 pollPath string
1408 }
1409
1410 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1411 //
1412 // See documentation of Poll for error-handling information.
1413 func (op *DeleteServiceLbPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1414 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1415 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1416 }
1417
1418 // Poll fetches the latest state of the long-running operation.
1419 //
1420 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1421 //
1422 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1423 // the operation has completed with failure, the error is returned and op.Done will return true.
1424 // If Poll succeeds and the operation has completed successfully,
1425 // op.Done will return true, and the response of the operation is returned.
1426 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1427 func (op *DeleteServiceLbPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1428 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1429 return op.lro.Poll(ctx, nil, opts...)
1430 }
1431
1432 // Metadata returns metadata associated with the long-running operation.
1433 // Metadata itself does not contact the server, but Poll does.
1434 // To get the latest metadata, call this method after a successful call to Poll.
1435 // If the metadata is not available, the returned metadata and error are both nil.
1436 func (op *DeleteServiceLbPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1437 var meta networkservicespb.OperationMetadata
1438 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1439 return nil, nil
1440 } else if err != nil {
1441 return nil, err
1442 }
1443 return &meta, nil
1444 }
1445
1446 // Done reports whether the long-running operation has completed.
1447 func (op *DeleteServiceLbPolicyOperation) Done() bool {
1448 return op.lro.Done()
1449 }
1450
1451 // Name returns the name of the long-running operation.
1452 // The name is assigned by the server and is unique within the service from which the operation is created.
1453 func (op *DeleteServiceLbPolicyOperation) Name() string {
1454 return op.lro.Name()
1455 }
1456
1457 // DeleteTcpRouteOperation manages a long-running operation from DeleteTcpRoute.
1458 type DeleteTcpRouteOperation struct {
1459 lro *longrunning.Operation
1460 pollPath string
1461 }
1462
1463 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1464 //
1465 // See documentation of Poll for error-handling information.
1466 func (op *DeleteTcpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1467 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1468 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1469 }
1470
1471 // Poll fetches the latest state of the long-running operation.
1472 //
1473 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1474 //
1475 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1476 // the operation has completed with failure, the error is returned and op.Done will return true.
1477 // If Poll succeeds and the operation has completed successfully,
1478 // op.Done will return true, and the response of the operation is returned.
1479 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1480 func (op *DeleteTcpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1481 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1482 return op.lro.Poll(ctx, nil, opts...)
1483 }
1484
1485 // Metadata returns metadata associated with the long-running operation.
1486 // Metadata itself does not contact the server, but Poll does.
1487 // To get the latest metadata, call this method after a successful call to Poll.
1488 // If the metadata is not available, the returned metadata and error are both nil.
1489 func (op *DeleteTcpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1490 var meta networkservicespb.OperationMetadata
1491 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1492 return nil, nil
1493 } else if err != nil {
1494 return nil, err
1495 }
1496 return &meta, nil
1497 }
1498
1499 // Done reports whether the long-running operation has completed.
1500 func (op *DeleteTcpRouteOperation) Done() bool {
1501 return op.lro.Done()
1502 }
1503
1504 // Name returns the name of the long-running operation.
1505 // The name is assigned by the server and is unique within the service from which the operation is created.
1506 func (op *DeleteTcpRouteOperation) Name() string {
1507 return op.lro.Name()
1508 }
1509
1510 // DeleteTlsRouteOperation manages a long-running operation from DeleteTlsRoute.
1511 type DeleteTlsRouteOperation struct {
1512 lro *longrunning.Operation
1513 pollPath string
1514 }
1515
1516 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1517 //
1518 // See documentation of Poll for error-handling information.
1519 func (op *DeleteTlsRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1520 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1521 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1522 }
1523
1524 // Poll fetches the latest state of the long-running operation.
1525 //
1526 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1527 //
1528 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1529 // the operation has completed with failure, the error is returned and op.Done will return true.
1530 // If Poll succeeds and the operation has completed successfully,
1531 // op.Done will return true, and the response of the operation is returned.
1532 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1533 func (op *DeleteTlsRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1534 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1535 return op.lro.Poll(ctx, nil, opts...)
1536 }
1537
1538 // Metadata returns metadata associated with the long-running operation.
1539 // Metadata itself does not contact the server, but Poll does.
1540 // To get the latest metadata, call this method after a successful call to Poll.
1541 // If the metadata is not available, the returned metadata and error are both nil.
1542 func (op *DeleteTlsRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1543 var meta networkservicespb.OperationMetadata
1544 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1545 return nil, nil
1546 } else if err != nil {
1547 return nil, err
1548 }
1549 return &meta, nil
1550 }
1551
1552 // Done reports whether the long-running operation has completed.
1553 func (op *DeleteTlsRouteOperation) Done() bool {
1554 return op.lro.Done()
1555 }
1556
1557 // Name returns the name of the long-running operation.
1558 // The name is assigned by the server and is unique within the service from which the operation is created.
1559 func (op *DeleteTlsRouteOperation) Name() string {
1560 return op.lro.Name()
1561 }
1562
1563 // DeleteWasmPluginOperation manages a long-running operation from DeleteWasmPlugin.
1564 type DeleteWasmPluginOperation struct {
1565 lro *longrunning.Operation
1566 pollPath string
1567 }
1568
1569 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1570 //
1571 // See documentation of Poll for error-handling information.
1572 func (op *DeleteWasmPluginOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1573 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1574 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1575 }
1576
1577 // Poll fetches the latest state of the long-running operation.
1578 //
1579 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1580 //
1581 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1582 // the operation has completed with failure, the error is returned and op.Done will return true.
1583 // If Poll succeeds and the operation has completed successfully,
1584 // op.Done will return true, and the response of the operation is returned.
1585 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1586 func (op *DeleteWasmPluginOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1587 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1588 return op.lro.Poll(ctx, nil, opts...)
1589 }
1590
1591 // Metadata returns metadata associated with the long-running operation.
1592 // Metadata itself does not contact the server, but Poll does.
1593 // To get the latest metadata, call this method after a successful call to Poll.
1594 // If the metadata is not available, the returned metadata and error are both nil.
1595 func (op *DeleteWasmPluginOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1596 var meta networkservicespb.OperationMetadata
1597 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1598 return nil, nil
1599 } else if err != nil {
1600 return nil, err
1601 }
1602 return &meta, nil
1603 }
1604
1605 // Done reports whether the long-running operation has completed.
1606 func (op *DeleteWasmPluginOperation) Done() bool {
1607 return op.lro.Done()
1608 }
1609
1610 // Name returns the name of the long-running operation.
1611 // The name is assigned by the server and is unique within the service from which the operation is created.
1612 func (op *DeleteWasmPluginOperation) Name() string {
1613 return op.lro.Name()
1614 }
1615
1616 // DeleteWasmPluginVersionOperation manages a long-running operation from DeleteWasmPluginVersion.
1617 type DeleteWasmPluginVersionOperation struct {
1618 lro *longrunning.Operation
1619 pollPath string
1620 }
1621
1622 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1623 //
1624 // See documentation of Poll for error-handling information.
1625 func (op *DeleteWasmPluginVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
1626 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1627 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
1628 }
1629
1630 // Poll fetches the latest state of the long-running operation.
1631 //
1632 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1633 //
1634 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1635 // the operation has completed with failure, the error is returned and op.Done will return true.
1636 // If Poll succeeds and the operation has completed successfully,
1637 // op.Done will return true, and the response of the operation is returned.
1638 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1639 func (op *DeleteWasmPluginVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
1640 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1641 return op.lro.Poll(ctx, nil, opts...)
1642 }
1643
1644 // Metadata returns metadata associated with the long-running operation.
1645 // Metadata itself does not contact the server, but Poll does.
1646 // To get the latest metadata, call this method after a successful call to Poll.
1647 // If the metadata is not available, the returned metadata and error are both nil.
1648 func (op *DeleteWasmPluginVersionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1649 var meta networkservicespb.OperationMetadata
1650 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1651 return nil, nil
1652 } else if err != nil {
1653 return nil, err
1654 }
1655 return &meta, nil
1656 }
1657
1658 // Done reports whether the long-running operation has completed.
1659 func (op *DeleteWasmPluginVersionOperation) Done() bool {
1660 return op.lro.Done()
1661 }
1662
1663 // Name returns the name of the long-running operation.
1664 // The name is assigned by the server and is unique within the service from which the operation is created.
1665 func (op *DeleteWasmPluginVersionOperation) Name() string {
1666 return op.lro.Name()
1667 }
1668
1669 // UpdateAuthzExtensionOperation manages a long-running operation from UpdateAuthzExtension.
1670 type UpdateAuthzExtensionOperation struct {
1671 lro *longrunning.Operation
1672 pollPath string
1673 }
1674
1675 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1676 //
1677 // See documentation of Poll for error-handling information.
1678 func (op *UpdateAuthzExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) {
1679 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1680 var resp networkservicespb.AuthzExtension
1681 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1682 return nil, err
1683 }
1684 return &resp, nil
1685 }
1686
1687 // Poll fetches the latest state of the long-running operation.
1688 //
1689 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1690 //
1691 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1692 // the operation has completed with failure, the error is returned and op.Done will return true.
1693 // If Poll succeeds and the operation has completed successfully,
1694 // op.Done will return true, and the response of the operation is returned.
1695 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1696 func (op *UpdateAuthzExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.AuthzExtension, error) {
1697 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1698 var resp networkservicespb.AuthzExtension
1699 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1700 return nil, err
1701 }
1702 if !op.Done() {
1703 return nil, nil
1704 }
1705 return &resp, nil
1706 }
1707
1708 // Metadata returns metadata associated with the long-running operation.
1709 // Metadata itself does not contact the server, but Poll does.
1710 // To get the latest metadata, call this method after a successful call to Poll.
1711 // If the metadata is not available, the returned metadata and error are both nil.
1712 func (op *UpdateAuthzExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1713 var meta networkservicespb.OperationMetadata
1714 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1715 return nil, nil
1716 } else if err != nil {
1717 return nil, err
1718 }
1719 return &meta, nil
1720 }
1721
1722 // Done reports whether the long-running operation has completed.
1723 func (op *UpdateAuthzExtensionOperation) Done() bool {
1724 return op.lro.Done()
1725 }
1726
1727 // Name returns the name of the long-running operation.
1728 // The name is assigned by the server and is unique within the service from which the operation is created.
1729 func (op *UpdateAuthzExtensionOperation) Name() string {
1730 return op.lro.Name()
1731 }
1732
1733 // UpdateEndpointPolicyOperation manages a long-running operation from UpdateEndpointPolicy.
1734 type UpdateEndpointPolicyOperation struct {
1735 lro *longrunning.Operation
1736 pollPath string
1737 }
1738
1739 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1740 //
1741 // See documentation of Poll for error-handling information.
1742 func (op *UpdateEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) {
1743 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1744 var resp networkservicespb.EndpointPolicy
1745 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1746 return nil, err
1747 }
1748 return &resp, nil
1749 }
1750
1751 // Poll fetches the latest state of the long-running operation.
1752 //
1753 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1754 //
1755 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1756 // the operation has completed with failure, the error is returned and op.Done will return true.
1757 // If Poll succeeds and the operation has completed successfully,
1758 // op.Done will return true, and the response of the operation is returned.
1759 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1760 func (op *UpdateEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error) {
1761 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1762 var resp networkservicespb.EndpointPolicy
1763 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1764 return nil, err
1765 }
1766 if !op.Done() {
1767 return nil, nil
1768 }
1769 return &resp, nil
1770 }
1771
1772 // Metadata returns metadata associated with the long-running operation.
1773 // Metadata itself does not contact the server, but Poll does.
1774 // To get the latest metadata, call this method after a successful call to Poll.
1775 // If the metadata is not available, the returned metadata and error are both nil.
1776 func (op *UpdateEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1777 var meta networkservicespb.OperationMetadata
1778 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1779 return nil, nil
1780 } else if err != nil {
1781 return nil, err
1782 }
1783 return &meta, nil
1784 }
1785
1786 // Done reports whether the long-running operation has completed.
1787 func (op *UpdateEndpointPolicyOperation) Done() bool {
1788 return op.lro.Done()
1789 }
1790
1791 // Name returns the name of the long-running operation.
1792 // The name is assigned by the server and is unique within the service from which the operation is created.
1793 func (op *UpdateEndpointPolicyOperation) Name() string {
1794 return op.lro.Name()
1795 }
1796
1797 // UpdateGatewayOperation manages a long-running operation from UpdateGateway.
1798 type UpdateGatewayOperation struct {
1799 lro *longrunning.Operation
1800 pollPath string
1801 }
1802
1803 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1804 //
1805 // See documentation of Poll for error-handling information.
1806 func (op *UpdateGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) {
1807 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1808 var resp networkservicespb.Gateway
1809 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1810 return nil, err
1811 }
1812 return &resp, nil
1813 }
1814
1815 // Poll fetches the latest state of the long-running operation.
1816 //
1817 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1818 //
1819 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1820 // the operation has completed with failure, the error is returned and op.Done will return true.
1821 // If Poll succeeds and the operation has completed successfully,
1822 // op.Done will return true, and the response of the operation is returned.
1823 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1824 func (op *UpdateGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error) {
1825 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1826 var resp networkservicespb.Gateway
1827 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1828 return nil, err
1829 }
1830 if !op.Done() {
1831 return nil, nil
1832 }
1833 return &resp, nil
1834 }
1835
1836 // Metadata returns metadata associated with the long-running operation.
1837 // Metadata itself does not contact the server, but Poll does.
1838 // To get the latest metadata, call this method after a successful call to Poll.
1839 // If the metadata is not available, the returned metadata and error are both nil.
1840 func (op *UpdateGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1841 var meta networkservicespb.OperationMetadata
1842 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1843 return nil, nil
1844 } else if err != nil {
1845 return nil, err
1846 }
1847 return &meta, nil
1848 }
1849
1850 // Done reports whether the long-running operation has completed.
1851 func (op *UpdateGatewayOperation) Done() bool {
1852 return op.lro.Done()
1853 }
1854
1855 // Name returns the name of the long-running operation.
1856 // The name is assigned by the server and is unique within the service from which the operation is created.
1857 func (op *UpdateGatewayOperation) Name() string {
1858 return op.lro.Name()
1859 }
1860
1861 // UpdateGrpcRouteOperation manages a long-running operation from UpdateGrpcRoute.
1862 type UpdateGrpcRouteOperation struct {
1863 lro *longrunning.Operation
1864 pollPath string
1865 }
1866
1867 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1868 //
1869 // See documentation of Poll for error-handling information.
1870 func (op *UpdateGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) {
1871 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1872 var resp networkservicespb.GrpcRoute
1873 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1874 return nil, err
1875 }
1876 return &resp, nil
1877 }
1878
1879 // Poll fetches the latest state of the long-running operation.
1880 //
1881 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1882 //
1883 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1884 // the operation has completed with failure, the error is returned and op.Done will return true.
1885 // If Poll succeeds and the operation has completed successfully,
1886 // op.Done will return true, and the response of the operation is returned.
1887 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1888 func (op *UpdateGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error) {
1889 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1890 var resp networkservicespb.GrpcRoute
1891 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1892 return nil, err
1893 }
1894 if !op.Done() {
1895 return nil, nil
1896 }
1897 return &resp, nil
1898 }
1899
1900 // Metadata returns metadata associated with the long-running operation.
1901 // Metadata itself does not contact the server, but Poll does.
1902 // To get the latest metadata, call this method after a successful call to Poll.
1903 // If the metadata is not available, the returned metadata and error are both nil.
1904 func (op *UpdateGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1905 var meta networkservicespb.OperationMetadata
1906 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1907 return nil, nil
1908 } else if err != nil {
1909 return nil, err
1910 }
1911 return &meta, nil
1912 }
1913
1914 // Done reports whether the long-running operation has completed.
1915 func (op *UpdateGrpcRouteOperation) Done() bool {
1916 return op.lro.Done()
1917 }
1918
1919 // Name returns the name of the long-running operation.
1920 // The name is assigned by the server and is unique within the service from which the operation is created.
1921 func (op *UpdateGrpcRouteOperation) Name() string {
1922 return op.lro.Name()
1923 }
1924
1925 // UpdateHttpRouteOperation manages a long-running operation from UpdateHttpRoute.
1926 type UpdateHttpRouteOperation struct {
1927 lro *longrunning.Operation
1928 pollPath string
1929 }
1930
1931 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1932 //
1933 // See documentation of Poll for error-handling information.
1934 func (op *UpdateHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) {
1935 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1936 var resp networkservicespb.HttpRoute
1937 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1938 return nil, err
1939 }
1940 return &resp, nil
1941 }
1942
1943 // Poll fetches the latest state of the long-running operation.
1944 //
1945 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1946 //
1947 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1948 // the operation has completed with failure, the error is returned and op.Done will return true.
1949 // If Poll succeeds and the operation has completed successfully,
1950 // op.Done will return true, and the response of the operation is returned.
1951 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1952 func (op *UpdateHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error) {
1953 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1954 var resp networkservicespb.HttpRoute
1955 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1956 return nil, err
1957 }
1958 if !op.Done() {
1959 return nil, nil
1960 }
1961 return &resp, nil
1962 }
1963
1964 // Metadata returns metadata associated with the long-running operation.
1965 // Metadata itself does not contact the server, but Poll does.
1966 // To get the latest metadata, call this method after a successful call to Poll.
1967 // If the metadata is not available, the returned metadata and error are both nil.
1968 func (op *UpdateHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
1969 var meta networkservicespb.OperationMetadata
1970 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1971 return nil, nil
1972 } else if err != nil {
1973 return nil, err
1974 }
1975 return &meta, nil
1976 }
1977
1978 // Done reports whether the long-running operation has completed.
1979 func (op *UpdateHttpRouteOperation) Done() bool {
1980 return op.lro.Done()
1981 }
1982
1983 // Name returns the name of the long-running operation.
1984 // The name is assigned by the server and is unique within the service from which the operation is created.
1985 func (op *UpdateHttpRouteOperation) Name() string {
1986 return op.lro.Name()
1987 }
1988
1989 // UpdateLbRouteExtensionOperation manages a long-running operation from UpdateLbRouteExtension.
1990 type UpdateLbRouteExtensionOperation struct {
1991 lro *longrunning.Operation
1992 pollPath string
1993 }
1994
1995 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
1996 //
1997 // See documentation of Poll for error-handling information.
1998 func (op *UpdateLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) {
1999 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2000 var resp networkservicespb.LbRouteExtension
2001 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2002 return nil, err
2003 }
2004 return &resp, nil
2005 }
2006
2007 // Poll fetches the latest state of the long-running operation.
2008 //
2009 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2010 //
2011 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2012 // the operation has completed with failure, the error is returned and op.Done will return true.
2013 // If Poll succeeds and the operation has completed successfully,
2014 // op.Done will return true, and the response of the operation is returned.
2015 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2016 func (op *UpdateLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error) {
2017 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2018 var resp networkservicespb.LbRouteExtension
2019 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2020 return nil, err
2021 }
2022 if !op.Done() {
2023 return nil, nil
2024 }
2025 return &resp, nil
2026 }
2027
2028 // Metadata returns metadata associated with the long-running operation.
2029 // Metadata itself does not contact the server, but Poll does.
2030 // To get the latest metadata, call this method after a successful call to Poll.
2031 // If the metadata is not available, the returned metadata and error are both nil.
2032 func (op *UpdateLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2033 var meta networkservicespb.OperationMetadata
2034 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2035 return nil, nil
2036 } else if err != nil {
2037 return nil, err
2038 }
2039 return &meta, nil
2040 }
2041
2042 // Done reports whether the long-running operation has completed.
2043 func (op *UpdateLbRouteExtensionOperation) Done() bool {
2044 return op.lro.Done()
2045 }
2046
2047 // Name returns the name of the long-running operation.
2048 // The name is assigned by the server and is unique within the service from which the operation is created.
2049 func (op *UpdateLbRouteExtensionOperation) Name() string {
2050 return op.lro.Name()
2051 }
2052
2053 // UpdateLbTrafficExtensionOperation manages a long-running operation from UpdateLbTrafficExtension.
2054 type UpdateLbTrafficExtensionOperation struct {
2055 lro *longrunning.Operation
2056 pollPath string
2057 }
2058
2059 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2060 //
2061 // See documentation of Poll for error-handling information.
2062 func (op *UpdateLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) {
2063 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2064 var resp networkservicespb.LbTrafficExtension
2065 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2066 return nil, err
2067 }
2068 return &resp, nil
2069 }
2070
2071 // Poll fetches the latest state of the long-running operation.
2072 //
2073 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2074 //
2075 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2076 // the operation has completed with failure, the error is returned and op.Done will return true.
2077 // If Poll succeeds and the operation has completed successfully,
2078 // op.Done will return true, and the response of the operation is returned.
2079 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2080 func (op *UpdateLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error) {
2081 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2082 var resp networkservicespb.LbTrafficExtension
2083 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2084 return nil, err
2085 }
2086 if !op.Done() {
2087 return nil, nil
2088 }
2089 return &resp, nil
2090 }
2091
2092 // Metadata returns metadata associated with the long-running operation.
2093 // Metadata itself does not contact the server, but Poll does.
2094 // To get the latest metadata, call this method after a successful call to Poll.
2095 // If the metadata is not available, the returned metadata and error are both nil.
2096 func (op *UpdateLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2097 var meta networkservicespb.OperationMetadata
2098 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2099 return nil, nil
2100 } else if err != nil {
2101 return nil, err
2102 }
2103 return &meta, nil
2104 }
2105
2106 // Done reports whether the long-running operation has completed.
2107 func (op *UpdateLbTrafficExtensionOperation) Done() bool {
2108 return op.lro.Done()
2109 }
2110
2111 // Name returns the name of the long-running operation.
2112 // The name is assigned by the server and is unique within the service from which the operation is created.
2113 func (op *UpdateLbTrafficExtensionOperation) Name() string {
2114 return op.lro.Name()
2115 }
2116
2117 // UpdateMeshOperation manages a long-running operation from UpdateMesh.
2118 type UpdateMeshOperation struct {
2119 lro *longrunning.Operation
2120 pollPath string
2121 }
2122
2123 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2124 //
2125 // See documentation of Poll for error-handling information.
2126 func (op *UpdateMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) {
2127 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2128 var resp networkservicespb.Mesh
2129 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2130 return nil, err
2131 }
2132 return &resp, nil
2133 }
2134
2135 // Poll fetches the latest state of the long-running operation.
2136 //
2137 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2138 //
2139 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2140 // the operation has completed with failure, the error is returned and op.Done will return true.
2141 // If Poll succeeds and the operation has completed successfully,
2142 // op.Done will return true, and the response of the operation is returned.
2143 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2144 func (op *UpdateMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error) {
2145 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2146 var resp networkservicespb.Mesh
2147 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2148 return nil, err
2149 }
2150 if !op.Done() {
2151 return nil, nil
2152 }
2153 return &resp, nil
2154 }
2155
2156 // Metadata returns metadata associated with the long-running operation.
2157 // Metadata itself does not contact the server, but Poll does.
2158 // To get the latest metadata, call this method after a successful call to Poll.
2159 // If the metadata is not available, the returned metadata and error are both nil.
2160 func (op *UpdateMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2161 var meta networkservicespb.OperationMetadata
2162 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2163 return nil, nil
2164 } else if err != nil {
2165 return nil, err
2166 }
2167 return &meta, nil
2168 }
2169
2170 // Done reports whether the long-running operation has completed.
2171 func (op *UpdateMeshOperation) Done() bool {
2172 return op.lro.Done()
2173 }
2174
2175 // Name returns the name of the long-running operation.
2176 // The name is assigned by the server and is unique within the service from which the operation is created.
2177 func (op *UpdateMeshOperation) Name() string {
2178 return op.lro.Name()
2179 }
2180
2181 // UpdateServiceBindingOperation manages a long-running operation from UpdateServiceBinding.
2182 type UpdateServiceBindingOperation struct {
2183 lro *longrunning.Operation
2184 pollPath string
2185 }
2186
2187 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2188 //
2189 // See documentation of Poll for error-handling information.
2190 func (op *UpdateServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) {
2191 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2192 var resp networkservicespb.ServiceBinding
2193 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2194 return nil, err
2195 }
2196 return &resp, nil
2197 }
2198
2199 // Poll fetches the latest state of the long-running operation.
2200 //
2201 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2202 //
2203 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2204 // the operation has completed with failure, the error is returned and op.Done will return true.
2205 // If Poll succeeds and the operation has completed successfully,
2206 // op.Done will return true, and the response of the operation is returned.
2207 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2208 func (op *UpdateServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error) {
2209 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2210 var resp networkservicespb.ServiceBinding
2211 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2212 return nil, err
2213 }
2214 if !op.Done() {
2215 return nil, nil
2216 }
2217 return &resp, nil
2218 }
2219
2220 // Metadata returns metadata associated with the long-running operation.
2221 // Metadata itself does not contact the server, but Poll does.
2222 // To get the latest metadata, call this method after a successful call to Poll.
2223 // If the metadata is not available, the returned metadata and error are both nil.
2224 func (op *UpdateServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2225 var meta networkservicespb.OperationMetadata
2226 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2227 return nil, nil
2228 } else if err != nil {
2229 return nil, err
2230 }
2231 return &meta, nil
2232 }
2233
2234 // Done reports whether the long-running operation has completed.
2235 func (op *UpdateServiceBindingOperation) Done() bool {
2236 return op.lro.Done()
2237 }
2238
2239 // Name returns the name of the long-running operation.
2240 // The name is assigned by the server and is unique within the service from which the operation is created.
2241 func (op *UpdateServiceBindingOperation) Name() string {
2242 return op.lro.Name()
2243 }
2244
2245 // UpdateServiceLbPolicyOperation manages a long-running operation from UpdateServiceLbPolicy.
2246 type UpdateServiceLbPolicyOperation struct {
2247 lro *longrunning.Operation
2248 pollPath string
2249 }
2250
2251 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2252 //
2253 // See documentation of Poll for error-handling information.
2254 func (op *UpdateServiceLbPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) {
2255 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2256 var resp networkservicespb.ServiceLbPolicy
2257 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2258 return nil, err
2259 }
2260 return &resp, nil
2261 }
2262
2263 // Poll fetches the latest state of the long-running operation.
2264 //
2265 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2266 //
2267 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2268 // the operation has completed with failure, the error is returned and op.Done will return true.
2269 // If Poll succeeds and the operation has completed successfully,
2270 // op.Done will return true, and the response of the operation is returned.
2271 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2272 func (op *UpdateServiceLbPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceLbPolicy, error) {
2273 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2274 var resp networkservicespb.ServiceLbPolicy
2275 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2276 return nil, err
2277 }
2278 if !op.Done() {
2279 return nil, nil
2280 }
2281 return &resp, nil
2282 }
2283
2284 // Metadata returns metadata associated with the long-running operation.
2285 // Metadata itself does not contact the server, but Poll does.
2286 // To get the latest metadata, call this method after a successful call to Poll.
2287 // If the metadata is not available, the returned metadata and error are both nil.
2288 func (op *UpdateServiceLbPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2289 var meta networkservicespb.OperationMetadata
2290 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2291 return nil, nil
2292 } else if err != nil {
2293 return nil, err
2294 }
2295 return &meta, nil
2296 }
2297
2298 // Done reports whether the long-running operation has completed.
2299 func (op *UpdateServiceLbPolicyOperation) Done() bool {
2300 return op.lro.Done()
2301 }
2302
2303 // Name returns the name of the long-running operation.
2304 // The name is assigned by the server and is unique within the service from which the operation is created.
2305 func (op *UpdateServiceLbPolicyOperation) Name() string {
2306 return op.lro.Name()
2307 }
2308
2309 // UpdateTcpRouteOperation manages a long-running operation from UpdateTcpRoute.
2310 type UpdateTcpRouteOperation struct {
2311 lro *longrunning.Operation
2312 pollPath string
2313 }
2314
2315 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2316 //
2317 // See documentation of Poll for error-handling information.
2318 func (op *UpdateTcpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) {
2319 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2320 var resp networkservicespb.TcpRoute
2321 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2322 return nil, err
2323 }
2324 return &resp, nil
2325 }
2326
2327 // Poll fetches the latest state of the long-running operation.
2328 //
2329 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2330 //
2331 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2332 // the operation has completed with failure, the error is returned and op.Done will return true.
2333 // If Poll succeeds and the operation has completed successfully,
2334 // op.Done will return true, and the response of the operation is returned.
2335 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2336 func (op *UpdateTcpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error) {
2337 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2338 var resp networkservicespb.TcpRoute
2339 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2340 return nil, err
2341 }
2342 if !op.Done() {
2343 return nil, nil
2344 }
2345 return &resp, nil
2346 }
2347
2348 // Metadata returns metadata associated with the long-running operation.
2349 // Metadata itself does not contact the server, but Poll does.
2350 // To get the latest metadata, call this method after a successful call to Poll.
2351 // If the metadata is not available, the returned metadata and error are both nil.
2352 func (op *UpdateTcpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2353 var meta networkservicespb.OperationMetadata
2354 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2355 return nil, nil
2356 } else if err != nil {
2357 return nil, err
2358 }
2359 return &meta, nil
2360 }
2361
2362 // Done reports whether the long-running operation has completed.
2363 func (op *UpdateTcpRouteOperation) Done() bool {
2364 return op.lro.Done()
2365 }
2366
2367 // Name returns the name of the long-running operation.
2368 // The name is assigned by the server and is unique within the service from which the operation is created.
2369 func (op *UpdateTcpRouteOperation) Name() string {
2370 return op.lro.Name()
2371 }
2372
2373 // UpdateTlsRouteOperation manages a long-running operation from UpdateTlsRoute.
2374 type UpdateTlsRouteOperation struct {
2375 lro *longrunning.Operation
2376 pollPath string
2377 }
2378
2379 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2380 //
2381 // See documentation of Poll for error-handling information.
2382 func (op *UpdateTlsRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) {
2383 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2384 var resp networkservicespb.TlsRoute
2385 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2386 return nil, err
2387 }
2388 return &resp, nil
2389 }
2390
2391 // Poll fetches the latest state of the long-running operation.
2392 //
2393 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2394 //
2395 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2396 // the operation has completed with failure, the error is returned and op.Done will return true.
2397 // If Poll succeeds and the operation has completed successfully,
2398 // op.Done will return true, and the response of the operation is returned.
2399 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2400 func (op *UpdateTlsRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error) {
2401 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2402 var resp networkservicespb.TlsRoute
2403 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2404 return nil, err
2405 }
2406 if !op.Done() {
2407 return nil, nil
2408 }
2409 return &resp, nil
2410 }
2411
2412 // Metadata returns metadata associated with the long-running operation.
2413 // Metadata itself does not contact the server, but Poll does.
2414 // To get the latest metadata, call this method after a successful call to Poll.
2415 // If the metadata is not available, the returned metadata and error are both nil.
2416 func (op *UpdateTlsRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2417 var meta networkservicespb.OperationMetadata
2418 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2419 return nil, nil
2420 } else if err != nil {
2421 return nil, err
2422 }
2423 return &meta, nil
2424 }
2425
2426 // Done reports whether the long-running operation has completed.
2427 func (op *UpdateTlsRouteOperation) Done() bool {
2428 return op.lro.Done()
2429 }
2430
2431 // Name returns the name of the long-running operation.
2432 // The name is assigned by the server and is unique within the service from which the operation is created.
2433 func (op *UpdateTlsRouteOperation) Name() string {
2434 return op.lro.Name()
2435 }
2436
2437 // UpdateWasmPluginOperation manages a long-running operation from UpdateWasmPlugin.
2438 type UpdateWasmPluginOperation struct {
2439 lro *longrunning.Operation
2440 pollPath string
2441 }
2442
2443 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
2444 //
2445 // See documentation of Poll for error-handling information.
2446 func (op *UpdateWasmPluginOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) {
2447 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2448 var resp networkservicespb.WasmPlugin
2449 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
2450 return nil, err
2451 }
2452 return &resp, nil
2453 }
2454
2455 // Poll fetches the latest state of the long-running operation.
2456 //
2457 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
2458 //
2459 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
2460 // the operation has completed with failure, the error is returned and op.Done will return true.
2461 // If Poll succeeds and the operation has completed successfully,
2462 // op.Done will return true, and the response of the operation is returned.
2463 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
2464 func (op *UpdateWasmPluginOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.WasmPlugin, error) {
2465 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
2466 var resp networkservicespb.WasmPlugin
2467 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
2468 return nil, err
2469 }
2470 if !op.Done() {
2471 return nil, nil
2472 }
2473 return &resp, nil
2474 }
2475
2476 // Metadata returns metadata associated with the long-running operation.
2477 // Metadata itself does not contact the server, but Poll does.
2478 // To get the latest metadata, call this method after a successful call to Poll.
2479 // If the metadata is not available, the returned metadata and error are both nil.
2480 func (op *UpdateWasmPluginOperation) Metadata() (*networkservicespb.OperationMetadata, error) {
2481 var meta networkservicespb.OperationMetadata
2482 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
2483 return nil, nil
2484 } else if err != nil {
2485 return nil, err
2486 }
2487 return &meta, nil
2488 }
2489
2490 // Done reports whether the long-running operation has completed.
2491 func (op *UpdateWasmPluginOperation) Done() bool {
2492 return op.lro.Done()
2493 }
2494
2495 // Name returns the name of the long-running operation.
2496 // The name is assigned by the server and is unique within the service from which the operation is created.
2497 func (op *UpdateWasmPluginOperation) Name() string {
2498 return op.lro.Name()
2499 }
2500
2501 // AuthzExtensionIterator manages a stream of *networkservicespb.AuthzExtension.
2502 type AuthzExtensionIterator struct {
2503 items []*networkservicespb.AuthzExtension
2504 pageInfo *iterator.PageInfo
2505 nextFunc func() error
2506
2507 // Response is the raw response for the current page.
2508 // It must be cast to the RPC response type.
2509 // Calling Next() or InternalFetch() updates this value.
2510 Response interface{}
2511
2512 // InternalFetch is for use by the Google Cloud Libraries only.
2513 // It is not part of the stable interface of this package.
2514 //
2515 // InternalFetch returns results from a single call to the underlying RPC.
2516 // The number of results is no greater than pageSize.
2517 // If there are no more results, nextPageToken is empty and err is nil.
2518 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.AuthzExtension, nextPageToken string, err error)
2519 }
2520
2521 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2522 func (it *AuthzExtensionIterator) PageInfo() *iterator.PageInfo {
2523 return it.pageInfo
2524 }
2525
2526 // Next returns the next result. Its second return value is iterator.Done if there are no more
2527 // results. Once Next returns Done, all subsequent calls will return Done.
2528 func (it *AuthzExtensionIterator) Next() (*networkservicespb.AuthzExtension, error) {
2529 var item *networkservicespb.AuthzExtension
2530 if err := it.nextFunc(); err != nil {
2531 return item, err
2532 }
2533 item = it.items[0]
2534 it.items = it.items[1:]
2535 return item, nil
2536 }
2537
2538 func (it *AuthzExtensionIterator) bufLen() int {
2539 return len(it.items)
2540 }
2541
2542 func (it *AuthzExtensionIterator) takeBuf() interface{} {
2543 b := it.items
2544 it.items = nil
2545 return b
2546 }
2547
2548 // EndpointPolicyIterator manages a stream of *networkservicespb.EndpointPolicy.
2549 type EndpointPolicyIterator struct {
2550 items []*networkservicespb.EndpointPolicy
2551 pageInfo *iterator.PageInfo
2552 nextFunc func() error
2553
2554 // Response is the raw response for the current page.
2555 // It must be cast to the RPC response type.
2556 // Calling Next() or InternalFetch() updates this value.
2557 Response interface{}
2558
2559 // InternalFetch is for use by the Google Cloud Libraries only.
2560 // It is not part of the stable interface of this package.
2561 //
2562 // InternalFetch returns results from a single call to the underlying RPC.
2563 // The number of results is no greater than pageSize.
2564 // If there are no more results, nextPageToken is empty and err is nil.
2565 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.EndpointPolicy, nextPageToken string, err error)
2566 }
2567
2568 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2569 func (it *EndpointPolicyIterator) PageInfo() *iterator.PageInfo {
2570 return it.pageInfo
2571 }
2572
2573 // Next returns the next result. Its second return value is iterator.Done if there are no more
2574 // results. Once Next returns Done, all subsequent calls will return Done.
2575 func (it *EndpointPolicyIterator) Next() (*networkservicespb.EndpointPolicy, error) {
2576 var item *networkservicespb.EndpointPolicy
2577 if err := it.nextFunc(); err != nil {
2578 return item, err
2579 }
2580 item = it.items[0]
2581 it.items = it.items[1:]
2582 return item, nil
2583 }
2584
2585 func (it *EndpointPolicyIterator) bufLen() int {
2586 return len(it.items)
2587 }
2588
2589 func (it *EndpointPolicyIterator) takeBuf() interface{} {
2590 b := it.items
2591 it.items = nil
2592 return b
2593 }
2594
2595 // GatewayIterator manages a stream of *networkservicespb.Gateway.
2596 type GatewayIterator struct {
2597 items []*networkservicespb.Gateway
2598 pageInfo *iterator.PageInfo
2599 nextFunc func() error
2600
2601 // Response is the raw response for the current page.
2602 // It must be cast to the RPC response type.
2603 // Calling Next() or InternalFetch() updates this value.
2604 Response interface{}
2605
2606 // InternalFetch is for use by the Google Cloud Libraries only.
2607 // It is not part of the stable interface of this package.
2608 //
2609 // InternalFetch returns results from a single call to the underlying RPC.
2610 // The number of results is no greater than pageSize.
2611 // If there are no more results, nextPageToken is empty and err is nil.
2612 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.Gateway, nextPageToken string, err error)
2613 }
2614
2615 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2616 func (it *GatewayIterator) PageInfo() *iterator.PageInfo {
2617 return it.pageInfo
2618 }
2619
2620 // Next returns the next result. Its second return value is iterator.Done if there are no more
2621 // results. Once Next returns Done, all subsequent calls will return Done.
2622 func (it *GatewayIterator) Next() (*networkservicespb.Gateway, error) {
2623 var item *networkservicespb.Gateway
2624 if err := it.nextFunc(); err != nil {
2625 return item, err
2626 }
2627 item = it.items[0]
2628 it.items = it.items[1:]
2629 return item, nil
2630 }
2631
2632 func (it *GatewayIterator) bufLen() int {
2633 return len(it.items)
2634 }
2635
2636 func (it *GatewayIterator) takeBuf() interface{} {
2637 b := it.items
2638 it.items = nil
2639 return b
2640 }
2641
2642 // GatewayRouteViewIterator manages a stream of *networkservicespb.GatewayRouteView.
2643 type GatewayRouteViewIterator struct {
2644 items []*networkservicespb.GatewayRouteView
2645 pageInfo *iterator.PageInfo
2646 nextFunc func() error
2647
2648 // Response is the raw response for the current page.
2649 // It must be cast to the RPC response type.
2650 // Calling Next() or InternalFetch() updates this value.
2651 Response interface{}
2652
2653 // InternalFetch is for use by the Google Cloud Libraries only.
2654 // It is not part of the stable interface of this package.
2655 //
2656 // InternalFetch returns results from a single call to the underlying RPC.
2657 // The number of results is no greater than pageSize.
2658 // If there are no more results, nextPageToken is empty and err is nil.
2659 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.GatewayRouteView, nextPageToken string, err error)
2660 }
2661
2662 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2663 func (it *GatewayRouteViewIterator) PageInfo() *iterator.PageInfo {
2664 return it.pageInfo
2665 }
2666
2667 // Next returns the next result. Its second return value is iterator.Done if there are no more
2668 // results. Once Next returns Done, all subsequent calls will return Done.
2669 func (it *GatewayRouteViewIterator) Next() (*networkservicespb.GatewayRouteView, error) {
2670 var item *networkservicespb.GatewayRouteView
2671 if err := it.nextFunc(); err != nil {
2672 return item, err
2673 }
2674 item = it.items[0]
2675 it.items = it.items[1:]
2676 return item, nil
2677 }
2678
2679 func (it *GatewayRouteViewIterator) bufLen() int {
2680 return len(it.items)
2681 }
2682
2683 func (it *GatewayRouteViewIterator) takeBuf() interface{} {
2684 b := it.items
2685 it.items = nil
2686 return b
2687 }
2688
2689 // GrpcRouteIterator manages a stream of *networkservicespb.GrpcRoute.
2690 type GrpcRouteIterator struct {
2691 items []*networkservicespb.GrpcRoute
2692 pageInfo *iterator.PageInfo
2693 nextFunc func() error
2694
2695 // Response is the raw response for the current page.
2696 // It must be cast to the RPC response type.
2697 // Calling Next() or InternalFetch() updates this value.
2698 Response interface{}
2699
2700 // InternalFetch is for use by the Google Cloud Libraries only.
2701 // It is not part of the stable interface of this package.
2702 //
2703 // InternalFetch returns results from a single call to the underlying RPC.
2704 // The number of results is no greater than pageSize.
2705 // If there are no more results, nextPageToken is empty and err is nil.
2706 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.GrpcRoute, nextPageToken string, err error)
2707 }
2708
2709 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2710 func (it *GrpcRouteIterator) PageInfo() *iterator.PageInfo {
2711 return it.pageInfo
2712 }
2713
2714 // Next returns the next result. Its second return value is iterator.Done if there are no more
2715 // results. Once Next returns Done, all subsequent calls will return Done.
2716 func (it *GrpcRouteIterator) Next() (*networkservicespb.GrpcRoute, error) {
2717 var item *networkservicespb.GrpcRoute
2718 if err := it.nextFunc(); err != nil {
2719 return item, err
2720 }
2721 item = it.items[0]
2722 it.items = it.items[1:]
2723 return item, nil
2724 }
2725
2726 func (it *GrpcRouteIterator) bufLen() int {
2727 return len(it.items)
2728 }
2729
2730 func (it *GrpcRouteIterator) takeBuf() interface{} {
2731 b := it.items
2732 it.items = nil
2733 return b
2734 }
2735
2736 // HttpRouteIterator manages a stream of *networkservicespb.HttpRoute.
2737 type HttpRouteIterator struct {
2738 items []*networkservicespb.HttpRoute
2739 pageInfo *iterator.PageInfo
2740 nextFunc func() error
2741
2742 // Response is the raw response for the current page.
2743 // It must be cast to the RPC response type.
2744 // Calling Next() or InternalFetch() updates this value.
2745 Response interface{}
2746
2747 // InternalFetch is for use by the Google Cloud Libraries only.
2748 // It is not part of the stable interface of this package.
2749 //
2750 // InternalFetch returns results from a single call to the underlying RPC.
2751 // The number of results is no greater than pageSize.
2752 // If there are no more results, nextPageToken is empty and err is nil.
2753 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.HttpRoute, nextPageToken string, err error)
2754 }
2755
2756 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2757 func (it *HttpRouteIterator) PageInfo() *iterator.PageInfo {
2758 return it.pageInfo
2759 }
2760
2761 // Next returns the next result. Its second return value is iterator.Done if there are no more
2762 // results. Once Next returns Done, all subsequent calls will return Done.
2763 func (it *HttpRouteIterator) Next() (*networkservicespb.HttpRoute, error) {
2764 var item *networkservicespb.HttpRoute
2765 if err := it.nextFunc(); err != nil {
2766 return item, err
2767 }
2768 item = it.items[0]
2769 it.items = it.items[1:]
2770 return item, nil
2771 }
2772
2773 func (it *HttpRouteIterator) bufLen() int {
2774 return len(it.items)
2775 }
2776
2777 func (it *HttpRouteIterator) takeBuf() interface{} {
2778 b := it.items
2779 it.items = nil
2780 return b
2781 }
2782
2783 // LbRouteExtensionIterator manages a stream of *networkservicespb.LbRouteExtension.
2784 type LbRouteExtensionIterator struct {
2785 items []*networkservicespb.LbRouteExtension
2786 pageInfo *iterator.PageInfo
2787 nextFunc func() error
2788
2789 // Response is the raw response for the current page.
2790 // It must be cast to the RPC response type.
2791 // Calling Next() or InternalFetch() updates this value.
2792 Response interface{}
2793
2794 // InternalFetch is for use by the Google Cloud Libraries only.
2795 // It is not part of the stable interface of this package.
2796 //
2797 // InternalFetch returns results from a single call to the underlying RPC.
2798 // The number of results is no greater than pageSize.
2799 // If there are no more results, nextPageToken is empty and err is nil.
2800 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.LbRouteExtension, nextPageToken string, err error)
2801 }
2802
2803 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2804 func (it *LbRouteExtensionIterator) PageInfo() *iterator.PageInfo {
2805 return it.pageInfo
2806 }
2807
2808 // Next returns the next result. Its second return value is iterator.Done if there are no more
2809 // results. Once Next returns Done, all subsequent calls will return Done.
2810 func (it *LbRouteExtensionIterator) Next() (*networkservicespb.LbRouteExtension, error) {
2811 var item *networkservicespb.LbRouteExtension
2812 if err := it.nextFunc(); err != nil {
2813 return item, err
2814 }
2815 item = it.items[0]
2816 it.items = it.items[1:]
2817 return item, nil
2818 }
2819
2820 func (it *LbRouteExtensionIterator) bufLen() int {
2821 return len(it.items)
2822 }
2823
2824 func (it *LbRouteExtensionIterator) takeBuf() interface{} {
2825 b := it.items
2826 it.items = nil
2827 return b
2828 }
2829
2830 // LbTrafficExtensionIterator manages a stream of *networkservicespb.LbTrafficExtension.
2831 type LbTrafficExtensionIterator struct {
2832 items []*networkservicespb.LbTrafficExtension
2833 pageInfo *iterator.PageInfo
2834 nextFunc func() error
2835
2836 // Response is the raw response for the current page.
2837 // It must be cast to the RPC response type.
2838 // Calling Next() or InternalFetch() updates this value.
2839 Response interface{}
2840
2841 // InternalFetch is for use by the Google Cloud Libraries only.
2842 // It is not part of the stable interface of this package.
2843 //
2844 // InternalFetch returns results from a single call to the underlying RPC.
2845 // The number of results is no greater than pageSize.
2846 // If there are no more results, nextPageToken is empty and err is nil.
2847 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.LbTrafficExtension, nextPageToken string, err error)
2848 }
2849
2850 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2851 func (it *LbTrafficExtensionIterator) PageInfo() *iterator.PageInfo {
2852 return it.pageInfo
2853 }
2854
2855 // Next returns the next result. Its second return value is iterator.Done if there are no more
2856 // results. Once Next returns Done, all subsequent calls will return Done.
2857 func (it *LbTrafficExtensionIterator) Next() (*networkservicespb.LbTrafficExtension, error) {
2858 var item *networkservicespb.LbTrafficExtension
2859 if err := it.nextFunc(); err != nil {
2860 return item, err
2861 }
2862 item = it.items[0]
2863 it.items = it.items[1:]
2864 return item, nil
2865 }
2866
2867 func (it *LbTrafficExtensionIterator) bufLen() int {
2868 return len(it.items)
2869 }
2870
2871 func (it *LbTrafficExtensionIterator) takeBuf() interface{} {
2872 b := it.items
2873 it.items = nil
2874 return b
2875 }
2876
2877 // LocationIterator manages a stream of *locationpb.Location.
2878 type LocationIterator struct {
2879 items []*locationpb.Location
2880 pageInfo *iterator.PageInfo
2881 nextFunc func() error
2882
2883 // Response is the raw response for the current page.
2884 // It must be cast to the RPC response type.
2885 // Calling Next() or InternalFetch() updates this value.
2886 Response interface{}
2887
2888 // InternalFetch is for use by the Google Cloud Libraries only.
2889 // It is not part of the stable interface of this package.
2890 //
2891 // InternalFetch returns results from a single call to the underlying RPC.
2892 // The number of results is no greater than pageSize.
2893 // If there are no more results, nextPageToken is empty and err is nil.
2894 InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
2895 }
2896
2897 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2898 func (it *LocationIterator) PageInfo() *iterator.PageInfo {
2899 return it.pageInfo
2900 }
2901
2902 // Next returns the next result. Its second return value is iterator.Done if there are no more
2903 // results. Once Next returns Done, all subsequent calls will return Done.
2904 func (it *LocationIterator) Next() (*locationpb.Location, error) {
2905 var item *locationpb.Location
2906 if err := it.nextFunc(); err != nil {
2907 return item, err
2908 }
2909 item = it.items[0]
2910 it.items = it.items[1:]
2911 return item, nil
2912 }
2913
2914 func (it *LocationIterator) bufLen() int {
2915 return len(it.items)
2916 }
2917
2918 func (it *LocationIterator) takeBuf() interface{} {
2919 b := it.items
2920 it.items = nil
2921 return b
2922 }
2923
2924 // MeshIterator manages a stream of *networkservicespb.Mesh.
2925 type MeshIterator struct {
2926 items []*networkservicespb.Mesh
2927 pageInfo *iterator.PageInfo
2928 nextFunc func() error
2929
2930 // Response is the raw response for the current page.
2931 // It must be cast to the RPC response type.
2932 // Calling Next() or InternalFetch() updates this value.
2933 Response interface{}
2934
2935 // InternalFetch is for use by the Google Cloud Libraries only.
2936 // It is not part of the stable interface of this package.
2937 //
2938 // InternalFetch returns results from a single call to the underlying RPC.
2939 // The number of results is no greater than pageSize.
2940 // If there are no more results, nextPageToken is empty and err is nil.
2941 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.Mesh, nextPageToken string, err error)
2942 }
2943
2944 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2945 func (it *MeshIterator) PageInfo() *iterator.PageInfo {
2946 return it.pageInfo
2947 }
2948
2949 // Next returns the next result. Its second return value is iterator.Done if there are no more
2950 // results. Once Next returns Done, all subsequent calls will return Done.
2951 func (it *MeshIterator) Next() (*networkservicespb.Mesh, error) {
2952 var item *networkservicespb.Mesh
2953 if err := it.nextFunc(); err != nil {
2954 return item, err
2955 }
2956 item = it.items[0]
2957 it.items = it.items[1:]
2958 return item, nil
2959 }
2960
2961 func (it *MeshIterator) bufLen() int {
2962 return len(it.items)
2963 }
2964
2965 func (it *MeshIterator) takeBuf() interface{} {
2966 b := it.items
2967 it.items = nil
2968 return b
2969 }
2970
2971 // MeshRouteViewIterator manages a stream of *networkservicespb.MeshRouteView.
2972 type MeshRouteViewIterator struct {
2973 items []*networkservicespb.MeshRouteView
2974 pageInfo *iterator.PageInfo
2975 nextFunc func() error
2976
2977 // Response is the raw response for the current page.
2978 // It must be cast to the RPC response type.
2979 // Calling Next() or InternalFetch() updates this value.
2980 Response interface{}
2981
2982 // InternalFetch is for use by the Google Cloud Libraries only.
2983 // It is not part of the stable interface of this package.
2984 //
2985 // InternalFetch returns results from a single call to the underlying RPC.
2986 // The number of results is no greater than pageSize.
2987 // If there are no more results, nextPageToken is empty and err is nil.
2988 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.MeshRouteView, nextPageToken string, err error)
2989 }
2990
2991 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
2992 func (it *MeshRouteViewIterator) PageInfo() *iterator.PageInfo {
2993 return it.pageInfo
2994 }
2995
2996 // Next returns the next result. Its second return value is iterator.Done if there are no more
2997 // results. Once Next returns Done, all subsequent calls will return Done.
2998 func (it *MeshRouteViewIterator) Next() (*networkservicespb.MeshRouteView, error) {
2999 var item *networkservicespb.MeshRouteView
3000 if err := it.nextFunc(); err != nil {
3001 return item, err
3002 }
3003 item = it.items[0]
3004 it.items = it.items[1:]
3005 return item, nil
3006 }
3007
3008 func (it *MeshRouteViewIterator) bufLen() int {
3009 return len(it.items)
3010 }
3011
3012 func (it *MeshRouteViewIterator) takeBuf() interface{} {
3013 b := it.items
3014 it.items = nil
3015 return b
3016 }
3017
3018 // OperationIterator manages a stream of *longrunningpb.Operation.
3019 type OperationIterator struct {
3020 items []*longrunningpb.Operation
3021 pageInfo *iterator.PageInfo
3022 nextFunc func() error
3023
3024 // Response is the raw response for the current page.
3025 // It must be cast to the RPC response type.
3026 // Calling Next() or InternalFetch() updates this value.
3027 Response interface{}
3028
3029 // InternalFetch is for use by the Google Cloud Libraries only.
3030 // It is not part of the stable interface of this package.
3031 //
3032 // InternalFetch returns results from a single call to the underlying RPC.
3033 // The number of results is no greater than pageSize.
3034 // If there are no more results, nextPageToken is empty and err is nil.
3035 InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
3036 }
3037
3038 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3039 func (it *OperationIterator) PageInfo() *iterator.PageInfo {
3040 return it.pageInfo
3041 }
3042
3043 // Next returns the next result. Its second return value is iterator.Done if there are no more
3044 // results. Once Next returns Done, all subsequent calls will return Done.
3045 func (it *OperationIterator) Next() (*longrunningpb.Operation, error) {
3046 var item *longrunningpb.Operation
3047 if err := it.nextFunc(); err != nil {
3048 return item, err
3049 }
3050 item = it.items[0]
3051 it.items = it.items[1:]
3052 return item, nil
3053 }
3054
3055 func (it *OperationIterator) bufLen() int {
3056 return len(it.items)
3057 }
3058
3059 func (it *OperationIterator) takeBuf() interface{} {
3060 b := it.items
3061 it.items = nil
3062 return b
3063 }
3064
3065 // ServiceBindingIterator manages a stream of *networkservicespb.ServiceBinding.
3066 type ServiceBindingIterator struct {
3067 items []*networkservicespb.ServiceBinding
3068 pageInfo *iterator.PageInfo
3069 nextFunc func() error
3070
3071 // Response is the raw response for the current page.
3072 // It must be cast to the RPC response type.
3073 // Calling Next() or InternalFetch() updates this value.
3074 Response interface{}
3075
3076 // InternalFetch is for use by the Google Cloud Libraries only.
3077 // It is not part of the stable interface of this package.
3078 //
3079 // InternalFetch returns results from a single call to the underlying RPC.
3080 // The number of results is no greater than pageSize.
3081 // If there are no more results, nextPageToken is empty and err is nil.
3082 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.ServiceBinding, nextPageToken string, err error)
3083 }
3084
3085 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3086 func (it *ServiceBindingIterator) PageInfo() *iterator.PageInfo {
3087 return it.pageInfo
3088 }
3089
3090 // Next returns the next result. Its second return value is iterator.Done if there are no more
3091 // results. Once Next returns Done, all subsequent calls will return Done.
3092 func (it *ServiceBindingIterator) Next() (*networkservicespb.ServiceBinding, error) {
3093 var item *networkservicespb.ServiceBinding
3094 if err := it.nextFunc(); err != nil {
3095 return item, err
3096 }
3097 item = it.items[0]
3098 it.items = it.items[1:]
3099 return item, nil
3100 }
3101
3102 func (it *ServiceBindingIterator) bufLen() int {
3103 return len(it.items)
3104 }
3105
3106 func (it *ServiceBindingIterator) takeBuf() interface{} {
3107 b := it.items
3108 it.items = nil
3109 return b
3110 }
3111
3112 // ServiceLbPolicyIterator manages a stream of *networkservicespb.ServiceLbPolicy.
3113 type ServiceLbPolicyIterator struct {
3114 items []*networkservicespb.ServiceLbPolicy
3115 pageInfo *iterator.PageInfo
3116 nextFunc func() error
3117
3118 // Response is the raw response for the current page.
3119 // It must be cast to the RPC response type.
3120 // Calling Next() or InternalFetch() updates this value.
3121 Response interface{}
3122
3123 // InternalFetch is for use by the Google Cloud Libraries only.
3124 // It is not part of the stable interface of this package.
3125 //
3126 // InternalFetch returns results from a single call to the underlying RPC.
3127 // The number of results is no greater than pageSize.
3128 // If there are no more results, nextPageToken is empty and err is nil.
3129 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.ServiceLbPolicy, nextPageToken string, err error)
3130 }
3131
3132 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3133 func (it *ServiceLbPolicyIterator) PageInfo() *iterator.PageInfo {
3134 return it.pageInfo
3135 }
3136
3137 // Next returns the next result. Its second return value is iterator.Done if there are no more
3138 // results. Once Next returns Done, all subsequent calls will return Done.
3139 func (it *ServiceLbPolicyIterator) Next() (*networkservicespb.ServiceLbPolicy, error) {
3140 var item *networkservicespb.ServiceLbPolicy
3141 if err := it.nextFunc(); err != nil {
3142 return item, err
3143 }
3144 item = it.items[0]
3145 it.items = it.items[1:]
3146 return item, nil
3147 }
3148
3149 func (it *ServiceLbPolicyIterator) bufLen() int {
3150 return len(it.items)
3151 }
3152
3153 func (it *ServiceLbPolicyIterator) takeBuf() interface{} {
3154 b := it.items
3155 it.items = nil
3156 return b
3157 }
3158
3159 // TcpRouteIterator manages a stream of *networkservicespb.TcpRoute.
3160 type TcpRouteIterator struct {
3161 items []*networkservicespb.TcpRoute
3162 pageInfo *iterator.PageInfo
3163 nextFunc func() error
3164
3165 // Response is the raw response for the current page.
3166 // It must be cast to the RPC response type.
3167 // Calling Next() or InternalFetch() updates this value.
3168 Response interface{}
3169
3170 // InternalFetch is for use by the Google Cloud Libraries only.
3171 // It is not part of the stable interface of this package.
3172 //
3173 // InternalFetch returns results from a single call to the underlying RPC.
3174 // The number of results is no greater than pageSize.
3175 // If there are no more results, nextPageToken is empty and err is nil.
3176 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.TcpRoute, nextPageToken string, err error)
3177 }
3178
3179 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3180 func (it *TcpRouteIterator) PageInfo() *iterator.PageInfo {
3181 return it.pageInfo
3182 }
3183
3184 // Next returns the next result. Its second return value is iterator.Done if there are no more
3185 // results. Once Next returns Done, all subsequent calls will return Done.
3186 func (it *TcpRouteIterator) Next() (*networkservicespb.TcpRoute, error) {
3187 var item *networkservicespb.TcpRoute
3188 if err := it.nextFunc(); err != nil {
3189 return item, err
3190 }
3191 item = it.items[0]
3192 it.items = it.items[1:]
3193 return item, nil
3194 }
3195
3196 func (it *TcpRouteIterator) bufLen() int {
3197 return len(it.items)
3198 }
3199
3200 func (it *TcpRouteIterator) takeBuf() interface{} {
3201 b := it.items
3202 it.items = nil
3203 return b
3204 }
3205
3206 // TlsRouteIterator manages a stream of *networkservicespb.TlsRoute.
3207 type TlsRouteIterator struct {
3208 items []*networkservicespb.TlsRoute
3209 pageInfo *iterator.PageInfo
3210 nextFunc func() error
3211
3212 // Response is the raw response for the current page.
3213 // It must be cast to the RPC response type.
3214 // Calling Next() or InternalFetch() updates this value.
3215 Response interface{}
3216
3217 // InternalFetch is for use by the Google Cloud Libraries only.
3218 // It is not part of the stable interface of this package.
3219 //
3220 // InternalFetch returns results from a single call to the underlying RPC.
3221 // The number of results is no greater than pageSize.
3222 // If there are no more results, nextPageToken is empty and err is nil.
3223 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.TlsRoute, nextPageToken string, err error)
3224 }
3225
3226 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3227 func (it *TlsRouteIterator) PageInfo() *iterator.PageInfo {
3228 return it.pageInfo
3229 }
3230
3231 // Next returns the next result. Its second return value is iterator.Done if there are no more
3232 // results. Once Next returns Done, all subsequent calls will return Done.
3233 func (it *TlsRouteIterator) Next() (*networkservicespb.TlsRoute, error) {
3234 var item *networkservicespb.TlsRoute
3235 if err := it.nextFunc(); err != nil {
3236 return item, err
3237 }
3238 item = it.items[0]
3239 it.items = it.items[1:]
3240 return item, nil
3241 }
3242
3243 func (it *TlsRouteIterator) bufLen() int {
3244 return len(it.items)
3245 }
3246
3247 func (it *TlsRouteIterator) takeBuf() interface{} {
3248 b := it.items
3249 it.items = nil
3250 return b
3251 }
3252
3253 // WasmPluginIterator manages a stream of *networkservicespb.WasmPlugin.
3254 type WasmPluginIterator struct {
3255 items []*networkservicespb.WasmPlugin
3256 pageInfo *iterator.PageInfo
3257 nextFunc func() error
3258
3259 // Response is the raw response for the current page.
3260 // It must be cast to the RPC response type.
3261 // Calling Next() or InternalFetch() updates this value.
3262 Response interface{}
3263
3264 // InternalFetch is for use by the Google Cloud Libraries only.
3265 // It is not part of the stable interface of this package.
3266 //
3267 // InternalFetch returns results from a single call to the underlying RPC.
3268 // The number of results is no greater than pageSize.
3269 // If there are no more results, nextPageToken is empty and err is nil.
3270 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.WasmPlugin, nextPageToken string, err error)
3271 }
3272
3273 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3274 func (it *WasmPluginIterator) PageInfo() *iterator.PageInfo {
3275 return it.pageInfo
3276 }
3277
3278 // Next returns the next result. Its second return value is iterator.Done if there are no more
3279 // results. Once Next returns Done, all subsequent calls will return Done.
3280 func (it *WasmPluginIterator) Next() (*networkservicespb.WasmPlugin, error) {
3281 var item *networkservicespb.WasmPlugin
3282 if err := it.nextFunc(); err != nil {
3283 return item, err
3284 }
3285 item = it.items[0]
3286 it.items = it.items[1:]
3287 return item, nil
3288 }
3289
3290 func (it *WasmPluginIterator) bufLen() int {
3291 return len(it.items)
3292 }
3293
3294 func (it *WasmPluginIterator) takeBuf() interface{} {
3295 b := it.items
3296 it.items = nil
3297 return b
3298 }
3299
3300 // WasmPluginVersionIterator manages a stream of *networkservicespb.WasmPluginVersion.
3301 type WasmPluginVersionIterator struct {
3302 items []*networkservicespb.WasmPluginVersion
3303 pageInfo *iterator.PageInfo
3304 nextFunc func() error
3305
3306 // Response is the raw response for the current page.
3307 // It must be cast to the RPC response type.
3308 // Calling Next() or InternalFetch() updates this value.
3309 Response interface{}
3310
3311 // InternalFetch is for use by the Google Cloud Libraries only.
3312 // It is not part of the stable interface of this package.
3313 //
3314 // InternalFetch returns results from a single call to the underlying RPC.
3315 // The number of results is no greater than pageSize.
3316 // If there are no more results, nextPageToken is empty and err is nil.
3317 InternalFetch func(pageSize int, pageToken string) (results []*networkservicespb.WasmPluginVersion, nextPageToken string, err error)
3318 }
3319
3320 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
3321 func (it *WasmPluginVersionIterator) PageInfo() *iterator.PageInfo {
3322 return it.pageInfo
3323 }
3324
3325 // Next returns the next result. Its second return value is iterator.Done if there are no more
3326 // results. Once Next returns Done, all subsequent calls will return Done.
3327 func (it *WasmPluginVersionIterator) Next() (*networkservicespb.WasmPluginVersion, error) {
3328 var item *networkservicespb.WasmPluginVersion
3329 if err := it.nextFunc(); err != nil {
3330 return item, err
3331 }
3332 item = it.items[0]
3333 it.items = it.items[1:]
3334 return item, nil
3335 }
3336
3337 func (it *WasmPluginVersionIterator) bufLen() int {
3338 return len(it.items)
3339 }
3340
3341 func (it *WasmPluginVersionIterator) takeBuf() interface{} {
3342 b := it.items
3343 it.items = nil
3344 return b
3345 }