Skip to main content

google_cloud_config_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 Infrastructure Manager API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_config_v1::client::Config;
24/// use google_cloud_gax::paginator::ItemPaginator as _;
25/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
26///     let client = Config::builder().build().await?;
27///     let parent = "parent_value";
28///     let mut list = client.list_deployments()
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/// Infrastructure Manager is a managed service that automates the deployment and
40/// management of Google Cloud infrastructure resources.
41///
42/// # Configuration
43///
44/// To configure `Config` use the `with_*` methods in the type returned
45/// by [builder()][Config::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://config.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::config::ClientBuilder::with_endpoint
58/// [with_credentials()]: super::builder::config::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/// `Config` holds a connection pool internally, it is advised to
65/// create one and reuse it. You do not need to wrap `Config` 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 Config {
70    inner: std::sync::Arc<dyn super::stub::dynamic::Config>,
71}
72
73impl Config {
74    /// Returns a builder for [Config].
75    ///
76    /// ```
77    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
78    /// # use google_cloud_config_v1::client::Config;
79    /// let client = Config::builder().build().await?;
80    /// # Ok(()) }
81    /// ```
82    pub fn builder() -> super::builder::config::ClientBuilder {
83        crate::new_client_builder(super::builder::config::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::Config + '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::Config>> {
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::Config> {
118        super::transport::Config::new(conf).await
119    }
120
121    async fn build_with_tracing(
122        conf: gaxi::options::ClientConfig,
123    ) -> crate::ClientBuilderResult<impl super::stub::Config> {
124        Self::build_transport(conf)
125            .await
126            .map(super::tracing::Config::new)
127    }
128
129    /// Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project
130    /// and location.
131    ///
132    /// [google.cloud.config.v1.Deployment]: crate::model::Deployment
133    ///
134    /// # Example
135    /// ```
136    /// # use google_cloud_config_v1::client::Config;
137    /// use google_cloud_gax::paginator::ItemPaginator as _;
138    /// use google_cloud_config_v1::Result;
139    /// async fn sample(
140    ///    client: &Config, parent: &str
141    /// ) -> Result<()> {
142    ///     let mut list = client.list_deployments()
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_deployments(&self) -> super::builder::config::ListDeployments {
152        super::builder::config::ListDeployments::new(self.inner.clone())
153    }
154
155    /// Gets details about a [Deployment][google.cloud.config.v1.Deployment].
156    ///
157    /// [google.cloud.config.v1.Deployment]: crate::model::Deployment
158    ///
159    /// # Example
160    /// ```
161    /// # use google_cloud_config_v1::client::Config;
162    /// use google_cloud_config_v1::Result;
163    /// async fn sample(
164    ///    client: &Config, name: &str
165    /// ) -> Result<()> {
166    ///     let response = client.get_deployment()
167    ///         .set_name(name)
168    ///         .send().await?;
169    ///     println!("response {:?}", response);
170    ///     Ok(())
171    /// }
172    /// ```
173    pub fn get_deployment(&self) -> super::builder::config::GetDeployment {
174        super::builder::config::GetDeployment::new(self.inner.clone())
175    }
176
177    /// Creates a [Deployment][google.cloud.config.v1.Deployment].
178    ///
179    /// [google.cloud.config.v1.Deployment]: crate::model::Deployment
180    ///
181    /// # Long running operations
182    ///
183    /// This method is used to start, and/or poll a [long-running Operation].
184    /// The [Working with long-running operations] chapter in the [user guide]
185    /// covers these operations in detail.
186    ///
187    /// [long-running operation]: https://google.aip.dev/151
188    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
189    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
190    ///
191    /// # Example
192    /// ```
193    /// # use google_cloud_config_v1::client::Config;
194    /// use google_cloud_lro::Poller;
195    /// use google_cloud_config_v1::model::Deployment;
196    /// use google_cloud_config_v1::Result;
197    /// async fn sample(
198    ///    client: &Config, parent: &str
199    /// ) -> Result<()> {
200    ///     let response = client.create_deployment()
201    ///         .set_parent(parent)
202    ///         .set_deployment_id("deployment_id_value")
203    ///         .set_deployment(
204    ///             Deployment::new()/* set fields */
205    ///         )
206    ///         .poller().until_done().await?;
207    ///     println!("response {:?}", response);
208    ///     Ok(())
209    /// }
210    /// ```
211    pub fn create_deployment(&self) -> super::builder::config::CreateDeployment {
212        super::builder::config::CreateDeployment::new(self.inner.clone())
213    }
214
215    /// Updates a [Deployment][google.cloud.config.v1.Deployment].
216    ///
217    /// [google.cloud.config.v1.Deployment]: crate::model::Deployment
218    ///
219    /// # Long running operations
220    ///
221    /// This method is used to start, and/or poll a [long-running Operation].
222    /// The [Working with long-running operations] chapter in the [user guide]
223    /// covers these operations in detail.
224    ///
225    /// [long-running operation]: https://google.aip.dev/151
226    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
227    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
228    ///
229    /// # Example
230    /// ```
231    /// # use google_cloud_config_v1::client::Config;
232    /// use google_cloud_lro::Poller;
233    /// # extern crate wkt as google_cloud_wkt;
234    /// use google_cloud_wkt::FieldMask;
235    /// use google_cloud_config_v1::model::Deployment;
236    /// use google_cloud_config_v1::Result;
237    /// async fn sample(
238    ///    client: &Config, name: &str
239    /// ) -> Result<()> {
240    ///     let response = client.update_deployment()
241    ///         .set_deployment(
242    ///             Deployment::new().set_name(name)/* set fields */
243    ///         )
244    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
245    ///         .poller().until_done().await?;
246    ///     println!("response {:?}", response);
247    ///     Ok(())
248    /// }
249    /// ```
250    pub fn update_deployment(&self) -> super::builder::config::UpdateDeployment {
251        super::builder::config::UpdateDeployment::new(self.inner.clone())
252    }
253
254    /// Deletes a [Deployment][google.cloud.config.v1.Deployment].
255    ///
256    /// [google.cloud.config.v1.Deployment]: crate::model::Deployment
257    ///
258    /// # Long running operations
259    ///
260    /// This method is used to start, and/or poll a [long-running Operation].
261    /// The [Working with long-running operations] chapter in the [user guide]
262    /// covers these operations in detail.
263    ///
264    /// [long-running operation]: https://google.aip.dev/151
265    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
266    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
267    ///
268    /// # Example
269    /// ```
270    /// # use google_cloud_config_v1::client::Config;
271    /// use google_cloud_lro::Poller;
272    /// use google_cloud_config_v1::Result;
273    /// async fn sample(
274    ///    client: &Config, name: &str
275    /// ) -> Result<()> {
276    ///     let response = client.delete_deployment()
277    ///         .set_name(name)
278    ///         .poller().until_done().await?;
279    ///     println!("response {:?}", response);
280    ///     Ok(())
281    /// }
282    /// ```
283    pub fn delete_deployment(&self) -> super::builder::config::DeleteDeployment {
284        super::builder::config::DeleteDeployment::new(self.inner.clone())
285    }
286
287    /// Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.
288    ///
289    /// [google.cloud.config.v1.Revision]: crate::model::Revision
290    ///
291    /// # Example
292    /// ```
293    /// # use google_cloud_config_v1::client::Config;
294    /// use google_cloud_gax::paginator::ItemPaginator as _;
295    /// use google_cloud_config_v1::Result;
296    /// async fn sample(
297    ///    client: &Config, parent: &str
298    /// ) -> Result<()> {
299    ///     let mut list = client.list_revisions()
300    ///         .set_parent(parent)
301    ///         .by_item();
302    ///     while let Some(item) = list.next().await.transpose()? {
303    ///         println!("{:?}", item);
304    ///     }
305    ///     Ok(())
306    /// }
307    /// ```
308    pub fn list_revisions(&self) -> super::builder::config::ListRevisions {
309        super::builder::config::ListRevisions::new(self.inner.clone())
310    }
311
312    /// Gets details about a [Revision][google.cloud.config.v1.Revision].
313    ///
314    /// [google.cloud.config.v1.Revision]: crate::model::Revision
315    ///
316    /// # Example
317    /// ```
318    /// # use google_cloud_config_v1::client::Config;
319    /// use google_cloud_config_v1::Result;
320    /// async fn sample(
321    ///    client: &Config, name: &str
322    /// ) -> Result<()> {
323    ///     let response = client.get_revision()
324    ///         .set_name(name)
325    ///         .send().await?;
326    ///     println!("response {:?}", response);
327    ///     Ok(())
328    /// }
329    /// ```
330    pub fn get_revision(&self) -> super::builder::config::GetRevision {
331        super::builder::config::GetRevision::new(self.inner.clone())
332    }
333
334    /// Gets details about a [Resource][google.cloud.config.v1.Resource] deployed
335    /// by Infra Manager.
336    ///
337    /// [google.cloud.config.v1.Resource]: crate::model::Resource
338    ///
339    /// # Example
340    /// ```
341    /// # use google_cloud_config_v1::client::Config;
342    /// use google_cloud_config_v1::Result;
343    /// async fn sample(
344    ///    client: &Config, name: &str
345    /// ) -> Result<()> {
346    ///     let response = client.get_resource()
347    ///         .set_name(name)
348    ///         .send().await?;
349    ///     println!("response {:?}", response);
350    ///     Ok(())
351    /// }
352    /// ```
353    pub fn get_resource(&self) -> super::builder::config::GetResource {
354        super::builder::config::GetResource::new(self.inner.clone())
355    }
356
357    /// Lists [Resources][google.cloud.config.v1.Resource] in a given revision.
358    ///
359    /// [google.cloud.config.v1.Resource]: crate::model::Resource
360    ///
361    /// # Example
362    /// ```
363    /// # use google_cloud_config_v1::client::Config;
364    /// use google_cloud_gax::paginator::ItemPaginator as _;
365    /// use google_cloud_config_v1::Result;
366    /// async fn sample(
367    ///    client: &Config, parent: &str
368    /// ) -> Result<()> {
369    ///     let mut list = client.list_resources()
370    ///         .set_parent(parent)
371    ///         .by_item();
372    ///     while let Some(item) = list.next().await.transpose()? {
373    ///         println!("{:?}", item);
374    ///     }
375    ///     Ok(())
376    /// }
377    /// ```
378    pub fn list_resources(&self) -> super::builder::config::ListResources {
379        super::builder::config::ListResources::new(self.inner.clone())
380    }
381
382    /// Exports Terraform state file from a given deployment.
383    ///
384    /// # Example
385    /// ```
386    /// # use google_cloud_config_v1::client::Config;
387    /// use google_cloud_config_v1::Result;
388    /// async fn sample(
389    ///    client: &Config
390    /// ) -> Result<()> {
391    ///     let response = client.export_deployment_statefile()
392    ///         /* set fields */
393    ///         .send().await?;
394    ///     println!("response {:?}", response);
395    ///     Ok(())
396    /// }
397    /// ```
398    pub fn export_deployment_statefile(&self) -> super::builder::config::ExportDeploymentStatefile {
399        super::builder::config::ExportDeploymentStatefile::new(self.inner.clone())
400    }
401
402    /// Exports Terraform state file from a given revision.
403    ///
404    /// # Example
405    /// ```
406    /// # use google_cloud_config_v1::client::Config;
407    /// use google_cloud_config_v1::Result;
408    /// async fn sample(
409    ///    client: &Config
410    /// ) -> Result<()> {
411    ///     let response = client.export_revision_statefile()
412    ///         /* set fields */
413    ///         .send().await?;
414    ///     println!("response {:?}", response);
415    ///     Ok(())
416    /// }
417    /// ```
418    pub fn export_revision_statefile(&self) -> super::builder::config::ExportRevisionStatefile {
419        super::builder::config::ExportRevisionStatefile::new(self.inner.clone())
420    }
421
422    /// Imports Terraform state file in a given deployment. The state file does not
423    /// take effect until the Deployment has been unlocked.
424    ///
425    /// # Example
426    /// ```
427    /// # use google_cloud_config_v1::client::Config;
428    /// use google_cloud_config_v1::Result;
429    /// async fn sample(
430    ///    client: &Config
431    /// ) -> Result<()> {
432    ///     let response = client.import_statefile()
433    ///         /* set fields */
434    ///         .send().await?;
435    ///     println!("response {:?}", response);
436    ///     Ok(())
437    /// }
438    /// ```
439    pub fn import_statefile(&self) -> super::builder::config::ImportStatefile {
440        super::builder::config::ImportStatefile::new(self.inner.clone())
441    }
442
443    /// Deletes Terraform state file in a given deployment.
444    ///
445    /// # Example
446    /// ```
447    /// # use google_cloud_config_v1::client::Config;
448    /// use google_cloud_config_v1::Result;
449    /// async fn sample(
450    ///    client: &Config, name: &str
451    /// ) -> Result<()> {
452    ///     client.delete_statefile()
453    ///         .set_name(name)
454    ///         .send().await?;
455    ///     Ok(())
456    /// }
457    /// ```
458    pub fn delete_statefile(&self) -> super::builder::config::DeleteStatefile {
459        super::builder::config::DeleteStatefile::new(self.inner.clone())
460    }
461
462    /// Locks a deployment.
463    ///
464    /// # Long running operations
465    ///
466    /// This method is used to start, and/or poll a [long-running Operation].
467    /// The [Working with long-running operations] chapter in the [user guide]
468    /// covers these operations in detail.
469    ///
470    /// [long-running operation]: https://google.aip.dev/151
471    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
472    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
473    ///
474    /// # Example
475    /// ```
476    /// # use google_cloud_config_v1::client::Config;
477    /// use google_cloud_lro::Poller;
478    /// use google_cloud_config_v1::Result;
479    /// async fn sample(
480    ///    client: &Config
481    /// ) -> Result<()> {
482    ///     let response = client.lock_deployment()
483    ///         /* set fields */
484    ///         .poller().until_done().await?;
485    ///     println!("response {:?}", response);
486    ///     Ok(())
487    /// }
488    /// ```
489    pub fn lock_deployment(&self) -> super::builder::config::LockDeployment {
490        super::builder::config::LockDeployment::new(self.inner.clone())
491    }
492
493    /// Unlocks a locked deployment.
494    ///
495    /// # Long running operations
496    ///
497    /// This method is used to start, and/or poll a [long-running Operation].
498    /// The [Working with long-running operations] chapter in the [user guide]
499    /// covers these operations in detail.
500    ///
501    /// [long-running operation]: https://google.aip.dev/151
502    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
503    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
504    ///
505    /// # Example
506    /// ```
507    /// # use google_cloud_config_v1::client::Config;
508    /// use google_cloud_lro::Poller;
509    /// use google_cloud_config_v1::Result;
510    /// async fn sample(
511    ///    client: &Config
512    /// ) -> Result<()> {
513    ///     let response = client.unlock_deployment()
514    ///         /* set fields */
515    ///         .poller().until_done().await?;
516    ///     println!("response {:?}", response);
517    ///     Ok(())
518    /// }
519    /// ```
520    pub fn unlock_deployment(&self) -> super::builder::config::UnlockDeployment {
521        super::builder::config::UnlockDeployment::new(self.inner.clone())
522    }
523
524    /// Exports the lock info on a locked deployment.
525    ///
526    /// # Example
527    /// ```
528    /// # use google_cloud_config_v1::client::Config;
529    /// use google_cloud_config_v1::Result;
530    /// async fn sample(
531    ///    client: &Config
532    /// ) -> Result<()> {
533    ///     let response = client.export_lock_info()
534    ///         /* set fields */
535    ///         .send().await?;
536    ///     println!("response {:?}", response);
537    ///     Ok(())
538    /// }
539    /// ```
540    pub fn export_lock_info(&self) -> super::builder::config::ExportLockInfo {
541        super::builder::config::ExportLockInfo::new(self.inner.clone())
542    }
543
544    /// Creates a [Preview][google.cloud.config.v1.Preview].
545    ///
546    /// [google.cloud.config.v1.Preview]: crate::model::Preview
547    ///
548    /// # Long running operations
549    ///
550    /// This method is used to start, and/or poll a [long-running Operation].
551    /// The [Working with long-running operations] chapter in the [user guide]
552    /// covers these operations in detail.
553    ///
554    /// [long-running operation]: https://google.aip.dev/151
555    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
556    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
557    ///
558    /// # Example
559    /// ```
560    /// # use google_cloud_config_v1::client::Config;
561    /// use google_cloud_lro::Poller;
562    /// use google_cloud_config_v1::model::Preview;
563    /// use google_cloud_config_v1::Result;
564    /// async fn sample(
565    ///    client: &Config, parent: &str
566    /// ) -> Result<()> {
567    ///     let response = client.create_preview()
568    ///         .set_parent(parent)
569    ///         .set_preview_id("preview_id_value")
570    ///         .set_preview(
571    ///             Preview::new()/* set fields */
572    ///         )
573    ///         .poller().until_done().await?;
574    ///     println!("response {:?}", response);
575    ///     Ok(())
576    /// }
577    /// ```
578    pub fn create_preview(&self) -> super::builder::config::CreatePreview {
579        super::builder::config::CreatePreview::new(self.inner.clone())
580    }
581
582    /// Gets details about a [Preview][google.cloud.config.v1.Preview].
583    ///
584    /// [google.cloud.config.v1.Preview]: crate::model::Preview
585    ///
586    /// # Example
587    /// ```
588    /// # use google_cloud_config_v1::client::Config;
589    /// use google_cloud_config_v1::Result;
590    /// async fn sample(
591    ///    client: &Config, name: &str
592    /// ) -> Result<()> {
593    ///     let response = client.get_preview()
594    ///         .set_name(name)
595    ///         .send().await?;
596    ///     println!("response {:?}", response);
597    ///     Ok(())
598    /// }
599    /// ```
600    pub fn get_preview(&self) -> super::builder::config::GetPreview {
601        super::builder::config::GetPreview::new(self.inner.clone())
602    }
603
604    /// Lists [Preview][google.cloud.config.v1.Preview]s in a given project and
605    /// location.
606    ///
607    /// [google.cloud.config.v1.Preview]: crate::model::Preview
608    ///
609    /// # Example
610    /// ```
611    /// # use google_cloud_config_v1::client::Config;
612    /// use google_cloud_gax::paginator::ItemPaginator as _;
613    /// use google_cloud_config_v1::Result;
614    /// async fn sample(
615    ///    client: &Config, parent: &str
616    /// ) -> Result<()> {
617    ///     let mut list = client.list_previews()
618    ///         .set_parent(parent)
619    ///         .by_item();
620    ///     while let Some(item) = list.next().await.transpose()? {
621    ///         println!("{:?}", item);
622    ///     }
623    ///     Ok(())
624    /// }
625    /// ```
626    pub fn list_previews(&self) -> super::builder::config::ListPreviews {
627        super::builder::config::ListPreviews::new(self.inner.clone())
628    }
629
630    /// Deletes a [Preview][google.cloud.config.v1.Preview].
631    ///
632    /// [google.cloud.config.v1.Preview]: crate::model::Preview
633    ///
634    /// # Long running operations
635    ///
636    /// This method is used to start, and/or poll a [long-running Operation].
637    /// The [Working with long-running operations] chapter in the [user guide]
638    /// covers these operations in detail.
639    ///
640    /// [long-running operation]: https://google.aip.dev/151
641    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
642    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
643    ///
644    /// # Example
645    /// ```
646    /// # use google_cloud_config_v1::client::Config;
647    /// use google_cloud_lro::Poller;
648    /// use google_cloud_config_v1::Result;
649    /// async fn sample(
650    ///    client: &Config, name: &str
651    /// ) -> Result<()> {
652    ///     let response = client.delete_preview()
653    ///         .set_name(name)
654    ///         .poller().until_done().await?;
655    ///     println!("response {:?}", response);
656    ///     Ok(())
657    /// }
658    /// ```
659    pub fn delete_preview(&self) -> super::builder::config::DeletePreview {
660        super::builder::config::DeletePreview::new(self.inner.clone())
661    }
662
663    /// Export [Preview][google.cloud.config.v1.Preview] results.
664    ///
665    /// [google.cloud.config.v1.Preview]: crate::model::Preview
666    ///
667    /// # Example
668    /// ```
669    /// # use google_cloud_config_v1::client::Config;
670    /// use google_cloud_config_v1::Result;
671    /// async fn sample(
672    ///    client: &Config
673    /// ) -> Result<()> {
674    ///     let response = client.export_preview_result()
675    ///         /* set fields */
676    ///         .send().await?;
677    ///     println!("response {:?}", response);
678    ///     Ok(())
679    /// }
680    /// ```
681    pub fn export_preview_result(&self) -> super::builder::config::ExportPreviewResult {
682        super::builder::config::ExportPreviewResult::new(self.inner.clone())
683    }
684
685    /// Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a
686    /// given project and location.
687    ///
688    /// [google.cloud.config.v1.TerraformVersion]: crate::model::TerraformVersion
689    ///
690    /// # Example
691    /// ```
692    /// # use google_cloud_config_v1::client::Config;
693    /// use google_cloud_gax::paginator::ItemPaginator as _;
694    /// use google_cloud_config_v1::Result;
695    /// async fn sample(
696    ///    client: &Config, parent: &str
697    /// ) -> Result<()> {
698    ///     let mut list = client.list_terraform_versions()
699    ///         .set_parent(parent)
700    ///         .by_item();
701    ///     while let Some(item) = list.next().await.transpose()? {
702    ///         println!("{:?}", item);
703    ///     }
704    ///     Ok(())
705    /// }
706    /// ```
707    pub fn list_terraform_versions(&self) -> super::builder::config::ListTerraformVersions {
708        super::builder::config::ListTerraformVersions::new(self.inner.clone())
709    }
710
711    /// Gets details about a
712    /// [TerraformVersion][google.cloud.config.v1.TerraformVersion].
713    ///
714    /// [google.cloud.config.v1.TerraformVersion]: crate::model::TerraformVersion
715    ///
716    /// # Example
717    /// ```
718    /// # use google_cloud_config_v1::client::Config;
719    /// use google_cloud_config_v1::Result;
720    /// async fn sample(
721    ///    client: &Config, name: &str
722    /// ) -> Result<()> {
723    ///     let response = client.get_terraform_version()
724    ///         .set_name(name)
725    ///         .send().await?;
726    ///     println!("response {:?}", response);
727    ///     Ok(())
728    /// }
729    /// ```
730    pub fn get_terraform_version(&self) -> super::builder::config::GetTerraformVersion {
731        super::builder::config::GetTerraformVersion::new(self.inner.clone())
732    }
733
734    /// Lists ResourceChanges for a given preview.
735    ///
736    /// # Example
737    /// ```
738    /// # use google_cloud_config_v1::client::Config;
739    /// use google_cloud_gax::paginator::ItemPaginator as _;
740    /// use google_cloud_config_v1::Result;
741    /// async fn sample(
742    ///    client: &Config, parent: &str
743    /// ) -> Result<()> {
744    ///     let mut list = client.list_resource_changes()
745    ///         .set_parent(parent)
746    ///         .by_item();
747    ///     while let Some(item) = list.next().await.transpose()? {
748    ///         println!("{:?}", item);
749    ///     }
750    ///     Ok(())
751    /// }
752    /// ```
753    pub fn list_resource_changes(&self) -> super::builder::config::ListResourceChanges {
754        super::builder::config::ListResourceChanges::new(self.inner.clone())
755    }
756
757    /// Get a ResourceChange for a given preview.
758    ///
759    /// # Example
760    /// ```
761    /// # use google_cloud_config_v1::client::Config;
762    /// use google_cloud_config_v1::Result;
763    /// async fn sample(
764    ///    client: &Config, name: &str
765    /// ) -> Result<()> {
766    ///     let response = client.get_resource_change()
767    ///         .set_name(name)
768    ///         .send().await?;
769    ///     println!("response {:?}", response);
770    ///     Ok(())
771    /// }
772    /// ```
773    pub fn get_resource_change(&self) -> super::builder::config::GetResourceChange {
774        super::builder::config::GetResourceChange::new(self.inner.clone())
775    }
776
777    /// List ResourceDrifts for a given preview.
778    ///
779    /// # Example
780    /// ```
781    /// # use google_cloud_config_v1::client::Config;
782    /// use google_cloud_gax::paginator::ItemPaginator as _;
783    /// use google_cloud_config_v1::Result;
784    /// async fn sample(
785    ///    client: &Config, parent: &str
786    /// ) -> Result<()> {
787    ///     let mut list = client.list_resource_drifts()
788    ///         .set_parent(parent)
789    ///         .by_item();
790    ///     while let Some(item) = list.next().await.transpose()? {
791    ///         println!("{:?}", item);
792    ///     }
793    ///     Ok(())
794    /// }
795    /// ```
796    pub fn list_resource_drifts(&self) -> super::builder::config::ListResourceDrifts {
797        super::builder::config::ListResourceDrifts::new(self.inner.clone())
798    }
799
800    /// Get a ResourceDrift for a given preview.
801    ///
802    /// # Example
803    /// ```
804    /// # use google_cloud_config_v1::client::Config;
805    /// use google_cloud_config_v1::Result;
806    /// async fn sample(
807    ///    client: &Config, name: &str
808    /// ) -> Result<()> {
809    ///     let response = client.get_resource_drift()
810    ///         .set_name(name)
811    ///         .send().await?;
812    ///     println!("response {:?}", response);
813    ///     Ok(())
814    /// }
815    /// ```
816    pub fn get_resource_drift(&self) -> super::builder::config::GetResourceDrift {
817        super::builder::config::GetResourceDrift::new(self.inner.clone())
818    }
819
820    /// Get the AutoMigrationConfig for a given project and location.
821    ///
822    /// # Example
823    /// ```
824    /// # use google_cloud_config_v1::client::Config;
825    /// use google_cloud_config_v1::Result;
826    /// async fn sample(
827    ///    client: &Config, name: &str
828    /// ) -> Result<()> {
829    ///     let response = client.get_auto_migration_config()
830    ///         .set_name(name)
831    ///         .send().await?;
832    ///     println!("response {:?}", response);
833    ///     Ok(())
834    /// }
835    /// ```
836    pub fn get_auto_migration_config(&self) -> super::builder::config::GetAutoMigrationConfig {
837        super::builder::config::GetAutoMigrationConfig::new(self.inner.clone())
838    }
839
840    /// Updates the AutoMigrationConfig for a given project and location.
841    ///
842    /// # Long running operations
843    ///
844    /// This method is used to start, and/or poll a [long-running Operation].
845    /// The [Working with long-running operations] chapter in the [user guide]
846    /// covers these operations in detail.
847    ///
848    /// [long-running operation]: https://google.aip.dev/151
849    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
850    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
851    ///
852    /// # Example
853    /// ```
854    /// # use google_cloud_config_v1::client::Config;
855    /// use google_cloud_lro::Poller;
856    /// # extern crate wkt as google_cloud_wkt;
857    /// use google_cloud_wkt::FieldMask;
858    /// use google_cloud_config_v1::model::AutoMigrationConfig;
859    /// use google_cloud_config_v1::Result;
860    /// async fn sample(
861    ///    client: &Config, name: &str
862    /// ) -> Result<()> {
863    ///     let response = client.update_auto_migration_config()
864    ///         .set_auto_migration_config(
865    ///             AutoMigrationConfig::new().set_name(name)/* set fields */
866    ///         )
867    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
868    ///         .poller().until_done().await?;
869    ///     println!("response {:?}", response);
870    ///     Ok(())
871    /// }
872    /// ```
873    pub fn update_auto_migration_config(
874        &self,
875    ) -> super::builder::config::UpdateAutoMigrationConfig {
876        super::builder::config::UpdateAutoMigrationConfig::new(self.inner.clone())
877    }
878
879    /// Get a DeploymentGroup for a given project and location.
880    ///
881    /// # Example
882    /// ```
883    /// # use google_cloud_config_v1::client::Config;
884    /// use google_cloud_config_v1::Result;
885    /// async fn sample(
886    ///    client: &Config, name: &str
887    /// ) -> Result<()> {
888    ///     let response = client.get_deployment_group()
889    ///         .set_name(name)
890    ///         .send().await?;
891    ///     println!("response {:?}", response);
892    ///     Ok(())
893    /// }
894    /// ```
895    pub fn get_deployment_group(&self) -> super::builder::config::GetDeploymentGroup {
896        super::builder::config::GetDeploymentGroup::new(self.inner.clone())
897    }
898
899    /// Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]
900    /// The newly created DeploymentGroup will be in the `CREATING` state
901    /// and can be retrieved via Get and List calls.
902    ///
903    /// [google.cloud.config.v1.DeploymentGroup]: crate::model::DeploymentGroup
904    ///
905    /// # Long running operations
906    ///
907    /// This method is used to start, and/or poll a [long-running Operation].
908    /// The [Working with long-running operations] chapter in the [user guide]
909    /// covers these operations in detail.
910    ///
911    /// [long-running operation]: https://google.aip.dev/151
912    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
913    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
914    ///
915    /// # Example
916    /// ```
917    /// # use google_cloud_config_v1::client::Config;
918    /// use google_cloud_lro::Poller;
919    /// use google_cloud_config_v1::model::DeploymentGroup;
920    /// use google_cloud_config_v1::Result;
921    /// async fn sample(
922    ///    client: &Config, parent: &str
923    /// ) -> Result<()> {
924    ///     let response = client.create_deployment_group()
925    ///         .set_parent(parent)
926    ///         .set_deployment_group(
927    ///             DeploymentGroup::new()/* set fields */
928    ///         )
929    ///         .poller().until_done().await?;
930    ///     println!("response {:?}", response);
931    ///     Ok(())
932    /// }
933    /// ```
934    pub fn create_deployment_group(&self) -> super::builder::config::CreateDeploymentGroup {
935        super::builder::config::CreateDeploymentGroup::new(self.inner.clone())
936    }
937
938    /// Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]
939    ///
940    /// [google.cloud.config.v1.DeploymentGroup]: crate::model::DeploymentGroup
941    ///
942    /// # Long running operations
943    ///
944    /// This method is used to start, and/or poll a [long-running Operation].
945    /// The [Working with long-running operations] chapter in the [user guide]
946    /// covers these operations in detail.
947    ///
948    /// [long-running operation]: https://google.aip.dev/151
949    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
950    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
951    ///
952    /// # Example
953    /// ```
954    /// # use google_cloud_config_v1::client::Config;
955    /// use google_cloud_lro::Poller;
956    /// # extern crate wkt as google_cloud_wkt;
957    /// use google_cloud_wkt::FieldMask;
958    /// use google_cloud_config_v1::model::DeploymentGroup;
959    /// use google_cloud_config_v1::Result;
960    /// async fn sample(
961    ///    client: &Config, name: &str
962    /// ) -> Result<()> {
963    ///     let response = client.update_deployment_group()
964    ///         .set_deployment_group(
965    ///             DeploymentGroup::new().set_name(name)/* set fields */
966    ///         )
967    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
968    ///         .poller().until_done().await?;
969    ///     println!("response {:?}", response);
970    ///     Ok(())
971    /// }
972    /// ```
973    pub fn update_deployment_group(&self) -> super::builder::config::UpdateDeploymentGroup {
974        super::builder::config::UpdateDeploymentGroup::new(self.inner.clone())
975    }
976
977    /// Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]
978    ///
979    /// [google.cloud.config.v1.DeploymentGroup]: crate::model::DeploymentGroup
980    ///
981    /// # Long running operations
982    ///
983    /// This method is used to start, and/or poll a [long-running Operation].
984    /// The [Working with long-running operations] chapter in the [user guide]
985    /// covers these operations in detail.
986    ///
987    /// [long-running operation]: https://google.aip.dev/151
988    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
989    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
990    ///
991    /// # Example
992    /// ```
993    /// # use google_cloud_config_v1::client::Config;
994    /// use google_cloud_lro::Poller;
995    /// use google_cloud_config_v1::Result;
996    /// async fn sample(
997    ///    client: &Config, name: &str
998    /// ) -> Result<()> {
999    ///     let response = client.delete_deployment_group()
1000    ///         .set_name(name)
1001    ///         .poller().until_done().await?;
1002    ///     println!("response {:?}", response);
1003    ///     Ok(())
1004    /// }
1005    /// ```
1006    pub fn delete_deployment_group(&self) -> super::builder::config::DeleteDeploymentGroup {
1007        super::builder::config::DeleteDeploymentGroup::new(self.inner.clone())
1008    }
1009
1010    /// List DeploymentGroups for a given project and location.
1011    ///
1012    /// # Example
1013    /// ```
1014    /// # use google_cloud_config_v1::client::Config;
1015    /// use google_cloud_gax::paginator::ItemPaginator as _;
1016    /// use google_cloud_config_v1::Result;
1017    /// async fn sample(
1018    ///    client: &Config, parent: &str
1019    /// ) -> Result<()> {
1020    ///     let mut list = client.list_deployment_groups()
1021    ///         .set_parent(parent)
1022    ///         .by_item();
1023    ///     while let Some(item) = list.next().await.transpose()? {
1024    ///         println!("{:?}", item);
1025    ///     }
1026    ///     Ok(())
1027    /// }
1028    /// ```
1029    pub fn list_deployment_groups(&self) -> super::builder::config::ListDeploymentGroups {
1030        super::builder::config::ListDeploymentGroups::new(self.inner.clone())
1031    }
1032
1033    /// Provisions a deployment group.
1034    ///
1035    /// NOTE: As a first step of this operation, Infra Manager will
1036    /// automatically delete any Deployments that were part of the
1037    /// *last successful*
1038    /// [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]
1039    /// but are *no longer* included in the *current*
1040    /// [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g.,
1041    /// following an `UpdateDeploymentGroup` call), along with their actuated
1042    /// resources.
1043    ///
1044    /// [google.cloud.config.v1.DeploymentGroup]: crate::model::DeploymentGroup
1045    /// [google.cloud.config.v1.DeploymentGroupRevision]: crate::model::DeploymentGroupRevision
1046    ///
1047    /// # Long running operations
1048    ///
1049    /// This method is used to start, and/or poll a [long-running Operation].
1050    /// The [Working with long-running operations] chapter in the [user guide]
1051    /// covers these operations in detail.
1052    ///
1053    /// [long-running operation]: https://google.aip.dev/151
1054    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1055    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1056    ///
1057    /// # Example
1058    /// ```
1059    /// # use google_cloud_config_v1::client::Config;
1060    /// use google_cloud_lro::Poller;
1061    /// use google_cloud_config_v1::Result;
1062    /// async fn sample(
1063    ///    client: &Config
1064    /// ) -> Result<()> {
1065    ///     let response = client.provision_deployment_group()
1066    ///         /* set fields */
1067    ///         .poller().until_done().await?;
1068    ///     println!("response {:?}", response);
1069    ///     Ok(())
1070    /// }
1071    /// ```
1072    pub fn provision_deployment_group(&self) -> super::builder::config::ProvisionDeploymentGroup {
1073        super::builder::config::ProvisionDeploymentGroup::new(self.inner.clone())
1074    }
1075
1076    /// Deprovisions a deployment group.
1077    ///
1078    /// NOTE: As a first step of this operation, Infra Manager will
1079    /// automatically delete any Deployments that were part of the
1080    /// *last successful*
1081    /// [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]
1082    /// but are *no longer* included in the *current*
1083    /// [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g.,
1084    /// following an `UpdateDeploymentGroup` call), along with their actuated
1085    /// resources.
1086    ///
1087    /// [google.cloud.config.v1.DeploymentGroup]: crate::model::DeploymentGroup
1088    /// [google.cloud.config.v1.DeploymentGroupRevision]: crate::model::DeploymentGroupRevision
1089    ///
1090    /// # Long running operations
1091    ///
1092    /// This method is used to start, and/or poll a [long-running Operation].
1093    /// The [Working with long-running operations] chapter in the [user guide]
1094    /// covers these operations in detail.
1095    ///
1096    /// [long-running operation]: https://google.aip.dev/151
1097    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1098    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1099    ///
1100    /// # Example
1101    /// ```
1102    /// # use google_cloud_config_v1::client::Config;
1103    /// use google_cloud_lro::Poller;
1104    /// use google_cloud_config_v1::Result;
1105    /// async fn sample(
1106    ///    client: &Config
1107    /// ) -> Result<()> {
1108    ///     let response = client.deprovision_deployment_group()
1109    ///         /* set fields */
1110    ///         .poller().until_done().await?;
1111    ///     println!("response {:?}", response);
1112    ///     Ok(())
1113    /// }
1114    /// ```
1115    pub fn deprovision_deployment_group(
1116        &self,
1117    ) -> super::builder::config::DeprovisionDeploymentGroup {
1118        super::builder::config::DeprovisionDeploymentGroup::new(self.inner.clone())
1119    }
1120
1121    /// Gets details about a
1122    /// [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].
1123    ///
1124    /// [google.cloud.config.v1.DeploymentGroupRevision]: crate::model::DeploymentGroupRevision
1125    ///
1126    /// # Example
1127    /// ```
1128    /// # use google_cloud_config_v1::client::Config;
1129    /// use google_cloud_config_v1::Result;
1130    /// async fn sample(
1131    ///    client: &Config, name: &str
1132    /// ) -> Result<()> {
1133    ///     let response = client.get_deployment_group_revision()
1134    ///         .set_name(name)
1135    ///         .send().await?;
1136    ///     println!("response {:?}", response);
1137    ///     Ok(())
1138    /// }
1139    /// ```
1140    pub fn get_deployment_group_revision(
1141        &self,
1142    ) -> super::builder::config::GetDeploymentGroupRevision {
1143        super::builder::config::GetDeploymentGroupRevision::new(self.inner.clone())
1144    }
1145
1146    /// Lists
1147    /// [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s
1148    /// in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].
1149    ///
1150    /// [google.cloud.config.v1.DeploymentGroup]: crate::model::DeploymentGroup
1151    /// [google.cloud.config.v1.DeploymentGroupRevision]: crate::model::DeploymentGroupRevision
1152    ///
1153    /// # Example
1154    /// ```
1155    /// # use google_cloud_config_v1::client::Config;
1156    /// use google_cloud_gax::paginator::ItemPaginator as _;
1157    /// use google_cloud_config_v1::Result;
1158    /// async fn sample(
1159    ///    client: &Config, parent: &str
1160    /// ) -> Result<()> {
1161    ///     let mut list = client.list_deployment_group_revisions()
1162    ///         .set_parent(parent)
1163    ///         .by_item();
1164    ///     while let Some(item) = list.next().await.transpose()? {
1165    ///         println!("{:?}", item);
1166    ///     }
1167    ///     Ok(())
1168    /// }
1169    /// ```
1170    pub fn list_deployment_group_revisions(
1171        &self,
1172    ) -> super::builder::config::ListDeploymentGroupRevisions {
1173        super::builder::config::ListDeploymentGroupRevisions::new(self.inner.clone())
1174    }
1175
1176    /// Lists information about the supported locations for this service.
1177    ///
1178    /// This method lists locations based on the resource scope provided in
1179    /// the [ListLocationsRequest.name] field:
1180    ///
1181    /// * **Global locations**: If `name` is empty, the method lists the
1182    ///   public locations available to all projects. * **Project-specific
1183    ///   locations**: If `name` follows the format
1184    ///   `projects/{project}`, the method lists locations visible to that
1185    ///   specific project. This includes public, private, or other
1186    ///   project-specific locations enabled for the project.
1187    ///
1188    /// For gRPC and client library implementations, the resource name is
1189    /// passed as the `name` field. For direct service calls, the resource
1190    /// name is
1191    /// incorporated into the request path based on the specific service
1192    /// implementation and version.
1193    ///
1194    /// # Example
1195    /// ```
1196    /// # use google_cloud_config_v1::client::Config;
1197    /// use google_cloud_gax::paginator::ItemPaginator as _;
1198    /// use google_cloud_config_v1::Result;
1199    /// async fn sample(
1200    ///    client: &Config
1201    /// ) -> Result<()> {
1202    ///     let mut list = client.list_locations()
1203    ///         /* set fields */
1204    ///         .by_item();
1205    ///     while let Some(item) = list.next().await.transpose()? {
1206    ///         println!("{:?}", item);
1207    ///     }
1208    ///     Ok(())
1209    /// }
1210    /// ```
1211    pub fn list_locations(&self) -> super::builder::config::ListLocations {
1212        super::builder::config::ListLocations::new(self.inner.clone())
1213    }
1214
1215    /// Gets information about a location.
1216    ///
1217    /// # Example
1218    /// ```
1219    /// # use google_cloud_config_v1::client::Config;
1220    /// use google_cloud_config_v1::Result;
1221    /// async fn sample(
1222    ///    client: &Config
1223    /// ) -> Result<()> {
1224    ///     let response = client.get_location()
1225    ///         /* set fields */
1226    ///         .send().await?;
1227    ///     println!("response {:?}", response);
1228    ///     Ok(())
1229    /// }
1230    /// ```
1231    pub fn get_location(&self) -> super::builder::config::GetLocation {
1232        super::builder::config::GetLocation::new(self.inner.clone())
1233    }
1234
1235    /// Sets the access control policy on the specified resource. Replaces
1236    /// any existing policy.
1237    ///
1238    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
1239    /// errors.
1240    ///
1241    /// # Example
1242    /// ```
1243    /// # use google_cloud_config_v1::client::Config;
1244    /// use google_cloud_config_v1::Result;
1245    /// async fn sample(
1246    ///    client: &Config
1247    /// ) -> Result<()> {
1248    ///     let response = client.set_iam_policy()
1249    ///         /* set fields */
1250    ///         .send().await?;
1251    ///     println!("response {:?}", response);
1252    ///     Ok(())
1253    /// }
1254    /// ```
1255    pub fn set_iam_policy(&self) -> super::builder::config::SetIamPolicy {
1256        super::builder::config::SetIamPolicy::new(self.inner.clone())
1257    }
1258
1259    /// Gets the access control policy for a resource. Returns an empty policy
1260    /// if the resource exists and does not have a policy set.
1261    ///
1262    /// # Example
1263    /// ```
1264    /// # use google_cloud_config_v1::client::Config;
1265    /// use google_cloud_config_v1::Result;
1266    /// async fn sample(
1267    ///    client: &Config
1268    /// ) -> Result<()> {
1269    ///     let response = client.get_iam_policy()
1270    ///         /* set fields */
1271    ///         .send().await?;
1272    ///     println!("response {:?}", response);
1273    ///     Ok(())
1274    /// }
1275    /// ```
1276    pub fn get_iam_policy(&self) -> super::builder::config::GetIamPolicy {
1277        super::builder::config::GetIamPolicy::new(self.inner.clone())
1278    }
1279
1280    /// Returns permissions that a caller has on the specified resource. If the
1281    /// resource does not exist, this will return an empty set of
1282    /// permissions, not a `NOT_FOUND` error.
1283    ///
1284    /// Note: This operation is designed to be used for building
1285    /// permission-aware UIs and command-line tools, not for authorization
1286    /// checking. This operation may "fail open" without warning.
1287    ///
1288    /// # Example
1289    /// ```
1290    /// # use google_cloud_config_v1::client::Config;
1291    /// use google_cloud_config_v1::Result;
1292    /// async fn sample(
1293    ///    client: &Config
1294    /// ) -> Result<()> {
1295    ///     let response = client.test_iam_permissions()
1296    ///         /* set fields */
1297    ///         .send().await?;
1298    ///     println!("response {:?}", response);
1299    ///     Ok(())
1300    /// }
1301    /// ```
1302    pub fn test_iam_permissions(&self) -> super::builder::config::TestIamPermissions {
1303        super::builder::config::TestIamPermissions::new(self.inner.clone())
1304    }
1305
1306    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1307    ///
1308    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1309    ///
1310    /// # Example
1311    /// ```
1312    /// # use google_cloud_config_v1::client::Config;
1313    /// use google_cloud_gax::paginator::ItemPaginator as _;
1314    /// use google_cloud_config_v1::Result;
1315    /// async fn sample(
1316    ///    client: &Config
1317    /// ) -> Result<()> {
1318    ///     let mut list = client.list_operations()
1319    ///         /* set fields */
1320    ///         .by_item();
1321    ///     while let Some(item) = list.next().await.transpose()? {
1322    ///         println!("{:?}", item);
1323    ///     }
1324    ///     Ok(())
1325    /// }
1326    /// ```
1327    pub fn list_operations(&self) -> super::builder::config::ListOperations {
1328        super::builder::config::ListOperations::new(self.inner.clone())
1329    }
1330
1331    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1332    ///
1333    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1334    ///
1335    /// # Example
1336    /// ```
1337    /// # use google_cloud_config_v1::client::Config;
1338    /// use google_cloud_config_v1::Result;
1339    /// async fn sample(
1340    ///    client: &Config
1341    /// ) -> Result<()> {
1342    ///     let response = client.get_operation()
1343    ///         /* set fields */
1344    ///         .send().await?;
1345    ///     println!("response {:?}", response);
1346    ///     Ok(())
1347    /// }
1348    /// ```
1349    pub fn get_operation(&self) -> super::builder::config::GetOperation {
1350        super::builder::config::GetOperation::new(self.inner.clone())
1351    }
1352
1353    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1354    ///
1355    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1356    ///
1357    /// # Example
1358    /// ```
1359    /// # use google_cloud_config_v1::client::Config;
1360    /// use google_cloud_config_v1::Result;
1361    /// async fn sample(
1362    ///    client: &Config
1363    /// ) -> Result<()> {
1364    ///     client.delete_operation()
1365    ///         /* set fields */
1366    ///         .send().await?;
1367    ///     Ok(())
1368    /// }
1369    /// ```
1370    pub fn delete_operation(&self) -> super::builder::config::DeleteOperation {
1371        super::builder::config::DeleteOperation::new(self.inner.clone())
1372    }
1373
1374    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1375    ///
1376    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1377    ///
1378    /// # Example
1379    /// ```
1380    /// # use google_cloud_config_v1::client::Config;
1381    /// use google_cloud_config_v1::Result;
1382    /// async fn sample(
1383    ///    client: &Config
1384    /// ) -> Result<()> {
1385    ///     client.cancel_operation()
1386    ///         /* set fields */
1387    ///         .send().await?;
1388    ///     Ok(())
1389    /// }
1390    /// ```
1391    pub fn cancel_operation(&self) -> super::builder::config::CancelOperation {
1392        super::builder::config::CancelOperation::new(self.inner.clone())
1393    }
1394}