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