google_cloud_dataform_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 Dataform API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_dataform_v1::client::Dataform;
24/// use google_cloud_gax::paginator::ItemPaginator as _;
25/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
26/// let client = Dataform::builder().build().await?;
27/// let parent = "parent_value";
28/// let mut list = client.list_repositories()
29/// .set_parent(parent)
30/// .by_item();
31/// while let Some(item) = list.next().await.transpose()? {
32/// println!("{:?}", item);
33/// }
34/// # Ok(()) }
35/// ```
36///
37/// # Service Description
38///
39/// Dataform is a service to develop, create, document, test, and update curated
40/// tables in BigQuery.
41///
42/// # Configuration
43///
44/// To configure `Dataform` use the `with_*` methods in the type returned
45/// by [builder()][Dataform::builder]. The default configuration should
46/// work for most applications. Common configuration changes include
47///
48/// * [with_endpoint()]: by default this client uses the global default endpoint
49/// (`https://dataform.googleapis.com`). Applications using regional
50/// endpoints or running in restricted networks (e.g. a network configured
51// with [Private Google Access with VPC Service Controls]) may want to
52/// override this default.
53/// * [with_credentials()]: by default this client uses
54/// [Application Default Credentials]. Applications using custom
55/// authentication may need to override this default.
56///
57/// [with_endpoint()]: super::builder::dataform::ClientBuilder::with_endpoint
58/// [with_credentials()]: super::builder::dataform::ClientBuilder::with_credentials
59/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
60/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
61///
62/// # Pooling and Cloning
63///
64/// `Dataform` holds a connection pool internally, it is advised to
65/// create one and reuse it. You do not need to wrap `Dataform` in
66/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
67/// already uses an `Arc` internally.
68#[derive(Clone, Debug)]
69pub struct Dataform {
70 inner: std::sync::Arc<dyn super::stub::dynamic::Dataform>,
71}
72
73impl Dataform {
74 /// Returns a builder for [Dataform].
75 ///
76 /// ```
77 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
78 /// # use google_cloud_dataform_v1::client::Dataform;
79 /// let client = Dataform::builder().build().await?;
80 /// # Ok(()) }
81 /// ```
82 pub fn builder() -> super::builder::dataform::ClientBuilder {
83 crate::new_client_builder(super::builder::dataform::client::Factory)
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::Dataform + '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 ) -> crate::ClientBuilderResult<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 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Dataform>> {
109 if gaxi::options::tracing_enabled(&conf) {
110 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
111 }
112 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
113 }
114
115 async fn build_transport(
116 conf: gaxi::options::ClientConfig,
117 ) -> crate::ClientBuilderResult<impl super::stub::Dataform> {
118 super::transport::Dataform::new(conf).await
119 }
120
121 async fn build_with_tracing(
122 conf: gaxi::options::ClientConfig,
123 ) -> crate::ClientBuilderResult<impl super::stub::Dataform> {
124 Self::build_transport(conf)
125 .await
126 .map(super::tracing::Dataform::new)
127 }
128
129 /// Fetches a single TeamFolder.
130 ///
131 /// # Example
132 /// ```
133 /// # use google_cloud_dataform_v1::client::Dataform;
134 /// use google_cloud_dataform_v1::Result;
135 /// async fn sample(
136 /// client: &Dataform, name: &str
137 /// ) -> Result<()> {
138 /// let response = client.get_team_folder()
139 /// .set_name(name)
140 /// .send().await?;
141 /// println!("response {:?}", response);
142 /// Ok(())
143 /// }
144 /// ```
145 pub fn get_team_folder(&self) -> super::builder::dataform::GetTeamFolder {
146 super::builder::dataform::GetTeamFolder::new(self.inner.clone())
147 }
148
149 /// Creates a new TeamFolder in a given project and location.
150 ///
151 /// # Example
152 /// ```
153 /// # use google_cloud_dataform_v1::client::Dataform;
154 /// use google_cloud_dataform_v1::model::TeamFolder;
155 /// use google_cloud_dataform_v1::Result;
156 /// async fn sample(
157 /// client: &Dataform, parent: &str
158 /// ) -> Result<()> {
159 /// let response = client.create_team_folder()
160 /// .set_parent(parent)
161 /// .set_team_folder(
162 /// TeamFolder::new()/* set fields */
163 /// )
164 /// .send().await?;
165 /// println!("response {:?}", response);
166 /// Ok(())
167 /// }
168 /// ```
169 pub fn create_team_folder(&self) -> super::builder::dataform::CreateTeamFolder {
170 super::builder::dataform::CreateTeamFolder::new(self.inner.clone())
171 }
172
173 /// Updates a single TeamFolder.
174 ///
175 /// # Example
176 /// ```
177 /// # use google_cloud_dataform_v1::client::Dataform;
178 /// # extern crate wkt as google_cloud_wkt;
179 /// use google_cloud_wkt::FieldMask;
180 /// use google_cloud_dataform_v1::model::TeamFolder;
181 /// use google_cloud_dataform_v1::Result;
182 /// async fn sample(
183 /// client: &Dataform, name: &str
184 /// ) -> Result<()> {
185 /// let response = client.update_team_folder()
186 /// .set_team_folder(
187 /// TeamFolder::new().set_name(name)/* set fields */
188 /// )
189 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
190 /// .send().await?;
191 /// println!("response {:?}", response);
192 /// Ok(())
193 /// }
194 /// ```
195 pub fn update_team_folder(&self) -> super::builder::dataform::UpdateTeamFolder {
196 super::builder::dataform::UpdateTeamFolder::new(self.inner.clone())
197 }
198
199 /// Deletes a single TeamFolder.
200 ///
201 /// # Example
202 /// ```
203 /// # use google_cloud_dataform_v1::client::Dataform;
204 /// use google_cloud_dataform_v1::Result;
205 /// async fn sample(
206 /// client: &Dataform, name: &str
207 /// ) -> Result<()> {
208 /// client.delete_team_folder()
209 /// .set_name(name)
210 /// .send().await?;
211 /// Ok(())
212 /// }
213 /// ```
214 pub fn delete_team_folder(&self) -> super::builder::dataform::DeleteTeamFolder {
215 super::builder::dataform::DeleteTeamFolder::new(self.inner.clone())
216 }
217
218 /// Deletes a TeamFolder with its contents (Folders, Repositories, Workspaces,
219 /// ReleaseConfigs, and WorkflowConfigs).
220 ///
221 /// # Long running operations
222 ///
223 /// This method is used to start, and/or poll a [long-running Operation].
224 /// The [Working with long-running operations] chapter in the [user guide]
225 /// covers these operations in detail.
226 ///
227 /// [long-running operation]: https://google.aip.dev/151
228 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
229 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
230 ///
231 /// # Example
232 /// ```
233 /// # use google_cloud_dataform_v1::client::Dataform;
234 /// use google_cloud_lro::Poller;
235 /// use google_cloud_dataform_v1::Result;
236 /// async fn sample(
237 /// client: &Dataform
238 /// ) -> Result<()> {
239 /// client.delete_team_folder_tree()
240 /// /* set fields */
241 /// .poller().until_done().await?;
242 /// Ok(())
243 /// }
244 /// ```
245 pub fn delete_team_folder_tree(&self) -> super::builder::dataform::DeleteTeamFolderTree {
246 super::builder::dataform::DeleteTeamFolderTree::new(self.inner.clone())
247 }
248
249 /// Returns the contents of a given TeamFolder.
250 ///
251 /// # Example
252 /// ```
253 /// # use google_cloud_dataform_v1::client::Dataform;
254 /// use google_cloud_gax::paginator::ItemPaginator as _;
255 /// use google_cloud_dataform_v1::Result;
256 /// async fn sample(
257 /// client: &Dataform
258 /// ) -> Result<()> {
259 /// let mut list = client.query_team_folder_contents()
260 /// /* set fields */
261 /// .by_item();
262 /// while let Some(item) = list.next().await.transpose()? {
263 /// println!("{:?}", item);
264 /// }
265 /// Ok(())
266 /// }
267 /// ```
268 pub fn query_team_folder_contents(&self) -> super::builder::dataform::QueryTeamFolderContents {
269 super::builder::dataform::QueryTeamFolderContents::new(self.inner.clone())
270 }
271
272 /// Returns all TeamFolders in a given location that the caller has access to
273 /// and match the provided filter.
274 ///
275 /// # Example
276 /// ```
277 /// # use google_cloud_dataform_v1::client::Dataform;
278 /// use google_cloud_gax::paginator::ItemPaginator as _;
279 /// use google_cloud_dataform_v1::Result;
280 /// async fn sample(
281 /// client: &Dataform
282 /// ) -> Result<()> {
283 /// let mut list = client.search_team_folders()
284 /// /* set fields */
285 /// .by_item();
286 /// while let Some(item) = list.next().await.transpose()? {
287 /// println!("{:?}", item);
288 /// }
289 /// Ok(())
290 /// }
291 /// ```
292 pub fn search_team_folders(&self) -> super::builder::dataform::SearchTeamFolders {
293 super::builder::dataform::SearchTeamFolders::new(self.inner.clone())
294 }
295
296 /// Fetches a single Folder.
297 ///
298 /// # Example
299 /// ```
300 /// # use google_cloud_dataform_v1::client::Dataform;
301 /// use google_cloud_dataform_v1::Result;
302 /// async fn sample(
303 /// client: &Dataform, name: &str
304 /// ) -> Result<()> {
305 /// let response = client.get_folder()
306 /// .set_name(name)
307 /// .send().await?;
308 /// println!("response {:?}", response);
309 /// Ok(())
310 /// }
311 /// ```
312 pub fn get_folder(&self) -> super::builder::dataform::GetFolder {
313 super::builder::dataform::GetFolder::new(self.inner.clone())
314 }
315
316 /// Creates a new Folder in a given project and location.
317 ///
318 /// # Example
319 /// ```
320 /// # use google_cloud_dataform_v1::client::Dataform;
321 /// use google_cloud_dataform_v1::model::Folder;
322 /// use google_cloud_dataform_v1::Result;
323 /// async fn sample(
324 /// client: &Dataform, parent: &str
325 /// ) -> Result<()> {
326 /// let response = client.create_folder()
327 /// .set_parent(parent)
328 /// .set_folder(
329 /// Folder::new()/* set fields */
330 /// )
331 /// .send().await?;
332 /// println!("response {:?}", response);
333 /// Ok(())
334 /// }
335 /// ```
336 pub fn create_folder(&self) -> super::builder::dataform::CreateFolder {
337 super::builder::dataform::CreateFolder::new(self.inner.clone())
338 }
339
340 /// Updates a single Folder.
341 ///
342 /// # Example
343 /// ```
344 /// # use google_cloud_dataform_v1::client::Dataform;
345 /// # extern crate wkt as google_cloud_wkt;
346 /// use google_cloud_wkt::FieldMask;
347 /// use google_cloud_dataform_v1::model::Folder;
348 /// use google_cloud_dataform_v1::Result;
349 /// async fn sample(
350 /// client: &Dataform, name: &str
351 /// ) -> Result<()> {
352 /// let response = client.update_folder()
353 /// .set_folder(
354 /// Folder::new().set_name(name)/* set fields */
355 /// )
356 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
357 /// .send().await?;
358 /// println!("response {:?}", response);
359 /// Ok(())
360 /// }
361 /// ```
362 pub fn update_folder(&self) -> super::builder::dataform::UpdateFolder {
363 super::builder::dataform::UpdateFolder::new(self.inner.clone())
364 }
365
366 /// Deletes a single Folder.
367 ///
368 /// # Example
369 /// ```
370 /// # use google_cloud_dataform_v1::client::Dataform;
371 /// use google_cloud_dataform_v1::Result;
372 /// async fn sample(
373 /// client: &Dataform, name: &str
374 /// ) -> Result<()> {
375 /// client.delete_folder()
376 /// .set_name(name)
377 /// .send().await?;
378 /// Ok(())
379 /// }
380 /// ```
381 pub fn delete_folder(&self) -> super::builder::dataform::DeleteFolder {
382 super::builder::dataform::DeleteFolder::new(self.inner.clone())
383 }
384
385 /// Deletes a Folder with its contents (Folders, Repositories, Workspaces,
386 /// ReleaseConfigs, and WorkflowConfigs).
387 ///
388 /// # Long running operations
389 ///
390 /// This method is used to start, and/or poll a [long-running Operation].
391 /// The [Working with long-running operations] chapter in the [user guide]
392 /// covers these operations in detail.
393 ///
394 /// [long-running operation]: https://google.aip.dev/151
395 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
396 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
397 ///
398 /// # Example
399 /// ```
400 /// # use google_cloud_dataform_v1::client::Dataform;
401 /// use google_cloud_lro::Poller;
402 /// use google_cloud_dataform_v1::Result;
403 /// async fn sample(
404 /// client: &Dataform
405 /// ) -> Result<()> {
406 /// client.delete_folder_tree()
407 /// /* set fields */
408 /// .poller().until_done().await?;
409 /// Ok(())
410 /// }
411 /// ```
412 pub fn delete_folder_tree(&self) -> super::builder::dataform::DeleteFolderTree {
413 super::builder::dataform::DeleteFolderTree::new(self.inner.clone())
414 }
415
416 /// Returns the contents of a given Folder.
417 ///
418 /// # Example
419 /// ```
420 /// # use google_cloud_dataform_v1::client::Dataform;
421 /// use google_cloud_gax::paginator::ItemPaginator as _;
422 /// use google_cloud_dataform_v1::Result;
423 /// async fn sample(
424 /// client: &Dataform
425 /// ) -> Result<()> {
426 /// let mut list = client.query_folder_contents()
427 /// /* set fields */
428 /// .by_item();
429 /// while let Some(item) = list.next().await.transpose()? {
430 /// println!("{:?}", item);
431 /// }
432 /// Ok(())
433 /// }
434 /// ```
435 pub fn query_folder_contents(&self) -> super::builder::dataform::QueryFolderContents {
436 super::builder::dataform::QueryFolderContents::new(self.inner.clone())
437 }
438
439 /// Returns the contents of a caller's root folder in a given location.
440 /// The root folder contains all resources that are created by the user and not
441 /// contained in any other folder.
442 ///
443 /// # Example
444 /// ```
445 /// # use google_cloud_dataform_v1::client::Dataform;
446 /// use google_cloud_gax::paginator::ItemPaginator as _;
447 /// use google_cloud_dataform_v1::Result;
448 /// async fn sample(
449 /// client: &Dataform
450 /// ) -> Result<()> {
451 /// let mut list = client.query_user_root_contents()
452 /// /* set fields */
453 /// .by_item();
454 /// while let Some(item) = list.next().await.transpose()? {
455 /// println!("{:?}", item);
456 /// }
457 /// Ok(())
458 /// }
459 /// ```
460 pub fn query_user_root_contents(&self) -> super::builder::dataform::QueryUserRootContents {
461 super::builder::dataform::QueryUserRootContents::new(self.inner.clone())
462 }
463
464 /// Moves a Folder to a new Folder, TeamFolder, or the root location.
465 ///
466 /// # Long running operations
467 ///
468 /// This method is used to start, and/or poll a [long-running Operation].
469 /// The [Working with long-running operations] chapter in the [user guide]
470 /// covers these operations in detail.
471 ///
472 /// [long-running operation]: https://google.aip.dev/151
473 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
474 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
475 ///
476 /// # Example
477 /// ```
478 /// # use google_cloud_dataform_v1::client::Dataform;
479 /// use google_cloud_lro::Poller;
480 /// use google_cloud_dataform_v1::Result;
481 /// async fn sample(
482 /// client: &Dataform
483 /// ) -> Result<()> {
484 /// client.move_folder()
485 /// /* set fields */
486 /// .poller().until_done().await?;
487 /// Ok(())
488 /// }
489 /// ```
490 pub fn move_folder(&self) -> super::builder::dataform::MoveFolder {
491 super::builder::dataform::MoveFolder::new(self.inner.clone())
492 }
493
494 /// Lists Repositories in a given project and location.
495 ///
496 /// **Note:** *This method can return repositories not shown in the [Dataform
497 /// UI](https://console.cloud.google.com/bigquery/dataform)*.
498 ///
499 /// # Example
500 /// ```
501 /// # use google_cloud_dataform_v1::client::Dataform;
502 /// use google_cloud_gax::paginator::ItemPaginator as _;
503 /// use google_cloud_dataform_v1::Result;
504 /// async fn sample(
505 /// client: &Dataform, parent: &str
506 /// ) -> Result<()> {
507 /// let mut list = client.list_repositories()
508 /// .set_parent(parent)
509 /// .by_item();
510 /// while let Some(item) = list.next().await.transpose()? {
511 /// println!("{:?}", item);
512 /// }
513 /// Ok(())
514 /// }
515 /// ```
516 pub fn list_repositories(&self) -> super::builder::dataform::ListRepositories {
517 super::builder::dataform::ListRepositories::new(self.inner.clone())
518 }
519
520 /// Fetches a single Repository.
521 ///
522 /// # Example
523 /// ```
524 /// # use google_cloud_dataform_v1::client::Dataform;
525 /// use google_cloud_dataform_v1::Result;
526 /// async fn sample(
527 /// client: &Dataform, name: &str
528 /// ) -> Result<()> {
529 /// let response = client.get_repository()
530 /// .set_name(name)
531 /// .send().await?;
532 /// println!("response {:?}", response);
533 /// Ok(())
534 /// }
535 /// ```
536 pub fn get_repository(&self) -> super::builder::dataform::GetRepository {
537 super::builder::dataform::GetRepository::new(self.inner.clone())
538 }
539
540 /// Creates a new Repository in a given project and location.
541 ///
542 /// # Example
543 /// ```
544 /// # use google_cloud_dataform_v1::client::Dataform;
545 /// use google_cloud_dataform_v1::model::Repository;
546 /// use google_cloud_dataform_v1::Result;
547 /// async fn sample(
548 /// client: &Dataform, parent: &str
549 /// ) -> Result<()> {
550 /// let response = client.create_repository()
551 /// .set_parent(parent)
552 /// .set_repository_id("repository_id_value")
553 /// .set_repository(
554 /// Repository::new()/* set fields */
555 /// )
556 /// .send().await?;
557 /// println!("response {:?}", response);
558 /// Ok(())
559 /// }
560 /// ```
561 pub fn create_repository(&self) -> super::builder::dataform::CreateRepository {
562 super::builder::dataform::CreateRepository::new(self.inner.clone())
563 }
564
565 /// Updates a single Repository.
566 ///
567 /// **Note:** *This method does not fully implement
568 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
569 /// as a bad request, and when the `field_mask` is omitted, the request is
570 /// treated as a full update on all modifiable fields.*
571 ///
572 /// # Example
573 /// ```
574 /// # use google_cloud_dataform_v1::client::Dataform;
575 /// # extern crate wkt as google_cloud_wkt;
576 /// use google_cloud_wkt::FieldMask;
577 /// use google_cloud_dataform_v1::model::Repository;
578 /// use google_cloud_dataform_v1::Result;
579 /// async fn sample(
580 /// client: &Dataform, name: &str
581 /// ) -> Result<()> {
582 /// let response = client.update_repository()
583 /// .set_repository(
584 /// Repository::new().set_name(name)/* set fields */
585 /// )
586 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
587 /// .send().await?;
588 /// println!("response {:?}", response);
589 /// Ok(())
590 /// }
591 /// ```
592 pub fn update_repository(&self) -> super::builder::dataform::UpdateRepository {
593 super::builder::dataform::UpdateRepository::new(self.inner.clone())
594 }
595
596 /// Deletes a single Repository.
597 ///
598 /// # Example
599 /// ```
600 /// # use google_cloud_dataform_v1::client::Dataform;
601 /// use google_cloud_dataform_v1::Result;
602 /// async fn sample(
603 /// client: &Dataform, name: &str
604 /// ) -> Result<()> {
605 /// client.delete_repository()
606 /// .set_name(name)
607 /// .send().await?;
608 /// Ok(())
609 /// }
610 /// ```
611 pub fn delete_repository(&self) -> super::builder::dataform::DeleteRepository {
612 super::builder::dataform::DeleteRepository::new(self.inner.clone())
613 }
614
615 /// Moves a Repository to a new location.
616 ///
617 /// # Long running operations
618 ///
619 /// This method is used to start, and/or poll a [long-running Operation].
620 /// The [Working with long-running operations] chapter in the [user guide]
621 /// covers these operations in detail.
622 ///
623 /// [long-running operation]: https://google.aip.dev/151
624 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
625 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
626 ///
627 /// # Example
628 /// ```
629 /// # use google_cloud_dataform_v1::client::Dataform;
630 /// use google_cloud_lro::Poller;
631 /// use google_cloud_dataform_v1::Result;
632 /// async fn sample(
633 /// client: &Dataform
634 /// ) -> Result<()> {
635 /// client.move_repository()
636 /// /* set fields */
637 /// .poller().until_done().await?;
638 /// Ok(())
639 /// }
640 /// ```
641 pub fn move_repository(&self) -> super::builder::dataform::MoveRepository {
642 super::builder::dataform::MoveRepository::new(self.inner.clone())
643 }
644
645 /// Applies a Git commit to a Repository. The Repository must not have a value
646 /// for `git_remote_settings.url`.
647 ///
648 /// # Example
649 /// ```
650 /// # use google_cloud_dataform_v1::client::Dataform;
651 /// use google_cloud_dataform_v1::Result;
652 /// async fn sample(
653 /// client: &Dataform
654 /// ) -> Result<()> {
655 /// let response = client.commit_repository_changes()
656 /// /* set fields */
657 /// .send().await?;
658 /// println!("response {:?}", response);
659 /// Ok(())
660 /// }
661 /// ```
662 pub fn commit_repository_changes(&self) -> super::builder::dataform::CommitRepositoryChanges {
663 super::builder::dataform::CommitRepositoryChanges::new(self.inner.clone())
664 }
665
666 /// Returns the contents of a file (inside a Repository). The Repository
667 /// must not have a value for `git_remote_settings.url`.
668 ///
669 /// # Example
670 /// ```
671 /// # use google_cloud_dataform_v1::client::Dataform;
672 /// use google_cloud_dataform_v1::Result;
673 /// async fn sample(
674 /// client: &Dataform
675 /// ) -> Result<()> {
676 /// let response = client.read_repository_file()
677 /// /* set fields */
678 /// .send().await?;
679 /// println!("response {:?}", response);
680 /// Ok(())
681 /// }
682 /// ```
683 pub fn read_repository_file(&self) -> super::builder::dataform::ReadRepositoryFile {
684 super::builder::dataform::ReadRepositoryFile::new(self.inner.clone())
685 }
686
687 /// Returns the contents of a given Repository directory. The Repository must
688 /// not have a value for `git_remote_settings.url`.
689 ///
690 /// # Example
691 /// ```
692 /// # use google_cloud_dataform_v1::client::Dataform;
693 /// use google_cloud_gax::paginator::ItemPaginator as _;
694 /// use google_cloud_dataform_v1::Result;
695 /// async fn sample(
696 /// client: &Dataform
697 /// ) -> Result<()> {
698 /// let mut list = client.query_repository_directory_contents()
699 /// /* set fields */
700 /// .by_item();
701 /// while let Some(item) = list.next().await.transpose()? {
702 /// println!("{:?}", item);
703 /// }
704 /// Ok(())
705 /// }
706 /// ```
707 pub fn query_repository_directory_contents(
708 &self,
709 ) -> super::builder::dataform::QueryRepositoryDirectoryContents {
710 super::builder::dataform::QueryRepositoryDirectoryContents::new(self.inner.clone())
711 }
712
713 /// Fetches a Repository's history of commits. The Repository must not have a
714 /// value for `git_remote_settings.url`.
715 ///
716 /// # Example
717 /// ```
718 /// # use google_cloud_dataform_v1::client::Dataform;
719 /// use google_cloud_gax::paginator::ItemPaginator as _;
720 /// use google_cloud_dataform_v1::Result;
721 /// async fn sample(
722 /// client: &Dataform
723 /// ) -> Result<()> {
724 /// let mut list = client.fetch_repository_history()
725 /// /* set fields */
726 /// .by_item();
727 /// while let Some(item) = list.next().await.transpose()? {
728 /// println!("{:?}", item);
729 /// }
730 /// Ok(())
731 /// }
732 /// ```
733 pub fn fetch_repository_history(&self) -> super::builder::dataform::FetchRepositoryHistory {
734 super::builder::dataform::FetchRepositoryHistory::new(self.inner.clone())
735 }
736
737 /// Computes a Repository's Git access token status.
738 ///
739 /// # Example
740 /// ```
741 /// # use google_cloud_dataform_v1::client::Dataform;
742 /// use google_cloud_dataform_v1::Result;
743 /// async fn sample(
744 /// client: &Dataform
745 /// ) -> Result<()> {
746 /// let response = client.compute_repository_access_token_status()
747 /// /* set fields */
748 /// .send().await?;
749 /// println!("response {:?}", response);
750 /// Ok(())
751 /// }
752 /// ```
753 pub fn compute_repository_access_token_status(
754 &self,
755 ) -> super::builder::dataform::ComputeRepositoryAccessTokenStatus {
756 super::builder::dataform::ComputeRepositoryAccessTokenStatus::new(self.inner.clone())
757 }
758
759 /// Fetches a Repository's remote branches.
760 ///
761 /// # Example
762 /// ```
763 /// # use google_cloud_dataform_v1::client::Dataform;
764 /// use google_cloud_dataform_v1::Result;
765 /// async fn sample(
766 /// client: &Dataform
767 /// ) -> Result<()> {
768 /// let response = client.fetch_remote_branches()
769 /// /* set fields */
770 /// .send().await?;
771 /// println!("response {:?}", response);
772 /// Ok(())
773 /// }
774 /// ```
775 pub fn fetch_remote_branches(&self) -> super::builder::dataform::FetchRemoteBranches {
776 super::builder::dataform::FetchRemoteBranches::new(self.inner.clone())
777 }
778
779 /// Lists Workspaces in a given Repository.
780 ///
781 /// # Example
782 /// ```
783 /// # use google_cloud_dataform_v1::client::Dataform;
784 /// use google_cloud_gax::paginator::ItemPaginator as _;
785 /// use google_cloud_dataform_v1::Result;
786 /// async fn sample(
787 /// client: &Dataform, parent: &str
788 /// ) -> Result<()> {
789 /// let mut list = client.list_workspaces()
790 /// .set_parent(parent)
791 /// .by_item();
792 /// while let Some(item) = list.next().await.transpose()? {
793 /// println!("{:?}", item);
794 /// }
795 /// Ok(())
796 /// }
797 /// ```
798 pub fn list_workspaces(&self) -> super::builder::dataform::ListWorkspaces {
799 super::builder::dataform::ListWorkspaces::new(self.inner.clone())
800 }
801
802 /// Fetches a single Workspace.
803 ///
804 /// # Example
805 /// ```
806 /// # use google_cloud_dataform_v1::client::Dataform;
807 /// use google_cloud_dataform_v1::Result;
808 /// async fn sample(
809 /// client: &Dataform, name: &str
810 /// ) -> Result<()> {
811 /// let response = client.get_workspace()
812 /// .set_name(name)
813 /// .send().await?;
814 /// println!("response {:?}", response);
815 /// Ok(())
816 /// }
817 /// ```
818 pub fn get_workspace(&self) -> super::builder::dataform::GetWorkspace {
819 super::builder::dataform::GetWorkspace::new(self.inner.clone())
820 }
821
822 /// Creates a new Workspace in a given Repository.
823 ///
824 /// # Example
825 /// ```
826 /// # use google_cloud_dataform_v1::client::Dataform;
827 /// use google_cloud_dataform_v1::model::Workspace;
828 /// use google_cloud_dataform_v1::Result;
829 /// async fn sample(
830 /// client: &Dataform, parent: &str
831 /// ) -> Result<()> {
832 /// let response = client.create_workspace()
833 /// .set_parent(parent)
834 /// .set_workspace_id("workspace_id_value")
835 /// .set_workspace(
836 /// Workspace::new()/* set fields */
837 /// )
838 /// .send().await?;
839 /// println!("response {:?}", response);
840 /// Ok(())
841 /// }
842 /// ```
843 pub fn create_workspace(&self) -> super::builder::dataform::CreateWorkspace {
844 super::builder::dataform::CreateWorkspace::new(self.inner.clone())
845 }
846
847 /// Deletes a single Workspace.
848 ///
849 /// # Example
850 /// ```
851 /// # use google_cloud_dataform_v1::client::Dataform;
852 /// use google_cloud_dataform_v1::Result;
853 /// async fn sample(
854 /// client: &Dataform, name: &str
855 /// ) -> Result<()> {
856 /// client.delete_workspace()
857 /// .set_name(name)
858 /// .send().await?;
859 /// Ok(())
860 /// }
861 /// ```
862 pub fn delete_workspace(&self) -> super::builder::dataform::DeleteWorkspace {
863 super::builder::dataform::DeleteWorkspace::new(self.inner.clone())
864 }
865
866 /// Installs dependency NPM packages (inside a Workspace).
867 ///
868 /// # Example
869 /// ```
870 /// # use google_cloud_dataform_v1::client::Dataform;
871 /// use google_cloud_dataform_v1::Result;
872 /// async fn sample(
873 /// client: &Dataform
874 /// ) -> Result<()> {
875 /// let response = client.install_npm_packages()
876 /// /* set fields */
877 /// .send().await?;
878 /// println!("response {:?}", response);
879 /// Ok(())
880 /// }
881 /// ```
882 pub fn install_npm_packages(&self) -> super::builder::dataform::InstallNpmPackages {
883 super::builder::dataform::InstallNpmPackages::new(self.inner.clone())
884 }
885
886 /// Pulls Git commits from the Repository's remote into a Workspace.
887 ///
888 /// # Example
889 /// ```
890 /// # use google_cloud_dataform_v1::client::Dataform;
891 /// use google_cloud_dataform_v1::Result;
892 /// async fn sample(
893 /// client: &Dataform
894 /// ) -> Result<()> {
895 /// let response = client.pull_git_commits()
896 /// /* set fields */
897 /// .send().await?;
898 /// println!("response {:?}", response);
899 /// Ok(())
900 /// }
901 /// ```
902 pub fn pull_git_commits(&self) -> super::builder::dataform::PullGitCommits {
903 super::builder::dataform::PullGitCommits::new(self.inner.clone())
904 }
905
906 /// Pushes Git commits from a Workspace to the Repository's remote.
907 ///
908 /// # Example
909 /// ```
910 /// # use google_cloud_dataform_v1::client::Dataform;
911 /// use google_cloud_dataform_v1::Result;
912 /// async fn sample(
913 /// client: &Dataform
914 /// ) -> Result<()> {
915 /// let response = client.push_git_commits()
916 /// /* set fields */
917 /// .send().await?;
918 /// println!("response {:?}", response);
919 /// Ok(())
920 /// }
921 /// ```
922 pub fn push_git_commits(&self) -> super::builder::dataform::PushGitCommits {
923 super::builder::dataform::PushGitCommits::new(self.inner.clone())
924 }
925
926 /// Fetches Git statuses for the files in a Workspace.
927 ///
928 /// # Example
929 /// ```
930 /// # use google_cloud_dataform_v1::client::Dataform;
931 /// use google_cloud_dataform_v1::Result;
932 /// async fn sample(
933 /// client: &Dataform
934 /// ) -> Result<()> {
935 /// let response = client.fetch_file_git_statuses()
936 /// /* set fields */
937 /// .send().await?;
938 /// println!("response {:?}", response);
939 /// Ok(())
940 /// }
941 /// ```
942 pub fn fetch_file_git_statuses(&self) -> super::builder::dataform::FetchFileGitStatuses {
943 super::builder::dataform::FetchFileGitStatuses::new(self.inner.clone())
944 }
945
946 /// Fetches Git ahead/behind against a remote branch.
947 ///
948 /// # Example
949 /// ```
950 /// # use google_cloud_dataform_v1::client::Dataform;
951 /// use google_cloud_dataform_v1::Result;
952 /// async fn sample(
953 /// client: &Dataform
954 /// ) -> Result<()> {
955 /// let response = client.fetch_git_ahead_behind()
956 /// /* set fields */
957 /// .send().await?;
958 /// println!("response {:?}", response);
959 /// Ok(())
960 /// }
961 /// ```
962 pub fn fetch_git_ahead_behind(&self) -> super::builder::dataform::FetchGitAheadBehind {
963 super::builder::dataform::FetchGitAheadBehind::new(self.inner.clone())
964 }
965
966 /// Applies a Git commit for uncommitted files in a Workspace.
967 ///
968 /// # Example
969 /// ```
970 /// # use google_cloud_dataform_v1::client::Dataform;
971 /// use google_cloud_dataform_v1::Result;
972 /// async fn sample(
973 /// client: &Dataform
974 /// ) -> Result<()> {
975 /// let response = client.commit_workspace_changes()
976 /// /* set fields */
977 /// .send().await?;
978 /// println!("response {:?}", response);
979 /// Ok(())
980 /// }
981 /// ```
982 pub fn commit_workspace_changes(&self) -> super::builder::dataform::CommitWorkspaceChanges {
983 super::builder::dataform::CommitWorkspaceChanges::new(self.inner.clone())
984 }
985
986 /// Performs a Git reset for uncommitted files in a Workspace.
987 ///
988 /// # Example
989 /// ```
990 /// # use google_cloud_dataform_v1::client::Dataform;
991 /// use google_cloud_dataform_v1::Result;
992 /// async fn sample(
993 /// client: &Dataform
994 /// ) -> Result<()> {
995 /// let response = client.reset_workspace_changes()
996 /// /* set fields */
997 /// .send().await?;
998 /// println!("response {:?}", response);
999 /// Ok(())
1000 /// }
1001 /// ```
1002 pub fn reset_workspace_changes(&self) -> super::builder::dataform::ResetWorkspaceChanges {
1003 super::builder::dataform::ResetWorkspaceChanges::new(self.inner.clone())
1004 }
1005
1006 /// Fetches Git diff for an uncommitted file in a Workspace.
1007 ///
1008 /// # Example
1009 /// ```
1010 /// # use google_cloud_dataform_v1::client::Dataform;
1011 /// use google_cloud_dataform_v1::Result;
1012 /// async fn sample(
1013 /// client: &Dataform
1014 /// ) -> Result<()> {
1015 /// let response = client.fetch_file_diff()
1016 /// /* set fields */
1017 /// .send().await?;
1018 /// println!("response {:?}", response);
1019 /// Ok(())
1020 /// }
1021 /// ```
1022 pub fn fetch_file_diff(&self) -> super::builder::dataform::FetchFileDiff {
1023 super::builder::dataform::FetchFileDiff::new(self.inner.clone())
1024 }
1025
1026 /// Returns the contents of a given Workspace directory.
1027 ///
1028 /// # Example
1029 /// ```
1030 /// # use google_cloud_dataform_v1::client::Dataform;
1031 /// use google_cloud_gax::paginator::ItemPaginator as _;
1032 /// use google_cloud_dataform_v1::Result;
1033 /// async fn sample(
1034 /// client: &Dataform
1035 /// ) -> Result<()> {
1036 /// let mut list = client.query_directory_contents()
1037 /// /* set fields */
1038 /// .by_item();
1039 /// while let Some(item) = list.next().await.transpose()? {
1040 /// println!("{:?}", item);
1041 /// }
1042 /// Ok(())
1043 /// }
1044 /// ```
1045 pub fn query_directory_contents(&self) -> super::builder::dataform::QueryDirectoryContents {
1046 super::builder::dataform::QueryDirectoryContents::new(self.inner.clone())
1047 }
1048
1049 /// Finds the contents of a given Workspace directory by filter.
1050 ///
1051 /// # Example
1052 /// ```
1053 /// # use google_cloud_dataform_v1::client::Dataform;
1054 /// use google_cloud_gax::paginator::ItemPaginator as _;
1055 /// use google_cloud_dataform_v1::Result;
1056 /// async fn sample(
1057 /// client: &Dataform
1058 /// ) -> Result<()> {
1059 /// let mut list = client.search_files()
1060 /// /* set fields */
1061 /// .by_item();
1062 /// while let Some(item) = list.next().await.transpose()? {
1063 /// println!("{:?}", item);
1064 /// }
1065 /// Ok(())
1066 /// }
1067 /// ```
1068 pub fn search_files(&self) -> super::builder::dataform::SearchFiles {
1069 super::builder::dataform::SearchFiles::new(self.inner.clone())
1070 }
1071
1072 /// Creates a directory inside a Workspace.
1073 ///
1074 /// # Example
1075 /// ```
1076 /// # use google_cloud_dataform_v1::client::Dataform;
1077 /// use google_cloud_dataform_v1::Result;
1078 /// async fn sample(
1079 /// client: &Dataform
1080 /// ) -> Result<()> {
1081 /// let response = client.make_directory()
1082 /// /* set fields */
1083 /// .send().await?;
1084 /// println!("response {:?}", response);
1085 /// Ok(())
1086 /// }
1087 /// ```
1088 pub fn make_directory(&self) -> super::builder::dataform::MakeDirectory {
1089 super::builder::dataform::MakeDirectory::new(self.inner.clone())
1090 }
1091
1092 /// Deletes a directory (inside a Workspace) and all of its contents.
1093 ///
1094 /// # Example
1095 /// ```
1096 /// # use google_cloud_dataform_v1::client::Dataform;
1097 /// use google_cloud_dataform_v1::Result;
1098 /// async fn sample(
1099 /// client: &Dataform
1100 /// ) -> Result<()> {
1101 /// let response = client.remove_directory()
1102 /// /* set fields */
1103 /// .send().await?;
1104 /// println!("response {:?}", response);
1105 /// Ok(())
1106 /// }
1107 /// ```
1108 pub fn remove_directory(&self) -> super::builder::dataform::RemoveDirectory {
1109 super::builder::dataform::RemoveDirectory::new(self.inner.clone())
1110 }
1111
1112 /// Moves a directory (inside a Workspace), and all of its contents, to a new
1113 /// location.
1114 ///
1115 /// # Example
1116 /// ```
1117 /// # use google_cloud_dataform_v1::client::Dataform;
1118 /// use google_cloud_dataform_v1::Result;
1119 /// async fn sample(
1120 /// client: &Dataform
1121 /// ) -> Result<()> {
1122 /// let response = client.move_directory()
1123 /// /* set fields */
1124 /// .send().await?;
1125 /// println!("response {:?}", response);
1126 /// Ok(())
1127 /// }
1128 /// ```
1129 pub fn move_directory(&self) -> super::builder::dataform::MoveDirectory {
1130 super::builder::dataform::MoveDirectory::new(self.inner.clone())
1131 }
1132
1133 /// Returns the contents of a file (inside a Workspace).
1134 ///
1135 /// # Example
1136 /// ```
1137 /// # use google_cloud_dataform_v1::client::Dataform;
1138 /// use google_cloud_dataform_v1::Result;
1139 /// async fn sample(
1140 /// client: &Dataform
1141 /// ) -> Result<()> {
1142 /// let response = client.read_file()
1143 /// /* set fields */
1144 /// .send().await?;
1145 /// println!("response {:?}", response);
1146 /// Ok(())
1147 /// }
1148 /// ```
1149 pub fn read_file(&self) -> super::builder::dataform::ReadFile {
1150 super::builder::dataform::ReadFile::new(self.inner.clone())
1151 }
1152
1153 /// Deletes a file (inside a Workspace).
1154 ///
1155 /// # Example
1156 /// ```
1157 /// # use google_cloud_dataform_v1::client::Dataform;
1158 /// use google_cloud_dataform_v1::Result;
1159 /// async fn sample(
1160 /// client: &Dataform
1161 /// ) -> Result<()> {
1162 /// let response = client.remove_file()
1163 /// /* set fields */
1164 /// .send().await?;
1165 /// println!("response {:?}", response);
1166 /// Ok(())
1167 /// }
1168 /// ```
1169 pub fn remove_file(&self) -> super::builder::dataform::RemoveFile {
1170 super::builder::dataform::RemoveFile::new(self.inner.clone())
1171 }
1172
1173 /// Moves a file (inside a Workspace) to a new location.
1174 ///
1175 /// # Example
1176 /// ```
1177 /// # use google_cloud_dataform_v1::client::Dataform;
1178 /// use google_cloud_dataform_v1::Result;
1179 /// async fn sample(
1180 /// client: &Dataform
1181 /// ) -> Result<()> {
1182 /// let response = client.move_file()
1183 /// /* set fields */
1184 /// .send().await?;
1185 /// println!("response {:?}", response);
1186 /// Ok(())
1187 /// }
1188 /// ```
1189 pub fn move_file(&self) -> super::builder::dataform::MoveFile {
1190 super::builder::dataform::MoveFile::new(self.inner.clone())
1191 }
1192
1193 /// Writes to a file (inside a Workspace).
1194 ///
1195 /// # Example
1196 /// ```
1197 /// # use google_cloud_dataform_v1::client::Dataform;
1198 /// use google_cloud_dataform_v1::Result;
1199 /// async fn sample(
1200 /// client: &Dataform
1201 /// ) -> Result<()> {
1202 /// let response = client.write_file()
1203 /// /* set fields */
1204 /// .send().await?;
1205 /// println!("response {:?}", response);
1206 /// Ok(())
1207 /// }
1208 /// ```
1209 pub fn write_file(&self) -> super::builder::dataform::WriteFile {
1210 super::builder::dataform::WriteFile::new(self.inner.clone())
1211 }
1212
1213 /// Lists ReleaseConfigs in a given Repository.
1214 ///
1215 /// # Example
1216 /// ```
1217 /// # use google_cloud_dataform_v1::client::Dataform;
1218 /// use google_cloud_gax::paginator::ItemPaginator as _;
1219 /// use google_cloud_dataform_v1::Result;
1220 /// async fn sample(
1221 /// client: &Dataform, parent: &str
1222 /// ) -> Result<()> {
1223 /// let mut list = client.list_release_configs()
1224 /// .set_parent(parent)
1225 /// .by_item();
1226 /// while let Some(item) = list.next().await.transpose()? {
1227 /// println!("{:?}", item);
1228 /// }
1229 /// Ok(())
1230 /// }
1231 /// ```
1232 pub fn list_release_configs(&self) -> super::builder::dataform::ListReleaseConfigs {
1233 super::builder::dataform::ListReleaseConfigs::new(self.inner.clone())
1234 }
1235
1236 /// Fetches a single ReleaseConfig.
1237 ///
1238 /// # Example
1239 /// ```
1240 /// # use google_cloud_dataform_v1::client::Dataform;
1241 /// use google_cloud_dataform_v1::Result;
1242 /// async fn sample(
1243 /// client: &Dataform, name: &str
1244 /// ) -> Result<()> {
1245 /// let response = client.get_release_config()
1246 /// .set_name(name)
1247 /// .send().await?;
1248 /// println!("response {:?}", response);
1249 /// Ok(())
1250 /// }
1251 /// ```
1252 pub fn get_release_config(&self) -> super::builder::dataform::GetReleaseConfig {
1253 super::builder::dataform::GetReleaseConfig::new(self.inner.clone())
1254 }
1255
1256 /// Creates a new ReleaseConfig in a given Repository.
1257 ///
1258 /// # Example
1259 /// ```
1260 /// # use google_cloud_dataform_v1::client::Dataform;
1261 /// use google_cloud_dataform_v1::model::ReleaseConfig;
1262 /// use google_cloud_dataform_v1::Result;
1263 /// async fn sample(
1264 /// client: &Dataform, parent: &str
1265 /// ) -> Result<()> {
1266 /// let response = client.create_release_config()
1267 /// .set_parent(parent)
1268 /// .set_release_config(
1269 /// ReleaseConfig::new()/* set fields */
1270 /// )
1271 /// .send().await?;
1272 /// println!("response {:?}", response);
1273 /// Ok(())
1274 /// }
1275 /// ```
1276 pub fn create_release_config(&self) -> super::builder::dataform::CreateReleaseConfig {
1277 super::builder::dataform::CreateReleaseConfig::new(self.inner.clone())
1278 }
1279
1280 /// Updates a single ReleaseConfig.
1281 ///
1282 /// **Note:** *This method does not fully implement
1283 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
1284 /// as a bad request, and when the `field_mask` is omitted, the request is
1285 /// treated as a full update on all modifiable fields.*
1286 ///
1287 /// # Example
1288 /// ```
1289 /// # use google_cloud_dataform_v1::client::Dataform;
1290 /// # extern crate wkt as google_cloud_wkt;
1291 /// use google_cloud_wkt::FieldMask;
1292 /// use google_cloud_dataform_v1::model::ReleaseConfig;
1293 /// use google_cloud_dataform_v1::Result;
1294 /// async fn sample(
1295 /// client: &Dataform, name: &str
1296 /// ) -> Result<()> {
1297 /// let response = client.update_release_config()
1298 /// .set_release_config(
1299 /// ReleaseConfig::new().set_name(name)/* set fields */
1300 /// )
1301 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1302 /// .send().await?;
1303 /// println!("response {:?}", response);
1304 /// Ok(())
1305 /// }
1306 /// ```
1307 pub fn update_release_config(&self) -> super::builder::dataform::UpdateReleaseConfig {
1308 super::builder::dataform::UpdateReleaseConfig::new(self.inner.clone())
1309 }
1310
1311 /// Deletes a single ReleaseConfig.
1312 ///
1313 /// # Example
1314 /// ```
1315 /// # use google_cloud_dataform_v1::client::Dataform;
1316 /// use google_cloud_dataform_v1::Result;
1317 /// async fn sample(
1318 /// client: &Dataform, name: &str
1319 /// ) -> Result<()> {
1320 /// client.delete_release_config()
1321 /// .set_name(name)
1322 /// .send().await?;
1323 /// Ok(())
1324 /// }
1325 /// ```
1326 pub fn delete_release_config(&self) -> super::builder::dataform::DeleteReleaseConfig {
1327 super::builder::dataform::DeleteReleaseConfig::new(self.inner.clone())
1328 }
1329
1330 /// Lists CompilationResults in a given Repository.
1331 ///
1332 /// # Example
1333 /// ```
1334 /// # use google_cloud_dataform_v1::client::Dataform;
1335 /// use google_cloud_gax::paginator::ItemPaginator as _;
1336 /// use google_cloud_dataform_v1::Result;
1337 /// async fn sample(
1338 /// client: &Dataform, parent: &str
1339 /// ) -> Result<()> {
1340 /// let mut list = client.list_compilation_results()
1341 /// .set_parent(parent)
1342 /// .by_item();
1343 /// while let Some(item) = list.next().await.transpose()? {
1344 /// println!("{:?}", item);
1345 /// }
1346 /// Ok(())
1347 /// }
1348 /// ```
1349 pub fn list_compilation_results(&self) -> super::builder::dataform::ListCompilationResults {
1350 super::builder::dataform::ListCompilationResults::new(self.inner.clone())
1351 }
1352
1353 /// Fetches a single CompilationResult.
1354 ///
1355 /// # Example
1356 /// ```
1357 /// # use google_cloud_dataform_v1::client::Dataform;
1358 /// use google_cloud_dataform_v1::Result;
1359 /// async fn sample(
1360 /// client: &Dataform, name: &str
1361 /// ) -> Result<()> {
1362 /// let response = client.get_compilation_result()
1363 /// .set_name(name)
1364 /// .send().await?;
1365 /// println!("response {:?}", response);
1366 /// Ok(())
1367 /// }
1368 /// ```
1369 pub fn get_compilation_result(&self) -> super::builder::dataform::GetCompilationResult {
1370 super::builder::dataform::GetCompilationResult::new(self.inner.clone())
1371 }
1372
1373 /// Creates a new CompilationResult in a given project and location.
1374 ///
1375 /// # Example
1376 /// ```
1377 /// # use google_cloud_dataform_v1::client::Dataform;
1378 /// use google_cloud_dataform_v1::model::CompilationResult;
1379 /// use google_cloud_dataform_v1::Result;
1380 /// async fn sample(
1381 /// client: &Dataform, parent: &str
1382 /// ) -> Result<()> {
1383 /// let response = client.create_compilation_result()
1384 /// .set_parent(parent)
1385 /// .set_compilation_result(
1386 /// CompilationResult::new()/* set fields */
1387 /// )
1388 /// .send().await?;
1389 /// println!("response {:?}", response);
1390 /// Ok(())
1391 /// }
1392 /// ```
1393 pub fn create_compilation_result(&self) -> super::builder::dataform::CreateCompilationResult {
1394 super::builder::dataform::CreateCompilationResult::new(self.inner.clone())
1395 }
1396
1397 /// Returns CompilationResultActions in a given CompilationResult.
1398 ///
1399 /// # Example
1400 /// ```
1401 /// # use google_cloud_dataform_v1::client::Dataform;
1402 /// use google_cloud_gax::paginator::ItemPaginator as _;
1403 /// use google_cloud_dataform_v1::Result;
1404 /// async fn sample(
1405 /// client: &Dataform
1406 /// ) -> Result<()> {
1407 /// let mut list = client.query_compilation_result_actions()
1408 /// /* set fields */
1409 /// .by_item();
1410 /// while let Some(item) = list.next().await.transpose()? {
1411 /// println!("{:?}", item);
1412 /// }
1413 /// Ok(())
1414 /// }
1415 /// ```
1416 pub fn query_compilation_result_actions(
1417 &self,
1418 ) -> super::builder::dataform::QueryCompilationResultActions {
1419 super::builder::dataform::QueryCompilationResultActions::new(self.inner.clone())
1420 }
1421
1422 /// Lists WorkflowConfigs in a given Repository.
1423 ///
1424 /// # Example
1425 /// ```
1426 /// # use google_cloud_dataform_v1::client::Dataform;
1427 /// use google_cloud_gax::paginator::ItemPaginator as _;
1428 /// use google_cloud_dataform_v1::Result;
1429 /// async fn sample(
1430 /// client: &Dataform, parent: &str
1431 /// ) -> Result<()> {
1432 /// let mut list = client.list_workflow_configs()
1433 /// .set_parent(parent)
1434 /// .by_item();
1435 /// while let Some(item) = list.next().await.transpose()? {
1436 /// println!("{:?}", item);
1437 /// }
1438 /// Ok(())
1439 /// }
1440 /// ```
1441 pub fn list_workflow_configs(&self) -> super::builder::dataform::ListWorkflowConfigs {
1442 super::builder::dataform::ListWorkflowConfigs::new(self.inner.clone())
1443 }
1444
1445 /// Fetches a single WorkflowConfig.
1446 ///
1447 /// # Example
1448 /// ```
1449 /// # use google_cloud_dataform_v1::client::Dataform;
1450 /// use google_cloud_dataform_v1::Result;
1451 /// async fn sample(
1452 /// client: &Dataform, name: &str
1453 /// ) -> Result<()> {
1454 /// let response = client.get_workflow_config()
1455 /// .set_name(name)
1456 /// .send().await?;
1457 /// println!("response {:?}", response);
1458 /// Ok(())
1459 /// }
1460 /// ```
1461 pub fn get_workflow_config(&self) -> super::builder::dataform::GetWorkflowConfig {
1462 super::builder::dataform::GetWorkflowConfig::new(self.inner.clone())
1463 }
1464
1465 /// Creates a new WorkflowConfig in a given Repository.
1466 ///
1467 /// # Example
1468 /// ```
1469 /// # use google_cloud_dataform_v1::client::Dataform;
1470 /// use google_cloud_dataform_v1::model::WorkflowConfig;
1471 /// use google_cloud_dataform_v1::Result;
1472 /// async fn sample(
1473 /// client: &Dataform, parent: &str
1474 /// ) -> Result<()> {
1475 /// let response = client.create_workflow_config()
1476 /// .set_parent(parent)
1477 /// .set_workflow_config(
1478 /// WorkflowConfig::new()/* set fields */
1479 /// )
1480 /// .send().await?;
1481 /// println!("response {:?}", response);
1482 /// Ok(())
1483 /// }
1484 /// ```
1485 pub fn create_workflow_config(&self) -> super::builder::dataform::CreateWorkflowConfig {
1486 super::builder::dataform::CreateWorkflowConfig::new(self.inner.clone())
1487 }
1488
1489 /// Updates a single WorkflowConfig.
1490 ///
1491 /// **Note:** *This method does not fully implement
1492 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
1493 /// as a bad request, and when the `field_mask` is omitted, the request is
1494 /// treated as a full update on all modifiable fields.*
1495 ///
1496 /// # Example
1497 /// ```
1498 /// # use google_cloud_dataform_v1::client::Dataform;
1499 /// # extern crate wkt as google_cloud_wkt;
1500 /// use google_cloud_wkt::FieldMask;
1501 /// use google_cloud_dataform_v1::model::WorkflowConfig;
1502 /// use google_cloud_dataform_v1::Result;
1503 /// async fn sample(
1504 /// client: &Dataform, name: &str
1505 /// ) -> Result<()> {
1506 /// let response = client.update_workflow_config()
1507 /// .set_workflow_config(
1508 /// WorkflowConfig::new().set_name(name)/* set fields */
1509 /// )
1510 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1511 /// .send().await?;
1512 /// println!("response {:?}", response);
1513 /// Ok(())
1514 /// }
1515 /// ```
1516 pub fn update_workflow_config(&self) -> super::builder::dataform::UpdateWorkflowConfig {
1517 super::builder::dataform::UpdateWorkflowConfig::new(self.inner.clone())
1518 }
1519
1520 /// Deletes a single WorkflowConfig.
1521 ///
1522 /// # Example
1523 /// ```
1524 /// # use google_cloud_dataform_v1::client::Dataform;
1525 /// use google_cloud_dataform_v1::Result;
1526 /// async fn sample(
1527 /// client: &Dataform, name: &str
1528 /// ) -> Result<()> {
1529 /// client.delete_workflow_config()
1530 /// .set_name(name)
1531 /// .send().await?;
1532 /// Ok(())
1533 /// }
1534 /// ```
1535 pub fn delete_workflow_config(&self) -> super::builder::dataform::DeleteWorkflowConfig {
1536 super::builder::dataform::DeleteWorkflowConfig::new(self.inner.clone())
1537 }
1538
1539 /// Lists WorkflowInvocations in a given Repository.
1540 ///
1541 /// # Example
1542 /// ```
1543 /// # use google_cloud_dataform_v1::client::Dataform;
1544 /// use google_cloud_gax::paginator::ItemPaginator as _;
1545 /// use google_cloud_dataform_v1::Result;
1546 /// async fn sample(
1547 /// client: &Dataform, parent: &str
1548 /// ) -> Result<()> {
1549 /// let mut list = client.list_workflow_invocations()
1550 /// .set_parent(parent)
1551 /// .by_item();
1552 /// while let Some(item) = list.next().await.transpose()? {
1553 /// println!("{:?}", item);
1554 /// }
1555 /// Ok(())
1556 /// }
1557 /// ```
1558 pub fn list_workflow_invocations(&self) -> super::builder::dataform::ListWorkflowInvocations {
1559 super::builder::dataform::ListWorkflowInvocations::new(self.inner.clone())
1560 }
1561
1562 /// Fetches a single WorkflowInvocation.
1563 ///
1564 /// # Example
1565 /// ```
1566 /// # use google_cloud_dataform_v1::client::Dataform;
1567 /// use google_cloud_dataform_v1::Result;
1568 /// async fn sample(
1569 /// client: &Dataform, name: &str
1570 /// ) -> Result<()> {
1571 /// let response = client.get_workflow_invocation()
1572 /// .set_name(name)
1573 /// .send().await?;
1574 /// println!("response {:?}", response);
1575 /// Ok(())
1576 /// }
1577 /// ```
1578 pub fn get_workflow_invocation(&self) -> super::builder::dataform::GetWorkflowInvocation {
1579 super::builder::dataform::GetWorkflowInvocation::new(self.inner.clone())
1580 }
1581
1582 /// Creates a new WorkflowInvocation in a given Repository.
1583 ///
1584 /// # Example
1585 /// ```
1586 /// # use google_cloud_dataform_v1::client::Dataform;
1587 /// use google_cloud_dataform_v1::model::WorkflowInvocation;
1588 /// use google_cloud_dataform_v1::Result;
1589 /// async fn sample(
1590 /// client: &Dataform, parent: &str
1591 /// ) -> Result<()> {
1592 /// let response = client.create_workflow_invocation()
1593 /// .set_parent(parent)
1594 /// .set_workflow_invocation(
1595 /// WorkflowInvocation::new()/* set fields */
1596 /// )
1597 /// .send().await?;
1598 /// println!("response {:?}", response);
1599 /// Ok(())
1600 /// }
1601 /// ```
1602 pub fn create_workflow_invocation(&self) -> super::builder::dataform::CreateWorkflowInvocation {
1603 super::builder::dataform::CreateWorkflowInvocation::new(self.inner.clone())
1604 }
1605
1606 /// Deletes a single WorkflowInvocation.
1607 ///
1608 /// # Example
1609 /// ```
1610 /// # use google_cloud_dataform_v1::client::Dataform;
1611 /// use google_cloud_dataform_v1::Result;
1612 /// async fn sample(
1613 /// client: &Dataform, name: &str
1614 /// ) -> Result<()> {
1615 /// client.delete_workflow_invocation()
1616 /// .set_name(name)
1617 /// .send().await?;
1618 /// Ok(())
1619 /// }
1620 /// ```
1621 pub fn delete_workflow_invocation(&self) -> super::builder::dataform::DeleteWorkflowInvocation {
1622 super::builder::dataform::DeleteWorkflowInvocation::new(self.inner.clone())
1623 }
1624
1625 /// Requests cancellation of a running WorkflowInvocation.
1626 ///
1627 /// # Example
1628 /// ```
1629 /// # use google_cloud_dataform_v1::client::Dataform;
1630 /// use google_cloud_dataform_v1::Result;
1631 /// async fn sample(
1632 /// client: &Dataform
1633 /// ) -> Result<()> {
1634 /// let response = client.cancel_workflow_invocation()
1635 /// /* set fields */
1636 /// .send().await?;
1637 /// println!("response {:?}", response);
1638 /// Ok(())
1639 /// }
1640 /// ```
1641 pub fn cancel_workflow_invocation(&self) -> super::builder::dataform::CancelWorkflowInvocation {
1642 super::builder::dataform::CancelWorkflowInvocation::new(self.inner.clone())
1643 }
1644
1645 /// Returns WorkflowInvocationActions in a given WorkflowInvocation.
1646 ///
1647 /// # Example
1648 /// ```
1649 /// # use google_cloud_dataform_v1::client::Dataform;
1650 /// use google_cloud_gax::paginator::ItemPaginator as _;
1651 /// use google_cloud_dataform_v1::Result;
1652 /// async fn sample(
1653 /// client: &Dataform
1654 /// ) -> Result<()> {
1655 /// let mut list = client.query_workflow_invocation_actions()
1656 /// /* set fields */
1657 /// .by_item();
1658 /// while let Some(item) = list.next().await.transpose()? {
1659 /// println!("{:?}", item);
1660 /// }
1661 /// Ok(())
1662 /// }
1663 /// ```
1664 pub fn query_workflow_invocation_actions(
1665 &self,
1666 ) -> super::builder::dataform::QueryWorkflowInvocationActions {
1667 super::builder::dataform::QueryWorkflowInvocationActions::new(self.inner.clone())
1668 }
1669
1670 /// Get default config for a given project and location.
1671 ///
1672 /// # Example
1673 /// ```
1674 /// # use google_cloud_dataform_v1::client::Dataform;
1675 /// use google_cloud_dataform_v1::Result;
1676 /// async fn sample(
1677 /// client: &Dataform, name: &str
1678 /// ) -> Result<()> {
1679 /// let response = client.get_config()
1680 /// .set_name(name)
1681 /// .send().await?;
1682 /// println!("response {:?}", response);
1683 /// Ok(())
1684 /// }
1685 /// ```
1686 pub fn get_config(&self) -> super::builder::dataform::GetConfig {
1687 super::builder::dataform::GetConfig::new(self.inner.clone())
1688 }
1689
1690 /// Update default config for a given project and location.
1691 ///
1692 /// **Note:** *This method does not fully implement
1693 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
1694 /// as a bad request, and when the `field_mask` is omitted, the request is
1695 /// treated as a full update on all modifiable fields.*
1696 ///
1697 /// # Example
1698 /// ```
1699 /// # use google_cloud_dataform_v1::client::Dataform;
1700 /// # extern crate wkt as google_cloud_wkt;
1701 /// use google_cloud_wkt::FieldMask;
1702 /// use google_cloud_dataform_v1::model::Config;
1703 /// use google_cloud_dataform_v1::Result;
1704 /// async fn sample(
1705 /// client: &Dataform, name: &str
1706 /// ) -> Result<()> {
1707 /// let response = client.update_config()
1708 /// .set_config(
1709 /// Config::new().set_name(name)/* set fields */
1710 /// )
1711 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1712 /// .send().await?;
1713 /// println!("response {:?}", response);
1714 /// Ok(())
1715 /// }
1716 /// ```
1717 pub fn update_config(&self) -> super::builder::dataform::UpdateConfig {
1718 super::builder::dataform::UpdateConfig::new(self.inner.clone())
1719 }
1720
1721 /// Gets the access control policy for a resource.
1722 /// Returns an empty policy if the resource exists and does not have a policy
1723 /// set.
1724 ///
1725 /// # Example
1726 /// ```
1727 /// # use google_cloud_dataform_v1::client::Dataform;
1728 /// use google_cloud_dataform_v1::Result;
1729 /// async fn sample(
1730 /// client: &Dataform
1731 /// ) -> Result<()> {
1732 /// let response = client.get_iam_policy()
1733 /// /* set fields */
1734 /// .send().await?;
1735 /// println!("response {:?}", response);
1736 /// Ok(())
1737 /// }
1738 /// ```
1739 pub fn get_iam_policy(&self) -> super::builder::dataform::GetIamPolicy {
1740 super::builder::dataform::GetIamPolicy::new(self.inner.clone())
1741 }
1742
1743 /// Sets the access control policy on the specified resource. Replaces any
1744 /// existing policy.
1745 ///
1746 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
1747 ///
1748 /// # Example
1749 /// ```
1750 /// # use google_cloud_dataform_v1::client::Dataform;
1751 /// use google_cloud_dataform_v1::Result;
1752 /// async fn sample(
1753 /// client: &Dataform
1754 /// ) -> Result<()> {
1755 /// let response = client.set_iam_policy()
1756 /// /* set fields */
1757 /// .send().await?;
1758 /// println!("response {:?}", response);
1759 /// Ok(())
1760 /// }
1761 /// ```
1762 pub fn set_iam_policy(&self) -> super::builder::dataform::SetIamPolicy {
1763 super::builder::dataform::SetIamPolicy::new(self.inner.clone())
1764 }
1765
1766 /// Returns permissions that a caller has on the specified resource.
1767 /// If the resource does not exist, this will return an empty set of
1768 /// permissions, not a `NOT_FOUND` error.
1769 ///
1770 /// Note: This operation is designed to be used for building permission-aware
1771 /// UIs and command-line tools, not for authorization checking. This operation
1772 /// may "fail open" without warning.
1773 ///
1774 /// # Example
1775 /// ```
1776 /// # use google_cloud_dataform_v1::client::Dataform;
1777 /// use google_cloud_dataform_v1::Result;
1778 /// async fn sample(
1779 /// client: &Dataform
1780 /// ) -> Result<()> {
1781 /// let response = client.test_iam_permissions()
1782 /// /* set fields */
1783 /// .send().await?;
1784 /// println!("response {:?}", response);
1785 /// Ok(())
1786 /// }
1787 /// ```
1788 pub fn test_iam_permissions(&self) -> super::builder::dataform::TestIamPermissions {
1789 super::builder::dataform::TestIamPermissions::new(self.inner.clone())
1790 }
1791
1792 /// Lists information about the supported locations for this service.
1793 ///
1794 /// This method lists locations based on the resource scope provided in
1795 /// the [ListLocationsRequest.name] field:
1796 ///
1797 /// * **Global locations**: If `name` is empty, the method lists the
1798 /// public locations available to all projects. * **Project-specific
1799 /// locations**: If `name` follows the format
1800 /// `projects/{project}`, the method lists locations visible to that
1801 /// specific project. This includes public, private, or other
1802 /// project-specific locations enabled for the project.
1803 ///
1804 /// For gRPC and client library implementations, the resource name is
1805 /// passed as the `name` field. For direct service calls, the resource
1806 /// name is
1807 /// incorporated into the request path based on the specific service
1808 /// implementation and version.
1809 ///
1810 /// # Example
1811 /// ```
1812 /// # use google_cloud_dataform_v1::client::Dataform;
1813 /// use google_cloud_gax::paginator::ItemPaginator as _;
1814 /// use google_cloud_dataform_v1::Result;
1815 /// async fn sample(
1816 /// client: &Dataform
1817 /// ) -> Result<()> {
1818 /// let mut list = client.list_locations()
1819 /// /* set fields */
1820 /// .by_item();
1821 /// while let Some(item) = list.next().await.transpose()? {
1822 /// println!("{:?}", item);
1823 /// }
1824 /// Ok(())
1825 /// }
1826 /// ```
1827 pub fn list_locations(&self) -> super::builder::dataform::ListLocations {
1828 super::builder::dataform::ListLocations::new(self.inner.clone())
1829 }
1830
1831 /// Gets information about a location.
1832 ///
1833 /// # Example
1834 /// ```
1835 /// # use google_cloud_dataform_v1::client::Dataform;
1836 /// use google_cloud_dataform_v1::Result;
1837 /// async fn sample(
1838 /// client: &Dataform
1839 /// ) -> Result<()> {
1840 /// let response = client.get_location()
1841 /// /* set fields */
1842 /// .send().await?;
1843 /// println!("response {:?}", response);
1844 /// Ok(())
1845 /// }
1846 /// ```
1847 pub fn get_location(&self) -> super::builder::dataform::GetLocation {
1848 super::builder::dataform::GetLocation::new(self.inner.clone())
1849 }
1850
1851 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1852 ///
1853 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1854 ///
1855 /// # Example
1856 /// ```
1857 /// # use google_cloud_dataform_v1::client::Dataform;
1858 /// use google_cloud_gax::paginator::ItemPaginator as _;
1859 /// use google_cloud_dataform_v1::Result;
1860 /// async fn sample(
1861 /// client: &Dataform
1862 /// ) -> Result<()> {
1863 /// let mut list = client.list_operations()
1864 /// /* set fields */
1865 /// .by_item();
1866 /// while let Some(item) = list.next().await.transpose()? {
1867 /// println!("{:?}", item);
1868 /// }
1869 /// Ok(())
1870 /// }
1871 /// ```
1872 pub fn list_operations(&self) -> super::builder::dataform::ListOperations {
1873 super::builder::dataform::ListOperations::new(self.inner.clone())
1874 }
1875
1876 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1877 ///
1878 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1879 ///
1880 /// # Example
1881 /// ```
1882 /// # use google_cloud_dataform_v1::client::Dataform;
1883 /// use google_cloud_dataform_v1::Result;
1884 /// async fn sample(
1885 /// client: &Dataform
1886 /// ) -> Result<()> {
1887 /// let response = client.get_operation()
1888 /// /* set fields */
1889 /// .send().await?;
1890 /// println!("response {:?}", response);
1891 /// Ok(())
1892 /// }
1893 /// ```
1894 pub fn get_operation(&self) -> super::builder::dataform::GetOperation {
1895 super::builder::dataform::GetOperation::new(self.inner.clone())
1896 }
1897
1898 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1899 ///
1900 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1901 ///
1902 /// # Example
1903 /// ```
1904 /// # use google_cloud_dataform_v1::client::Dataform;
1905 /// use google_cloud_dataform_v1::Result;
1906 /// async fn sample(
1907 /// client: &Dataform
1908 /// ) -> Result<()> {
1909 /// client.delete_operation()
1910 /// /* set fields */
1911 /// .send().await?;
1912 /// Ok(())
1913 /// }
1914 /// ```
1915 pub fn delete_operation(&self) -> super::builder::dataform::DeleteOperation {
1916 super::builder::dataform::DeleteOperation::new(self.inner.clone())
1917 }
1918
1919 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1920 ///
1921 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1922 ///
1923 /// # Example
1924 /// ```
1925 /// # use google_cloud_dataform_v1::client::Dataform;
1926 /// use google_cloud_dataform_v1::Result;
1927 /// async fn sample(
1928 /// client: &Dataform
1929 /// ) -> Result<()> {
1930 /// client.cancel_operation()
1931 /// /* set fields */
1932 /// .send().await?;
1933 /// Ok(())
1934 /// }
1935 /// ```
1936 pub fn cancel_operation(&self) -> super::builder::dataform::CancelOperation {
1937 super::builder::dataform::CancelOperation::new(self.inner.clone())
1938 }
1939}