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