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 /// Lists Repositories in a given project and location.
130 ///
131 /// **Note:** *This method can return repositories not shown in the [Dataform
132 /// UI](https://console.cloud.google.com/bigquery/dataform)*.
133 ///
134 /// # Example
135 /// ```
136 /// # use google_cloud_dataform_v1::client::Dataform;
137 /// use google_cloud_gax::paginator::ItemPaginator as _;
138 /// use google_cloud_dataform_v1::Result;
139 /// async fn sample(
140 /// client: &Dataform, parent: &str
141 /// ) -> Result<()> {
142 /// let mut list = client.list_repositories()
143 /// .set_parent(parent)
144 /// .by_item();
145 /// while let Some(item) = list.next().await.transpose()? {
146 /// println!("{:?}", item);
147 /// }
148 /// Ok(())
149 /// }
150 /// ```
151 pub fn list_repositories(&self) -> super::builder::dataform::ListRepositories {
152 super::builder::dataform::ListRepositories::new(self.inner.clone())
153 }
154
155 /// Fetches a single Repository.
156 ///
157 /// # Example
158 /// ```
159 /// # use google_cloud_dataform_v1::client::Dataform;
160 /// use google_cloud_dataform_v1::Result;
161 /// async fn sample(
162 /// client: &Dataform, name: &str
163 /// ) -> Result<()> {
164 /// let response = client.get_repository()
165 /// .set_name(name)
166 /// .send().await?;
167 /// println!("response {:?}", response);
168 /// Ok(())
169 /// }
170 /// ```
171 pub fn get_repository(&self) -> super::builder::dataform::GetRepository {
172 super::builder::dataform::GetRepository::new(self.inner.clone())
173 }
174
175 /// Creates a new Repository in a given project and location.
176 ///
177 /// # Example
178 /// ```
179 /// # use google_cloud_dataform_v1::client::Dataform;
180 /// use google_cloud_dataform_v1::model::Repository;
181 /// use google_cloud_dataform_v1::Result;
182 /// async fn sample(
183 /// client: &Dataform, parent: &str
184 /// ) -> Result<()> {
185 /// let response = client.create_repository()
186 /// .set_parent(parent)
187 /// .set_repository_id("repository_id_value")
188 /// .set_repository(
189 /// Repository::new()/* set fields */
190 /// )
191 /// .send().await?;
192 /// println!("response {:?}", response);
193 /// Ok(())
194 /// }
195 /// ```
196 pub fn create_repository(&self) -> super::builder::dataform::CreateRepository {
197 super::builder::dataform::CreateRepository::new(self.inner.clone())
198 }
199
200 /// Updates a single Repository.
201 ///
202 /// **Note:** *This method does not fully implement
203 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
204 /// as a bad request, and when the `field_mask` is omitted, the request is
205 /// treated as a full update on all modifiable fields.*
206 ///
207 /// # Example
208 /// ```
209 /// # use google_cloud_dataform_v1::client::Dataform;
210 /// # extern crate wkt as google_cloud_wkt;
211 /// use google_cloud_wkt::FieldMask;
212 /// use google_cloud_dataform_v1::model::Repository;
213 /// use google_cloud_dataform_v1::Result;
214 /// async fn sample(
215 /// client: &Dataform, name: &str
216 /// ) -> Result<()> {
217 /// let response = client.update_repository()
218 /// .set_repository(
219 /// Repository::new().set_name(name)/* set fields */
220 /// )
221 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
222 /// .send().await?;
223 /// println!("response {:?}", response);
224 /// Ok(())
225 /// }
226 /// ```
227 pub fn update_repository(&self) -> super::builder::dataform::UpdateRepository {
228 super::builder::dataform::UpdateRepository::new(self.inner.clone())
229 }
230
231 /// Deletes a single Repository.
232 ///
233 /// # Example
234 /// ```
235 /// # use google_cloud_dataform_v1::client::Dataform;
236 /// use google_cloud_dataform_v1::Result;
237 /// async fn sample(
238 /// client: &Dataform, name: &str
239 /// ) -> Result<()> {
240 /// client.delete_repository()
241 /// .set_name(name)
242 /// .send().await?;
243 /// Ok(())
244 /// }
245 /// ```
246 pub fn delete_repository(&self) -> super::builder::dataform::DeleteRepository {
247 super::builder::dataform::DeleteRepository::new(self.inner.clone())
248 }
249
250 /// Applies a Git commit to a Repository. The Repository must not have a value
251 /// for `git_remote_settings.url`.
252 ///
253 /// # Example
254 /// ```
255 /// # use google_cloud_dataform_v1::client::Dataform;
256 /// use google_cloud_dataform_v1::Result;
257 /// async fn sample(
258 /// client: &Dataform
259 /// ) -> Result<()> {
260 /// let response = client.commit_repository_changes()
261 /// /* set fields */
262 /// .send().await?;
263 /// println!("response {:?}", response);
264 /// Ok(())
265 /// }
266 /// ```
267 pub fn commit_repository_changes(&self) -> super::builder::dataform::CommitRepositoryChanges {
268 super::builder::dataform::CommitRepositoryChanges::new(self.inner.clone())
269 }
270
271 /// Returns the contents of a file (inside a Repository). The Repository
272 /// must not have a value for `git_remote_settings.url`.
273 ///
274 /// # Example
275 /// ```
276 /// # use google_cloud_dataform_v1::client::Dataform;
277 /// use google_cloud_dataform_v1::Result;
278 /// async fn sample(
279 /// client: &Dataform
280 /// ) -> Result<()> {
281 /// let response = client.read_repository_file()
282 /// /* set fields */
283 /// .send().await?;
284 /// println!("response {:?}", response);
285 /// Ok(())
286 /// }
287 /// ```
288 pub fn read_repository_file(&self) -> super::builder::dataform::ReadRepositoryFile {
289 super::builder::dataform::ReadRepositoryFile::new(self.inner.clone())
290 }
291
292 /// Returns the contents of a given Repository directory. The Repository must
293 /// not have a value for `git_remote_settings.url`.
294 ///
295 /// # Example
296 /// ```
297 /// # use google_cloud_dataform_v1::client::Dataform;
298 /// use google_cloud_gax::paginator::ItemPaginator as _;
299 /// use google_cloud_dataform_v1::Result;
300 /// async fn sample(
301 /// client: &Dataform
302 /// ) -> Result<()> {
303 /// let mut list = client.query_repository_directory_contents()
304 /// /* set fields */
305 /// .by_item();
306 /// while let Some(item) = list.next().await.transpose()? {
307 /// println!("{:?}", item);
308 /// }
309 /// Ok(())
310 /// }
311 /// ```
312 pub fn query_repository_directory_contents(
313 &self,
314 ) -> super::builder::dataform::QueryRepositoryDirectoryContents {
315 super::builder::dataform::QueryRepositoryDirectoryContents::new(self.inner.clone())
316 }
317
318 /// Fetches a Repository's history of commits. The Repository must not have a
319 /// value for `git_remote_settings.url`.
320 ///
321 /// # Example
322 /// ```
323 /// # use google_cloud_dataform_v1::client::Dataform;
324 /// use google_cloud_gax::paginator::ItemPaginator as _;
325 /// use google_cloud_dataform_v1::Result;
326 /// async fn sample(
327 /// client: &Dataform
328 /// ) -> Result<()> {
329 /// let mut list = client.fetch_repository_history()
330 /// /* set fields */
331 /// .by_item();
332 /// while let Some(item) = list.next().await.transpose()? {
333 /// println!("{:?}", item);
334 /// }
335 /// Ok(())
336 /// }
337 /// ```
338 pub fn fetch_repository_history(&self) -> super::builder::dataform::FetchRepositoryHistory {
339 super::builder::dataform::FetchRepositoryHistory::new(self.inner.clone())
340 }
341
342 /// Computes a Repository's Git access token status.
343 ///
344 /// # Example
345 /// ```
346 /// # use google_cloud_dataform_v1::client::Dataform;
347 /// use google_cloud_dataform_v1::Result;
348 /// async fn sample(
349 /// client: &Dataform
350 /// ) -> Result<()> {
351 /// let response = client.compute_repository_access_token_status()
352 /// /* set fields */
353 /// .send().await?;
354 /// println!("response {:?}", response);
355 /// Ok(())
356 /// }
357 /// ```
358 pub fn compute_repository_access_token_status(
359 &self,
360 ) -> super::builder::dataform::ComputeRepositoryAccessTokenStatus {
361 super::builder::dataform::ComputeRepositoryAccessTokenStatus::new(self.inner.clone())
362 }
363
364 /// Fetches a Repository's remote branches.
365 ///
366 /// # Example
367 /// ```
368 /// # use google_cloud_dataform_v1::client::Dataform;
369 /// use google_cloud_dataform_v1::Result;
370 /// async fn sample(
371 /// client: &Dataform
372 /// ) -> Result<()> {
373 /// let response = client.fetch_remote_branches()
374 /// /* set fields */
375 /// .send().await?;
376 /// println!("response {:?}", response);
377 /// Ok(())
378 /// }
379 /// ```
380 pub fn fetch_remote_branches(&self) -> super::builder::dataform::FetchRemoteBranches {
381 super::builder::dataform::FetchRemoteBranches::new(self.inner.clone())
382 }
383
384 /// Lists Workspaces in a given Repository.
385 ///
386 /// # Example
387 /// ```
388 /// # use google_cloud_dataform_v1::client::Dataform;
389 /// use google_cloud_gax::paginator::ItemPaginator as _;
390 /// use google_cloud_dataform_v1::Result;
391 /// async fn sample(
392 /// client: &Dataform, parent: &str
393 /// ) -> Result<()> {
394 /// let mut list = client.list_workspaces()
395 /// .set_parent(parent)
396 /// .by_item();
397 /// while let Some(item) = list.next().await.transpose()? {
398 /// println!("{:?}", item);
399 /// }
400 /// Ok(())
401 /// }
402 /// ```
403 pub fn list_workspaces(&self) -> super::builder::dataform::ListWorkspaces {
404 super::builder::dataform::ListWorkspaces::new(self.inner.clone())
405 }
406
407 /// Fetches a single Workspace.
408 ///
409 /// # Example
410 /// ```
411 /// # use google_cloud_dataform_v1::client::Dataform;
412 /// use google_cloud_dataform_v1::Result;
413 /// async fn sample(
414 /// client: &Dataform, name: &str
415 /// ) -> Result<()> {
416 /// let response = client.get_workspace()
417 /// .set_name(name)
418 /// .send().await?;
419 /// println!("response {:?}", response);
420 /// Ok(())
421 /// }
422 /// ```
423 pub fn get_workspace(&self) -> super::builder::dataform::GetWorkspace {
424 super::builder::dataform::GetWorkspace::new(self.inner.clone())
425 }
426
427 /// Creates a new Workspace in a given Repository.
428 ///
429 /// # Example
430 /// ```
431 /// # use google_cloud_dataform_v1::client::Dataform;
432 /// use google_cloud_dataform_v1::model::Workspace;
433 /// use google_cloud_dataform_v1::Result;
434 /// async fn sample(
435 /// client: &Dataform, parent: &str
436 /// ) -> Result<()> {
437 /// let response = client.create_workspace()
438 /// .set_parent(parent)
439 /// .set_workspace_id("workspace_id_value")
440 /// .set_workspace(
441 /// Workspace::new()/* set fields */
442 /// )
443 /// .send().await?;
444 /// println!("response {:?}", response);
445 /// Ok(())
446 /// }
447 /// ```
448 pub fn create_workspace(&self) -> super::builder::dataform::CreateWorkspace {
449 super::builder::dataform::CreateWorkspace::new(self.inner.clone())
450 }
451
452 /// Deletes a single Workspace.
453 ///
454 /// # Example
455 /// ```
456 /// # use google_cloud_dataform_v1::client::Dataform;
457 /// use google_cloud_dataform_v1::Result;
458 /// async fn sample(
459 /// client: &Dataform, name: &str
460 /// ) -> Result<()> {
461 /// client.delete_workspace()
462 /// .set_name(name)
463 /// .send().await?;
464 /// Ok(())
465 /// }
466 /// ```
467 pub fn delete_workspace(&self) -> super::builder::dataform::DeleteWorkspace {
468 super::builder::dataform::DeleteWorkspace::new(self.inner.clone())
469 }
470
471 /// Installs dependency NPM packages (inside a Workspace).
472 ///
473 /// # Example
474 /// ```
475 /// # use google_cloud_dataform_v1::client::Dataform;
476 /// use google_cloud_dataform_v1::Result;
477 /// async fn sample(
478 /// client: &Dataform
479 /// ) -> Result<()> {
480 /// let response = client.install_npm_packages()
481 /// /* set fields */
482 /// .send().await?;
483 /// println!("response {:?}", response);
484 /// Ok(())
485 /// }
486 /// ```
487 pub fn install_npm_packages(&self) -> super::builder::dataform::InstallNpmPackages {
488 super::builder::dataform::InstallNpmPackages::new(self.inner.clone())
489 }
490
491 /// Pulls Git commits from the Repository's remote into a Workspace.
492 ///
493 /// # Example
494 /// ```
495 /// # use google_cloud_dataform_v1::client::Dataform;
496 /// use google_cloud_dataform_v1::Result;
497 /// async fn sample(
498 /// client: &Dataform
499 /// ) -> Result<()> {
500 /// let response = client.pull_git_commits()
501 /// /* set fields */
502 /// .send().await?;
503 /// println!("response {:?}", response);
504 /// Ok(())
505 /// }
506 /// ```
507 pub fn pull_git_commits(&self) -> super::builder::dataform::PullGitCommits {
508 super::builder::dataform::PullGitCommits::new(self.inner.clone())
509 }
510
511 /// Pushes Git commits from a Workspace to the Repository's remote.
512 ///
513 /// # Example
514 /// ```
515 /// # use google_cloud_dataform_v1::client::Dataform;
516 /// use google_cloud_dataform_v1::Result;
517 /// async fn sample(
518 /// client: &Dataform
519 /// ) -> Result<()> {
520 /// let response = client.push_git_commits()
521 /// /* set fields */
522 /// .send().await?;
523 /// println!("response {:?}", response);
524 /// Ok(())
525 /// }
526 /// ```
527 pub fn push_git_commits(&self) -> super::builder::dataform::PushGitCommits {
528 super::builder::dataform::PushGitCommits::new(self.inner.clone())
529 }
530
531 /// Fetches Git statuses for the files in a Workspace.
532 ///
533 /// # Example
534 /// ```
535 /// # use google_cloud_dataform_v1::client::Dataform;
536 /// use google_cloud_dataform_v1::Result;
537 /// async fn sample(
538 /// client: &Dataform
539 /// ) -> Result<()> {
540 /// let response = client.fetch_file_git_statuses()
541 /// /* set fields */
542 /// .send().await?;
543 /// println!("response {:?}", response);
544 /// Ok(())
545 /// }
546 /// ```
547 pub fn fetch_file_git_statuses(&self) -> super::builder::dataform::FetchFileGitStatuses {
548 super::builder::dataform::FetchFileGitStatuses::new(self.inner.clone())
549 }
550
551 /// Fetches Git ahead/behind against a remote branch.
552 ///
553 /// # Example
554 /// ```
555 /// # use google_cloud_dataform_v1::client::Dataform;
556 /// use google_cloud_dataform_v1::Result;
557 /// async fn sample(
558 /// client: &Dataform
559 /// ) -> Result<()> {
560 /// let response = client.fetch_git_ahead_behind()
561 /// /* set fields */
562 /// .send().await?;
563 /// println!("response {:?}", response);
564 /// Ok(())
565 /// }
566 /// ```
567 pub fn fetch_git_ahead_behind(&self) -> super::builder::dataform::FetchGitAheadBehind {
568 super::builder::dataform::FetchGitAheadBehind::new(self.inner.clone())
569 }
570
571 /// Applies a Git commit for uncommitted files in a Workspace.
572 ///
573 /// # Example
574 /// ```
575 /// # use google_cloud_dataform_v1::client::Dataform;
576 /// use google_cloud_dataform_v1::Result;
577 /// async fn sample(
578 /// client: &Dataform
579 /// ) -> Result<()> {
580 /// let response = client.commit_workspace_changes()
581 /// /* set fields */
582 /// .send().await?;
583 /// println!("response {:?}", response);
584 /// Ok(())
585 /// }
586 /// ```
587 pub fn commit_workspace_changes(&self) -> super::builder::dataform::CommitWorkspaceChanges {
588 super::builder::dataform::CommitWorkspaceChanges::new(self.inner.clone())
589 }
590
591 /// Performs a Git reset for uncommitted files in a Workspace.
592 ///
593 /// # Example
594 /// ```
595 /// # use google_cloud_dataform_v1::client::Dataform;
596 /// use google_cloud_dataform_v1::Result;
597 /// async fn sample(
598 /// client: &Dataform
599 /// ) -> Result<()> {
600 /// let response = client.reset_workspace_changes()
601 /// /* set fields */
602 /// .send().await?;
603 /// println!("response {:?}", response);
604 /// Ok(())
605 /// }
606 /// ```
607 pub fn reset_workspace_changes(&self) -> super::builder::dataform::ResetWorkspaceChanges {
608 super::builder::dataform::ResetWorkspaceChanges::new(self.inner.clone())
609 }
610
611 /// Fetches Git diff for an uncommitted file in a Workspace.
612 ///
613 /// # Example
614 /// ```
615 /// # use google_cloud_dataform_v1::client::Dataform;
616 /// use google_cloud_dataform_v1::Result;
617 /// async fn sample(
618 /// client: &Dataform
619 /// ) -> Result<()> {
620 /// let response = client.fetch_file_diff()
621 /// /* set fields */
622 /// .send().await?;
623 /// println!("response {:?}", response);
624 /// Ok(())
625 /// }
626 /// ```
627 pub fn fetch_file_diff(&self) -> super::builder::dataform::FetchFileDiff {
628 super::builder::dataform::FetchFileDiff::new(self.inner.clone())
629 }
630
631 /// Returns the contents of a given Workspace directory.
632 ///
633 /// # Example
634 /// ```
635 /// # use google_cloud_dataform_v1::client::Dataform;
636 /// use google_cloud_gax::paginator::ItemPaginator as _;
637 /// use google_cloud_dataform_v1::Result;
638 /// async fn sample(
639 /// client: &Dataform
640 /// ) -> Result<()> {
641 /// let mut list = client.query_directory_contents()
642 /// /* set fields */
643 /// .by_item();
644 /// while let Some(item) = list.next().await.transpose()? {
645 /// println!("{:?}", item);
646 /// }
647 /// Ok(())
648 /// }
649 /// ```
650 pub fn query_directory_contents(&self) -> super::builder::dataform::QueryDirectoryContents {
651 super::builder::dataform::QueryDirectoryContents::new(self.inner.clone())
652 }
653
654 /// Finds the contents of a given Workspace directory by filter.
655 ///
656 /// # Example
657 /// ```
658 /// # use google_cloud_dataform_v1::client::Dataform;
659 /// use google_cloud_gax::paginator::ItemPaginator as _;
660 /// use google_cloud_dataform_v1::Result;
661 /// async fn sample(
662 /// client: &Dataform
663 /// ) -> Result<()> {
664 /// let mut list = client.search_files()
665 /// /* set fields */
666 /// .by_item();
667 /// while let Some(item) = list.next().await.transpose()? {
668 /// println!("{:?}", item);
669 /// }
670 /// Ok(())
671 /// }
672 /// ```
673 pub fn search_files(&self) -> super::builder::dataform::SearchFiles {
674 super::builder::dataform::SearchFiles::new(self.inner.clone())
675 }
676
677 /// Creates a directory inside a Workspace.
678 ///
679 /// # Example
680 /// ```
681 /// # use google_cloud_dataform_v1::client::Dataform;
682 /// use google_cloud_dataform_v1::Result;
683 /// async fn sample(
684 /// client: &Dataform
685 /// ) -> Result<()> {
686 /// let response = client.make_directory()
687 /// /* set fields */
688 /// .send().await?;
689 /// println!("response {:?}", response);
690 /// Ok(())
691 /// }
692 /// ```
693 pub fn make_directory(&self) -> super::builder::dataform::MakeDirectory {
694 super::builder::dataform::MakeDirectory::new(self.inner.clone())
695 }
696
697 /// Deletes a directory (inside a Workspace) and all of its contents.
698 ///
699 /// # Example
700 /// ```
701 /// # use google_cloud_dataform_v1::client::Dataform;
702 /// use google_cloud_dataform_v1::Result;
703 /// async fn sample(
704 /// client: &Dataform
705 /// ) -> Result<()> {
706 /// let response = client.remove_directory()
707 /// /* set fields */
708 /// .send().await?;
709 /// println!("response {:?}", response);
710 /// Ok(())
711 /// }
712 /// ```
713 pub fn remove_directory(&self) -> super::builder::dataform::RemoveDirectory {
714 super::builder::dataform::RemoveDirectory::new(self.inner.clone())
715 }
716
717 /// Moves a directory (inside a Workspace), and all of its contents, to a new
718 /// location.
719 ///
720 /// # Example
721 /// ```
722 /// # use google_cloud_dataform_v1::client::Dataform;
723 /// use google_cloud_dataform_v1::Result;
724 /// async fn sample(
725 /// client: &Dataform
726 /// ) -> Result<()> {
727 /// let response = client.move_directory()
728 /// /* set fields */
729 /// .send().await?;
730 /// println!("response {:?}", response);
731 /// Ok(())
732 /// }
733 /// ```
734 pub fn move_directory(&self) -> super::builder::dataform::MoveDirectory {
735 super::builder::dataform::MoveDirectory::new(self.inner.clone())
736 }
737
738 /// Returns the contents of a file (inside a Workspace).
739 ///
740 /// # Example
741 /// ```
742 /// # use google_cloud_dataform_v1::client::Dataform;
743 /// use google_cloud_dataform_v1::Result;
744 /// async fn sample(
745 /// client: &Dataform
746 /// ) -> Result<()> {
747 /// let response = client.read_file()
748 /// /* set fields */
749 /// .send().await?;
750 /// println!("response {:?}", response);
751 /// Ok(())
752 /// }
753 /// ```
754 pub fn read_file(&self) -> super::builder::dataform::ReadFile {
755 super::builder::dataform::ReadFile::new(self.inner.clone())
756 }
757
758 /// Deletes a file (inside a Workspace).
759 ///
760 /// # Example
761 /// ```
762 /// # use google_cloud_dataform_v1::client::Dataform;
763 /// use google_cloud_dataform_v1::Result;
764 /// async fn sample(
765 /// client: &Dataform
766 /// ) -> Result<()> {
767 /// let response = client.remove_file()
768 /// /* set fields */
769 /// .send().await?;
770 /// println!("response {:?}", response);
771 /// Ok(())
772 /// }
773 /// ```
774 pub fn remove_file(&self) -> super::builder::dataform::RemoveFile {
775 super::builder::dataform::RemoveFile::new(self.inner.clone())
776 }
777
778 /// Moves a file (inside a Workspace) to a new location.
779 ///
780 /// # Example
781 /// ```
782 /// # use google_cloud_dataform_v1::client::Dataform;
783 /// use google_cloud_dataform_v1::Result;
784 /// async fn sample(
785 /// client: &Dataform
786 /// ) -> Result<()> {
787 /// let response = client.move_file()
788 /// /* set fields */
789 /// .send().await?;
790 /// println!("response {:?}", response);
791 /// Ok(())
792 /// }
793 /// ```
794 pub fn move_file(&self) -> super::builder::dataform::MoveFile {
795 super::builder::dataform::MoveFile::new(self.inner.clone())
796 }
797
798 /// Writes to a file (inside a Workspace).
799 ///
800 /// # Example
801 /// ```
802 /// # use google_cloud_dataform_v1::client::Dataform;
803 /// use google_cloud_dataform_v1::Result;
804 /// async fn sample(
805 /// client: &Dataform
806 /// ) -> Result<()> {
807 /// let response = client.write_file()
808 /// /* set fields */
809 /// .send().await?;
810 /// println!("response {:?}", response);
811 /// Ok(())
812 /// }
813 /// ```
814 pub fn write_file(&self) -> super::builder::dataform::WriteFile {
815 super::builder::dataform::WriteFile::new(self.inner.clone())
816 }
817
818 /// Lists ReleaseConfigs in a given Repository.
819 ///
820 /// # Example
821 /// ```
822 /// # use google_cloud_dataform_v1::client::Dataform;
823 /// use google_cloud_gax::paginator::ItemPaginator as _;
824 /// use google_cloud_dataform_v1::Result;
825 /// async fn sample(
826 /// client: &Dataform, parent: &str
827 /// ) -> Result<()> {
828 /// let mut list = client.list_release_configs()
829 /// .set_parent(parent)
830 /// .by_item();
831 /// while let Some(item) = list.next().await.transpose()? {
832 /// println!("{:?}", item);
833 /// }
834 /// Ok(())
835 /// }
836 /// ```
837 pub fn list_release_configs(&self) -> super::builder::dataform::ListReleaseConfigs {
838 super::builder::dataform::ListReleaseConfigs::new(self.inner.clone())
839 }
840
841 /// Fetches a single ReleaseConfig.
842 ///
843 /// # Example
844 /// ```
845 /// # use google_cloud_dataform_v1::client::Dataform;
846 /// use google_cloud_dataform_v1::Result;
847 /// async fn sample(
848 /// client: &Dataform, name: &str
849 /// ) -> Result<()> {
850 /// let response = client.get_release_config()
851 /// .set_name(name)
852 /// .send().await?;
853 /// println!("response {:?}", response);
854 /// Ok(())
855 /// }
856 /// ```
857 pub fn get_release_config(&self) -> super::builder::dataform::GetReleaseConfig {
858 super::builder::dataform::GetReleaseConfig::new(self.inner.clone())
859 }
860
861 /// Creates a new ReleaseConfig in a given Repository.
862 ///
863 /// # Example
864 /// ```
865 /// # use google_cloud_dataform_v1::client::Dataform;
866 /// use google_cloud_dataform_v1::model::ReleaseConfig;
867 /// use google_cloud_dataform_v1::Result;
868 /// async fn sample(
869 /// client: &Dataform, parent: &str
870 /// ) -> Result<()> {
871 /// let response = client.create_release_config()
872 /// .set_parent(parent)
873 /// .set_release_config(
874 /// ReleaseConfig::new()/* set fields */
875 /// )
876 /// .send().await?;
877 /// println!("response {:?}", response);
878 /// Ok(())
879 /// }
880 /// ```
881 pub fn create_release_config(&self) -> super::builder::dataform::CreateReleaseConfig {
882 super::builder::dataform::CreateReleaseConfig::new(self.inner.clone())
883 }
884
885 /// Updates a single ReleaseConfig.
886 ///
887 /// **Note:** *This method does not fully implement
888 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
889 /// as a bad request, and when the `field_mask` is omitted, the request is
890 /// treated as a full update on all modifiable fields.*
891 ///
892 /// # Example
893 /// ```
894 /// # use google_cloud_dataform_v1::client::Dataform;
895 /// # extern crate wkt as google_cloud_wkt;
896 /// use google_cloud_wkt::FieldMask;
897 /// use google_cloud_dataform_v1::model::ReleaseConfig;
898 /// use google_cloud_dataform_v1::Result;
899 /// async fn sample(
900 /// client: &Dataform, name: &str
901 /// ) -> Result<()> {
902 /// let response = client.update_release_config()
903 /// .set_release_config(
904 /// ReleaseConfig::new().set_name(name)/* set fields */
905 /// )
906 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
907 /// .send().await?;
908 /// println!("response {:?}", response);
909 /// Ok(())
910 /// }
911 /// ```
912 pub fn update_release_config(&self) -> super::builder::dataform::UpdateReleaseConfig {
913 super::builder::dataform::UpdateReleaseConfig::new(self.inner.clone())
914 }
915
916 /// Deletes a single ReleaseConfig.
917 ///
918 /// # Example
919 /// ```
920 /// # use google_cloud_dataform_v1::client::Dataform;
921 /// use google_cloud_dataform_v1::Result;
922 /// async fn sample(
923 /// client: &Dataform, name: &str
924 /// ) -> Result<()> {
925 /// client.delete_release_config()
926 /// .set_name(name)
927 /// .send().await?;
928 /// Ok(())
929 /// }
930 /// ```
931 pub fn delete_release_config(&self) -> super::builder::dataform::DeleteReleaseConfig {
932 super::builder::dataform::DeleteReleaseConfig::new(self.inner.clone())
933 }
934
935 /// Lists CompilationResults in a given Repository.
936 ///
937 /// # Example
938 /// ```
939 /// # use google_cloud_dataform_v1::client::Dataform;
940 /// use google_cloud_gax::paginator::ItemPaginator as _;
941 /// use google_cloud_dataform_v1::Result;
942 /// async fn sample(
943 /// client: &Dataform, parent: &str
944 /// ) -> Result<()> {
945 /// let mut list = client.list_compilation_results()
946 /// .set_parent(parent)
947 /// .by_item();
948 /// while let Some(item) = list.next().await.transpose()? {
949 /// println!("{:?}", item);
950 /// }
951 /// Ok(())
952 /// }
953 /// ```
954 pub fn list_compilation_results(&self) -> super::builder::dataform::ListCompilationResults {
955 super::builder::dataform::ListCompilationResults::new(self.inner.clone())
956 }
957
958 /// Fetches a single CompilationResult.
959 ///
960 /// # Example
961 /// ```
962 /// # use google_cloud_dataform_v1::client::Dataform;
963 /// use google_cloud_dataform_v1::Result;
964 /// async fn sample(
965 /// client: &Dataform, name: &str
966 /// ) -> Result<()> {
967 /// let response = client.get_compilation_result()
968 /// .set_name(name)
969 /// .send().await?;
970 /// println!("response {:?}", response);
971 /// Ok(())
972 /// }
973 /// ```
974 pub fn get_compilation_result(&self) -> super::builder::dataform::GetCompilationResult {
975 super::builder::dataform::GetCompilationResult::new(self.inner.clone())
976 }
977
978 /// Creates a new CompilationResult in a given project and location.
979 ///
980 /// # Example
981 /// ```
982 /// # use google_cloud_dataform_v1::client::Dataform;
983 /// use google_cloud_dataform_v1::model::CompilationResult;
984 /// use google_cloud_dataform_v1::Result;
985 /// async fn sample(
986 /// client: &Dataform, parent: &str
987 /// ) -> Result<()> {
988 /// let response = client.create_compilation_result()
989 /// .set_parent(parent)
990 /// .set_compilation_result(
991 /// CompilationResult::new()/* set fields */
992 /// )
993 /// .send().await?;
994 /// println!("response {:?}", response);
995 /// Ok(())
996 /// }
997 /// ```
998 pub fn create_compilation_result(&self) -> super::builder::dataform::CreateCompilationResult {
999 super::builder::dataform::CreateCompilationResult::new(self.inner.clone())
1000 }
1001
1002 /// Returns CompilationResultActions in a given CompilationResult.
1003 ///
1004 /// # Example
1005 /// ```
1006 /// # use google_cloud_dataform_v1::client::Dataform;
1007 /// use google_cloud_gax::paginator::ItemPaginator as _;
1008 /// use google_cloud_dataform_v1::Result;
1009 /// async fn sample(
1010 /// client: &Dataform
1011 /// ) -> Result<()> {
1012 /// let mut list = client.query_compilation_result_actions()
1013 /// /* set fields */
1014 /// .by_item();
1015 /// while let Some(item) = list.next().await.transpose()? {
1016 /// println!("{:?}", item);
1017 /// }
1018 /// Ok(())
1019 /// }
1020 /// ```
1021 pub fn query_compilation_result_actions(
1022 &self,
1023 ) -> super::builder::dataform::QueryCompilationResultActions {
1024 super::builder::dataform::QueryCompilationResultActions::new(self.inner.clone())
1025 }
1026
1027 /// Lists WorkflowConfigs in a given Repository.
1028 ///
1029 /// # Example
1030 /// ```
1031 /// # use google_cloud_dataform_v1::client::Dataform;
1032 /// use google_cloud_gax::paginator::ItemPaginator as _;
1033 /// use google_cloud_dataform_v1::Result;
1034 /// async fn sample(
1035 /// client: &Dataform, parent: &str
1036 /// ) -> Result<()> {
1037 /// let mut list = client.list_workflow_configs()
1038 /// .set_parent(parent)
1039 /// .by_item();
1040 /// while let Some(item) = list.next().await.transpose()? {
1041 /// println!("{:?}", item);
1042 /// }
1043 /// Ok(())
1044 /// }
1045 /// ```
1046 pub fn list_workflow_configs(&self) -> super::builder::dataform::ListWorkflowConfigs {
1047 super::builder::dataform::ListWorkflowConfigs::new(self.inner.clone())
1048 }
1049
1050 /// Fetches a single WorkflowConfig.
1051 ///
1052 /// # Example
1053 /// ```
1054 /// # use google_cloud_dataform_v1::client::Dataform;
1055 /// use google_cloud_dataform_v1::Result;
1056 /// async fn sample(
1057 /// client: &Dataform, name: &str
1058 /// ) -> Result<()> {
1059 /// let response = client.get_workflow_config()
1060 /// .set_name(name)
1061 /// .send().await?;
1062 /// println!("response {:?}", response);
1063 /// Ok(())
1064 /// }
1065 /// ```
1066 pub fn get_workflow_config(&self) -> super::builder::dataform::GetWorkflowConfig {
1067 super::builder::dataform::GetWorkflowConfig::new(self.inner.clone())
1068 }
1069
1070 /// Creates a new WorkflowConfig in a given Repository.
1071 ///
1072 /// # Example
1073 /// ```
1074 /// # use google_cloud_dataform_v1::client::Dataform;
1075 /// use google_cloud_dataform_v1::model::WorkflowConfig;
1076 /// use google_cloud_dataform_v1::Result;
1077 /// async fn sample(
1078 /// client: &Dataform, parent: &str
1079 /// ) -> Result<()> {
1080 /// let response = client.create_workflow_config()
1081 /// .set_parent(parent)
1082 /// .set_workflow_config(
1083 /// WorkflowConfig::new()/* set fields */
1084 /// )
1085 /// .send().await?;
1086 /// println!("response {:?}", response);
1087 /// Ok(())
1088 /// }
1089 /// ```
1090 pub fn create_workflow_config(&self) -> super::builder::dataform::CreateWorkflowConfig {
1091 super::builder::dataform::CreateWorkflowConfig::new(self.inner.clone())
1092 }
1093
1094 /// Updates a single WorkflowConfig.
1095 ///
1096 /// **Note:** *This method does not fully implement
1097 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
1098 /// as a bad request, and when the `field_mask` is omitted, the request is
1099 /// treated as a full update on all modifiable fields.*
1100 ///
1101 /// # Example
1102 /// ```
1103 /// # use google_cloud_dataform_v1::client::Dataform;
1104 /// # extern crate wkt as google_cloud_wkt;
1105 /// use google_cloud_wkt::FieldMask;
1106 /// use google_cloud_dataform_v1::model::WorkflowConfig;
1107 /// use google_cloud_dataform_v1::Result;
1108 /// async fn sample(
1109 /// client: &Dataform, name: &str
1110 /// ) -> Result<()> {
1111 /// let response = client.update_workflow_config()
1112 /// .set_workflow_config(
1113 /// WorkflowConfig::new().set_name(name)/* set fields */
1114 /// )
1115 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1116 /// .send().await?;
1117 /// println!("response {:?}", response);
1118 /// Ok(())
1119 /// }
1120 /// ```
1121 pub fn update_workflow_config(&self) -> super::builder::dataform::UpdateWorkflowConfig {
1122 super::builder::dataform::UpdateWorkflowConfig::new(self.inner.clone())
1123 }
1124
1125 /// Deletes a single WorkflowConfig.
1126 ///
1127 /// # Example
1128 /// ```
1129 /// # use google_cloud_dataform_v1::client::Dataform;
1130 /// use google_cloud_dataform_v1::Result;
1131 /// async fn sample(
1132 /// client: &Dataform, name: &str
1133 /// ) -> Result<()> {
1134 /// client.delete_workflow_config()
1135 /// .set_name(name)
1136 /// .send().await?;
1137 /// Ok(())
1138 /// }
1139 /// ```
1140 pub fn delete_workflow_config(&self) -> super::builder::dataform::DeleteWorkflowConfig {
1141 super::builder::dataform::DeleteWorkflowConfig::new(self.inner.clone())
1142 }
1143
1144 /// Lists WorkflowInvocations in a given Repository.
1145 ///
1146 /// # Example
1147 /// ```
1148 /// # use google_cloud_dataform_v1::client::Dataform;
1149 /// use google_cloud_gax::paginator::ItemPaginator as _;
1150 /// use google_cloud_dataform_v1::Result;
1151 /// async fn sample(
1152 /// client: &Dataform, parent: &str
1153 /// ) -> Result<()> {
1154 /// let mut list = client.list_workflow_invocations()
1155 /// .set_parent(parent)
1156 /// .by_item();
1157 /// while let Some(item) = list.next().await.transpose()? {
1158 /// println!("{:?}", item);
1159 /// }
1160 /// Ok(())
1161 /// }
1162 /// ```
1163 pub fn list_workflow_invocations(&self) -> super::builder::dataform::ListWorkflowInvocations {
1164 super::builder::dataform::ListWorkflowInvocations::new(self.inner.clone())
1165 }
1166
1167 /// Fetches a single WorkflowInvocation.
1168 ///
1169 /// # Example
1170 /// ```
1171 /// # use google_cloud_dataform_v1::client::Dataform;
1172 /// use google_cloud_dataform_v1::Result;
1173 /// async fn sample(
1174 /// client: &Dataform, name: &str
1175 /// ) -> Result<()> {
1176 /// let response = client.get_workflow_invocation()
1177 /// .set_name(name)
1178 /// .send().await?;
1179 /// println!("response {:?}", response);
1180 /// Ok(())
1181 /// }
1182 /// ```
1183 pub fn get_workflow_invocation(&self) -> super::builder::dataform::GetWorkflowInvocation {
1184 super::builder::dataform::GetWorkflowInvocation::new(self.inner.clone())
1185 }
1186
1187 /// Creates a new WorkflowInvocation in a given Repository.
1188 ///
1189 /// # Example
1190 /// ```
1191 /// # use google_cloud_dataform_v1::client::Dataform;
1192 /// use google_cloud_dataform_v1::model::WorkflowInvocation;
1193 /// use google_cloud_dataform_v1::Result;
1194 /// async fn sample(
1195 /// client: &Dataform, parent: &str
1196 /// ) -> Result<()> {
1197 /// let response = client.create_workflow_invocation()
1198 /// .set_parent(parent)
1199 /// .set_workflow_invocation(
1200 /// WorkflowInvocation::new()/* set fields */
1201 /// )
1202 /// .send().await?;
1203 /// println!("response {:?}", response);
1204 /// Ok(())
1205 /// }
1206 /// ```
1207 pub fn create_workflow_invocation(&self) -> super::builder::dataform::CreateWorkflowInvocation {
1208 super::builder::dataform::CreateWorkflowInvocation::new(self.inner.clone())
1209 }
1210
1211 /// Deletes a single WorkflowInvocation.
1212 ///
1213 /// # Example
1214 /// ```
1215 /// # use google_cloud_dataform_v1::client::Dataform;
1216 /// use google_cloud_dataform_v1::Result;
1217 /// async fn sample(
1218 /// client: &Dataform, name: &str
1219 /// ) -> Result<()> {
1220 /// client.delete_workflow_invocation()
1221 /// .set_name(name)
1222 /// .send().await?;
1223 /// Ok(())
1224 /// }
1225 /// ```
1226 pub fn delete_workflow_invocation(&self) -> super::builder::dataform::DeleteWorkflowInvocation {
1227 super::builder::dataform::DeleteWorkflowInvocation::new(self.inner.clone())
1228 }
1229
1230 /// Requests cancellation of a running WorkflowInvocation.
1231 ///
1232 /// # Example
1233 /// ```
1234 /// # use google_cloud_dataform_v1::client::Dataform;
1235 /// use google_cloud_dataform_v1::Result;
1236 /// async fn sample(
1237 /// client: &Dataform
1238 /// ) -> Result<()> {
1239 /// let response = client.cancel_workflow_invocation()
1240 /// /* set fields */
1241 /// .send().await?;
1242 /// println!("response {:?}", response);
1243 /// Ok(())
1244 /// }
1245 /// ```
1246 pub fn cancel_workflow_invocation(&self) -> super::builder::dataform::CancelWorkflowInvocation {
1247 super::builder::dataform::CancelWorkflowInvocation::new(self.inner.clone())
1248 }
1249
1250 /// Returns WorkflowInvocationActions in a given WorkflowInvocation.
1251 ///
1252 /// # Example
1253 /// ```
1254 /// # use google_cloud_dataform_v1::client::Dataform;
1255 /// use google_cloud_gax::paginator::ItemPaginator as _;
1256 /// use google_cloud_dataform_v1::Result;
1257 /// async fn sample(
1258 /// client: &Dataform
1259 /// ) -> Result<()> {
1260 /// let mut list = client.query_workflow_invocation_actions()
1261 /// /* set fields */
1262 /// .by_item();
1263 /// while let Some(item) = list.next().await.transpose()? {
1264 /// println!("{:?}", item);
1265 /// }
1266 /// Ok(())
1267 /// }
1268 /// ```
1269 pub fn query_workflow_invocation_actions(
1270 &self,
1271 ) -> super::builder::dataform::QueryWorkflowInvocationActions {
1272 super::builder::dataform::QueryWorkflowInvocationActions::new(self.inner.clone())
1273 }
1274
1275 /// Get default config for a given project and location.
1276 ///
1277 /// # Example
1278 /// ```
1279 /// # use google_cloud_dataform_v1::client::Dataform;
1280 /// use google_cloud_dataform_v1::Result;
1281 /// async fn sample(
1282 /// client: &Dataform, name: &str
1283 /// ) -> Result<()> {
1284 /// let response = client.get_config()
1285 /// .set_name(name)
1286 /// .send().await?;
1287 /// println!("response {:?}", response);
1288 /// Ok(())
1289 /// }
1290 /// ```
1291 pub fn get_config(&self) -> super::builder::dataform::GetConfig {
1292 super::builder::dataform::GetConfig::new(self.inner.clone())
1293 }
1294
1295 /// Update default config for a given project and location.
1296 ///
1297 /// **Note:** *This method does not fully implement
1298 /// [AIP/134](https://google.aip.dev/134). The wildcard entry (\*) is treated
1299 /// as a bad request, and when the `field_mask` is omitted, the request is
1300 /// treated as a full update on all modifiable fields.*
1301 ///
1302 /// # Example
1303 /// ```
1304 /// # use google_cloud_dataform_v1::client::Dataform;
1305 /// # extern crate wkt as google_cloud_wkt;
1306 /// use google_cloud_wkt::FieldMask;
1307 /// use google_cloud_dataform_v1::model::Config;
1308 /// use google_cloud_dataform_v1::Result;
1309 /// async fn sample(
1310 /// client: &Dataform, name: &str
1311 /// ) -> Result<()> {
1312 /// let response = client.update_config()
1313 /// .set_config(
1314 /// Config::new().set_name(name)/* set fields */
1315 /// )
1316 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1317 /// .send().await?;
1318 /// println!("response {:?}", response);
1319 /// Ok(())
1320 /// }
1321 /// ```
1322 pub fn update_config(&self) -> super::builder::dataform::UpdateConfig {
1323 super::builder::dataform::UpdateConfig::new(self.inner.clone())
1324 }
1325
1326 /// Lists information about the supported locations for this service.
1327 ///
1328 /// # Example
1329 /// ```
1330 /// # use google_cloud_dataform_v1::client::Dataform;
1331 /// use google_cloud_gax::paginator::ItemPaginator as _;
1332 /// use google_cloud_dataform_v1::Result;
1333 /// async fn sample(
1334 /// client: &Dataform
1335 /// ) -> Result<()> {
1336 /// let mut list = client.list_locations()
1337 /// /* set fields */
1338 /// .by_item();
1339 /// while let Some(item) = list.next().await.transpose()? {
1340 /// println!("{:?}", item);
1341 /// }
1342 /// Ok(())
1343 /// }
1344 /// ```
1345 pub fn list_locations(&self) -> super::builder::dataform::ListLocations {
1346 super::builder::dataform::ListLocations::new(self.inner.clone())
1347 }
1348
1349 /// Gets information about a location.
1350 ///
1351 /// # Example
1352 /// ```
1353 /// # use google_cloud_dataform_v1::client::Dataform;
1354 /// use google_cloud_dataform_v1::Result;
1355 /// async fn sample(
1356 /// client: &Dataform
1357 /// ) -> Result<()> {
1358 /// let response = client.get_location()
1359 /// /* set fields */
1360 /// .send().await?;
1361 /// println!("response {:?}", response);
1362 /// Ok(())
1363 /// }
1364 /// ```
1365 pub fn get_location(&self) -> super::builder::dataform::GetLocation {
1366 super::builder::dataform::GetLocation::new(self.inner.clone())
1367 }
1368
1369 /// Sets the access control policy on the specified resource. Replaces
1370 /// any existing policy.
1371 ///
1372 /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
1373 /// errors.
1374 ///
1375 /// # Example
1376 /// ```
1377 /// # use google_cloud_dataform_v1::client::Dataform;
1378 /// use google_cloud_dataform_v1::Result;
1379 /// async fn sample(
1380 /// client: &Dataform
1381 /// ) -> Result<()> {
1382 /// let response = client.set_iam_policy()
1383 /// /* set fields */
1384 /// .send().await?;
1385 /// println!("response {:?}", response);
1386 /// Ok(())
1387 /// }
1388 /// ```
1389 pub fn set_iam_policy(&self) -> super::builder::dataform::SetIamPolicy {
1390 super::builder::dataform::SetIamPolicy::new(self.inner.clone())
1391 }
1392
1393 /// Gets the access control policy for a resource. Returns an empty policy
1394 /// if the resource exists and does not have a policy set.
1395 ///
1396 /// # Example
1397 /// ```
1398 /// # use google_cloud_dataform_v1::client::Dataform;
1399 /// use google_cloud_dataform_v1::Result;
1400 /// async fn sample(
1401 /// client: &Dataform
1402 /// ) -> Result<()> {
1403 /// let response = client.get_iam_policy()
1404 /// /* set fields */
1405 /// .send().await?;
1406 /// println!("response {:?}", response);
1407 /// Ok(())
1408 /// }
1409 /// ```
1410 pub fn get_iam_policy(&self) -> super::builder::dataform::GetIamPolicy {
1411 super::builder::dataform::GetIamPolicy::new(self.inner.clone())
1412 }
1413
1414 /// Returns permissions that a caller has on the specified resource. If the
1415 /// resource does not exist, this will return an empty set of
1416 /// permissions, not a `NOT_FOUND` error.
1417 ///
1418 /// Note: This operation is designed to be used for building
1419 /// permission-aware UIs and command-line tools, not for authorization
1420 /// checking. This operation may "fail open" without warning.
1421 ///
1422 /// # Example
1423 /// ```
1424 /// # use google_cloud_dataform_v1::client::Dataform;
1425 /// use google_cloud_dataform_v1::Result;
1426 /// async fn sample(
1427 /// client: &Dataform
1428 /// ) -> Result<()> {
1429 /// let response = client.test_iam_permissions()
1430 /// /* set fields */
1431 /// .send().await?;
1432 /// println!("response {:?}", response);
1433 /// Ok(())
1434 /// }
1435 /// ```
1436 pub fn test_iam_permissions(&self) -> super::builder::dataform::TestIamPermissions {
1437 super::builder::dataform::TestIamPermissions::new(self.inner.clone())
1438 }
1439}