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/// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
24/// # use google_cloud_securesourcemanager_v1::client::SecureSourceManager;
25/// let client = SecureSourceManager::builder().build().await?;
26/// // use `client` to make requests to the Secure Source Manager API.
27/// # Ok(()) }
28/// ```
29///
30/// # Service Description
31///
32/// Secure Source Manager API
33///
34/// Access Secure Source Manager instances, resources, and repositories.
35///
36/// # Configuration
37///
38/// To configure `SecureSourceManager` use the `with_*` methods in the type returned
39/// by [builder()][SecureSourceManager::builder]. The default configuration should
40/// work for most applications. Common configuration changes include
41///
42/// * [with_endpoint()]: by default this client uses the global default endpoint
43///   (`https://securesourcemanager.googleapis.com`). Applications using regional
44///   endpoints or running in restricted networks (e.g. a network configured
45//    with [Private Google Access with VPC Service Controls]) may want to
46///   override this default.
47/// * [with_credentials()]: by default this client uses
48///   [Application Default Credentials]. Applications using custom
49///   authentication may need to override this default.
50///
51/// [with_endpoint()]: super::builder::secure_source_manager::ClientBuilder::with_endpoint
52/// [with_credentials()]: super::builder::secure_source_manager::ClientBuilder::credentials
53/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
54/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
55///
56/// # Pooling and Cloning
57///
58/// `SecureSourceManager` holds a connection pool internally, it is advised to
59/// create one and the reuse it.  You do not need to wrap `SecureSourceManager` in
60/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
61/// already uses an `Arc` internally.
62#[derive(Clone, Debug)]
63pub struct SecureSourceManager {
64    inner: std::sync::Arc<dyn super::stub::dynamic::SecureSourceManager>,
65}
66
67impl SecureSourceManager {
68    /// Returns a builder for [SecureSourceManager].
69    ///
70    /// ```
71    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
72    /// # use google_cloud_securesourcemanager_v1::client::SecureSourceManager;
73    /// let client = SecureSourceManager::builder().build().await?;
74    /// # Ok(()) }
75    /// ```
76    pub fn builder() -> super::builder::secure_source_manager::ClientBuilder {
77        crate::new_client_builder(super::builder::secure_source_manager::client::Factory)
78    }
79
80    /// Creates a new client from the provided stub.
81    ///
82    /// The most common case for calling this function is in tests mocking the
83    /// client's behavior.
84    pub fn from_stub<T>(stub: T) -> Self
85    where
86        T: super::stub::SecureSourceManager + 'static,
87    {
88        Self {
89            inner: std::sync::Arc::new(stub),
90        }
91    }
92
93    pub(crate) async fn new(
94        config: gaxi::options::ClientConfig,
95    ) -> crate::ClientBuilderResult<Self> {
96        let inner = Self::build_inner(config).await?;
97        Ok(Self { inner })
98    }
99
100    async fn build_inner(
101        conf: gaxi::options::ClientConfig,
102    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::SecureSourceManager>>
103    {
104        if gaxi::options::tracing_enabled(&conf) {
105            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
106        }
107        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
108    }
109
110    async fn build_transport(
111        conf: gaxi::options::ClientConfig,
112    ) -> crate::ClientBuilderResult<impl super::stub::SecureSourceManager> {
113        super::transport::SecureSourceManager::new(conf).await
114    }
115
116    async fn build_with_tracing(
117        conf: gaxi::options::ClientConfig,
118    ) -> crate::ClientBuilderResult<impl super::stub::SecureSourceManager> {
119        Self::build_transport(conf)
120            .await
121            .map(super::tracing::SecureSourceManager::new)
122    }
123
124    /// Lists Instances in a given project and location.
125    pub fn list_instances(&self) -> super::builder::secure_source_manager::ListInstances {
126        super::builder::secure_source_manager::ListInstances::new(self.inner.clone())
127    }
128
129    /// Gets details of a single instance.
130    pub fn get_instance(&self) -> super::builder::secure_source_manager::GetInstance {
131        super::builder::secure_source_manager::GetInstance::new(self.inner.clone())
132    }
133
134    /// Creates a new instance in a given project and location.
135    ///
136    /// # Long running operations
137    ///
138    /// This method is used to start, and/or poll a [long-running Operation].
139    /// The [Working with long-running operations] chapter in the [user guide]
140    /// covers these operations in detail.
141    ///
142    /// [long-running operation]: https://google.aip.dev/151
143    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
144    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
145    pub fn create_instance(&self) -> super::builder::secure_source_manager::CreateInstance {
146        super::builder::secure_source_manager::CreateInstance::new(self.inner.clone())
147    }
148
149    /// Deletes a single instance.
150    ///
151    /// # Long running operations
152    ///
153    /// This method is used to start, and/or poll a [long-running Operation].
154    /// The [Working with long-running operations] chapter in the [user guide]
155    /// covers these operations in detail.
156    ///
157    /// [long-running operation]: https://google.aip.dev/151
158    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
159    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
160    pub fn delete_instance(&self) -> super::builder::secure_source_manager::DeleteInstance {
161        super::builder::secure_source_manager::DeleteInstance::new(self.inner.clone())
162    }
163
164    /// Lists Repositories in a given project and location.
165    ///
166    /// The instance field is required in the query parameter for requests using
167    /// the securesourcemanager.googleapis.com endpoint.
168    pub fn list_repositories(&self) -> super::builder::secure_source_manager::ListRepositories {
169        super::builder::secure_source_manager::ListRepositories::new(self.inner.clone())
170    }
171
172    /// Gets metadata of a repository.
173    pub fn get_repository(&self) -> super::builder::secure_source_manager::GetRepository {
174        super::builder::secure_source_manager::GetRepository::new(self.inner.clone())
175    }
176
177    /// Creates a new repository in a given project and location.
178    ///
179    /// The Repository.Instance field is required in the request body for requests
180    /// using the securesourcemanager.googleapis.com endpoint.
181    ///
182    /// # Long running operations
183    ///
184    /// This method is used to start, and/or poll a [long-running Operation].
185    /// The [Working with long-running operations] chapter in the [user guide]
186    /// covers these operations in detail.
187    ///
188    /// [long-running operation]: https://google.aip.dev/151
189    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
190    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
191    pub fn create_repository(&self) -> super::builder::secure_source_manager::CreateRepository {
192        super::builder::secure_source_manager::CreateRepository::new(self.inner.clone())
193    }
194
195    /// Updates the metadata of a repository.
196    ///
197    /// # Long running operations
198    ///
199    /// This method is used to start, and/or poll a [long-running Operation].
200    /// The [Working with long-running operations] chapter in the [user guide]
201    /// covers these operations in detail.
202    ///
203    /// [long-running operation]: https://google.aip.dev/151
204    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
205    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
206    pub fn update_repository(&self) -> super::builder::secure_source_manager::UpdateRepository {
207        super::builder::secure_source_manager::UpdateRepository::new(self.inner.clone())
208    }
209
210    /// Deletes a Repository.
211    ///
212    /// # Long running operations
213    ///
214    /// This method is used to start, and/or poll a [long-running Operation].
215    /// The [Working with long-running operations] chapter in the [user guide]
216    /// covers these operations in detail.
217    ///
218    /// [long-running operation]: https://google.aip.dev/151
219    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
220    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
221    pub fn delete_repository(&self) -> super::builder::secure_source_manager::DeleteRepository {
222        super::builder::secure_source_manager::DeleteRepository::new(self.inner.clone())
223    }
224
225    /// Lists hooks in a given repository.
226    pub fn list_hooks(&self) -> super::builder::secure_source_manager::ListHooks {
227        super::builder::secure_source_manager::ListHooks::new(self.inner.clone())
228    }
229
230    /// Gets metadata of a hook.
231    pub fn get_hook(&self) -> super::builder::secure_source_manager::GetHook {
232        super::builder::secure_source_manager::GetHook::new(self.inner.clone())
233    }
234
235    /// Creates a new hook in a given repository.
236    ///
237    /// # Long running operations
238    ///
239    /// This method is used to start, and/or poll a [long-running Operation].
240    /// The [Working with long-running operations] chapter in the [user guide]
241    /// covers these operations in detail.
242    ///
243    /// [long-running operation]: https://google.aip.dev/151
244    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
245    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
246    pub fn create_hook(&self) -> super::builder::secure_source_manager::CreateHook {
247        super::builder::secure_source_manager::CreateHook::new(self.inner.clone())
248    }
249
250    /// Updates the metadata of a hook.
251    ///
252    /// # Long running operations
253    ///
254    /// This method is used to start, and/or poll a [long-running Operation].
255    /// The [Working with long-running operations] chapter in the [user guide]
256    /// covers these operations in detail.
257    ///
258    /// [long-running operation]: https://google.aip.dev/151
259    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
260    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
261    pub fn update_hook(&self) -> super::builder::secure_source_manager::UpdateHook {
262        super::builder::secure_source_manager::UpdateHook::new(self.inner.clone())
263    }
264
265    /// Deletes a Hook.
266    ///
267    /// # Long running operations
268    ///
269    /// This method is used to start, and/or poll a [long-running Operation].
270    /// The [Working with long-running operations] chapter in the [user guide]
271    /// covers these operations in detail.
272    ///
273    /// [long-running operation]: https://google.aip.dev/151
274    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
275    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
276    pub fn delete_hook(&self) -> super::builder::secure_source_manager::DeleteHook {
277        super::builder::secure_source_manager::DeleteHook::new(self.inner.clone())
278    }
279
280    /// Get IAM policy for a repository.
281    pub fn get_iam_policy_repo(&self) -> super::builder::secure_source_manager::GetIamPolicyRepo {
282        super::builder::secure_source_manager::GetIamPolicyRepo::new(self.inner.clone())
283    }
284
285    /// Set IAM policy on a repository.
286    pub fn set_iam_policy_repo(&self) -> super::builder::secure_source_manager::SetIamPolicyRepo {
287        super::builder::secure_source_manager::SetIamPolicyRepo::new(self.inner.clone())
288    }
289
290    /// Test IAM permissions on a repository.
291    /// IAM permission checks are not required on this method.
292    pub fn test_iam_permissions_repo(
293        &self,
294    ) -> super::builder::secure_source_manager::TestIamPermissionsRepo {
295        super::builder::secure_source_manager::TestIamPermissionsRepo::new(self.inner.clone())
296    }
297
298    /// CreateBranchRule creates a branch rule in a given repository.
299    ///
300    /// # Long running operations
301    ///
302    /// This method is used to start, and/or poll a [long-running Operation].
303    /// The [Working with long-running operations] chapter in the [user guide]
304    /// covers these operations in detail.
305    ///
306    /// [long-running operation]: https://google.aip.dev/151
307    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
308    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
309    pub fn create_branch_rule(&self) -> super::builder::secure_source_manager::CreateBranchRule {
310        super::builder::secure_source_manager::CreateBranchRule::new(self.inner.clone())
311    }
312
313    /// ListBranchRules lists branch rules in a given repository.
314    pub fn list_branch_rules(&self) -> super::builder::secure_source_manager::ListBranchRules {
315        super::builder::secure_source_manager::ListBranchRules::new(self.inner.clone())
316    }
317
318    /// GetBranchRule gets a branch rule.
319    pub fn get_branch_rule(&self) -> super::builder::secure_source_manager::GetBranchRule {
320        super::builder::secure_source_manager::GetBranchRule::new(self.inner.clone())
321    }
322
323    /// UpdateBranchRule updates a branch rule.
324    ///
325    /// # Long running operations
326    ///
327    /// This method is used to start, and/or poll a [long-running Operation].
328    /// The [Working with long-running operations] chapter in the [user guide]
329    /// covers these operations in detail.
330    ///
331    /// [long-running operation]: https://google.aip.dev/151
332    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
333    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
334    pub fn update_branch_rule(&self) -> super::builder::secure_source_manager::UpdateBranchRule {
335        super::builder::secure_source_manager::UpdateBranchRule::new(self.inner.clone())
336    }
337
338    /// DeleteBranchRule deletes a branch rule.
339    ///
340    /// # Long running operations
341    ///
342    /// This method is used to start, and/or poll a [long-running Operation].
343    /// The [Working with long-running operations] chapter in the [user guide]
344    /// covers these operations in detail.
345    ///
346    /// [long-running operation]: https://google.aip.dev/151
347    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
348    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
349    pub fn delete_branch_rule(&self) -> super::builder::secure_source_manager::DeleteBranchRule {
350        super::builder::secure_source_manager::DeleteBranchRule::new(self.inner.clone())
351    }
352
353    /// Creates a pull request.
354    ///
355    /// # Long running operations
356    ///
357    /// This method is used to start, and/or poll a [long-running Operation].
358    /// The [Working with long-running operations] chapter in the [user guide]
359    /// covers these operations in detail.
360    ///
361    /// [long-running operation]: https://google.aip.dev/151
362    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
363    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
364    pub fn create_pull_request(&self) -> super::builder::secure_source_manager::CreatePullRequest {
365        super::builder::secure_source_manager::CreatePullRequest::new(self.inner.clone())
366    }
367
368    /// Gets a pull request.
369    pub fn get_pull_request(&self) -> super::builder::secure_source_manager::GetPullRequest {
370        super::builder::secure_source_manager::GetPullRequest::new(self.inner.clone())
371    }
372
373    /// Lists pull requests in a repository.
374    pub fn list_pull_requests(&self) -> super::builder::secure_source_manager::ListPullRequests {
375        super::builder::secure_source_manager::ListPullRequests::new(self.inner.clone())
376    }
377
378    /// Updates a pull request.
379    ///
380    /// # Long running operations
381    ///
382    /// This method is used to start, and/or poll a [long-running Operation].
383    /// The [Working with long-running operations] chapter in the [user guide]
384    /// covers these operations in detail.
385    ///
386    /// [long-running operation]: https://google.aip.dev/151
387    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
388    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
389    pub fn update_pull_request(&self) -> super::builder::secure_source_manager::UpdatePullRequest {
390        super::builder::secure_source_manager::UpdatePullRequest::new(self.inner.clone())
391    }
392
393    /// Merges a pull request.
394    ///
395    /// # Long running operations
396    ///
397    /// This method is used to start, and/or poll a [long-running Operation].
398    /// The [Working with long-running operations] chapter in the [user guide]
399    /// covers these operations in detail.
400    ///
401    /// [long-running operation]: https://google.aip.dev/151
402    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
403    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
404    pub fn merge_pull_request(&self) -> super::builder::secure_source_manager::MergePullRequest {
405        super::builder::secure_source_manager::MergePullRequest::new(self.inner.clone())
406    }
407
408    /// Opens a pull request.
409    ///
410    /// # Long running operations
411    ///
412    /// This method is used to start, and/or poll a [long-running Operation].
413    /// The [Working with long-running operations] chapter in the [user guide]
414    /// covers these operations in detail.
415    ///
416    /// [long-running operation]: https://google.aip.dev/151
417    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
418    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
419    pub fn open_pull_request(&self) -> super::builder::secure_source_manager::OpenPullRequest {
420        super::builder::secure_source_manager::OpenPullRequest::new(self.inner.clone())
421    }
422
423    /// Closes a pull request without merging.
424    ///
425    /// # Long running operations
426    ///
427    /// This method is used to start, and/or poll a [long-running Operation].
428    /// The [Working with long-running operations] chapter in the [user guide]
429    /// covers these operations in detail.
430    ///
431    /// [long-running operation]: https://google.aip.dev/151
432    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
433    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
434    pub fn close_pull_request(&self) -> super::builder::secure_source_manager::ClosePullRequest {
435        super::builder::secure_source_manager::ClosePullRequest::new(self.inner.clone())
436    }
437
438    /// Lists a pull request's file diffs.
439    pub fn list_pull_request_file_diffs(
440        &self,
441    ) -> super::builder::secure_source_manager::ListPullRequestFileDiffs {
442        super::builder::secure_source_manager::ListPullRequestFileDiffs::new(self.inner.clone())
443    }
444
445    /// Fetches a tree from a repository.
446    pub fn fetch_tree(&self) -> super::builder::secure_source_manager::FetchTree {
447        super::builder::secure_source_manager::FetchTree::new(self.inner.clone())
448    }
449
450    /// Fetches a blob from a repository.
451    pub fn fetch_blob(&self) -> super::builder::secure_source_manager::FetchBlob {
452        super::builder::secure_source_manager::FetchBlob::new(self.inner.clone())
453    }
454
455    /// Creates an issue.
456    ///
457    /// # Long running operations
458    ///
459    /// This method is used to start, and/or poll a [long-running Operation].
460    /// The [Working with long-running operations] chapter in the [user guide]
461    /// covers these operations in detail.
462    ///
463    /// [long-running operation]: https://google.aip.dev/151
464    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
465    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
466    pub fn create_issue(&self) -> super::builder::secure_source_manager::CreateIssue {
467        super::builder::secure_source_manager::CreateIssue::new(self.inner.clone())
468    }
469
470    /// Gets an issue.
471    pub fn get_issue(&self) -> super::builder::secure_source_manager::GetIssue {
472        super::builder::secure_source_manager::GetIssue::new(self.inner.clone())
473    }
474
475    /// Lists issues in a repository.
476    pub fn list_issues(&self) -> super::builder::secure_source_manager::ListIssues {
477        super::builder::secure_source_manager::ListIssues::new(self.inner.clone())
478    }
479
480    /// Updates a issue.
481    ///
482    /// # Long running operations
483    ///
484    /// This method is used to start, and/or poll a [long-running Operation].
485    /// The [Working with long-running operations] chapter in the [user guide]
486    /// covers these operations in detail.
487    ///
488    /// [long-running operation]: https://google.aip.dev/151
489    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
490    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
491    pub fn update_issue(&self) -> super::builder::secure_source_manager::UpdateIssue {
492        super::builder::secure_source_manager::UpdateIssue::new(self.inner.clone())
493    }
494
495    /// Deletes an issue.
496    ///
497    /// # Long running operations
498    ///
499    /// This method is used to start, and/or poll a [long-running Operation].
500    /// The [Working with long-running operations] chapter in the [user guide]
501    /// covers these operations in detail.
502    ///
503    /// [long-running operation]: https://google.aip.dev/151
504    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
505    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
506    pub fn delete_issue(&self) -> super::builder::secure_source_manager::DeleteIssue {
507        super::builder::secure_source_manager::DeleteIssue::new(self.inner.clone())
508    }
509
510    /// Opens an issue.
511    ///
512    /// # Long running operations
513    ///
514    /// This method is used to start, and/or poll a [long-running Operation].
515    /// The [Working with long-running operations] chapter in the [user guide]
516    /// covers these operations in detail.
517    ///
518    /// [long-running operation]: https://google.aip.dev/151
519    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
520    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
521    pub fn open_issue(&self) -> super::builder::secure_source_manager::OpenIssue {
522        super::builder::secure_source_manager::OpenIssue::new(self.inner.clone())
523    }
524
525    /// Closes an issue.
526    ///
527    /// # Long running operations
528    ///
529    /// This method is used to start, and/or poll a [long-running Operation].
530    /// The [Working with long-running operations] chapter in the [user guide]
531    /// covers these operations in detail.
532    ///
533    /// [long-running operation]: https://google.aip.dev/151
534    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
535    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
536    pub fn close_issue(&self) -> super::builder::secure_source_manager::CloseIssue {
537        super::builder::secure_source_manager::CloseIssue::new(self.inner.clone())
538    }
539
540    /// Gets a pull request comment.
541    pub fn get_pull_request_comment(
542        &self,
543    ) -> super::builder::secure_source_manager::GetPullRequestComment {
544        super::builder::secure_source_manager::GetPullRequestComment::new(self.inner.clone())
545    }
546
547    /// Lists pull request comments.
548    pub fn list_pull_request_comments(
549        &self,
550    ) -> super::builder::secure_source_manager::ListPullRequestComments {
551        super::builder::secure_source_manager::ListPullRequestComments::new(self.inner.clone())
552    }
553
554    /// Creates a pull request comment. This function is used to create a single
555    /// PullRequestComment of type Comment, or a single PullRequestComment of type
556    /// Code that's replying to another PullRequestComment of type Code. Use
557    /// BatchCreatePullRequestComments to create multiple PullRequestComments for
558    /// code reviews.
559    ///
560    /// # Long running operations
561    ///
562    /// This method is used to start, and/or poll a [long-running Operation].
563    /// The [Working with long-running operations] chapter in the [user guide]
564    /// covers these operations in detail.
565    ///
566    /// [long-running operation]: https://google.aip.dev/151
567    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
568    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
569    pub fn create_pull_request_comment(
570        &self,
571    ) -> super::builder::secure_source_manager::CreatePullRequestComment {
572        super::builder::secure_source_manager::CreatePullRequestComment::new(self.inner.clone())
573    }
574
575    /// Updates a pull request comment.
576    ///
577    /// # Long running operations
578    ///
579    /// This method is used to start, and/or poll a [long-running Operation].
580    /// The [Working with long-running operations] chapter in the [user guide]
581    /// covers these operations in detail.
582    ///
583    /// [long-running operation]: https://google.aip.dev/151
584    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
585    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
586    pub fn update_pull_request_comment(
587        &self,
588    ) -> super::builder::secure_source_manager::UpdatePullRequestComment {
589        super::builder::secure_source_manager::UpdatePullRequestComment::new(self.inner.clone())
590    }
591
592    /// Deletes a pull request comment.
593    ///
594    /// # Long running operations
595    ///
596    /// This method is used to start, and/or poll a [long-running Operation].
597    /// The [Working with long-running operations] chapter in the [user guide]
598    /// covers these operations in detail.
599    ///
600    /// [long-running operation]: https://google.aip.dev/151
601    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
602    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
603    pub fn delete_pull_request_comment(
604        &self,
605    ) -> super::builder::secure_source_manager::DeletePullRequestComment {
606        super::builder::secure_source_manager::DeletePullRequestComment::new(self.inner.clone())
607    }
608
609    /// Batch creates pull request comments. This function is used to create
610    /// multiple PullRequestComments for code review. There needs to be exactly one
611    /// PullRequestComment of type Review, and at most 100 PullRequestComments of
612    /// type Code per request. The Postition of the code comments must be unique
613    /// within the request.
614    ///
615    /// # Long running operations
616    ///
617    /// This method is used to start, and/or poll a [long-running Operation].
618    /// The [Working with long-running operations] chapter in the [user guide]
619    /// covers these operations in detail.
620    ///
621    /// [long-running operation]: https://google.aip.dev/151
622    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
623    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
624    pub fn batch_create_pull_request_comments(
625        &self,
626    ) -> super::builder::secure_source_manager::BatchCreatePullRequestComments {
627        super::builder::secure_source_manager::BatchCreatePullRequestComments::new(
628            self.inner.clone(),
629        )
630    }
631
632    /// Resolves pull request comments. A list of PullRequestComment names must be
633    /// provided. The PullRequestComment names must be in the same conversation
634    /// thread. If auto_fill is set, all comments in the conversation thread will
635    /// be resolved.
636    ///
637    /// # Long running operations
638    ///
639    /// This method is used to start, and/or poll a [long-running Operation].
640    /// The [Working with long-running operations] chapter in the [user guide]
641    /// covers these operations in detail.
642    ///
643    /// [long-running operation]: https://google.aip.dev/151
644    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
645    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
646    pub fn resolve_pull_request_comments(
647        &self,
648    ) -> super::builder::secure_source_manager::ResolvePullRequestComments {
649        super::builder::secure_source_manager::ResolvePullRequestComments::new(self.inner.clone())
650    }
651
652    /// Unresolves pull request comments. A list of PullRequestComment names must
653    /// be provided. The PullRequestComment names must be in the same conversation
654    /// thread. If auto_fill is set, all comments in the conversation thread will
655    /// be unresolved.
656    ///
657    /// # Long running operations
658    ///
659    /// This method is used to start, and/or poll a [long-running Operation].
660    /// The [Working with long-running operations] chapter in the [user guide]
661    /// covers these operations in detail.
662    ///
663    /// [long-running operation]: https://google.aip.dev/151
664    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
665    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
666    pub fn unresolve_pull_request_comments(
667        &self,
668    ) -> super::builder::secure_source_manager::UnresolvePullRequestComments {
669        super::builder::secure_source_manager::UnresolvePullRequestComments::new(self.inner.clone())
670    }
671
672    /// Creates an issue comment.
673    ///
674    /// # Long running operations
675    ///
676    /// This method is used to start, and/or poll a [long-running Operation].
677    /// The [Working with long-running operations] chapter in the [user guide]
678    /// covers these operations in detail.
679    ///
680    /// [long-running operation]: https://google.aip.dev/151
681    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
682    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
683    pub fn create_issue_comment(
684        &self,
685    ) -> super::builder::secure_source_manager::CreateIssueComment {
686        super::builder::secure_source_manager::CreateIssueComment::new(self.inner.clone())
687    }
688
689    /// Gets an issue comment.
690    pub fn get_issue_comment(&self) -> super::builder::secure_source_manager::GetIssueComment {
691        super::builder::secure_source_manager::GetIssueComment::new(self.inner.clone())
692    }
693
694    /// Lists comments in an issue.
695    pub fn list_issue_comments(&self) -> super::builder::secure_source_manager::ListIssueComments {
696        super::builder::secure_source_manager::ListIssueComments::new(self.inner.clone())
697    }
698
699    /// Updates an issue comment.
700    ///
701    /// # Long running operations
702    ///
703    /// This method is used to start, and/or poll a [long-running Operation].
704    /// The [Working with long-running operations] chapter in the [user guide]
705    /// covers these operations in detail.
706    ///
707    /// [long-running operation]: https://google.aip.dev/151
708    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
709    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
710    pub fn update_issue_comment(
711        &self,
712    ) -> super::builder::secure_source_manager::UpdateIssueComment {
713        super::builder::secure_source_manager::UpdateIssueComment::new(self.inner.clone())
714    }
715
716    /// Deletes an issue comment.
717    ///
718    /// # Long running operations
719    ///
720    /// This method is used to start, and/or poll a [long-running Operation].
721    /// The [Working with long-running operations] chapter in the [user guide]
722    /// covers these operations in detail.
723    ///
724    /// [long-running operation]: https://google.aip.dev/151
725    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
726    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
727    pub fn delete_issue_comment(
728        &self,
729    ) -> super::builder::secure_source_manager::DeleteIssueComment {
730        super::builder::secure_source_manager::DeleteIssueComment::new(self.inner.clone())
731    }
732
733    /// Lists information about the supported locations for this service.
734    pub fn list_locations(&self) -> super::builder::secure_source_manager::ListLocations {
735        super::builder::secure_source_manager::ListLocations::new(self.inner.clone())
736    }
737
738    /// Gets information about a location.
739    pub fn get_location(&self) -> super::builder::secure_source_manager::GetLocation {
740        super::builder::secure_source_manager::GetLocation::new(self.inner.clone())
741    }
742
743    /// Sets the access control policy on the specified resource. Replaces
744    /// any existing policy.
745    ///
746    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
747    /// errors.
748    pub fn set_iam_policy(&self) -> super::builder::secure_source_manager::SetIamPolicy {
749        super::builder::secure_source_manager::SetIamPolicy::new(self.inner.clone())
750    }
751
752    /// Gets the access control policy for a resource. Returns an empty policy
753    /// if the resource exists and does not have a policy set.
754    pub fn get_iam_policy(&self) -> super::builder::secure_source_manager::GetIamPolicy {
755        super::builder::secure_source_manager::GetIamPolicy::new(self.inner.clone())
756    }
757
758    /// Returns permissions that a caller has on the specified resource. If the
759    /// resource does not exist, this will return an empty set of
760    /// permissions, not a `NOT_FOUND` error.
761    ///
762    /// Note: This operation is designed to be used for building
763    /// permission-aware UIs and command-line tools, not for authorization
764    /// checking. This operation may "fail open" without warning.
765    pub fn test_iam_permissions(
766        &self,
767    ) -> super::builder::secure_source_manager::TestIamPermissions {
768        super::builder::secure_source_manager::TestIamPermissions::new(self.inner.clone())
769    }
770
771    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
772    ///
773    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
774    pub fn list_operations(&self) -> super::builder::secure_source_manager::ListOperations {
775        super::builder::secure_source_manager::ListOperations::new(self.inner.clone())
776    }
777
778    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
779    ///
780    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
781    pub fn get_operation(&self) -> super::builder::secure_source_manager::GetOperation {
782        super::builder::secure_source_manager::GetOperation::new(self.inner.clone())
783    }
784
785    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
786    ///
787    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
788    pub fn delete_operation(&self) -> super::builder::secure_source_manager::DeleteOperation {
789        super::builder::secure_source_manager::DeleteOperation::new(self.inner.clone())
790    }
791
792    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
793    ///
794    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
795    pub fn cancel_operation(&self) -> super::builder::secure_source_manager::CancelOperation {
796        super::builder::secure_source_manager::CancelOperation::new(self.inner.clone())
797    }
798}