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
// Copyright 2025 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 sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
/// Implements a client for the VM Migration API.
///
/// # Example
/// ```
/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
/// # use google_cloud_vmmigration_v1::client::VmMigration;
/// let client = VmMigration::builder().build().await?;
/// // use `client` to make requests to the VM Migration API.
/// # Ok(()) }
/// ```
///
/// # Service Description
///
/// VM Migration Service
///
/// # Configuration
///
/// To configure `VmMigration` use the `with_*` methods in the type returned
/// by [builder()][VmMigration::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
/// (`https://vmmigration.googleapis.com`). Applications using regional
/// endpoints or running in restricted networks (e.g. a network configured
// with [Private Google Access with VPC Service Controls]) may want to
/// override this default.
/// * [with_credentials()]: by default this client uses
/// [Application Default Credentials]. Applications using custom
/// authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::vm_migration::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::vm_migration::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `VmMigration` holds a connection pool internally, it is advised to
/// create one and the reuse it. You do not need to wrap `VmMigration` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct VmMigration {
inner: std::sync::Arc<dyn super::stub::dynamic::VmMigration>,
}
impl VmMigration {
/// Returns a builder for [VmMigration].
///
/// ```
/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
/// # use google_cloud_vmmigration_v1::client::VmMigration;
/// let client = VmMigration::builder().build().await?;
/// # Ok(()) }
/// ```
pub fn builder() -> super::builder::vm_migration::ClientBuilder {
crate::new_client_builder(super::builder::vm_migration::client::Factory)
}
/// Creates a new client from the provided stub.
///
/// The most common case for calling this function is in tests mocking the
/// client's behavior.
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::VmMigration + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::VmMigration>> {
if gaxi::options::tracing_enabled(&conf) {
return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
}
Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
}
async fn build_transport(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::VmMigration> {
super::transport::VmMigration::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::VmMigration> {
Self::build_transport(conf)
.await
.map(super::tracing::VmMigration::new)
}
/// Lists Sources in a given project and location.
pub fn list_sources(&self) -> super::builder::vm_migration::ListSources {
super::builder::vm_migration::ListSources::new(self.inner.clone())
}
/// Gets details of a single Source.
pub fn get_source(&self) -> super::builder::vm_migration::GetSource {
super::builder::vm_migration::GetSource::new(self.inner.clone())
}
/// Creates a new Source in a given project and location.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_source(&self) -> super::builder::vm_migration::CreateSource {
super::builder::vm_migration::CreateSource::new(self.inner.clone())
}
/// Updates the parameters of a single Source.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn update_source(&self) -> super::builder::vm_migration::UpdateSource {
super::builder::vm_migration::UpdateSource::new(self.inner.clone())
}
/// Deletes a single Source.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_source(&self) -> super::builder::vm_migration::DeleteSource {
super::builder::vm_migration::DeleteSource::new(self.inner.clone())
}
/// 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.
pub fn fetch_inventory(&self) -> super::builder::vm_migration::FetchInventory {
super::builder::vm_migration::FetchInventory::new(self.inner.clone())
}
/// List remote source's inventory of storage resources.
/// The remote source is another cloud vendor (e.g. AWS, Azure).
/// The inventory describes the list of existing storage resources in that
/// source. Note that this operation lists the resources on the remote source,
/// as opposed to listing the MigratingVms resources in the vmmigration
/// service.
pub fn fetch_storage_inventory(&self) -> super::builder::vm_migration::FetchStorageInventory {
super::builder::vm_migration::FetchStorageInventory::new(self.inner.clone())
}
/// Lists Utilization Reports of the given Source.
pub fn list_utilization_reports(&self) -> super::builder::vm_migration::ListUtilizationReports {
super::builder::vm_migration::ListUtilizationReports::new(self.inner.clone())
}
/// Gets a single Utilization Report.
pub fn get_utilization_report(&self) -> super::builder::vm_migration::GetUtilizationReport {
super::builder::vm_migration::GetUtilizationReport::new(self.inner.clone())
}
/// Creates a new UtilizationReport.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_utilization_report(
&self,
) -> super::builder::vm_migration::CreateUtilizationReport {
super::builder::vm_migration::CreateUtilizationReport::new(self.inner.clone())
}
/// Deletes a single Utilization Report.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_utilization_report(
&self,
) -> super::builder::vm_migration::DeleteUtilizationReport {
super::builder::vm_migration::DeleteUtilizationReport::new(self.inner.clone())
}
/// Lists DatacenterConnectors in a given Source.
pub fn list_datacenter_connectors(
&self,
) -> super::builder::vm_migration::ListDatacenterConnectors {
super::builder::vm_migration::ListDatacenterConnectors::new(self.inner.clone())
}
/// Gets details of a single DatacenterConnector.
pub fn get_datacenter_connector(&self) -> super::builder::vm_migration::GetDatacenterConnector {
super::builder::vm_migration::GetDatacenterConnector::new(self.inner.clone())
}
/// Creates a new DatacenterConnector in a given Source.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_datacenter_connector(
&self,
) -> super::builder::vm_migration::CreateDatacenterConnector {
super::builder::vm_migration::CreateDatacenterConnector::new(self.inner.clone())
}
/// Deletes a single DatacenterConnector.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_datacenter_connector(
&self,
) -> super::builder::vm_migration::DeleteDatacenterConnector {
super::builder::vm_migration::DeleteDatacenterConnector::new(self.inner.clone())
}
/// Upgrades the appliance relate to this DatacenterConnector to the in-place
/// updateable version.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn upgrade_appliance(&self) -> super::builder::vm_migration::UpgradeAppliance {
super::builder::vm_migration::UpgradeAppliance::new(self.inner.clone())
}
/// Creates a new MigratingVm in a given Source.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_migrating_vm(&self) -> super::builder::vm_migration::CreateMigratingVm {
super::builder::vm_migration::CreateMigratingVm::new(self.inner.clone())
}
/// Lists MigratingVms in a given Source.
pub fn list_migrating_vms(&self) -> super::builder::vm_migration::ListMigratingVms {
super::builder::vm_migration::ListMigratingVms::new(self.inner.clone())
}
/// Gets details of a single MigratingVm.
pub fn get_migrating_vm(&self) -> super::builder::vm_migration::GetMigratingVm {
super::builder::vm_migration::GetMigratingVm::new(self.inner.clone())
}
/// Updates the parameters of a single MigratingVm.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn update_migrating_vm(&self) -> super::builder::vm_migration::UpdateMigratingVm {
super::builder::vm_migration::UpdateMigratingVm::new(self.inner.clone())
}
/// Deletes a single MigratingVm.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_migrating_vm(&self) -> super::builder::vm_migration::DeleteMigratingVm {
super::builder::vm_migration::DeleteMigratingVm::new(self.inner.clone())
}
/// Starts migration for a VM. Starts the process of uploading
/// data and creating snapshots, in replication cycles scheduled by the policy.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn start_migration(&self) -> super::builder::vm_migration::StartMigration {
super::builder::vm_migration::StartMigration::new(self.inner.clone())
}
/// 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.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn resume_migration(&self) -> super::builder::vm_migration::ResumeMigration {
super::builder::vm_migration::ResumeMigration::new(self.inner.clone())
}
/// 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.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn pause_migration(&self) -> super::builder::vm_migration::PauseMigration {
super::builder::vm_migration::PauseMigration::new(self.inner.clone())
}
/// Marks a migration as completed, deleting migration resources that are no
/// longer being used. Only applicable after cutover is done.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn finalize_migration(&self) -> super::builder::vm_migration::FinalizeMigration {
super::builder::vm_migration::FinalizeMigration::new(self.inner.clone())
}
/// Extend the migrating VM time to live.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn extend_migration(&self) -> super::builder::vm_migration::ExtendMigration {
super::builder::vm_migration::ExtendMigration::new(self.inner.clone())
}
/// Initiates a Clone of a specific migrating VM.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_clone_job(&self) -> super::builder::vm_migration::CreateCloneJob {
super::builder::vm_migration::CreateCloneJob::new(self.inner.clone())
}
/// Initiates the cancellation of a running clone job.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn cancel_clone_job(&self) -> super::builder::vm_migration::CancelCloneJob {
super::builder::vm_migration::CancelCloneJob::new(self.inner.clone())
}
/// Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are
/// listed.
pub fn list_clone_jobs(&self) -> super::builder::vm_migration::ListCloneJobs {
super::builder::vm_migration::ListCloneJobs::new(self.inner.clone())
}
/// Gets details of a single CloneJob.
pub fn get_clone_job(&self) -> super::builder::vm_migration::GetCloneJob {
super::builder::vm_migration::GetCloneJob::new(self.inner.clone())
}
/// 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.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_cutover_job(&self) -> super::builder::vm_migration::CreateCutoverJob {
super::builder::vm_migration::CreateCutoverJob::new(self.inner.clone())
}
/// Initiates the cancellation of a running cutover job.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn cancel_cutover_job(&self) -> super::builder::vm_migration::CancelCutoverJob {
super::builder::vm_migration::CancelCutoverJob::new(self.inner.clone())
}
/// Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs
/// are listed.
pub fn list_cutover_jobs(&self) -> super::builder::vm_migration::ListCutoverJobs {
super::builder::vm_migration::ListCutoverJobs::new(self.inner.clone())
}
/// Gets details of a single CutoverJob.
pub fn get_cutover_job(&self) -> super::builder::vm_migration::GetCutoverJob {
super::builder::vm_migration::GetCutoverJob::new(self.inner.clone())
}
/// Lists Groups in a given project and location.
pub fn list_groups(&self) -> super::builder::vm_migration::ListGroups {
super::builder::vm_migration::ListGroups::new(self.inner.clone())
}
/// Gets details of a single Group.
pub fn get_group(&self) -> super::builder::vm_migration::GetGroup {
super::builder::vm_migration::GetGroup::new(self.inner.clone())
}
/// Creates a new Group in a given project and location.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_group(&self) -> super::builder::vm_migration::CreateGroup {
super::builder::vm_migration::CreateGroup::new(self.inner.clone())
}
/// Updates the parameters of a single Group.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn update_group(&self) -> super::builder::vm_migration::UpdateGroup {
super::builder::vm_migration::UpdateGroup::new(self.inner.clone())
}
/// Deletes a single Group.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_group(&self) -> super::builder::vm_migration::DeleteGroup {
super::builder::vm_migration::DeleteGroup::new(self.inner.clone())
}
/// Adds a MigratingVm to a Group.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn add_group_migration(&self) -> super::builder::vm_migration::AddGroupMigration {
super::builder::vm_migration::AddGroupMigration::new(self.inner.clone())
}
/// Removes a MigratingVm from a Group.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn remove_group_migration(&self) -> super::builder::vm_migration::RemoveGroupMigration {
super::builder::vm_migration::RemoveGroupMigration::new(self.inner.clone())
}
/// Lists TargetProjects in a given project.
///
/// NOTE: TargetProject is a global resource; hence the only supported value
/// for location is `global`.
pub fn list_target_projects(&self) -> super::builder::vm_migration::ListTargetProjects {
super::builder::vm_migration::ListTargetProjects::new(self.inner.clone())
}
/// Gets details of a single TargetProject.
///
/// NOTE: TargetProject is a global resource; hence the only supported value
/// for location is `global`.
pub fn get_target_project(&self) -> super::builder::vm_migration::GetTargetProject {
super::builder::vm_migration::GetTargetProject::new(self.inner.clone())
}
/// Creates a new TargetProject in a given project.
///
/// NOTE: TargetProject is a global resource; hence the only supported value
/// for location is `global`.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_target_project(&self) -> super::builder::vm_migration::CreateTargetProject {
super::builder::vm_migration::CreateTargetProject::new(self.inner.clone())
}
/// Updates the parameters of a single TargetProject.
///
/// NOTE: TargetProject is a global resource; hence the only supported value
/// for location is `global`.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn update_target_project(&self) -> super::builder::vm_migration::UpdateTargetProject {
super::builder::vm_migration::UpdateTargetProject::new(self.inner.clone())
}
/// Deletes a single TargetProject.
///
/// NOTE: TargetProject is a global resource; hence the only supported value
/// for location is `global`.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_target_project(&self) -> super::builder::vm_migration::DeleteTargetProject {
super::builder::vm_migration::DeleteTargetProject::new(self.inner.clone())
}
/// Lists ReplicationCycles in a given MigratingVM.
pub fn list_replication_cycles(&self) -> super::builder::vm_migration::ListReplicationCycles {
super::builder::vm_migration::ListReplicationCycles::new(self.inner.clone())
}
/// Gets details of a single ReplicationCycle.
pub fn get_replication_cycle(&self) -> super::builder::vm_migration::GetReplicationCycle {
super::builder::vm_migration::GetReplicationCycle::new(self.inner.clone())
}
/// Lists ImageImports in a given project.
pub fn list_image_imports(&self) -> super::builder::vm_migration::ListImageImports {
super::builder::vm_migration::ListImageImports::new(self.inner.clone())
}
/// Gets details of a single ImageImport.
pub fn get_image_import(&self) -> super::builder::vm_migration::GetImageImport {
super::builder::vm_migration::GetImageImport::new(self.inner.clone())
}
/// Creates a new ImageImport in a given project.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_image_import(&self) -> super::builder::vm_migration::CreateImageImport {
super::builder::vm_migration::CreateImageImport::new(self.inner.clone())
}
/// Deletes a single ImageImport.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_image_import(&self) -> super::builder::vm_migration::DeleteImageImport {
super::builder::vm_migration::DeleteImageImport::new(self.inner.clone())
}
/// Lists ImageImportJobs in a given project.
pub fn list_image_import_jobs(&self) -> super::builder::vm_migration::ListImageImportJobs {
super::builder::vm_migration::ListImageImportJobs::new(self.inner.clone())
}
/// Gets details of a single ImageImportJob.
pub fn get_image_import_job(&self) -> super::builder::vm_migration::GetImageImportJob {
super::builder::vm_migration::GetImageImportJob::new(self.inner.clone())
}
/// Initiates the cancellation of a running ImageImportJob.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn cancel_image_import_job(&self) -> super::builder::vm_migration::CancelImageImportJob {
super::builder::vm_migration::CancelImageImportJob::new(self.inner.clone())
}
/// Creates a new disk migration job in a given Source.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn create_disk_migration_job(
&self,
) -> super::builder::vm_migration::CreateDiskMigrationJob {
super::builder::vm_migration::CreateDiskMigrationJob::new(self.inner.clone())
}
/// Lists DiskMigrationJobs in a given Source.
pub fn list_disk_migration_jobs(&self) -> super::builder::vm_migration::ListDiskMigrationJobs {
super::builder::vm_migration::ListDiskMigrationJobs::new(self.inner.clone())
}
/// Gets details of a single DiskMigrationJob.
pub fn get_disk_migration_job(&self) -> super::builder::vm_migration::GetDiskMigrationJob {
super::builder::vm_migration::GetDiskMigrationJob::new(self.inner.clone())
}
/// Updates the parameters of a single DiskMigrationJob.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn update_disk_migration_job(
&self,
) -> super::builder::vm_migration::UpdateDiskMigrationJob {
super::builder::vm_migration::UpdateDiskMigrationJob::new(self.inner.clone())
}
/// Deletes a single DiskMigrationJob.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn delete_disk_migration_job(
&self,
) -> super::builder::vm_migration::DeleteDiskMigrationJob {
super::builder::vm_migration::DeleteDiskMigrationJob::new(self.inner.clone())
}
/// Runs the disk migration job.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn run_disk_migration_job(&self) -> super::builder::vm_migration::RunDiskMigrationJob {
super::builder::vm_migration::RunDiskMigrationJob::new(self.inner.clone())
}
/// Cancels the disk migration job.
///
/// # Long running operations
///
/// This method is used to start, and/or poll a [long-running Operation].
/// The [Working with long-running operations] chapter in the [user guide]
/// covers these operations in detail.
///
/// [long-running operation]: https://google.aip.dev/151
/// [user guide]: https://googleapis.github.io/google-cloud-rust/
/// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
pub fn cancel_disk_migration_job(
&self,
) -> super::builder::vm_migration::CancelDiskMigrationJob {
super::builder::vm_migration::CancelDiskMigrationJob::new(self.inner.clone())
}
/// Lists information about the supported locations for this service.
pub fn list_locations(&self) -> super::builder::vm_migration::ListLocations {
super::builder::vm_migration::ListLocations::new(self.inner.clone())
}
/// Gets information about a location.
pub fn get_location(&self) -> super::builder::vm_migration::GetLocation {
super::builder::vm_migration::GetLocation::new(self.inner.clone())
}
/// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
///
/// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
pub fn list_operations(&self) -> super::builder::vm_migration::ListOperations {
super::builder::vm_migration::ListOperations::new(self.inner.clone())
}
/// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
///
/// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
pub fn get_operation(&self) -> super::builder::vm_migration::GetOperation {
super::builder::vm_migration::GetOperation::new(self.inner.clone())
}
/// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
///
/// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
pub fn delete_operation(&self) -> super::builder::vm_migration::DeleteOperation {
super::builder::vm_migration::DeleteOperation::new(self.inner.clone())
}
/// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
///
/// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
pub fn cancel_operation(&self) -> super::builder::vm_migration::CancelOperation {
super::builder::vm_migration::CancelOperation::new(self.inner.clone())
}
}