Debian Codegraph @

telcoautomation/apiv1/auxiliary.go

raw symbols SCIP
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go_gapic. DO NOT EDIT.
16
17 package telcoautomation
18
19 import (
20 "context"
21 "time"
22
23 "cloud.google.com/go/longrunning"
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
25 telcoautomationpb "cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb"
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 // CreateEdgeSlmOperation manages a long-running operation from CreateEdgeSlm.
32 type CreateEdgeSlmOperation 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 *CreateEdgeSlmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*telcoautomationpb.EdgeSlm, error) {
41 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
42 var resp telcoautomationpb.EdgeSlm
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 *CreateEdgeSlmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*telcoautomationpb.EdgeSlm, error) {
59 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
60 var resp telcoautomationpb.EdgeSlm
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 *CreateEdgeSlmOperation) Metadata() (*telcoautomationpb.OperationMetadata, error) {
75 var meta telcoautomationpb.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 *CreateEdgeSlmOperation) 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 *CreateEdgeSlmOperation) Name() string {
92 return op.lro.Name()
93 }
94
95 // CreateOrchestrationClusterOperation manages a long-running operation from CreateOrchestrationCluster.
96 type CreateOrchestrationClusterOperation 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 *CreateOrchestrationClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*telcoautomationpb.OrchestrationCluster, error) {
105 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
106 var resp telcoautomationpb.OrchestrationCluster
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 *CreateOrchestrationClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*telcoautomationpb.OrchestrationCluster, error) {
123 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
124 var resp telcoautomationpb.OrchestrationCluster
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 *CreateOrchestrationClusterOperation) Metadata() (*telcoautomationpb.OperationMetadata, error) {
139 var meta telcoautomationpb.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 *CreateOrchestrationClusterOperation) 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 *CreateOrchestrationClusterOperation) Name() string {
156 return op.lro.Name()
157 }
158
159 // DeleteEdgeSlmOperation manages a long-running operation from DeleteEdgeSlm.
160 type DeleteEdgeSlmOperation 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 *DeleteEdgeSlmOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
169 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
170 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
171 }
172
173 // Poll fetches the latest state of the long-running operation.
174 //
175 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
176 //
177 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
178 // the operation has completed with failure, the error is returned and op.Done will return true.
179 // If Poll succeeds and the operation has completed successfully,
180 // op.Done will return true, and the response of the operation is returned.
181 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
182 func (op *DeleteEdgeSlmOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
183 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
184 return op.lro.Poll(ctx, nil, opts...)
185 }
186
187 // Metadata returns metadata associated with the long-running operation.
188 // Metadata itself does not contact the server, but Poll does.
189 // To get the latest metadata, call this method after a successful call to Poll.
190 // If the metadata is not available, the returned metadata and error are both nil.
191 func (op *DeleteEdgeSlmOperation) Metadata() (*telcoautomationpb.OperationMetadata, error) {
192 var meta telcoautomationpb.OperationMetadata
193 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
194 return nil, nil
195 } else if err != nil {
196 return nil, err
197 }
198 return &meta, nil
199 }
200
201 // Done reports whether the long-running operation has completed.
202 func (op *DeleteEdgeSlmOperation) Done() bool {
203 return op.lro.Done()
204 }
205
206 // Name returns the name of the long-running operation.
207 // The name is assigned by the server and is unique within the service from which the operation is created.
208 func (op *DeleteEdgeSlmOperation) Name() string {
209 return op.lro.Name()
210 }
211
212 // DeleteOrchestrationClusterOperation manages a long-running operation from DeleteOrchestrationCluster.
213 type DeleteOrchestrationClusterOperation struct {
214 lro *longrunning.Operation
215 pollPath string
216 }
217
218 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
219 //
220 // See documentation of Poll for error-handling information.
221 func (op *DeleteOrchestrationClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
222 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
223 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
224 }
225
226 // Poll fetches the latest state of the long-running operation.
227 //
228 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
229 //
230 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
231 // the operation has completed with failure, the error is returned and op.Done will return true.
232 // If Poll succeeds and the operation has completed successfully,
233 // op.Done will return true, and the response of the operation is returned.
234 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
235 func (op *DeleteOrchestrationClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
236 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
237 return op.lro.Poll(ctx, nil, opts...)
238 }
239
240 // Metadata returns metadata associated with the long-running operation.
241 // Metadata itself does not contact the server, but Poll does.
242 // To get the latest metadata, call this method after a successful call to Poll.
243 // If the metadata is not available, the returned metadata and error are both nil.
244 func (op *DeleteOrchestrationClusterOperation) Metadata() (*telcoautomationpb.OperationMetadata, error) {
245 var meta telcoautomationpb.OperationMetadata
246 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
247 return nil, nil
248 } else if err != nil {
249 return nil, err
250 }
251 return &meta, nil
252 }
253
254 // Done reports whether the long-running operation has completed.
255 func (op *DeleteOrchestrationClusterOperation) Done() bool {
256 return op.lro.Done()
257 }
258
259 // Name returns the name of the long-running operation.
260 // The name is assigned by the server and is unique within the service from which the operation is created.
261 func (op *DeleteOrchestrationClusterOperation) Name() string {
262 return op.lro.Name()
263 }
264
265 // BlueprintIterator manages a stream of *telcoautomationpb.Blueprint.
266 type BlueprintIterator struct {
267 items []*telcoautomationpb.Blueprint
268 pageInfo *iterator.PageInfo
269 nextFunc func() error
270
271 // Response is the raw response for the current page.
272 // It must be cast to the RPC response type.
273 // Calling Next() or InternalFetch() updates this value.
274 Response interface{}
275
276 // InternalFetch is for use by the Google Cloud Libraries only.
277 // It is not part of the stable interface of this package.
278 //
279 // InternalFetch returns results from a single call to the underlying RPC.
280 // The number of results is no greater than pageSize.
281 // If there are no more results, nextPageToken is empty and err is nil.
282 InternalFetch func(pageSize int, pageToken string) (results []*telcoautomationpb.Blueprint, nextPageToken string, err error)
283 }
284
285 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
286 func (it *BlueprintIterator) PageInfo() *iterator.PageInfo {
287 return it.pageInfo
288 }
289
290 // Next returns the next result. Its second return value is iterator.Done if there are no more
291 // results. Once Next returns Done, all subsequent calls will return Done.
292 func (it *BlueprintIterator) Next() (*telcoautomationpb.Blueprint, error) {
293 var item *telcoautomationpb.Blueprint
294 if err := it.nextFunc(); err != nil {
295 return item, err
296 }
297 item = it.items[0]
298 it.items = it.items[1:]
299 return item, nil
300 }
301
302 func (it *BlueprintIterator) bufLen() int {
303 return len(it.items)
304 }
305
306 func (it *BlueprintIterator) takeBuf() interface{} {
307 b := it.items
308 it.items = nil
309 return b
310 }
311
312 // DeploymentIterator manages a stream of *telcoautomationpb.Deployment.
313 type DeploymentIterator struct {
314 items []*telcoautomationpb.Deployment
315 pageInfo *iterator.PageInfo
316 nextFunc func() error
317
318 // Response is the raw response for the current page.
319 // It must be cast to the RPC response type.
320 // Calling Next() or InternalFetch() updates this value.
321 Response interface{}
322
323 // InternalFetch is for use by the Google Cloud Libraries only.
324 // It is not part of the stable interface of this package.
325 //
326 // InternalFetch returns results from a single call to the underlying RPC.
327 // The number of results is no greater than pageSize.
328 // If there are no more results, nextPageToken is empty and err is nil.
329 InternalFetch func(pageSize int, pageToken string) (results []*telcoautomationpb.Deployment, nextPageToken string, err error)
330 }
331
332 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
333 func (it *DeploymentIterator) PageInfo() *iterator.PageInfo {
334 return it.pageInfo
335 }
336
337 // Next returns the next result. Its second return value is iterator.Done if there are no more
338 // results. Once Next returns Done, all subsequent calls will return Done.
339 func (it *DeploymentIterator) Next() (*telcoautomationpb.Deployment, error) {
340 var item *telcoautomationpb.Deployment
341 if err := it.nextFunc(); err != nil {
342 return item, err
343 }
344 item = it.items[0]
345 it.items = it.items[1:]
346 return item, nil
347 }
348
349 func (it *DeploymentIterator) bufLen() int {
350 return len(it.items)
351 }
352
353 func (it *DeploymentIterator) takeBuf() interface{} {
354 b := it.items
355 it.items = nil
356 return b
357 }
358
359 // EdgeSlmIterator manages a stream of *telcoautomationpb.EdgeSlm.
360 type EdgeSlmIterator struct {
361 items []*telcoautomationpb.EdgeSlm
362 pageInfo *iterator.PageInfo
363 nextFunc func() error
364
365 // Response is the raw response for the current page.
366 // It must be cast to the RPC response type.
367 // Calling Next() or InternalFetch() updates this value.
368 Response interface{}
369
370 // InternalFetch is for use by the Google Cloud Libraries only.
371 // It is not part of the stable interface of this package.
372 //
373 // InternalFetch returns results from a single call to the underlying RPC.
374 // The number of results is no greater than pageSize.
375 // If there are no more results, nextPageToken is empty and err is nil.
376 InternalFetch func(pageSize int, pageToken string) (results []*telcoautomationpb.EdgeSlm, nextPageToken string, err error)
377 }
378
379 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
380 func (it *EdgeSlmIterator) PageInfo() *iterator.PageInfo {
381 return it.pageInfo
382 }
383
384 // Next returns the next result. Its second return value is iterator.Done if there are no more
385 // results. Once Next returns Done, all subsequent calls will return Done.
386 func (it *EdgeSlmIterator) Next() (*telcoautomationpb.EdgeSlm, error) {
387 var item *telcoautomationpb.EdgeSlm
388 if err := it.nextFunc(); err != nil {
389 return item, err
390 }
391 item = it.items[0]
392 it.items = it.items[1:]
393 return item, nil
394 }
395
396 func (it *EdgeSlmIterator) bufLen() int {
397 return len(it.items)
398 }
399
400 func (it *EdgeSlmIterator) takeBuf() interface{} {
401 b := it.items
402 it.items = nil
403 return b
404 }
405
406 // HydratedDeploymentIterator manages a stream of *telcoautomationpb.HydratedDeployment.
407 type HydratedDeploymentIterator struct {
408 items []*telcoautomationpb.HydratedDeployment
409 pageInfo *iterator.PageInfo
410 nextFunc func() error
411
412 // Response is the raw response for the current page.
413 // It must be cast to the RPC response type.
414 // Calling Next() or InternalFetch() updates this value.
415 Response interface{}
416
417 // InternalFetch is for use by the Google Cloud Libraries only.
418 // It is not part of the stable interface of this package.
419 //
420 // InternalFetch returns results from a single call to the underlying RPC.
421 // The number of results is no greater than pageSize.
422 // If there are no more results, nextPageToken is empty and err is nil.
423 InternalFetch func(pageSize int, pageToken string) (results []*telcoautomationpb.HydratedDeployment, nextPageToken string, err error)
424 }
425
426 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
427 func (it *HydratedDeploymentIterator) PageInfo() *iterator.PageInfo {
428 return it.pageInfo
429 }
430
431 // Next returns the next result. Its second return value is iterator.Done if there are no more
432 // results. Once Next returns Done, all subsequent calls will return Done.
433 func (it *HydratedDeploymentIterator) Next() (*telcoautomationpb.HydratedDeployment, error) {
434 var item *telcoautomationpb.HydratedDeployment
435 if err := it.nextFunc(); err != nil {
436 return item, err
437 }
438 item = it.items[0]
439 it.items = it.items[1:]
440 return item, nil
441 }
442
443 func (it *HydratedDeploymentIterator) bufLen() int {
444 return len(it.items)
445 }
446
447 func (it *HydratedDeploymentIterator) takeBuf() interface{} {
448 b := it.items
449 it.items = nil
450 return b
451 }
452
453 // LocationIterator manages a stream of *locationpb.Location.
454 type LocationIterator struct {
455 items []*locationpb.Location
456 pageInfo *iterator.PageInfo
457 nextFunc func() error
458
459 // Response is the raw response for the current page.
460 // It must be cast to the RPC response type.
461 // Calling Next() or InternalFetch() updates this value.
462 Response interface{}
463
464 // InternalFetch is for use by the Google Cloud Libraries only.
465 // It is not part of the stable interface of this package.
466 //
467 // InternalFetch returns results from a single call to the underlying RPC.
468 // The number of results is no greater than pageSize.
469 // If there are no more results, nextPageToken is empty and err is nil.
470 InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
471 }
472
473 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
474 func (it *LocationIterator) PageInfo() *iterator.PageInfo {
475 return it.pageInfo
476 }
477
478 // Next returns the next result. Its second return value is iterator.Done if there are no more
479 // results. Once Next returns Done, all subsequent calls will return Done.
480 func (it *LocationIterator) Next() (*locationpb.Location, error) {
481 var item *locationpb.Location
482 if err := it.nextFunc(); err != nil {
483 return item, err
484 }
485 item = it.items[0]
486 it.items = it.items[1:]
487 return item, nil
488 }
489
490 func (it *LocationIterator) bufLen() int {
491 return len(it.items)
492 }
493
494 func (it *LocationIterator) takeBuf() interface{} {
495 b := it.items
496 it.items = nil
497 return b
498 }
499
500 // OperationIterator manages a stream of *longrunningpb.Operation.
501 type OperationIterator struct {
502 items []*longrunningpb.Operation
503 pageInfo *iterator.PageInfo
504 nextFunc func() error
505
506 // Response is the raw response for the current page.
507 // It must be cast to the RPC response type.
508 // Calling Next() or InternalFetch() updates this value.
509 Response interface{}
510
511 // InternalFetch is for use by the Google Cloud Libraries only.
512 // It is not part of the stable interface of this package.
513 //
514 // InternalFetch returns results from a single call to the underlying RPC.
515 // The number of results is no greater than pageSize.
516 // If there are no more results, nextPageToken is empty and err is nil.
517 InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
518 }
519
520 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
521 func (it *OperationIterator) PageInfo() *iterator.PageInfo {
522 return it.pageInfo
523 }
524
525 // Next returns the next result. Its second return value is iterator.Done if there are no more
526 // results. Once Next returns Done, all subsequent calls will return Done.
527 func (it *OperationIterator) Next() (*longrunningpb.Operation, error) {
528 var item *longrunningpb.Operation
529 if err := it.nextFunc(); err != nil {
530 return item, err
531 }
532 item = it.items[0]
533 it.items = it.items[1:]
534 return item, nil
535 }
536
537 func (it *OperationIterator) bufLen() int {
538 return len(it.items)
539 }
540
541 func (it *OperationIterator) takeBuf() interface{} {
542 b := it.items
543 it.items = nil
544 return b
545 }
546
547 // OrchestrationClusterIterator manages a stream of *telcoautomationpb.OrchestrationCluster.
548 type OrchestrationClusterIterator struct {
549 items []*telcoautomationpb.OrchestrationCluster
550 pageInfo *iterator.PageInfo
551 nextFunc func() error
552
553 // Response is the raw response for the current page.
554 // It must be cast to the RPC response type.
555 // Calling Next() or InternalFetch() updates this value.
556 Response interface{}
557
558 // InternalFetch is for use by the Google Cloud Libraries only.
559 // It is not part of the stable interface of this package.
560 //
561 // InternalFetch returns results from a single call to the underlying RPC.
562 // The number of results is no greater than pageSize.
563 // If there are no more results, nextPageToken is empty and err is nil.
564 InternalFetch func(pageSize int, pageToken string) (results []*telcoautomationpb.OrchestrationCluster, nextPageToken string, err error)
565 }
566
567 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
568 func (it *OrchestrationClusterIterator) PageInfo() *iterator.PageInfo {
569 return it.pageInfo
570 }
571
572 // Next returns the next result. Its second return value is iterator.Done if there are no more
573 // results. Once Next returns Done, all subsequent calls will return Done.
574 func (it *OrchestrationClusterIterator) Next() (*telcoautomationpb.OrchestrationCluster, error) {
575 var item *telcoautomationpb.OrchestrationCluster
576 if err := it.nextFunc(); err != nil {
577 return item, err
578 }
579 item = it.items[0]
580 it.items = it.items[1:]
581 return item, nil
582 }
583
584 func (it *OrchestrationClusterIterator) bufLen() int {
585 return len(it.items)
586 }
587
588 func (it *OrchestrationClusterIterator) takeBuf() interface{} {
589 b := it.items
590 it.items = nil
591 return b
592 }
593
594 // PublicBlueprintIterator manages a stream of *telcoautomationpb.PublicBlueprint.
595 type PublicBlueprintIterator struct {
596 items []*telcoautomationpb.PublicBlueprint
597 pageInfo *iterator.PageInfo
598 nextFunc func() error
599
600 // Response is the raw response for the current page.
601 // It must be cast to the RPC response type.
602 // Calling Next() or InternalFetch() updates this value.
603 Response interface{}
604
605 // InternalFetch is for use by the Google Cloud Libraries only.
606 // It is not part of the stable interface of this package.
607 //
608 // InternalFetch returns results from a single call to the underlying RPC.
609 // The number of results is no greater than pageSize.
610 // If there are no more results, nextPageToken is empty and err is nil.
611 InternalFetch func(pageSize int, pageToken string) (results []*telcoautomationpb.PublicBlueprint, nextPageToken string, err error)
612 }
613
614 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
615 func (it *PublicBlueprintIterator) PageInfo() *iterator.PageInfo {
616 return it.pageInfo
617 }
618
619 // Next returns the next result. Its second return value is iterator.Done if there are no more
620 // results. Once Next returns Done, all subsequent calls will return Done.
621 func (it *PublicBlueprintIterator) Next() (*telcoautomationpb.PublicBlueprint, error) {
622 var item *telcoautomationpb.PublicBlueprint
623 if err := it.nextFunc(); err != nil {
624 return item, err
625 }
626 item = it.items[0]
627 it.items = it.items[1:]
628 return item, nil
629 }
630
631 func (it *PublicBlueprintIterator) bufLen() int {
632 return len(it.items)
633 }
634
635 func (it *PublicBlueprintIterator) takeBuf() interface{} {
636 b := it.items
637 it.items = nil
638 return b
639 }