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