Skip to main content

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