Skip to main content

google_cloud_developerconnect_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 Developer Connect API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
24/// use google_cloud_gax::paginator::ItemPaginator as _;
25/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
26///     let client = DeveloperConnect::builder().build().await?;
27///     let parent = "parent_value";
28///     let mut list = client.list_connections()
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/// Service describing handlers for resources
40///
41/// # Configuration
42///
43/// To configure `DeveloperConnect` use the `with_*` methods in the type returned
44/// by [builder()][DeveloperConnect::builder]. The default configuration should
45/// work for most applications. Common configuration changes include
46///
47/// * [with_endpoint()]: by default this client uses the global default endpoint
48///   (`https://developerconnect.googleapis.com`). Applications using regional
49///   endpoints or running in restricted networks (e.g. a network configured
50//    with [Private Google Access with VPC Service Controls]) may want to
51///   override this default.
52/// * [with_credentials()]: by default this client uses
53///   [Application Default Credentials]. Applications using custom
54///   authentication may need to override this default.
55///
56/// [with_endpoint()]: super::builder::developer_connect::ClientBuilder::with_endpoint
57/// [with_credentials()]: super::builder::developer_connect::ClientBuilder::with_credentials
58/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
59/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
60///
61/// # Pooling and Cloning
62///
63/// `DeveloperConnect` holds a connection pool internally, it is advised to
64/// create one and reuse it. You do not need to wrap `DeveloperConnect` in
65/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
66/// already uses an `Arc` internally.
67#[derive(Clone, Debug)]
68pub struct DeveloperConnect {
69    inner: std::sync::Arc<dyn super::stub::dynamic::DeveloperConnect>,
70}
71
72impl DeveloperConnect {
73    /// Returns a builder for [DeveloperConnect].
74    ///
75    /// ```
76    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
77    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
78    /// let client = DeveloperConnect::builder().build().await?;
79    /// # Ok(()) }
80    /// ```
81    pub fn builder() -> super::builder::developer_connect::ClientBuilder {
82        crate::new_client_builder(super::builder::developer_connect::client::Factory)
83    }
84
85    /// Creates a new client from the provided stub.
86    ///
87    /// The most common case for calling this function is in tests mocking the
88    /// client's behavior.
89    pub fn from_stub<T>(stub: T) -> Self
90    where
91        T: super::stub::DeveloperConnect + 'static,
92    {
93        Self {
94            inner: std::sync::Arc::new(stub),
95        }
96    }
97
98    pub(crate) async fn new(
99        config: gaxi::options::ClientConfig,
100    ) -> crate::ClientBuilderResult<Self> {
101        let inner = Self::build_inner(config).await?;
102        Ok(Self { inner })
103    }
104
105    async fn build_inner(
106        conf: gaxi::options::ClientConfig,
107    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::DeveloperConnect>>
108    {
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::DeveloperConnect> {
118        super::transport::DeveloperConnect::new(conf).await
119    }
120
121    async fn build_with_tracing(
122        conf: gaxi::options::ClientConfig,
123    ) -> crate::ClientBuilderResult<impl super::stub::DeveloperConnect> {
124        Self::build_transport(conf)
125            .await
126            .map(super::tracing::DeveloperConnect::new)
127    }
128
129    /// Lists Connections in a given project and location.
130    ///
131    /// # Example
132    /// ```
133    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
134    /// use google_cloud_gax::paginator::ItemPaginator as _;
135    /// use google_cloud_developerconnect_v1::Result;
136    /// async fn sample(
137    ///    client: &DeveloperConnect, parent: &str
138    /// ) -> Result<()> {
139    ///     let mut list = client.list_connections()
140    ///         .set_parent(parent)
141    ///         .by_item();
142    ///     while let Some(item) = list.next().await.transpose()? {
143    ///         println!("{:?}", item);
144    ///     }
145    ///     Ok(())
146    /// }
147    /// ```
148    pub fn list_connections(&self) -> super::builder::developer_connect::ListConnections {
149        super::builder::developer_connect::ListConnections::new(self.inner.clone())
150    }
151
152    /// Gets details of a single Connection.
153    ///
154    /// # Example
155    /// ```
156    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
157    /// use google_cloud_developerconnect_v1::Result;
158    /// async fn sample(
159    ///    client: &DeveloperConnect, name: &str
160    /// ) -> Result<()> {
161    ///     let response = client.get_connection()
162    ///         .set_name(name)
163    ///         .send().await?;
164    ///     println!("response {:?}", response);
165    ///     Ok(())
166    /// }
167    /// ```
168    pub fn get_connection(&self) -> super::builder::developer_connect::GetConnection {
169        super::builder::developer_connect::GetConnection::new(self.inner.clone())
170    }
171
172    /// Creates a new Connection in a given project and location.
173    ///
174    /// # Long running operations
175    ///
176    /// This method is used to start, and/or poll a [long-running Operation].
177    /// The [Working with long-running operations] chapter in the [user guide]
178    /// covers these operations in detail.
179    ///
180    /// [long-running operation]: https://google.aip.dev/151
181    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
182    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
183    ///
184    /// # Example
185    /// ```
186    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
187    /// use google_cloud_lro::Poller;
188    /// use google_cloud_developerconnect_v1::model::Connection;
189    /// use google_cloud_developerconnect_v1::Result;
190    /// async fn sample(
191    ///    client: &DeveloperConnect, parent: &str
192    /// ) -> Result<()> {
193    ///     let response = client.create_connection()
194    ///         .set_parent(parent)
195    ///         .set_connection_id("connection_id_value")
196    ///         .set_connection(
197    ///             Connection::new()/* set fields */
198    ///         )
199    ///         .poller().until_done().await?;
200    ///     println!("response {:?}", response);
201    ///     Ok(())
202    /// }
203    /// ```
204    pub fn create_connection(&self) -> super::builder::developer_connect::CreateConnection {
205        super::builder::developer_connect::CreateConnection::new(self.inner.clone())
206    }
207
208    /// Updates the parameters of a single Connection.
209    ///
210    /// # Long running operations
211    ///
212    /// This method is used to start, and/or poll a [long-running Operation].
213    /// The [Working with long-running operations] chapter in the [user guide]
214    /// covers these operations in detail.
215    ///
216    /// [long-running operation]: https://google.aip.dev/151
217    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
218    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
219    ///
220    /// # Example
221    /// ```
222    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
223    /// use google_cloud_lro::Poller;
224    /// # extern crate wkt as google_cloud_wkt;
225    /// use google_cloud_wkt::FieldMask;
226    /// use google_cloud_developerconnect_v1::model::Connection;
227    /// use google_cloud_developerconnect_v1::Result;
228    /// async fn sample(
229    ///    client: &DeveloperConnect, name: &str
230    /// ) -> Result<()> {
231    ///     let response = client.update_connection()
232    ///         .set_connection(
233    ///             Connection::new().set_name(name)/* set fields */
234    ///         )
235    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
236    ///         .poller().until_done().await?;
237    ///     println!("response {:?}", response);
238    ///     Ok(())
239    /// }
240    /// ```
241    pub fn update_connection(&self) -> super::builder::developer_connect::UpdateConnection {
242        super::builder::developer_connect::UpdateConnection::new(self.inner.clone())
243    }
244
245    /// Deletes a single Connection.
246    ///
247    /// # Long running operations
248    ///
249    /// This method is used to start, and/or poll a [long-running Operation].
250    /// The [Working with long-running operations] chapter in the [user guide]
251    /// covers these operations in detail.
252    ///
253    /// [long-running operation]: https://google.aip.dev/151
254    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
255    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
256    ///
257    /// # Example
258    /// ```
259    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
260    /// use google_cloud_lro::Poller;
261    /// use google_cloud_developerconnect_v1::Result;
262    /// async fn sample(
263    ///    client: &DeveloperConnect, name: &str
264    /// ) -> Result<()> {
265    ///     client.delete_connection()
266    ///         .set_name(name)
267    ///         .poller().until_done().await?;
268    ///     Ok(())
269    /// }
270    /// ```
271    pub fn delete_connection(&self) -> super::builder::developer_connect::DeleteConnection {
272        super::builder::developer_connect::DeleteConnection::new(self.inner.clone())
273    }
274
275    /// Creates a GitRepositoryLink. Upon linking a Git Repository, Developer
276    /// Connect will configure the Git Repository to send webhook events to
277    /// Developer Connect. Connections that use Firebase GitHub Application will
278    /// have events forwarded to the Firebase service. Connections that use Gemini
279    /// Code Assist will have events forwarded to Gemini Code Assist service. All
280    /// other Connections will have events forwarded to Cloud Build.
281    ///
282    /// # Long running operations
283    ///
284    /// This method is used to start, and/or poll a [long-running Operation].
285    /// The [Working with long-running operations] chapter in the [user guide]
286    /// covers these operations in detail.
287    ///
288    /// [long-running operation]: https://google.aip.dev/151
289    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
290    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
291    ///
292    /// # Example
293    /// ```
294    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
295    /// use google_cloud_lro::Poller;
296    /// use google_cloud_developerconnect_v1::model::GitRepositoryLink;
297    /// use google_cloud_developerconnect_v1::Result;
298    /// async fn sample(
299    ///    client: &DeveloperConnect, parent: &str
300    /// ) -> Result<()> {
301    ///     let response = client.create_git_repository_link()
302    ///         .set_parent(parent)
303    ///         .set_git_repository_link(
304    ///             GitRepositoryLink::new()/* set fields */
305    ///         )
306    ///         .poller().until_done().await?;
307    ///     println!("response {:?}", response);
308    ///     Ok(())
309    /// }
310    /// ```
311    pub fn create_git_repository_link(
312        &self,
313    ) -> super::builder::developer_connect::CreateGitRepositoryLink {
314        super::builder::developer_connect::CreateGitRepositoryLink::new(self.inner.clone())
315    }
316
317    /// Deletes a single GitRepositoryLink.
318    ///
319    /// # Long running operations
320    ///
321    /// This method is used to start, and/or poll a [long-running Operation].
322    /// The [Working with long-running operations] chapter in the [user guide]
323    /// covers these operations in detail.
324    ///
325    /// [long-running operation]: https://google.aip.dev/151
326    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
327    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
328    ///
329    /// # Example
330    /// ```
331    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
332    /// use google_cloud_lro::Poller;
333    /// use google_cloud_developerconnect_v1::Result;
334    /// async fn sample(
335    ///    client: &DeveloperConnect, name: &str
336    /// ) -> Result<()> {
337    ///     client.delete_git_repository_link()
338    ///         .set_name(name)
339    ///         .poller().until_done().await?;
340    ///     Ok(())
341    /// }
342    /// ```
343    pub fn delete_git_repository_link(
344        &self,
345    ) -> super::builder::developer_connect::DeleteGitRepositoryLink {
346        super::builder::developer_connect::DeleteGitRepositoryLink::new(self.inner.clone())
347    }
348
349    /// Lists GitRepositoryLinks in a given project, location, and connection.
350    ///
351    /// # Example
352    /// ```
353    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
354    /// use google_cloud_gax::paginator::ItemPaginator as _;
355    /// use google_cloud_developerconnect_v1::Result;
356    /// async fn sample(
357    ///    client: &DeveloperConnect, parent: &str
358    /// ) -> Result<()> {
359    ///     let mut list = client.list_git_repository_links()
360    ///         .set_parent(parent)
361    ///         .by_item();
362    ///     while let Some(item) = list.next().await.transpose()? {
363    ///         println!("{:?}", item);
364    ///     }
365    ///     Ok(())
366    /// }
367    /// ```
368    pub fn list_git_repository_links(
369        &self,
370    ) -> super::builder::developer_connect::ListGitRepositoryLinks {
371        super::builder::developer_connect::ListGitRepositoryLinks::new(self.inner.clone())
372    }
373
374    /// Gets details of a single GitRepositoryLink.
375    ///
376    /// # Example
377    /// ```
378    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
379    /// use google_cloud_developerconnect_v1::Result;
380    /// async fn sample(
381    ///    client: &DeveloperConnect, name: &str
382    /// ) -> Result<()> {
383    ///     let response = client.get_git_repository_link()
384    ///         .set_name(name)
385    ///         .send().await?;
386    ///     println!("response {:?}", response);
387    ///     Ok(())
388    /// }
389    /// ```
390    pub fn get_git_repository_link(
391        &self,
392    ) -> super::builder::developer_connect::GetGitRepositoryLink {
393        super::builder::developer_connect::GetGitRepositoryLink::new(self.inner.clone())
394    }
395
396    /// Fetches read/write token of a given gitRepositoryLink.
397    ///
398    /// # Example
399    /// ```
400    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
401    /// use google_cloud_developerconnect_v1::Result;
402    /// async fn sample(
403    ///    client: &DeveloperConnect
404    /// ) -> Result<()> {
405    ///     let response = client.fetch_read_write_token()
406    ///         /* set fields */
407    ///         .send().await?;
408    ///     println!("response {:?}", response);
409    ///     Ok(())
410    /// }
411    /// ```
412    pub fn fetch_read_write_token(&self) -> super::builder::developer_connect::FetchReadWriteToken {
413        super::builder::developer_connect::FetchReadWriteToken::new(self.inner.clone())
414    }
415
416    /// Fetches read token of a given gitRepositoryLink.
417    ///
418    /// # Example
419    /// ```
420    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
421    /// use google_cloud_developerconnect_v1::Result;
422    /// async fn sample(
423    ///    client: &DeveloperConnect
424    /// ) -> Result<()> {
425    ///     let response = client.fetch_read_token()
426    ///         /* set fields */
427    ///         .send().await?;
428    ///     println!("response {:?}", response);
429    ///     Ok(())
430    /// }
431    /// ```
432    pub fn fetch_read_token(&self) -> super::builder::developer_connect::FetchReadToken {
433        super::builder::developer_connect::FetchReadToken::new(self.inner.clone())
434    }
435
436    /// FetchLinkableGitRepositories returns a list of git repositories from an SCM
437    /// that are available to be added to a Connection.
438    ///
439    /// # Example
440    /// ```
441    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
442    /// use google_cloud_gax::paginator::ItemPaginator as _;
443    /// use google_cloud_developerconnect_v1::Result;
444    /// async fn sample(
445    ///    client: &DeveloperConnect
446    /// ) -> Result<()> {
447    ///     let mut list = client.fetch_linkable_git_repositories()
448    ///         /* set fields */
449    ///         .by_item();
450    ///     while let Some(item) = list.next().await.transpose()? {
451    ///         println!("{:?}", item);
452    ///     }
453    ///     Ok(())
454    /// }
455    /// ```
456    pub fn fetch_linkable_git_repositories(
457        &self,
458    ) -> super::builder::developer_connect::FetchLinkableGitRepositories {
459        super::builder::developer_connect::FetchLinkableGitRepositories::new(self.inner.clone())
460    }
461
462    /// FetchGitHubInstallations returns the list of GitHub Installations that
463    /// are available to be added to a Connection.
464    /// For github.com, only installations accessible to the authorizer token
465    /// are returned. For GitHub Enterprise, all installations are returned.
466    ///
467    /// # Example
468    /// ```
469    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
470    /// use google_cloud_developerconnect_v1::Result;
471    /// async fn sample(
472    ///    client: &DeveloperConnect
473    /// ) -> Result<()> {
474    ///     let response = client.fetch_git_hub_installations()
475    ///         /* set fields */
476    ///         .send().await?;
477    ///     println!("response {:?}", response);
478    ///     Ok(())
479    /// }
480    /// ```
481    pub fn fetch_git_hub_installations(
482        &self,
483    ) -> super::builder::developer_connect::FetchGitHubInstallations {
484        super::builder::developer_connect::FetchGitHubInstallations::new(self.inner.clone())
485    }
486
487    /// Fetch the list of branches or tags for a given repository.
488    ///
489    /// # Example
490    /// ```
491    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
492    /// use google_cloud_developerconnect_v1::Result;
493    /// async fn sample(
494    ///    client: &DeveloperConnect
495    /// ) -> Result<()> {
496    ///     let response = client.fetch_git_refs()
497    ///         /* set fields */
498    ///         .send().await?;
499    ///     println!("response {:?}", response);
500    ///     Ok(())
501    /// }
502    /// ```
503    pub fn fetch_git_refs(&self) -> super::builder::developer_connect::FetchGitRefs {
504        super::builder::developer_connect::FetchGitRefs::new(self.inner.clone())
505    }
506
507    /// Lists AccountConnectors in a given project and location.
508    ///
509    /// # Example
510    /// ```
511    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
512    /// use google_cloud_gax::paginator::ItemPaginator as _;
513    /// use google_cloud_developerconnect_v1::Result;
514    /// async fn sample(
515    ///    client: &DeveloperConnect, parent: &str
516    /// ) -> Result<()> {
517    ///     let mut list = client.list_account_connectors()
518    ///         .set_parent(parent)
519    ///         .by_item();
520    ///     while let Some(item) = list.next().await.transpose()? {
521    ///         println!("{:?}", item);
522    ///     }
523    ///     Ok(())
524    /// }
525    /// ```
526    pub fn list_account_connectors(
527        &self,
528    ) -> super::builder::developer_connect::ListAccountConnectors {
529        super::builder::developer_connect::ListAccountConnectors::new(self.inner.clone())
530    }
531
532    /// Gets details of a single AccountConnector.
533    ///
534    /// # Example
535    /// ```
536    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
537    /// use google_cloud_developerconnect_v1::Result;
538    /// async fn sample(
539    ///    client: &DeveloperConnect, name: &str
540    /// ) -> Result<()> {
541    ///     let response = client.get_account_connector()
542    ///         .set_name(name)
543    ///         .send().await?;
544    ///     println!("response {:?}", response);
545    ///     Ok(())
546    /// }
547    /// ```
548    pub fn get_account_connector(&self) -> super::builder::developer_connect::GetAccountConnector {
549        super::builder::developer_connect::GetAccountConnector::new(self.inner.clone())
550    }
551
552    /// Creates a new AccountConnector in a given project and location.
553    ///
554    /// # Long running operations
555    ///
556    /// This method is used to start, and/or poll a [long-running Operation].
557    /// The [Working with long-running operations] chapter in the [user guide]
558    /// covers these operations in detail.
559    ///
560    /// [long-running operation]: https://google.aip.dev/151
561    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
562    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
563    ///
564    /// # Example
565    /// ```
566    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
567    /// use google_cloud_lro::Poller;
568    /// use google_cloud_developerconnect_v1::model::AccountConnector;
569    /// use google_cloud_developerconnect_v1::Result;
570    /// async fn sample(
571    ///    client: &DeveloperConnect, parent: &str
572    /// ) -> Result<()> {
573    ///     let response = client.create_account_connector()
574    ///         .set_parent(parent)
575    ///         .set_account_connector(
576    ///             AccountConnector::new()/* set fields */
577    ///         )
578    ///         .poller().until_done().await?;
579    ///     println!("response {:?}", response);
580    ///     Ok(())
581    /// }
582    /// ```
583    pub fn create_account_connector(
584        &self,
585    ) -> super::builder::developer_connect::CreateAccountConnector {
586        super::builder::developer_connect::CreateAccountConnector::new(self.inner.clone())
587    }
588
589    /// Updates the parameters of a single AccountConnector.
590    ///
591    /// # Long running operations
592    ///
593    /// This method is used to start, and/or poll a [long-running Operation].
594    /// The [Working with long-running operations] chapter in the [user guide]
595    /// covers these operations in detail.
596    ///
597    /// [long-running operation]: https://google.aip.dev/151
598    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
599    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
600    ///
601    /// # Example
602    /// ```
603    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
604    /// use google_cloud_lro::Poller;
605    /// # extern crate wkt as google_cloud_wkt;
606    /// use google_cloud_wkt::FieldMask;
607    /// use google_cloud_developerconnect_v1::model::AccountConnector;
608    /// use google_cloud_developerconnect_v1::Result;
609    /// async fn sample(
610    ///    client: &DeveloperConnect, name: &str
611    /// ) -> Result<()> {
612    ///     let response = client.update_account_connector()
613    ///         .set_account_connector(
614    ///             AccountConnector::new().set_name(name)/* set fields */
615    ///         )
616    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
617    ///         .poller().until_done().await?;
618    ///     println!("response {:?}", response);
619    ///     Ok(())
620    /// }
621    /// ```
622    pub fn update_account_connector(
623        &self,
624    ) -> super::builder::developer_connect::UpdateAccountConnector {
625        super::builder::developer_connect::UpdateAccountConnector::new(self.inner.clone())
626    }
627
628    /// Deletes a single AccountConnector.
629    ///
630    /// # Long running operations
631    ///
632    /// This method is used to start, and/or poll a [long-running Operation].
633    /// The [Working with long-running operations] chapter in the [user guide]
634    /// covers these operations in detail.
635    ///
636    /// [long-running operation]: https://google.aip.dev/151
637    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
638    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
639    ///
640    /// # Example
641    /// ```
642    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
643    /// use google_cloud_lro::Poller;
644    /// use google_cloud_developerconnect_v1::Result;
645    /// async fn sample(
646    ///    client: &DeveloperConnect, name: &str
647    /// ) -> Result<()> {
648    ///     client.delete_account_connector()
649    ///         .set_name(name)
650    ///         .poller().until_done().await?;
651    ///     Ok(())
652    /// }
653    /// ```
654    pub fn delete_account_connector(
655        &self,
656    ) -> super::builder::developer_connect::DeleteAccountConnector {
657        super::builder::developer_connect::DeleteAccountConnector::new(self.inner.clone())
658    }
659
660    /// Fetches OAuth access token based on end user credentials.
661    ///
662    /// # Example
663    /// ```
664    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
665    /// use google_cloud_developerconnect_v1::Result;
666    /// async fn sample(
667    ///    client: &DeveloperConnect
668    /// ) -> Result<()> {
669    ///     let response = client.fetch_access_token()
670    ///         /* set fields */
671    ///         .send().await?;
672    ///     println!("response {:?}", response);
673    ///     Ok(())
674    /// }
675    /// ```
676    pub fn fetch_access_token(&self) -> super::builder::developer_connect::FetchAccessToken {
677        super::builder::developer_connect::FetchAccessToken::new(self.inner.clone())
678    }
679
680    /// Lists Users in a given project, location, and account_connector.
681    ///
682    /// # Example
683    /// ```
684    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
685    /// use google_cloud_gax::paginator::ItemPaginator as _;
686    /// use google_cloud_developerconnect_v1::Result;
687    /// async fn sample(
688    ///    client: &DeveloperConnect, parent: &str
689    /// ) -> Result<()> {
690    ///     let mut list = client.list_users()
691    ///         .set_parent(parent)
692    ///         .by_item();
693    ///     while let Some(item) = list.next().await.transpose()? {
694    ///         println!("{:?}", item);
695    ///     }
696    ///     Ok(())
697    /// }
698    /// ```
699    pub fn list_users(&self) -> super::builder::developer_connect::ListUsers {
700        super::builder::developer_connect::ListUsers::new(self.inner.clone())
701    }
702
703    /// Deletes a single User.
704    ///
705    /// # Long running operations
706    ///
707    /// This method is used to start, and/or poll a [long-running Operation].
708    /// The [Working with long-running operations] chapter in the [user guide]
709    /// covers these operations in detail.
710    ///
711    /// [long-running operation]: https://google.aip.dev/151
712    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
713    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
714    ///
715    /// # Example
716    /// ```
717    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
718    /// use google_cloud_lro::Poller;
719    /// use google_cloud_developerconnect_v1::Result;
720    /// async fn sample(
721    ///    client: &DeveloperConnect, name: &str
722    /// ) -> Result<()> {
723    ///     client.delete_user()
724    ///         .set_name(name)
725    ///         .poller().until_done().await?;
726    ///     Ok(())
727    /// }
728    /// ```
729    pub fn delete_user(&self) -> super::builder::developer_connect::DeleteUser {
730        super::builder::developer_connect::DeleteUser::new(self.inner.clone())
731    }
732
733    /// Fetch the User based on the user credentials.
734    ///
735    /// # Example
736    /// ```
737    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
738    /// use google_cloud_developerconnect_v1::Result;
739    /// async fn sample(
740    ///    client: &DeveloperConnect
741    /// ) -> Result<()> {
742    ///     let response = client.fetch_self()
743    ///         /* set fields */
744    ///         .send().await?;
745    ///     println!("response {:?}", response);
746    ///     Ok(())
747    /// }
748    /// ```
749    pub fn fetch_self(&self) -> super::builder::developer_connect::FetchSelf {
750        super::builder::developer_connect::FetchSelf::new(self.inner.clone())
751    }
752
753    /// Delete the User based on the user credentials.
754    ///
755    /// # Long running operations
756    ///
757    /// This method is used to start, and/or poll a [long-running Operation].
758    /// The [Working with long-running operations] chapter in the [user guide]
759    /// covers these operations in detail.
760    ///
761    /// [long-running operation]: https://google.aip.dev/151
762    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
763    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
764    ///
765    /// # Example
766    /// ```
767    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
768    /// use google_cloud_lro::Poller;
769    /// use google_cloud_developerconnect_v1::Result;
770    /// async fn sample(
771    ///    client: &DeveloperConnect
772    /// ) -> Result<()> {
773    ///     client.delete_self()
774    ///         /* set fields */
775    ///         .poller().until_done().await?;
776    ///     Ok(())
777    /// }
778    /// ```
779    pub fn delete_self(&self) -> super::builder::developer_connect::DeleteSelf {
780        super::builder::developer_connect::DeleteSelf::new(self.inner.clone())
781    }
782
783    /// Starts OAuth flow for an account connector.
784    ///
785    /// # Example
786    /// ```
787    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
788    /// use google_cloud_developerconnect_v1::Result;
789    /// async fn sample(
790    ///    client: &DeveloperConnect
791    /// ) -> Result<()> {
792    ///     let response = client.start_o_auth()
793    ///         /* set fields */
794    ///         .send().await?;
795    ///     println!("response {:?}", response);
796    ///     Ok(())
797    /// }
798    /// ```
799    pub fn start_o_auth(&self) -> super::builder::developer_connect::StartOAuth {
800        super::builder::developer_connect::StartOAuth::new(self.inner.clone())
801    }
802
803    /// Finishes OAuth flow for an account connector.
804    ///
805    /// # Example
806    /// ```
807    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
808    /// use google_cloud_developerconnect_v1::Result;
809    /// async fn sample(
810    ///    client: &DeveloperConnect
811    /// ) -> Result<()> {
812    ///     let response = client.finish_o_auth()
813    ///         /* set fields */
814    ///         .send().await?;
815    ///     println!("response {:?}", response);
816    ///     Ok(())
817    /// }
818    /// ```
819    pub fn finish_o_auth(&self) -> super::builder::developer_connect::FinishOAuth {
820        super::builder::developer_connect::FinishOAuth::new(self.inner.clone())
821    }
822
823    /// Lists information about the supported locations for this service.
824    /// This method can be called in two ways:
825    ///
826    /// * **List all public locations:** Use the path `GET /v1/locations`.
827    /// * **List project-visible locations:** Use the path
828    ///   `GET /v1/projects/{project_id}/locations`. This may include public
829    ///   locations as well as private or other locations specifically visible
830    ///   to the project.
831    ///
832    /// # Example
833    /// ```
834    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
835    /// use google_cloud_gax::paginator::ItemPaginator as _;
836    /// use google_cloud_developerconnect_v1::Result;
837    /// async fn sample(
838    ///    client: &DeveloperConnect
839    /// ) -> Result<()> {
840    ///     let mut list = client.list_locations()
841    ///         /* set fields */
842    ///         .by_item();
843    ///     while let Some(item) = list.next().await.transpose()? {
844    ///         println!("{:?}", item);
845    ///     }
846    ///     Ok(())
847    /// }
848    /// ```
849    pub fn list_locations(&self) -> super::builder::developer_connect::ListLocations {
850        super::builder::developer_connect::ListLocations::new(self.inner.clone())
851    }
852
853    /// Gets information about a location.
854    ///
855    /// # Example
856    /// ```
857    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
858    /// use google_cloud_developerconnect_v1::Result;
859    /// async fn sample(
860    ///    client: &DeveloperConnect
861    /// ) -> Result<()> {
862    ///     let response = client.get_location()
863    ///         /* set fields */
864    ///         .send().await?;
865    ///     println!("response {:?}", response);
866    ///     Ok(())
867    /// }
868    /// ```
869    pub fn get_location(&self) -> super::builder::developer_connect::GetLocation {
870        super::builder::developer_connect::GetLocation::new(self.inner.clone())
871    }
872
873    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
874    ///
875    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
876    ///
877    /// # Example
878    /// ```
879    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
880    /// use google_cloud_gax::paginator::ItemPaginator as _;
881    /// use google_cloud_developerconnect_v1::Result;
882    /// async fn sample(
883    ///    client: &DeveloperConnect
884    /// ) -> Result<()> {
885    ///     let mut list = client.list_operations()
886    ///         /* set fields */
887    ///         .by_item();
888    ///     while let Some(item) = list.next().await.transpose()? {
889    ///         println!("{:?}", item);
890    ///     }
891    ///     Ok(())
892    /// }
893    /// ```
894    pub fn list_operations(&self) -> super::builder::developer_connect::ListOperations {
895        super::builder::developer_connect::ListOperations::new(self.inner.clone())
896    }
897
898    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
899    ///
900    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
901    ///
902    /// # Example
903    /// ```
904    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
905    /// use google_cloud_developerconnect_v1::Result;
906    /// async fn sample(
907    ///    client: &DeveloperConnect
908    /// ) -> Result<()> {
909    ///     let response = client.get_operation()
910    ///         /* set fields */
911    ///         .send().await?;
912    ///     println!("response {:?}", response);
913    ///     Ok(())
914    /// }
915    /// ```
916    pub fn get_operation(&self) -> super::builder::developer_connect::GetOperation {
917        super::builder::developer_connect::GetOperation::new(self.inner.clone())
918    }
919
920    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
921    ///
922    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
923    ///
924    /// # Example
925    /// ```
926    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
927    /// use google_cloud_developerconnect_v1::Result;
928    /// async fn sample(
929    ///    client: &DeveloperConnect
930    /// ) -> Result<()> {
931    ///     client.delete_operation()
932    ///         /* set fields */
933    ///         .send().await?;
934    ///     Ok(())
935    /// }
936    /// ```
937    pub fn delete_operation(&self) -> super::builder::developer_connect::DeleteOperation {
938        super::builder::developer_connect::DeleteOperation::new(self.inner.clone())
939    }
940
941    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
942    ///
943    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
944    ///
945    /// # Example
946    /// ```
947    /// # use google_cloud_developerconnect_v1::client::DeveloperConnect;
948    /// use google_cloud_developerconnect_v1::Result;
949    /// async fn sample(
950    ///    client: &DeveloperConnect
951    /// ) -> Result<()> {
952    ///     client.cancel_operation()
953    ///         /* set fields */
954    ///         .send().await?;
955    ///     Ok(())
956    /// }
957    /// ```
958    pub fn cancel_operation(&self) -> super::builder::developer_connect::CancelOperation {
959        super::builder::developer_connect::CancelOperation::new(self.inner.clone())
960    }
961}
962
963/// Implements a client for the Developer Connect API.
964///
965/// # Example
966/// ```
967/// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
968/// use google_cloud_gax::paginator::ItemPaginator as _;
969/// # async fn sample() -> Result<(), Box<dyn std::error::Error>> {
970///     let client = InsightsConfigService::builder().build().await?;
971///     let parent = "parent_value";
972///     let mut list = client.list_insights_configs()
973///         .set_parent(parent)
974///         .by_item();
975///     while let Some(item) = list.next().await.transpose()? {
976///         println!("{:?}", item);
977///     }
978/// # Ok(()) }
979/// ```
980///
981/// # Service Description
982///
983/// Creates and manages InsightsConfigs.
984///
985/// The InsightsConfig resource is the core configuration object to capture
986/// events from your Software Development Lifecycle. It acts as the central hub
987/// for managing how Developer Connect understands your application, its runtime
988/// environments, and the artifacts deployed within them.
989/// A user can create an InsightsConfig, list previously-requested
990/// InsightsConfigs or get InsightsConfigs by their ID to determine the status of
991/// the InsightsConfig.
992///
993/// # Configuration
994///
995/// To configure `InsightsConfigService` use the `with_*` methods in the type returned
996/// by [builder()][InsightsConfigService::builder]. The default configuration should
997/// work for most applications. Common configuration changes include
998///
999/// * [with_endpoint()]: by default this client uses the global default endpoint
1000///   (`https://developerconnect.googleapis.com`). Applications using regional
1001///   endpoints or running in restricted networks (e.g. a network configured
1002//    with [Private Google Access with VPC Service Controls]) may want to
1003///   override this default.
1004/// * [with_credentials()]: by default this client uses
1005///   [Application Default Credentials]. Applications using custom
1006///   authentication may need to override this default.
1007///
1008/// [with_endpoint()]: super::builder::insights_config_service::ClientBuilder::with_endpoint
1009/// [with_credentials()]: super::builder::insights_config_service::ClientBuilder::with_credentials
1010/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1011/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1012///
1013/// # Pooling and Cloning
1014///
1015/// `InsightsConfigService` holds a connection pool internally, it is advised to
1016/// create one and reuse it. You do not need to wrap `InsightsConfigService` in
1017/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1018/// already uses an `Arc` internally.
1019#[derive(Clone, Debug)]
1020pub struct InsightsConfigService {
1021    inner: std::sync::Arc<dyn super::stub::dynamic::InsightsConfigService>,
1022}
1023
1024impl InsightsConfigService {
1025    /// Returns a builder for [InsightsConfigService].
1026    ///
1027    /// ```
1028    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1029    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1030    /// let client = InsightsConfigService::builder().build().await?;
1031    /// # Ok(()) }
1032    /// ```
1033    pub fn builder() -> super::builder::insights_config_service::ClientBuilder {
1034        crate::new_client_builder(super::builder::insights_config_service::client::Factory)
1035    }
1036
1037    /// Creates a new client from the provided stub.
1038    ///
1039    /// The most common case for calling this function is in tests mocking the
1040    /// client's behavior.
1041    pub fn from_stub<T>(stub: T) -> Self
1042    where
1043        T: super::stub::InsightsConfigService + 'static,
1044    {
1045        Self {
1046            inner: std::sync::Arc::new(stub),
1047        }
1048    }
1049
1050    pub(crate) async fn new(
1051        config: gaxi::options::ClientConfig,
1052    ) -> crate::ClientBuilderResult<Self> {
1053        let inner = Self::build_inner(config).await?;
1054        Ok(Self { inner })
1055    }
1056
1057    async fn build_inner(
1058        conf: gaxi::options::ClientConfig,
1059    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::InsightsConfigService>>
1060    {
1061        if gaxi::options::tracing_enabled(&conf) {
1062            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1063        }
1064        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1065    }
1066
1067    async fn build_transport(
1068        conf: gaxi::options::ClientConfig,
1069    ) -> crate::ClientBuilderResult<impl super::stub::InsightsConfigService> {
1070        super::transport::InsightsConfigService::new(conf).await
1071    }
1072
1073    async fn build_with_tracing(
1074        conf: gaxi::options::ClientConfig,
1075    ) -> crate::ClientBuilderResult<impl super::stub::InsightsConfigService> {
1076        Self::build_transport(conf)
1077            .await
1078            .map(super::tracing::InsightsConfigService::new)
1079    }
1080
1081    /// Lists InsightsConfigs in a given project and location.
1082    ///
1083    /// # Example
1084    /// ```
1085    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1086    /// use google_cloud_gax::paginator::ItemPaginator as _;
1087    /// use google_cloud_developerconnect_v1::Result;
1088    /// async fn sample(
1089    ///    client: &InsightsConfigService, parent: &str
1090    /// ) -> Result<()> {
1091    ///     let mut list = client.list_insights_configs()
1092    ///         .set_parent(parent)
1093    ///         .by_item();
1094    ///     while let Some(item) = list.next().await.transpose()? {
1095    ///         println!("{:?}", item);
1096    ///     }
1097    ///     Ok(())
1098    /// }
1099    /// ```
1100    pub fn list_insights_configs(
1101        &self,
1102    ) -> super::builder::insights_config_service::ListInsightsConfigs {
1103        super::builder::insights_config_service::ListInsightsConfigs::new(self.inner.clone())
1104    }
1105
1106    /// Creates a new InsightsConfig in a given project and location.
1107    ///
1108    /// # Long running operations
1109    ///
1110    /// This method is used to start, and/or poll a [long-running Operation].
1111    /// The [Working with long-running operations] chapter in the [user guide]
1112    /// covers these operations in detail.
1113    ///
1114    /// [long-running operation]: https://google.aip.dev/151
1115    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1116    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1117    ///
1118    /// # Example
1119    /// ```
1120    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1121    /// use google_cloud_lro::Poller;
1122    /// use google_cloud_developerconnect_v1::model::InsightsConfig;
1123    /// use google_cloud_developerconnect_v1::Result;
1124    /// async fn sample(
1125    ///    client: &InsightsConfigService, parent: &str
1126    /// ) -> Result<()> {
1127    ///     let response = client.create_insights_config()
1128    ///         .set_parent(parent)
1129    ///         .set_insights_config(
1130    ///             InsightsConfig::new()/* set fields */
1131    ///         )
1132    ///         .poller().until_done().await?;
1133    ///     println!("response {:?}", response);
1134    ///     Ok(())
1135    /// }
1136    /// ```
1137    pub fn create_insights_config(
1138        &self,
1139    ) -> super::builder::insights_config_service::CreateInsightsConfig {
1140        super::builder::insights_config_service::CreateInsightsConfig::new(self.inner.clone())
1141    }
1142
1143    /// Gets details of a single Insight.
1144    ///
1145    /// # Example
1146    /// ```
1147    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1148    /// use google_cloud_developerconnect_v1::Result;
1149    /// async fn sample(
1150    ///    client: &InsightsConfigService, name: &str
1151    /// ) -> Result<()> {
1152    ///     let response = client.get_insights_config()
1153    ///         .set_name(name)
1154    ///         .send().await?;
1155    ///     println!("response {:?}", response);
1156    ///     Ok(())
1157    /// }
1158    /// ```
1159    pub fn get_insights_config(
1160        &self,
1161    ) -> super::builder::insights_config_service::GetInsightsConfig {
1162        super::builder::insights_config_service::GetInsightsConfig::new(self.inner.clone())
1163    }
1164
1165    /// Updates the parameters of a single InsightsConfig.
1166    ///
1167    /// # Long running operations
1168    ///
1169    /// This method is used to start, and/or poll a [long-running Operation].
1170    /// The [Working with long-running operations] chapter in the [user guide]
1171    /// covers these operations in detail.
1172    ///
1173    /// [long-running operation]: https://google.aip.dev/151
1174    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1175    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1176    ///
1177    /// # Example
1178    /// ```
1179    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1180    /// use google_cloud_lro::Poller;
1181    /// use google_cloud_developerconnect_v1::model::InsightsConfig;
1182    /// use google_cloud_developerconnect_v1::Result;
1183    /// async fn sample(
1184    ///    client: &InsightsConfigService, name: &str
1185    /// ) -> Result<()> {
1186    ///     let response = client.update_insights_config()
1187    ///         .set_insights_config(
1188    ///             InsightsConfig::new().set_name(name)/* set fields */
1189    ///         )
1190    ///         .poller().until_done().await?;
1191    ///     println!("response {:?}", response);
1192    ///     Ok(())
1193    /// }
1194    /// ```
1195    pub fn update_insights_config(
1196        &self,
1197    ) -> super::builder::insights_config_service::UpdateInsightsConfig {
1198        super::builder::insights_config_service::UpdateInsightsConfig::new(self.inner.clone())
1199    }
1200
1201    /// Deletes a single Insight.
1202    ///
1203    /// # Long running operations
1204    ///
1205    /// This method is used to start, and/or poll a [long-running Operation].
1206    /// The [Working with long-running operations] chapter in the [user guide]
1207    /// covers these operations in detail.
1208    ///
1209    /// [long-running operation]: https://google.aip.dev/151
1210    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1211    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1212    ///
1213    /// # Example
1214    /// ```
1215    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1216    /// use google_cloud_lro::Poller;
1217    /// use google_cloud_developerconnect_v1::Result;
1218    /// async fn sample(
1219    ///    client: &InsightsConfigService, name: &str
1220    /// ) -> Result<()> {
1221    ///     client.delete_insights_config()
1222    ///         .set_name(name)
1223    ///         .poller().until_done().await?;
1224    ///     Ok(())
1225    /// }
1226    /// ```
1227    pub fn delete_insights_config(
1228        &self,
1229    ) -> super::builder::insights_config_service::DeleteInsightsConfig {
1230        super::builder::insights_config_service::DeleteInsightsConfig::new(self.inner.clone())
1231    }
1232
1233    /// Gets a single Deployment Event.
1234    ///
1235    /// # Example
1236    /// ```
1237    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1238    /// use google_cloud_developerconnect_v1::Result;
1239    /// async fn sample(
1240    ///    client: &InsightsConfigService, name: &str
1241    /// ) -> Result<()> {
1242    ///     let response = client.get_deployment_event()
1243    ///         .set_name(name)
1244    ///         .send().await?;
1245    ///     println!("response {:?}", response);
1246    ///     Ok(())
1247    /// }
1248    /// ```
1249    pub fn get_deployment_event(
1250        &self,
1251    ) -> super::builder::insights_config_service::GetDeploymentEvent {
1252        super::builder::insights_config_service::GetDeploymentEvent::new(self.inner.clone())
1253    }
1254
1255    /// Lists Deployment Events in a given insights config.
1256    ///
1257    /// # Example
1258    /// ```
1259    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1260    /// use google_cloud_gax::paginator::ItemPaginator as _;
1261    /// use google_cloud_developerconnect_v1::Result;
1262    /// async fn sample(
1263    ///    client: &InsightsConfigService, parent: &str
1264    /// ) -> Result<()> {
1265    ///     let mut list = client.list_deployment_events()
1266    ///         .set_parent(parent)
1267    ///         .by_item();
1268    ///     while let Some(item) = list.next().await.transpose()? {
1269    ///         println!("{:?}", item);
1270    ///     }
1271    ///     Ok(())
1272    /// }
1273    /// ```
1274    pub fn list_deployment_events(
1275        &self,
1276    ) -> super::builder::insights_config_service::ListDeploymentEvents {
1277        super::builder::insights_config_service::ListDeploymentEvents::new(self.inner.clone())
1278    }
1279
1280    /// Lists information about the supported locations for this service.
1281    /// This method can be called in two ways:
1282    ///
1283    /// * **List all public locations:** Use the path `GET /v1/locations`.
1284    /// * **List project-visible locations:** Use the path
1285    ///   `GET /v1/projects/{project_id}/locations`. This may include public
1286    ///   locations as well as private or other locations specifically visible
1287    ///   to the project.
1288    ///
1289    /// # Example
1290    /// ```
1291    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1292    /// use google_cloud_gax::paginator::ItemPaginator as _;
1293    /// use google_cloud_developerconnect_v1::Result;
1294    /// async fn sample(
1295    ///    client: &InsightsConfigService
1296    /// ) -> Result<()> {
1297    ///     let mut list = client.list_locations()
1298    ///         /* set fields */
1299    ///         .by_item();
1300    ///     while let Some(item) = list.next().await.transpose()? {
1301    ///         println!("{:?}", item);
1302    ///     }
1303    ///     Ok(())
1304    /// }
1305    /// ```
1306    pub fn list_locations(&self) -> super::builder::insights_config_service::ListLocations {
1307        super::builder::insights_config_service::ListLocations::new(self.inner.clone())
1308    }
1309
1310    /// Gets information about a location.
1311    ///
1312    /// # Example
1313    /// ```
1314    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1315    /// use google_cloud_developerconnect_v1::Result;
1316    /// async fn sample(
1317    ///    client: &InsightsConfigService
1318    /// ) -> Result<()> {
1319    ///     let response = client.get_location()
1320    ///         /* set fields */
1321    ///         .send().await?;
1322    ///     println!("response {:?}", response);
1323    ///     Ok(())
1324    /// }
1325    /// ```
1326    pub fn get_location(&self) -> super::builder::insights_config_service::GetLocation {
1327        super::builder::insights_config_service::GetLocation::new(self.inner.clone())
1328    }
1329
1330    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1331    ///
1332    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1333    ///
1334    /// # Example
1335    /// ```
1336    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1337    /// use google_cloud_gax::paginator::ItemPaginator as _;
1338    /// use google_cloud_developerconnect_v1::Result;
1339    /// async fn sample(
1340    ///    client: &InsightsConfigService
1341    /// ) -> Result<()> {
1342    ///     let mut list = client.list_operations()
1343    ///         /* set fields */
1344    ///         .by_item();
1345    ///     while let Some(item) = list.next().await.transpose()? {
1346    ///         println!("{:?}", item);
1347    ///     }
1348    ///     Ok(())
1349    /// }
1350    /// ```
1351    pub fn list_operations(&self) -> super::builder::insights_config_service::ListOperations {
1352        super::builder::insights_config_service::ListOperations::new(self.inner.clone())
1353    }
1354
1355    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1356    ///
1357    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1358    ///
1359    /// # Example
1360    /// ```
1361    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1362    /// use google_cloud_developerconnect_v1::Result;
1363    /// async fn sample(
1364    ///    client: &InsightsConfigService
1365    /// ) -> Result<()> {
1366    ///     let response = client.get_operation()
1367    ///         /* set fields */
1368    ///         .send().await?;
1369    ///     println!("response {:?}", response);
1370    ///     Ok(())
1371    /// }
1372    /// ```
1373    pub fn get_operation(&self) -> super::builder::insights_config_service::GetOperation {
1374        super::builder::insights_config_service::GetOperation::new(self.inner.clone())
1375    }
1376
1377    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1378    ///
1379    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1380    ///
1381    /// # Example
1382    /// ```
1383    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1384    /// use google_cloud_developerconnect_v1::Result;
1385    /// async fn sample(
1386    ///    client: &InsightsConfigService
1387    /// ) -> Result<()> {
1388    ///     client.delete_operation()
1389    ///         /* set fields */
1390    ///         .send().await?;
1391    ///     Ok(())
1392    /// }
1393    /// ```
1394    pub fn delete_operation(&self) -> super::builder::insights_config_service::DeleteOperation {
1395        super::builder::insights_config_service::DeleteOperation::new(self.inner.clone())
1396    }
1397
1398    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1399    ///
1400    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1401    ///
1402    /// # Example
1403    /// ```
1404    /// # use google_cloud_developerconnect_v1::client::InsightsConfigService;
1405    /// use google_cloud_developerconnect_v1::Result;
1406    /// async fn sample(
1407    ///    client: &InsightsConfigService
1408    /// ) -> Result<()> {
1409    ///     client.cancel_operation()
1410    ///         /* set fields */
1411    ///         .send().await?;
1412    ///     Ok(())
1413    /// }
1414    /// ```
1415    pub fn cancel_operation(&self) -> super::builder::insights_config_service::CancelOperation {
1416        super::builder::insights_config_service::CancelOperation::new(self.inner.clone())
1417    }
1418}