Skip to main content

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