/
vm_migration_client.go
executable file
·6774 lines (5875 loc) · 239 KB
/
vm_migration_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package vmmigration
import (
"bytes"
"context"
"fmt"
"io"
"math"
"net/http"
"net/url"
"time"
"cloud.google.com/go/longrunning"
lroauto "cloud.google.com/go/longrunning/autogen"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
vmmigrationpb "cloud.google.com/go/vmmigration/apiv1/vmmigrationpb"
gax "github.com/googleapis/gax-go/v2"
"google.golang.org/api/googleapi"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/option/internaloption"
gtransport "google.golang.org/api/transport/grpc"
httptransport "google.golang.org/api/transport/http"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
"google.golang.org/grpc"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
)
var newClientHook clientHook
// CallOptions contains the retry settings for each method of Client.
type CallOptions struct {
ListSources []gax.CallOption
GetSource []gax.CallOption
CreateSource []gax.CallOption
UpdateSource []gax.CallOption
DeleteSource []gax.CallOption
FetchInventory []gax.CallOption
ListUtilizationReports []gax.CallOption
GetUtilizationReport []gax.CallOption
CreateUtilizationReport []gax.CallOption
DeleteUtilizationReport []gax.CallOption
ListDatacenterConnectors []gax.CallOption
GetDatacenterConnector []gax.CallOption
CreateDatacenterConnector []gax.CallOption
DeleteDatacenterConnector []gax.CallOption
UpgradeAppliance []gax.CallOption
CreateMigratingVm []gax.CallOption
ListMigratingVms []gax.CallOption
GetMigratingVm []gax.CallOption
UpdateMigratingVm []gax.CallOption
DeleteMigratingVm []gax.CallOption
StartMigration []gax.CallOption
ResumeMigration []gax.CallOption
PauseMigration []gax.CallOption
FinalizeMigration []gax.CallOption
CreateCloneJob []gax.CallOption
CancelCloneJob []gax.CallOption
ListCloneJobs []gax.CallOption
GetCloneJob []gax.CallOption
CreateCutoverJob []gax.CallOption
CancelCutoverJob []gax.CallOption
ListCutoverJobs []gax.CallOption
GetCutoverJob []gax.CallOption
ListGroups []gax.CallOption
GetGroup []gax.CallOption
CreateGroup []gax.CallOption
UpdateGroup []gax.CallOption
DeleteGroup []gax.CallOption
AddGroupMigration []gax.CallOption
RemoveGroupMigration []gax.CallOption
ListTargetProjects []gax.CallOption
GetTargetProject []gax.CallOption
CreateTargetProject []gax.CallOption
UpdateTargetProject []gax.CallOption
DeleteTargetProject []gax.CallOption
ListReplicationCycles []gax.CallOption
GetReplicationCycle []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
func defaultGRPCClientOptions() []option.ClientOption {
return []option.ClientOption{
internaloption.WithDefaultEndpoint("vmmigration.googleapis.com:443"),
internaloption.WithDefaultEndpointTemplate("vmmigration.UNIVERSE_DOMAIN:443"),
internaloption.WithDefaultMTLSEndpoint("vmmigration.mtls.googleapis.com:443"),
internaloption.WithDefaultUniverseDomain("googleapis.com"),
internaloption.WithDefaultAudience("https://vmmigration.googleapis.com/"),
internaloption.WithDefaultScopes(DefaultAuthScopes()...),
internaloption.EnableJwtWithScope(),
option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(math.MaxInt32))),
}
}
func defaultCallOptions() *CallOptions {
return &CallOptions{
ListSources: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetSource: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateSource: []gax.CallOption{
gax.WithTimeout(900000 * time.Millisecond),
},
UpdateSource: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteSource: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
FetchInventory: []gax.CallOption{
gax.WithTimeout(300000 * time.Millisecond),
},
ListUtilizationReports: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetUtilizationReport: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateUtilizationReport: []gax.CallOption{
gax.WithTimeout(300000 * time.Millisecond),
},
DeleteUtilizationReport: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListDatacenterConnectors: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetDatacenterConnector: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateDatacenterConnector: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteDatacenterConnector: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpgradeAppliance: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListMigratingVms: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpdateMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
StartMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ResumeMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
PauseMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
FinalizeMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateCloneJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CancelCloneJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListCloneJobs: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetCloneJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateCutoverJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CancelCutoverJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListCutoverJobs: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetCutoverJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListGroups: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpdateGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
AddGroupMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
RemoveGroupMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListTargetProjects: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpdateTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListReplicationCycles: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetReplicationCycle: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetLocation: []gax.CallOption{},
ListLocations: []gax.CallOption{},
CancelOperation: []gax.CallOption{},
DeleteOperation: []gax.CallOption{},
GetOperation: []gax.CallOption{},
ListOperations: []gax.CallOption{},
}
}
func defaultRESTCallOptions() *CallOptions {
return &CallOptions{
ListSources: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetSource: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateSource: []gax.CallOption{
gax.WithTimeout(900000 * time.Millisecond),
},
UpdateSource: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteSource: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
FetchInventory: []gax.CallOption{
gax.WithTimeout(300000 * time.Millisecond),
},
ListUtilizationReports: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetUtilizationReport: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateUtilizationReport: []gax.CallOption{
gax.WithTimeout(300000 * time.Millisecond),
},
DeleteUtilizationReport: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListDatacenterConnectors: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetDatacenterConnector: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateDatacenterConnector: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteDatacenterConnector: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpgradeAppliance: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListMigratingVms: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpdateMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteMigratingVm: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
StartMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ResumeMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
PauseMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
FinalizeMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateCloneJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CancelCloneJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListCloneJobs: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetCloneJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateCutoverJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CancelCutoverJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListCutoverJobs: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetCutoverJob: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListGroups: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpdateGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteGroup: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
AddGroupMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
RemoveGroupMigration: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListTargetProjects: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
CreateTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
UpdateTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
DeleteTargetProject: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
ListReplicationCycles: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetReplicationCycle: []gax.CallOption{
gax.WithTimeout(60000 * time.Millisecond),
},
GetLocation: []gax.CallOption{},
ListLocations: []gax.CallOption{},
CancelOperation: []gax.CallOption{},
DeleteOperation: []gax.CallOption{},
GetOperation: []gax.CallOption{},
ListOperations: []gax.CallOption{},
}
}
// internalClient is an interface that defines the methods available from VM Migration API.
type internalClient interface {
Close() error
setGoogleClientInfo(...string)
Connection() *grpc.ClientConn
ListSources(context.Context, *vmmigrationpb.ListSourcesRequest, ...gax.CallOption) *SourceIterator
GetSource(context.Context, *vmmigrationpb.GetSourceRequest, ...gax.CallOption) (*vmmigrationpb.Source, error)
CreateSource(context.Context, *vmmigrationpb.CreateSourceRequest, ...gax.CallOption) (*CreateSourceOperation, error)
CreateSourceOperation(name string) *CreateSourceOperation
UpdateSource(context.Context, *vmmigrationpb.UpdateSourceRequest, ...gax.CallOption) (*UpdateSourceOperation, error)
UpdateSourceOperation(name string) *UpdateSourceOperation
DeleteSource(context.Context, *vmmigrationpb.DeleteSourceRequest, ...gax.CallOption) (*DeleteSourceOperation, error)
DeleteSourceOperation(name string) *DeleteSourceOperation
FetchInventory(context.Context, *vmmigrationpb.FetchInventoryRequest, ...gax.CallOption) (*vmmigrationpb.FetchInventoryResponse, error)
ListUtilizationReports(context.Context, *vmmigrationpb.ListUtilizationReportsRequest, ...gax.CallOption) *UtilizationReportIterator
GetUtilizationReport(context.Context, *vmmigrationpb.GetUtilizationReportRequest, ...gax.CallOption) (*vmmigrationpb.UtilizationReport, error)
CreateUtilizationReport(context.Context, *vmmigrationpb.CreateUtilizationReportRequest, ...gax.CallOption) (*CreateUtilizationReportOperation, error)
CreateUtilizationReportOperation(name string) *CreateUtilizationReportOperation
DeleteUtilizationReport(context.Context, *vmmigrationpb.DeleteUtilizationReportRequest, ...gax.CallOption) (*DeleteUtilizationReportOperation, error)
DeleteUtilizationReportOperation(name string) *DeleteUtilizationReportOperation
ListDatacenterConnectors(context.Context, *vmmigrationpb.ListDatacenterConnectorsRequest, ...gax.CallOption) *DatacenterConnectorIterator
GetDatacenterConnector(context.Context, *vmmigrationpb.GetDatacenterConnectorRequest, ...gax.CallOption) (*vmmigrationpb.DatacenterConnector, error)
CreateDatacenterConnector(context.Context, *vmmigrationpb.CreateDatacenterConnectorRequest, ...gax.CallOption) (*CreateDatacenterConnectorOperation, error)
CreateDatacenterConnectorOperation(name string) *CreateDatacenterConnectorOperation
DeleteDatacenterConnector(context.Context, *vmmigrationpb.DeleteDatacenterConnectorRequest, ...gax.CallOption) (*DeleteDatacenterConnectorOperation, error)
DeleteDatacenterConnectorOperation(name string) *DeleteDatacenterConnectorOperation
UpgradeAppliance(context.Context, *vmmigrationpb.UpgradeApplianceRequest, ...gax.CallOption) (*UpgradeApplianceOperation, error)
UpgradeApplianceOperation(name string) *UpgradeApplianceOperation
CreateMigratingVm(context.Context, *vmmigrationpb.CreateMigratingVmRequest, ...gax.CallOption) (*CreateMigratingVmOperation, error)
CreateMigratingVmOperation(name string) *CreateMigratingVmOperation
ListMigratingVms(context.Context, *vmmigrationpb.ListMigratingVmsRequest, ...gax.CallOption) *MigratingVmIterator
GetMigratingVm(context.Context, *vmmigrationpb.GetMigratingVmRequest, ...gax.CallOption) (*vmmigrationpb.MigratingVm, error)
UpdateMigratingVm(context.Context, *vmmigrationpb.UpdateMigratingVmRequest, ...gax.CallOption) (*UpdateMigratingVmOperation, error)
UpdateMigratingVmOperation(name string) *UpdateMigratingVmOperation
DeleteMigratingVm(context.Context, *vmmigrationpb.DeleteMigratingVmRequest, ...gax.CallOption) (*DeleteMigratingVmOperation, error)
DeleteMigratingVmOperation(name string) *DeleteMigratingVmOperation
StartMigration(context.Context, *vmmigrationpb.StartMigrationRequest, ...gax.CallOption) (*StartMigrationOperation, error)
StartMigrationOperation(name string) *StartMigrationOperation
ResumeMigration(context.Context, *vmmigrationpb.ResumeMigrationRequest, ...gax.CallOption) (*ResumeMigrationOperation, error)
ResumeMigrationOperation(name string) *ResumeMigrationOperation
PauseMigration(context.Context, *vmmigrationpb.PauseMigrationRequest, ...gax.CallOption) (*PauseMigrationOperation, error)
PauseMigrationOperation(name string) *PauseMigrationOperation
FinalizeMigration(context.Context, *vmmigrationpb.FinalizeMigrationRequest, ...gax.CallOption) (*FinalizeMigrationOperation, error)
FinalizeMigrationOperation(name string) *FinalizeMigrationOperation
CreateCloneJob(context.Context, *vmmigrationpb.CreateCloneJobRequest, ...gax.CallOption) (*CreateCloneJobOperation, error)
CreateCloneJobOperation(name string) *CreateCloneJobOperation
CancelCloneJob(context.Context, *vmmigrationpb.CancelCloneJobRequest, ...gax.CallOption) (*CancelCloneJobOperation, error)
CancelCloneJobOperation(name string) *CancelCloneJobOperation
ListCloneJobs(context.Context, *vmmigrationpb.ListCloneJobsRequest, ...gax.CallOption) *CloneJobIterator
GetCloneJob(context.Context, *vmmigrationpb.GetCloneJobRequest, ...gax.CallOption) (*vmmigrationpb.CloneJob, error)
CreateCutoverJob(context.Context, *vmmigrationpb.CreateCutoverJobRequest, ...gax.CallOption) (*CreateCutoverJobOperation, error)
CreateCutoverJobOperation(name string) *CreateCutoverJobOperation
CancelCutoverJob(context.Context, *vmmigrationpb.CancelCutoverJobRequest, ...gax.CallOption) (*CancelCutoverJobOperation, error)
CancelCutoverJobOperation(name string) *CancelCutoverJobOperation
ListCutoverJobs(context.Context, *vmmigrationpb.ListCutoverJobsRequest, ...gax.CallOption) *CutoverJobIterator
GetCutoverJob(context.Context, *vmmigrationpb.GetCutoverJobRequest, ...gax.CallOption) (*vmmigrationpb.CutoverJob, error)
ListGroups(context.Context, *vmmigrationpb.ListGroupsRequest, ...gax.CallOption) *GroupIterator
GetGroup(context.Context, *vmmigrationpb.GetGroupRequest, ...gax.CallOption) (*vmmigrationpb.Group, error)
CreateGroup(context.Context, *vmmigrationpb.CreateGroupRequest, ...gax.CallOption) (*CreateGroupOperation, error)
CreateGroupOperation(name string) *CreateGroupOperation
UpdateGroup(context.Context, *vmmigrationpb.UpdateGroupRequest, ...gax.CallOption) (*UpdateGroupOperation, error)
UpdateGroupOperation(name string) *UpdateGroupOperation
DeleteGroup(context.Context, *vmmigrationpb.DeleteGroupRequest, ...gax.CallOption) (*DeleteGroupOperation, error)
DeleteGroupOperation(name string) *DeleteGroupOperation
AddGroupMigration(context.Context, *vmmigrationpb.AddGroupMigrationRequest, ...gax.CallOption) (*AddGroupMigrationOperation, error)
AddGroupMigrationOperation(name string) *AddGroupMigrationOperation
RemoveGroupMigration(context.Context, *vmmigrationpb.RemoveGroupMigrationRequest, ...gax.CallOption) (*RemoveGroupMigrationOperation, error)
RemoveGroupMigrationOperation(name string) *RemoveGroupMigrationOperation
ListTargetProjects(context.Context, *vmmigrationpb.ListTargetProjectsRequest, ...gax.CallOption) *TargetProjectIterator
GetTargetProject(context.Context, *vmmigrationpb.GetTargetProjectRequest, ...gax.CallOption) (*vmmigrationpb.TargetProject, error)
CreateTargetProject(context.Context, *vmmigrationpb.CreateTargetProjectRequest, ...gax.CallOption) (*CreateTargetProjectOperation, error)
CreateTargetProjectOperation(name string) *CreateTargetProjectOperation
UpdateTargetProject(context.Context, *vmmigrationpb.UpdateTargetProjectRequest, ...gax.CallOption) (*UpdateTargetProjectOperation, error)
UpdateTargetProjectOperation(name string) *UpdateTargetProjectOperation
DeleteTargetProject(context.Context, *vmmigrationpb.DeleteTargetProjectRequest, ...gax.CallOption) (*DeleteTargetProjectOperation, error)
DeleteTargetProjectOperation(name string) *DeleteTargetProjectOperation
ListReplicationCycles(context.Context, *vmmigrationpb.ListReplicationCyclesRequest, ...gax.CallOption) *ReplicationCycleIterator
GetReplicationCycle(context.Context, *vmmigrationpb.GetReplicationCycleRequest, ...gax.CallOption) (*vmmigrationpb.ReplicationCycle, error)
GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error)
ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator
CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error
DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error
GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error)
ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator
}
// Client is a client for interacting with VM Migration API.
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
//
// VM Migration Service
type Client struct {
// The internal transport-dependent client.
internalClient internalClient
// The call options for this service.
CallOptions *CallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
}
// Wrapper methods routed to the internal client.
// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *Client) Close() error {
return c.internalClient.Close()
}
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *Client) setGoogleClientInfo(keyval ...string) {
c.internalClient.setGoogleClientInfo(keyval...)
}
// Connection returns a connection to the API service.
//
// Deprecated: Connections are now pooled so this method does not always
// return the same resource.
func (c *Client) Connection() *grpc.ClientConn {
return c.internalClient.Connection()
}
// ListSources lists Sources in a given project and location.
func (c *Client) ListSources(ctx context.Context, req *vmmigrationpb.ListSourcesRequest, opts ...gax.CallOption) *SourceIterator {
return c.internalClient.ListSources(ctx, req, opts...)
}
// GetSource gets details of a single Source.
func (c *Client) GetSource(ctx context.Context, req *vmmigrationpb.GetSourceRequest, opts ...gax.CallOption) (*vmmigrationpb.Source, error) {
return c.internalClient.GetSource(ctx, req, opts...)
}
// CreateSource creates a new Source in a given project and location.
func (c *Client) CreateSource(ctx context.Context, req *vmmigrationpb.CreateSourceRequest, opts ...gax.CallOption) (*CreateSourceOperation, error) {
return c.internalClient.CreateSource(ctx, req, opts...)
}
// CreateSourceOperation returns a new CreateSourceOperation from a given name.
// The name must be that of a previously created CreateSourceOperation, possibly from a different process.
func (c *Client) CreateSourceOperation(name string) *CreateSourceOperation {
return c.internalClient.CreateSourceOperation(name)
}
// UpdateSource updates the parameters of a single Source.
func (c *Client) UpdateSource(ctx context.Context, req *vmmigrationpb.UpdateSourceRequest, opts ...gax.CallOption) (*UpdateSourceOperation, error) {
return c.internalClient.UpdateSource(ctx, req, opts...)
}
// UpdateSourceOperation returns a new UpdateSourceOperation from a given name.
// The name must be that of a previously created UpdateSourceOperation, possibly from a different process.
func (c *Client) UpdateSourceOperation(name string) *UpdateSourceOperation {
return c.internalClient.UpdateSourceOperation(name)
}
// DeleteSource deletes a single Source.
func (c *Client) DeleteSource(ctx context.Context, req *vmmigrationpb.DeleteSourceRequest, opts ...gax.CallOption) (*DeleteSourceOperation, error) {
return c.internalClient.DeleteSource(ctx, req, opts...)
}
// DeleteSourceOperation returns a new DeleteSourceOperation from a given name.
// The name must be that of a previously created DeleteSourceOperation, possibly from a different process.
func (c *Client) DeleteSourceOperation(name string) *DeleteSourceOperation {
return c.internalClient.DeleteSourceOperation(name)
}
// FetchInventory list remote source’s inventory of VMs.
// The remote source is the onprem vCenter (remote in the sense it’s not in
// Compute Engine). The inventory describes the list of existing VMs in that
// source. Note that this operation lists the VMs on the remote source, as
// opposed to listing the MigratingVms resources in the vmmigration service.
func (c *Client) FetchInventory(ctx context.Context, req *vmmigrationpb.FetchInventoryRequest, opts ...gax.CallOption) (*vmmigrationpb.FetchInventoryResponse, error) {
return c.internalClient.FetchInventory(ctx, req, opts...)
}
// ListUtilizationReports lists Utilization Reports of the given Source.
func (c *Client) ListUtilizationReports(ctx context.Context, req *vmmigrationpb.ListUtilizationReportsRequest, opts ...gax.CallOption) *UtilizationReportIterator {
return c.internalClient.ListUtilizationReports(ctx, req, opts...)
}
// GetUtilizationReport gets a single Utilization Report.
func (c *Client) GetUtilizationReport(ctx context.Context, req *vmmigrationpb.GetUtilizationReportRequest, opts ...gax.CallOption) (*vmmigrationpb.UtilizationReport, error) {
return c.internalClient.GetUtilizationReport(ctx, req, opts...)
}
// CreateUtilizationReport creates a new UtilizationReport.
func (c *Client) CreateUtilizationReport(ctx context.Context, req *vmmigrationpb.CreateUtilizationReportRequest, opts ...gax.CallOption) (*CreateUtilizationReportOperation, error) {
return c.internalClient.CreateUtilizationReport(ctx, req, opts...)
}
// CreateUtilizationReportOperation returns a new CreateUtilizationReportOperation from a given name.
// The name must be that of a previously created CreateUtilizationReportOperation, possibly from a different process.
func (c *Client) CreateUtilizationReportOperation(name string) *CreateUtilizationReportOperation {
return c.internalClient.CreateUtilizationReportOperation(name)
}
// DeleteUtilizationReport deletes a single Utilization Report.
func (c *Client) DeleteUtilizationReport(ctx context.Context, req *vmmigrationpb.DeleteUtilizationReportRequest, opts ...gax.CallOption) (*DeleteUtilizationReportOperation, error) {
return c.internalClient.DeleteUtilizationReport(ctx, req, opts...)
}
// DeleteUtilizationReportOperation returns a new DeleteUtilizationReportOperation from a given name.
// The name must be that of a previously created DeleteUtilizationReportOperation, possibly from a different process.
func (c *Client) DeleteUtilizationReportOperation(name string) *DeleteUtilizationReportOperation {
return c.internalClient.DeleteUtilizationReportOperation(name)
}
// ListDatacenterConnectors lists DatacenterConnectors in a given Source.
func (c *Client) ListDatacenterConnectors(ctx context.Context, req *vmmigrationpb.ListDatacenterConnectorsRequest, opts ...gax.CallOption) *DatacenterConnectorIterator {
return c.internalClient.ListDatacenterConnectors(ctx, req, opts...)
}
// GetDatacenterConnector gets details of a single DatacenterConnector.
func (c *Client) GetDatacenterConnector(ctx context.Context, req *vmmigrationpb.GetDatacenterConnectorRequest, opts ...gax.CallOption) (*vmmigrationpb.DatacenterConnector, error) {
return c.internalClient.GetDatacenterConnector(ctx, req, opts...)
}
// CreateDatacenterConnector creates a new DatacenterConnector in a given Source.
func (c *Client) CreateDatacenterConnector(ctx context.Context, req *vmmigrationpb.CreateDatacenterConnectorRequest, opts ...gax.CallOption) (*CreateDatacenterConnectorOperation, error) {
return c.internalClient.CreateDatacenterConnector(ctx, req, opts...)
}
// CreateDatacenterConnectorOperation returns a new CreateDatacenterConnectorOperation from a given name.
// The name must be that of a previously created CreateDatacenterConnectorOperation, possibly from a different process.
func (c *Client) CreateDatacenterConnectorOperation(name string) *CreateDatacenterConnectorOperation {
return c.internalClient.CreateDatacenterConnectorOperation(name)
}
// DeleteDatacenterConnector deletes a single DatacenterConnector.
func (c *Client) DeleteDatacenterConnector(ctx context.Context, req *vmmigrationpb.DeleteDatacenterConnectorRequest, opts ...gax.CallOption) (*DeleteDatacenterConnectorOperation, error) {
return c.internalClient.DeleteDatacenterConnector(ctx, req, opts...)
}
// DeleteDatacenterConnectorOperation returns a new DeleteDatacenterConnectorOperation from a given name.
// The name must be that of a previously created DeleteDatacenterConnectorOperation, possibly from a different process.
func (c *Client) DeleteDatacenterConnectorOperation(name string) *DeleteDatacenterConnectorOperation {
return c.internalClient.DeleteDatacenterConnectorOperation(name)
}
// UpgradeAppliance upgrades the appliance relate to this DatacenterConnector to the in-place
// updateable version.
func (c *Client) UpgradeAppliance(ctx context.Context, req *vmmigrationpb.UpgradeApplianceRequest, opts ...gax.CallOption) (*UpgradeApplianceOperation, error) {
return c.internalClient.UpgradeAppliance(ctx, req, opts...)
}
// UpgradeApplianceOperation returns a new UpgradeApplianceOperation from a given name.
// The name must be that of a previously created UpgradeApplianceOperation, possibly from a different process.
func (c *Client) UpgradeApplianceOperation(name string) *UpgradeApplianceOperation {
return c.internalClient.UpgradeApplianceOperation(name)
}
// CreateMigratingVm creates a new MigratingVm in a given Source.
func (c *Client) CreateMigratingVm(ctx context.Context, req *vmmigrationpb.CreateMigratingVmRequest, opts ...gax.CallOption) (*CreateMigratingVmOperation, error) {
return c.internalClient.CreateMigratingVm(ctx, req, opts...)
}
// CreateMigratingVmOperation returns a new CreateMigratingVmOperation from a given name.
// The name must be that of a previously created CreateMigratingVmOperation, possibly from a different process.
func (c *Client) CreateMigratingVmOperation(name string) *CreateMigratingVmOperation {
return c.internalClient.CreateMigratingVmOperation(name)
}
// ListMigratingVms lists MigratingVms in a given Source.
func (c *Client) ListMigratingVms(ctx context.Context, req *vmmigrationpb.ListMigratingVmsRequest, opts ...gax.CallOption) *MigratingVmIterator {
return c.internalClient.ListMigratingVms(ctx, req, opts...)
}
// GetMigratingVm gets details of a single MigratingVm.
func (c *Client) GetMigratingVm(ctx context.Context, req *vmmigrationpb.GetMigratingVmRequest, opts ...gax.CallOption) (*vmmigrationpb.MigratingVm, error) {
return c.internalClient.GetMigratingVm(ctx, req, opts...)
}
// UpdateMigratingVm updates the parameters of a single MigratingVm.
func (c *Client) UpdateMigratingVm(ctx context.Context, req *vmmigrationpb.UpdateMigratingVmRequest, opts ...gax.CallOption) (*UpdateMigratingVmOperation, error) {
return c.internalClient.UpdateMigratingVm(ctx, req, opts...)
}
// UpdateMigratingVmOperation returns a new UpdateMigratingVmOperation from a given name.
// The name must be that of a previously created UpdateMigratingVmOperation, possibly from a different process.
func (c *Client) UpdateMigratingVmOperation(name string) *UpdateMigratingVmOperation {
return c.internalClient.UpdateMigratingVmOperation(name)
}
// DeleteMigratingVm deletes a single MigratingVm.
func (c *Client) DeleteMigratingVm(ctx context.Context, req *vmmigrationpb.DeleteMigratingVmRequest, opts ...gax.CallOption) (*DeleteMigratingVmOperation, error) {
return c.internalClient.DeleteMigratingVm(ctx, req, opts...)
}
// DeleteMigratingVmOperation returns a new DeleteMigratingVmOperation from a given name.
// The name must be that of a previously created DeleteMigratingVmOperation, possibly from a different process.
func (c *Client) DeleteMigratingVmOperation(name string) *DeleteMigratingVmOperation {
return c.internalClient.DeleteMigratingVmOperation(name)
}
// StartMigration starts migration for a VM. Starts the process of uploading
// data and creating snapshots, in replication cycles scheduled by the policy.
func (c *Client) StartMigration(ctx context.Context, req *vmmigrationpb.StartMigrationRequest, opts ...gax.CallOption) (*StartMigrationOperation, error) {
return c.internalClient.StartMigration(ctx, req, opts...)
}
// StartMigrationOperation returns a new StartMigrationOperation from a given name.
// The name must be that of a previously created StartMigrationOperation, possibly from a different process.
func (c *Client) StartMigrationOperation(name string) *StartMigrationOperation {
return c.internalClient.StartMigrationOperation(name)
}
// ResumeMigration resumes a migration for a VM. When called on a paused migration, will start
// the process of uploading data and creating snapshots; when called on a
// completed cut-over migration, will update the migration to active state and
// start the process of uploading data and creating snapshots.
func (c *Client) ResumeMigration(ctx context.Context, req *vmmigrationpb.ResumeMigrationRequest, opts ...gax.CallOption) (*ResumeMigrationOperation, error) {
return c.internalClient.ResumeMigration(ctx, req, opts...)
}
// ResumeMigrationOperation returns a new ResumeMigrationOperation from a given name.
// The name must be that of a previously created ResumeMigrationOperation, possibly from a different process.
func (c *Client) ResumeMigrationOperation(name string) *ResumeMigrationOperation {
return c.internalClient.ResumeMigrationOperation(name)
}
// PauseMigration pauses a migration for a VM. If cycle tasks are running they will be
// cancelled, preserving source task data. Further replication cycles will not
// be triggered while the VM is paused.
func (c *Client) PauseMigration(ctx context.Context, req *vmmigrationpb.PauseMigrationRequest, opts ...gax.CallOption) (*PauseMigrationOperation, error) {
return c.internalClient.PauseMigration(ctx, req, opts...)
}
// PauseMigrationOperation returns a new PauseMigrationOperation from a given name.
// The name must be that of a previously created PauseMigrationOperation, possibly from a different process.
func (c *Client) PauseMigrationOperation(name string) *PauseMigrationOperation {
return c.internalClient.PauseMigrationOperation(name)
}
// FinalizeMigration marks a migration as completed, deleting migration resources that are no
// longer being used. Only applicable after cutover is done.
func (c *Client) FinalizeMigration(ctx context.Context, req *vmmigrationpb.FinalizeMigrationRequest, opts ...gax.CallOption) (*FinalizeMigrationOperation, error) {
return c.internalClient.FinalizeMigration(ctx, req, opts...)
}
// FinalizeMigrationOperation returns a new FinalizeMigrationOperation from a given name.
// The name must be that of a previously created FinalizeMigrationOperation, possibly from a different process.
func (c *Client) FinalizeMigrationOperation(name string) *FinalizeMigrationOperation {
return c.internalClient.FinalizeMigrationOperation(name)
}
// CreateCloneJob initiates a Clone of a specific migrating VM.
func (c *Client) CreateCloneJob(ctx context.Context, req *vmmigrationpb.CreateCloneJobRequest, opts ...gax.CallOption) (*CreateCloneJobOperation, error) {
return c.internalClient.CreateCloneJob(ctx, req, opts...)
}
// CreateCloneJobOperation returns a new CreateCloneJobOperation from a given name.
// The name must be that of a previously created CreateCloneJobOperation, possibly from a different process.
func (c *Client) CreateCloneJobOperation(name string) *CreateCloneJobOperation {
return c.internalClient.CreateCloneJobOperation(name)
}
// CancelCloneJob initiates the cancellation of a running clone job.
func (c *Client) CancelCloneJob(ctx context.Context, req *vmmigrationpb.CancelCloneJobRequest, opts ...gax.CallOption) (*CancelCloneJobOperation, error) {
return c.internalClient.CancelCloneJob(ctx, req, opts...)
}
// CancelCloneJobOperation returns a new CancelCloneJobOperation from a given name.
// The name must be that of a previously created CancelCloneJobOperation, possibly from a different process.
func (c *Client) CancelCloneJobOperation(name string) *CancelCloneJobOperation {
return c.internalClient.CancelCloneJobOperation(name)
}
// ListCloneJobs lists CloneJobs of a given migrating VM.
func (c *Client) ListCloneJobs(ctx context.Context, req *vmmigrationpb.ListCloneJobsRequest, opts ...gax.CallOption) *CloneJobIterator {
return c.internalClient.ListCloneJobs(ctx, req, opts...)
}
// GetCloneJob gets details of a single CloneJob.
func (c *Client) GetCloneJob(ctx context.Context, req *vmmigrationpb.GetCloneJobRequest, opts ...gax.CallOption) (*vmmigrationpb.CloneJob, error) {
return c.internalClient.GetCloneJob(ctx, req, opts...)
}
// CreateCutoverJob initiates a Cutover of a specific migrating VM.
// The returned LRO is completed when the cutover job resource is created
// and the job is initiated.
func (c *Client) CreateCutoverJob(ctx context.Context, req *vmmigrationpb.CreateCutoverJobRequest, opts ...gax.CallOption) (*CreateCutoverJobOperation, error) {
return c.internalClient.CreateCutoverJob(ctx, req, opts...)
}
// CreateCutoverJobOperation returns a new CreateCutoverJobOperation from a given name.
// The name must be that of a previously created CreateCutoverJobOperation, possibly from a different process.
func (c *Client) CreateCutoverJobOperation(name string) *CreateCutoverJobOperation {
return c.internalClient.CreateCutoverJobOperation(name)
}
// CancelCutoverJob initiates the cancellation of a running cutover job.
func (c *Client) CancelCutoverJob(ctx context.Context, req *vmmigrationpb.CancelCutoverJobRequest, opts ...gax.CallOption) (*CancelCutoverJobOperation, error) {
return c.internalClient.CancelCutoverJob(ctx, req, opts...)
}
// CancelCutoverJobOperation returns a new CancelCutoverJobOperation from a given name.
// The name must be that of a previously created CancelCutoverJobOperation, possibly from a different process.
func (c *Client) CancelCutoverJobOperation(name string) *CancelCutoverJobOperation {
return c.internalClient.CancelCutoverJobOperation(name)
}
// ListCutoverJobs lists CutoverJobs of a given migrating VM.
func (c *Client) ListCutoverJobs(ctx context.Context, req *vmmigrationpb.ListCutoverJobsRequest, opts ...gax.CallOption) *CutoverJobIterator {
return c.internalClient.ListCutoverJobs(ctx, req, opts...)
}
// GetCutoverJob gets details of a single CutoverJob.
func (c *Client) GetCutoverJob(ctx context.Context, req *vmmigrationpb.GetCutoverJobRequest, opts ...gax.CallOption) (*vmmigrationpb.CutoverJob, error) {
return c.internalClient.GetCutoverJob(ctx, req, opts...)
}
// ListGroups lists Groups in a given project and location.
func (c *Client) ListGroups(ctx context.Context, req *vmmigrationpb.ListGroupsRequest, opts ...gax.CallOption) *GroupIterator {
return c.internalClient.ListGroups(ctx, req, opts...)
}
// GetGroup gets details of a single Group.
func (c *Client) GetGroup(ctx context.Context, req *vmmigrationpb.GetGroupRequest, opts ...gax.CallOption) (*vmmigrationpb.Group, error) {
return c.internalClient.GetGroup(ctx, req, opts...)
}
// CreateGroup creates a new Group in a given project and location.
func (c *Client) CreateGroup(ctx context.Context, req *vmmigrationpb.CreateGroupRequest, opts ...gax.CallOption) (*CreateGroupOperation, error) {
return c.internalClient.CreateGroup(ctx, req, opts...)
}
// CreateGroupOperation returns a new CreateGroupOperation from a given name.
// The name must be that of a previously created CreateGroupOperation, possibly from a different process.
func (c *Client) CreateGroupOperation(name string) *CreateGroupOperation {
return c.internalClient.CreateGroupOperation(name)
}
// UpdateGroup updates the parameters of a single Group.
func (c *Client) UpdateGroup(ctx context.Context, req *vmmigrationpb.UpdateGroupRequest, opts ...gax.CallOption) (*UpdateGroupOperation, error) {
return c.internalClient.UpdateGroup(ctx, req, opts...)
}
// UpdateGroupOperation returns a new UpdateGroupOperation from a given name.
// The name must be that of a previously created UpdateGroupOperation, possibly from a different process.
func (c *Client) UpdateGroupOperation(name string) *UpdateGroupOperation {
return c.internalClient.UpdateGroupOperation(name)
}
// DeleteGroup deletes a single Group.
func (c *Client) DeleteGroup(ctx context.Context, req *vmmigrationpb.DeleteGroupRequest, opts ...gax.CallOption) (*DeleteGroupOperation, error) {
return c.internalClient.DeleteGroup(ctx, req, opts...)
}
// DeleteGroupOperation returns a new DeleteGroupOperation from a given name.
// The name must be that of a previously created DeleteGroupOperation, possibly from a different process.
func (c *Client) DeleteGroupOperation(name string) *DeleteGroupOperation {
return c.internalClient.DeleteGroupOperation(name)
}
// AddGroupMigration adds a MigratingVm to a Group.
func (c *Client) AddGroupMigration(ctx context.Context, req *vmmigrationpb.AddGroupMigrationRequest, opts ...gax.CallOption) (*AddGroupMigrationOperation, error) {
return c.internalClient.AddGroupMigration(ctx, req, opts...)
}
// AddGroupMigrationOperation returns a new AddGroupMigrationOperation from a given name.
// The name must be that of a previously created AddGroupMigrationOperation, possibly from a different process.
func (c *Client) AddGroupMigrationOperation(name string) *AddGroupMigrationOperation {
return c.internalClient.AddGroupMigrationOperation(name)
}
// RemoveGroupMigration removes a MigratingVm from a Group.
func (c *Client) RemoveGroupMigration(ctx context.Context, req *vmmigrationpb.RemoveGroupMigrationRequest, opts ...gax.CallOption) (*RemoveGroupMigrationOperation, error) {
return c.internalClient.RemoveGroupMigration(ctx, req, opts...)
}
// RemoveGroupMigrationOperation returns a new RemoveGroupMigrationOperation from a given name.
// The name must be that of a previously created RemoveGroupMigrationOperation, possibly from a different process.
func (c *Client) RemoveGroupMigrationOperation(name string) *RemoveGroupMigrationOperation {
return c.internalClient.RemoveGroupMigrationOperation(name)
}
// ListTargetProjects lists TargetProjects in a given project.
//
// NOTE: TargetProject is a global resource; hence the only supported value
// for location is global.
func (c *Client) ListTargetProjects(ctx context.Context, req *vmmigrationpb.ListTargetProjectsRequest, opts ...gax.CallOption) *TargetProjectIterator {
return c.internalClient.ListTargetProjects(ctx, req, opts...)
}
// GetTargetProject gets details of a single TargetProject.
//
// NOTE: TargetProject is a global resource; hence the only supported value
// for location is global.
func (c *Client) GetTargetProject(ctx context.Context, req *vmmigrationpb.GetTargetProjectRequest, opts ...gax.CallOption) (*vmmigrationpb.TargetProject, error) {
return c.internalClient.GetTargetProject(ctx, req, opts...)
}
// CreateTargetProject creates a new TargetProject in a given project.
//
// NOTE: TargetProject is a global resource; hence the only supported value
// for location is global.
func (c *Client) CreateTargetProject(ctx context.Context, req *vmmigrationpb.CreateTargetProjectRequest, opts ...gax.CallOption) (*CreateTargetProjectOperation, error) {
return c.internalClient.CreateTargetProject(ctx, req, opts...)
}
// CreateTargetProjectOperation returns a new CreateTargetProjectOperation from a given name.
// The name must be that of a previously created CreateTargetProjectOperation, possibly from a different process.
func (c *Client) CreateTargetProjectOperation(name string) *CreateTargetProjectOperation {
return c.internalClient.CreateTargetProjectOperation(name)
}
// UpdateTargetProject updates the parameters of a single TargetProject.
//
// NOTE: TargetProject is a global resource; hence the only supported value
// for location is global.
func (c *Client) UpdateTargetProject(ctx context.Context, req *vmmigrationpb.UpdateTargetProjectRequest, opts ...gax.CallOption) (*UpdateTargetProjectOperation, error) {
return c.internalClient.UpdateTargetProject(ctx, req, opts...)
}
// UpdateTargetProjectOperation returns a new UpdateTargetProjectOperation from a given name.
// The name must be that of a previously created UpdateTargetProjectOperation, possibly from a different process.
func (c *Client) UpdateTargetProjectOperation(name string) *UpdateTargetProjectOperation {
return c.internalClient.UpdateTargetProjectOperation(name)
}
// DeleteTargetProject deletes a single TargetProject.
//
// NOTE: TargetProject is a global resource; hence the only supported value
// for location is global.
func (c *Client) DeleteTargetProject(ctx context.Context, req *vmmigrationpb.DeleteTargetProjectRequest, opts ...gax.CallOption) (*DeleteTargetProjectOperation, error) {
return c.internalClient.DeleteTargetProject(ctx, req, opts...)
}
// DeleteTargetProjectOperation returns a new DeleteTargetProjectOperation from a given name.
// The name must be that of a previously created DeleteTargetProjectOperation, possibly from a different process.
func (c *Client) DeleteTargetProjectOperation(name string) *DeleteTargetProjectOperation {
return c.internalClient.DeleteTargetProjectOperation(name)
}
// ListReplicationCycles lists ReplicationCycles in a given MigratingVM.
func (c *Client) ListReplicationCycles(ctx context.Context, req *vmmigrationpb.ListReplicationCyclesRequest, opts ...gax.CallOption) *ReplicationCycleIterator {
return c.internalClient.ListReplicationCycles(ctx, req, opts...)
}
// GetReplicationCycle gets details of a single ReplicationCycle.
func (c *Client) GetReplicationCycle(ctx context.Context, req *vmmigrationpb.GetReplicationCycleRequest, opts ...gax.CallOption) (*vmmigrationpb.ReplicationCycle, error) {
return c.internalClient.GetReplicationCycle(ctx, req, opts...)
}
// GetLocation gets information about a location.
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) {
return c.internalClient.GetLocation(ctx, req, opts...)
}
// ListLocations lists information about the supported locations for this service.
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator {
return c.internalClient.ListLocations(ctx, req, opts...)
}
// CancelOperation is a utility method from google.longrunning.Operations.
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error {
return c.internalClient.CancelOperation(ctx, req, opts...)
}
// DeleteOperation is a utility method from google.longrunning.Operations.
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error {
return c.internalClient.DeleteOperation(ctx, req, opts...)
}
// GetOperation is a utility method from google.longrunning.Operations.
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) {
return c.internalClient.GetOperation(ctx, req, opts...)
}
// ListOperations is a utility method from google.longrunning.Operations.
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator {
return c.internalClient.ListOperations(ctx, req, opts...)
}
// gRPCClient is a client for interacting with VM Migration API over gRPC transport.
//
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
type gRPCClient struct {
// Connection pool of gRPC connections to the service.
connPool gtransport.ConnPool
// Points back to the CallOptions field of the containing Client