google_cloud_dataplex_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 Cloud Dataplex API.
20///
21/// # Example
22/// ```
23/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
24/// # use google_cloud_dataplex_v1::client::BusinessGlossaryService;
25/// let client = BusinessGlossaryService::builder().build().await?;
26/// // use `client` to make requests to the Cloud Dataplex API.
27/// # Ok(()) }
28/// ```
29///
30/// # Service Description
31///
32/// BusinessGlossaryService provides APIs for managing business glossary
33/// resources for enterprise customers.
34/// The resources currently supported in Business Glossary are:
35///
36/// 1. Glossary
37/// 1. GlossaryCategory
38/// 1. GlossaryTerm
39///
40/// # Configuration
41///
42/// To configure `BusinessGlossaryService` use the `with_*` methods in the type returned
43/// by [builder()][BusinessGlossaryService::builder]. The default configuration should
44/// work for most applications. Common configuration changes include
45///
46/// * [with_endpoint()]: by default this client uses the global default endpoint
47/// (`https://dataplex.googleapis.com`). Applications using regional
48/// endpoints or running in restricted networks (e.g. a network configured
49// with [Private Google Access with VPC Service Controls]) may want to
50/// override this default.
51/// * [with_credentials()]: by default this client uses
52/// [Application Default Credentials]. Applications using custom
53/// authentication may need to override this default.
54///
55/// [with_endpoint()]: super::builder::business_glossary_service::ClientBuilder::with_endpoint
56/// [with_credentials()]: super::builder::business_glossary_service::ClientBuilder::credentials
57/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
58/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
59///
60/// # Pooling and Cloning
61///
62/// `BusinessGlossaryService` holds a connection pool internally, it is advised to
63/// create one and the reuse it. You do not need to wrap `BusinessGlossaryService` in
64/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
65/// already uses an `Arc` internally.
66#[derive(Clone, Debug)]
67pub struct BusinessGlossaryService {
68 inner: std::sync::Arc<dyn super::stub::dynamic::BusinessGlossaryService>,
69}
70
71impl BusinessGlossaryService {
72 /// Returns a builder for [BusinessGlossaryService].
73 ///
74 /// ```
75 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
76 /// # use google_cloud_dataplex_v1::client::BusinessGlossaryService;
77 /// let client = BusinessGlossaryService::builder().build().await?;
78 /// # Ok(()) }
79 /// ```
80 pub fn builder() -> super::builder::business_glossary_service::ClientBuilder {
81 crate::new_client_builder(super::builder::business_glossary_service::client::Factory)
82 }
83
84 /// Creates a new client from the provided stub.
85 ///
86 /// The most common case for calling this function is in tests mocking the
87 /// client's behavior.
88 pub fn from_stub<T>(stub: T) -> Self
89 where
90 T: super::stub::BusinessGlossaryService + 'static,
91 {
92 Self {
93 inner: std::sync::Arc::new(stub),
94 }
95 }
96
97 pub(crate) async fn new(
98 config: gaxi::options::ClientConfig,
99 ) -> crate::ClientBuilderResult<Self> {
100 let inner = Self::build_inner(config).await?;
101 Ok(Self { inner })
102 }
103
104 async fn build_inner(
105 conf: gaxi::options::ClientConfig,
106 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::BusinessGlossaryService>>
107 {
108 if gaxi::options::tracing_enabled(&conf) {
109 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
110 }
111 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
112 }
113
114 async fn build_transport(
115 conf: gaxi::options::ClientConfig,
116 ) -> crate::ClientBuilderResult<impl super::stub::BusinessGlossaryService> {
117 super::transport::BusinessGlossaryService::new(conf).await
118 }
119
120 async fn build_with_tracing(
121 conf: gaxi::options::ClientConfig,
122 ) -> crate::ClientBuilderResult<impl super::stub::BusinessGlossaryService> {
123 Self::build_transport(conf)
124 .await
125 .map(super::tracing::BusinessGlossaryService::new)
126 }
127
128 /// Creates a new Glossary resource.
129 ///
130 /// # Long running operations
131 ///
132 /// This method is used to start, and/or poll a [long-running Operation].
133 /// The [Working with long-running operations] chapter in the [user guide]
134 /// covers these operations in detail.
135 ///
136 /// [long-running operation]: https://google.aip.dev/151
137 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
138 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
139 pub fn create_glossary(&self) -> super::builder::business_glossary_service::CreateGlossary {
140 super::builder::business_glossary_service::CreateGlossary::new(self.inner.clone())
141 }
142
143 /// Updates a Glossary resource.
144 ///
145 /// # Long running operations
146 ///
147 /// This method is used to start, and/or poll a [long-running Operation].
148 /// The [Working with long-running operations] chapter in the [user guide]
149 /// covers these operations in detail.
150 ///
151 /// [long-running operation]: https://google.aip.dev/151
152 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
153 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
154 pub fn update_glossary(&self) -> super::builder::business_glossary_service::UpdateGlossary {
155 super::builder::business_glossary_service::UpdateGlossary::new(self.inner.clone())
156 }
157
158 /// Deletes a Glossary resource. All the categories and terms within the
159 /// Glossary must be deleted before the Glossary can be deleted.
160 ///
161 /// # Long running operations
162 ///
163 /// This method is used to start, and/or poll a [long-running Operation].
164 /// The [Working with long-running operations] chapter in the [user guide]
165 /// covers these operations in detail.
166 ///
167 /// [long-running operation]: https://google.aip.dev/151
168 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
169 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
170 pub fn delete_glossary(&self) -> super::builder::business_glossary_service::DeleteGlossary {
171 super::builder::business_glossary_service::DeleteGlossary::new(self.inner.clone())
172 }
173
174 /// Gets a Glossary resource.
175 pub fn get_glossary(&self) -> super::builder::business_glossary_service::GetGlossary {
176 super::builder::business_glossary_service::GetGlossary::new(self.inner.clone())
177 }
178
179 /// Lists Glossary resources in a project and location.
180 pub fn list_glossaries(&self) -> super::builder::business_glossary_service::ListGlossaries {
181 super::builder::business_glossary_service::ListGlossaries::new(self.inner.clone())
182 }
183
184 /// Creates a new GlossaryCategory resource.
185 pub fn create_glossary_category(
186 &self,
187 ) -> super::builder::business_glossary_service::CreateGlossaryCategory {
188 super::builder::business_glossary_service::CreateGlossaryCategory::new(self.inner.clone())
189 }
190
191 /// Updates a GlossaryCategory resource.
192 pub fn update_glossary_category(
193 &self,
194 ) -> super::builder::business_glossary_service::UpdateGlossaryCategory {
195 super::builder::business_glossary_service::UpdateGlossaryCategory::new(self.inner.clone())
196 }
197
198 /// Deletes a GlossaryCategory resource. All the GlossaryCategories and
199 /// GlossaryTerms nested directly under the specified GlossaryCategory will be
200 /// moved one level up to the parent in the hierarchy.
201 pub fn delete_glossary_category(
202 &self,
203 ) -> super::builder::business_glossary_service::DeleteGlossaryCategory {
204 super::builder::business_glossary_service::DeleteGlossaryCategory::new(self.inner.clone())
205 }
206
207 /// Gets a GlossaryCategory resource.
208 pub fn get_glossary_category(
209 &self,
210 ) -> super::builder::business_glossary_service::GetGlossaryCategory {
211 super::builder::business_glossary_service::GetGlossaryCategory::new(self.inner.clone())
212 }
213
214 /// Lists GlossaryCategory resources in a Glossary.
215 pub fn list_glossary_categories(
216 &self,
217 ) -> super::builder::business_glossary_service::ListGlossaryCategories {
218 super::builder::business_glossary_service::ListGlossaryCategories::new(self.inner.clone())
219 }
220
221 /// Creates a new GlossaryTerm resource.
222 pub fn create_glossary_term(
223 &self,
224 ) -> super::builder::business_glossary_service::CreateGlossaryTerm {
225 super::builder::business_glossary_service::CreateGlossaryTerm::new(self.inner.clone())
226 }
227
228 /// Updates a GlossaryTerm resource.
229 pub fn update_glossary_term(
230 &self,
231 ) -> super::builder::business_glossary_service::UpdateGlossaryTerm {
232 super::builder::business_glossary_service::UpdateGlossaryTerm::new(self.inner.clone())
233 }
234
235 /// Deletes a GlossaryTerm resource.
236 pub fn delete_glossary_term(
237 &self,
238 ) -> super::builder::business_glossary_service::DeleteGlossaryTerm {
239 super::builder::business_glossary_service::DeleteGlossaryTerm::new(self.inner.clone())
240 }
241
242 /// Gets a GlossaryTerm resource.
243 pub fn get_glossary_term(&self) -> super::builder::business_glossary_service::GetGlossaryTerm {
244 super::builder::business_glossary_service::GetGlossaryTerm::new(self.inner.clone())
245 }
246
247 /// Lists GlossaryTerm resources in a Glossary.
248 pub fn list_glossary_terms(
249 &self,
250 ) -> super::builder::business_glossary_service::ListGlossaryTerms {
251 super::builder::business_glossary_service::ListGlossaryTerms::new(self.inner.clone())
252 }
253
254 /// Lists information about the supported locations for this service.
255 pub fn list_locations(&self) -> super::builder::business_glossary_service::ListLocations {
256 super::builder::business_glossary_service::ListLocations::new(self.inner.clone())
257 }
258
259 /// Gets information about a location.
260 pub fn get_location(&self) -> super::builder::business_glossary_service::GetLocation {
261 super::builder::business_glossary_service::GetLocation::new(self.inner.clone())
262 }
263
264 /// Sets the access control policy on the specified resource. Replaces
265 /// any existing policy.
266 ///
267 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
268 /// errors.
269 pub fn set_iam_policy(&self) -> super::builder::business_glossary_service::SetIamPolicy {
270 super::builder::business_glossary_service::SetIamPolicy::new(self.inner.clone())
271 }
272
273 /// Gets the access control policy for a resource. Returns an empty policy
274 /// if the resource exists and does not have a policy set.
275 pub fn get_iam_policy(&self) -> super::builder::business_glossary_service::GetIamPolicy {
276 super::builder::business_glossary_service::GetIamPolicy::new(self.inner.clone())
277 }
278
279 /// Returns permissions that a caller has on the specified resource. If the
280 /// resource does not exist, this will return an empty set of
281 /// permissions, not a `NOT_FOUND` error.
282 ///
283 /// Note: This operation is designed to be used for building
284 /// permission-aware UIs and command-line tools, not for authorization
285 /// checking. This operation may "fail open" without warning.
286 pub fn test_iam_permissions(
287 &self,
288 ) -> super::builder::business_glossary_service::TestIamPermissions {
289 super::builder::business_glossary_service::TestIamPermissions::new(self.inner.clone())
290 }
291
292 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
293 ///
294 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
295 pub fn list_operations(&self) -> super::builder::business_glossary_service::ListOperations {
296 super::builder::business_glossary_service::ListOperations::new(self.inner.clone())
297 }
298
299 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
300 ///
301 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
302 pub fn get_operation(&self) -> super::builder::business_glossary_service::GetOperation {
303 super::builder::business_glossary_service::GetOperation::new(self.inner.clone())
304 }
305
306 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
307 ///
308 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
309 pub fn delete_operation(&self) -> super::builder::business_glossary_service::DeleteOperation {
310 super::builder::business_glossary_service::DeleteOperation::new(self.inner.clone())
311 }
312
313 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
314 ///
315 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
316 pub fn cancel_operation(&self) -> super::builder::business_glossary_service::CancelOperation {
317 super::builder::business_glossary_service::CancelOperation::new(self.inner.clone())
318 }
319}
320
321/// Implements a client for the Cloud Dataplex API.
322///
323/// # Example
324/// ```
325/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
326/// # use google_cloud_dataplex_v1::client::CatalogService;
327/// let client = CatalogService::builder().build().await?;
328/// // use `client` to make requests to the Cloud Dataplex API.
329/// # Ok(()) }
330/// ```
331///
332/// # Service Description
333///
334/// The primary resources offered by this service are EntryGroups, EntryTypes,
335/// AspectTypes, Entries and EntryLinks. They collectively let data
336/// administrators organize, manage, secure, and catalog data located across
337/// cloud projects in their organization in a variety of storage systems,
338/// including Cloud Storage and BigQuery.
339///
340/// # Configuration
341///
342/// To configure `CatalogService` use the `with_*` methods in the type returned
343/// by [builder()][CatalogService::builder]. The default configuration should
344/// work for most applications. Common configuration changes include
345///
346/// * [with_endpoint()]: by default this client uses the global default endpoint
347/// (`https://dataplex.googleapis.com`). Applications using regional
348/// endpoints or running in restricted networks (e.g. a network configured
349// with [Private Google Access with VPC Service Controls]) may want to
350/// override this default.
351/// * [with_credentials()]: by default this client uses
352/// [Application Default Credentials]. Applications using custom
353/// authentication may need to override this default.
354///
355/// [with_endpoint()]: super::builder::catalog_service::ClientBuilder::with_endpoint
356/// [with_credentials()]: super::builder::catalog_service::ClientBuilder::credentials
357/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
358/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
359///
360/// # Pooling and Cloning
361///
362/// `CatalogService` holds a connection pool internally, it is advised to
363/// create one and the reuse it. You do not need to wrap `CatalogService` in
364/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
365/// already uses an `Arc` internally.
366#[derive(Clone, Debug)]
367pub struct CatalogService {
368 inner: std::sync::Arc<dyn super::stub::dynamic::CatalogService>,
369}
370
371impl CatalogService {
372 /// Returns a builder for [CatalogService].
373 ///
374 /// ```
375 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
376 /// # use google_cloud_dataplex_v1::client::CatalogService;
377 /// let client = CatalogService::builder().build().await?;
378 /// # Ok(()) }
379 /// ```
380 pub fn builder() -> super::builder::catalog_service::ClientBuilder {
381 crate::new_client_builder(super::builder::catalog_service::client::Factory)
382 }
383
384 /// Creates a new client from the provided stub.
385 ///
386 /// The most common case for calling this function is in tests mocking the
387 /// client's behavior.
388 pub fn from_stub<T>(stub: T) -> Self
389 where
390 T: super::stub::CatalogService + 'static,
391 {
392 Self {
393 inner: std::sync::Arc::new(stub),
394 }
395 }
396
397 pub(crate) async fn new(
398 config: gaxi::options::ClientConfig,
399 ) -> crate::ClientBuilderResult<Self> {
400 let inner = Self::build_inner(config).await?;
401 Ok(Self { inner })
402 }
403
404 async fn build_inner(
405 conf: gaxi::options::ClientConfig,
406 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::CatalogService>> {
407 if gaxi::options::tracing_enabled(&conf) {
408 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
409 }
410 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
411 }
412
413 async fn build_transport(
414 conf: gaxi::options::ClientConfig,
415 ) -> crate::ClientBuilderResult<impl super::stub::CatalogService> {
416 super::transport::CatalogService::new(conf).await
417 }
418
419 async fn build_with_tracing(
420 conf: gaxi::options::ClientConfig,
421 ) -> crate::ClientBuilderResult<impl super::stub::CatalogService> {
422 Self::build_transport(conf)
423 .await
424 .map(super::tracing::CatalogService::new)
425 }
426
427 /// Creates an EntryType.
428 ///
429 /// # Long running operations
430 ///
431 /// This method is used to start, and/or poll a [long-running Operation].
432 /// The [Working with long-running operations] chapter in the [user guide]
433 /// covers these operations in detail.
434 ///
435 /// [long-running operation]: https://google.aip.dev/151
436 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
437 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
438 pub fn create_entry_type(&self) -> super::builder::catalog_service::CreateEntryType {
439 super::builder::catalog_service::CreateEntryType::new(self.inner.clone())
440 }
441
442 /// Updates an EntryType.
443 ///
444 /// # Long running operations
445 ///
446 /// This method is used to start, and/or poll a [long-running Operation].
447 /// The [Working with long-running operations] chapter in the [user guide]
448 /// covers these operations in detail.
449 ///
450 /// [long-running operation]: https://google.aip.dev/151
451 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
452 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
453 pub fn update_entry_type(&self) -> super::builder::catalog_service::UpdateEntryType {
454 super::builder::catalog_service::UpdateEntryType::new(self.inner.clone())
455 }
456
457 /// Deletes an EntryType.
458 ///
459 /// # Long running operations
460 ///
461 /// This method is used to start, and/or poll a [long-running Operation].
462 /// The [Working with long-running operations] chapter in the [user guide]
463 /// covers these operations in detail.
464 ///
465 /// [long-running operation]: https://google.aip.dev/151
466 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
467 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
468 pub fn delete_entry_type(&self) -> super::builder::catalog_service::DeleteEntryType {
469 super::builder::catalog_service::DeleteEntryType::new(self.inner.clone())
470 }
471
472 /// Lists EntryType resources in a project and location.
473 pub fn list_entry_types(&self) -> super::builder::catalog_service::ListEntryTypes {
474 super::builder::catalog_service::ListEntryTypes::new(self.inner.clone())
475 }
476
477 /// Gets an EntryType.
478 pub fn get_entry_type(&self) -> super::builder::catalog_service::GetEntryType {
479 super::builder::catalog_service::GetEntryType::new(self.inner.clone())
480 }
481
482 /// Creates an AspectType.
483 ///
484 /// # Long running operations
485 ///
486 /// This method is used to start, and/or poll a [long-running Operation].
487 /// The [Working with long-running operations] chapter in the [user guide]
488 /// covers these operations in detail.
489 ///
490 /// [long-running operation]: https://google.aip.dev/151
491 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
492 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
493 pub fn create_aspect_type(&self) -> super::builder::catalog_service::CreateAspectType {
494 super::builder::catalog_service::CreateAspectType::new(self.inner.clone())
495 }
496
497 /// Updates an AspectType.
498 ///
499 /// # Long running operations
500 ///
501 /// This method is used to start, and/or poll a [long-running Operation].
502 /// The [Working with long-running operations] chapter in the [user guide]
503 /// covers these operations in detail.
504 ///
505 /// [long-running operation]: https://google.aip.dev/151
506 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
507 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
508 pub fn update_aspect_type(&self) -> super::builder::catalog_service::UpdateAspectType {
509 super::builder::catalog_service::UpdateAspectType::new(self.inner.clone())
510 }
511
512 /// Deletes an AspectType.
513 ///
514 /// # Long running operations
515 ///
516 /// This method is used to start, and/or poll a [long-running Operation].
517 /// The [Working with long-running operations] chapter in the [user guide]
518 /// covers these operations in detail.
519 ///
520 /// [long-running operation]: https://google.aip.dev/151
521 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
522 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
523 pub fn delete_aspect_type(&self) -> super::builder::catalog_service::DeleteAspectType {
524 super::builder::catalog_service::DeleteAspectType::new(self.inner.clone())
525 }
526
527 /// Lists AspectType resources in a project and location.
528 pub fn list_aspect_types(&self) -> super::builder::catalog_service::ListAspectTypes {
529 super::builder::catalog_service::ListAspectTypes::new(self.inner.clone())
530 }
531
532 /// Gets an AspectType.
533 pub fn get_aspect_type(&self) -> super::builder::catalog_service::GetAspectType {
534 super::builder::catalog_service::GetAspectType::new(self.inner.clone())
535 }
536
537 /// Creates an EntryGroup.
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 create_entry_group(&self) -> super::builder::catalog_service::CreateEntryGroup {
549 super::builder::catalog_service::CreateEntryGroup::new(self.inner.clone())
550 }
551
552 /// Updates an EntryGroup.
553 ///
554 /// # Long running operations
555 ///
556 /// This method is used to start, and/or poll a [long-running Operation].
557 /// The [Working with long-running operations] chapter in the [user guide]
558 /// covers these operations in detail.
559 ///
560 /// [long-running operation]: https://google.aip.dev/151
561 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
562 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
563 pub fn update_entry_group(&self) -> super::builder::catalog_service::UpdateEntryGroup {
564 super::builder::catalog_service::UpdateEntryGroup::new(self.inner.clone())
565 }
566
567 /// Deletes an EntryGroup.
568 ///
569 /// # Long running operations
570 ///
571 /// This method is used to start, and/or poll a [long-running Operation].
572 /// The [Working with long-running operations] chapter in the [user guide]
573 /// covers these operations in detail.
574 ///
575 /// [long-running operation]: https://google.aip.dev/151
576 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
577 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
578 pub fn delete_entry_group(&self) -> super::builder::catalog_service::DeleteEntryGroup {
579 super::builder::catalog_service::DeleteEntryGroup::new(self.inner.clone())
580 }
581
582 /// Lists EntryGroup resources in a project and location.
583 pub fn list_entry_groups(&self) -> super::builder::catalog_service::ListEntryGroups {
584 super::builder::catalog_service::ListEntryGroups::new(self.inner.clone())
585 }
586
587 /// Gets an EntryGroup.
588 pub fn get_entry_group(&self) -> super::builder::catalog_service::GetEntryGroup {
589 super::builder::catalog_service::GetEntryGroup::new(self.inner.clone())
590 }
591
592 /// Creates an Entry.
593 pub fn create_entry(&self) -> super::builder::catalog_service::CreateEntry {
594 super::builder::catalog_service::CreateEntry::new(self.inner.clone())
595 }
596
597 /// Updates an Entry.
598 pub fn update_entry(&self) -> super::builder::catalog_service::UpdateEntry {
599 super::builder::catalog_service::UpdateEntry::new(self.inner.clone())
600 }
601
602 /// Deletes an Entry.
603 pub fn delete_entry(&self) -> super::builder::catalog_service::DeleteEntry {
604 super::builder::catalog_service::DeleteEntry::new(self.inner.clone())
605 }
606
607 /// Lists Entries within an EntryGroup.
608 /// Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc
609 /// Metastore metadata that is stored in Dataplex Universal Catalog is
610 /// changing. For more information, see [Changes to metadata stored in
611 /// Dataplex Universal
612 /// Catalog](https://cloud.google.com/dataplex/docs/metadata-changes).
613 pub fn list_entries(&self) -> super::builder::catalog_service::ListEntries {
614 super::builder::catalog_service::ListEntries::new(self.inner.clone())
615 }
616
617 /// Gets an Entry.
618 /// Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc
619 /// Metastore metadata that is stored in Dataplex Universal Catalog is
620 /// changing. For more information, see [Changes to metadata stored in
621 /// Dataplex Universal
622 /// Catalog](https://cloud.google.com/dataplex/docs/metadata-changes).
623 pub fn get_entry(&self) -> super::builder::catalog_service::GetEntry {
624 super::builder::catalog_service::GetEntry::new(self.inner.clone())
625 }
626
627 /// Looks up an entry by name using the permission on the source system.
628 /// Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc
629 /// Metastore metadata that is stored in Dataplex Universal Catalog is
630 /// changing. For more information, see [Changes to metadata stored in
631 /// Dataplex Universal
632 /// Catalog](https://cloud.google.com/dataplex/docs/metadata-changes).
633 pub fn lookup_entry(&self) -> super::builder::catalog_service::LookupEntry {
634 super::builder::catalog_service::LookupEntry::new(self.inner.clone())
635 }
636
637 /// Searches for Entries matching the given query and scope.
638 pub fn search_entries(&self) -> super::builder::catalog_service::SearchEntries {
639 super::builder::catalog_service::SearchEntries::new(self.inner.clone())
640 }
641
642 /// Creates a metadata job. For example, use a metadata job to import metadata
643 /// from a third-party system into Dataplex Universal Catalog.
644 ///
645 /// # Long running operations
646 ///
647 /// This method is used to start, and/or poll a [long-running Operation].
648 /// The [Working with long-running operations] chapter in the [user guide]
649 /// covers these operations in detail.
650 ///
651 /// [long-running operation]: https://google.aip.dev/151
652 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
653 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
654 pub fn create_metadata_job(&self) -> super::builder::catalog_service::CreateMetadataJob {
655 super::builder::catalog_service::CreateMetadataJob::new(self.inner.clone())
656 }
657
658 /// Gets a metadata job.
659 pub fn get_metadata_job(&self) -> super::builder::catalog_service::GetMetadataJob {
660 super::builder::catalog_service::GetMetadataJob::new(self.inner.clone())
661 }
662
663 /// Lists metadata jobs.
664 pub fn list_metadata_jobs(&self) -> super::builder::catalog_service::ListMetadataJobs {
665 super::builder::catalog_service::ListMetadataJobs::new(self.inner.clone())
666 }
667
668 /// Cancels a metadata job.
669 ///
670 /// If you cancel a metadata import job that is in progress, the changes in the
671 /// job might be partially applied. We recommend that you reset the state of
672 /// the entry groups in your project by running another metadata job that
673 /// reverts the changes from the canceled job.
674 pub fn cancel_metadata_job(&self) -> super::builder::catalog_service::CancelMetadataJob {
675 super::builder::catalog_service::CancelMetadataJob::new(self.inner.clone())
676 }
677
678 /// Creates an Entry Link.
679 pub fn create_entry_link(&self) -> super::builder::catalog_service::CreateEntryLink {
680 super::builder::catalog_service::CreateEntryLink::new(self.inner.clone())
681 }
682
683 /// Deletes an Entry Link.
684 pub fn delete_entry_link(&self) -> super::builder::catalog_service::DeleteEntryLink {
685 super::builder::catalog_service::DeleteEntryLink::new(self.inner.clone())
686 }
687
688 /// Gets an Entry Link.
689 pub fn get_entry_link(&self) -> super::builder::catalog_service::GetEntryLink {
690 super::builder::catalog_service::GetEntryLink::new(self.inner.clone())
691 }
692
693 /// Lists information about the supported locations for this service.
694 pub fn list_locations(&self) -> super::builder::catalog_service::ListLocations {
695 super::builder::catalog_service::ListLocations::new(self.inner.clone())
696 }
697
698 /// Gets information about a location.
699 pub fn get_location(&self) -> super::builder::catalog_service::GetLocation {
700 super::builder::catalog_service::GetLocation::new(self.inner.clone())
701 }
702
703 /// Sets the access control policy on the specified resource. Replaces
704 /// any existing policy.
705 ///
706 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
707 /// errors.
708 pub fn set_iam_policy(&self) -> super::builder::catalog_service::SetIamPolicy {
709 super::builder::catalog_service::SetIamPolicy::new(self.inner.clone())
710 }
711
712 /// Gets the access control policy for a resource. Returns an empty policy
713 /// if the resource exists and does not have a policy set.
714 pub fn get_iam_policy(&self) -> super::builder::catalog_service::GetIamPolicy {
715 super::builder::catalog_service::GetIamPolicy::new(self.inner.clone())
716 }
717
718 /// Returns permissions that a caller has on the specified resource. If the
719 /// resource does not exist, this will return an empty set of
720 /// permissions, not a `NOT_FOUND` error.
721 ///
722 /// Note: This operation is designed to be used for building
723 /// permission-aware UIs and command-line tools, not for authorization
724 /// checking. This operation may "fail open" without warning.
725 pub fn test_iam_permissions(&self) -> super::builder::catalog_service::TestIamPermissions {
726 super::builder::catalog_service::TestIamPermissions::new(self.inner.clone())
727 }
728
729 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
730 ///
731 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
732 pub fn list_operations(&self) -> super::builder::catalog_service::ListOperations {
733 super::builder::catalog_service::ListOperations::new(self.inner.clone())
734 }
735
736 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
737 ///
738 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
739 pub fn get_operation(&self) -> super::builder::catalog_service::GetOperation {
740 super::builder::catalog_service::GetOperation::new(self.inner.clone())
741 }
742
743 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
744 ///
745 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
746 pub fn delete_operation(&self) -> super::builder::catalog_service::DeleteOperation {
747 super::builder::catalog_service::DeleteOperation::new(self.inner.clone())
748 }
749
750 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
751 ///
752 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
753 pub fn cancel_operation(&self) -> super::builder::catalog_service::CancelOperation {
754 super::builder::catalog_service::CancelOperation::new(self.inner.clone())
755 }
756}
757
758/// Implements a client for the Cloud Dataplex API.
759///
760/// # Example
761/// ```
762/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
763/// # use google_cloud_dataplex_v1::client::CmekService;
764/// let client = CmekService::builder().build().await?;
765/// // use `client` to make requests to the Cloud Dataplex API.
766/// # Ok(()) }
767/// ```
768///
769/// # Service Description
770///
771/// Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service
772///
773/// # Configuration
774///
775/// To configure `CmekService` use the `with_*` methods in the type returned
776/// by [builder()][CmekService::builder]. The default configuration should
777/// work for most applications. Common configuration changes include
778///
779/// * [with_endpoint()]: by default this client uses the global default endpoint
780/// (`https://dataplex.googleapis.com`). Applications using regional
781/// endpoints or running in restricted networks (e.g. a network configured
782// with [Private Google Access with VPC Service Controls]) may want to
783/// override this default.
784/// * [with_credentials()]: by default this client uses
785/// [Application Default Credentials]. Applications using custom
786/// authentication may need to override this default.
787///
788/// [with_endpoint()]: super::builder::cmek_service::ClientBuilder::with_endpoint
789/// [with_credentials()]: super::builder::cmek_service::ClientBuilder::credentials
790/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
791/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
792///
793/// # Pooling and Cloning
794///
795/// `CmekService` holds a connection pool internally, it is advised to
796/// create one and the reuse it. You do not need to wrap `CmekService` in
797/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
798/// already uses an `Arc` internally.
799#[derive(Clone, Debug)]
800pub struct CmekService {
801 inner: std::sync::Arc<dyn super::stub::dynamic::CmekService>,
802}
803
804impl CmekService {
805 /// Returns a builder for [CmekService].
806 ///
807 /// ```
808 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
809 /// # use google_cloud_dataplex_v1::client::CmekService;
810 /// let client = CmekService::builder().build().await?;
811 /// # Ok(()) }
812 /// ```
813 pub fn builder() -> super::builder::cmek_service::ClientBuilder {
814 crate::new_client_builder(super::builder::cmek_service::client::Factory)
815 }
816
817 /// Creates a new client from the provided stub.
818 ///
819 /// The most common case for calling this function is in tests mocking the
820 /// client's behavior.
821 pub fn from_stub<T>(stub: T) -> Self
822 where
823 T: super::stub::CmekService + 'static,
824 {
825 Self {
826 inner: std::sync::Arc::new(stub),
827 }
828 }
829
830 pub(crate) async fn new(
831 config: gaxi::options::ClientConfig,
832 ) -> crate::ClientBuilderResult<Self> {
833 let inner = Self::build_inner(config).await?;
834 Ok(Self { inner })
835 }
836
837 async fn build_inner(
838 conf: gaxi::options::ClientConfig,
839 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::CmekService>> {
840 if gaxi::options::tracing_enabled(&conf) {
841 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
842 }
843 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
844 }
845
846 async fn build_transport(
847 conf: gaxi::options::ClientConfig,
848 ) -> crate::ClientBuilderResult<impl super::stub::CmekService> {
849 super::transport::CmekService::new(conf).await
850 }
851
852 async fn build_with_tracing(
853 conf: gaxi::options::ClientConfig,
854 ) -> crate::ClientBuilderResult<impl super::stub::CmekService> {
855 Self::build_transport(conf)
856 .await
857 .map(super::tracing::CmekService::new)
858 }
859
860 /// Create an EncryptionConfig.
861 ///
862 /// # Long running operations
863 ///
864 /// This method is used to start, and/or poll a [long-running Operation].
865 /// The [Working with long-running operations] chapter in the [user guide]
866 /// covers these operations in detail.
867 ///
868 /// [long-running operation]: https://google.aip.dev/151
869 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
870 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
871 pub fn create_encryption_config(&self) -> super::builder::cmek_service::CreateEncryptionConfig {
872 super::builder::cmek_service::CreateEncryptionConfig::new(self.inner.clone())
873 }
874
875 /// Update an EncryptionConfig.
876 ///
877 /// # Long running operations
878 ///
879 /// This method is used to start, and/or poll a [long-running Operation].
880 /// The [Working with long-running operations] chapter in the [user guide]
881 /// covers these operations in detail.
882 ///
883 /// [long-running operation]: https://google.aip.dev/151
884 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
885 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
886 pub fn update_encryption_config(&self) -> super::builder::cmek_service::UpdateEncryptionConfig {
887 super::builder::cmek_service::UpdateEncryptionConfig::new(self.inner.clone())
888 }
889
890 /// Delete an EncryptionConfig.
891 ///
892 /// # Long running operations
893 ///
894 /// This method is used to start, and/or poll a [long-running Operation].
895 /// The [Working with long-running operations] chapter in the [user guide]
896 /// covers these operations in detail.
897 ///
898 /// [long-running operation]: https://google.aip.dev/151
899 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
900 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
901 pub fn delete_encryption_config(&self) -> super::builder::cmek_service::DeleteEncryptionConfig {
902 super::builder::cmek_service::DeleteEncryptionConfig::new(self.inner.clone())
903 }
904
905 /// List EncryptionConfigs.
906 pub fn list_encryption_configs(&self) -> super::builder::cmek_service::ListEncryptionConfigs {
907 super::builder::cmek_service::ListEncryptionConfigs::new(self.inner.clone())
908 }
909
910 /// Get an EncryptionConfig.
911 pub fn get_encryption_config(&self) -> super::builder::cmek_service::GetEncryptionConfig {
912 super::builder::cmek_service::GetEncryptionConfig::new(self.inner.clone())
913 }
914
915 /// Lists information about the supported locations for this service.
916 pub fn list_locations(&self) -> super::builder::cmek_service::ListLocations {
917 super::builder::cmek_service::ListLocations::new(self.inner.clone())
918 }
919
920 /// Gets information about a location.
921 pub fn get_location(&self) -> super::builder::cmek_service::GetLocation {
922 super::builder::cmek_service::GetLocation::new(self.inner.clone())
923 }
924
925 /// Sets the access control policy on the specified resource. Replaces
926 /// any existing policy.
927 ///
928 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
929 /// errors.
930 pub fn set_iam_policy(&self) -> super::builder::cmek_service::SetIamPolicy {
931 super::builder::cmek_service::SetIamPolicy::new(self.inner.clone())
932 }
933
934 /// Gets the access control policy for a resource. Returns an empty policy
935 /// if the resource exists and does not have a policy set.
936 pub fn get_iam_policy(&self) -> super::builder::cmek_service::GetIamPolicy {
937 super::builder::cmek_service::GetIamPolicy::new(self.inner.clone())
938 }
939
940 /// Returns permissions that a caller has on the specified resource. If the
941 /// resource does not exist, this will return an empty set of
942 /// permissions, not a `NOT_FOUND` error.
943 ///
944 /// Note: This operation is designed to be used for building
945 /// permission-aware UIs and command-line tools, not for authorization
946 /// checking. This operation may "fail open" without warning.
947 pub fn test_iam_permissions(&self) -> super::builder::cmek_service::TestIamPermissions {
948 super::builder::cmek_service::TestIamPermissions::new(self.inner.clone())
949 }
950
951 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
952 ///
953 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
954 pub fn list_operations(&self) -> super::builder::cmek_service::ListOperations {
955 super::builder::cmek_service::ListOperations::new(self.inner.clone())
956 }
957
958 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
959 ///
960 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
961 pub fn get_operation(&self) -> super::builder::cmek_service::GetOperation {
962 super::builder::cmek_service::GetOperation::new(self.inner.clone())
963 }
964
965 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
966 ///
967 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
968 pub fn delete_operation(&self) -> super::builder::cmek_service::DeleteOperation {
969 super::builder::cmek_service::DeleteOperation::new(self.inner.clone())
970 }
971
972 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
973 ///
974 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
975 pub fn cancel_operation(&self) -> super::builder::cmek_service::CancelOperation {
976 super::builder::cmek_service::CancelOperation::new(self.inner.clone())
977 }
978}
979
980/// Implements a client for the Cloud Dataplex API.
981///
982/// # Example
983/// ```
984/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
985/// # use google_cloud_dataplex_v1::client::ContentService;
986/// let client = ContentService::builder().build().await?;
987/// // use `client` to make requests to the Cloud Dataplex API.
988/// # Ok(()) }
989/// ```
990///
991/// # Service Description
992///
993/// ContentService manages Notebook and SQL Scripts for Dataplex Universal
994/// Catalog.
995///
996/// # Configuration
997///
998/// To configure `ContentService` use the `with_*` methods in the type returned
999/// by [builder()][ContentService::builder]. The default configuration should
1000/// work for most applications. Common configuration changes include
1001///
1002/// * [with_endpoint()]: by default this client uses the global default endpoint
1003/// (`https://dataplex.googleapis.com`). Applications using regional
1004/// endpoints or running in restricted networks (e.g. a network configured
1005// with [Private Google Access with VPC Service Controls]) may want to
1006/// override this default.
1007/// * [with_credentials()]: by default this client uses
1008/// [Application Default Credentials]. Applications using custom
1009/// authentication may need to override this default.
1010///
1011/// [with_endpoint()]: super::builder::content_service::ClientBuilder::with_endpoint
1012/// [with_credentials()]: super::builder::content_service::ClientBuilder::credentials
1013/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1014/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1015///
1016/// # Pooling and Cloning
1017///
1018/// `ContentService` holds a connection pool internally, it is advised to
1019/// create one and the reuse it. You do not need to wrap `ContentService` in
1020/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1021/// already uses an `Arc` internally.
1022#[derive(Clone, Debug)]
1023pub struct ContentService {
1024 inner: std::sync::Arc<dyn super::stub::dynamic::ContentService>,
1025}
1026
1027impl ContentService {
1028 /// Returns a builder for [ContentService].
1029 ///
1030 /// ```
1031 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1032 /// # use google_cloud_dataplex_v1::client::ContentService;
1033 /// let client = ContentService::builder().build().await?;
1034 /// # Ok(()) }
1035 /// ```
1036 pub fn builder() -> super::builder::content_service::ClientBuilder {
1037 crate::new_client_builder(super::builder::content_service::client::Factory)
1038 }
1039
1040 /// Creates a new client from the provided stub.
1041 ///
1042 /// The most common case for calling this function is in tests mocking the
1043 /// client's behavior.
1044 pub fn from_stub<T>(stub: T) -> Self
1045 where
1046 T: super::stub::ContentService + 'static,
1047 {
1048 Self {
1049 inner: std::sync::Arc::new(stub),
1050 }
1051 }
1052
1053 pub(crate) async fn new(
1054 config: gaxi::options::ClientConfig,
1055 ) -> crate::ClientBuilderResult<Self> {
1056 let inner = Self::build_inner(config).await?;
1057 Ok(Self { inner })
1058 }
1059
1060 async fn build_inner(
1061 conf: gaxi::options::ClientConfig,
1062 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ContentService>> {
1063 if gaxi::options::tracing_enabled(&conf) {
1064 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1065 }
1066 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1067 }
1068
1069 async fn build_transport(
1070 conf: gaxi::options::ClientConfig,
1071 ) -> crate::ClientBuilderResult<impl super::stub::ContentService> {
1072 super::transport::ContentService::new(conf).await
1073 }
1074
1075 async fn build_with_tracing(
1076 conf: gaxi::options::ClientConfig,
1077 ) -> crate::ClientBuilderResult<impl super::stub::ContentService> {
1078 Self::build_transport(conf)
1079 .await
1080 .map(super::tracing::ContentService::new)
1081 }
1082
1083 /// Create a content.
1084 pub fn create_content(&self) -> super::builder::content_service::CreateContent {
1085 super::builder::content_service::CreateContent::new(self.inner.clone())
1086 }
1087
1088 /// Update a content. Only supports full resource update.
1089 pub fn update_content(&self) -> super::builder::content_service::UpdateContent {
1090 super::builder::content_service::UpdateContent::new(self.inner.clone())
1091 }
1092
1093 /// Delete a content.
1094 pub fn delete_content(&self) -> super::builder::content_service::DeleteContent {
1095 super::builder::content_service::DeleteContent::new(self.inner.clone())
1096 }
1097
1098 /// Get a content resource.
1099 pub fn get_content(&self) -> super::builder::content_service::GetContent {
1100 super::builder::content_service::GetContent::new(self.inner.clone())
1101 }
1102
1103 /// Gets the access control policy for a contentitem resource. A `NOT_FOUND`
1104 /// error is returned if the resource does not exist. An empty policy is
1105 /// returned if the resource exists but does not have a policy set on it.
1106 ///
1107 /// Caller must have Google IAM `dataplex.content.getIamPolicy` permission
1108 /// on the resource.
1109 pub fn get_iam_policy(&self) -> super::builder::content_service::GetIamPolicy {
1110 super::builder::content_service::GetIamPolicy::new(self.inner.clone())
1111 }
1112
1113 /// Sets the access control policy on the specified contentitem resource.
1114 /// Replaces any existing policy.
1115 ///
1116 /// Caller must have Google IAM `dataplex.content.setIamPolicy` permission
1117 /// on the resource.
1118 pub fn set_iam_policy(&self) -> super::builder::content_service::SetIamPolicy {
1119 super::builder::content_service::SetIamPolicy::new(self.inner.clone())
1120 }
1121
1122 /// Returns the caller's permissions on a resource.
1123 /// If the resource does not exist, an empty set of
1124 /// permissions is returned (a `NOT_FOUND` error is not returned).
1125 ///
1126 /// A caller is not required to have Google IAM permission to make this
1127 /// request.
1128 ///
1129 /// Note: This operation is designed to be used for building permission-aware
1130 /// UIs and command-line tools, not for authorization checking. This operation
1131 /// may "fail open" without warning.
1132 pub fn test_iam_permissions(&self) -> super::builder::content_service::TestIamPermissions {
1133 super::builder::content_service::TestIamPermissions::new(self.inner.clone())
1134 }
1135
1136 /// List content.
1137 pub fn list_content(&self) -> super::builder::content_service::ListContent {
1138 super::builder::content_service::ListContent::new(self.inner.clone())
1139 }
1140
1141 /// Lists information about the supported locations for this service.
1142 pub fn list_locations(&self) -> super::builder::content_service::ListLocations {
1143 super::builder::content_service::ListLocations::new(self.inner.clone())
1144 }
1145
1146 /// Gets information about a location.
1147 pub fn get_location(&self) -> super::builder::content_service::GetLocation {
1148 super::builder::content_service::GetLocation::new(self.inner.clone())
1149 }
1150
1151 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1152 ///
1153 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1154 pub fn list_operations(&self) -> super::builder::content_service::ListOperations {
1155 super::builder::content_service::ListOperations::new(self.inner.clone())
1156 }
1157
1158 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1159 ///
1160 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1161 pub fn get_operation(&self) -> super::builder::content_service::GetOperation {
1162 super::builder::content_service::GetOperation::new(self.inner.clone())
1163 }
1164
1165 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1166 ///
1167 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1168 pub fn delete_operation(&self) -> super::builder::content_service::DeleteOperation {
1169 super::builder::content_service::DeleteOperation::new(self.inner.clone())
1170 }
1171
1172 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1173 ///
1174 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1175 pub fn cancel_operation(&self) -> super::builder::content_service::CancelOperation {
1176 super::builder::content_service::CancelOperation::new(self.inner.clone())
1177 }
1178}
1179
1180/// Implements a client for the Cloud Dataplex API.
1181///
1182/// # Example
1183/// ```
1184/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1185/// # use google_cloud_dataplex_v1::client::DataTaxonomyService;
1186/// let client = DataTaxonomyService::builder().build().await?;
1187/// // use `client` to make requests to the Cloud Dataplex API.
1188/// # Ok(()) }
1189/// ```
1190///
1191/// # Service Description
1192///
1193/// DataTaxonomyService enables attribute-based governance. The resources
1194/// currently offered include DataTaxonomy and DataAttribute.
1195///
1196/// # Configuration
1197///
1198/// To configure `DataTaxonomyService` use the `with_*` methods in the type returned
1199/// by [builder()][DataTaxonomyService::builder]. The default configuration should
1200/// work for most applications. Common configuration changes include
1201///
1202/// * [with_endpoint()]: by default this client uses the global default endpoint
1203/// (`https://dataplex.googleapis.com`). Applications using regional
1204/// endpoints or running in restricted networks (e.g. a network configured
1205// with [Private Google Access with VPC Service Controls]) may want to
1206/// override this default.
1207/// * [with_credentials()]: by default this client uses
1208/// [Application Default Credentials]. Applications using custom
1209/// authentication may need to override this default.
1210///
1211/// [with_endpoint()]: super::builder::data_taxonomy_service::ClientBuilder::with_endpoint
1212/// [with_credentials()]: super::builder::data_taxonomy_service::ClientBuilder::credentials
1213/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1214/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1215///
1216/// # Pooling and Cloning
1217///
1218/// `DataTaxonomyService` holds a connection pool internally, it is advised to
1219/// create one and the reuse it. You do not need to wrap `DataTaxonomyService` in
1220/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1221/// already uses an `Arc` internally.
1222#[derive(Clone, Debug)]
1223#[deprecated]
1224pub struct DataTaxonomyService {
1225 inner: std::sync::Arc<dyn super::stub::dynamic::DataTaxonomyService>,
1226}
1227
1228impl DataTaxonomyService {
1229 /// Returns a builder for [DataTaxonomyService].
1230 ///
1231 /// ```
1232 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1233 /// # use google_cloud_dataplex_v1::client::DataTaxonomyService;
1234 /// let client = DataTaxonomyService::builder().build().await?;
1235 /// # Ok(()) }
1236 /// ```
1237 pub fn builder() -> super::builder::data_taxonomy_service::ClientBuilder {
1238 crate::new_client_builder(super::builder::data_taxonomy_service::client::Factory)
1239 }
1240
1241 /// Creates a new client from the provided stub.
1242 ///
1243 /// The most common case for calling this function is in tests mocking the
1244 /// client's behavior.
1245 pub fn from_stub<T>(stub: T) -> Self
1246 where
1247 T: super::stub::DataTaxonomyService + 'static,
1248 {
1249 Self {
1250 inner: std::sync::Arc::new(stub),
1251 }
1252 }
1253
1254 pub(crate) async fn new(
1255 config: gaxi::options::ClientConfig,
1256 ) -> crate::ClientBuilderResult<Self> {
1257 let inner = Self::build_inner(config).await?;
1258 Ok(Self { inner })
1259 }
1260
1261 async fn build_inner(
1262 conf: gaxi::options::ClientConfig,
1263 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::DataTaxonomyService>>
1264 {
1265 if gaxi::options::tracing_enabled(&conf) {
1266 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1267 }
1268 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1269 }
1270
1271 async fn build_transport(
1272 conf: gaxi::options::ClientConfig,
1273 ) -> crate::ClientBuilderResult<impl super::stub::DataTaxonomyService> {
1274 super::transport::DataTaxonomyService::new(conf).await
1275 }
1276
1277 async fn build_with_tracing(
1278 conf: gaxi::options::ClientConfig,
1279 ) -> crate::ClientBuilderResult<impl super::stub::DataTaxonomyService> {
1280 Self::build_transport(conf)
1281 .await
1282 .map(super::tracing::DataTaxonomyService::new)
1283 }
1284
1285 /// Create a DataTaxonomy resource.
1286 ///
1287 /// # Long running operations
1288 ///
1289 /// This method is used to start, and/or poll a [long-running Operation].
1290 /// The [Working with long-running operations] chapter in the [user guide]
1291 /// covers these operations in detail.
1292 ///
1293 /// [long-running operation]: https://google.aip.dev/151
1294 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1295 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1296 #[deprecated]
1297 pub fn create_data_taxonomy(
1298 &self,
1299 ) -> super::builder::data_taxonomy_service::CreateDataTaxonomy {
1300 super::builder::data_taxonomy_service::CreateDataTaxonomy::new(self.inner.clone())
1301 }
1302
1303 /// Updates a DataTaxonomy resource.
1304 ///
1305 /// # Long running operations
1306 ///
1307 /// This method is used to start, and/or poll a [long-running Operation].
1308 /// The [Working with long-running operations] chapter in the [user guide]
1309 /// covers these operations in detail.
1310 ///
1311 /// [long-running operation]: https://google.aip.dev/151
1312 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1313 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1314 #[deprecated]
1315 pub fn update_data_taxonomy(
1316 &self,
1317 ) -> super::builder::data_taxonomy_service::UpdateDataTaxonomy {
1318 super::builder::data_taxonomy_service::UpdateDataTaxonomy::new(self.inner.clone())
1319 }
1320
1321 /// Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy
1322 /// must be deleted before the DataTaxonomy can be deleted.
1323 ///
1324 /// # Long running operations
1325 ///
1326 /// This method is used to start, and/or poll a [long-running Operation].
1327 /// The [Working with long-running operations] chapter in the [user guide]
1328 /// covers these operations in detail.
1329 ///
1330 /// [long-running operation]: https://google.aip.dev/151
1331 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1332 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1333 #[deprecated]
1334 pub fn delete_data_taxonomy(
1335 &self,
1336 ) -> super::builder::data_taxonomy_service::DeleteDataTaxonomy {
1337 super::builder::data_taxonomy_service::DeleteDataTaxonomy::new(self.inner.clone())
1338 }
1339
1340 /// Lists DataTaxonomy resources in a project and location.
1341 #[deprecated]
1342 pub fn list_data_taxonomies(
1343 &self,
1344 ) -> super::builder::data_taxonomy_service::ListDataTaxonomies {
1345 super::builder::data_taxonomy_service::ListDataTaxonomies::new(self.inner.clone())
1346 }
1347
1348 /// Retrieves a DataTaxonomy resource.
1349 #[deprecated]
1350 pub fn get_data_taxonomy(&self) -> super::builder::data_taxonomy_service::GetDataTaxonomy {
1351 super::builder::data_taxonomy_service::GetDataTaxonomy::new(self.inner.clone())
1352 }
1353
1354 /// Create a DataAttributeBinding resource.
1355 ///
1356 /// # Long running operations
1357 ///
1358 /// This method is used to start, and/or poll a [long-running Operation].
1359 /// The [Working with long-running operations] chapter in the [user guide]
1360 /// covers these operations in detail.
1361 ///
1362 /// [long-running operation]: https://google.aip.dev/151
1363 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1364 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1365 #[deprecated]
1366 pub fn create_data_attribute_binding(
1367 &self,
1368 ) -> super::builder::data_taxonomy_service::CreateDataAttributeBinding {
1369 super::builder::data_taxonomy_service::CreateDataAttributeBinding::new(self.inner.clone())
1370 }
1371
1372 /// Updates a DataAttributeBinding resource.
1373 ///
1374 /// # Long running operations
1375 ///
1376 /// This method is used to start, and/or poll a [long-running Operation].
1377 /// The [Working with long-running operations] chapter in the [user guide]
1378 /// covers these operations in detail.
1379 ///
1380 /// [long-running operation]: https://google.aip.dev/151
1381 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1382 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1383 #[deprecated]
1384 pub fn update_data_attribute_binding(
1385 &self,
1386 ) -> super::builder::data_taxonomy_service::UpdateDataAttributeBinding {
1387 super::builder::data_taxonomy_service::UpdateDataAttributeBinding::new(self.inner.clone())
1388 }
1389
1390 /// Deletes a DataAttributeBinding resource. All attributes within the
1391 /// DataAttributeBinding must be deleted before the DataAttributeBinding can be
1392 /// deleted.
1393 ///
1394 /// # Long running operations
1395 ///
1396 /// This method is used to start, and/or poll a [long-running Operation].
1397 /// The [Working with long-running operations] chapter in the [user guide]
1398 /// covers these operations in detail.
1399 ///
1400 /// [long-running operation]: https://google.aip.dev/151
1401 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1402 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1403 #[deprecated]
1404 pub fn delete_data_attribute_binding(
1405 &self,
1406 ) -> super::builder::data_taxonomy_service::DeleteDataAttributeBinding {
1407 super::builder::data_taxonomy_service::DeleteDataAttributeBinding::new(self.inner.clone())
1408 }
1409
1410 /// Lists DataAttributeBinding resources in a project and location.
1411 #[deprecated]
1412 pub fn list_data_attribute_bindings(
1413 &self,
1414 ) -> super::builder::data_taxonomy_service::ListDataAttributeBindings {
1415 super::builder::data_taxonomy_service::ListDataAttributeBindings::new(self.inner.clone())
1416 }
1417
1418 /// Retrieves a DataAttributeBinding resource.
1419 #[deprecated]
1420 pub fn get_data_attribute_binding(
1421 &self,
1422 ) -> super::builder::data_taxonomy_service::GetDataAttributeBinding {
1423 super::builder::data_taxonomy_service::GetDataAttributeBinding::new(self.inner.clone())
1424 }
1425
1426 /// Create a DataAttribute resource.
1427 ///
1428 /// # Long running operations
1429 ///
1430 /// This method is used to start, and/or poll a [long-running Operation].
1431 /// The [Working with long-running operations] chapter in the [user guide]
1432 /// covers these operations in detail.
1433 ///
1434 /// [long-running operation]: https://google.aip.dev/151
1435 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1436 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1437 #[deprecated]
1438 pub fn create_data_attribute(
1439 &self,
1440 ) -> super::builder::data_taxonomy_service::CreateDataAttribute {
1441 super::builder::data_taxonomy_service::CreateDataAttribute::new(self.inner.clone())
1442 }
1443
1444 /// Updates a DataAttribute resource.
1445 ///
1446 /// # Long running operations
1447 ///
1448 /// This method is used to start, and/or poll a [long-running Operation].
1449 /// The [Working with long-running operations] chapter in the [user guide]
1450 /// covers these operations in detail.
1451 ///
1452 /// [long-running operation]: https://google.aip.dev/151
1453 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1454 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1455 #[deprecated]
1456 pub fn update_data_attribute(
1457 &self,
1458 ) -> super::builder::data_taxonomy_service::UpdateDataAttribute {
1459 super::builder::data_taxonomy_service::UpdateDataAttribute::new(self.inner.clone())
1460 }
1461
1462 /// Deletes a Data Attribute resource.
1463 ///
1464 /// # Long running operations
1465 ///
1466 /// This method is used to start, and/or poll a [long-running Operation].
1467 /// The [Working with long-running operations] chapter in the [user guide]
1468 /// covers these operations in detail.
1469 ///
1470 /// [long-running operation]: https://google.aip.dev/151
1471 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1472 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1473 #[deprecated]
1474 pub fn delete_data_attribute(
1475 &self,
1476 ) -> super::builder::data_taxonomy_service::DeleteDataAttribute {
1477 super::builder::data_taxonomy_service::DeleteDataAttribute::new(self.inner.clone())
1478 }
1479
1480 /// Lists Data Attribute resources in a DataTaxonomy.
1481 #[deprecated]
1482 pub fn list_data_attributes(
1483 &self,
1484 ) -> super::builder::data_taxonomy_service::ListDataAttributes {
1485 super::builder::data_taxonomy_service::ListDataAttributes::new(self.inner.clone())
1486 }
1487
1488 /// Retrieves a Data Attribute resource.
1489 #[deprecated]
1490 pub fn get_data_attribute(&self) -> super::builder::data_taxonomy_service::GetDataAttribute {
1491 super::builder::data_taxonomy_service::GetDataAttribute::new(self.inner.clone())
1492 }
1493
1494 /// Lists information about the supported locations for this service.
1495 pub fn list_locations(&self) -> super::builder::data_taxonomy_service::ListLocations {
1496 super::builder::data_taxonomy_service::ListLocations::new(self.inner.clone())
1497 }
1498
1499 /// Gets information about a location.
1500 pub fn get_location(&self) -> super::builder::data_taxonomy_service::GetLocation {
1501 super::builder::data_taxonomy_service::GetLocation::new(self.inner.clone())
1502 }
1503
1504 /// Sets the access control policy on the specified resource. Replaces
1505 /// any existing policy.
1506 ///
1507 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
1508 /// errors.
1509 pub fn set_iam_policy(&self) -> super::builder::data_taxonomy_service::SetIamPolicy {
1510 super::builder::data_taxonomy_service::SetIamPolicy::new(self.inner.clone())
1511 }
1512
1513 /// Gets the access control policy for a resource. Returns an empty policy
1514 /// if the resource exists and does not have a policy set.
1515 pub fn get_iam_policy(&self) -> super::builder::data_taxonomy_service::GetIamPolicy {
1516 super::builder::data_taxonomy_service::GetIamPolicy::new(self.inner.clone())
1517 }
1518
1519 /// Returns permissions that a caller has on the specified resource. If the
1520 /// resource does not exist, this will return an empty set of
1521 /// permissions, not a `NOT_FOUND` error.
1522 ///
1523 /// Note: This operation is designed to be used for building
1524 /// permission-aware UIs and command-line tools, not for authorization
1525 /// checking. This operation may "fail open" without warning.
1526 pub fn test_iam_permissions(
1527 &self,
1528 ) -> super::builder::data_taxonomy_service::TestIamPermissions {
1529 super::builder::data_taxonomy_service::TestIamPermissions::new(self.inner.clone())
1530 }
1531
1532 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1533 ///
1534 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1535 pub fn list_operations(&self) -> super::builder::data_taxonomy_service::ListOperations {
1536 super::builder::data_taxonomy_service::ListOperations::new(self.inner.clone())
1537 }
1538
1539 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1540 ///
1541 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1542 pub fn get_operation(&self) -> super::builder::data_taxonomy_service::GetOperation {
1543 super::builder::data_taxonomy_service::GetOperation::new(self.inner.clone())
1544 }
1545
1546 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1547 ///
1548 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1549 pub fn delete_operation(&self) -> super::builder::data_taxonomy_service::DeleteOperation {
1550 super::builder::data_taxonomy_service::DeleteOperation::new(self.inner.clone())
1551 }
1552
1553 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1554 ///
1555 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1556 pub fn cancel_operation(&self) -> super::builder::data_taxonomy_service::CancelOperation {
1557 super::builder::data_taxonomy_service::CancelOperation::new(self.inner.clone())
1558 }
1559}
1560
1561/// Implements a client for the Cloud Dataplex API.
1562///
1563/// # Example
1564/// ```
1565/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1566/// # use google_cloud_dataplex_v1::client::DataScanService;
1567/// let client = DataScanService::builder().build().await?;
1568/// // use `client` to make requests to the Cloud Dataplex API.
1569/// # Ok(()) }
1570/// ```
1571///
1572/// # Service Description
1573///
1574/// DataScanService manages DataScan resources which can be configured to run
1575/// various types of data scanning workload and generate enriched metadata (e.g.
1576/// Data Profile, Data Quality) for the data source.
1577///
1578/// # Configuration
1579///
1580/// To configure `DataScanService` use the `with_*` methods in the type returned
1581/// by [builder()][DataScanService::builder]. The default configuration should
1582/// work for most applications. Common configuration changes include
1583///
1584/// * [with_endpoint()]: by default this client uses the global default endpoint
1585/// (`https://dataplex.googleapis.com`). Applications using regional
1586/// endpoints or running in restricted networks (e.g. a network configured
1587// with [Private Google Access with VPC Service Controls]) may want to
1588/// override this default.
1589/// * [with_credentials()]: by default this client uses
1590/// [Application Default Credentials]. Applications using custom
1591/// authentication may need to override this default.
1592///
1593/// [with_endpoint()]: super::builder::data_scan_service::ClientBuilder::with_endpoint
1594/// [with_credentials()]: super::builder::data_scan_service::ClientBuilder::credentials
1595/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1596/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1597///
1598/// # Pooling and Cloning
1599///
1600/// `DataScanService` holds a connection pool internally, it is advised to
1601/// create one and the reuse it. You do not need to wrap `DataScanService` in
1602/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1603/// already uses an `Arc` internally.
1604#[derive(Clone, Debug)]
1605pub struct DataScanService {
1606 inner: std::sync::Arc<dyn super::stub::dynamic::DataScanService>,
1607}
1608
1609impl DataScanService {
1610 /// Returns a builder for [DataScanService].
1611 ///
1612 /// ```
1613 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1614 /// # use google_cloud_dataplex_v1::client::DataScanService;
1615 /// let client = DataScanService::builder().build().await?;
1616 /// # Ok(()) }
1617 /// ```
1618 pub fn builder() -> super::builder::data_scan_service::ClientBuilder {
1619 crate::new_client_builder(super::builder::data_scan_service::client::Factory)
1620 }
1621
1622 /// Creates a new client from the provided stub.
1623 ///
1624 /// The most common case for calling this function is in tests mocking the
1625 /// client's behavior.
1626 pub fn from_stub<T>(stub: T) -> Self
1627 where
1628 T: super::stub::DataScanService + 'static,
1629 {
1630 Self {
1631 inner: std::sync::Arc::new(stub),
1632 }
1633 }
1634
1635 pub(crate) async fn new(
1636 config: gaxi::options::ClientConfig,
1637 ) -> crate::ClientBuilderResult<Self> {
1638 let inner = Self::build_inner(config).await?;
1639 Ok(Self { inner })
1640 }
1641
1642 async fn build_inner(
1643 conf: gaxi::options::ClientConfig,
1644 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::DataScanService>> {
1645 if gaxi::options::tracing_enabled(&conf) {
1646 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1647 }
1648 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1649 }
1650
1651 async fn build_transport(
1652 conf: gaxi::options::ClientConfig,
1653 ) -> crate::ClientBuilderResult<impl super::stub::DataScanService> {
1654 super::transport::DataScanService::new(conf).await
1655 }
1656
1657 async fn build_with_tracing(
1658 conf: gaxi::options::ClientConfig,
1659 ) -> crate::ClientBuilderResult<impl super::stub::DataScanService> {
1660 Self::build_transport(conf)
1661 .await
1662 .map(super::tracing::DataScanService::new)
1663 }
1664
1665 /// Creates a DataScan resource.
1666 ///
1667 /// # Long running operations
1668 ///
1669 /// This method is used to start, and/or poll a [long-running Operation].
1670 /// The [Working with long-running operations] chapter in the [user guide]
1671 /// covers these operations in detail.
1672 ///
1673 /// [long-running operation]: https://google.aip.dev/151
1674 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1675 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1676 pub fn create_data_scan(&self) -> super::builder::data_scan_service::CreateDataScan {
1677 super::builder::data_scan_service::CreateDataScan::new(self.inner.clone())
1678 }
1679
1680 /// Updates a DataScan resource.
1681 ///
1682 /// # Long running operations
1683 ///
1684 /// This method is used to start, and/or poll a [long-running Operation].
1685 /// The [Working with long-running operations] chapter in the [user guide]
1686 /// covers these operations in detail.
1687 ///
1688 /// [long-running operation]: https://google.aip.dev/151
1689 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1690 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1691 pub fn update_data_scan(&self) -> super::builder::data_scan_service::UpdateDataScan {
1692 super::builder::data_scan_service::UpdateDataScan::new(self.inner.clone())
1693 }
1694
1695 /// Deletes a DataScan resource.
1696 ///
1697 /// # Long running operations
1698 ///
1699 /// This method is used to start, and/or poll a [long-running Operation].
1700 /// The [Working with long-running operations] chapter in the [user guide]
1701 /// covers these operations in detail.
1702 ///
1703 /// [long-running operation]: https://google.aip.dev/151
1704 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1705 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1706 pub fn delete_data_scan(&self) -> super::builder::data_scan_service::DeleteDataScan {
1707 super::builder::data_scan_service::DeleteDataScan::new(self.inner.clone())
1708 }
1709
1710 /// Gets a DataScan resource.
1711 pub fn get_data_scan(&self) -> super::builder::data_scan_service::GetDataScan {
1712 super::builder::data_scan_service::GetDataScan::new(self.inner.clone())
1713 }
1714
1715 /// Lists DataScans.
1716 pub fn list_data_scans(&self) -> super::builder::data_scan_service::ListDataScans {
1717 super::builder::data_scan_service::ListDataScans::new(self.inner.clone())
1718 }
1719
1720 /// Runs an on-demand execution of a DataScan
1721 pub fn run_data_scan(&self) -> super::builder::data_scan_service::RunDataScan {
1722 super::builder::data_scan_service::RunDataScan::new(self.inner.clone())
1723 }
1724
1725 /// Gets a DataScanJob resource.
1726 pub fn get_data_scan_job(&self) -> super::builder::data_scan_service::GetDataScanJob {
1727 super::builder::data_scan_service::GetDataScanJob::new(self.inner.clone())
1728 }
1729
1730 /// Lists DataScanJobs under the given DataScan.
1731 pub fn list_data_scan_jobs(&self) -> super::builder::data_scan_service::ListDataScanJobs {
1732 super::builder::data_scan_service::ListDataScanJobs::new(self.inner.clone())
1733 }
1734
1735 /// Generates recommended data quality rules based on the results of a data
1736 /// profiling scan.
1737 ///
1738 /// Use the recommendations to build rules for a data quality scan.
1739 pub fn generate_data_quality_rules(
1740 &self,
1741 ) -> super::builder::data_scan_service::GenerateDataQualityRules {
1742 super::builder::data_scan_service::GenerateDataQualityRules::new(self.inner.clone())
1743 }
1744
1745 /// Lists information about the supported locations for this service.
1746 pub fn list_locations(&self) -> super::builder::data_scan_service::ListLocations {
1747 super::builder::data_scan_service::ListLocations::new(self.inner.clone())
1748 }
1749
1750 /// Gets information about a location.
1751 pub fn get_location(&self) -> super::builder::data_scan_service::GetLocation {
1752 super::builder::data_scan_service::GetLocation::new(self.inner.clone())
1753 }
1754
1755 /// Sets the access control policy on the specified resource. Replaces
1756 /// any existing policy.
1757 ///
1758 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
1759 /// errors.
1760 pub fn set_iam_policy(&self) -> super::builder::data_scan_service::SetIamPolicy {
1761 super::builder::data_scan_service::SetIamPolicy::new(self.inner.clone())
1762 }
1763
1764 /// Gets the access control policy for a resource. Returns an empty policy
1765 /// if the resource exists and does not have a policy set.
1766 pub fn get_iam_policy(&self) -> super::builder::data_scan_service::GetIamPolicy {
1767 super::builder::data_scan_service::GetIamPolicy::new(self.inner.clone())
1768 }
1769
1770 /// Returns permissions that a caller has on the specified resource. If the
1771 /// resource does not exist, this will return an empty set of
1772 /// permissions, not a `NOT_FOUND` error.
1773 ///
1774 /// Note: This operation is designed to be used for building
1775 /// permission-aware UIs and command-line tools, not for authorization
1776 /// checking. This operation may "fail open" without warning.
1777 pub fn test_iam_permissions(&self) -> super::builder::data_scan_service::TestIamPermissions {
1778 super::builder::data_scan_service::TestIamPermissions::new(self.inner.clone())
1779 }
1780
1781 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1782 ///
1783 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1784 pub fn list_operations(&self) -> super::builder::data_scan_service::ListOperations {
1785 super::builder::data_scan_service::ListOperations::new(self.inner.clone())
1786 }
1787
1788 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1789 ///
1790 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1791 pub fn get_operation(&self) -> super::builder::data_scan_service::GetOperation {
1792 super::builder::data_scan_service::GetOperation::new(self.inner.clone())
1793 }
1794
1795 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1796 ///
1797 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1798 pub fn delete_operation(&self) -> super::builder::data_scan_service::DeleteOperation {
1799 super::builder::data_scan_service::DeleteOperation::new(self.inner.clone())
1800 }
1801
1802 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1803 ///
1804 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1805 pub fn cancel_operation(&self) -> super::builder::data_scan_service::CancelOperation {
1806 super::builder::data_scan_service::CancelOperation::new(self.inner.clone())
1807 }
1808}
1809
1810/// Implements a client for the Cloud Dataplex API.
1811///
1812/// # Example
1813/// ```
1814/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1815/// # use google_cloud_dataplex_v1::client::MetadataService;
1816/// let client = MetadataService::builder().build().await?;
1817/// // use `client` to make requests to the Cloud Dataplex API.
1818/// # Ok(()) }
1819/// ```
1820///
1821/// # Service Description
1822///
1823/// Metadata service manages metadata resources such as tables, filesets and
1824/// partitions.
1825///
1826/// # Configuration
1827///
1828/// To configure `MetadataService` use the `with_*` methods in the type returned
1829/// by [builder()][MetadataService::builder]. The default configuration should
1830/// work for most applications. Common configuration changes include
1831///
1832/// * [with_endpoint()]: by default this client uses the global default endpoint
1833/// (`https://dataplex.googleapis.com`). Applications using regional
1834/// endpoints or running in restricted networks (e.g. a network configured
1835// with [Private Google Access with VPC Service Controls]) may want to
1836/// override this default.
1837/// * [with_credentials()]: by default this client uses
1838/// [Application Default Credentials]. Applications using custom
1839/// authentication may need to override this default.
1840///
1841/// [with_endpoint()]: super::builder::metadata_service::ClientBuilder::with_endpoint
1842/// [with_credentials()]: super::builder::metadata_service::ClientBuilder::credentials
1843/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1844/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1845///
1846/// # Pooling and Cloning
1847///
1848/// `MetadataService` holds a connection pool internally, it is advised to
1849/// create one and the reuse it. You do not need to wrap `MetadataService` in
1850/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1851/// already uses an `Arc` internally.
1852#[derive(Clone, Debug)]
1853pub struct MetadataService {
1854 inner: std::sync::Arc<dyn super::stub::dynamic::MetadataService>,
1855}
1856
1857impl MetadataService {
1858 /// Returns a builder for [MetadataService].
1859 ///
1860 /// ```
1861 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1862 /// # use google_cloud_dataplex_v1::client::MetadataService;
1863 /// let client = MetadataService::builder().build().await?;
1864 /// # Ok(()) }
1865 /// ```
1866 pub fn builder() -> super::builder::metadata_service::ClientBuilder {
1867 crate::new_client_builder(super::builder::metadata_service::client::Factory)
1868 }
1869
1870 /// Creates a new client from the provided stub.
1871 ///
1872 /// The most common case for calling this function is in tests mocking the
1873 /// client's behavior.
1874 pub fn from_stub<T>(stub: T) -> Self
1875 where
1876 T: super::stub::MetadataService + 'static,
1877 {
1878 Self {
1879 inner: std::sync::Arc::new(stub),
1880 }
1881 }
1882
1883 pub(crate) async fn new(
1884 config: gaxi::options::ClientConfig,
1885 ) -> crate::ClientBuilderResult<Self> {
1886 let inner = Self::build_inner(config).await?;
1887 Ok(Self { inner })
1888 }
1889
1890 async fn build_inner(
1891 conf: gaxi::options::ClientConfig,
1892 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::MetadataService>> {
1893 if gaxi::options::tracing_enabled(&conf) {
1894 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1895 }
1896 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1897 }
1898
1899 async fn build_transport(
1900 conf: gaxi::options::ClientConfig,
1901 ) -> crate::ClientBuilderResult<impl super::stub::MetadataService> {
1902 super::transport::MetadataService::new(conf).await
1903 }
1904
1905 async fn build_with_tracing(
1906 conf: gaxi::options::ClientConfig,
1907 ) -> crate::ClientBuilderResult<impl super::stub::MetadataService> {
1908 Self::build_transport(conf)
1909 .await
1910 .map(super::tracing::MetadataService::new)
1911 }
1912
1913 /// Create a metadata entity.
1914 pub fn create_entity(&self) -> super::builder::metadata_service::CreateEntity {
1915 super::builder::metadata_service::CreateEntity::new(self.inner.clone())
1916 }
1917
1918 /// Update a metadata entity. Only supports full resource update.
1919 pub fn update_entity(&self) -> super::builder::metadata_service::UpdateEntity {
1920 super::builder::metadata_service::UpdateEntity::new(self.inner.clone())
1921 }
1922
1923 /// Delete a metadata entity.
1924 pub fn delete_entity(&self) -> super::builder::metadata_service::DeleteEntity {
1925 super::builder::metadata_service::DeleteEntity::new(self.inner.clone())
1926 }
1927
1928 /// Get a metadata entity.
1929 pub fn get_entity(&self) -> super::builder::metadata_service::GetEntity {
1930 super::builder::metadata_service::GetEntity::new(self.inner.clone())
1931 }
1932
1933 /// List metadata entities in a zone.
1934 pub fn list_entities(&self) -> super::builder::metadata_service::ListEntities {
1935 super::builder::metadata_service::ListEntities::new(self.inner.clone())
1936 }
1937
1938 /// Create a metadata partition.
1939 pub fn create_partition(&self) -> super::builder::metadata_service::CreatePartition {
1940 super::builder::metadata_service::CreatePartition::new(self.inner.clone())
1941 }
1942
1943 /// Delete a metadata partition.
1944 pub fn delete_partition(&self) -> super::builder::metadata_service::DeletePartition {
1945 super::builder::metadata_service::DeletePartition::new(self.inner.clone())
1946 }
1947
1948 /// Get a metadata partition of an entity.
1949 pub fn get_partition(&self) -> super::builder::metadata_service::GetPartition {
1950 super::builder::metadata_service::GetPartition::new(self.inner.clone())
1951 }
1952
1953 /// List metadata partitions of an entity.
1954 pub fn list_partitions(&self) -> super::builder::metadata_service::ListPartitions {
1955 super::builder::metadata_service::ListPartitions::new(self.inner.clone())
1956 }
1957
1958 /// Lists information about the supported locations for this service.
1959 pub fn list_locations(&self) -> super::builder::metadata_service::ListLocations {
1960 super::builder::metadata_service::ListLocations::new(self.inner.clone())
1961 }
1962
1963 /// Gets information about a location.
1964 pub fn get_location(&self) -> super::builder::metadata_service::GetLocation {
1965 super::builder::metadata_service::GetLocation::new(self.inner.clone())
1966 }
1967
1968 /// Sets the access control policy on the specified resource. Replaces
1969 /// any existing policy.
1970 ///
1971 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
1972 /// errors.
1973 pub fn set_iam_policy(&self) -> super::builder::metadata_service::SetIamPolicy {
1974 super::builder::metadata_service::SetIamPolicy::new(self.inner.clone())
1975 }
1976
1977 /// Gets the access control policy for a resource. Returns an empty policy
1978 /// if the resource exists and does not have a policy set.
1979 pub fn get_iam_policy(&self) -> super::builder::metadata_service::GetIamPolicy {
1980 super::builder::metadata_service::GetIamPolicy::new(self.inner.clone())
1981 }
1982
1983 /// Returns permissions that a caller has on the specified resource. If the
1984 /// resource does not exist, this will return an empty set of
1985 /// permissions, not a `NOT_FOUND` error.
1986 ///
1987 /// Note: This operation is designed to be used for building
1988 /// permission-aware UIs and command-line tools, not for authorization
1989 /// checking. This operation may "fail open" without warning.
1990 pub fn test_iam_permissions(&self) -> super::builder::metadata_service::TestIamPermissions {
1991 super::builder::metadata_service::TestIamPermissions::new(self.inner.clone())
1992 }
1993
1994 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1995 ///
1996 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1997 pub fn list_operations(&self) -> super::builder::metadata_service::ListOperations {
1998 super::builder::metadata_service::ListOperations::new(self.inner.clone())
1999 }
2000
2001 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2002 ///
2003 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2004 pub fn get_operation(&self) -> super::builder::metadata_service::GetOperation {
2005 super::builder::metadata_service::GetOperation::new(self.inner.clone())
2006 }
2007
2008 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2009 ///
2010 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2011 pub fn delete_operation(&self) -> super::builder::metadata_service::DeleteOperation {
2012 super::builder::metadata_service::DeleteOperation::new(self.inner.clone())
2013 }
2014
2015 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2016 ///
2017 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2018 pub fn cancel_operation(&self) -> super::builder::metadata_service::CancelOperation {
2019 super::builder::metadata_service::CancelOperation::new(self.inner.clone())
2020 }
2021}
2022
2023/// Implements a client for the Cloud Dataplex API.
2024///
2025/// # Example
2026/// ```
2027/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2028/// # use google_cloud_dataplex_v1::client::DataplexService;
2029/// let client = DataplexService::builder().build().await?;
2030/// // use `client` to make requests to the Cloud Dataplex API.
2031/// # Ok(()) }
2032/// ```
2033///
2034/// # Service Description
2035///
2036/// Dataplex service provides data lakes as a service. The primary resources
2037/// offered by this service are Lakes, Zones and Assets which collectively allow
2038/// a data administrator to organize, manage, secure and catalog data across
2039/// their organization located across cloud projects in a variety of storage
2040/// systems including Cloud Storage and BigQuery.
2041///
2042/// # Configuration
2043///
2044/// To configure `DataplexService` use the `with_*` methods in the type returned
2045/// by [builder()][DataplexService::builder]. The default configuration should
2046/// work for most applications. Common configuration changes include
2047///
2048/// * [with_endpoint()]: by default this client uses the global default endpoint
2049/// (`https://dataplex.googleapis.com`). Applications using regional
2050/// endpoints or running in restricted networks (e.g. a network configured
2051// with [Private Google Access with VPC Service Controls]) may want to
2052/// override this default.
2053/// * [with_credentials()]: by default this client uses
2054/// [Application Default Credentials]. Applications using custom
2055/// authentication may need to override this default.
2056///
2057/// [with_endpoint()]: super::builder::dataplex_service::ClientBuilder::with_endpoint
2058/// [with_credentials()]: super::builder::dataplex_service::ClientBuilder::credentials
2059/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
2060/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
2061///
2062/// # Pooling and Cloning
2063///
2064/// `DataplexService` holds a connection pool internally, it is advised to
2065/// create one and the reuse it. You do not need to wrap `DataplexService` in
2066/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
2067/// already uses an `Arc` internally.
2068#[derive(Clone, Debug)]
2069pub struct DataplexService {
2070 inner: std::sync::Arc<dyn super::stub::dynamic::DataplexService>,
2071}
2072
2073impl DataplexService {
2074 /// Returns a builder for [DataplexService].
2075 ///
2076 /// ```
2077 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2078 /// # use google_cloud_dataplex_v1::client::DataplexService;
2079 /// let client = DataplexService::builder().build().await?;
2080 /// # Ok(()) }
2081 /// ```
2082 pub fn builder() -> super::builder::dataplex_service::ClientBuilder {
2083 crate::new_client_builder(super::builder::dataplex_service::client::Factory)
2084 }
2085
2086 /// Creates a new client from the provided stub.
2087 ///
2088 /// The most common case for calling this function is in tests mocking the
2089 /// client's behavior.
2090 pub fn from_stub<T>(stub: T) -> Self
2091 where
2092 T: super::stub::DataplexService + 'static,
2093 {
2094 Self {
2095 inner: std::sync::Arc::new(stub),
2096 }
2097 }
2098
2099 pub(crate) async fn new(
2100 config: gaxi::options::ClientConfig,
2101 ) -> crate::ClientBuilderResult<Self> {
2102 let inner = Self::build_inner(config).await?;
2103 Ok(Self { inner })
2104 }
2105
2106 async fn build_inner(
2107 conf: gaxi::options::ClientConfig,
2108 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::DataplexService>> {
2109 if gaxi::options::tracing_enabled(&conf) {
2110 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
2111 }
2112 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
2113 }
2114
2115 async fn build_transport(
2116 conf: gaxi::options::ClientConfig,
2117 ) -> crate::ClientBuilderResult<impl super::stub::DataplexService> {
2118 super::transport::DataplexService::new(conf).await
2119 }
2120
2121 async fn build_with_tracing(
2122 conf: gaxi::options::ClientConfig,
2123 ) -> crate::ClientBuilderResult<impl super::stub::DataplexService> {
2124 Self::build_transport(conf)
2125 .await
2126 .map(super::tracing::DataplexService::new)
2127 }
2128
2129 /// Creates a lake resource.
2130 ///
2131 /// # Long running operations
2132 ///
2133 /// This method is used to start, and/or poll a [long-running Operation].
2134 /// The [Working with long-running operations] chapter in the [user guide]
2135 /// covers these operations in detail.
2136 ///
2137 /// [long-running operation]: https://google.aip.dev/151
2138 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2139 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2140 pub fn create_lake(&self) -> super::builder::dataplex_service::CreateLake {
2141 super::builder::dataplex_service::CreateLake::new(self.inner.clone())
2142 }
2143
2144 /// Updates a lake resource.
2145 ///
2146 /// # Long running operations
2147 ///
2148 /// This method is used to start, and/or poll a [long-running Operation].
2149 /// The [Working with long-running operations] chapter in the [user guide]
2150 /// covers these operations in detail.
2151 ///
2152 /// [long-running operation]: https://google.aip.dev/151
2153 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2154 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2155 pub fn update_lake(&self) -> super::builder::dataplex_service::UpdateLake {
2156 super::builder::dataplex_service::UpdateLake::new(self.inner.clone())
2157 }
2158
2159 /// Deletes a lake resource. All zones within the lake must be deleted before
2160 /// the lake can be deleted.
2161 ///
2162 /// # Long running operations
2163 ///
2164 /// This method is used to start, and/or poll a [long-running Operation].
2165 /// The [Working with long-running operations] chapter in the [user guide]
2166 /// covers these operations in detail.
2167 ///
2168 /// [long-running operation]: https://google.aip.dev/151
2169 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2170 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2171 pub fn delete_lake(&self) -> super::builder::dataplex_service::DeleteLake {
2172 super::builder::dataplex_service::DeleteLake::new(self.inner.clone())
2173 }
2174
2175 /// Lists lake resources in a project and location.
2176 pub fn list_lakes(&self) -> super::builder::dataplex_service::ListLakes {
2177 super::builder::dataplex_service::ListLakes::new(self.inner.clone())
2178 }
2179
2180 /// Retrieves a lake resource.
2181 pub fn get_lake(&self) -> super::builder::dataplex_service::GetLake {
2182 super::builder::dataplex_service::GetLake::new(self.inner.clone())
2183 }
2184
2185 /// Lists action resources in a lake.
2186 pub fn list_lake_actions(&self) -> super::builder::dataplex_service::ListLakeActions {
2187 super::builder::dataplex_service::ListLakeActions::new(self.inner.clone())
2188 }
2189
2190 /// Creates a zone resource within a lake.
2191 ///
2192 /// # Long running operations
2193 ///
2194 /// This method is used to start, and/or poll a [long-running Operation].
2195 /// The [Working with long-running operations] chapter in the [user guide]
2196 /// covers these operations in detail.
2197 ///
2198 /// [long-running operation]: https://google.aip.dev/151
2199 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2200 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2201 pub fn create_zone(&self) -> super::builder::dataplex_service::CreateZone {
2202 super::builder::dataplex_service::CreateZone::new(self.inner.clone())
2203 }
2204
2205 /// Updates a zone resource.
2206 ///
2207 /// # Long running operations
2208 ///
2209 /// This method is used to start, and/or poll a [long-running Operation].
2210 /// The [Working with long-running operations] chapter in the [user guide]
2211 /// covers these operations in detail.
2212 ///
2213 /// [long-running operation]: https://google.aip.dev/151
2214 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2215 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2216 pub fn update_zone(&self) -> super::builder::dataplex_service::UpdateZone {
2217 super::builder::dataplex_service::UpdateZone::new(self.inner.clone())
2218 }
2219
2220 /// Deletes a zone resource. All assets within a zone must be deleted before
2221 /// the zone can be deleted.
2222 ///
2223 /// # Long running operations
2224 ///
2225 /// This method is used to start, and/or poll a [long-running Operation].
2226 /// The [Working with long-running operations] chapter in the [user guide]
2227 /// covers these operations in detail.
2228 ///
2229 /// [long-running operation]: https://google.aip.dev/151
2230 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2231 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2232 pub fn delete_zone(&self) -> super::builder::dataplex_service::DeleteZone {
2233 super::builder::dataplex_service::DeleteZone::new(self.inner.clone())
2234 }
2235
2236 /// Lists zone resources in a lake.
2237 pub fn list_zones(&self) -> super::builder::dataplex_service::ListZones {
2238 super::builder::dataplex_service::ListZones::new(self.inner.clone())
2239 }
2240
2241 /// Retrieves a zone resource.
2242 pub fn get_zone(&self) -> super::builder::dataplex_service::GetZone {
2243 super::builder::dataplex_service::GetZone::new(self.inner.clone())
2244 }
2245
2246 /// Lists action resources in a zone.
2247 pub fn list_zone_actions(&self) -> super::builder::dataplex_service::ListZoneActions {
2248 super::builder::dataplex_service::ListZoneActions::new(self.inner.clone())
2249 }
2250
2251 /// Creates an asset resource.
2252 ///
2253 /// # Long running operations
2254 ///
2255 /// This method is used to start, and/or poll a [long-running Operation].
2256 /// The [Working with long-running operations] chapter in the [user guide]
2257 /// covers these operations in detail.
2258 ///
2259 /// [long-running operation]: https://google.aip.dev/151
2260 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2261 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2262 pub fn create_asset(&self) -> super::builder::dataplex_service::CreateAsset {
2263 super::builder::dataplex_service::CreateAsset::new(self.inner.clone())
2264 }
2265
2266 /// Updates an asset resource.
2267 ///
2268 /// # Long running operations
2269 ///
2270 /// This method is used to start, and/or poll a [long-running Operation].
2271 /// The [Working with long-running operations] chapter in the [user guide]
2272 /// covers these operations in detail.
2273 ///
2274 /// [long-running operation]: https://google.aip.dev/151
2275 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2276 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2277 pub fn update_asset(&self) -> super::builder::dataplex_service::UpdateAsset {
2278 super::builder::dataplex_service::UpdateAsset::new(self.inner.clone())
2279 }
2280
2281 /// Deletes an asset resource. The referenced storage resource is detached
2282 /// (default) or deleted based on the associated Lifecycle policy.
2283 ///
2284 /// # Long running operations
2285 ///
2286 /// This method is used to start, and/or poll a [long-running Operation].
2287 /// The [Working with long-running operations] chapter in the [user guide]
2288 /// covers these operations in detail.
2289 ///
2290 /// [long-running operation]: https://google.aip.dev/151
2291 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2292 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2293 pub fn delete_asset(&self) -> super::builder::dataplex_service::DeleteAsset {
2294 super::builder::dataplex_service::DeleteAsset::new(self.inner.clone())
2295 }
2296
2297 /// Lists asset resources in a zone.
2298 pub fn list_assets(&self) -> super::builder::dataplex_service::ListAssets {
2299 super::builder::dataplex_service::ListAssets::new(self.inner.clone())
2300 }
2301
2302 /// Retrieves an asset resource.
2303 pub fn get_asset(&self) -> super::builder::dataplex_service::GetAsset {
2304 super::builder::dataplex_service::GetAsset::new(self.inner.clone())
2305 }
2306
2307 /// Lists action resources in an asset.
2308 pub fn list_asset_actions(&self) -> super::builder::dataplex_service::ListAssetActions {
2309 super::builder::dataplex_service::ListAssetActions::new(self.inner.clone())
2310 }
2311
2312 /// Creates a task resource within a lake.
2313 ///
2314 /// # Long running operations
2315 ///
2316 /// This method is used to start, and/or poll a [long-running Operation].
2317 /// The [Working with long-running operations] chapter in the [user guide]
2318 /// covers these operations in detail.
2319 ///
2320 /// [long-running operation]: https://google.aip.dev/151
2321 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2322 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2323 pub fn create_task(&self) -> super::builder::dataplex_service::CreateTask {
2324 super::builder::dataplex_service::CreateTask::new(self.inner.clone())
2325 }
2326
2327 /// Update the task resource.
2328 ///
2329 /// # Long running operations
2330 ///
2331 /// This method is used to start, and/or poll a [long-running Operation].
2332 /// The [Working with long-running operations] chapter in the [user guide]
2333 /// covers these operations in detail.
2334 ///
2335 /// [long-running operation]: https://google.aip.dev/151
2336 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2337 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2338 pub fn update_task(&self) -> super::builder::dataplex_service::UpdateTask {
2339 super::builder::dataplex_service::UpdateTask::new(self.inner.clone())
2340 }
2341
2342 /// Delete the task resource.
2343 ///
2344 /// # Long running operations
2345 ///
2346 /// This method is used to start, and/or poll a [long-running Operation].
2347 /// The [Working with long-running operations] chapter in the [user guide]
2348 /// covers these operations in detail.
2349 ///
2350 /// [long-running operation]: https://google.aip.dev/151
2351 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2352 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2353 pub fn delete_task(&self) -> super::builder::dataplex_service::DeleteTask {
2354 super::builder::dataplex_service::DeleteTask::new(self.inner.clone())
2355 }
2356
2357 /// Lists tasks under the given lake.
2358 pub fn list_tasks(&self) -> super::builder::dataplex_service::ListTasks {
2359 super::builder::dataplex_service::ListTasks::new(self.inner.clone())
2360 }
2361
2362 /// Get task resource.
2363 pub fn get_task(&self) -> super::builder::dataplex_service::GetTask {
2364 super::builder::dataplex_service::GetTask::new(self.inner.clone())
2365 }
2366
2367 /// Lists Jobs under the given task.
2368 pub fn list_jobs(&self) -> super::builder::dataplex_service::ListJobs {
2369 super::builder::dataplex_service::ListJobs::new(self.inner.clone())
2370 }
2371
2372 /// Run an on demand execution of a Task.
2373 pub fn run_task(&self) -> super::builder::dataplex_service::RunTask {
2374 super::builder::dataplex_service::RunTask::new(self.inner.clone())
2375 }
2376
2377 /// Get job resource.
2378 pub fn get_job(&self) -> super::builder::dataplex_service::GetJob {
2379 super::builder::dataplex_service::GetJob::new(self.inner.clone())
2380 }
2381
2382 /// Cancel jobs running for the task resource.
2383 pub fn cancel_job(&self) -> super::builder::dataplex_service::CancelJob {
2384 super::builder::dataplex_service::CancelJob::new(self.inner.clone())
2385 }
2386
2387 /// Create an environment resource.
2388 ///
2389 /// # Long running operations
2390 ///
2391 /// This method is used to start, and/or poll a [long-running Operation].
2392 /// The [Working with long-running operations] chapter in the [user guide]
2393 /// covers these operations in detail.
2394 ///
2395 /// [long-running operation]: https://google.aip.dev/151
2396 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2397 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2398 pub fn create_environment(&self) -> super::builder::dataplex_service::CreateEnvironment {
2399 super::builder::dataplex_service::CreateEnvironment::new(self.inner.clone())
2400 }
2401
2402 /// Update the environment resource.
2403 ///
2404 /// # Long running operations
2405 ///
2406 /// This method is used to start, and/or poll a [long-running Operation].
2407 /// The [Working with long-running operations] chapter in the [user guide]
2408 /// covers these operations in detail.
2409 ///
2410 /// [long-running operation]: https://google.aip.dev/151
2411 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2412 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2413 pub fn update_environment(&self) -> super::builder::dataplex_service::UpdateEnvironment {
2414 super::builder::dataplex_service::UpdateEnvironment::new(self.inner.clone())
2415 }
2416
2417 /// Delete the environment resource. All the child resources must have been
2418 /// deleted before environment deletion can be initiated.
2419 ///
2420 /// # Long running operations
2421 ///
2422 /// This method is used to start, and/or poll a [long-running Operation].
2423 /// The [Working with long-running operations] chapter in the [user guide]
2424 /// covers these operations in detail.
2425 ///
2426 /// [long-running operation]: https://google.aip.dev/151
2427 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2428 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2429 pub fn delete_environment(&self) -> super::builder::dataplex_service::DeleteEnvironment {
2430 super::builder::dataplex_service::DeleteEnvironment::new(self.inner.clone())
2431 }
2432
2433 /// Lists environments under the given lake.
2434 pub fn list_environments(&self) -> super::builder::dataplex_service::ListEnvironments {
2435 super::builder::dataplex_service::ListEnvironments::new(self.inner.clone())
2436 }
2437
2438 /// Get environment resource.
2439 pub fn get_environment(&self) -> super::builder::dataplex_service::GetEnvironment {
2440 super::builder::dataplex_service::GetEnvironment::new(self.inner.clone())
2441 }
2442
2443 /// Lists session resources in an environment.
2444 pub fn list_sessions(&self) -> super::builder::dataplex_service::ListSessions {
2445 super::builder::dataplex_service::ListSessions::new(self.inner.clone())
2446 }
2447
2448 /// Lists information about the supported locations for this service.
2449 pub fn list_locations(&self) -> super::builder::dataplex_service::ListLocations {
2450 super::builder::dataplex_service::ListLocations::new(self.inner.clone())
2451 }
2452
2453 /// Gets information about a location.
2454 pub fn get_location(&self) -> super::builder::dataplex_service::GetLocation {
2455 super::builder::dataplex_service::GetLocation::new(self.inner.clone())
2456 }
2457
2458 /// Sets the access control policy on the specified resource. Replaces
2459 /// any existing policy.
2460 ///
2461 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
2462 /// errors.
2463 pub fn set_iam_policy(&self) -> super::builder::dataplex_service::SetIamPolicy {
2464 super::builder::dataplex_service::SetIamPolicy::new(self.inner.clone())
2465 }
2466
2467 /// Gets the access control policy for a resource. Returns an empty policy
2468 /// if the resource exists and does not have a policy set.
2469 pub fn get_iam_policy(&self) -> super::builder::dataplex_service::GetIamPolicy {
2470 super::builder::dataplex_service::GetIamPolicy::new(self.inner.clone())
2471 }
2472
2473 /// Returns permissions that a caller has on the specified resource. If the
2474 /// resource does not exist, this will return an empty set of
2475 /// permissions, not a `NOT_FOUND` error.
2476 ///
2477 /// Note: This operation is designed to be used for building
2478 /// permission-aware UIs and command-line tools, not for authorization
2479 /// checking. This operation may "fail open" without warning.
2480 pub fn test_iam_permissions(&self) -> super::builder::dataplex_service::TestIamPermissions {
2481 super::builder::dataplex_service::TestIamPermissions::new(self.inner.clone())
2482 }
2483
2484 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2485 ///
2486 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2487 pub fn list_operations(&self) -> super::builder::dataplex_service::ListOperations {
2488 super::builder::dataplex_service::ListOperations::new(self.inner.clone())
2489 }
2490
2491 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2492 ///
2493 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2494 pub fn get_operation(&self) -> super::builder::dataplex_service::GetOperation {
2495 super::builder::dataplex_service::GetOperation::new(self.inner.clone())
2496 }
2497
2498 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2499 ///
2500 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2501 pub fn delete_operation(&self) -> super::builder::dataplex_service::DeleteOperation {
2502 super::builder::dataplex_service::DeleteOperation::new(self.inner.clone())
2503 }
2504
2505 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2506 ///
2507 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2508 pub fn cancel_operation(&self) -> super::builder::dataplex_service::CancelOperation {
2509 super::builder::dataplex_service::CancelOperation::new(self.inner.clone())
2510 }
2511}