Debian Codegraph @

certificatemanager/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 certificatemanager
18
19 import (
20 "context"
21 "time"
22
23 certificatemanagerpb "cloud.google.com/go/certificatemanager/apiv1/certificatemanagerpb"
24 "cloud.google.com/go/longrunning"
25 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
26 gax "github.com/googleapis/gax-go/v2"
27 "google.golang.org/api/iterator"
28 locationpb "google.golang.org/genproto/googleapis/cloud/location"
29 )
30
31 // CreateCertificateIssuanceConfigOperation manages a long-running operation from CreateCertificateIssuanceConfig.
32 type CreateCertificateIssuanceConfigOperation 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 *CreateCertificateIssuanceConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateIssuanceConfig, error) {
41 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
42 var resp certificatemanagerpb.CertificateIssuanceConfig
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 *CreateCertificateIssuanceConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateIssuanceConfig, error) {
59 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
60 var resp certificatemanagerpb.CertificateIssuanceConfig
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 *CreateCertificateIssuanceConfigOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
75 var meta certificatemanagerpb.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 *CreateCertificateIssuanceConfigOperation) 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 *CreateCertificateIssuanceConfigOperation) Name() string {
92 return op.lro.Name()
93 }
94
95 // CreateCertificateMapEntryOperation manages a long-running operation from CreateCertificateMapEntry.
96 type CreateCertificateMapEntryOperation 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 *CreateCertificateMapEntryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMapEntry, error) {
105 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
106 var resp certificatemanagerpb.CertificateMapEntry
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 *CreateCertificateMapEntryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMapEntry, error) {
123 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
124 var resp certificatemanagerpb.CertificateMapEntry
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 *CreateCertificateMapEntryOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
139 var meta certificatemanagerpb.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 *CreateCertificateMapEntryOperation) 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 *CreateCertificateMapEntryOperation) Name() string {
156 return op.lro.Name()
157 }
158
159 // CreateCertificateMapOperation manages a long-running operation from CreateCertificateMap.
160 type CreateCertificateMapOperation 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 *CreateCertificateMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMap, error) {
169 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
170 var resp certificatemanagerpb.CertificateMap
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 *CreateCertificateMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMap, error) {
187 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
188 var resp certificatemanagerpb.CertificateMap
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 *CreateCertificateMapOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
203 var meta certificatemanagerpb.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 *CreateCertificateMapOperation) 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 *CreateCertificateMapOperation) Name() string {
220 return op.lro.Name()
221 }
222
223 // CreateCertificateOperation manages a long-running operation from CreateCertificate.
224 type CreateCertificateOperation 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 *CreateCertificateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.Certificate, error) {
233 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
234 var resp certificatemanagerpb.Certificate
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 *CreateCertificateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.Certificate, error) {
251 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
252 var resp certificatemanagerpb.Certificate
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 *CreateCertificateOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
267 var meta certificatemanagerpb.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 *CreateCertificateOperation) 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 *CreateCertificateOperation) Name() string {
284 return op.lro.Name()
285 }
286
287 // CreateDnsAuthorizationOperation manages a long-running operation from CreateDnsAuthorization.
288 type CreateDnsAuthorizationOperation 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 *CreateDnsAuthorizationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.DnsAuthorization, error) {
297 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
298 var resp certificatemanagerpb.DnsAuthorization
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 *CreateDnsAuthorizationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.DnsAuthorization, error) {
315 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
316 var resp certificatemanagerpb.DnsAuthorization
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 *CreateDnsAuthorizationOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
331 var meta certificatemanagerpb.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 *CreateDnsAuthorizationOperation) 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 *CreateDnsAuthorizationOperation) Name() string {
348 return op.lro.Name()
349 }
350
351 // CreateTrustConfigOperation manages a long-running operation from CreateTrustConfig.
352 type CreateTrustConfigOperation 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 *CreateTrustConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.TrustConfig, error) {
361 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
362 var resp certificatemanagerpb.TrustConfig
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 *CreateTrustConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.TrustConfig, error) {
379 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
380 var resp certificatemanagerpb.TrustConfig
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 *CreateTrustConfigOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
395 var meta certificatemanagerpb.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 *CreateTrustConfigOperation) 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 *CreateTrustConfigOperation) Name() string {
412 return op.lro.Name()
413 }
414
415 // DeleteCertificateIssuanceConfigOperation manages a long-running operation from DeleteCertificateIssuanceConfig.
416 type DeleteCertificateIssuanceConfigOperation 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 *DeleteCertificateIssuanceConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
425 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
426 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
427 }
428
429 // Poll fetches the latest state of the long-running operation.
430 //
431 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
432 //
433 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
434 // the operation has completed with failure, the error is returned and op.Done will return true.
435 // If Poll succeeds and the operation has completed successfully,
436 // op.Done will return true, and the response of the operation is returned.
437 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
438 func (op *DeleteCertificateIssuanceConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
439 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
440 return op.lro.Poll(ctx, nil, opts...)
441 }
442
443 // Metadata returns metadata associated with the long-running operation.
444 // Metadata itself does not contact the server, but Poll does.
445 // To get the latest metadata, call this method after a successful call to Poll.
446 // If the metadata is not available, the returned metadata and error are both nil.
447 func (op *DeleteCertificateIssuanceConfigOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
448 var meta certificatemanagerpb.OperationMetadata
449 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
450 return nil, nil
451 } else if err != nil {
452 return nil, err
453 }
454 return &meta, nil
455 }
456
457 // Done reports whether the long-running operation has completed.
458 func (op *DeleteCertificateIssuanceConfigOperation) Done() bool {
459 return op.lro.Done()
460 }
461
462 // Name returns the name of the long-running operation.
463 // The name is assigned by the server and is unique within the service from which the operation is created.
464 func (op *DeleteCertificateIssuanceConfigOperation) Name() string {
465 return op.lro.Name()
466 }
467
468 // DeleteCertificateMapEntryOperation manages a long-running operation from DeleteCertificateMapEntry.
469 type DeleteCertificateMapEntryOperation struct {
470 lro *longrunning.Operation
471 pollPath string
472 }
473
474 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
475 //
476 // See documentation of Poll for error-handling information.
477 func (op *DeleteCertificateMapEntryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
478 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
479 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
480 }
481
482 // Poll fetches the latest state of the long-running operation.
483 //
484 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
485 //
486 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
487 // the operation has completed with failure, the error is returned and op.Done will return true.
488 // If Poll succeeds and the operation has completed successfully,
489 // op.Done will return true, and the response of the operation is returned.
490 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
491 func (op *DeleteCertificateMapEntryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
492 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
493 return op.lro.Poll(ctx, nil, opts...)
494 }
495
496 // Metadata returns metadata associated with the long-running operation.
497 // Metadata itself does not contact the server, but Poll does.
498 // To get the latest metadata, call this method after a successful call to Poll.
499 // If the metadata is not available, the returned metadata and error are both nil.
500 func (op *DeleteCertificateMapEntryOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
501 var meta certificatemanagerpb.OperationMetadata
502 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
503 return nil, nil
504 } else if err != nil {
505 return nil, err
506 }
507 return &meta, nil
508 }
509
510 // Done reports whether the long-running operation has completed.
511 func (op *DeleteCertificateMapEntryOperation) Done() bool {
512 return op.lro.Done()
513 }
514
515 // Name returns the name of the long-running operation.
516 // The name is assigned by the server and is unique within the service from which the operation is created.
517 func (op *DeleteCertificateMapEntryOperation) Name() string {
518 return op.lro.Name()
519 }
520
521 // DeleteCertificateMapOperation manages a long-running operation from DeleteCertificateMap.
522 type DeleteCertificateMapOperation struct {
523 lro *longrunning.Operation
524 pollPath string
525 }
526
527 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
528 //
529 // See documentation of Poll for error-handling information.
530 func (op *DeleteCertificateMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
531 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
532 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
533 }
534
535 // Poll fetches the latest state of the long-running operation.
536 //
537 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
538 //
539 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
540 // the operation has completed with failure, the error is returned and op.Done will return true.
541 // If Poll succeeds and the operation has completed successfully,
542 // op.Done will return true, and the response of the operation is returned.
543 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
544 func (op *DeleteCertificateMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
545 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
546 return op.lro.Poll(ctx, nil, opts...)
547 }
548
549 // Metadata returns metadata associated with the long-running operation.
550 // Metadata itself does not contact the server, but Poll does.
551 // To get the latest metadata, call this method after a successful call to Poll.
552 // If the metadata is not available, the returned metadata and error are both nil.
553 func (op *DeleteCertificateMapOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
554 var meta certificatemanagerpb.OperationMetadata
555 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
556 return nil, nil
557 } else if err != nil {
558 return nil, err
559 }
560 return &meta, nil
561 }
562
563 // Done reports whether the long-running operation has completed.
564 func (op *DeleteCertificateMapOperation) Done() bool {
565 return op.lro.Done()
566 }
567
568 // Name returns the name of the long-running operation.
569 // The name is assigned by the server and is unique within the service from which the operation is created.
570 func (op *DeleteCertificateMapOperation) Name() string {
571 return op.lro.Name()
572 }
573
574 // DeleteCertificateOperation manages a long-running operation from DeleteCertificate.
575 type DeleteCertificateOperation struct {
576 lro *longrunning.Operation
577 pollPath string
578 }
579
580 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
581 //
582 // See documentation of Poll for error-handling information.
583 func (op *DeleteCertificateOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
584 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
585 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
586 }
587
588 // Poll fetches the latest state of the long-running operation.
589 //
590 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
591 //
592 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
593 // the operation has completed with failure, the error is returned and op.Done will return true.
594 // If Poll succeeds and the operation has completed successfully,
595 // op.Done will return true, and the response of the operation is returned.
596 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
597 func (op *DeleteCertificateOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
598 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
599 return op.lro.Poll(ctx, nil, opts...)
600 }
601
602 // Metadata returns metadata associated with the long-running operation.
603 // Metadata itself does not contact the server, but Poll does.
604 // To get the latest metadata, call this method after a successful call to Poll.
605 // If the metadata is not available, the returned metadata and error are both nil.
606 func (op *DeleteCertificateOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
607 var meta certificatemanagerpb.OperationMetadata
608 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
609 return nil, nil
610 } else if err != nil {
611 return nil, err
612 }
613 return &meta, nil
614 }
615
616 // Done reports whether the long-running operation has completed.
617 func (op *DeleteCertificateOperation) Done() bool {
618 return op.lro.Done()
619 }
620
621 // Name returns the name of the long-running operation.
622 // The name is assigned by the server and is unique within the service from which the operation is created.
623 func (op *DeleteCertificateOperation) Name() string {
624 return op.lro.Name()
625 }
626
627 // DeleteDnsAuthorizationOperation manages a long-running operation from DeleteDnsAuthorization.
628 type DeleteDnsAuthorizationOperation struct {
629 lro *longrunning.Operation
630 pollPath string
631 }
632
633 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
634 //
635 // See documentation of Poll for error-handling information.
636 func (op *DeleteDnsAuthorizationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
637 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
638 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
639 }
640
641 // Poll fetches the latest state of the long-running operation.
642 //
643 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
644 //
645 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
646 // the operation has completed with failure, the error is returned and op.Done will return true.
647 // If Poll succeeds and the operation has completed successfully,
648 // op.Done will return true, and the response of the operation is returned.
649 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
650 func (op *DeleteDnsAuthorizationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
651 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
652 return op.lro.Poll(ctx, nil, opts...)
653 }
654
655 // Metadata returns metadata associated with the long-running operation.
656 // Metadata itself does not contact the server, but Poll does.
657 // To get the latest metadata, call this method after a successful call to Poll.
658 // If the metadata is not available, the returned metadata and error are both nil.
659 func (op *DeleteDnsAuthorizationOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
660 var meta certificatemanagerpb.OperationMetadata
661 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
662 return nil, nil
663 } else if err != nil {
664 return nil, err
665 }
666 return &meta, nil
667 }
668
669 // Done reports whether the long-running operation has completed.
670 func (op *DeleteDnsAuthorizationOperation) Done() bool {
671 return op.lro.Done()
672 }
673
674 // Name returns the name of the long-running operation.
675 // The name is assigned by the server and is unique within the service from which the operation is created.
676 func (op *DeleteDnsAuthorizationOperation) Name() string {
677 return op.lro.Name()
678 }
679
680 // DeleteTrustConfigOperation manages a long-running operation from DeleteTrustConfig.
681 type DeleteTrustConfigOperation struct {
682 lro *longrunning.Operation
683 pollPath string
684 }
685
686 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
687 //
688 // See documentation of Poll for error-handling information.
689 func (op *DeleteTrustConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) error {
690 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
691 return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...)
692 }
693
694 // Poll fetches the latest state of the long-running operation.
695 //
696 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
697 //
698 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
699 // the operation has completed with failure, the error is returned and op.Done will return true.
700 // If Poll succeeds and the operation has completed successfully,
701 // op.Done will return true, and the response of the operation is returned.
702 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
703 func (op *DeleteTrustConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) error {
704 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
705 return op.lro.Poll(ctx, nil, opts...)
706 }
707
708 // Metadata returns metadata associated with the long-running operation.
709 // Metadata itself does not contact the server, but Poll does.
710 // To get the latest metadata, call this method after a successful call to Poll.
711 // If the metadata is not available, the returned metadata and error are both nil.
712 func (op *DeleteTrustConfigOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
713 var meta certificatemanagerpb.OperationMetadata
714 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
715 return nil, nil
716 } else if err != nil {
717 return nil, err
718 }
719 return &meta, nil
720 }
721
722 // Done reports whether the long-running operation has completed.
723 func (op *DeleteTrustConfigOperation) Done() bool {
724 return op.lro.Done()
725 }
726
727 // Name returns the name of the long-running operation.
728 // The name is assigned by the server and is unique within the service from which the operation is created.
729 func (op *DeleteTrustConfigOperation) Name() string {
730 return op.lro.Name()
731 }
732
733 // UpdateCertificateMapEntryOperation manages a long-running operation from UpdateCertificateMapEntry.
734 type UpdateCertificateMapEntryOperation struct {
735 lro *longrunning.Operation
736 pollPath string
737 }
738
739 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
740 //
741 // See documentation of Poll for error-handling information.
742 func (op *UpdateCertificateMapEntryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMapEntry, error) {
743 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
744 var resp certificatemanagerpb.CertificateMapEntry
745 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
746 return nil, err
747 }
748 return &resp, nil
749 }
750
751 // Poll fetches the latest state of the long-running operation.
752 //
753 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
754 //
755 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
756 // the operation has completed with failure, the error is returned and op.Done will return true.
757 // If Poll succeeds and the operation has completed successfully,
758 // op.Done will return true, and the response of the operation is returned.
759 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
760 func (op *UpdateCertificateMapEntryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMapEntry, error) {
761 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
762 var resp certificatemanagerpb.CertificateMapEntry
763 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
764 return nil, err
765 }
766 if !op.Done() {
767 return nil, nil
768 }
769 return &resp, nil
770 }
771
772 // Metadata returns metadata associated with the long-running operation.
773 // Metadata itself does not contact the server, but Poll does.
774 // To get the latest metadata, call this method after a successful call to Poll.
775 // If the metadata is not available, the returned metadata and error are both nil.
776 func (op *UpdateCertificateMapEntryOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
777 var meta certificatemanagerpb.OperationMetadata
778 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
779 return nil, nil
780 } else if err != nil {
781 return nil, err
782 }
783 return &meta, nil
784 }
785
786 // Done reports whether the long-running operation has completed.
787 func (op *UpdateCertificateMapEntryOperation) Done() bool {
788 return op.lro.Done()
789 }
790
791 // Name returns the name of the long-running operation.
792 // The name is assigned by the server and is unique within the service from which the operation is created.
793 func (op *UpdateCertificateMapEntryOperation) Name() string {
794 return op.lro.Name()
795 }
796
797 // UpdateCertificateMapOperation manages a long-running operation from UpdateCertificateMap.
798 type UpdateCertificateMapOperation struct {
799 lro *longrunning.Operation
800 pollPath string
801 }
802
803 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
804 //
805 // See documentation of Poll for error-handling information.
806 func (op *UpdateCertificateMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMap, error) {
807 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
808 var resp certificatemanagerpb.CertificateMap
809 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
810 return nil, err
811 }
812 return &resp, nil
813 }
814
815 // Poll fetches the latest state of the long-running operation.
816 //
817 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
818 //
819 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
820 // the operation has completed with failure, the error is returned and op.Done will return true.
821 // If Poll succeeds and the operation has completed successfully,
822 // op.Done will return true, and the response of the operation is returned.
823 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
824 func (op *UpdateCertificateMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.CertificateMap, error) {
825 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
826 var resp certificatemanagerpb.CertificateMap
827 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
828 return nil, err
829 }
830 if !op.Done() {
831 return nil, nil
832 }
833 return &resp, nil
834 }
835
836 // Metadata returns metadata associated with the long-running operation.
837 // Metadata itself does not contact the server, but Poll does.
838 // To get the latest metadata, call this method after a successful call to Poll.
839 // If the metadata is not available, the returned metadata and error are both nil.
840 func (op *UpdateCertificateMapOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
841 var meta certificatemanagerpb.OperationMetadata
842 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
843 return nil, nil
844 } else if err != nil {
845 return nil, err
846 }
847 return &meta, nil
848 }
849
850 // Done reports whether the long-running operation has completed.
851 func (op *UpdateCertificateMapOperation) Done() bool {
852 return op.lro.Done()
853 }
854
855 // Name returns the name of the long-running operation.
856 // The name is assigned by the server and is unique within the service from which the operation is created.
857 func (op *UpdateCertificateMapOperation) Name() string {
858 return op.lro.Name()
859 }
860
861 // UpdateCertificateOperation manages a long-running operation from UpdateCertificate.
862 type UpdateCertificateOperation struct {
863 lro *longrunning.Operation
864 pollPath string
865 }
866
867 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
868 //
869 // See documentation of Poll for error-handling information.
870 func (op *UpdateCertificateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.Certificate, error) {
871 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
872 var resp certificatemanagerpb.Certificate
873 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
874 return nil, err
875 }
876 return &resp, nil
877 }
878
879 // Poll fetches the latest state of the long-running operation.
880 //
881 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
882 //
883 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
884 // the operation has completed with failure, the error is returned and op.Done will return true.
885 // If Poll succeeds and the operation has completed successfully,
886 // op.Done will return true, and the response of the operation is returned.
887 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
888 func (op *UpdateCertificateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.Certificate, error) {
889 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
890 var resp certificatemanagerpb.Certificate
891 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
892 return nil, err
893 }
894 if !op.Done() {
895 return nil, nil
896 }
897 return &resp, nil
898 }
899
900 // Metadata returns metadata associated with the long-running operation.
901 // Metadata itself does not contact the server, but Poll does.
902 // To get the latest metadata, call this method after a successful call to Poll.
903 // If the metadata is not available, the returned metadata and error are both nil.
904 func (op *UpdateCertificateOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
905 var meta certificatemanagerpb.OperationMetadata
906 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
907 return nil, nil
908 } else if err != nil {
909 return nil, err
910 }
911 return &meta, nil
912 }
913
914 // Done reports whether the long-running operation has completed.
915 func (op *UpdateCertificateOperation) Done() bool {
916 return op.lro.Done()
917 }
918
919 // Name returns the name of the long-running operation.
920 // The name is assigned by the server and is unique within the service from which the operation is created.
921 func (op *UpdateCertificateOperation) Name() string {
922 return op.lro.Name()
923 }
924
925 // UpdateDnsAuthorizationOperation manages a long-running operation from UpdateDnsAuthorization.
926 type UpdateDnsAuthorizationOperation struct {
927 lro *longrunning.Operation
928 pollPath string
929 }
930
931 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
932 //
933 // See documentation of Poll for error-handling information.
934 func (op *UpdateDnsAuthorizationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.DnsAuthorization, error) {
935 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
936 var resp certificatemanagerpb.DnsAuthorization
937 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
938 return nil, err
939 }
940 return &resp, nil
941 }
942
943 // Poll fetches the latest state of the long-running operation.
944 //
945 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
946 //
947 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
948 // the operation has completed with failure, the error is returned and op.Done will return true.
949 // If Poll succeeds and the operation has completed successfully,
950 // op.Done will return true, and the response of the operation is returned.
951 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
952 func (op *UpdateDnsAuthorizationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.DnsAuthorization, error) {
953 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
954 var resp certificatemanagerpb.DnsAuthorization
955 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
956 return nil, err
957 }
958 if !op.Done() {
959 return nil, nil
960 }
961 return &resp, nil
962 }
963
964 // Metadata returns metadata associated with the long-running operation.
965 // Metadata itself does not contact the server, but Poll does.
966 // To get the latest metadata, call this method after a successful call to Poll.
967 // If the metadata is not available, the returned metadata and error are both nil.
968 func (op *UpdateDnsAuthorizationOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
969 var meta certificatemanagerpb.OperationMetadata
970 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
971 return nil, nil
972 } else if err != nil {
973 return nil, err
974 }
975 return &meta, nil
976 }
977
978 // Done reports whether the long-running operation has completed.
979 func (op *UpdateDnsAuthorizationOperation) Done() bool {
980 return op.lro.Done()
981 }
982
983 // Name returns the name of the long-running operation.
984 // The name is assigned by the server and is unique within the service from which the operation is created.
985 func (op *UpdateDnsAuthorizationOperation) Name() string {
986 return op.lro.Name()
987 }
988
989 // UpdateTrustConfigOperation manages a long-running operation from UpdateTrustConfig.
990 type UpdateTrustConfigOperation struct {
991 lro *longrunning.Operation
992 pollPath string
993 }
994
995 // Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
996 //
997 // See documentation of Poll for error-handling information.
998 func (op *UpdateTrustConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.TrustConfig, error) {
999 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1000 var resp certificatemanagerpb.TrustConfig
1001 if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
1002 return nil, err
1003 }
1004 return &resp, nil
1005 }
1006
1007 // Poll fetches the latest state of the long-running operation.
1008 //
1009 // Poll also fetches the latest metadata, which can be retrieved by Metadata.
1010 //
1011 // If Poll fails, the error is returned and op is unmodified. If Poll succeeds and
1012 // the operation has completed with failure, the error is returned and op.Done will return true.
1013 // If Poll succeeds and the operation has completed successfully,
1014 // op.Done will return true, and the response of the operation is returned.
1015 // If Poll succeeds and the operation has not completed, the returned response and error are both nil.
1016 func (op *UpdateTrustConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*certificatemanagerpb.TrustConfig, error) {
1017 opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...)
1018 var resp certificatemanagerpb.TrustConfig
1019 if err := op.lro.Poll(ctx, &resp, opts...); err != nil {
1020 return nil, err
1021 }
1022 if !op.Done() {
1023 return nil, nil
1024 }
1025 return &resp, nil
1026 }
1027
1028 // Metadata returns metadata associated with the long-running operation.
1029 // Metadata itself does not contact the server, but Poll does.
1030 // To get the latest metadata, call this method after a successful call to Poll.
1031 // If the metadata is not available, the returned metadata and error are both nil.
1032 func (op *UpdateTrustConfigOperation) Metadata() (*certificatemanagerpb.OperationMetadata, error) {
1033 var meta certificatemanagerpb.OperationMetadata
1034 if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata {
1035 return nil, nil
1036 } else if err != nil {
1037 return nil, err
1038 }
1039 return &meta, nil
1040 }
1041
1042 // Done reports whether the long-running operation has completed.
1043 func (op *UpdateTrustConfigOperation) Done() bool {
1044 return op.lro.Done()
1045 }
1046
1047 // Name returns the name of the long-running operation.
1048 // The name is assigned by the server and is unique within the service from which the operation is created.
1049 func (op *UpdateTrustConfigOperation) Name() string {
1050 return op.lro.Name()
1051 }
1052
1053 // CertificateIssuanceConfigIterator manages a stream of *certificatemanagerpb.CertificateIssuanceConfig.
1054 type CertificateIssuanceConfigIterator struct {
1055 items []*certificatemanagerpb.CertificateIssuanceConfig
1056 pageInfo *iterator.PageInfo
1057 nextFunc func() error
1058
1059 // Response is the raw response for the current page.
1060 // It must be cast to the RPC response type.
1061 // Calling Next() or InternalFetch() updates this value.
1062 Response interface{}
1063
1064 // InternalFetch is for use by the Google Cloud Libraries only.
1065 // It is not part of the stable interface of this package.
1066 //
1067 // InternalFetch returns results from a single call to the underlying RPC.
1068 // The number of results is no greater than pageSize.
1069 // If there are no more results, nextPageToken is empty and err is nil.
1070 InternalFetch func(pageSize int, pageToken string) (results []*certificatemanagerpb.CertificateIssuanceConfig, nextPageToken string, err error)
1071 }
1072
1073 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1074 func (it *CertificateIssuanceConfigIterator) PageInfo() *iterator.PageInfo {
1075 return it.pageInfo
1076 }
1077
1078 // Next returns the next result. Its second return value is iterator.Done if there are no more
1079 // results. Once Next returns Done, all subsequent calls will return Done.
1080 func (it *CertificateIssuanceConfigIterator) Next() (*certificatemanagerpb.CertificateIssuanceConfig, error) {
1081 var item *certificatemanagerpb.CertificateIssuanceConfig
1082 if err := it.nextFunc(); err != nil {
1083 return item, err
1084 }
1085 item = it.items[0]
1086 it.items = it.items[1:]
1087 return item, nil
1088 }
1089
1090 func (it *CertificateIssuanceConfigIterator) bufLen() int {
1091 return len(it.items)
1092 }
1093
1094 func (it *CertificateIssuanceConfigIterator) takeBuf() interface{} {
1095 b := it.items
1096 it.items = nil
1097 return b
1098 }
1099
1100 // CertificateIterator manages a stream of *certificatemanagerpb.Certificate.
1101 type CertificateIterator struct {
1102 items []*certificatemanagerpb.Certificate
1103 pageInfo *iterator.PageInfo
1104 nextFunc func() error
1105
1106 // Response is the raw response for the current page.
1107 // It must be cast to the RPC response type.
1108 // Calling Next() or InternalFetch() updates this value.
1109 Response interface{}
1110
1111 // InternalFetch is for use by the Google Cloud Libraries only.
1112 // It is not part of the stable interface of this package.
1113 //
1114 // InternalFetch returns results from a single call to the underlying RPC.
1115 // The number of results is no greater than pageSize.
1116 // If there are no more results, nextPageToken is empty and err is nil.
1117 InternalFetch func(pageSize int, pageToken string) (results []*certificatemanagerpb.Certificate, nextPageToken string, err error)
1118 }
1119
1120 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1121 func (it *CertificateIterator) PageInfo() *iterator.PageInfo {
1122 return it.pageInfo
1123 }
1124
1125 // Next returns the next result. Its second return value is iterator.Done if there are no more
1126 // results. Once Next returns Done, all subsequent calls will return Done.
1127 func (it *CertificateIterator) Next() (*certificatemanagerpb.Certificate, error) {
1128 var item *certificatemanagerpb.Certificate
1129 if err := it.nextFunc(); err != nil {
1130 return item, err
1131 }
1132 item = it.items[0]
1133 it.items = it.items[1:]
1134 return item, nil
1135 }
1136
1137 func (it *CertificateIterator) bufLen() int {
1138 return len(it.items)
1139 }
1140
1141 func (it *CertificateIterator) takeBuf() interface{} {
1142 b := it.items
1143 it.items = nil
1144 return b
1145 }
1146
1147 // CertificateMapEntryIterator manages a stream of *certificatemanagerpb.CertificateMapEntry.
1148 type CertificateMapEntryIterator struct {
1149 items []*certificatemanagerpb.CertificateMapEntry
1150 pageInfo *iterator.PageInfo
1151 nextFunc func() error
1152
1153 // Response is the raw response for the current page.
1154 // It must be cast to the RPC response type.
1155 // Calling Next() or InternalFetch() updates this value.
1156 Response interface{}
1157
1158 // InternalFetch is for use by the Google Cloud Libraries only.
1159 // It is not part of the stable interface of this package.
1160 //
1161 // InternalFetch returns results from a single call to the underlying RPC.
1162 // The number of results is no greater than pageSize.
1163 // If there are no more results, nextPageToken is empty and err is nil.
1164 InternalFetch func(pageSize int, pageToken string) (results []*certificatemanagerpb.CertificateMapEntry, nextPageToken string, err error)
1165 }
1166
1167 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1168 func (it *CertificateMapEntryIterator) PageInfo() *iterator.PageInfo {
1169 return it.pageInfo
1170 }
1171
1172 // Next returns the next result. Its second return value is iterator.Done if there are no more
1173 // results. Once Next returns Done, all subsequent calls will return Done.
1174 func (it *CertificateMapEntryIterator) Next() (*certificatemanagerpb.CertificateMapEntry, error) {
1175 var item *certificatemanagerpb.CertificateMapEntry
1176 if err := it.nextFunc(); err != nil {
1177 return item, err
1178 }
1179 item = it.items[0]
1180 it.items = it.items[1:]
1181 return item, nil
1182 }
1183
1184 func (it *CertificateMapEntryIterator) bufLen() int {
1185 return len(it.items)
1186 }
1187
1188 func (it *CertificateMapEntryIterator) takeBuf() interface{} {
1189 b := it.items
1190 it.items = nil
1191 return b
1192 }
1193
1194 // CertificateMapIterator manages a stream of *certificatemanagerpb.CertificateMap.
1195 type CertificateMapIterator struct {
1196 items []*certificatemanagerpb.CertificateMap
1197 pageInfo *iterator.PageInfo
1198 nextFunc func() error
1199
1200 // Response is the raw response for the current page.
1201 // It must be cast to the RPC response type.
1202 // Calling Next() or InternalFetch() updates this value.
1203 Response interface{}
1204
1205 // InternalFetch is for use by the Google Cloud Libraries only.
1206 // It is not part of the stable interface of this package.
1207 //
1208 // InternalFetch returns results from a single call to the underlying RPC.
1209 // The number of results is no greater than pageSize.
1210 // If there are no more results, nextPageToken is empty and err is nil.
1211 InternalFetch func(pageSize int, pageToken string) (results []*certificatemanagerpb.CertificateMap, nextPageToken string, err error)
1212 }
1213
1214 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1215 func (it *CertificateMapIterator) PageInfo() *iterator.PageInfo {
1216 return it.pageInfo
1217 }
1218
1219 // Next returns the next result. Its second return value is iterator.Done if there are no more
1220 // results. Once Next returns Done, all subsequent calls will return Done.
1221 func (it *CertificateMapIterator) Next() (*certificatemanagerpb.CertificateMap, error) {
1222 var item *certificatemanagerpb.CertificateMap
1223 if err := it.nextFunc(); err != nil {
1224 return item, err
1225 }
1226 item = it.items[0]
1227 it.items = it.items[1:]
1228 return item, nil
1229 }
1230
1231 func (it *CertificateMapIterator) bufLen() int {
1232 return len(it.items)
1233 }
1234
1235 func (it *CertificateMapIterator) takeBuf() interface{} {
1236 b := it.items
1237 it.items = nil
1238 return b
1239 }
1240
1241 // DnsAuthorizationIterator manages a stream of *certificatemanagerpb.DnsAuthorization.
1242 type DnsAuthorizationIterator struct {
1243 items []*certificatemanagerpb.DnsAuthorization
1244 pageInfo *iterator.PageInfo
1245 nextFunc func() error
1246
1247 // Response is the raw response for the current page.
1248 // It must be cast to the RPC response type.
1249 // Calling Next() or InternalFetch() updates this value.
1250 Response interface{}
1251
1252 // InternalFetch is for use by the Google Cloud Libraries only.
1253 // It is not part of the stable interface of this package.
1254 //
1255 // InternalFetch returns results from a single call to the underlying RPC.
1256 // The number of results is no greater than pageSize.
1257 // If there are no more results, nextPageToken is empty and err is nil.
1258 InternalFetch func(pageSize int, pageToken string) (results []*certificatemanagerpb.DnsAuthorization, nextPageToken string, err error)
1259 }
1260
1261 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1262 func (it *DnsAuthorizationIterator) PageInfo() *iterator.PageInfo {
1263 return it.pageInfo
1264 }
1265
1266 // Next returns the next result. Its second return value is iterator.Done if there are no more
1267 // results. Once Next returns Done, all subsequent calls will return Done.
1268 func (it *DnsAuthorizationIterator) Next() (*certificatemanagerpb.DnsAuthorization, error) {
1269 var item *certificatemanagerpb.DnsAuthorization
1270 if err := it.nextFunc(); err != nil {
1271 return item, err
1272 }
1273 item = it.items[0]
1274 it.items = it.items[1:]
1275 return item, nil
1276 }
1277
1278 func (it *DnsAuthorizationIterator) bufLen() int {
1279 return len(it.items)
1280 }
1281
1282 func (it *DnsAuthorizationIterator) takeBuf() interface{} {
1283 b := it.items
1284 it.items = nil
1285 return b
1286 }
1287
1288 // LocationIterator manages a stream of *locationpb.Location.
1289 type LocationIterator struct {
1290 items []*locationpb.Location
1291 pageInfo *iterator.PageInfo
1292 nextFunc func() error
1293
1294 // Response is the raw response for the current page.
1295 // It must be cast to the RPC response type.
1296 // Calling Next() or InternalFetch() updates this value.
1297 Response interface{}
1298
1299 // InternalFetch is for use by the Google Cloud Libraries only.
1300 // It is not part of the stable interface of this package.
1301 //
1302 // InternalFetch returns results from a single call to the underlying RPC.
1303 // The number of results is no greater than pageSize.
1304 // If there are no more results, nextPageToken is empty and err is nil.
1305 InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error)
1306 }
1307
1308 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1309 func (it *LocationIterator) PageInfo() *iterator.PageInfo {
1310 return it.pageInfo
1311 }
1312
1313 // Next returns the next result. Its second return value is iterator.Done if there are no more
1314 // results. Once Next returns Done, all subsequent calls will return Done.
1315 func (it *LocationIterator) Next() (*locationpb.Location, error) {
1316 var item *locationpb.Location
1317 if err := it.nextFunc(); err != nil {
1318 return item, err
1319 }
1320 item = it.items[0]
1321 it.items = it.items[1:]
1322 return item, nil
1323 }
1324
1325 func (it *LocationIterator) bufLen() int {
1326 return len(it.items)
1327 }
1328
1329 func (it *LocationIterator) takeBuf() interface{} {
1330 b := it.items
1331 it.items = nil
1332 return b
1333 }
1334
1335 // OperationIterator manages a stream of *longrunningpb.Operation.
1336 type OperationIterator struct {
1337 items []*longrunningpb.Operation
1338 pageInfo *iterator.PageInfo
1339 nextFunc func() error
1340
1341 // Response is the raw response for the current page.
1342 // It must be cast to the RPC response type.
1343 // Calling Next() or InternalFetch() updates this value.
1344 Response interface{}
1345
1346 // InternalFetch is for use by the Google Cloud Libraries only.
1347 // It is not part of the stable interface of this package.
1348 //
1349 // InternalFetch returns results from a single call to the underlying RPC.
1350 // The number of results is no greater than pageSize.
1351 // If there are no more results, nextPageToken is empty and err is nil.
1352 InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
1353 }
1354
1355 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1356 func (it *OperationIterator) PageInfo() *iterator.PageInfo {
1357 return it.pageInfo
1358 }
1359
1360 // Next returns the next result. Its second return value is iterator.Done if there are no more
1361 // results. Once Next returns Done, all subsequent calls will return Done.
1362 func (it *OperationIterator) Next() (*longrunningpb.Operation, error) {
1363 var item *longrunningpb.Operation
1364 if err := it.nextFunc(); err != nil {
1365 return item, err
1366 }
1367 item = it.items[0]
1368 it.items = it.items[1:]
1369 return item, nil
1370 }
1371
1372 func (it *OperationIterator) bufLen() int {
1373 return len(it.items)
1374 }
1375
1376 func (it *OperationIterator) takeBuf() interface{} {
1377 b := it.items
1378 it.items = nil
1379 return b
1380 }
1381
1382 // TrustConfigIterator manages a stream of *certificatemanagerpb.TrustConfig.
1383 type TrustConfigIterator struct {
1384 items []*certificatemanagerpb.TrustConfig
1385 pageInfo *iterator.PageInfo
1386 nextFunc func() error
1387
1388 // Response is the raw response for the current page.
1389 // It must be cast to the RPC response type.
1390 // Calling Next() or InternalFetch() updates this value.
1391 Response interface{}
1392
1393 // InternalFetch is for use by the Google Cloud Libraries only.
1394 // It is not part of the stable interface of this package.
1395 //
1396 // InternalFetch returns results from a single call to the underlying RPC.
1397 // The number of results is no greater than pageSize.
1398 // If there are no more results, nextPageToken is empty and err is nil.
1399 InternalFetch func(pageSize int, pageToken string) (results []*certificatemanagerpb.TrustConfig, nextPageToken string, err error)
1400 }
1401
1402 // PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
1403 func (it *TrustConfigIterator) PageInfo() *iterator.PageInfo {
1404 return it.pageInfo
1405 }
1406
1407 // Next returns the next result. Its second return value is iterator.Done if there are no more
1408 // results. Once Next returns Done, all subsequent calls will return Done.
1409 func (it *TrustConfigIterator) Next() (*certificatemanagerpb.TrustConfig, error) {
1410 var item *certificatemanagerpb.TrustConfig
1411 if err := it.nextFunc(); err != nil {
1412 return item, err
1413 }
1414 item = it.items[0]
1415 it.items = it.items[1:]
1416 return item, nil
1417 }
1418
1419 func (it *TrustConfigIterator) bufLen() int {
1420 return len(it.items)
1421 }
1422
1423 func (it *TrustConfigIterator) takeBuf() interface{} {
1424 b := it.items
1425 it.items = nil
1426 return b
1427 }