google_cloud_clouddms_v1/
client.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16#![allow(rustdoc::redundant_explicit_links)]
17#![allow(rustdoc::broken_intra_doc_links)]
18
19/// Implements a client for the Database Migration API.
20///
21/// # Example
22/// ```
23/// # tokio_test::block_on(async {
24/// # use google_cloud_clouddms_v1::client::DataMigrationService;
25/// let client = DataMigrationService::builder().build().await?;
26/// // use `client` to make requests to the Database Migration API.
27/// # gax::client_builder::Result::<()>::Ok(()) });
28/// ```
29///
30/// # Service Description
31///
32/// Database Migration service
33///
34/// # Configuration
35///
36/// To configure `DataMigrationService` use the `with_*` methods in the type returned
37/// by [builder()][DataMigrationService::builder]. The default configuration should
38/// work for most applications. Common configuration changes include
39///
40/// * [with_endpoint()]: by default this client uses the global default endpoint
41///   (`https://datamigration.googleapis.com`). Applications using regional
42///   endpoints or running in restricted networks (e.g. a network configured
43//    with [Private Google Access with VPC Service Controls]) may want to
44///   override this default.
45/// * [with_credentials()]: by default this client uses
46///   [Application Default Credentials]. Applications using custom
47///   authentication may need to override this default.
48///
49/// [with_endpoint()]: super::builder::data_migration_service::ClientBuilder::with_endpoint
50/// [with_credentials()]: super::builder::data_migration_service::ClientBuilder::credentials
51/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
52/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
53///
54/// # Pooling and Cloning
55///
56/// `DataMigrationService` holds a connection pool internally, it is advised to
57/// create one and the reuse it.  You do not need to wrap `DataMigrationService` in
58/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
59/// already uses an `Arc` internally.
60#[derive(Clone, Debug)]
61pub struct DataMigrationService {
62    inner: std::sync::Arc<dyn super::stub::dynamic::DataMigrationService>,
63}
64
65impl DataMigrationService {
66    /// Returns a builder for [DataMigrationService].
67    ///
68    /// ```
69    /// # tokio_test::block_on(async {
70    /// # use google_cloud_clouddms_v1::client::DataMigrationService;
71    /// let client = DataMigrationService::builder().build().await?;
72    /// # gax::client_builder::Result::<()>::Ok(()) });
73    /// ```
74    pub fn builder() -> super::builder::data_migration_service::ClientBuilder {
75        gax::client_builder::internal::new_builder(
76            super::builder::data_migration_service::client::Factory,
77        )
78    }
79
80    /// Creates a new client from the provided stub.
81    ///
82    /// The most common case for calling this function is in tests mocking the
83    /// client's behavior.
84    pub fn from_stub<T>(stub: T) -> Self
85    where
86        T: super::stub::DataMigrationService + 'static,
87    {
88        Self {
89            inner: std::sync::Arc::new(stub),
90        }
91    }
92
93    pub(crate) async fn new(
94        config: gaxi::options::ClientConfig,
95    ) -> gax::client_builder::Result<Self> {
96        let inner = Self::build_inner(config).await?;
97        Ok(Self { inner })
98    }
99
100    async fn build_inner(
101        conf: gaxi::options::ClientConfig,
102    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::DataMigrationService>>
103    {
104        if gaxi::options::tracing_enabled(&conf) {
105            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
106        }
107        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
108    }
109
110    async fn build_transport(
111        conf: gaxi::options::ClientConfig,
112    ) -> gax::client_builder::Result<impl super::stub::DataMigrationService> {
113        super::transport::DataMigrationService::new(conf).await
114    }
115
116    async fn build_with_tracing(
117        conf: gaxi::options::ClientConfig,
118    ) -> gax::client_builder::Result<impl super::stub::DataMigrationService> {
119        Self::build_transport(conf)
120            .await
121            .map(super::tracing::DataMigrationService::new)
122    }
123
124    /// Lists migration jobs in a given project and location.
125    pub fn list_migration_jobs(&self) -> super::builder::data_migration_service::ListMigrationJobs {
126        super::builder::data_migration_service::ListMigrationJobs::new(self.inner.clone())
127    }
128
129    /// Gets details of a single migration job.
130    pub fn get_migration_job(&self) -> super::builder::data_migration_service::GetMigrationJob {
131        super::builder::data_migration_service::GetMigrationJob::new(self.inner.clone())
132    }
133
134    /// Creates a new migration job in a given project and location.
135    ///
136    /// # Long running operations
137    ///
138    /// This method is used to start, and/or poll a [long-running Operation].
139    /// The [Working with long-running operations] chapter in the [user guide]
140    /// covers these operations in detail.
141    ///
142    /// [long-running operation]: https://google.aip.dev/151
143    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
144    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
145    pub fn create_migration_job(
146        &self,
147    ) -> super::builder::data_migration_service::CreateMigrationJob {
148        super::builder::data_migration_service::CreateMigrationJob::new(self.inner.clone())
149    }
150
151    /// Updates the parameters of a single migration job.
152    ///
153    /// # Long running operations
154    ///
155    /// This method is used to start, and/or poll a [long-running Operation].
156    /// The [Working with long-running operations] chapter in the [user guide]
157    /// covers these operations in detail.
158    ///
159    /// [long-running operation]: https://google.aip.dev/151
160    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
161    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
162    pub fn update_migration_job(
163        &self,
164    ) -> super::builder::data_migration_service::UpdateMigrationJob {
165        super::builder::data_migration_service::UpdateMigrationJob::new(self.inner.clone())
166    }
167
168    /// Deletes a single migration job.
169    ///
170    /// # Long running operations
171    ///
172    /// This method is used to start, and/or poll a [long-running Operation].
173    /// The [Working with long-running operations] chapter in the [user guide]
174    /// covers these operations in detail.
175    ///
176    /// [long-running operation]: https://google.aip.dev/151
177    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
178    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
179    pub fn delete_migration_job(
180        &self,
181    ) -> super::builder::data_migration_service::DeleteMigrationJob {
182        super::builder::data_migration_service::DeleteMigrationJob::new(self.inner.clone())
183    }
184
185    /// Start an already created migration job.
186    ///
187    /// # Long running operations
188    ///
189    /// This method is used to start, and/or poll a [long-running Operation].
190    /// The [Working with long-running operations] chapter in the [user guide]
191    /// covers these operations in detail.
192    ///
193    /// [long-running operation]: https://google.aip.dev/151
194    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
195    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
196    pub fn start_migration_job(&self) -> super::builder::data_migration_service::StartMigrationJob {
197        super::builder::data_migration_service::StartMigrationJob::new(self.inner.clone())
198    }
199
200    /// Stops a running migration job.
201    ///
202    /// # Long running operations
203    ///
204    /// This method is used to start, and/or poll a [long-running Operation].
205    /// The [Working with long-running operations] chapter in the [user guide]
206    /// covers these operations in detail.
207    ///
208    /// [long-running operation]: https://google.aip.dev/151
209    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
210    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
211    pub fn stop_migration_job(&self) -> super::builder::data_migration_service::StopMigrationJob {
212        super::builder::data_migration_service::StopMigrationJob::new(self.inner.clone())
213    }
214
215    /// Resume a migration job that is currently stopped and is resumable (was
216    /// stopped during CDC phase).
217    ///
218    /// # Long running operations
219    ///
220    /// This method is used to start, and/or poll a [long-running Operation].
221    /// The [Working with long-running operations] chapter in the [user guide]
222    /// covers these operations in detail.
223    ///
224    /// [long-running operation]: https://google.aip.dev/151
225    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
226    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
227    pub fn resume_migration_job(
228        &self,
229    ) -> super::builder::data_migration_service::ResumeMigrationJob {
230        super::builder::data_migration_service::ResumeMigrationJob::new(self.inner.clone())
231    }
232
233    /// Promote a migration job, stopping replication to the destination and
234    /// promoting the destination to be a standalone database.
235    ///
236    /// # Long running operations
237    ///
238    /// This method is used to start, and/or poll a [long-running Operation].
239    /// The [Working with long-running operations] chapter in the [user guide]
240    /// covers these operations in detail.
241    ///
242    /// [long-running operation]: https://google.aip.dev/151
243    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
244    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
245    pub fn promote_migration_job(
246        &self,
247    ) -> super::builder::data_migration_service::PromoteMigrationJob {
248        super::builder::data_migration_service::PromoteMigrationJob::new(self.inner.clone())
249    }
250
251    /// Verify a migration job, making sure the destination can reach the source
252    /// and that all configuration and prerequisites are met.
253    ///
254    /// # Long running operations
255    ///
256    /// This method is used to start, and/or poll a [long-running Operation].
257    /// The [Working with long-running operations] chapter in the [user guide]
258    /// covers these operations in detail.
259    ///
260    /// [long-running operation]: https://google.aip.dev/151
261    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
262    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
263    pub fn verify_migration_job(
264        &self,
265    ) -> super::builder::data_migration_service::VerifyMigrationJob {
266        super::builder::data_migration_service::VerifyMigrationJob::new(self.inner.clone())
267    }
268
269    /// Restart a stopped or failed migration job, resetting the destination
270    /// instance to its original state and starting the migration process from
271    /// scratch.
272    ///
273    /// # Long running operations
274    ///
275    /// This method is used to start, and/or poll a [long-running Operation].
276    /// The [Working with long-running operations] chapter in the [user guide]
277    /// covers these operations in detail.
278    ///
279    /// [long-running operation]: https://google.aip.dev/151
280    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
281    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
282    pub fn restart_migration_job(
283        &self,
284    ) -> super::builder::data_migration_service::RestartMigrationJob {
285        super::builder::data_migration_service::RestartMigrationJob::new(self.inner.clone())
286    }
287
288    /// Generate a SSH configuration script to configure the reverse SSH
289    /// connectivity.
290    pub fn generate_ssh_script(&self) -> super::builder::data_migration_service::GenerateSshScript {
291        super::builder::data_migration_service::GenerateSshScript::new(self.inner.clone())
292    }
293
294    /// Generate a TCP Proxy configuration script to configure a cloud-hosted VM
295    /// running a TCP Proxy.
296    pub fn generate_tcp_proxy_script(
297        &self,
298    ) -> super::builder::data_migration_service::GenerateTcpProxyScript {
299        super::builder::data_migration_service::GenerateTcpProxyScript::new(self.inner.clone())
300    }
301
302    /// Retrieves a list of all connection profiles in a given project and
303    /// location.
304    pub fn list_connection_profiles(
305        &self,
306    ) -> super::builder::data_migration_service::ListConnectionProfiles {
307        super::builder::data_migration_service::ListConnectionProfiles::new(self.inner.clone())
308    }
309
310    /// Gets details of a single connection profile.
311    pub fn get_connection_profile(
312        &self,
313    ) -> super::builder::data_migration_service::GetConnectionProfile {
314        super::builder::data_migration_service::GetConnectionProfile::new(self.inner.clone())
315    }
316
317    /// Creates a new connection profile in a given project and location.
318    ///
319    /// # Long running operations
320    ///
321    /// This method is used to start, and/or poll a [long-running Operation].
322    /// The [Working with long-running operations] chapter in the [user guide]
323    /// covers these operations in detail.
324    ///
325    /// [long-running operation]: https://google.aip.dev/151
326    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
327    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
328    pub fn create_connection_profile(
329        &self,
330    ) -> super::builder::data_migration_service::CreateConnectionProfile {
331        super::builder::data_migration_service::CreateConnectionProfile::new(self.inner.clone())
332    }
333
334    /// Update the configuration of a single connection profile.
335    ///
336    /// # Long running operations
337    ///
338    /// This method is used to start, and/or poll a [long-running Operation].
339    /// The [Working with long-running operations] chapter in the [user guide]
340    /// covers these operations in detail.
341    ///
342    /// [long-running operation]: https://google.aip.dev/151
343    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
344    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
345    pub fn update_connection_profile(
346        &self,
347    ) -> super::builder::data_migration_service::UpdateConnectionProfile {
348        super::builder::data_migration_service::UpdateConnectionProfile::new(self.inner.clone())
349    }
350
351    /// Deletes a single Database Migration Service connection profile.
352    /// A connection profile can only be deleted if it is not in use by any
353    /// active migration jobs.
354    ///
355    /// # Long running operations
356    ///
357    /// This method is used to start, and/or poll a [long-running Operation].
358    /// The [Working with long-running operations] chapter in the [user guide]
359    /// covers these operations in detail.
360    ///
361    /// [long-running operation]: https://google.aip.dev/151
362    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
363    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
364    pub fn delete_connection_profile(
365        &self,
366    ) -> super::builder::data_migration_service::DeleteConnectionProfile {
367        super::builder::data_migration_service::DeleteConnectionProfile::new(self.inner.clone())
368    }
369
370    /// Creates a new private connection in a given project and location.
371    ///
372    /// # Long running operations
373    ///
374    /// This method is used to start, and/or poll a [long-running Operation].
375    /// The [Working with long-running operations] chapter in the [user guide]
376    /// covers these operations in detail.
377    ///
378    /// [long-running operation]: https://google.aip.dev/151
379    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
380    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
381    pub fn create_private_connection(
382        &self,
383    ) -> super::builder::data_migration_service::CreatePrivateConnection {
384        super::builder::data_migration_service::CreatePrivateConnection::new(self.inner.clone())
385    }
386
387    /// Gets details of a single private connection.
388    pub fn get_private_connection(
389        &self,
390    ) -> super::builder::data_migration_service::GetPrivateConnection {
391        super::builder::data_migration_service::GetPrivateConnection::new(self.inner.clone())
392    }
393
394    /// Retrieves a list of private connections in a given project and location.
395    pub fn list_private_connections(
396        &self,
397    ) -> super::builder::data_migration_service::ListPrivateConnections {
398        super::builder::data_migration_service::ListPrivateConnections::new(self.inner.clone())
399    }
400
401    /// Deletes a single Database Migration Service private connection.
402    ///
403    /// # Long running operations
404    ///
405    /// This method is used to start, and/or poll a [long-running Operation].
406    /// The [Working with long-running operations] chapter in the [user guide]
407    /// covers these operations in detail.
408    ///
409    /// [long-running operation]: https://google.aip.dev/151
410    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
411    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
412    pub fn delete_private_connection(
413        &self,
414    ) -> super::builder::data_migration_service::DeletePrivateConnection {
415        super::builder::data_migration_service::DeletePrivateConnection::new(self.inner.clone())
416    }
417
418    /// Gets details of a single conversion workspace.
419    pub fn get_conversion_workspace(
420        &self,
421    ) -> super::builder::data_migration_service::GetConversionWorkspace {
422        super::builder::data_migration_service::GetConversionWorkspace::new(self.inner.clone())
423    }
424
425    /// Lists conversion workspaces in a given project and location.
426    pub fn list_conversion_workspaces(
427        &self,
428    ) -> super::builder::data_migration_service::ListConversionWorkspaces {
429        super::builder::data_migration_service::ListConversionWorkspaces::new(self.inner.clone())
430    }
431
432    /// Creates a new conversion workspace in a given project and location.
433    ///
434    /// # Long running operations
435    ///
436    /// This method is used to start, and/or poll a [long-running Operation].
437    /// The [Working with long-running operations] chapter in the [user guide]
438    /// covers these operations in detail.
439    ///
440    /// [long-running operation]: https://google.aip.dev/151
441    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
442    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
443    pub fn create_conversion_workspace(
444        &self,
445    ) -> super::builder::data_migration_service::CreateConversionWorkspace {
446        super::builder::data_migration_service::CreateConversionWorkspace::new(self.inner.clone())
447    }
448
449    /// Updates the parameters of a single conversion workspace.
450    ///
451    /// # Long running operations
452    ///
453    /// This method is used to start, and/or poll a [long-running Operation].
454    /// The [Working with long-running operations] chapter in the [user guide]
455    /// covers these operations in detail.
456    ///
457    /// [long-running operation]: https://google.aip.dev/151
458    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
459    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
460    pub fn update_conversion_workspace(
461        &self,
462    ) -> super::builder::data_migration_service::UpdateConversionWorkspace {
463        super::builder::data_migration_service::UpdateConversionWorkspace::new(self.inner.clone())
464    }
465
466    /// Deletes a single conversion workspace.
467    ///
468    /// # Long running operations
469    ///
470    /// This method is used to start, and/or poll a [long-running Operation].
471    /// The [Working with long-running operations] chapter in the [user guide]
472    /// covers these operations in detail.
473    ///
474    /// [long-running operation]: https://google.aip.dev/151
475    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
476    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
477    pub fn delete_conversion_workspace(
478        &self,
479    ) -> super::builder::data_migration_service::DeleteConversionWorkspace {
480        super::builder::data_migration_service::DeleteConversionWorkspace::new(self.inner.clone())
481    }
482
483    /// Creates a new mapping rule for a given conversion workspace.
484    pub fn create_mapping_rule(&self) -> super::builder::data_migration_service::CreateMappingRule {
485        super::builder::data_migration_service::CreateMappingRule::new(self.inner.clone())
486    }
487
488    /// Deletes a single mapping rule.
489    pub fn delete_mapping_rule(&self) -> super::builder::data_migration_service::DeleteMappingRule {
490        super::builder::data_migration_service::DeleteMappingRule::new(self.inner.clone())
491    }
492
493    /// Lists the mapping rules for a specific conversion workspace.
494    pub fn list_mapping_rules(&self) -> super::builder::data_migration_service::ListMappingRules {
495        super::builder::data_migration_service::ListMappingRules::new(self.inner.clone())
496    }
497
498    /// Gets the details of a mapping rule.
499    pub fn get_mapping_rule(&self) -> super::builder::data_migration_service::GetMappingRule {
500        super::builder::data_migration_service::GetMappingRule::new(self.inner.clone())
501    }
502
503    /// Imports a snapshot of the source database into the
504    /// conversion workspace.
505    ///
506    /// # Long running operations
507    ///
508    /// This method is used to start, and/or poll a [long-running Operation].
509    /// The [Working with long-running operations] chapter in the [user guide]
510    /// covers these operations in detail.
511    ///
512    /// [long-running operation]: https://google.aip.dev/151
513    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
514    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
515    pub fn seed_conversion_workspace(
516        &self,
517    ) -> super::builder::data_migration_service::SeedConversionWorkspace {
518        super::builder::data_migration_service::SeedConversionWorkspace::new(self.inner.clone())
519    }
520
521    /// Imports the mapping rules for a given conversion workspace.
522    /// Supports various formats of external rules files.
523    ///
524    /// # Long running operations
525    ///
526    /// This method is used to start, and/or poll a [long-running Operation].
527    /// The [Working with long-running operations] chapter in the [user guide]
528    /// covers these operations in detail.
529    ///
530    /// [long-running operation]: https://google.aip.dev/151
531    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
532    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
533    pub fn import_mapping_rules(
534        &self,
535    ) -> super::builder::data_migration_service::ImportMappingRules {
536        super::builder::data_migration_service::ImportMappingRules::new(self.inner.clone())
537    }
538
539    /// Creates a draft tree schema for the destination database.
540    ///
541    /// # Long running operations
542    ///
543    /// This method is used to start, and/or poll a [long-running Operation].
544    /// The [Working with long-running operations] chapter in the [user guide]
545    /// covers these operations in detail.
546    ///
547    /// [long-running operation]: https://google.aip.dev/151
548    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
549    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
550    pub fn convert_conversion_workspace(
551        &self,
552    ) -> super::builder::data_migration_service::ConvertConversionWorkspace {
553        super::builder::data_migration_service::ConvertConversionWorkspace::new(self.inner.clone())
554    }
555
556    /// Marks all the data in the conversion workspace as committed.
557    ///
558    /// # Long running operations
559    ///
560    /// This method is used to start, and/or poll a [long-running Operation].
561    /// The [Working with long-running operations] chapter in the [user guide]
562    /// covers these operations in detail.
563    ///
564    /// [long-running operation]: https://google.aip.dev/151
565    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
566    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
567    pub fn commit_conversion_workspace(
568        &self,
569    ) -> super::builder::data_migration_service::CommitConversionWorkspace {
570        super::builder::data_migration_service::CommitConversionWorkspace::new(self.inner.clone())
571    }
572
573    /// Rolls back a conversion workspace to the last committed snapshot.
574    ///
575    /// # Long running operations
576    ///
577    /// This method is used to start, and/or poll a [long-running Operation].
578    /// The [Working with long-running operations] chapter in the [user guide]
579    /// covers these operations in detail.
580    ///
581    /// [long-running operation]: https://google.aip.dev/151
582    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
583    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
584    pub fn rollback_conversion_workspace(
585        &self,
586    ) -> super::builder::data_migration_service::RollbackConversionWorkspace {
587        super::builder::data_migration_service::RollbackConversionWorkspace::new(self.inner.clone())
588    }
589
590    /// Applies draft tree onto a specific destination database.
591    ///
592    /// # Long running operations
593    ///
594    /// This method is used to start, and/or poll a [long-running Operation].
595    /// The [Working with long-running operations] chapter in the [user guide]
596    /// covers these operations in detail.
597    ///
598    /// [long-running operation]: https://google.aip.dev/151
599    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
600    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
601    pub fn apply_conversion_workspace(
602        &self,
603    ) -> super::builder::data_migration_service::ApplyConversionWorkspace {
604        super::builder::data_migration_service::ApplyConversionWorkspace::new(self.inner.clone())
605    }
606
607    /// Describes the database entities tree for a specific conversion workspace
608    /// and a specific tree type.
609    ///
610    /// Database entities are not resources like conversion workspaces or mapping
611    /// rules, and they can't be created, updated or deleted. Instead, they are
612    /// simple data objects describing the structure of the client database.
613    pub fn describe_database_entities(
614        &self,
615    ) -> super::builder::data_migration_service::DescribeDatabaseEntities {
616        super::builder::data_migration_service::DescribeDatabaseEntities::new(self.inner.clone())
617    }
618
619    /// Searches/lists the background jobs for a specific
620    /// conversion workspace.
621    ///
622    /// The background jobs are not resources like conversion workspaces or
623    /// mapping rules, and they can't be created, updated or deleted.
624    /// Instead, they are a way to expose the data plane jobs log.
625    pub fn search_background_jobs(
626        &self,
627    ) -> super::builder::data_migration_service::SearchBackgroundJobs {
628        super::builder::data_migration_service::SearchBackgroundJobs::new(self.inner.clone())
629    }
630
631    /// Retrieves a list of committed revisions of a specific conversion
632    /// workspace.
633    pub fn describe_conversion_workspace_revisions(
634        &self,
635    ) -> super::builder::data_migration_service::DescribeConversionWorkspaceRevisions {
636        super::builder::data_migration_service::DescribeConversionWorkspaceRevisions::new(
637            self.inner.clone(),
638        )
639    }
640
641    /// Fetches a set of static IP addresses that need to be allowlisted by the
642    /// customer when using the static-IP connectivity method.
643    pub fn fetch_static_ips(&self) -> super::builder::data_migration_service::FetchStaticIps {
644        super::builder::data_migration_service::FetchStaticIps::new(self.inner.clone())
645    }
646
647    /// Lists information about the supported locations for this service.
648    pub fn list_locations(&self) -> super::builder::data_migration_service::ListLocations {
649        super::builder::data_migration_service::ListLocations::new(self.inner.clone())
650    }
651
652    /// Gets information about a location.
653    pub fn get_location(&self) -> super::builder::data_migration_service::GetLocation {
654        super::builder::data_migration_service::GetLocation::new(self.inner.clone())
655    }
656
657    /// Sets the access control policy on the specified resource. Replaces
658    /// any existing policy.
659    ///
660    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
661    /// errors.
662    pub fn set_iam_policy(&self) -> super::builder::data_migration_service::SetIamPolicy {
663        super::builder::data_migration_service::SetIamPolicy::new(self.inner.clone())
664    }
665
666    /// Gets the access control policy for a resource. Returns an empty policy
667    /// if the resource exists and does not have a policy set.
668    pub fn get_iam_policy(&self) -> super::builder::data_migration_service::GetIamPolicy {
669        super::builder::data_migration_service::GetIamPolicy::new(self.inner.clone())
670    }
671
672    /// Returns permissions that a caller has on the specified resource. If the
673    /// resource does not exist, this will return an empty set of
674    /// permissions, not a `NOT_FOUND` error.
675    ///
676    /// Note: This operation is designed to be used for building
677    /// permission-aware UIs and command-line tools, not for authorization
678    /// checking. This operation may "fail open" without warning.
679    pub fn test_iam_permissions(
680        &self,
681    ) -> super::builder::data_migration_service::TestIamPermissions {
682        super::builder::data_migration_service::TestIamPermissions::new(self.inner.clone())
683    }
684
685    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
686    ///
687    /// [google.longrunning.Operations]: longrunning::client::Operations
688    pub fn list_operations(&self) -> super::builder::data_migration_service::ListOperations {
689        super::builder::data_migration_service::ListOperations::new(self.inner.clone())
690    }
691
692    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
693    ///
694    /// [google.longrunning.Operations]: longrunning::client::Operations
695    pub fn get_operation(&self) -> super::builder::data_migration_service::GetOperation {
696        super::builder::data_migration_service::GetOperation::new(self.inner.clone())
697    }
698
699    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
700    ///
701    /// [google.longrunning.Operations]: longrunning::client::Operations
702    pub fn delete_operation(&self) -> super::builder::data_migration_service::DeleteOperation {
703        super::builder::data_migration_service::DeleteOperation::new(self.inner.clone())
704    }
705
706    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
707    ///
708    /// [google.longrunning.Operations]: longrunning::client::Operations
709    pub fn cancel_operation(&self) -> super::builder::data_migration_service::CancelOperation {
710        super::builder::data_migration_service::CancelOperation::new(self.inner.clone())
711    }
712}