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