Debian Codegraph @

telcoautomation/apiv1/telco_automation_client_example_test.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_test
18
19 import (
20 "context"
21
22 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
23 telcoautomation "cloud.google.com/go/telcoautomation/apiv1"
24 telcoautomationpb "cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb"
25 "google.golang.org/api/iterator"
26 locationpb "google.golang.org/genproto/googleapis/cloud/location"
27 )
28
29 func ExampleNewClient() {
30 ctx := context.Background()
31 // This snippet has been automatically generated and should be regarded as a code template only.
32 // It will require modifications to work:
33 // - It may require correct/in-range values for request initialization.
34 // - It may require specifying regional endpoints when creating the service client as shown in:
35 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
36 c, err := telcoautomation.NewClient(ctx)
37 if err != nil {
38 // TODO: Handle error.
39 }
40 defer c.Close()
41
42 // TODO: Use client.
43 _ = c
44 }
45
46 func ExampleNewRESTClient() {
47 ctx := context.Background()
48 // This snippet has been automatically generated and should be regarded as a code template only.
49 // It will require modifications to work:
50 // - It may require correct/in-range values for request initialization.
51 // - It may require specifying regional endpoints when creating the service client as shown in:
52 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
53 c, err := telcoautomation.NewRESTClient(ctx)
54 if err != nil {
55 // TODO: Handle error.
56 }
57 defer c.Close()
58
59 // TODO: Use client.
60 _ = c
61 }
62
63 func ExampleClient_ApplyDeployment() {
64 ctx := context.Background()
65 // This snippet has been automatically generated and should be regarded as a code template only.
66 // It will require modifications to work:
67 // - It may require correct/in-range values for request initialization.
68 // - It may require specifying regional endpoints when creating the service client as shown in:
69 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
70 c, err := telcoautomation.NewClient(ctx)
71 if err != nil {
72 // TODO: Handle error.
73 }
74 defer c.Close()
75
76 req := &telcoautomationpb.ApplyDeploymentRequest{
77 // TODO: Fill request struct fields.
78 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ApplyDeploymentRequest.
79 }
80 resp, err := c.ApplyDeployment(ctx, req)
81 if err != nil {
82 // TODO: Handle error.
83 }
84 // TODO: Use resp.
85 _ = resp
86 }
87
88 func ExampleClient_ApplyHydratedDeployment() {
89 ctx := context.Background()
90 // This snippet has been automatically generated and should be regarded as a code template only.
91 // It will require modifications to work:
92 // - It may require correct/in-range values for request initialization.
93 // - It may require specifying regional endpoints when creating the service client as shown in:
94 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
95 c, err := telcoautomation.NewClient(ctx)
96 if err != nil {
97 // TODO: Handle error.
98 }
99 defer c.Close()
100
101 req := &telcoautomationpb.ApplyHydratedDeploymentRequest{
102 // TODO: Fill request struct fields.
103 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ApplyHydratedDeploymentRequest.
104 }
105 resp, err := c.ApplyHydratedDeployment(ctx, req)
106 if err != nil {
107 // TODO: Handle error.
108 }
109 // TODO: Use resp.
110 _ = resp
111 }
112
113 func ExampleClient_ApproveBlueprint() {
114 ctx := context.Background()
115 // This snippet has been automatically generated and should be regarded as a code template only.
116 // It will require modifications to work:
117 // - It may require correct/in-range values for request initialization.
118 // - It may require specifying regional endpoints when creating the service client as shown in:
119 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
120 c, err := telcoautomation.NewClient(ctx)
121 if err != nil {
122 // TODO: Handle error.
123 }
124 defer c.Close()
125
126 req := &telcoautomationpb.ApproveBlueprintRequest{
127 // TODO: Fill request struct fields.
128 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ApproveBlueprintRequest.
129 }
130 resp, err := c.ApproveBlueprint(ctx, req)
131 if err != nil {
132 // TODO: Handle error.
133 }
134 // TODO: Use resp.
135 _ = resp
136 }
137
138 func ExampleClient_ComputeDeploymentStatus() {
139 ctx := context.Background()
140 // This snippet has been automatically generated and should be regarded as a code template only.
141 // It will require modifications to work:
142 // - It may require correct/in-range values for request initialization.
143 // - It may require specifying regional endpoints when creating the service client as shown in:
144 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
145 c, err := telcoautomation.NewClient(ctx)
146 if err != nil {
147 // TODO: Handle error.
148 }
149 defer c.Close()
150
151 req := &telcoautomationpb.ComputeDeploymentStatusRequest{
152 // TODO: Fill request struct fields.
153 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ComputeDeploymentStatusRequest.
154 }
155 resp, err := c.ComputeDeploymentStatus(ctx, req)
156 if err != nil {
157 // TODO: Handle error.
158 }
159 // TODO: Use resp.
160 _ = resp
161 }
162
163 func ExampleClient_CreateBlueprint() {
164 ctx := context.Background()
165 // This snippet has been automatically generated and should be regarded as a code template only.
166 // It will require modifications to work:
167 // - It may require correct/in-range values for request initialization.
168 // - It may require specifying regional endpoints when creating the service client as shown in:
169 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
170 c, err := telcoautomation.NewClient(ctx)
171 if err != nil {
172 // TODO: Handle error.
173 }
174 defer c.Close()
175
176 req := &telcoautomationpb.CreateBlueprintRequest{
177 // TODO: Fill request struct fields.
178 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#CreateBlueprintRequest.
179 }
180 resp, err := c.CreateBlueprint(ctx, req)
181 if err != nil {
182 // TODO: Handle error.
183 }
184 // TODO: Use resp.
185 _ = resp
186 }
187
188 func ExampleClient_CreateDeployment() {
189 ctx := context.Background()
190 // This snippet has been automatically generated and should be regarded as a code template only.
191 // It will require modifications to work:
192 // - It may require correct/in-range values for request initialization.
193 // - It may require specifying regional endpoints when creating the service client as shown in:
194 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
195 c, err := telcoautomation.NewClient(ctx)
196 if err != nil {
197 // TODO: Handle error.
198 }
199 defer c.Close()
200
201 req := &telcoautomationpb.CreateDeploymentRequest{
202 // TODO: Fill request struct fields.
203 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#CreateDeploymentRequest.
204 }
205 resp, err := c.CreateDeployment(ctx, req)
206 if err != nil {
207 // TODO: Handle error.
208 }
209 // TODO: Use resp.
210 _ = resp
211 }
212
213 func ExampleClient_CreateEdgeSlm() {
214 ctx := context.Background()
215 // This snippet has been automatically generated and should be regarded as a code template only.
216 // It will require modifications to work:
217 // - It may require correct/in-range values for request initialization.
218 // - It may require specifying regional endpoints when creating the service client as shown in:
219 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
220 c, err := telcoautomation.NewClient(ctx)
221 if err != nil {
222 // TODO: Handle error.
223 }
224 defer c.Close()
225
226 req := &telcoautomationpb.CreateEdgeSlmRequest{
227 // TODO: Fill request struct fields.
228 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#CreateEdgeSlmRequest.
229 }
230 op, err := c.CreateEdgeSlm(ctx, req)
231 if err != nil {
232 // TODO: Handle error.
233 }
234
235 resp, err := op.Wait(ctx)
236 if err != nil {
237 // TODO: Handle error.
238 }
239 // TODO: Use resp.
240 _ = resp
241 }
242
243 func ExampleClient_CreateOrchestrationCluster() {
244 ctx := context.Background()
245 // This snippet has been automatically generated and should be regarded as a code template only.
246 // It will require modifications to work:
247 // - It may require correct/in-range values for request initialization.
248 // - It may require specifying regional endpoints when creating the service client as shown in:
249 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
250 c, err := telcoautomation.NewClient(ctx)
251 if err != nil {
252 // TODO: Handle error.
253 }
254 defer c.Close()
255
256 req := &telcoautomationpb.CreateOrchestrationClusterRequest{
257 // TODO: Fill request struct fields.
258 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#CreateOrchestrationClusterRequest.
259 }
260 op, err := c.CreateOrchestrationCluster(ctx, req)
261 if err != nil {
262 // TODO: Handle error.
263 }
264
265 resp, err := op.Wait(ctx)
266 if err != nil {
267 // TODO: Handle error.
268 }
269 // TODO: Use resp.
270 _ = resp
271 }
272
273 func ExampleClient_DeleteBlueprint() {
274 ctx := context.Background()
275 // This snippet has been automatically generated and should be regarded as a code template only.
276 // It will require modifications to work:
277 // - It may require correct/in-range values for request initialization.
278 // - It may require specifying regional endpoints when creating the service client as shown in:
279 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
280 c, err := telcoautomation.NewClient(ctx)
281 if err != nil {
282 // TODO: Handle error.
283 }
284 defer c.Close()
285
286 req := &telcoautomationpb.DeleteBlueprintRequest{
287 // TODO: Fill request struct fields.
288 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#DeleteBlueprintRequest.
289 }
290 err = c.DeleteBlueprint(ctx, req)
291 if err != nil {
292 // TODO: Handle error.
293 }
294 }
295
296 func ExampleClient_DeleteEdgeSlm() {
297 ctx := context.Background()
298 // This snippet has been automatically generated and should be regarded as a code template only.
299 // It will require modifications to work:
300 // - It may require correct/in-range values for request initialization.
301 // - It may require specifying regional endpoints when creating the service client as shown in:
302 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
303 c, err := telcoautomation.NewClient(ctx)
304 if err != nil {
305 // TODO: Handle error.
306 }
307 defer c.Close()
308
309 req := &telcoautomationpb.DeleteEdgeSlmRequest{
310 // TODO: Fill request struct fields.
311 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#DeleteEdgeSlmRequest.
312 }
313 op, err := c.DeleteEdgeSlm(ctx, req)
314 if err != nil {
315 // TODO: Handle error.
316 }
317
318 err = op.Wait(ctx)
319 if err != nil {
320 // TODO: Handle error.
321 }
322 }
323
324 func ExampleClient_DeleteOrchestrationCluster() {
325 ctx := context.Background()
326 // This snippet has been automatically generated and should be regarded as a code template only.
327 // It will require modifications to work:
328 // - It may require correct/in-range values for request initialization.
329 // - It may require specifying regional endpoints when creating the service client as shown in:
330 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
331 c, err := telcoautomation.NewClient(ctx)
332 if err != nil {
333 // TODO: Handle error.
334 }
335 defer c.Close()
336
337 req := &telcoautomationpb.DeleteOrchestrationClusterRequest{
338 // TODO: Fill request struct fields.
339 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#DeleteOrchestrationClusterRequest.
340 }
341 op, err := c.DeleteOrchestrationCluster(ctx, req)
342 if err != nil {
343 // TODO: Handle error.
344 }
345
346 err = op.Wait(ctx)
347 if err != nil {
348 // TODO: Handle error.
349 }
350 }
351
352 func ExampleClient_DiscardBlueprintChanges() {
353 ctx := context.Background()
354 // This snippet has been automatically generated and should be regarded as a code template only.
355 // It will require modifications to work:
356 // - It may require correct/in-range values for request initialization.
357 // - It may require specifying regional endpoints when creating the service client as shown in:
358 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
359 c, err := telcoautomation.NewClient(ctx)
360 if err != nil {
361 // TODO: Handle error.
362 }
363 defer c.Close()
364
365 req := &telcoautomationpb.DiscardBlueprintChangesRequest{
366 // TODO: Fill request struct fields.
367 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#DiscardBlueprintChangesRequest.
368 }
369 resp, err := c.DiscardBlueprintChanges(ctx, req)
370 if err != nil {
371 // TODO: Handle error.
372 }
373 // TODO: Use resp.
374 _ = resp
375 }
376
377 func ExampleClient_DiscardDeploymentChanges() {
378 ctx := context.Background()
379 // This snippet has been automatically generated and should be regarded as a code template only.
380 // It will require modifications to work:
381 // - It may require correct/in-range values for request initialization.
382 // - It may require specifying regional endpoints when creating the service client as shown in:
383 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
384 c, err := telcoautomation.NewClient(ctx)
385 if err != nil {
386 // TODO: Handle error.
387 }
388 defer c.Close()
389
390 req := &telcoautomationpb.DiscardDeploymentChangesRequest{
391 // TODO: Fill request struct fields.
392 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#DiscardDeploymentChangesRequest.
393 }
394 resp, err := c.DiscardDeploymentChanges(ctx, req)
395 if err != nil {
396 // TODO: Handle error.
397 }
398 // TODO: Use resp.
399 _ = resp
400 }
401
402 func ExampleClient_GetBlueprint() {
403 ctx := context.Background()
404 // This snippet has been automatically generated and should be regarded as a code template only.
405 // It will require modifications to work:
406 // - It may require correct/in-range values for request initialization.
407 // - It may require specifying regional endpoints when creating the service client as shown in:
408 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
409 c, err := telcoautomation.NewClient(ctx)
410 if err != nil {
411 // TODO: Handle error.
412 }
413 defer c.Close()
414
415 req := &telcoautomationpb.GetBlueprintRequest{
416 // TODO: Fill request struct fields.
417 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#GetBlueprintRequest.
418 }
419 resp, err := c.GetBlueprint(ctx, req)
420 if err != nil {
421 // TODO: Handle error.
422 }
423 // TODO: Use resp.
424 _ = resp
425 }
426
427 func ExampleClient_GetDeployment() {
428 ctx := context.Background()
429 // This snippet has been automatically generated and should be regarded as a code template only.
430 // It will require modifications to work:
431 // - It may require correct/in-range values for request initialization.
432 // - It may require specifying regional endpoints when creating the service client as shown in:
433 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
434 c, err := telcoautomation.NewClient(ctx)
435 if err != nil {
436 // TODO: Handle error.
437 }
438 defer c.Close()
439
440 req := &telcoautomationpb.GetDeploymentRequest{
441 // TODO: Fill request struct fields.
442 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#GetDeploymentRequest.
443 }
444 resp, err := c.GetDeployment(ctx, req)
445 if err != nil {
446 // TODO: Handle error.
447 }
448 // TODO: Use resp.
449 _ = resp
450 }
451
452 func ExampleClient_GetEdgeSlm() {
453 ctx := context.Background()
454 // This snippet has been automatically generated and should be regarded as a code template only.
455 // It will require modifications to work:
456 // - It may require correct/in-range values for request initialization.
457 // - It may require specifying regional endpoints when creating the service client as shown in:
458 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
459 c, err := telcoautomation.NewClient(ctx)
460 if err != nil {
461 // TODO: Handle error.
462 }
463 defer c.Close()
464
465 req := &telcoautomationpb.GetEdgeSlmRequest{
466 // TODO: Fill request struct fields.
467 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#GetEdgeSlmRequest.
468 }
469 resp, err := c.GetEdgeSlm(ctx, req)
470 if err != nil {
471 // TODO: Handle error.
472 }
473 // TODO: Use resp.
474 _ = resp
475 }
476
477 func ExampleClient_GetHydratedDeployment() {
478 ctx := context.Background()
479 // This snippet has been automatically generated and should be regarded as a code template only.
480 // It will require modifications to work:
481 // - It may require correct/in-range values for request initialization.
482 // - It may require specifying regional endpoints when creating the service client as shown in:
483 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
484 c, err := telcoautomation.NewClient(ctx)
485 if err != nil {
486 // TODO: Handle error.
487 }
488 defer c.Close()
489
490 req := &telcoautomationpb.GetHydratedDeploymentRequest{
491 // TODO: Fill request struct fields.
492 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#GetHydratedDeploymentRequest.
493 }
494 resp, err := c.GetHydratedDeployment(ctx, req)
495 if err != nil {
496 // TODO: Handle error.
497 }
498 // TODO: Use resp.
499 _ = resp
500 }
501
502 func ExampleClient_GetOrchestrationCluster() {
503 ctx := context.Background()
504 // This snippet has been automatically generated and should be regarded as a code template only.
505 // It will require modifications to work:
506 // - It may require correct/in-range values for request initialization.
507 // - It may require specifying regional endpoints when creating the service client as shown in:
508 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
509 c, err := telcoautomation.NewClient(ctx)
510 if err != nil {
511 // TODO: Handle error.
512 }
513 defer c.Close()
514
515 req := &telcoautomationpb.GetOrchestrationClusterRequest{
516 // TODO: Fill request struct fields.
517 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#GetOrchestrationClusterRequest.
518 }
519 resp, err := c.GetOrchestrationCluster(ctx, req)
520 if err != nil {
521 // TODO: Handle error.
522 }
523 // TODO: Use resp.
524 _ = resp
525 }
526
527 func ExampleClient_GetPublicBlueprint() {
528 ctx := context.Background()
529 // This snippet has been automatically generated and should be regarded as a code template only.
530 // It will require modifications to work:
531 // - It may require correct/in-range values for request initialization.
532 // - It may require specifying regional endpoints when creating the service client as shown in:
533 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
534 c, err := telcoautomation.NewClient(ctx)
535 if err != nil {
536 // TODO: Handle error.
537 }
538 defer c.Close()
539
540 req := &telcoautomationpb.GetPublicBlueprintRequest{
541 // TODO: Fill request struct fields.
542 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#GetPublicBlueprintRequest.
543 }
544 resp, err := c.GetPublicBlueprint(ctx, req)
545 if err != nil {
546 // TODO: Handle error.
547 }
548 // TODO: Use resp.
549 _ = resp
550 }
551
552 func ExampleClient_ListBlueprintRevisions() {
553 ctx := context.Background()
554 // This snippet has been automatically generated and should be regarded as a code template only.
555 // It will require modifications to work:
556 // - It may require correct/in-range values for request initialization.
557 // - It may require specifying regional endpoints when creating the service client as shown in:
558 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
559 c, err := telcoautomation.NewClient(ctx)
560 if err != nil {
561 // TODO: Handle error.
562 }
563 defer c.Close()
564
565 req := &telcoautomationpb.ListBlueprintRevisionsRequest{
566 // TODO: Fill request struct fields.
567 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListBlueprintRevisionsRequest.
568 }
569 it := c.ListBlueprintRevisions(ctx, req)
570 for {
571 resp, err := it.Next()
572 if err == iterator.Done {
573 break
574 }
575 if err != nil {
576 // TODO: Handle error.
577 }
578 // TODO: Use resp.
579 _ = resp
580
581 // If you need to access the underlying RPC response,
582 // you can do so by casting the `Response` as below.
583 // Otherwise, remove this line. Only populated after
584 // first call to Next(). Not safe for concurrent access.
585 _ = it.Response.(*telcoautomationpb.ListBlueprintRevisionsResponse)
586 }
587 }
588
589 func ExampleClient_ListBlueprints() {
590 ctx := context.Background()
591 // This snippet has been automatically generated and should be regarded as a code template only.
592 // It will require modifications to work:
593 // - It may require correct/in-range values for request initialization.
594 // - It may require specifying regional endpoints when creating the service client as shown in:
595 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
596 c, err := telcoautomation.NewClient(ctx)
597 if err != nil {
598 // TODO: Handle error.
599 }
600 defer c.Close()
601
602 req := &telcoautomationpb.ListBlueprintsRequest{
603 // TODO: Fill request struct fields.
604 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListBlueprintsRequest.
605 }
606 it := c.ListBlueprints(ctx, req)
607 for {
608 resp, err := it.Next()
609 if err == iterator.Done {
610 break
611 }
612 if err != nil {
613 // TODO: Handle error.
614 }
615 // TODO: Use resp.
616 _ = resp
617
618 // If you need to access the underlying RPC response,
619 // you can do so by casting the `Response` as below.
620 // Otherwise, remove this line. Only populated after
621 // first call to Next(). Not safe for concurrent access.
622 _ = it.Response.(*telcoautomationpb.ListBlueprintsResponse)
623 }
624 }
625
626 func ExampleClient_ListDeploymentRevisions() {
627 ctx := context.Background()
628 // This snippet has been automatically generated and should be regarded as a code template only.
629 // It will require modifications to work:
630 // - It may require correct/in-range values for request initialization.
631 // - It may require specifying regional endpoints when creating the service client as shown in:
632 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
633 c, err := telcoautomation.NewClient(ctx)
634 if err != nil {
635 // TODO: Handle error.
636 }
637 defer c.Close()
638
639 req := &telcoautomationpb.ListDeploymentRevisionsRequest{
640 // TODO: Fill request struct fields.
641 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListDeploymentRevisionsRequest.
642 }
643 it := c.ListDeploymentRevisions(ctx, req)
644 for {
645 resp, err := it.Next()
646 if err == iterator.Done {
647 break
648 }
649 if err != nil {
650 // TODO: Handle error.
651 }
652 // TODO: Use resp.
653 _ = resp
654
655 // If you need to access the underlying RPC response,
656 // you can do so by casting the `Response` as below.
657 // Otherwise, remove this line. Only populated after
658 // first call to Next(). Not safe for concurrent access.
659 _ = it.Response.(*telcoautomationpb.ListDeploymentRevisionsResponse)
660 }
661 }
662
663 func ExampleClient_ListDeployments() {
664 ctx := context.Background()
665 // This snippet has been automatically generated and should be regarded as a code template only.
666 // It will require modifications to work:
667 // - It may require correct/in-range values for request initialization.
668 // - It may require specifying regional endpoints when creating the service client as shown in:
669 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
670 c, err := telcoautomation.NewClient(ctx)
671 if err != nil {
672 // TODO: Handle error.
673 }
674 defer c.Close()
675
676 req := &telcoautomationpb.ListDeploymentsRequest{
677 // TODO: Fill request struct fields.
678 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListDeploymentsRequest.
679 }
680 it := c.ListDeployments(ctx, req)
681 for {
682 resp, err := it.Next()
683 if err == iterator.Done {
684 break
685 }
686 if err != nil {
687 // TODO: Handle error.
688 }
689 // TODO: Use resp.
690 _ = resp
691
692 // If you need to access the underlying RPC response,
693 // you can do so by casting the `Response` as below.
694 // Otherwise, remove this line. Only populated after
695 // first call to Next(). Not safe for concurrent access.
696 _ = it.Response.(*telcoautomationpb.ListDeploymentsResponse)
697 }
698 }
699
700 func ExampleClient_ListEdgeSlms() {
701 ctx := context.Background()
702 // This snippet has been automatically generated and should be regarded as a code template only.
703 // It will require modifications to work:
704 // - It may require correct/in-range values for request initialization.
705 // - It may require specifying regional endpoints when creating the service client as shown in:
706 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
707 c, err := telcoautomation.NewClient(ctx)
708 if err != nil {
709 // TODO: Handle error.
710 }
711 defer c.Close()
712
713 req := &telcoautomationpb.ListEdgeSlmsRequest{
714 // TODO: Fill request struct fields.
715 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListEdgeSlmsRequest.
716 }
717 it := c.ListEdgeSlms(ctx, req)
718 for {
719 resp, err := it.Next()
720 if err == iterator.Done {
721 break
722 }
723 if err != nil {
724 // TODO: Handle error.
725 }
726 // TODO: Use resp.
727 _ = resp
728
729 // If you need to access the underlying RPC response,
730 // you can do so by casting the `Response` as below.
731 // Otherwise, remove this line. Only populated after
732 // first call to Next(). Not safe for concurrent access.
733 _ = it.Response.(*telcoautomationpb.ListEdgeSlmsResponse)
734 }
735 }
736
737 func ExampleClient_ListHydratedDeployments() {
738 ctx := context.Background()
739 // This snippet has been automatically generated and should be regarded as a code template only.
740 // It will require modifications to work:
741 // - It may require correct/in-range values for request initialization.
742 // - It may require specifying regional endpoints when creating the service client as shown in:
743 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
744 c, err := telcoautomation.NewClient(ctx)
745 if err != nil {
746 // TODO: Handle error.
747 }
748 defer c.Close()
749
750 req := &telcoautomationpb.ListHydratedDeploymentsRequest{
751 // TODO: Fill request struct fields.
752 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListHydratedDeploymentsRequest.
753 }
754 it := c.ListHydratedDeployments(ctx, req)
755 for {
756 resp, err := it.Next()
757 if err == iterator.Done {
758 break
759 }
760 if err != nil {
761 // TODO: Handle error.
762 }
763 // TODO: Use resp.
764 _ = resp
765
766 // If you need to access the underlying RPC response,
767 // you can do so by casting the `Response` as below.
768 // Otherwise, remove this line. Only populated after
769 // first call to Next(). Not safe for concurrent access.
770 _ = it.Response.(*telcoautomationpb.ListHydratedDeploymentsResponse)
771 }
772 }
773
774 func ExampleClient_ListOrchestrationClusters() {
775 ctx := context.Background()
776 // This snippet has been automatically generated and should be regarded as a code template only.
777 // It will require modifications to work:
778 // - It may require correct/in-range values for request initialization.
779 // - It may require specifying regional endpoints when creating the service client as shown in:
780 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
781 c, err := telcoautomation.NewClient(ctx)
782 if err != nil {
783 // TODO: Handle error.
784 }
785 defer c.Close()
786
787 req := &telcoautomationpb.ListOrchestrationClustersRequest{
788 // TODO: Fill request struct fields.
789 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListOrchestrationClustersRequest.
790 }
791 it := c.ListOrchestrationClusters(ctx, req)
792 for {
793 resp, err := it.Next()
794 if err == iterator.Done {
795 break
796 }
797 if err != nil {
798 // TODO: Handle error.
799 }
800 // TODO: Use resp.
801 _ = resp
802
803 // If you need to access the underlying RPC response,
804 // you can do so by casting the `Response` as below.
805 // Otherwise, remove this line. Only populated after
806 // first call to Next(). Not safe for concurrent access.
807 _ = it.Response.(*telcoautomationpb.ListOrchestrationClustersResponse)
808 }
809 }
810
811 func ExampleClient_ListPublicBlueprints() {
812 ctx := context.Background()
813 // This snippet has been automatically generated and should be regarded as a code template only.
814 // It will require modifications to work:
815 // - It may require correct/in-range values for request initialization.
816 // - It may require specifying regional endpoints when creating the service client as shown in:
817 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
818 c, err := telcoautomation.NewClient(ctx)
819 if err != nil {
820 // TODO: Handle error.
821 }
822 defer c.Close()
823
824 req := &telcoautomationpb.ListPublicBlueprintsRequest{
825 // TODO: Fill request struct fields.
826 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ListPublicBlueprintsRequest.
827 }
828 it := c.ListPublicBlueprints(ctx, req)
829 for {
830 resp, err := it.Next()
831 if err == iterator.Done {
832 break
833 }
834 if err != nil {
835 // TODO: Handle error.
836 }
837 // TODO: Use resp.
838 _ = resp
839
840 // If you need to access the underlying RPC response,
841 // you can do so by casting the `Response` as below.
842 // Otherwise, remove this line. Only populated after
843 // first call to Next(). Not safe for concurrent access.
844 _ = it.Response.(*telcoautomationpb.ListPublicBlueprintsResponse)
845 }
846 }
847
848 func ExampleClient_ProposeBlueprint() {
849 ctx := context.Background()
850 // This snippet has been automatically generated and should be regarded as a code template only.
851 // It will require modifications to work:
852 // - It may require correct/in-range values for request initialization.
853 // - It may require specifying regional endpoints when creating the service client as shown in:
854 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
855 c, err := telcoautomation.NewClient(ctx)
856 if err != nil {
857 // TODO: Handle error.
858 }
859 defer c.Close()
860
861 req := &telcoautomationpb.ProposeBlueprintRequest{
862 // TODO: Fill request struct fields.
863 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#ProposeBlueprintRequest.
864 }
865 resp, err := c.ProposeBlueprint(ctx, req)
866 if err != nil {
867 // TODO: Handle error.
868 }
869 // TODO: Use resp.
870 _ = resp
871 }
872
873 func ExampleClient_RejectBlueprint() {
874 ctx := context.Background()
875 // This snippet has been automatically generated and should be regarded as a code template only.
876 // It will require modifications to work:
877 // - It may require correct/in-range values for request initialization.
878 // - It may require specifying regional endpoints when creating the service client as shown in:
879 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
880 c, err := telcoautomation.NewClient(ctx)
881 if err != nil {
882 // TODO: Handle error.
883 }
884 defer c.Close()
885
886 req := &telcoautomationpb.RejectBlueprintRequest{
887 // TODO: Fill request struct fields.
888 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#RejectBlueprintRequest.
889 }
890 resp, err := c.RejectBlueprint(ctx, req)
891 if err != nil {
892 // TODO: Handle error.
893 }
894 // TODO: Use resp.
895 _ = resp
896 }
897
898 func ExampleClient_RemoveDeployment() {
899 ctx := context.Background()
900 // This snippet has been automatically generated and should be regarded as a code template only.
901 // It will require modifications to work:
902 // - It may require correct/in-range values for request initialization.
903 // - It may require specifying regional endpoints when creating the service client as shown in:
904 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
905 c, err := telcoautomation.NewClient(ctx)
906 if err != nil {
907 // TODO: Handle error.
908 }
909 defer c.Close()
910
911 req := &telcoautomationpb.RemoveDeploymentRequest{
912 // TODO: Fill request struct fields.
913 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#RemoveDeploymentRequest.
914 }
915 err = c.RemoveDeployment(ctx, req)
916 if err != nil {
917 // TODO: Handle error.
918 }
919 }
920
921 func ExampleClient_RollbackDeployment() {
922 ctx := context.Background()
923 // This snippet has been automatically generated and should be regarded as a code template only.
924 // It will require modifications to work:
925 // - It may require correct/in-range values for request initialization.
926 // - It may require specifying regional endpoints when creating the service client as shown in:
927 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
928 c, err := telcoautomation.NewClient(ctx)
929 if err != nil {
930 // TODO: Handle error.
931 }
932 defer c.Close()
933
934 req := &telcoautomationpb.RollbackDeploymentRequest{
935 // TODO: Fill request struct fields.
936 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#RollbackDeploymentRequest.
937 }
938 resp, err := c.RollbackDeployment(ctx, req)
939 if err != nil {
940 // TODO: Handle error.
941 }
942 // TODO: Use resp.
943 _ = resp
944 }
945
946 func ExampleClient_SearchBlueprintRevisions() {
947 ctx := context.Background()
948 // This snippet has been automatically generated and should be regarded as a code template only.
949 // It will require modifications to work:
950 // - It may require correct/in-range values for request initialization.
951 // - It may require specifying regional endpoints when creating the service client as shown in:
952 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
953 c, err := telcoautomation.NewClient(ctx)
954 if err != nil {
955 // TODO: Handle error.
956 }
957 defer c.Close()
958
959 req := &telcoautomationpb.SearchBlueprintRevisionsRequest{
960 // TODO: Fill request struct fields.
961 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#SearchBlueprintRevisionsRequest.
962 }
963 it := c.SearchBlueprintRevisions(ctx, req)
964 for {
965 resp, err := it.Next()
966 if err == iterator.Done {
967 break
968 }
969 if err != nil {
970 // TODO: Handle error.
971 }
972 // TODO: Use resp.
973 _ = resp
974
975 // If you need to access the underlying RPC response,
976 // you can do so by casting the `Response` as below.
977 // Otherwise, remove this line. Only populated after
978 // first call to Next(). Not safe for concurrent access.
979 _ = it.Response.(*telcoautomationpb.SearchBlueprintRevisionsResponse)
980 }
981 }
982
983 func ExampleClient_SearchDeploymentRevisions() {
984 ctx := context.Background()
985 // This snippet has been automatically generated and should be regarded as a code template only.
986 // It will require modifications to work:
987 // - It may require correct/in-range values for request initialization.
988 // - It may require specifying regional endpoints when creating the service client as shown in:
989 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
990 c, err := telcoautomation.NewClient(ctx)
991 if err != nil {
992 // TODO: Handle error.
993 }
994 defer c.Close()
995
996 req := &telcoautomationpb.SearchDeploymentRevisionsRequest{
997 // TODO: Fill request struct fields.
998 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#SearchDeploymentRevisionsRequest.
999 }
1000 it := c.SearchDeploymentRevisions(ctx, req)
1001 for {
1002 resp, err := it.Next()
1003 if err == iterator.Done {
1004 break
1005 }
1006 if err != nil {
1007 // TODO: Handle error.
1008 }
1009 // TODO: Use resp.
1010 _ = resp
1011
1012 // If you need to access the underlying RPC response,
1013 // you can do so by casting the `Response` as below.
1014 // Otherwise, remove this line. Only populated after
1015 // first call to Next(). Not safe for concurrent access.
1016 _ = it.Response.(*telcoautomationpb.SearchDeploymentRevisionsResponse)
1017 }
1018 }
1019
1020 func ExampleClient_UpdateBlueprint() {
1021 ctx := context.Background()
1022 // This snippet has been automatically generated and should be regarded as a code template only.
1023 // It will require modifications to work:
1024 // - It may require correct/in-range values for request initialization.
1025 // - It may require specifying regional endpoints when creating the service client as shown in:
1026 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1027 c, err := telcoautomation.NewClient(ctx)
1028 if err != nil {
1029 // TODO: Handle error.
1030 }
1031 defer c.Close()
1032
1033 req := &telcoautomationpb.UpdateBlueprintRequest{
1034 // TODO: Fill request struct fields.
1035 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#UpdateBlueprintRequest.
1036 }
1037 resp, err := c.UpdateBlueprint(ctx, req)
1038 if err != nil {
1039 // TODO: Handle error.
1040 }
1041 // TODO: Use resp.
1042 _ = resp
1043 }
1044
1045 func ExampleClient_UpdateDeployment() {
1046 ctx := context.Background()
1047 // This snippet has been automatically generated and should be regarded as a code template only.
1048 // It will require modifications to work:
1049 // - It may require correct/in-range values for request initialization.
1050 // - It may require specifying regional endpoints when creating the service client as shown in:
1051 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1052 c, err := telcoautomation.NewClient(ctx)
1053 if err != nil {
1054 // TODO: Handle error.
1055 }
1056 defer c.Close()
1057
1058 req := &telcoautomationpb.UpdateDeploymentRequest{
1059 // TODO: Fill request struct fields.
1060 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#UpdateDeploymentRequest.
1061 }
1062 resp, err := c.UpdateDeployment(ctx, req)
1063 if err != nil {
1064 // TODO: Handle error.
1065 }
1066 // TODO: Use resp.
1067 _ = resp
1068 }
1069
1070 func ExampleClient_UpdateHydratedDeployment() {
1071 ctx := context.Background()
1072 // This snippet has been automatically generated and should be regarded as a code template only.
1073 // It will require modifications to work:
1074 // - It may require correct/in-range values for request initialization.
1075 // - It may require specifying regional endpoints when creating the service client as shown in:
1076 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1077 c, err := telcoautomation.NewClient(ctx)
1078 if err != nil {
1079 // TODO: Handle error.
1080 }
1081 defer c.Close()
1082
1083 req := &telcoautomationpb.UpdateHydratedDeploymentRequest{
1084 // TODO: Fill request struct fields.
1085 // See https://pkg.go.dev/cloud.google.com/go/telcoautomation/apiv1/telcoautomationpb#UpdateHydratedDeploymentRequest.
1086 }
1087 resp, err := c.UpdateHydratedDeployment(ctx, req)
1088 if err != nil {
1089 // TODO: Handle error.
1090 }
1091 // TODO: Use resp.
1092 _ = resp
1093 }
1094
1095 func ExampleClient_GetLocation() {
1096 ctx := context.Background()
1097 // This snippet has been automatically generated and should be regarded as a code template only.
1098 // It will require modifications to work:
1099 // - It may require correct/in-range values for request initialization.
1100 // - It may require specifying regional endpoints when creating the service client as shown in:
1101 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1102 c, err := telcoautomation.NewClient(ctx)
1103 if err != nil {
1104 // TODO: Handle error.
1105 }
1106 defer c.Close()
1107
1108 req := &locationpb.GetLocationRequest{
1109 // TODO: Fill request struct fields.
1110 // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
1111 }
1112 resp, err := c.GetLocation(ctx, req)
1113 if err != nil {
1114 // TODO: Handle error.
1115 }
1116 // TODO: Use resp.
1117 _ = resp
1118 }
1119
1120 func ExampleClient_ListLocations() {
1121 ctx := context.Background()
1122 // This snippet has been automatically generated and should be regarded as a code template only.
1123 // It will require modifications to work:
1124 // - It may require correct/in-range values for request initialization.
1125 // - It may require specifying regional endpoints when creating the service client as shown in:
1126 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1127 c, err := telcoautomation.NewClient(ctx)
1128 if err != nil {
1129 // TODO: Handle error.
1130 }
1131 defer c.Close()
1132
1133 req := &locationpb.ListLocationsRequest{
1134 // TODO: Fill request struct fields.
1135 // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
1136 }
1137 it := c.ListLocations(ctx, req)
1138 for {
1139 resp, err := it.Next()
1140 if err == iterator.Done {
1141 break
1142 }
1143 if err != nil {
1144 // TODO: Handle error.
1145 }
1146 // TODO: Use resp.
1147 _ = resp
1148
1149 // If you need to access the underlying RPC response,
1150 // you can do so by casting the `Response` as below.
1151 // Otherwise, remove this line. Only populated after
1152 // first call to Next(). Not safe for concurrent access.
1153 _ = it.Response.(*locationpb.ListLocationsResponse)
1154 }
1155 }
1156
1157 func ExampleClient_CancelOperation() {
1158 ctx := context.Background()
1159 // This snippet has been automatically generated and should be regarded as a code template only.
1160 // It will require modifications to work:
1161 // - It may require correct/in-range values for request initialization.
1162 // - It may require specifying regional endpoints when creating the service client as shown in:
1163 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1164 c, err := telcoautomation.NewClient(ctx)
1165 if err != nil {
1166 // TODO: Handle error.
1167 }
1168 defer c.Close()
1169
1170 req := &longrunningpb.CancelOperationRequest{
1171 // TODO: Fill request struct fields.
1172 // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
1173 }
1174 err = c.CancelOperation(ctx, req)
1175 if err != nil {
1176 // TODO: Handle error.
1177 }
1178 }
1179
1180 func ExampleClient_DeleteOperation() {
1181 ctx := context.Background()
1182 // This snippet has been automatically generated and should be regarded as a code template only.
1183 // It will require modifications to work:
1184 // - It may require correct/in-range values for request initialization.
1185 // - It may require specifying regional endpoints when creating the service client as shown in:
1186 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1187 c, err := telcoautomation.NewClient(ctx)
1188 if err != nil {
1189 // TODO: Handle error.
1190 }
1191 defer c.Close()
1192
1193 req := &longrunningpb.DeleteOperationRequest{
1194 // TODO: Fill request struct fields.
1195 // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
1196 }
1197 err = c.DeleteOperation(ctx, req)
1198 if err != nil {
1199 // TODO: Handle error.
1200 }
1201 }
1202
1203 func ExampleClient_GetOperation() {
1204 ctx := context.Background()
1205 // This snippet has been automatically generated and should be regarded as a code template only.
1206 // It will require modifications to work:
1207 // - It may require correct/in-range values for request initialization.
1208 // - It may require specifying regional endpoints when creating the service client as shown in:
1209 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1210 c, err := telcoautomation.NewClient(ctx)
1211 if err != nil {
1212 // TODO: Handle error.
1213 }
1214 defer c.Close()
1215
1216 req := &longrunningpb.GetOperationRequest{
1217 // TODO: Fill request struct fields.
1218 // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
1219 }
1220 resp, err := c.GetOperation(ctx, req)
1221 if err != nil {
1222 // TODO: Handle error.
1223 }
1224 // TODO: Use resp.
1225 _ = resp
1226 }
1227
1228 func ExampleClient_ListOperations() {
1229 ctx := context.Background()
1230 // This snippet has been automatically generated and should be regarded as a code template only.
1231 // It will require modifications to work:
1232 // - It may require correct/in-range values for request initialization.
1233 // - It may require specifying regional endpoints when creating the service client as shown in:
1234 // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
1235 c, err := telcoautomation.NewClient(ctx)
1236 if err != nil {
1237 // TODO: Handle error.
1238 }
1239 defer c.Close()
1240
1241 req := &longrunningpb.ListOperationsRequest{
1242 // TODO: Fill request struct fields.
1243 // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
1244 }
1245 it := c.ListOperations(ctx, req)
1246 for {
1247 resp, err := it.Next()
1248 if err == iterator.Done {
1249 break
1250 }
1251 if err != nil {
1252 // TODO: Handle error.
1253 }
1254 // TODO: Use resp.
1255 _ = resp
1256
1257 // If you need to access the underlying RPC response,
1258 // you can do so by casting the `Response` as below.
1259 // Otherwise, remove this line. Only populated after
1260 // first call to Next(). Not safe for concurrent access.
1261 _ = it.Response.(*longrunningpb.ListOperationsResponse)
1262 }
1263 }